From a74a96dd722a134911933fc0efb6a15f74817321 Mon Sep 17 00:00:00 2001 From: Alberto Granzotto Date: Thu, 28 Dec 2023 17:42:49 +0100 Subject: [PATCH] bump --- CNAME | 2 +- .../{index.ba0d545d.js => index.9b0b28dc.js} | 64 +++++++++---------- index.html | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) rename assets/{index.ba0d545d.js => index.9b0b28dc.js} (88%) diff --git a/CNAME b/CNAME index 15f2b79..ba4d7ad 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -37c3.staging.dist0rtion.com \ No newline at end of file +37c3.dist0rtion.com \ No newline at end of file diff --git a/assets/index.ba0d545d.js b/assets/index.9b0b28dc.js similarity index 88% rename from assets/index.ba0d545d.js rename to assets/index.9b0b28dc.js index 3569bab..de1b704 100644 --- a/assets/index.ba0d545d.js +++ b/assets/index.9b0b28dc.js @@ -1,26 +1,26 @@ -var y2=Object.defineProperty;var v2=(r,e,t)=>e in r?y2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Rs=(r,e,t)=>(v2(r,typeof e!="symbol"?e+"":e,t),t);function w2(r,e){for(var t=0;tn[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();function We(){}const Wc=r=>r;function pd(r,e){for(const t in e)r[t]=e[t];return r}function Z(r,e,t,n,i){r.__svelte_meta={loc:{file:e,line:t,column:n,char:i}}}function xd(r){return r()}function zl(){return Object.create(null)}function ln(r){r.forEach(xd)}function Fo(r){return typeof r=="function"}function Pr(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}let Ko;function Ma(r,e){return Ko||(Ko=document.createElement("a")),Ko.href=e,r===Ko.href}function A2(r){return Object.keys(r).length===0}function Rt(r,e){if(r!=null&&typeof r.subscribe!="function")throw new Error(`'${e}' is not a store with a 'subscribe' method`)}function Yc(r,...e){if(r==null)return We;const t=r.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function E2(r){let e;return Yc(r,t=>e=t)(),e}function Nt(r,e,t){r.$$.on_destroy.push(Yc(e,t))}function Xn(r,e,t){return r.set(t),e}const bd=typeof window<"u";let gd=bd?()=>window.performance.now():()=>Date.now(),Zc=bd?r=>requestAnimationFrame(r):We;const x0=new Set;function md(r){x0.forEach(e=>{e.c(r)||(x0.delete(e),e.f())}),x0.size!==0&&Zc(md)}function yd(r){let e;return x0.size===0&&Zc(md),{promise:new Promise(t=>{x0.add(e={c:r,f:t})}),abort(){x0.delete(e)}}}function vd(r,e){r.appendChild(e)}function wd(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function _2(r){const e=Y("style");return C2(wd(r),e),e.sheet}function C2(r,e){vd(r.head||r,e)}function S2(r,e,t){r.insertBefore(e,t||null)}function Ad(r){r.parentNode.removeChild(r)}function Ed(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function ka(r){return function(e){return e.preventDefault(),r.call(this,e)}}function M2(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function k2(r){return Array.from(r.childNodes)}function xn(r,e){r.value=e==null?"":e}function jl(r,e,t){r.classList[t?"add":"remove"](e)}function $c(r,e,{bubbles:t=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,t,n,e),i}const Pa=new Map;let Ra=0;function P2(r){let e=5381,t=r.length;for(;t--;)e=(e<<5)-e^r.charCodeAt(t);return e>>>0}function R2(r,e){const t={stylesheet:_2(e),rules:{}};return Pa.set(r,t),t}function Vf(r,e,t,n,i,o,a,s=0){const u=16.666/n;let l=`{ +var w2=Object.defineProperty;var A2=(r,e,t)=>e in r?w2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Rs=(r,e,t)=>(A2(r,typeof e!="symbol"?e+"":e,t),t);function E2(r,e){for(var t=0;tn[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();function We(){}const Wc=r=>r;function xd(r,e){for(const t in e)r[t]=e[t];return r}function Z(r,e,t,n,i){r.__svelte_meta={loc:{file:e,line:t,column:n,char:i}}}function bd(r){return r()}function zl(){return Object.create(null)}function ln(r){r.forEach(bd)}function To(r){return typeof r=="function"}function Pr(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}let Ko;function Ma(r,e){return Ko||(Ko=document.createElement("a")),Ko.href=e,r===Ko.href}function _2(r){return Object.keys(r).length===0}function Rt(r,e){if(r!=null&&typeof r.subscribe!="function")throw new Error(`'${e}' is not a store with a 'subscribe' method`)}function Yc(r,...e){if(r==null)return We;const t=r.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function C2(r){let e;return Yc(r,t=>e=t)(),e}function Nt(r,e,t){r.$$.on_destroy.push(Yc(e,t))}function Xn(r,e,t){return r.set(t),e}const gd=typeof window<"u";let md=gd?()=>window.performance.now():()=>Date.now(),Zc=gd?r=>requestAnimationFrame(r):We;const x0=new Set;function yd(r){x0.forEach(e=>{e.c(r)||(x0.delete(e),e.f())}),x0.size!==0&&Zc(yd)}function vd(r){let e;return x0.size===0&&Zc(yd),{promise:new Promise(t=>{x0.add(e={c:r,f:t})}),abort(){x0.delete(e)}}}function wd(r,e){r.appendChild(e)}function Ad(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function S2(r){const e=Y("style");return B2(Ad(r),e),e.sheet}function B2(r,e){wd(r.head||r,e)}function M2(r,e,t){r.insertBefore(e,t||null)}function Ed(r){r.parentNode.removeChild(r)}function _d(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function ka(r){return function(e){return e.preventDefault(),r.call(this,e)}}function P2(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function R2(r){return Array.from(r.childNodes)}function xn(r,e){r.value=e==null?"":e}function jl(r,e,t){r.classList[t?"add":"remove"](e)}function $c(r,e,{bubbles:t=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,t,n,e),i}const Pa=new Map;let Ra=0;function N2(r){let e=5381,t=r.length;for(;t--;)e=(e<<5)-e^r.charCodeAt(t);return e>>>0}function F2(r,e){const t={stylesheet:S2(e),rules:{}};return Pa.set(r,t),t}function Vf(r,e,t,n,i,o,a,s=0){const u=16.666/n;let l=`{ `;for(let C=0;C<=1;C+=u){const M=e+(t-e)*o(C);l+=C*100+`%{${a(M,1-M)}} `}const h=l+`100% {${a(t,1-t)}} -}`,b=`__svelte_${P2(h)}_${s}`,m=wd(r),{stylesheet:A,rules:_}=Pa.get(m)||R2(m,r);_[b]||(_[b]=!0,A.insertRule(`@keyframes ${b} ${h}`,A.cssRules.length));const S=r.style.animation||"";return r.style.animation=`${S?`${S}, `:""}${b} ${n}ms linear ${i}ms 1 both`,Ra+=1,b}function _d(r,e){const t=(r.style.animation||"").split(", "),n=t.filter(e?o=>o.indexOf(e)<0:o=>o.indexOf("__svelte")===-1),i=t.length-n.length;i&&(r.style.animation=n.join(", "),Ra-=i,Ra||N2())}function N2(){Zc(()=>{Ra||(Pa.forEach(r=>{const{stylesheet:e}=r;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);r.rules={}}),Pa.clear())})}let ho;function to(r){ho=r}function ts(){if(!ho)throw new Error("Function called outside component initialization");return ho}function Xl(r){ts().$$.on_mount.push(r)}function ql(r){ts().$$.after_update.push(r)}function Vl(r){ts().$$.on_destroy.push(r)}function Kl(){const r=ts();return(e,t,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[e];if(i){const o=$c(e,t,{cancelable:n});return i.slice().forEach(a=>{a.call(r,o)}),!o.defaultPrevented}return!0}}function Ql(r,e){const t=r.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const W0=[],Kf=[],ua=[],Wl=[],Cd=Promise.resolve();let Qf=!1;function Sd(){Qf||(Qf=!0,Cd.then(Bd))}function po(){return Sd(),Cd}function zi(r){ua.push(r)}const Ns=new Set;let Qo=0;function Bd(){const r=ho;do{for(;Qo{z0=null})),z0}function ro(r,e,t){r.dispatchEvent($c(`${e?"intro":"outro"}${t}`))}const ha=new Set;let wn;function Pn(){wn={r:0,c:[],p:wn}}function Rn(){wn.r||ln(wn.c),wn=wn.p}function dt(r,e){r&&r.i&&(ha.delete(r),r.i(e))}function At(r,e,t,n){if(r&&r.o){if(ha.has(r))return;ha.add(r),wn.c.push(()=>{ha.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}const kd={duration:0};function T2(r,e,t){let n=e(r,t),i=!0,o;const a=wn;a.r+=1;function s(){const{delay:u=0,duration:l=300,easing:h=Wc,tick:b=We,css:m}=n||kd;m&&(o=Vf(r,1,0,l,u,h,m));const A=gd()+u,_=A+l;zi(()=>ro(r,!1,"start")),yd(S=>{if(i){if(S>=_)return b(0,1),ro(r,!1,"end"),--a.r||ln(a.c),!1;if(S>=A){const C=h((S-A)/l);b(1-C,C)}}return i})}return Fo(n)?Md().then(()=>{n=n(),s()}):s(),{end(u){u&&n.tick&&n.tick(1,0),i&&(o&&_d(r,o),i=!1)}}}function Na(r,e,t,n){let i=e(r,t),o=n?0:1,a=null,s=null,u=null;function l(){u&&_d(r,u)}function h(m,A){const _=m.b-o;return A*=Math.abs(_),{a:o,b:m.b,d:_,duration:A,start:m.start,end:m.start+A,group:m.group}}function b(m){const{delay:A=0,duration:_=300,easing:S=Wc,tick:C=We,css:M}=i||kd,B={start:gd()+A,b:m};m||(B.group=wn,wn.r+=1),a||s?s=B:(M&&(l(),u=Vf(r,o,m,_,A,S,M)),m&&C(0,1),a=h(B,_),zi(()=>ro(r,m,"start")),yd(P=>{if(s&&P>s.start&&(a=h(s,_),s=null,ro(r,a.b,"start"),M&&(l(),u=Vf(r,o,a.b,a.duration,0,S,i.css))),a){if(P>=a.end)C(o=a.b,1-o),ro(r,a.b,"end"),s||(a.b?l():--a.group.r||ln(a.group.c)),a=null;else if(P>=a.start){const R=P-a.start;o=a.a+a.d*S(R/a.duration),C(o,1-o)}}return!!(a||s)}))}return{run(m){Fo(i)?Md().then(()=>{i=i(),b(m)}):b(m)},end(){l(),a=s=null}}}const rs=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Pd(r,e){const t={},n={},i={$$scope:1};let o=r.length;for(;o--;){const a=r[o],s=e[o];if(s){for(const u in a)u in s||(n[u]=1);for(const u in s)i[u]||(t[u]=s[u],i[u]=1);r[o]=s}else for(const u in a)i[u]=1}for(const a in n)a in t||(t[a]=void 0);return t}function Rd(r){return typeof r=="object"&&r!==null?r:{}}function Nn(r){r&&r.c()}function sn(r,e,t,n){const{fragment:i,on_mount:o,on_destroy:a,after_update:s}=r.$$;i&&i.m(e,t),n||zi(()=>{const u=o.map(xd).filter(Fo);a?a.push(...u):ln(u),r.$$.on_mount=[]}),s.forEach(zi)}function fn(r,e){const t=r.$$;t.fragment!==null&&(ln(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function I2(r,e){r.$$.dirty[0]===-1&&(W0.push(r),Sd(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{const _=A.length?A[0]:m;return l.ctx&&i(l.ctx[b],l.ctx[b]=_)&&(!l.skip_bound&&l.bound[b]&&l.bound[b](_),h&&I2(r,b)),m}):[],l.update(),h=!0,ln(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const b=k2(e.target);l.fragment&&l.fragment.l(b),b.forEach(Ad)}else l.fragment&&l.fragment.c();e.intro&&dt(r.$$.fragment),sn(r,e.target,e.anchor,e.customElement),Bd()}to(u)}class D2{$destroy(){fn(this,1),this.$destroy=We}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!A2(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ue(r,e){document.dispatchEvent($c(r,Object.assign({version:"3.49.0"},e),{bubbles:!0}))}function re(r,e){ue("SvelteDOMInsert",{target:r,node:e}),vd(r,e)}function $(r,e,t){ue("SvelteDOMInsert",{target:r,node:e,anchor:t}),S2(r,e,t)}function ee(r){ue("SvelteDOMRemove",{node:r}),Ad(r)}function Qt(r,e,t,n,i,o){const a=n===!0?["capture"]:n?Array.from(Object.keys(n)):[];i&&a.push("preventDefault"),o&&a.push("stopPropagation"),ue("SvelteDOMAddEventListener",{node:r,event:e,handler:t,modifiers:a});const s=B2(r,e,t,n);return()=>{ue("SvelteDOMRemoveEventListener",{node:r,event:e,handler:t,modifiers:a}),s()}}function ne(r,e,t){M2(r,e,t),t==null?ue("SvelteDOMRemoveAttribute",{node:r,attribute:e}):ue("SvelteDOMSetAttribute",{node:r,attribute:e,value:t})}function ji(r,e,t){r[e]=t,ue("SvelteDOMSetProperty",{node:r,property:e,value:t})}function hi(r,e){e=""+e,r.wholeText!==e&&(ue("SvelteDOMSetData",{node:r,data:e}),r.data=e)}function Fa(r){if(typeof r!="string"&&!(r&&typeof r=="object"&&"length"in r)){let e="{#each} only iterates over array-like objects.";throw typeof Symbol=="function"&&r&&Symbol.iterator in r&&(e+=" You can use a spread to convert this iterable into an array."),new Error(e)}}function Or(r,e,t){for(const n of Object.keys(e))~t.indexOf(n)||console.warn(`<${r}> received an unexpected slot "${n}".`)}class Lr extends D2{constructor(e){if(!e||!e.target&&!e.$$inline)throw new Error("'target' is a required option");super()}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}function Nd(r){if(!r)throw Error("Parameter args is required");if(!r.component==!r.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(r.component&&(r.asyncComponent=()=>Promise.resolve(r.component)),typeof r.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(r.conditions){Array.isArray(r.conditions)||(r.conditions=[r.conditions]);for(let t=0;t{n.delete(l),n.size===0&&(t(),t=null)}}return{set:i,update:o,subscribe:a}}function pr(r,e,t){const n=!Array.isArray(r),i=n?[r]:r,o=e.length<2;return ns(t,a=>{let s=!1;const u=[];let l=0,h=We;const b=()=>{if(l)return;h();const A=e(n?u[0]:u,a);o?a(A):h=Fo(A)?A:We},m=i.map((A,_)=>Yc(A,S=>{u[_]=S,l&=~(1<<_),s&&b()},()=>{l|=1<<_}));return s=!0,b(),function(){ln(m),h()}})}function Yl(r,e){if(r instanceof RegExp)return{keys:!1,pattern:r};var t,n,i,o,a=[],s="",u=r.split("/");for(u[0]||u.shift();i=u.shift();)t=i[0],t==="*"?(a.push("wild"),s+="/(.*)"):t===":"?(n=i.indexOf("?",1),o=i.indexOf(".",1),a.push(i.substring(1,~n?n:~o?o:i.length)),s+=!!~n&&!~o?"(?:/([^/]+?))?":"/([^/]+?)",~o&&(s+=(~n?"?":"")+"\\"+i.substring(o))):s+="/"+i;return{keys:a,pattern:new RegExp("^"+s+(e?"(?=$|/)":"/?$"),"i")}}const{Error:Ii,Object:O2,console:L2}=rs;function Fd(r){let e,t,n;const i=[r[2]];var o=r[0];function a(u){let l={};for(let h=0;h{fn(m,1)}),Rn()}o?(e=new o(a()),e.$on("routeEvent",l[7]),Nn(e.$$.fragment),dt(e.$$.fragment,1),sn(e,t.parentNode,t)):e=null}else o&&e.$set(b)},i:function(l){n||(e&&dt(e.$$.fragment,l),n=!0)},o:function(l){e&&At(e.$$.fragment,l),n=!1},d:function(l){l&&ee(t),e&&fn(e,l)}};return ue("SvelteRegisterBlock",{block:s,id:Fd.name,type:"else",source:"(267:0) {:else}",ctx:r}),s}function Td(r){let e,t,n;const i=[{params:r[1]},r[2]];var o=r[0];function a(u){let l={};for(let h=0;h{fn(m,1)}),Rn()}o?(e=new o(a()),e.$on("routeEvent",l[6]),Nn(e.$$.fragment),dt(e.$$.fragment,1),sn(e,t.parentNode,t)):e=null}else o&&e.$set(b)},i:function(l){n||(e&&dt(e.$$.fragment,l),n=!0)},o:function(l){e&&At(e.$$.fragment,l),n=!1},d:function(l){l&&ee(t),e&&fn(e,l)}};return ue("SvelteRegisterBlock",{block:s,id:Td.name,type:"if",source:"(260:0) {#if componentParams}",ctx:r}),s}function Wf(r){let e,t,n,i;const o=[Td,Fd],a=[];function s(l,h){return l[1]?0:1}e=s(r),t=a[e]=o[e](r);const u={c:function(){t.c(),n=Kr()},l:function(h){throw new Ii("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?a[e].p(h,b):(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn(),t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n))},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Wf.name,type:"component",source:"",ctx:r}),u}function U2(r,e,...t){return console.warn("Method `wrap` from `svelte-spa-router` is deprecated and will be removed in a future version. Please use `svelte-spa-router/wrap` instead. See http://bit.ly/svelte-spa-router-upgrading"),Nd({component:r,userData:e,conditions:t})}function Yf(){const r=window.location.href.indexOf("#/");let e=r>-1?window.location.href.substr(r+1):"/";const t=e.indexOf("?");let n="";return t>-1&&(n=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:n}}const Ta=ns(null,function(e){e(Yf());const t=()=>{e(Yf())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}}),J2=pr(Ta,r=>r.location),H2=pr(Ta,r=>r.querystring),Fs=Wi(void 0);async function G2(r){if(!r||r.length<1||r.charAt(0)!="/"&&r.indexOf("#/")!==0)throw Error("Invalid parameter location");await po(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(r.charAt(0)=="#"?"":"#")+r}async function z2(){await po(),window.history.back()}async function j2(r){if(!r||r.length<1||r.charAt(0)!="/"&&r.indexOf("#/")!==0)throw Error("Invalid parameter location");await po();const e=(r.charAt(0)=="#"?"":"#")+r;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function X2(r,e){if(e=$f(e),!r||!r.tagName||r.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return Zf(r,e),{update(t){t=$f(t),Zf(r,t)}}}function Zl(r){r?window.scrollTo(r.__svelte_spa_router_scrollX,r.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function Zf(r,e){let t=e.href||r.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);r.setAttribute("href",t),r.addEventListener("click",n=>{n.preventDefault(),e.disabled||Id(n.currentTarget.getAttribute("href"))})}function $f(r){return r&&typeof r=="string"?{href:r}:r||{}}function Id(r){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=r}function q2(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Router",n,[]);let{routes:o={}}=e,{prefix:a=""}=e,{restoreScrollState:s=!1}=e;class u{constructor(J,X){if(!X||typeof X!="function"&&(typeof X!="object"||X._sveltesparouter!==!0))throw Error("Invalid component object");if(!J||typeof J=="string"&&(J.length<1||J.charAt(0)!="/"&&J.charAt(0)!="*")||typeof J=="object"&&!(J instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:H,keys:L}=Yl(J);this.path=J,typeof X=="object"&&X._sveltesparouter===!0?(this.component=X.component,this.conditions=X.conditions||[],this.userData=X.userData,this.props=X.props||{}):(this.component=()=>Promise.resolve(X),this.conditions=[],this.props={}),this._pattern=H,this._keys=L}match(J){if(a){if(typeof a=="string")if(J.startsWith(a))J=J.substr(a.length)||"/";else return null;else if(a instanceof RegExp){const j=J.match(a);if(j&&j[0])J=J.substr(j[0].length)||"/";else return null}}const X=this._pattern.exec(J);if(X===null)return null;if(this._keys===!1)return X;const H={};let L=0;for(;L{l.push(new u(J,O))}):Object.keys(o).forEach(O=>{l.push(new u(O,o[O]))});let h=null,b=null,m={};const A=Kl();async function _(O,J){await po(),A(O,J)}let S=null,C=null;s&&(C=O=>{O.state&&(O.state.__svelte_spa_router_scrollY||O.state.__svelte_spa_router_scrollX)?S=O.state:S=null},window.addEventListener("popstate",C),ql(()=>{Zl(S)}));let M=null,B=null;const P=Ta.subscribe(async O=>{M=O;let J=0;for(;J{Fs.set(b)});return}t(0,h=null),B=null,Fs.set(void 0)});Vl(()=>{P(),C&&window.removeEventListener("popstate",C)});const R=["routes","prefix","restoreScrollState"];O2.keys(e).forEach(O=>{!~R.indexOf(O)&&O.slice(0,2)!=="$$"&&O!=="slot"&&L2.warn(` was created with unknown prop '${O}'`)});function I(O){Ql.call(this,r,O)}function D(O){Ql.call(this,r,O)}return r.$$set=O=>{"routes"in O&&t(3,o=O.routes),"prefix"in O&&t(4,a=O.prefix),"restoreScrollState"in O&&t(5,s=O.restoreScrollState)},r.$capture_state=()=>({readable:ns,writable:Wi,derived:pr,tick:po,_wrap:Nd,wrap:U2,getLocation:Yf,loc:Ta,location:J2,querystring:H2,params:Fs,push:G2,pop:z2,replace:j2,link:X2,restoreScroll:Zl,updateLink:Zf,linkOpts:$f,scrollstateHistoryHandler:Id,onDestroy:Vl,createEventDispatcher:Kl,afterUpdate:ql,parse:Yl,routes:o,prefix:a,restoreScrollState:s,RouteItem:u,routesList:l,component:h,componentParams:b,props:m,dispatch:A,dispatchNextTick:_,previousScrollState:S,popStateChanged:C,lastLoc:M,componentObj:B,unsubscribeLoc:P}),r.$inject_state=O=>{"routes"in O&&t(3,o=O.routes),"prefix"in O&&t(4,a=O.prefix),"restoreScrollState"in O&&t(5,s=O.restoreScrollState),"component"in O&&t(0,h=O.component),"componentParams"in O&&t(1,b=O.componentParams),"props"in O&&t(2,m=O.props),"previousScrollState"in O&&(S=O.previousScrollState),"popStateChanged"in O&&(C=O.popStateChanged),"lastLoc"in O&&(M=O.lastLoc),"componentObj"in O&&(B=O.componentObj)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),r.$$.update=()=>{r.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[h,b,m,o,a,s,I,D]}class Dd extends Lr{constructor(e){super(e),Dr(this,e,q2,Wf,Pr,{routes:3,prefix:4,restoreScrollState:5}),ue("SvelteRegisterComponent",{component:this,tagName:"Router",options:e,id:Wf.name})}get routes(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set routes(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get prefix(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set prefix(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get restoreScrollState(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set restoreScrollState(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const hn="src/components/Header.svelte";function ec(r){let e,t,n,i,o,a,s,u,l,h,b,m,A;const _={c:function(){e=Y("nav"),t=Y("ul"),n=Y("li"),i=Y("a"),i.textContent="Game",o=he(),a=Y("li"),s=Y("a"),s.textContent="Leaderboard",u=he(),l=Y("li"),h=Y("a"),h.textContent="Settings",b=he(),m=Y("li"),A=Y("a"),A.textContent="?",ne(i,"href","#/"),Z(i,hn,3,6,48),Z(n,hn,2,4,37),ne(s,"href","#/leaderboard"),Z(s,hn,11,6,163),Z(a,hn,10,4,152),ne(h,"href","#/settings"),Z(h,hn,14,6,228),Z(l,hn,13,4,217),ne(A,"href","#/about"),Z(A,hn,17,6,287),Z(m,hn,16,4,276),Z(t,hn,1,2,28),ne(e,"class","thc--header"),Z(e,hn,0,0,0)},l:function(C){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(C,M){$(C,e,M),re(e,t),re(t,n),re(n,i),re(t,o),re(t,a),re(a,s),re(t,u),re(t,l),re(l,h),re(t,b),re(t,m),re(m,A)},p:We,i:We,o:We,d:function(C){C&&ee(e)}};return ue("SvelteRegisterBlock",{block:_,id:ec.name,type:"component",source:"",ctx:r}),_}function V2(r,e){let{$$slots:t={},$$scope:n}=e;Or("Header",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(`
was created with unknown prop '${o}'`)}),[]}class Od extends Lr{constructor(e){super(e),Dr(this,e,V2,ec,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Header",options:e,id:ec.name})}}function di(r,{delay:e=0,duration:t=400,easing:n=Wc}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:o=>`opacity: ${o*i}`}}const $l="src/components/Loader.svelte";function tc(r){let e,t,n,i;const o={c:function(){e=Y("div"),t=Y("span"),ne(t,"class","loader s-BBunC__gYdVv"),Z(t,$l,5,2,128),ne(e,"class","s-BBunC__gYdVv"),jl(e,"fullscreen",r[0]),Z(e,$l,4,0,94)},l:function(s){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(s,u){$(s,e,u),re(e,t),i=!0},p:function(s,[u]){u&1&&jl(e,"fullscreen",s[0])},i:function(s){i||(n&&n.end(1),i=!0)},o:function(s){n=T2(e,di,{}),i=!1},d:function(s){s&&ee(e),s&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:o,id:tc.name,type:"component",source:"",ctx:r}),o}function K2(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Loader",n,[]);let{fullscreen:o}=e;const a=["fullscreen"];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$$set=s=>{"fullscreen"in s&&t(0,o=s.fullscreen)},r.$capture_state=()=>({fade:di,fullscreen:o}),r.$inject_state=s=>{"fullscreen"in s&&t(0,o=s.fullscreen)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o]}class Ld extends Lr{constructor(e){super(e),Dr(this,e,K2,tc,Pr,{fullscreen:0}),ue("SvelteRegisterComponent",{component:this,tagName:"Loader",options:e,id:tc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("fullscreen"in n)&&console.warn(" was created without expected prop 'fullscreen'")}get fullscreen(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set fullscreen(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Q2(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function It(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Ir={},Ud={exports:{}};const W2=new Proxy({},{get(r,e){throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${e}" in client code.`)}}),Y2=Object.freeze(Object.defineProperty({__proto__:null,default:W2},Symbol.toStringTag,{value:"Module"})),el=It(Y2);(function(r){(function(e,t){function n(v,f){if(!v)throw new Error(f||"Assertion failed")}function i(v,f){v.super_=f;var p=function(){};p.prototype=f.prototype,v.prototype=new p,v.prototype.constructor=v}function o(v,f,p){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(v||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=el.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,g){if(typeof f=="number")return this._initNumber(f,p,g);if(typeof f=="object")return this._initArray(f,p,g);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w=0;w-=3)k=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[E]|=k<>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);else if(g==="le")for(w=0,E=0;w>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);return this._strip()};function s(v,f){var p=v.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+v)}function u(v,f,p){var g=s(v,p);return p-1>=f&&(g|=s(v,p-1)<<4),g}o.prototype._parseHex=function(f,p,g){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var w=0;w=p;w-=2)F=u(f,p,w)<=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8;else{var x=f.length-p;for(w=x%2===0?p+1:p;w=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8}this._strip()};function l(v,f,p,g){for(var w=0,E=0,k=Math.min(v.length,p),F=f;F=49?E=x-49+10:x>=17?E=x-17+10:E=x,n(x>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch{o.prototype.inspect=b}else o.prototype.inspect=b;function b(){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"],A=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var g;if(f===16||f==="hex"){g="";for(var w=0,E=0,k=0;k>>24-w&16777215,w+=2,w>=26&&(w-=26,k--),E!==0||k!==this.length-1?g=m[6-x.length]+x+g:g=x+g}for(E!==0&&(g=E.toString(16)+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(f===(f|0)&&f>=2&&f<=36){var c=A[f],y=_[f];g="";var T=this.clone();for(T.negative=0;!T.isZero();){var d=T.modrn(y).toString(f);T=T.idivn(y),T.isZero()?g=d+g:g=m[c-d.length]+d+g}for(this.isZero()&&(g="0"+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(a,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var S=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,g){this._strip();var w=this.byteLength(),E=g||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=S(f,E),F=p==="le"?"LE":"BE";return this["_toArrayLike"+F](k,w),k},o.prototype._toArrayLikeLE=function(f,p){for(var g=0,w=0,E=0,k=0;E>8&255),g>16&255),k===6?(g>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g=0&&(f[g--]=F>>8&255),g>=0&&(f[g--]=F>>16&255),k===6?(g>=0&&(f[g--]=F>>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g>=0)for(f[g--]=w;g>=0;)f[g--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,g=0;return p>=4096&&(g+=13,p>>>=13),p>=64&&(g+=7,p>>>=7),p>=8&&(g+=4,p>>>=4),p>=2&&(g+=2,p>>>=2),g+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,g=0;return(p&8191)===0&&(g+=13,p>>>=13),(p&127)===0&&(g+=7,p>>>=7),(p&15)===0&&(g+=4,p>>>=4),(p&3)===0&&(g+=2,p>>>=2),(p&1)===0&&g++,g},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function C(v){for(var f=new Array(v.bitLength()),p=0;p>>w&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var g=0;gf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,g;this.length>f.length?(p=this,g=f):(p=f,g=this);for(var w=0;wf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,g=f%26;this._expand(p),g>0&&p--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-g),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var g=f/26|0,w=f%26;return this._expand(g+1),p?this.words[g]=this.words[g]|1<f.length?(g=this,w=f):(g=f,w=this);for(var E=0,k=0;k>>26;for(;E!==0&&k>>26;if(this.length=g.length,E!==0)this.words[this.length]=E,this.length++;else if(g!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var g=this.cmp(f);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;g>0?(w=this,E=f):(w=f,E=this);for(var k=0,F=0;F>26,this.words[F]=p&67108863;for(;k!==0&&F>26,this.words[F]=p&67108863;if(k===0&&F>>26,T=x&67108863,d=Math.min(c,f.length-1),N=Math.max(0,c-v.length+1);N<=d;N++){var G=c-N|0;w=v.words[G]|0,E=f.words[N]|0,k=w*E+T,y+=k/67108864|0,T=k&67108863}p.words[c]=T|0,x=y|0}return x!==0?p.words[c]=x|0:p.length--,p._strip()}var B=function(f,p,g){var w=f.words,E=p.words,k=g.words,F=0,x,c,y,T=w[0]|0,d=T&8191,N=T>>>13,G=w[1]|0,U=G&8191,z=G>>>13,te=w[2]|0,K=te&8191,V=te>>>13,me=w[3]|0,Q=me&8191,oe=me>>>13,xt=w[4]|0,we=xt&8191,ge=xt>>>13,Ct=w[5]|0,Ae=Ct&8191,xe=Ct>>>13,ft=w[6]|0,de=ft&8191,Ce=ft>>>13,St=w[7]|0,pe=St&8191,Ee=St>>>13,wt=w[8]|0,W=wt&8191,ie=wt>>>13,Ft=w[9]|0,Se=Ft&8191,Fe=Ft>>>13,zt=E[0]|0,Me=zt&8191,Te=zt>>>13,Zt=E[1]|0,ke=Zt&8191,Ie=Zt>>>13,jt=E[2]|0,De=jt&8191,Pe=jt>>>13,$t=E[3]|0,Oe=$t&8191,Le=$t>>>13,Xt=E[4]|0,Ue=Xt&8191,Je=Xt>>>13,qt=E[5]|0,He=qt&8191,Re=qt>>>13,pt=E[6]|0,_e=pt&8191,Ne=pt>>>13,er=E[7]|0,ze=er&8191,je=er>>>13,xr=E[8]|0,Xe=xr&8191,qe=xr>>>13,br=E[9]|0,Ve=br&8191,Ke=br>>>13;g.negative=f.negative^p.negative,g.length=19,x=Math.imul(d,Me),c=Math.imul(d,Te),c=c+Math.imul(N,Me)|0,y=Math.imul(N,Te);var tr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(tr>>>26)|0,tr&=67108863,x=Math.imul(U,Me),c=Math.imul(U,Te),c=c+Math.imul(z,Me)|0,y=Math.imul(z,Te),x=x+Math.imul(d,ke)|0,c=c+Math.imul(d,Ie)|0,c=c+Math.imul(N,ke)|0,y=y+Math.imul(N,Ie)|0;var rr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(rr>>>26)|0,rr&=67108863,x=Math.imul(K,Me),c=Math.imul(K,Te),c=c+Math.imul(V,Me)|0,y=Math.imul(V,Te),x=x+Math.imul(U,ke)|0,c=c+Math.imul(U,Ie)|0,c=c+Math.imul(z,ke)|0,y=y+Math.imul(z,Ie)|0,x=x+Math.imul(d,De)|0,c=c+Math.imul(d,Pe)|0,c=c+Math.imul(N,De)|0,y=y+Math.imul(N,Pe)|0;var nr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(nr>>>26)|0,nr&=67108863,x=Math.imul(Q,Me),c=Math.imul(Q,Te),c=c+Math.imul(oe,Me)|0,y=Math.imul(oe,Te),x=x+Math.imul(K,ke)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(V,ke)|0,y=y+Math.imul(V,Ie)|0,x=x+Math.imul(U,De)|0,c=c+Math.imul(U,Pe)|0,c=c+Math.imul(z,De)|0,y=y+Math.imul(z,Pe)|0,x=x+Math.imul(d,Oe)|0,c=c+Math.imul(d,Le)|0,c=c+Math.imul(N,Oe)|0,y=y+Math.imul(N,Le)|0;var ir=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ir>>>26)|0,ir&=67108863,x=Math.imul(we,Me),c=Math.imul(we,Te),c=c+Math.imul(ge,Me)|0,y=Math.imul(ge,Te),x=x+Math.imul(Q,ke)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(oe,ke)|0,y=y+Math.imul(oe,Ie)|0,x=x+Math.imul(K,De)|0,c=c+Math.imul(K,Pe)|0,c=c+Math.imul(V,De)|0,y=y+Math.imul(V,Pe)|0,x=x+Math.imul(U,Oe)|0,c=c+Math.imul(U,Le)|0,c=c+Math.imul(z,Oe)|0,y=y+Math.imul(z,Le)|0,x=x+Math.imul(d,Ue)|0,c=c+Math.imul(d,Je)|0,c=c+Math.imul(N,Ue)|0,y=y+Math.imul(N,Je)|0;var or=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(or>>>26)|0,or&=67108863,x=Math.imul(Ae,Me),c=Math.imul(Ae,Te),c=c+Math.imul(xe,Me)|0,y=Math.imul(xe,Te),x=x+Math.imul(we,ke)|0,c=c+Math.imul(we,Ie)|0,c=c+Math.imul(ge,ke)|0,y=y+Math.imul(ge,Ie)|0,x=x+Math.imul(Q,De)|0,c=c+Math.imul(Q,Pe)|0,c=c+Math.imul(oe,De)|0,y=y+Math.imul(oe,Pe)|0,x=x+Math.imul(K,Oe)|0,c=c+Math.imul(K,Le)|0,c=c+Math.imul(V,Oe)|0,y=y+Math.imul(V,Le)|0,x=x+Math.imul(U,Ue)|0,c=c+Math.imul(U,Je)|0,c=c+Math.imul(z,Ue)|0,y=y+Math.imul(z,Je)|0,x=x+Math.imul(d,He)|0,c=c+Math.imul(d,Re)|0,c=c+Math.imul(N,He)|0,y=y+Math.imul(N,Re)|0;var wi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(wi>>>26)|0,wi&=67108863,x=Math.imul(de,Me),c=Math.imul(de,Te),c=c+Math.imul(Ce,Me)|0,y=Math.imul(Ce,Te),x=x+Math.imul(Ae,ke)|0,c=c+Math.imul(Ae,Ie)|0,c=c+Math.imul(xe,ke)|0,y=y+Math.imul(xe,Ie)|0,x=x+Math.imul(we,De)|0,c=c+Math.imul(we,Pe)|0,c=c+Math.imul(ge,De)|0,y=y+Math.imul(ge,Pe)|0,x=x+Math.imul(Q,Oe)|0,c=c+Math.imul(Q,Le)|0,c=c+Math.imul(oe,Oe)|0,y=y+Math.imul(oe,Le)|0,x=x+Math.imul(K,Ue)|0,c=c+Math.imul(K,Je)|0,c=c+Math.imul(V,Ue)|0,y=y+Math.imul(V,Je)|0,x=x+Math.imul(U,He)|0,c=c+Math.imul(U,Re)|0,c=c+Math.imul(z,He)|0,y=y+Math.imul(z,Re)|0,x=x+Math.imul(d,_e)|0,c=c+Math.imul(d,Ne)|0,c=c+Math.imul(N,_e)|0,y=y+Math.imul(N,Ne)|0;var Ai=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,x=Math.imul(pe,Me),c=Math.imul(pe,Te),c=c+Math.imul(Ee,Me)|0,y=Math.imul(Ee,Te),x=x+Math.imul(de,ke)|0,c=c+Math.imul(de,Ie)|0,c=c+Math.imul(Ce,ke)|0,y=y+Math.imul(Ce,Ie)|0,x=x+Math.imul(Ae,De)|0,c=c+Math.imul(Ae,Pe)|0,c=c+Math.imul(xe,De)|0,y=y+Math.imul(xe,Pe)|0,x=x+Math.imul(we,Oe)|0,c=c+Math.imul(we,Le)|0,c=c+Math.imul(ge,Oe)|0,y=y+Math.imul(ge,Le)|0,x=x+Math.imul(Q,Ue)|0,c=c+Math.imul(Q,Je)|0,c=c+Math.imul(oe,Ue)|0,y=y+Math.imul(oe,Je)|0,x=x+Math.imul(K,He)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(V,He)|0,y=y+Math.imul(V,Re)|0,x=x+Math.imul(U,_e)|0,c=c+Math.imul(U,Ne)|0,c=c+Math.imul(z,_e)|0,y=y+Math.imul(z,Ne)|0,x=x+Math.imul(d,ze)|0,c=c+Math.imul(d,je)|0,c=c+Math.imul(N,ze)|0,y=y+Math.imul(N,je)|0;var Ei=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,x=Math.imul(W,Me),c=Math.imul(W,Te),c=c+Math.imul(ie,Me)|0,y=Math.imul(ie,Te),x=x+Math.imul(pe,ke)|0,c=c+Math.imul(pe,Ie)|0,c=c+Math.imul(Ee,ke)|0,y=y+Math.imul(Ee,Ie)|0,x=x+Math.imul(de,De)|0,c=c+Math.imul(de,Pe)|0,c=c+Math.imul(Ce,De)|0,y=y+Math.imul(Ce,Pe)|0,x=x+Math.imul(Ae,Oe)|0,c=c+Math.imul(Ae,Le)|0,c=c+Math.imul(xe,Oe)|0,y=y+Math.imul(xe,Le)|0,x=x+Math.imul(we,Ue)|0,c=c+Math.imul(we,Je)|0,c=c+Math.imul(ge,Ue)|0,y=y+Math.imul(ge,Je)|0,x=x+Math.imul(Q,He)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(oe,He)|0,y=y+Math.imul(oe,Re)|0,x=x+Math.imul(K,_e)|0,c=c+Math.imul(K,Ne)|0,c=c+Math.imul(V,_e)|0,y=y+Math.imul(V,Ne)|0,x=x+Math.imul(U,ze)|0,c=c+Math.imul(U,je)|0,c=c+Math.imul(z,ze)|0,y=y+Math.imul(z,je)|0,x=x+Math.imul(d,Xe)|0,c=c+Math.imul(d,qe)|0,c=c+Math.imul(N,Xe)|0,y=y+Math.imul(N,qe)|0;var _i=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(_i>>>26)|0,_i&=67108863,x=Math.imul(Se,Me),c=Math.imul(Se,Te),c=c+Math.imul(Fe,Me)|0,y=Math.imul(Fe,Te),x=x+Math.imul(W,ke)|0,c=c+Math.imul(W,Ie)|0,c=c+Math.imul(ie,ke)|0,y=y+Math.imul(ie,Ie)|0,x=x+Math.imul(pe,De)|0,c=c+Math.imul(pe,Pe)|0,c=c+Math.imul(Ee,De)|0,y=y+Math.imul(Ee,Pe)|0,x=x+Math.imul(de,Oe)|0,c=c+Math.imul(de,Le)|0,c=c+Math.imul(Ce,Oe)|0,y=y+Math.imul(Ce,Le)|0,x=x+Math.imul(Ae,Ue)|0,c=c+Math.imul(Ae,Je)|0,c=c+Math.imul(xe,Ue)|0,y=y+Math.imul(xe,Je)|0,x=x+Math.imul(we,He)|0,c=c+Math.imul(we,Re)|0,c=c+Math.imul(ge,He)|0,y=y+Math.imul(ge,Re)|0,x=x+Math.imul(Q,_e)|0,c=c+Math.imul(Q,Ne)|0,c=c+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Ne)|0,x=x+Math.imul(K,ze)|0,c=c+Math.imul(K,je)|0,c=c+Math.imul(V,ze)|0,y=y+Math.imul(V,je)|0,x=x+Math.imul(U,Xe)|0,c=c+Math.imul(U,qe)|0,c=c+Math.imul(z,Xe)|0,y=y+Math.imul(z,qe)|0,x=x+Math.imul(d,Ve)|0,c=c+Math.imul(d,Ke)|0,c=c+Math.imul(N,Ve)|0,y=y+Math.imul(N,Ke)|0;var Ci=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,x=Math.imul(Se,ke),c=Math.imul(Se,Ie),c=c+Math.imul(Fe,ke)|0,y=Math.imul(Fe,Ie),x=x+Math.imul(W,De)|0,c=c+Math.imul(W,Pe)|0,c=c+Math.imul(ie,De)|0,y=y+Math.imul(ie,Pe)|0,x=x+Math.imul(pe,Oe)|0,c=c+Math.imul(pe,Le)|0,c=c+Math.imul(Ee,Oe)|0,y=y+Math.imul(Ee,Le)|0,x=x+Math.imul(de,Ue)|0,c=c+Math.imul(de,Je)|0,c=c+Math.imul(Ce,Ue)|0,y=y+Math.imul(Ce,Je)|0,x=x+Math.imul(Ae,He)|0,c=c+Math.imul(Ae,Re)|0,c=c+Math.imul(xe,He)|0,y=y+Math.imul(xe,Re)|0,x=x+Math.imul(we,_e)|0,c=c+Math.imul(we,Ne)|0,c=c+Math.imul(ge,_e)|0,y=y+Math.imul(ge,Ne)|0,x=x+Math.imul(Q,ze)|0,c=c+Math.imul(Q,je)|0,c=c+Math.imul(oe,ze)|0,y=y+Math.imul(oe,je)|0,x=x+Math.imul(K,Xe)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(V,Xe)|0,y=y+Math.imul(V,qe)|0,x=x+Math.imul(U,Ve)|0,c=c+Math.imul(U,Ke)|0,c=c+Math.imul(z,Ve)|0,y=y+Math.imul(z,Ke)|0;var Si=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Si>>>26)|0,Si&=67108863,x=Math.imul(Se,De),c=Math.imul(Se,Pe),c=c+Math.imul(Fe,De)|0,y=Math.imul(Fe,Pe),x=x+Math.imul(W,Oe)|0,c=c+Math.imul(W,Le)|0,c=c+Math.imul(ie,Oe)|0,y=y+Math.imul(ie,Le)|0,x=x+Math.imul(pe,Ue)|0,c=c+Math.imul(pe,Je)|0,c=c+Math.imul(Ee,Ue)|0,y=y+Math.imul(Ee,Je)|0,x=x+Math.imul(de,He)|0,c=c+Math.imul(de,Re)|0,c=c+Math.imul(Ce,He)|0,y=y+Math.imul(Ce,Re)|0,x=x+Math.imul(Ae,_e)|0,c=c+Math.imul(Ae,Ne)|0,c=c+Math.imul(xe,_e)|0,y=y+Math.imul(xe,Ne)|0,x=x+Math.imul(we,ze)|0,c=c+Math.imul(we,je)|0,c=c+Math.imul(ge,ze)|0,y=y+Math.imul(ge,je)|0,x=x+Math.imul(Q,Xe)|0,c=c+Math.imul(Q,qe)|0,c=c+Math.imul(oe,Xe)|0,y=y+Math.imul(oe,qe)|0,x=x+Math.imul(K,Ve)|0,c=c+Math.imul(K,Ke)|0,c=c+Math.imul(V,Ve)|0,y=y+Math.imul(V,Ke)|0;var Bi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,x=Math.imul(Se,Oe),c=Math.imul(Se,Le),c=c+Math.imul(Fe,Oe)|0,y=Math.imul(Fe,Le),x=x+Math.imul(W,Ue)|0,c=c+Math.imul(W,Je)|0,c=c+Math.imul(ie,Ue)|0,y=y+Math.imul(ie,Je)|0,x=x+Math.imul(pe,He)|0,c=c+Math.imul(pe,Re)|0,c=c+Math.imul(Ee,He)|0,y=y+Math.imul(Ee,Re)|0,x=x+Math.imul(de,_e)|0,c=c+Math.imul(de,Ne)|0,c=c+Math.imul(Ce,_e)|0,y=y+Math.imul(Ce,Ne)|0,x=x+Math.imul(Ae,ze)|0,c=c+Math.imul(Ae,je)|0,c=c+Math.imul(xe,ze)|0,y=y+Math.imul(xe,je)|0,x=x+Math.imul(we,Xe)|0,c=c+Math.imul(we,qe)|0,c=c+Math.imul(ge,Xe)|0,y=y+Math.imul(ge,qe)|0,x=x+Math.imul(Q,Ve)|0,c=c+Math.imul(Q,Ke)|0,c=c+Math.imul(oe,Ve)|0,y=y+Math.imul(oe,Ke)|0;var Mi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,x=Math.imul(Se,Ue),c=Math.imul(Se,Je),c=c+Math.imul(Fe,Ue)|0,y=Math.imul(Fe,Je),x=x+Math.imul(W,He)|0,c=c+Math.imul(W,Re)|0,c=c+Math.imul(ie,He)|0,y=y+Math.imul(ie,Re)|0,x=x+Math.imul(pe,_e)|0,c=c+Math.imul(pe,Ne)|0,c=c+Math.imul(Ee,_e)|0,y=y+Math.imul(Ee,Ne)|0,x=x+Math.imul(de,ze)|0,c=c+Math.imul(de,je)|0,c=c+Math.imul(Ce,ze)|0,y=y+Math.imul(Ce,je)|0,x=x+Math.imul(Ae,Xe)|0,c=c+Math.imul(Ae,qe)|0,c=c+Math.imul(xe,Xe)|0,y=y+Math.imul(xe,qe)|0,x=x+Math.imul(we,Ve)|0,c=c+Math.imul(we,Ke)|0,c=c+Math.imul(ge,Ve)|0,y=y+Math.imul(ge,Ke)|0;var ki=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ki>>>26)|0,ki&=67108863,x=Math.imul(Se,He),c=Math.imul(Se,Re),c=c+Math.imul(Fe,He)|0,y=Math.imul(Fe,Re),x=x+Math.imul(W,_e)|0,c=c+Math.imul(W,Ne)|0,c=c+Math.imul(ie,_e)|0,y=y+Math.imul(ie,Ne)|0,x=x+Math.imul(pe,ze)|0,c=c+Math.imul(pe,je)|0,c=c+Math.imul(Ee,ze)|0,y=y+Math.imul(Ee,je)|0,x=x+Math.imul(de,Xe)|0,c=c+Math.imul(de,qe)|0,c=c+Math.imul(Ce,Xe)|0,y=y+Math.imul(Ce,qe)|0,x=x+Math.imul(Ae,Ve)|0,c=c+Math.imul(Ae,Ke)|0,c=c+Math.imul(xe,Ve)|0,y=y+Math.imul(xe,Ke)|0;var Pi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,x=Math.imul(Se,_e),c=Math.imul(Se,Ne),c=c+Math.imul(Fe,_e)|0,y=Math.imul(Fe,Ne),x=x+Math.imul(W,ze)|0,c=c+Math.imul(W,je)|0,c=c+Math.imul(ie,ze)|0,y=y+Math.imul(ie,je)|0,x=x+Math.imul(pe,Xe)|0,c=c+Math.imul(pe,qe)|0,c=c+Math.imul(Ee,Xe)|0,y=y+Math.imul(Ee,qe)|0,x=x+Math.imul(de,Ve)|0,c=c+Math.imul(de,Ke)|0,c=c+Math.imul(Ce,Ve)|0,y=y+Math.imul(Ce,Ke)|0;var Ri=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,x=Math.imul(Se,ze),c=Math.imul(Se,je),c=c+Math.imul(Fe,ze)|0,y=Math.imul(Fe,je),x=x+Math.imul(W,Xe)|0,c=c+Math.imul(W,qe)|0,c=c+Math.imul(ie,Xe)|0,y=y+Math.imul(ie,qe)|0,x=x+Math.imul(pe,Ve)|0,c=c+Math.imul(pe,Ke)|0,c=c+Math.imul(Ee,Ve)|0,y=y+Math.imul(Ee,Ke)|0;var Ni=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,x=Math.imul(Se,Xe),c=Math.imul(Se,qe),c=c+Math.imul(Fe,Xe)|0,y=Math.imul(Fe,qe),x=x+Math.imul(W,Ve)|0,c=c+Math.imul(W,Ke)|0,c=c+Math.imul(ie,Ve)|0,y=y+Math.imul(ie,Ke)|0;var Fi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,x=Math.imul(Se,Ve),c=Math.imul(Se,Ke),c=c+Math.imul(Fe,Ve)|0,y=Math.imul(Fe,Ke);var Ti=(F+x|0)+((c&8191)<<13)|0;return F=(y+(c>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,k[0]=tr,k[1]=rr,k[2]=nr,k[3]=ir,k[4]=or,k[5]=wi,k[6]=Ai,k[7]=Ei,k[8]=_i,k[9]=Ci,k[10]=Si,k[11]=Bi,k[12]=Mi,k[13]=ki,k[14]=Pi,k[15]=Ri,k[16]=Ni,k[17]=Fi,k[18]=Ti,F!==0&&(k[19]=F,g.length++),g};Math.imul||(B=M);function P(v,f,p){p.negative=f.negative^v.negative,p.length=v.length+f.length;for(var g=0,w=0,E=0;E>>26)|0,w+=k>>>26,k&=67108863}p.words[E]=F,g=k,k=w}return g!==0?p.words[E]=g:p.length--,p._strip()}function R(v,f,p){return P(v,f,p)}o.prototype.mulTo=function(f,p){var g,w=this.length+f.length;return this.length===10&&f.length===10?g=B(this,f,p):w<63?g=M(this,f,p):w<1024?g=P(this,f,p):g=R(this,f,p),g},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),R(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var g=0,w=0;w>=26,g+=E/67108864|0,g+=k>>>26,this.words[w]=k&67108863}return g!==0&&(this.words[w]=g,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=C(f);if(p.length===0)return new o(1);for(var g=this,w=0;w=0);var p=f%26,g=(f-p)/26,w=67108863>>>26-p<<26-p,E;if(p!==0){var k=0;for(E=0;E>>26-p}k&&(this.words[E]=k,this.length++)}if(g!==0){for(E=this.length-1;E>=0;E--)this.words[E+g]=this.words[E];for(E=0;E=0);var w;p?w=(p-p%26)/26:w=0;var E=f%26,k=Math.min((f-E)/26,this.length),F=67108863^67108863>>>E<k)for(this.length-=k,c=0;c=0&&(y!==0||c>=w);c--){var T=this.words[c]|0;this.words[c]=y<<26-E|T>>>E,y=T&F}return x&&y!==0&&(x.words[x.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,g){return n(this.negative===0),this.iushrn(f,p,g)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,g=(f-p)/26,w=1<=0);var p=f%26,g=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(p!==0&&g++,this.length=Math.min(g,this.length),p!==0){var w=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(x/67108864|0),this.words[E+g]=k&67108863}for(;E>26,this.words[E+g]=k&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,E=0;E>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var g=this.length-f.length,w=this.clone(),E=f,k=E.words[E.length-1]|0,F=this._countBits(k);g=26-F,g!==0&&(E=E.ushln(g),w.iushln(g),k=E.words[E.length-1]|0);var x=w.length-E.length,c;if(p!=="mod"){c=new o(null),c.length=x+1,c.words=new Array(c.length);for(var y=0;y=0;d--){var N=(w.words[E.length+d]|0)*67108864+(w.words[E.length+d-1]|0);for(N=Math.min(N/k|0,67108863),w._ishlnsubmul(E,N,d);w.negative!==0;)N--,w.negative=0,w._ishlnsubmul(E,1,d),w.isZero()||(w.negative^=1);c&&(c.words[d]=N)}return c&&c._strip(),w._strip(),p!=="div"&&g!==0&&w.iushrn(g),{div:c||null,mod:w}},o.prototype.divmod=function(f,p,g){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,p),p!=="mod"&&(w=k.div.neg()),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.iadd(f)),{div:w,mod:E}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),p),p!=="mod"&&(w=k.div.neg()),{div:w,mod:k.mod}):(this.negative&f.negative)!==0?(k=this.neg().divmod(f.neg(),p),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.isub(f)),{div:k.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var g=p.div.negative!==0?p.mod.isub(f):p.mod,w=f.ushrn(1),E=f.andln(1),k=g.cmp(w);return k<0||E===1&&k===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=(1<<26)%f,w=0,E=this.length-1;E>=0;E--)w=(g*w+(this.words[E]|0))%f;return p?-w:w},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+g*67108864;this.words[w]=E/f|0,g=E%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=new o(0),F=new o(1),x=0;p.isEven()&&g.isEven();)p.iushrn(1),g.iushrn(1),++x;for(var c=g.clone(),y=p.clone();!p.isZero();){for(var T=0,d=1;(p.words[0]&d)===0&&T<26;++T,d<<=1);if(T>0)for(p.iushrn(T);T-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(y)),w.iushrn(1),E.iushrn(1);for(var N=0,G=1;(g.words[0]&G)===0&&N<26;++N,G<<=1);if(N>0)for(g.iushrn(N);N-- >0;)(k.isOdd()||F.isOdd())&&(k.iadd(c),F.isub(y)),k.iushrn(1),F.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(k),E.isub(F)):(g.isub(p),k.isub(w),F.isub(E))}return{a:k,b:F,gcd:g.iushln(x)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=g.clone();p.cmpn(1)>0&&g.cmpn(1)>0;){for(var F=0,x=1;(p.words[0]&x)===0&&F<26;++F,x<<=1);if(F>0)for(p.iushrn(F);F-- >0;)w.isOdd()&&w.iadd(k),w.iushrn(1);for(var c=0,y=1;(g.words[0]&y)===0&&c<26;++c,y<<=1);if(c>0)for(g.iushrn(c);c-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(E)):(g.isub(p),E.isub(w))}var T;return p.cmpn(1)===0?T=w:T=E,T.cmpn(0)<0&&T.iadd(f),T},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),g=f.clone();p.negative=0,g.negative=0;for(var w=0;p.isEven()&&g.isEven();w++)p.iushrn(1),g.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;g.isEven();)g.iushrn(1);var E=p.cmp(g);if(E<0){var k=p;p=g,g=k}else if(E===0||g.cmpn(1)===0)break;p.isub(g)}while(!0);return g.iushln(w)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,g=(f-p)/26,w=1<>>26,F&=67108863,this.words[k]=F}return E!==0&&(this.words[k]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var g;if(this.length>1)g=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var w=this.words[0]|0;g=w===f?0:wf.length)return 1;if(this.length=0;g--){var w=this.words[g]|0,E=f.words[g]|0;if(w!==E){wE&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new L(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function D(v,f){this.name=v,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,g;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),g=p.bitLength();while(g>this.n);var w=g0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function O(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(O,D),O.prototype.split=function(f,p){for(var g=4194303,w=Math.min(f.length,9),E=0;E>>22,k=F}k>>>=22,f.words[E-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},O.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,g=0;g>>=26,f.words[g]=E,p=w}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(I[f])return I[f];var p;if(f==="k256")p=new O;else if(f==="p224")p=new J;else if(f==="p192")p=new X;else if(f==="p25519")p=new H;else throw new Error("Unknown prime "+f);return I[f]=p,p};function L(v){if(typeof v=="string"){var f=o._prime(v);this.m=f.p,this.prime=f}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}L.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},L.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},L.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(h(f,f.umod(this.m)._forceRed(this)),f)},L.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},L.prototype.add=function(f,p){this._verify2(f,p);var g=f.add(p);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},L.prototype.iadd=function(f,p){this._verify2(f,p);var g=f.iadd(p);return g.cmp(this.m)>=0&&g.isub(this.m),g},L.prototype.sub=function(f,p){this._verify2(f,p);var g=f.sub(p);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},L.prototype.isub=function(f,p){this._verify2(f,p);var g=f.isub(p);return g.cmpn(0)<0&&g.iadd(this.m),g},L.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},L.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},L.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},L.prototype.isqr=function(f){return this.imul(f,f.clone())},L.prototype.sqr=function(f){return this.mul(f,f)},L.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var g=this.m.add(new o(1)).iushrn(2);return this.pow(f,g)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var k=new o(1).toRed(this),F=k.redNeg(),x=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,x).cmp(F)!==0;)c.redIAdd(F);for(var y=this.pow(c,w),T=this.pow(f,w.addn(1).iushrn(1)),d=this.pow(f,w),N=E;d.cmp(k)!==0;){for(var G=d,U=0;G.cmp(k)!==0;U++)G=G.redSqr();n(U=0;E--){for(var y=p.words[E],T=c-1;T>=0;T--){var d=y>>T&1;if(k!==w[0]&&(k=this.sqr(k)),d===0&&F===0){x=0;continue}F<<=1,F|=d,x++,!(x!==g&&(E!==0||T!==0))&&(k=this.mul(k,w[F]),x=0,F=0)}c=26}return k},L.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},L.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new j(f)};function j(v){L.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,L),j.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},j.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},j.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var g=f.imul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var g=f.mul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(r,Be)})(Ud);const Ze=Ud.exports,Z2="logger/5.7.0";let eu=!1,tu=!1;const da={debug:1,default:2,info:2,warning:3,error:4,off:5};let ru=da.default,Ts=null;function $2(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const nu=$2();var Ia;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(Ia||(Ia={}));var Xr;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Xr||(Xr={}));const iu="0123456789abcdef";class q{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();da[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ru>da[n])&&console.log.apply(console,t)}debug(...e){this._log(q.levels.DEBUG,e)}info(...e){this._log(q.levels.INFO,e)}warn(...e){this._log(q.levels.WARNING,e)}makeError(e,t,n){if(tu)return this.makeError("censored error",t,{});t||(t=q.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let h="";for(let b=0;b>4],h+=iu[l[b]&15];i.push(u+"=Uint8Array(0x"+h+")")}else i.push(u+"="+JSON.stringify(l))}catch{i.push(u+"="+JSON.stringify(n[u].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const o=e;let a="";switch(t){case Xr.NUMERIC_FAULT:{a="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":a+="-"+u;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case Xr.CALL_EXCEPTION:case Xr.INSUFFICIENT_FUNDS:case Xr.MISSING_NEW:case Xr.NONCE_EXPIRED:case Xr.REPLACEMENT_UNDERPRICED:case Xr.TRANSACTION_REPLACED:case Xr.UNPREDICTABLE_GAS_LIMIT:a=t;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(n).forEach(function(u){s[u]=n[u]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,q.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){nu&&this.throwError("platform missing String.prototype.normalize",q.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:nu})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,q.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,q.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,q.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",q.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",q.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",q.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Ts||(Ts=new q(Z2)),Ts}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",q.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),eu){if(!e)return;this.globalLogger().throwError("error censorship permanent",q.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}tu=!!e,eu=!!t}static setLogLevel(e){const t=da[e.toLowerCase()];if(t==null){q.globalLogger().warn("invalid log level - "+e);return}ru=t}static from(e){return new q(e)}}q.errors=Xr;q.levels=Ia;const eb=Object.freeze(Object.defineProperty({__proto__:null,get LogLevel(){return Ia},get ErrorCode(){return Xr},Logger:q},Symbol.toStringTag,{value:"Module"})),tb="bytes/5.7.0",Tt=new q(tb);function Jd(r){return!!r.toHexString}function b0(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return b0(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function To(r){return lt(r)&&!(r.length%2)||Yi(r)}function ou(r){return typeof r=="number"&&r==r&&r%1===0}function Yi(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!ou(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ae(r,e){if(e||(e={}),typeof r=="number"){Tt.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),b0(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Jd(r)&&(r=r.toHexString()),lt(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Tt.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;iae(i)),t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),b0(n)}function Cn(r){let e=ae(r);if(e.length===0)return e;let t=0;for(;te&&Tt.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),b0(t)}function lt(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const Is="0123456789abcdef";function se(r,e){if(e||(e={}),typeof r=="number"){Tt.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=Is[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Jd(r))return r.toHexString();if(lt(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":Tt.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(Yi(r)){let t="0x";for(let n=0;n>4]+Is[i&15]}return t}return Tt.throwArgumentError("invalid hexlify value","value",r)}function Fn(r){if(typeof r!="string")r=se(r);else if(!lt(r)||r.length%2)return null;return(r.length-2)/2}function Ot(r,e,t){return typeof r!="string"?r=se(r):(!lt(r)||r.length%2)&&Tt.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function gr(r){let e="0x";return r.forEach(t=>{e+=se(t).substring(2)}),e}function is(r){const e=Hd(se(r,{hexPad:"left"}));return e==="0x"?"0x0":e}function Hd(r){typeof r!="string"&&(r=se(r)),lt(r)||Tt.throwArgumentError("invalid hex string","value",r),r=r.substring(2);let e=0;for(;e2*e+2&&Tt.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function Zi(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(To(r)){let t=ae(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=se(t.slice(0,32)),e.s=se(t.slice(32,64))):t.length===65?(e.r=se(t.slice(0,32)),e.s=se(t.slice(32,64)),e.v=t[64]):Tt.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:Tt.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=se(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const i=no(ae(e._vs),32);e._vs=se(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&Tt.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const a=se(i);e.s==null?e.s=a:e.s!==a&&Tt.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?Tt.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Tt.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!lt(e.r)?Tt.throwArgumentError("signature missing or invalid r","signature",r):e.r=yt(e.r,32),e.s==null||!lt(e.s)?Tt.throwArgumentError("signature missing or invalid s","signature",r):e.s=yt(e.s,32);const t=ae(e.s);t[0]>=128&&Tt.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const n=se(t);e._vs&&(lt(e._vs)||Tt.throwArgumentError("signature invalid _vs","signature",r),e._vs=yt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Tt.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function rc(r){return r=Zi(r),se(Et([r.r,r.s,r.recoveryParam?"0x1c":"0x1b"]))}const rb=Object.freeze(Object.defineProperty({__proto__:null,isBytesLike:To,isBytes:Yi,arrayify:ae,concat:Et,stripZeros:Cn,zeroPad:no,isHexString:lt,hexlify:se,hexDataLength:Fn,hexDataSlice:Ot,hexConcat:gr,hexValue:is,hexStripZeros:Hd,hexZeroPad:yt,splitSignature:Zi,joinSignature:rc},Symbol.toStringTag,{value:"Module"})),Gd="bignumber/5.7.0";var xo=Ze.BN;const Jn=new q(Gd),Ds={},au=9007199254740991;function nb(r){return r!=null&&(fe.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||lt(r)||typeof r=="bigint"||Yi(r))}let su=!1;class fe{constructor(e,t){e!==Ds&&Jn.throwError("cannot call constructor directly; use BigNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Er(tt(this).fromTwos(e))}toTwos(e){return Er(tt(this).toTwos(e))}abs(){return this._hex[0]==="-"?fe.from(this._hex.substring(1)):this}add(e){return Er(tt(this).add(tt(e)))}sub(e){return Er(tt(this).sub(tt(e)))}div(e){return fe.from(e).isZero()&&Hr("division-by-zero","div"),Er(tt(this).div(tt(e)))}mul(e){return Er(tt(this).mul(tt(e)))}mod(e){const t=tt(e);return t.isNeg()&&Hr("division-by-zero","mod"),Er(tt(this).umod(t))}pow(e){const t=tt(e);return t.isNeg()&&Hr("negative-power","pow"),Er(tt(this).pow(t))}and(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","and"),Er(tt(this).and(t))}or(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","or"),Er(tt(this).or(t))}xor(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","xor"),Er(tt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Hr("negative-width","mask"),Er(tt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Hr("negative-width","shl"),Er(tt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Hr("negative-width","shr"),Er(tt(this).shrn(e))}eq(e){return tt(this).eq(tt(e))}lt(e){return tt(this).lt(tt(e))}lte(e){return tt(this).lte(tt(e))}gt(e){return tt(this).gt(tt(e))}gte(e){return tt(this).gte(tt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return tt(this).isZero()}toNumber(){try{return tt(this).toNumber()}catch{Hr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Jn.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?su||(su=!0,Jn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Jn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):Jn.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),tt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof fe)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new fe(Ds,bo(e)):e.match(/^-?[0-9]+$/)?new fe(Ds,bo(new xo(e))):Jn.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Hr("underflow","BigNumber.from",e),(e>=au||e<=-au)&&Hr("overflow","BigNumber.from",e),fe.from(String(e));const t=e;if(typeof t=="bigint")return fe.from(t.toString());if(Yi(t))return fe.from(se(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return fe.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(lt(n)||n[0]==="-"&<(n.substring(1))))return fe.from(n)}return Jn.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function bo(r){if(typeof r!="string")return bo(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Jn.throwArgumentError("invalid hex","value",r),r=bo(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function Er(r){return fe.from(bo(r))}function tt(r){const e=fe.from(r).toHexString();return e[0]==="-"?new xo("-"+e.substring(3),16):new xo(e.substring(2),16)}function Hr(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Jn.throwError(r,q.errors.NUMERIC_FAULT,n)}function ib(r){return new xo(r,36).toString(16)}function ob(r){return new xo(r,16).toString(36)}const mr=new q(Gd),io={},zd=fe.from(0),jd=fe.from(-1);function Xd(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),mr.throwError(r,q.errors.NUMERIC_FAULT,i)}let oo="0";for(;oo.length<256;)oo+=oo;function tl(r){if(typeof r!="number")try{r=fe.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+oo.substring(0,r):mr.throwArgumentError("invalid decimal size","decimals",r)}function pa(r,e){e==null&&(e=0);const t=tl(e);r=fe.from(r);const n=r.lt(zd);n&&(r=r.mul(jd));let i=r.mod(t).toString();for(;i.length2&&mr.throwArgumentError("too many decimal points","value",r);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");a[a.length-1]==="0";)a=a.substring(0,a.length-1);for(a.length>t.length-1&&Xd("fractional component exceeds decimals","underflow","parseFixed"),a===""&&(a="0");a.lengthe[a]==null?u:(typeof e[a]!==s&&mr.throwArgumentError("invalid fixed format ("+a+" not "+s+")","format."+a,e[a]),e[a]);t=o("signed","boolean",t),n=o("width","number",n),i=o("decimals","number",i)}return n%8&&mr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&mr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new g0(io,t,n,i)}}class ar{constructor(e,t,n,i){e!==io&&mr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&mr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ar.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(fu.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ar.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(fu.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&mr.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=ar.from("1"+oo.substring(0,e),this.format),i=ab.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&mr.throwArgumentError("invalid byte width","width",e);const t=fe.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return yt(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ar.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!nb(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ar.fromString(pa(e,t),g0.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=g0.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(zd)&&Xd("unsigned value cannot be negative","overflow","value",e);let o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=yt(o,n.width/8));const a=pa(i,n.decimals);return new ar(io,o,a,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=g0.from(t);if(ae(e).length>n.width/8)throw new Error("overflow");let i=fe.from(e);n.signed&&(i=i.fromTwos(n.width));const o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=pa(i,n.decimals);return new ar(io,o,a,n)}static from(e,t){if(typeof e=="string")return ar.fromString(e,t);if(Yi(e))return ar.fromBytes(e,t);try{return ar.fromValue(e,0,t)}catch(n){if(n.code!==q.errors.INVALID_ARGUMENT)throw n}return mr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const fu=ar.from(1),ab=ar.from("0.5"),sb="properties/5.7.0";var fb=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Da=new q(sb);function le(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}function An(r,e){for(let t=0;t<32;t++){if(r[e])return r[e];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}function Ht(r){return fb(this,void 0,void 0,function*(){const e=Object.keys(r).map(n=>{const i=r[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function rl(r,e){(!r||typeof r!="object")&&Da.throwArgumentError("invalid object","object",r),Object.keys(r).forEach(t=>{e[t]||Da.throwArgumentError("invalid object key - "+t,"transaction:"+t,r)})}function vr(r){const e={};for(const t in r)e[t]=r[t];return e}const cb={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function qd(r){if(r==null||cb[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const e=Object.keys(r);for(let t=0;tw0(e)));if(typeof r=="object"){const e={};for(const t in r){const n=r[t];n!==void 0&&le(e,t,w0(n))}return e}return Da.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function w0(r){return lb(r)}class gi{constructor(e){for(const t in e)this[t]=w0(e[t])}}const ub=Object.freeze(Object.defineProperty({__proto__:null,defineReadOnly:le,getStatic:An,resolveProperties:Ht,checkProperties:rl,shallowCopy:vr,deepCopy:w0,Description:gi},Symbol.toStringTag,{value:"Module"})),Io="abi/5.7.0",ot=new q(Io),Xi={};let cu={calldata:!0,memory:!0,storage:!0},hb={calldata:!0,memory:!0};function Wo(r,e){if(r==="bytes"||r==="string"){if(cu[e])return!0}else if(r==="address"){if(e==="payable")return!0}else if((r.indexOf("[")>=0||r==="tuple")&&hb[e])return!0;return(cu[e]||e==="payable")&&ot.throwArgumentError("invalid modifier","name",e),!1}function db(r,e){let t=r;function n(s){ot.throwArgumentError(`unexpected character at position ${s}`,"param",r)}r=r.replace(/\s/g," ");function i(s){let u={type:"",name:"",parent:s,state:{allowType:!0}};return e&&(u.indexed=!1),u}let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ct.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ct.full?", ":",")+")"):t+=this.type,e!==ct.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ct.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?Gt.fromString(e,t):Gt.fromObject(e)}static fromObject(e){return Gt.isParamType(e)?e:new Gt(Xi,{name:e.name||null,type:o0(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Gt.fromObject):null})}static fromString(e,t){function n(i){return Gt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(db(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function go(r,e){return bb(r).map(t=>Gt.fromString(t,e))}class En{constructor(e,t){e!==Xi&&ot.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),xa(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return En.isFragment(e)?e:typeof e=="string"?En.fromString(e):En.fromObject(e)}static fromObject(e){if(En.isFragment(e))return e;switch(e.type){case"function":return on.fromObject(e);case"event":return gn.fromObject(e);case"constructor":return nn.fromObject(e);case"error":return zn.fromObject(e);case"fallback":case"receive":return null}return ot.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?gn.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?on.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?nn.fromString(e.trim()):e.split(" ")[0]==="error"?zn.fromString(e.substring(5).trim()):ot.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?gn.fromString(e):gn.fromObject(e)}static fromObject(e){if(gn.isEventFragment(e))return e;e.type!=="event"&&ot.throwArgumentError("invalid event object","value",e);const t={name:mo(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],type:"event"};return new gn(Xi,t)}static fromString(e){let t=e.match(yo);t||ot.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:ot.warn("unknown modifier: "+i)}}),gn.fromObject({name:t[1].trim(),anonymous:n,inputs:go(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Vd(r,e){e.gas=null;let t=r.split("@");return t.length!==1?(t.length>2&&ot.throwArgumentError("invalid human-readable ABI signature","value",r),t[1].match(/^[0-9]+$/)||ot.throwArgumentError("invalid human-readable ABI signature gas","value",r),e.gas=fe.from(t[1]),t[0]):r}function Kd(r,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",r.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Qd(r){let e={constant:!1,payable:!0,stateMutability:"payable"};return r.stateMutability!=null?(e.stateMutability=r.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",r.constant!=null&&!!r.constant!==e.constant&&ot.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",r),e.payable=e.stateMutability==="payable",r.payable!=null&&!!r.payable!==e.payable&&ot.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",r)):r.payable!=null?(e.payable=!!r.payable,r.constant==null&&!e.payable&&r.type!=="constructor"&&ot.throwArgumentError("unable to determine stateMutability","value",r),e.constant=!!r.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ot.throwArgumentError("cannot have constant payable function","value",r)):r.constant!=null?(e.constant=!!r.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):r.type!=="constructor"&&ot.throwArgumentError("unable to determine stateMutability","value",r),e}class nn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ct.sighash&&ot.throwError("cannot format a constructor for sighash",q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?nn.fromString(e):nn.fromObject(e)}static fromObject(e){if(nn.isConstructorFragment(e))return e;e.type!=="constructor"&&ot.throwArgumentError("invalid constructor object","value",e);let t=Qd(e);t.constant&&ot.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?fe.from(e.gas):null};return new nn(Xi,n)}static fromString(e){let t={type:"constructor"};e=Vd(e,t);let n=e.match(yo);return(!n||n[1].trim()!=="constructor")&&ot.throwArgumentError("invalid constructor string","value",e),t.inputs=go(n[2].trim(),!1),Kd(n[3].trim(),t),nn.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class on extends nn{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?on.fromString(e):on.fromObject(e)}static fromObject(e){if(on.isFunctionFragment(e))return e;e.type!=="function"&&ot.throwArgumentError("invalid function object","value",e);let t=Qd(e);const n={type:e.type,name:mo(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],outputs:e.outputs?e.outputs.map(Gt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?fe.from(e.gas):null};return new on(Xi,n)}static fromString(e){let t={type:"function"};e=Vd(e,t);let n=e.split(" returns ");n.length>2&&ot.throwArgumentError("invalid function string","value",e);let i=n[0].match(yo);if(i||ot.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&mo(t.name),t.inputs=go(i[2],!1),Kd(i[3].trim(),t),n.length>1){let o=n[1].match(yo);(o[1].trim()!=""||o[3].trim()!="")&&ot.throwArgumentError("unexpected tokens","value",e),t.outputs=go(o[2],!1)}else t.outputs=[];return on.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function lu(r){const e=r.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ot.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",r),r}class zn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?zn.fromString(e):zn.fromObject(e)}static fromObject(e){if(zn.isErrorFragment(e))return e;e.type!=="error"&&ot.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:mo(e.name),inputs:e.inputs?e.inputs.map(Gt.fromObject):[]};return lu(new zn(Xi,t))}static fromString(e){let t={type:"error"},n=e.match(yo);return n||ot.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&mo(t.name),t.inputs=go(n[2],!1),lu(zn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function o0(r){return r.match(/^uint($|[^1-9])/)?r="uint256"+r.substring(4):r.match(/^int($|[^1-9])/)&&(r="int256"+r.substring(3)),r}const xb=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function mo(r){return(!r||!r.match(xb))&&ot.throwArgumentError(`invalid identifier "${r}"`,"value",r),r}const yo=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function bb(r){r=r.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&nl.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Et([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Oa{constructor(e,t,n,i){le(this,"_data",ae(e)),le(this,"wordSize",t||32),le(this,"_coerceFunc",n),le(this,"allowLoose",i),this._offset=0}get data(){return se(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Oa.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:nl.throwError("data out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Oa(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return fe.from(this.readBytes(this.wordSize))}}var Wd={exports:{}};/** +}`,b=`__svelte_${N2(h)}_${s}`,m=Ad(r),{stylesheet:A,rules:_}=Pa.get(m)||F2(m,r);_[b]||(_[b]=!0,A.insertRule(`@keyframes ${b} ${h}`,A.cssRules.length));const S=r.style.animation||"";return r.style.animation=`${S?`${S}, `:""}${b} ${n}ms linear ${i}ms 1 both`,Ra+=1,b}function Cd(r,e){const t=(r.style.animation||"").split(", "),n=t.filter(e?o=>o.indexOf(e)<0:o=>o.indexOf("__svelte")===-1),i=t.length-n.length;i&&(r.style.animation=n.join(", "),Ra-=i,Ra||T2())}function T2(){Zc(()=>{Ra||(Pa.forEach(r=>{const{stylesheet:e}=r;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);r.rules={}}),Pa.clear())})}let po;function ro(r){po=r}function ts(){if(!po)throw new Error("Function called outside component initialization");return po}function Xl(r){ts().$$.on_mount.push(r)}function ql(r){ts().$$.after_update.push(r)}function Vl(r){ts().$$.on_destroy.push(r)}function Kl(){const r=ts();return(e,t,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[e];if(i){const o=$c(e,t,{cancelable:n});return i.slice().forEach(a=>{a.call(r,o)}),!o.defaultPrevented}return!0}}function Ql(r,e){const t=r.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const Y0=[],Kf=[],ua=[],Wl=[],Sd=Promise.resolve();let Qf=!1;function Bd(){Qf||(Qf=!0,Sd.then(Md))}function xo(){return Bd(),Sd}function zi(r){ua.push(r)}const Ns=new Set;let Qo=0;function Md(){const r=po;do{for(;Qo{z0=null})),z0}function no(r,e,t){r.dispatchEvent($c(`${e?"intro":"outro"}${t}`))}const ha=new Set;let wn;function Pn(){wn={r:0,c:[],p:wn}}function Rn(){wn.r||ln(wn.c),wn=wn.p}function dt(r,e){r&&r.i&&(ha.delete(r),r.i(e))}function At(r,e,t,n){if(r&&r.o){if(ha.has(r))return;ha.add(r),wn.c.push(()=>{ha.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}const Pd={duration:0};function D2(r,e,t){let n=e(r,t),i=!0,o;const a=wn;a.r+=1;function s(){const{delay:u=0,duration:l=300,easing:h=Wc,tick:b=We,css:m}=n||Pd;m&&(o=Vf(r,1,0,l,u,h,m));const A=md()+u,_=A+l;zi(()=>no(r,!1,"start")),vd(S=>{if(i){if(S>=_)return b(0,1),no(r,!1,"end"),--a.r||ln(a.c),!1;if(S>=A){const C=h((S-A)/l);b(1-C,C)}}return i})}return To(n)?kd().then(()=>{n=n(),s()}):s(),{end(u){u&&n.tick&&n.tick(1,0),i&&(o&&Cd(r,o),i=!1)}}}function Na(r,e,t,n){let i=e(r,t),o=n?0:1,a=null,s=null,u=null;function l(){u&&Cd(r,u)}function h(m,A){const _=m.b-o;return A*=Math.abs(_),{a:o,b:m.b,d:_,duration:A,start:m.start,end:m.start+A,group:m.group}}function b(m){const{delay:A=0,duration:_=300,easing:S=Wc,tick:C=We,css:M}=i||Pd,B={start:md()+A,b:m};m||(B.group=wn,wn.r+=1),a||s?s=B:(M&&(l(),u=Vf(r,o,m,_,A,S,M)),m&&C(0,1),a=h(B,_),zi(()=>no(r,m,"start")),vd(P=>{if(s&&P>s.start&&(a=h(s,_),s=null,no(r,a.b,"start"),M&&(l(),u=Vf(r,o,a.b,a.duration,0,S,i.css))),a){if(P>=a.end)C(o=a.b,1-o),no(r,a.b,"end"),s||(a.b?l():--a.group.r||ln(a.group.c)),a=null;else if(P>=a.start){const R=P-a.start;o=a.a+a.d*S(R/a.duration),C(o,1-o)}}return!!(a||s)}))}return{run(m){To(i)?kd().then(()=>{i=i(),b(m)}):b(m)},end(){l(),a=s=null}}}const rs=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Rd(r,e){const t={},n={},i={$$scope:1};let o=r.length;for(;o--;){const a=r[o],s=e[o];if(s){for(const u in a)u in s||(n[u]=1);for(const u in s)i[u]||(t[u]=s[u],i[u]=1);r[o]=s}else for(const u in a)i[u]=1}for(const a in n)a in t||(t[a]=void 0);return t}function Nd(r){return typeof r=="object"&&r!==null?r:{}}function Nn(r){r&&r.c()}function sn(r,e,t,n){const{fragment:i,on_mount:o,on_destroy:a,after_update:s}=r.$$;i&&i.m(e,t),n||zi(()=>{const u=o.map(bd).filter(To);a?a.push(...u):ln(u),r.$$.on_mount=[]}),s.forEach(zi)}function fn(r,e){const t=r.$$;t.fragment!==null&&(ln(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function O2(r,e){r.$$.dirty[0]===-1&&(Y0.push(r),Bd(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{const _=A.length?A[0]:m;return l.ctx&&i(l.ctx[b],l.ctx[b]=_)&&(!l.skip_bound&&l.bound[b]&&l.bound[b](_),h&&O2(r,b)),m}):[],l.update(),h=!0,ln(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const b=R2(e.target);l.fragment&&l.fragment.l(b),b.forEach(Ed)}else l.fragment&&l.fragment.c();e.intro&&dt(r.$$.fragment),sn(r,e.target,e.anchor,e.customElement),Md()}ro(u)}class L2{$destroy(){fn(this,1),this.$destroy=We}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!_2(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ue(r,e){document.dispatchEvent($c(r,Object.assign({version:"3.49.0"},e),{bubbles:!0}))}function re(r,e){ue("SvelteDOMInsert",{target:r,node:e}),wd(r,e)}function $(r,e,t){ue("SvelteDOMInsert",{target:r,node:e,anchor:t}),M2(r,e,t)}function ee(r){ue("SvelteDOMRemove",{node:r}),Ed(r)}function Qt(r,e,t,n,i,o){const a=n===!0?["capture"]:n?Array.from(Object.keys(n)):[];i&&a.push("preventDefault"),o&&a.push("stopPropagation"),ue("SvelteDOMAddEventListener",{node:r,event:e,handler:t,modifiers:a});const s=k2(r,e,t,n);return()=>{ue("SvelteDOMRemoveEventListener",{node:r,event:e,handler:t,modifiers:a}),s()}}function ne(r,e,t){P2(r,e,t),t==null?ue("SvelteDOMRemoveAttribute",{node:r,attribute:e}):ue("SvelteDOMSetAttribute",{node:r,attribute:e,value:t})}function ji(r,e,t){r[e]=t,ue("SvelteDOMSetProperty",{node:r,property:e,value:t})}function hi(r,e){e=""+e,r.wholeText!==e&&(ue("SvelteDOMSetData",{node:r,data:e}),r.data=e)}function Fa(r){if(typeof r!="string"&&!(r&&typeof r=="object"&&"length"in r)){let e="{#each} only iterates over array-like objects.";throw typeof Symbol=="function"&&r&&Symbol.iterator in r&&(e+=" You can use a spread to convert this iterable into an array."),new Error(e)}}function Or(r,e,t){for(const n of Object.keys(e))~t.indexOf(n)||console.warn(`<${r}> received an unexpected slot "${n}".`)}class Lr extends L2{constructor(e){if(!e||!e.target&&!e.$$inline)throw new Error("'target' is a required option");super()}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}function Fd(r){if(!r)throw Error("Parameter args is required");if(!r.component==!r.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(r.component&&(r.asyncComponent=()=>Promise.resolve(r.component)),typeof r.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(r.conditions){Array.isArray(r.conditions)||(r.conditions=[r.conditions]);for(let t=0;t{n.delete(l),n.size===0&&(t(),t=null)}}return{set:i,update:o,subscribe:a}}function pr(r,e,t){const n=!Array.isArray(r),i=n?[r]:r,o=e.length<2;return ns(t,a=>{let s=!1;const u=[];let l=0,h=We;const b=()=>{if(l)return;h();const A=e(n?u[0]:u,a);o?a(A):h=To(A)?A:We},m=i.map((A,_)=>Yc(A,S=>{u[_]=S,l&=~(1<<_),s&&b()},()=>{l|=1<<_}));return s=!0,b(),function(){ln(m),h()}})}function Yl(r,e){if(r instanceof RegExp)return{keys:!1,pattern:r};var t,n,i,o,a=[],s="",u=r.split("/");for(u[0]||u.shift();i=u.shift();)t=i[0],t==="*"?(a.push("wild"),s+="/(.*)"):t===":"?(n=i.indexOf("?",1),o=i.indexOf(".",1),a.push(i.substring(1,~n?n:~o?o:i.length)),s+=!!~n&&!~o?"(?:/([^/]+?))?":"/([^/]+?)",~o&&(s+=(~n?"?":"")+"\\"+i.substring(o))):s+="/"+i;return{keys:a,pattern:new RegExp("^"+s+(e?"(?=$|/)":"/?$"),"i")}}const{Error:Ii,Object:U2,console:J2}=rs;function Td(r){let e,t,n;const i=[r[2]];var o=r[0];function a(u){let l={};for(let h=0;h{fn(m,1)}),Rn()}o?(e=new o(a()),e.$on("routeEvent",l[7]),Nn(e.$$.fragment),dt(e.$$.fragment,1),sn(e,t.parentNode,t)):e=null}else o&&e.$set(b)},i:function(l){n||(e&&dt(e.$$.fragment,l),n=!0)},o:function(l){e&&At(e.$$.fragment,l),n=!1},d:function(l){l&&ee(t),e&&fn(e,l)}};return ue("SvelteRegisterBlock",{block:s,id:Td.name,type:"else",source:"(267:0) {:else}",ctx:r}),s}function Id(r){let e,t,n;const i=[{params:r[1]},r[2]];var o=r[0];function a(u){let l={};for(let h=0;h{fn(m,1)}),Rn()}o?(e=new o(a()),e.$on("routeEvent",l[6]),Nn(e.$$.fragment),dt(e.$$.fragment,1),sn(e,t.parentNode,t)):e=null}else o&&e.$set(b)},i:function(l){n||(e&&dt(e.$$.fragment,l),n=!0)},o:function(l){e&&At(e.$$.fragment,l),n=!1},d:function(l){l&&ee(t),e&&fn(e,l)}};return ue("SvelteRegisterBlock",{block:s,id:Id.name,type:"if",source:"(260:0) {#if componentParams}",ctx:r}),s}function Wf(r){let e,t,n,i;const o=[Id,Td],a=[];function s(l,h){return l[1]?0:1}e=s(r),t=a[e]=o[e](r);const u={c:function(){t.c(),n=Kr()},l:function(h){throw new Ii("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?a[e].p(h,b):(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn(),t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n))},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Wf.name,type:"component",source:"",ctx:r}),u}function H2(r,e,...t){return console.warn("Method `wrap` from `svelte-spa-router` is deprecated and will be removed in a future version. Please use `svelte-spa-router/wrap` instead. See http://bit.ly/svelte-spa-router-upgrading"),Fd({component:r,userData:e,conditions:t})}function Yf(){const r=window.location.href.indexOf("#/");let e=r>-1?window.location.href.substr(r+1):"/";const t=e.indexOf("?");let n="";return t>-1&&(n=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:n}}const Ta=ns(null,function(e){e(Yf());const t=()=>{e(Yf())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}}),G2=pr(Ta,r=>r.location),z2=pr(Ta,r=>r.querystring),Fs=Wi(void 0);async function j2(r){if(!r||r.length<1||r.charAt(0)!="/"&&r.indexOf("#/")!==0)throw Error("Invalid parameter location");await xo(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(r.charAt(0)=="#"?"":"#")+r}async function X2(){await xo(),window.history.back()}async function q2(r){if(!r||r.length<1||r.charAt(0)!="/"&&r.indexOf("#/")!==0)throw Error("Invalid parameter location");await xo();const e=(r.charAt(0)=="#"?"":"#")+r;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function V2(r,e){if(e=$f(e),!r||!r.tagName||r.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return Zf(r,e),{update(t){t=$f(t),Zf(r,t)}}}function Zl(r){r?window.scrollTo(r.__svelte_spa_router_scrollX,r.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function Zf(r,e){let t=e.href||r.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);r.setAttribute("href",t),r.addEventListener("click",n=>{n.preventDefault(),e.disabled||Dd(n.currentTarget.getAttribute("href"))})}function $f(r){return r&&typeof r=="string"?{href:r}:r||{}}function Dd(r){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=r}function K2(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Router",n,[]);let{routes:o={}}=e,{prefix:a=""}=e,{restoreScrollState:s=!1}=e;class u{constructor(J,X){if(!X||typeof X!="function"&&(typeof X!="object"||X._sveltesparouter!==!0))throw Error("Invalid component object");if(!J||typeof J=="string"&&(J.length<1||J.charAt(0)!="/"&&J.charAt(0)!="*")||typeof J=="object"&&!(J instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:H,keys:L}=Yl(J);this.path=J,typeof X=="object"&&X._sveltesparouter===!0?(this.component=X.component,this.conditions=X.conditions||[],this.userData=X.userData,this.props=X.props||{}):(this.component=()=>Promise.resolve(X),this.conditions=[],this.props={}),this._pattern=H,this._keys=L}match(J){if(a){if(typeof a=="string")if(J.startsWith(a))J=J.substr(a.length)||"/";else return null;else if(a instanceof RegExp){const j=J.match(a);if(j&&j[0])J=J.substr(j[0].length)||"/";else return null}}const X=this._pattern.exec(J);if(X===null)return null;if(this._keys===!1)return X;const H={};let L=0;for(;L{l.push(new u(J,O))}):Object.keys(o).forEach(O=>{l.push(new u(O,o[O]))});let h=null,b=null,m={};const A=Kl();async function _(O,J){await xo(),A(O,J)}let S=null,C=null;s&&(C=O=>{O.state&&(O.state.__svelte_spa_router_scrollY||O.state.__svelte_spa_router_scrollX)?S=O.state:S=null},window.addEventListener("popstate",C),ql(()=>{Zl(S)}));let M=null,B=null;const P=Ta.subscribe(async O=>{M=O;let J=0;for(;J{Fs.set(b)});return}t(0,h=null),B=null,Fs.set(void 0)});Vl(()=>{P(),C&&window.removeEventListener("popstate",C)});const R=["routes","prefix","restoreScrollState"];U2.keys(e).forEach(O=>{!~R.indexOf(O)&&O.slice(0,2)!=="$$"&&O!=="slot"&&J2.warn(` was created with unknown prop '${O}'`)});function I(O){Ql.call(this,r,O)}function D(O){Ql.call(this,r,O)}return r.$$set=O=>{"routes"in O&&t(3,o=O.routes),"prefix"in O&&t(4,a=O.prefix),"restoreScrollState"in O&&t(5,s=O.restoreScrollState)},r.$capture_state=()=>({readable:ns,writable:Wi,derived:pr,tick:xo,_wrap:Fd,wrap:H2,getLocation:Yf,loc:Ta,location:G2,querystring:z2,params:Fs,push:j2,pop:X2,replace:q2,link:V2,restoreScroll:Zl,updateLink:Zf,linkOpts:$f,scrollstateHistoryHandler:Dd,onDestroy:Vl,createEventDispatcher:Kl,afterUpdate:ql,parse:Yl,routes:o,prefix:a,restoreScrollState:s,RouteItem:u,routesList:l,component:h,componentParams:b,props:m,dispatch:A,dispatchNextTick:_,previousScrollState:S,popStateChanged:C,lastLoc:M,componentObj:B,unsubscribeLoc:P}),r.$inject_state=O=>{"routes"in O&&t(3,o=O.routes),"prefix"in O&&t(4,a=O.prefix),"restoreScrollState"in O&&t(5,s=O.restoreScrollState),"component"in O&&t(0,h=O.component),"componentParams"in O&&t(1,b=O.componentParams),"props"in O&&t(2,m=O.props),"previousScrollState"in O&&(S=O.previousScrollState),"popStateChanged"in O&&(C=O.popStateChanged),"lastLoc"in O&&(M=O.lastLoc),"componentObj"in O&&(B=O.componentObj)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),r.$$.update=()=>{r.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[h,b,m,o,a,s,I,D]}class Od extends Lr{constructor(e){super(e),Dr(this,e,K2,Wf,Pr,{routes:3,prefix:4,restoreScrollState:5}),ue("SvelteRegisterComponent",{component:this,tagName:"Router",options:e,id:Wf.name})}get routes(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set routes(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get prefix(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set prefix(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get restoreScrollState(){throw new Ii(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set restoreScrollState(e){throw new Ii(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const hn="src/components/Header.svelte";function ec(r){let e,t,n,i,o,a,s,u,l,h,b,m,A;const _={c:function(){e=Y("nav"),t=Y("ul"),n=Y("li"),i=Y("a"),i.textContent="Game",o=he(),a=Y("li"),s=Y("a"),s.textContent="Leaderboard",u=he(),l=Y("li"),h=Y("a"),h.textContent="Settings",b=he(),m=Y("li"),A=Y("a"),A.textContent="?",ne(i,"href","#/"),Z(i,hn,3,6,48),Z(n,hn,2,4,37),ne(s,"href","#/leaderboard"),Z(s,hn,11,6,163),Z(a,hn,10,4,152),ne(h,"href","#/settings"),Z(h,hn,14,6,228),Z(l,hn,13,4,217),ne(A,"href","#/about"),Z(A,hn,17,6,287),Z(m,hn,16,4,276),Z(t,hn,1,2,28),ne(e,"class","thc--header"),Z(e,hn,0,0,0)},l:function(C){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(C,M){$(C,e,M),re(e,t),re(t,n),re(n,i),re(t,o),re(t,a),re(a,s),re(t,u),re(t,l),re(l,h),re(t,b),re(t,m),re(m,A)},p:We,i:We,o:We,d:function(C){C&&ee(e)}};return ue("SvelteRegisterBlock",{block:_,id:ec.name,type:"component",source:"",ctx:r}),_}function Q2(r,e){let{$$slots:t={},$$scope:n}=e;Or("Header",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(`
was created with unknown prop '${o}'`)}),[]}class Ld extends Lr{constructor(e){super(e),Dr(this,e,Q2,ec,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Header",options:e,id:ec.name})}}function di(r,{delay:e=0,duration:t=400,easing:n=Wc}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:o=>`opacity: ${o*i}`}}const $l="src/components/Loader.svelte";function tc(r){let e,t,n,i;const o={c:function(){e=Y("div"),t=Y("span"),ne(t,"class","loader s-BBunC__gYdVv"),Z(t,$l,5,2,128),ne(e,"class","s-BBunC__gYdVv"),jl(e,"fullscreen",r[0]),Z(e,$l,4,0,94)},l:function(s){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(s,u){$(s,e,u),re(e,t),i=!0},p:function(s,[u]){u&1&&jl(e,"fullscreen",s[0])},i:function(s){i||(n&&n.end(1),i=!0)},o:function(s){n=D2(e,di,{}),i=!1},d:function(s){s&&ee(e),s&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:o,id:tc.name,type:"component",source:"",ctx:r}),o}function W2(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Loader",n,[]);let{fullscreen:o}=e;const a=["fullscreen"];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$$set=s=>{"fullscreen"in s&&t(0,o=s.fullscreen)},r.$capture_state=()=>({fade:di,fullscreen:o}),r.$inject_state=s=>{"fullscreen"in s&&t(0,o=s.fullscreen)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o]}class Ud extends Lr{constructor(e){super(e),Dr(this,e,W2,tc,Pr,{fullscreen:0}),ue("SvelteRegisterComponent",{component:this,tagName:"Loader",options:e,id:tc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("fullscreen"in n)&&console.warn(" was created without expected prop 'fullscreen'")}get fullscreen(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set fullscreen(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y2(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function It(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Ir={},Jd={exports:{}};const Z2=new Proxy({},{get(r,e){throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${e}" in client code.`)}}),$2=Object.freeze(Object.defineProperty({__proto__:null,default:Z2},Symbol.toStringTag,{value:"Module"})),el=It($2);(function(r){(function(e,t){function n(v,f){if(!v)throw new Error(f||"Assertion failed")}function i(v,f){v.super_=f;var p=function(){};p.prototype=f.prototype,v.prototype=new p,v.prototype.constructor=v}function o(v,f,p){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(v||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=el.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,g){if(typeof f=="number")return this._initNumber(f,p,g);if(typeof f=="object")return this._initArray(f,p,g);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w=0;w-=3)k=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[E]|=k<>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);else if(g==="le")for(w=0,E=0;w>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);return this._strip()};function s(v,f){var p=v.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+v)}function u(v,f,p){var g=s(v,p);return p-1>=f&&(g|=s(v,p-1)<<4),g}o.prototype._parseHex=function(f,p,g){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var w=0;w=p;w-=2)F=u(f,p,w)<=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8;else{var x=f.length-p;for(w=x%2===0?p+1:p;w=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8}this._strip()};function l(v,f,p,g){for(var w=0,E=0,k=Math.min(v.length,p),F=f;F=49?E=x-49+10:x>=17?E=x-17+10:E=x,n(x>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch{o.prototype.inspect=b}else o.prototype.inspect=b;function b(){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"],A=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var g;if(f===16||f==="hex"){g="";for(var w=0,E=0,k=0;k>>24-w&16777215,w+=2,w>=26&&(w-=26,k--),E!==0||k!==this.length-1?g=m[6-x.length]+x+g:g=x+g}for(E!==0&&(g=E.toString(16)+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(f===(f|0)&&f>=2&&f<=36){var c=A[f],y=_[f];g="";var T=this.clone();for(T.negative=0;!T.isZero();){var d=T.modrn(y).toString(f);T=T.idivn(y),T.isZero()?g=d+g:g=m[c-d.length]+d+g}for(this.isZero()&&(g="0"+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(a,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var S=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,g){this._strip();var w=this.byteLength(),E=g||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=S(f,E),F=p==="le"?"LE":"BE";return this["_toArrayLike"+F](k,w),k},o.prototype._toArrayLikeLE=function(f,p){for(var g=0,w=0,E=0,k=0;E>8&255),g>16&255),k===6?(g>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g=0&&(f[g--]=F>>8&255),g>=0&&(f[g--]=F>>16&255),k===6?(g>=0&&(f[g--]=F>>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g>=0)for(f[g--]=w;g>=0;)f[g--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,g=0;return p>=4096&&(g+=13,p>>>=13),p>=64&&(g+=7,p>>>=7),p>=8&&(g+=4,p>>>=4),p>=2&&(g+=2,p>>>=2),g+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,g=0;return(p&8191)===0&&(g+=13,p>>>=13),(p&127)===0&&(g+=7,p>>>=7),(p&15)===0&&(g+=4,p>>>=4),(p&3)===0&&(g+=2,p>>>=2),(p&1)===0&&g++,g},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function C(v){for(var f=new Array(v.bitLength()),p=0;p>>w&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var g=0;gf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,g;this.length>f.length?(p=this,g=f):(p=f,g=this);for(var w=0;wf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,g=f%26;this._expand(p),g>0&&p--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-g),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var g=f/26|0,w=f%26;return this._expand(g+1),p?this.words[g]=this.words[g]|1<f.length?(g=this,w=f):(g=f,w=this);for(var E=0,k=0;k>>26;for(;E!==0&&k>>26;if(this.length=g.length,E!==0)this.words[this.length]=E,this.length++;else if(g!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var g=this.cmp(f);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;g>0?(w=this,E=f):(w=f,E=this);for(var k=0,F=0;F>26,this.words[F]=p&67108863;for(;k!==0&&F>26,this.words[F]=p&67108863;if(k===0&&F>>26,T=x&67108863,d=Math.min(c,f.length-1),N=Math.max(0,c-v.length+1);N<=d;N++){var G=c-N|0;w=v.words[G]|0,E=f.words[N]|0,k=w*E+T,y+=k/67108864|0,T=k&67108863}p.words[c]=T|0,x=y|0}return x!==0?p.words[c]=x|0:p.length--,p._strip()}var B=function(f,p,g){var w=f.words,E=p.words,k=g.words,F=0,x,c,y,T=w[0]|0,d=T&8191,N=T>>>13,G=w[1]|0,U=G&8191,z=G>>>13,te=w[2]|0,K=te&8191,V=te>>>13,me=w[3]|0,Q=me&8191,oe=me>>>13,xt=w[4]|0,we=xt&8191,ge=xt>>>13,Ct=w[5]|0,Ae=Ct&8191,xe=Ct>>>13,ft=w[6]|0,de=ft&8191,Ce=ft>>>13,St=w[7]|0,pe=St&8191,Ee=St>>>13,wt=w[8]|0,W=wt&8191,ie=wt>>>13,Ft=w[9]|0,Se=Ft&8191,Fe=Ft>>>13,zt=E[0]|0,Me=zt&8191,Te=zt>>>13,Zt=E[1]|0,ke=Zt&8191,Ie=Zt>>>13,jt=E[2]|0,De=jt&8191,Pe=jt>>>13,$t=E[3]|0,Oe=$t&8191,Le=$t>>>13,Xt=E[4]|0,Ue=Xt&8191,Je=Xt>>>13,qt=E[5]|0,He=qt&8191,Re=qt>>>13,pt=E[6]|0,_e=pt&8191,Ne=pt>>>13,er=E[7]|0,ze=er&8191,je=er>>>13,xr=E[8]|0,Xe=xr&8191,qe=xr>>>13,br=E[9]|0,Ve=br&8191,Ke=br>>>13;g.negative=f.negative^p.negative,g.length=19,x=Math.imul(d,Me),c=Math.imul(d,Te),c=c+Math.imul(N,Me)|0,y=Math.imul(N,Te);var tr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(tr>>>26)|0,tr&=67108863,x=Math.imul(U,Me),c=Math.imul(U,Te),c=c+Math.imul(z,Me)|0,y=Math.imul(z,Te),x=x+Math.imul(d,ke)|0,c=c+Math.imul(d,Ie)|0,c=c+Math.imul(N,ke)|0,y=y+Math.imul(N,Ie)|0;var rr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(rr>>>26)|0,rr&=67108863,x=Math.imul(K,Me),c=Math.imul(K,Te),c=c+Math.imul(V,Me)|0,y=Math.imul(V,Te),x=x+Math.imul(U,ke)|0,c=c+Math.imul(U,Ie)|0,c=c+Math.imul(z,ke)|0,y=y+Math.imul(z,Ie)|0,x=x+Math.imul(d,De)|0,c=c+Math.imul(d,Pe)|0,c=c+Math.imul(N,De)|0,y=y+Math.imul(N,Pe)|0;var nr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(nr>>>26)|0,nr&=67108863,x=Math.imul(Q,Me),c=Math.imul(Q,Te),c=c+Math.imul(oe,Me)|0,y=Math.imul(oe,Te),x=x+Math.imul(K,ke)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(V,ke)|0,y=y+Math.imul(V,Ie)|0,x=x+Math.imul(U,De)|0,c=c+Math.imul(U,Pe)|0,c=c+Math.imul(z,De)|0,y=y+Math.imul(z,Pe)|0,x=x+Math.imul(d,Oe)|0,c=c+Math.imul(d,Le)|0,c=c+Math.imul(N,Oe)|0,y=y+Math.imul(N,Le)|0;var ir=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ir>>>26)|0,ir&=67108863,x=Math.imul(we,Me),c=Math.imul(we,Te),c=c+Math.imul(ge,Me)|0,y=Math.imul(ge,Te),x=x+Math.imul(Q,ke)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(oe,ke)|0,y=y+Math.imul(oe,Ie)|0,x=x+Math.imul(K,De)|0,c=c+Math.imul(K,Pe)|0,c=c+Math.imul(V,De)|0,y=y+Math.imul(V,Pe)|0,x=x+Math.imul(U,Oe)|0,c=c+Math.imul(U,Le)|0,c=c+Math.imul(z,Oe)|0,y=y+Math.imul(z,Le)|0,x=x+Math.imul(d,Ue)|0,c=c+Math.imul(d,Je)|0,c=c+Math.imul(N,Ue)|0,y=y+Math.imul(N,Je)|0;var or=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(or>>>26)|0,or&=67108863,x=Math.imul(Ae,Me),c=Math.imul(Ae,Te),c=c+Math.imul(xe,Me)|0,y=Math.imul(xe,Te),x=x+Math.imul(we,ke)|0,c=c+Math.imul(we,Ie)|0,c=c+Math.imul(ge,ke)|0,y=y+Math.imul(ge,Ie)|0,x=x+Math.imul(Q,De)|0,c=c+Math.imul(Q,Pe)|0,c=c+Math.imul(oe,De)|0,y=y+Math.imul(oe,Pe)|0,x=x+Math.imul(K,Oe)|0,c=c+Math.imul(K,Le)|0,c=c+Math.imul(V,Oe)|0,y=y+Math.imul(V,Le)|0,x=x+Math.imul(U,Ue)|0,c=c+Math.imul(U,Je)|0,c=c+Math.imul(z,Ue)|0,y=y+Math.imul(z,Je)|0,x=x+Math.imul(d,He)|0,c=c+Math.imul(d,Re)|0,c=c+Math.imul(N,He)|0,y=y+Math.imul(N,Re)|0;var wi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(wi>>>26)|0,wi&=67108863,x=Math.imul(de,Me),c=Math.imul(de,Te),c=c+Math.imul(Ce,Me)|0,y=Math.imul(Ce,Te),x=x+Math.imul(Ae,ke)|0,c=c+Math.imul(Ae,Ie)|0,c=c+Math.imul(xe,ke)|0,y=y+Math.imul(xe,Ie)|0,x=x+Math.imul(we,De)|0,c=c+Math.imul(we,Pe)|0,c=c+Math.imul(ge,De)|0,y=y+Math.imul(ge,Pe)|0,x=x+Math.imul(Q,Oe)|0,c=c+Math.imul(Q,Le)|0,c=c+Math.imul(oe,Oe)|0,y=y+Math.imul(oe,Le)|0,x=x+Math.imul(K,Ue)|0,c=c+Math.imul(K,Je)|0,c=c+Math.imul(V,Ue)|0,y=y+Math.imul(V,Je)|0,x=x+Math.imul(U,He)|0,c=c+Math.imul(U,Re)|0,c=c+Math.imul(z,He)|0,y=y+Math.imul(z,Re)|0,x=x+Math.imul(d,_e)|0,c=c+Math.imul(d,Ne)|0,c=c+Math.imul(N,_e)|0,y=y+Math.imul(N,Ne)|0;var Ai=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,x=Math.imul(pe,Me),c=Math.imul(pe,Te),c=c+Math.imul(Ee,Me)|0,y=Math.imul(Ee,Te),x=x+Math.imul(de,ke)|0,c=c+Math.imul(de,Ie)|0,c=c+Math.imul(Ce,ke)|0,y=y+Math.imul(Ce,Ie)|0,x=x+Math.imul(Ae,De)|0,c=c+Math.imul(Ae,Pe)|0,c=c+Math.imul(xe,De)|0,y=y+Math.imul(xe,Pe)|0,x=x+Math.imul(we,Oe)|0,c=c+Math.imul(we,Le)|0,c=c+Math.imul(ge,Oe)|0,y=y+Math.imul(ge,Le)|0,x=x+Math.imul(Q,Ue)|0,c=c+Math.imul(Q,Je)|0,c=c+Math.imul(oe,Ue)|0,y=y+Math.imul(oe,Je)|0,x=x+Math.imul(K,He)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(V,He)|0,y=y+Math.imul(V,Re)|0,x=x+Math.imul(U,_e)|0,c=c+Math.imul(U,Ne)|0,c=c+Math.imul(z,_e)|0,y=y+Math.imul(z,Ne)|0,x=x+Math.imul(d,ze)|0,c=c+Math.imul(d,je)|0,c=c+Math.imul(N,ze)|0,y=y+Math.imul(N,je)|0;var Ei=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,x=Math.imul(W,Me),c=Math.imul(W,Te),c=c+Math.imul(ie,Me)|0,y=Math.imul(ie,Te),x=x+Math.imul(pe,ke)|0,c=c+Math.imul(pe,Ie)|0,c=c+Math.imul(Ee,ke)|0,y=y+Math.imul(Ee,Ie)|0,x=x+Math.imul(de,De)|0,c=c+Math.imul(de,Pe)|0,c=c+Math.imul(Ce,De)|0,y=y+Math.imul(Ce,Pe)|0,x=x+Math.imul(Ae,Oe)|0,c=c+Math.imul(Ae,Le)|0,c=c+Math.imul(xe,Oe)|0,y=y+Math.imul(xe,Le)|0,x=x+Math.imul(we,Ue)|0,c=c+Math.imul(we,Je)|0,c=c+Math.imul(ge,Ue)|0,y=y+Math.imul(ge,Je)|0,x=x+Math.imul(Q,He)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(oe,He)|0,y=y+Math.imul(oe,Re)|0,x=x+Math.imul(K,_e)|0,c=c+Math.imul(K,Ne)|0,c=c+Math.imul(V,_e)|0,y=y+Math.imul(V,Ne)|0,x=x+Math.imul(U,ze)|0,c=c+Math.imul(U,je)|0,c=c+Math.imul(z,ze)|0,y=y+Math.imul(z,je)|0,x=x+Math.imul(d,Xe)|0,c=c+Math.imul(d,qe)|0,c=c+Math.imul(N,Xe)|0,y=y+Math.imul(N,qe)|0;var _i=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(_i>>>26)|0,_i&=67108863,x=Math.imul(Se,Me),c=Math.imul(Se,Te),c=c+Math.imul(Fe,Me)|0,y=Math.imul(Fe,Te),x=x+Math.imul(W,ke)|0,c=c+Math.imul(W,Ie)|0,c=c+Math.imul(ie,ke)|0,y=y+Math.imul(ie,Ie)|0,x=x+Math.imul(pe,De)|0,c=c+Math.imul(pe,Pe)|0,c=c+Math.imul(Ee,De)|0,y=y+Math.imul(Ee,Pe)|0,x=x+Math.imul(de,Oe)|0,c=c+Math.imul(de,Le)|0,c=c+Math.imul(Ce,Oe)|0,y=y+Math.imul(Ce,Le)|0,x=x+Math.imul(Ae,Ue)|0,c=c+Math.imul(Ae,Je)|0,c=c+Math.imul(xe,Ue)|0,y=y+Math.imul(xe,Je)|0,x=x+Math.imul(we,He)|0,c=c+Math.imul(we,Re)|0,c=c+Math.imul(ge,He)|0,y=y+Math.imul(ge,Re)|0,x=x+Math.imul(Q,_e)|0,c=c+Math.imul(Q,Ne)|0,c=c+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Ne)|0,x=x+Math.imul(K,ze)|0,c=c+Math.imul(K,je)|0,c=c+Math.imul(V,ze)|0,y=y+Math.imul(V,je)|0,x=x+Math.imul(U,Xe)|0,c=c+Math.imul(U,qe)|0,c=c+Math.imul(z,Xe)|0,y=y+Math.imul(z,qe)|0,x=x+Math.imul(d,Ve)|0,c=c+Math.imul(d,Ke)|0,c=c+Math.imul(N,Ve)|0,y=y+Math.imul(N,Ke)|0;var Ci=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,x=Math.imul(Se,ke),c=Math.imul(Se,Ie),c=c+Math.imul(Fe,ke)|0,y=Math.imul(Fe,Ie),x=x+Math.imul(W,De)|0,c=c+Math.imul(W,Pe)|0,c=c+Math.imul(ie,De)|0,y=y+Math.imul(ie,Pe)|0,x=x+Math.imul(pe,Oe)|0,c=c+Math.imul(pe,Le)|0,c=c+Math.imul(Ee,Oe)|0,y=y+Math.imul(Ee,Le)|0,x=x+Math.imul(de,Ue)|0,c=c+Math.imul(de,Je)|0,c=c+Math.imul(Ce,Ue)|0,y=y+Math.imul(Ce,Je)|0,x=x+Math.imul(Ae,He)|0,c=c+Math.imul(Ae,Re)|0,c=c+Math.imul(xe,He)|0,y=y+Math.imul(xe,Re)|0,x=x+Math.imul(we,_e)|0,c=c+Math.imul(we,Ne)|0,c=c+Math.imul(ge,_e)|0,y=y+Math.imul(ge,Ne)|0,x=x+Math.imul(Q,ze)|0,c=c+Math.imul(Q,je)|0,c=c+Math.imul(oe,ze)|0,y=y+Math.imul(oe,je)|0,x=x+Math.imul(K,Xe)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(V,Xe)|0,y=y+Math.imul(V,qe)|0,x=x+Math.imul(U,Ve)|0,c=c+Math.imul(U,Ke)|0,c=c+Math.imul(z,Ve)|0,y=y+Math.imul(z,Ke)|0;var Si=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Si>>>26)|0,Si&=67108863,x=Math.imul(Se,De),c=Math.imul(Se,Pe),c=c+Math.imul(Fe,De)|0,y=Math.imul(Fe,Pe),x=x+Math.imul(W,Oe)|0,c=c+Math.imul(W,Le)|0,c=c+Math.imul(ie,Oe)|0,y=y+Math.imul(ie,Le)|0,x=x+Math.imul(pe,Ue)|0,c=c+Math.imul(pe,Je)|0,c=c+Math.imul(Ee,Ue)|0,y=y+Math.imul(Ee,Je)|0,x=x+Math.imul(de,He)|0,c=c+Math.imul(de,Re)|0,c=c+Math.imul(Ce,He)|0,y=y+Math.imul(Ce,Re)|0,x=x+Math.imul(Ae,_e)|0,c=c+Math.imul(Ae,Ne)|0,c=c+Math.imul(xe,_e)|0,y=y+Math.imul(xe,Ne)|0,x=x+Math.imul(we,ze)|0,c=c+Math.imul(we,je)|0,c=c+Math.imul(ge,ze)|0,y=y+Math.imul(ge,je)|0,x=x+Math.imul(Q,Xe)|0,c=c+Math.imul(Q,qe)|0,c=c+Math.imul(oe,Xe)|0,y=y+Math.imul(oe,qe)|0,x=x+Math.imul(K,Ve)|0,c=c+Math.imul(K,Ke)|0,c=c+Math.imul(V,Ve)|0,y=y+Math.imul(V,Ke)|0;var Bi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,x=Math.imul(Se,Oe),c=Math.imul(Se,Le),c=c+Math.imul(Fe,Oe)|0,y=Math.imul(Fe,Le),x=x+Math.imul(W,Ue)|0,c=c+Math.imul(W,Je)|0,c=c+Math.imul(ie,Ue)|0,y=y+Math.imul(ie,Je)|0,x=x+Math.imul(pe,He)|0,c=c+Math.imul(pe,Re)|0,c=c+Math.imul(Ee,He)|0,y=y+Math.imul(Ee,Re)|0,x=x+Math.imul(de,_e)|0,c=c+Math.imul(de,Ne)|0,c=c+Math.imul(Ce,_e)|0,y=y+Math.imul(Ce,Ne)|0,x=x+Math.imul(Ae,ze)|0,c=c+Math.imul(Ae,je)|0,c=c+Math.imul(xe,ze)|0,y=y+Math.imul(xe,je)|0,x=x+Math.imul(we,Xe)|0,c=c+Math.imul(we,qe)|0,c=c+Math.imul(ge,Xe)|0,y=y+Math.imul(ge,qe)|0,x=x+Math.imul(Q,Ve)|0,c=c+Math.imul(Q,Ke)|0,c=c+Math.imul(oe,Ve)|0,y=y+Math.imul(oe,Ke)|0;var Mi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,x=Math.imul(Se,Ue),c=Math.imul(Se,Je),c=c+Math.imul(Fe,Ue)|0,y=Math.imul(Fe,Je),x=x+Math.imul(W,He)|0,c=c+Math.imul(W,Re)|0,c=c+Math.imul(ie,He)|0,y=y+Math.imul(ie,Re)|0,x=x+Math.imul(pe,_e)|0,c=c+Math.imul(pe,Ne)|0,c=c+Math.imul(Ee,_e)|0,y=y+Math.imul(Ee,Ne)|0,x=x+Math.imul(de,ze)|0,c=c+Math.imul(de,je)|0,c=c+Math.imul(Ce,ze)|0,y=y+Math.imul(Ce,je)|0,x=x+Math.imul(Ae,Xe)|0,c=c+Math.imul(Ae,qe)|0,c=c+Math.imul(xe,Xe)|0,y=y+Math.imul(xe,qe)|0,x=x+Math.imul(we,Ve)|0,c=c+Math.imul(we,Ke)|0,c=c+Math.imul(ge,Ve)|0,y=y+Math.imul(ge,Ke)|0;var ki=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ki>>>26)|0,ki&=67108863,x=Math.imul(Se,He),c=Math.imul(Se,Re),c=c+Math.imul(Fe,He)|0,y=Math.imul(Fe,Re),x=x+Math.imul(W,_e)|0,c=c+Math.imul(W,Ne)|0,c=c+Math.imul(ie,_e)|0,y=y+Math.imul(ie,Ne)|0,x=x+Math.imul(pe,ze)|0,c=c+Math.imul(pe,je)|0,c=c+Math.imul(Ee,ze)|0,y=y+Math.imul(Ee,je)|0,x=x+Math.imul(de,Xe)|0,c=c+Math.imul(de,qe)|0,c=c+Math.imul(Ce,Xe)|0,y=y+Math.imul(Ce,qe)|0,x=x+Math.imul(Ae,Ve)|0,c=c+Math.imul(Ae,Ke)|0,c=c+Math.imul(xe,Ve)|0,y=y+Math.imul(xe,Ke)|0;var Pi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,x=Math.imul(Se,_e),c=Math.imul(Se,Ne),c=c+Math.imul(Fe,_e)|0,y=Math.imul(Fe,Ne),x=x+Math.imul(W,ze)|0,c=c+Math.imul(W,je)|0,c=c+Math.imul(ie,ze)|0,y=y+Math.imul(ie,je)|0,x=x+Math.imul(pe,Xe)|0,c=c+Math.imul(pe,qe)|0,c=c+Math.imul(Ee,Xe)|0,y=y+Math.imul(Ee,qe)|0,x=x+Math.imul(de,Ve)|0,c=c+Math.imul(de,Ke)|0,c=c+Math.imul(Ce,Ve)|0,y=y+Math.imul(Ce,Ke)|0;var Ri=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,x=Math.imul(Se,ze),c=Math.imul(Se,je),c=c+Math.imul(Fe,ze)|0,y=Math.imul(Fe,je),x=x+Math.imul(W,Xe)|0,c=c+Math.imul(W,qe)|0,c=c+Math.imul(ie,Xe)|0,y=y+Math.imul(ie,qe)|0,x=x+Math.imul(pe,Ve)|0,c=c+Math.imul(pe,Ke)|0,c=c+Math.imul(Ee,Ve)|0,y=y+Math.imul(Ee,Ke)|0;var Ni=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,x=Math.imul(Se,Xe),c=Math.imul(Se,qe),c=c+Math.imul(Fe,Xe)|0,y=Math.imul(Fe,qe),x=x+Math.imul(W,Ve)|0,c=c+Math.imul(W,Ke)|0,c=c+Math.imul(ie,Ve)|0,y=y+Math.imul(ie,Ke)|0;var Fi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,x=Math.imul(Se,Ve),c=Math.imul(Se,Ke),c=c+Math.imul(Fe,Ve)|0,y=Math.imul(Fe,Ke);var Ti=(F+x|0)+((c&8191)<<13)|0;return F=(y+(c>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,k[0]=tr,k[1]=rr,k[2]=nr,k[3]=ir,k[4]=or,k[5]=wi,k[6]=Ai,k[7]=Ei,k[8]=_i,k[9]=Ci,k[10]=Si,k[11]=Bi,k[12]=Mi,k[13]=ki,k[14]=Pi,k[15]=Ri,k[16]=Ni,k[17]=Fi,k[18]=Ti,F!==0&&(k[19]=F,g.length++),g};Math.imul||(B=M);function P(v,f,p){p.negative=f.negative^v.negative,p.length=v.length+f.length;for(var g=0,w=0,E=0;E>>26)|0,w+=k>>>26,k&=67108863}p.words[E]=F,g=k,k=w}return g!==0?p.words[E]=g:p.length--,p._strip()}function R(v,f,p){return P(v,f,p)}o.prototype.mulTo=function(f,p){var g,w=this.length+f.length;return this.length===10&&f.length===10?g=B(this,f,p):w<63?g=M(this,f,p):w<1024?g=P(this,f,p):g=R(this,f,p),g},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),R(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var g=0,w=0;w>=26,g+=E/67108864|0,g+=k>>>26,this.words[w]=k&67108863}return g!==0&&(this.words[w]=g,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=C(f);if(p.length===0)return new o(1);for(var g=this,w=0;w=0);var p=f%26,g=(f-p)/26,w=67108863>>>26-p<<26-p,E;if(p!==0){var k=0;for(E=0;E>>26-p}k&&(this.words[E]=k,this.length++)}if(g!==0){for(E=this.length-1;E>=0;E--)this.words[E+g]=this.words[E];for(E=0;E=0);var w;p?w=(p-p%26)/26:w=0;var E=f%26,k=Math.min((f-E)/26,this.length),F=67108863^67108863>>>E<k)for(this.length-=k,c=0;c=0&&(y!==0||c>=w);c--){var T=this.words[c]|0;this.words[c]=y<<26-E|T>>>E,y=T&F}return x&&y!==0&&(x.words[x.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,g){return n(this.negative===0),this.iushrn(f,p,g)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,g=(f-p)/26,w=1<=0);var p=f%26,g=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(p!==0&&g++,this.length=Math.min(g,this.length),p!==0){var w=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(x/67108864|0),this.words[E+g]=k&67108863}for(;E>26,this.words[E+g]=k&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,E=0;E>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var g=this.length-f.length,w=this.clone(),E=f,k=E.words[E.length-1]|0,F=this._countBits(k);g=26-F,g!==0&&(E=E.ushln(g),w.iushln(g),k=E.words[E.length-1]|0);var x=w.length-E.length,c;if(p!=="mod"){c=new o(null),c.length=x+1,c.words=new Array(c.length);for(var y=0;y=0;d--){var N=(w.words[E.length+d]|0)*67108864+(w.words[E.length+d-1]|0);for(N=Math.min(N/k|0,67108863),w._ishlnsubmul(E,N,d);w.negative!==0;)N--,w.negative=0,w._ishlnsubmul(E,1,d),w.isZero()||(w.negative^=1);c&&(c.words[d]=N)}return c&&c._strip(),w._strip(),p!=="div"&&g!==0&&w.iushrn(g),{div:c||null,mod:w}},o.prototype.divmod=function(f,p,g){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,p),p!=="mod"&&(w=k.div.neg()),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.iadd(f)),{div:w,mod:E}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),p),p!=="mod"&&(w=k.div.neg()),{div:w,mod:k.mod}):(this.negative&f.negative)!==0?(k=this.neg().divmod(f.neg(),p),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.isub(f)),{div:k.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var g=p.div.negative!==0?p.mod.isub(f):p.mod,w=f.ushrn(1),E=f.andln(1),k=g.cmp(w);return k<0||E===1&&k===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=(1<<26)%f,w=0,E=this.length-1;E>=0;E--)w=(g*w+(this.words[E]|0))%f;return p?-w:w},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+g*67108864;this.words[w]=E/f|0,g=E%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=new o(0),F=new o(1),x=0;p.isEven()&&g.isEven();)p.iushrn(1),g.iushrn(1),++x;for(var c=g.clone(),y=p.clone();!p.isZero();){for(var T=0,d=1;(p.words[0]&d)===0&&T<26;++T,d<<=1);if(T>0)for(p.iushrn(T);T-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(y)),w.iushrn(1),E.iushrn(1);for(var N=0,G=1;(g.words[0]&G)===0&&N<26;++N,G<<=1);if(N>0)for(g.iushrn(N);N-- >0;)(k.isOdd()||F.isOdd())&&(k.iadd(c),F.isub(y)),k.iushrn(1),F.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(k),E.isub(F)):(g.isub(p),k.isub(w),F.isub(E))}return{a:k,b:F,gcd:g.iushln(x)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=g.clone();p.cmpn(1)>0&&g.cmpn(1)>0;){for(var F=0,x=1;(p.words[0]&x)===0&&F<26;++F,x<<=1);if(F>0)for(p.iushrn(F);F-- >0;)w.isOdd()&&w.iadd(k),w.iushrn(1);for(var c=0,y=1;(g.words[0]&y)===0&&c<26;++c,y<<=1);if(c>0)for(g.iushrn(c);c-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(E)):(g.isub(p),E.isub(w))}var T;return p.cmpn(1)===0?T=w:T=E,T.cmpn(0)<0&&T.iadd(f),T},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),g=f.clone();p.negative=0,g.negative=0;for(var w=0;p.isEven()&&g.isEven();w++)p.iushrn(1),g.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;g.isEven();)g.iushrn(1);var E=p.cmp(g);if(E<0){var k=p;p=g,g=k}else if(E===0||g.cmpn(1)===0)break;p.isub(g)}while(!0);return g.iushln(w)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,g=(f-p)/26,w=1<>>26,F&=67108863,this.words[k]=F}return E!==0&&(this.words[k]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var g;if(this.length>1)g=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var w=this.words[0]|0;g=w===f?0:wf.length)return 1;if(this.length=0;g--){var w=this.words[g]|0,E=f.words[g]|0;if(w!==E){wE&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new L(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function D(v,f){this.name=v,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,g;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),g=p.bitLength();while(g>this.n);var w=g0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function O(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(O,D),O.prototype.split=function(f,p){for(var g=4194303,w=Math.min(f.length,9),E=0;E>>22,k=F}k>>>=22,f.words[E-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},O.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,g=0;g>>=26,f.words[g]=E,p=w}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(I[f])return I[f];var p;if(f==="k256")p=new O;else if(f==="p224")p=new J;else if(f==="p192")p=new X;else if(f==="p25519")p=new H;else throw new Error("Unknown prime "+f);return I[f]=p,p};function L(v){if(typeof v=="string"){var f=o._prime(v);this.m=f.p,this.prime=f}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}L.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},L.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},L.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(h(f,f.umod(this.m)._forceRed(this)),f)},L.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},L.prototype.add=function(f,p){this._verify2(f,p);var g=f.add(p);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},L.prototype.iadd=function(f,p){this._verify2(f,p);var g=f.iadd(p);return g.cmp(this.m)>=0&&g.isub(this.m),g},L.prototype.sub=function(f,p){this._verify2(f,p);var g=f.sub(p);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},L.prototype.isub=function(f,p){this._verify2(f,p);var g=f.isub(p);return g.cmpn(0)<0&&g.iadd(this.m),g},L.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},L.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},L.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},L.prototype.isqr=function(f){return this.imul(f,f.clone())},L.prototype.sqr=function(f){return this.mul(f,f)},L.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var g=this.m.add(new o(1)).iushrn(2);return this.pow(f,g)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var k=new o(1).toRed(this),F=k.redNeg(),x=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,x).cmp(F)!==0;)c.redIAdd(F);for(var y=this.pow(c,w),T=this.pow(f,w.addn(1).iushrn(1)),d=this.pow(f,w),N=E;d.cmp(k)!==0;){for(var G=d,U=0;G.cmp(k)!==0;U++)G=G.redSqr();n(U=0;E--){for(var y=p.words[E],T=c-1;T>=0;T--){var d=y>>T&1;if(k!==w[0]&&(k=this.sqr(k)),d===0&&F===0){x=0;continue}F<<=1,F|=d,x++,!(x!==g&&(E!==0||T!==0))&&(k=this.mul(k,w[F]),x=0,F=0)}c=26}return k},L.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},L.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new j(f)};function j(v){L.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,L),j.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},j.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},j.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var g=f.imul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var g=f.mul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(r,Be)})(Jd);const Ze=Jd.exports,eb="logger/5.7.0";let eu=!1,tu=!1;const da={debug:1,default:2,info:2,warning:3,error:4,off:5};let ru=da.default,Ts=null;function tb(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const nu=tb();var Ia;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(Ia||(Ia={}));var Xr;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Xr||(Xr={}));const iu="0123456789abcdef";class q{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();da[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ru>da[n])&&console.log.apply(console,t)}debug(...e){this._log(q.levels.DEBUG,e)}info(...e){this._log(q.levels.INFO,e)}warn(...e){this._log(q.levels.WARNING,e)}makeError(e,t,n){if(tu)return this.makeError("censored error",t,{});t||(t=q.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let h="";for(let b=0;b>4],h+=iu[l[b]&15];i.push(u+"=Uint8Array(0x"+h+")")}else i.push(u+"="+JSON.stringify(l))}catch{i.push(u+"="+JSON.stringify(n[u].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const o=e;let a="";switch(t){case Xr.NUMERIC_FAULT:{a="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":a+="-"+u;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case Xr.CALL_EXCEPTION:case Xr.INSUFFICIENT_FUNDS:case Xr.MISSING_NEW:case Xr.NONCE_EXPIRED:case Xr.REPLACEMENT_UNDERPRICED:case Xr.TRANSACTION_REPLACED:case Xr.UNPREDICTABLE_GAS_LIMIT:a=t;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(n).forEach(function(u){s[u]=n[u]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,q.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){nu&&this.throwError("platform missing String.prototype.normalize",q.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:nu})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,q.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,q.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,q.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",q.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",q.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",q.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Ts||(Ts=new q(eb)),Ts}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",q.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),eu){if(!e)return;this.globalLogger().throwError("error censorship permanent",q.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}tu=!!e,eu=!!t}static setLogLevel(e){const t=da[e.toLowerCase()];if(t==null){q.globalLogger().warn("invalid log level - "+e);return}ru=t}static from(e){return new q(e)}}q.errors=Xr;q.levels=Ia;const rb=Object.freeze(Object.defineProperty({__proto__:null,get LogLevel(){return Ia},get ErrorCode(){return Xr},Logger:q},Symbol.toStringTag,{value:"Module"})),nb="bytes/5.7.0",Tt=new q(nb);function Hd(r){return!!r.toHexString}function b0(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return b0(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function Io(r){return lt(r)&&!(r.length%2)||Yi(r)}function ou(r){return typeof r=="number"&&r==r&&r%1===0}function Yi(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!ou(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ae(r,e){if(e||(e={}),typeof r=="number"){Tt.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),b0(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Hd(r)&&(r=r.toHexString()),lt(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Tt.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;iae(i)),t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),b0(n)}function Cn(r){let e=ae(r);if(e.length===0)return e;let t=0;for(;te&&Tt.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),b0(t)}function lt(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const Is="0123456789abcdef";function se(r,e){if(e||(e={}),typeof r=="number"){Tt.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=Is[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Hd(r))return r.toHexString();if(lt(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":Tt.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(Yi(r)){let t="0x";for(let n=0;n>4]+Is[i&15]}return t}return Tt.throwArgumentError("invalid hexlify value","value",r)}function Fn(r){if(typeof r!="string")r=se(r);else if(!lt(r)||r.length%2)return null;return(r.length-2)/2}function Ot(r,e,t){return typeof r!="string"?r=se(r):(!lt(r)||r.length%2)&&Tt.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function gr(r){let e="0x";return r.forEach(t=>{e+=se(t).substring(2)}),e}function is(r){const e=Gd(se(r,{hexPad:"left"}));return e==="0x"?"0x0":e}function Gd(r){typeof r!="string"&&(r=se(r)),lt(r)||Tt.throwArgumentError("invalid hex string","value",r),r=r.substring(2);let e=0;for(;e2*e+2&&Tt.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function Zi(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Io(r)){let t=ae(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=se(t.slice(0,32)),e.s=se(t.slice(32,64))):t.length===65?(e.r=se(t.slice(0,32)),e.s=se(t.slice(32,64)),e.v=t[64]):Tt.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:Tt.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=se(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const i=io(ae(e._vs),32);e._vs=se(i);const o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&Tt.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const a=se(i);e.s==null?e.s=a:e.s!==a&&Tt.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?Tt.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Tt.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!lt(e.r)?Tt.throwArgumentError("signature missing or invalid r","signature",r):e.r=yt(e.r,32),e.s==null||!lt(e.s)?Tt.throwArgumentError("signature missing or invalid s","signature",r):e.s=yt(e.s,32);const t=ae(e.s);t[0]>=128&&Tt.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const n=se(t);e._vs&&(lt(e._vs)||Tt.throwArgumentError("signature invalid _vs","signature",r),e._vs=yt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Tt.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function rc(r){return r=Zi(r),se(Et([r.r,r.s,r.recoveryParam?"0x1c":"0x1b"]))}const ib=Object.freeze(Object.defineProperty({__proto__:null,isBytesLike:Io,isBytes:Yi,arrayify:ae,concat:Et,stripZeros:Cn,zeroPad:io,isHexString:lt,hexlify:se,hexDataLength:Fn,hexDataSlice:Ot,hexConcat:gr,hexValue:is,hexStripZeros:Gd,hexZeroPad:yt,splitSignature:Zi,joinSignature:rc},Symbol.toStringTag,{value:"Module"})),zd="bignumber/5.7.0";var bo=Ze.BN;const Jn=new q(zd),Ds={},au=9007199254740991;function ob(r){return r!=null&&(fe.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||lt(r)||typeof r=="bigint"||Yi(r))}let su=!1;class fe{constructor(e,t){e!==Ds&&Jn.throwError("cannot call constructor directly; use BigNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Er(tt(this).fromTwos(e))}toTwos(e){return Er(tt(this).toTwos(e))}abs(){return this._hex[0]==="-"?fe.from(this._hex.substring(1)):this}add(e){return Er(tt(this).add(tt(e)))}sub(e){return Er(tt(this).sub(tt(e)))}div(e){return fe.from(e).isZero()&&Hr("division-by-zero","div"),Er(tt(this).div(tt(e)))}mul(e){return Er(tt(this).mul(tt(e)))}mod(e){const t=tt(e);return t.isNeg()&&Hr("division-by-zero","mod"),Er(tt(this).umod(t))}pow(e){const t=tt(e);return t.isNeg()&&Hr("negative-power","pow"),Er(tt(this).pow(t))}and(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","and"),Er(tt(this).and(t))}or(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","or"),Er(tt(this).or(t))}xor(e){const t=tt(e);return(this.isNegative()||t.isNeg())&&Hr("unbound-bitwise-result","xor"),Er(tt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Hr("negative-width","mask"),Er(tt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Hr("negative-width","shl"),Er(tt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Hr("negative-width","shr"),Er(tt(this).shrn(e))}eq(e){return tt(this).eq(tt(e))}lt(e){return tt(this).lt(tt(e))}lte(e){return tt(this).lte(tt(e))}gt(e){return tt(this).gt(tt(e))}gte(e){return tt(this).gte(tt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return tt(this).isZero()}toNumber(){try{return tt(this).toNumber()}catch{Hr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Jn.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?su||(su=!0,Jn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Jn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):Jn.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),tt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof fe)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new fe(Ds,go(e)):e.match(/^-?[0-9]+$/)?new fe(Ds,go(new bo(e))):Jn.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Hr("underflow","BigNumber.from",e),(e>=au||e<=-au)&&Hr("overflow","BigNumber.from",e),fe.from(String(e));const t=e;if(typeof t=="bigint")return fe.from(t.toString());if(Yi(t))return fe.from(se(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return fe.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(lt(n)||n[0]==="-"&<(n.substring(1))))return fe.from(n)}return Jn.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function go(r){if(typeof r!="string")return go(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Jn.throwArgumentError("invalid hex","value",r),r=go(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function Er(r){return fe.from(go(r))}function tt(r){const e=fe.from(r).toHexString();return e[0]==="-"?new bo("-"+e.substring(3),16):new bo(e.substring(2),16)}function Hr(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Jn.throwError(r,q.errors.NUMERIC_FAULT,n)}function ab(r){return new bo(r,36).toString(16)}function sb(r){return new bo(r,16).toString(36)}const mr=new q(zd),oo={},jd=fe.from(0),Xd=fe.from(-1);function qd(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),mr.throwError(r,q.errors.NUMERIC_FAULT,i)}let ao="0";for(;ao.length<256;)ao+=ao;function tl(r){if(typeof r!="number")try{r=fe.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+ao.substring(0,r):mr.throwArgumentError("invalid decimal size","decimals",r)}function pa(r,e){e==null&&(e=0);const t=tl(e);r=fe.from(r);const n=r.lt(jd);n&&(r=r.mul(Xd));let i=r.mod(t).toString();for(;i.length2&&mr.throwArgumentError("too many decimal points","value",r);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");a[a.length-1]==="0";)a=a.substring(0,a.length-1);for(a.length>t.length-1&&qd("fractional component exceeds decimals","underflow","parseFixed"),a===""&&(a="0");a.lengthe[a]==null?u:(typeof e[a]!==s&&mr.throwArgumentError("invalid fixed format ("+a+" not "+s+")","format."+a,e[a]),e[a]);t=o("signed","boolean",t),n=o("width","number",n),i=o("decimals","number",i)}return n%8&&mr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&mr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new g0(oo,t,n,i)}}class ar{constructor(e,t,n,i){e!==oo&&mr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&mr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=dn(this._value,this.format.decimals),n=dn(e._value,e.format.decimals);return ar.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ar.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(fu.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=ar.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(fu.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&mr.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=ar.from("1"+ao.substring(0,e),this.format),i=fb.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&mr.throwArgumentError("invalid byte width","width",e);const t=fe.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return yt(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return ar.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!ob(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ar.fromString(pa(e,t),g0.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=g0.from(t),i=dn(e,n.decimals);!n.signed&&i.lt(jd)&&qd("unsigned value cannot be negative","overflow","value",e);let o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=yt(o,n.width/8));const a=pa(i,n.decimals);return new ar(oo,o,a,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=g0.from(t);if(ae(e).length>n.width/8)throw new Error("overflow");let i=fe.from(e);n.signed&&(i=i.fromTwos(n.width));const o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=pa(i,n.decimals);return new ar(oo,o,a,n)}static from(e,t){if(typeof e=="string")return ar.fromString(e,t);if(Yi(e))return ar.fromBytes(e,t);try{return ar.fromValue(e,0,t)}catch(n){if(n.code!==q.errors.INVALID_ARGUMENT)throw n}return mr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const fu=ar.from(1),fb=ar.from("0.5"),cb="properties/5.7.0";var lb=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Da=new q(cb);function le(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}function An(r,e){for(let t=0;t<32;t++){if(r[e])return r[e];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}function Ht(r){return lb(this,void 0,void 0,function*(){const e=Object.keys(r).map(n=>{const i=r[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function rl(r,e){(!r||typeof r!="object")&&Da.throwArgumentError("invalid object","object",r),Object.keys(r).forEach(t=>{e[t]||Da.throwArgumentError("invalid object key - "+t,"transaction:"+t,r)})}function vr(r){const e={};for(const t in r)e[t]=r[t];return e}const ub={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Vd(r){if(r==null||ub[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const e=Object.keys(r);for(let t=0;tw0(e)));if(typeof r=="object"){const e={};for(const t in r){const n=r[t];n!==void 0&&le(e,t,w0(n))}return e}return Da.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function w0(r){return hb(r)}class gi{constructor(e){for(const t in e)this[t]=w0(e[t])}}const db=Object.freeze(Object.defineProperty({__proto__:null,defineReadOnly:le,getStatic:An,resolveProperties:Ht,checkProperties:rl,shallowCopy:vr,deepCopy:w0,Description:gi},Symbol.toStringTag,{value:"Module"})),Do="abi/5.7.0",ot=new q(Do),Xi={};let cu={calldata:!0,memory:!0,storage:!0},pb={calldata:!0,memory:!0};function Wo(r,e){if(r==="bytes"||r==="string"){if(cu[e])return!0}else if(r==="address"){if(e==="payable")return!0}else if((r.indexOf("[")>=0||r==="tuple")&&pb[e])return!0;return(cu[e]||e==="payable")&&ot.throwArgumentError("invalid modifier","name",e),!1}function xb(r,e){let t=r;function n(s){ot.throwArgumentError(`unexpected character at position ${s}`,"param",r)}r=r.replace(/\s/g," ");function i(s){let u={type:"",name:"",parent:s,state:{allowType:!0}};return e&&(u.indexed=!1),u}let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ct.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ct.full?", ":",")+")"):t+=this.type,e!==ct.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ct.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?Gt.fromString(e,t):Gt.fromObject(e)}static fromObject(e){return Gt.isParamType(e)?e:new Gt(Xi,{name:e.name||null,type:o0(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Gt.fromObject):null})}static fromString(e,t){function n(i){return Gt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(xb(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function mo(r,e){return mb(r).map(t=>Gt.fromString(t,e))}class En{constructor(e,t){e!==Xi&&ot.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),xa(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return En.isFragment(e)?e:typeof e=="string"?En.fromString(e):En.fromObject(e)}static fromObject(e){if(En.isFragment(e))return e;switch(e.type){case"function":return on.fromObject(e);case"event":return gn.fromObject(e);case"constructor":return nn.fromObject(e);case"error":return zn.fromObject(e);case"fallback":case"receive":return null}return ot.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?gn.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?on.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?nn.fromString(e.trim()):e.split(" ")[0]==="error"?zn.fromString(e.substring(5).trim()):ot.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?gn.fromString(e):gn.fromObject(e)}static fromObject(e){if(gn.isEventFragment(e))return e;e.type!=="event"&&ot.throwArgumentError("invalid event object","value",e);const t={name:yo(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],type:"event"};return new gn(Xi,t)}static fromString(e){let t=e.match(vo);t||ot.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:ot.warn("unknown modifier: "+i)}}),gn.fromObject({name:t[1].trim(),anonymous:n,inputs:mo(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Kd(r,e){e.gas=null;let t=r.split("@");return t.length!==1?(t.length>2&&ot.throwArgumentError("invalid human-readable ABI signature","value",r),t[1].match(/^[0-9]+$/)||ot.throwArgumentError("invalid human-readable ABI signature gas","value",r),e.gas=fe.from(t[1]),t[0]):r}function Qd(r,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",r.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Wd(r){let e={constant:!1,payable:!0,stateMutability:"payable"};return r.stateMutability!=null?(e.stateMutability=r.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",r.constant!=null&&!!r.constant!==e.constant&&ot.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",r),e.payable=e.stateMutability==="payable",r.payable!=null&&!!r.payable!==e.payable&&ot.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",r)):r.payable!=null?(e.payable=!!r.payable,r.constant==null&&!e.payable&&r.type!=="constructor"&&ot.throwArgumentError("unable to determine stateMutability","value",r),e.constant=!!r.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&ot.throwArgumentError("cannot have constant payable function","value",r)):r.constant!=null?(e.constant=!!r.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):r.type!=="constructor"&&ot.throwArgumentError("unable to determine stateMutability","value",r),e}class nn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ct.sighash&&ot.throwError("cannot format a constructor for sighash",q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?nn.fromString(e):nn.fromObject(e)}static fromObject(e){if(nn.isConstructorFragment(e))return e;e.type!=="constructor"&&ot.throwArgumentError("invalid constructor object","value",e);let t=Wd(e);t.constant&&ot.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?fe.from(e.gas):null};return new nn(Xi,n)}static fromString(e){let t={type:"constructor"};e=Kd(e,t);let n=e.match(vo);return(!n||n[1].trim()!=="constructor")&&ot.throwArgumentError("invalid constructor string","value",e),t.inputs=mo(n[2].trim(),!1),Qd(n[3].trim(),t),nn.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class on extends nn{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?on.fromString(e):on.fromObject(e)}static fromObject(e){if(on.isFunctionFragment(e))return e;e.type!=="function"&&ot.throwArgumentError("invalid function object","value",e);let t=Wd(e);const n={type:e.type,name:yo(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Gt.fromObject):[],outputs:e.outputs?e.outputs.map(Gt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?fe.from(e.gas):null};return new on(Xi,n)}static fromString(e){let t={type:"function"};e=Kd(e,t);let n=e.split(" returns ");n.length>2&&ot.throwArgumentError("invalid function string","value",e);let i=n[0].match(vo);if(i||ot.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&yo(t.name),t.inputs=mo(i[2],!1),Qd(i[3].trim(),t),n.length>1){let o=n[1].match(vo);(o[1].trim()!=""||o[3].trim()!="")&&ot.throwArgumentError("unexpected tokens","value",e),t.outputs=mo(o[2],!1)}else t.outputs=[];return on.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function lu(r){const e=r.format();return(e==="Error(string)"||e==="Panic(uint256)")&&ot.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",r),r}class zn extends En{format(e){if(e||(e=ct.sighash),ct[e]||ot.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ct.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ct.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?zn.fromString(e):zn.fromObject(e)}static fromObject(e){if(zn.isErrorFragment(e))return e;e.type!=="error"&&ot.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:yo(e.name),inputs:e.inputs?e.inputs.map(Gt.fromObject):[]};return lu(new zn(Xi,t))}static fromString(e){let t={type:"error"},n=e.match(vo);return n||ot.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&yo(t.name),t.inputs=mo(n[2],!1),lu(zn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function o0(r){return r.match(/^uint($|[^1-9])/)?r="uint256"+r.substring(4):r.match(/^int($|[^1-9])/)&&(r="int256"+r.substring(3)),r}const gb=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function yo(r){return(!r||!r.match(gb))&&ot.throwArgumentError(`invalid identifier "${r}"`,"value",r),r}const vo=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function mb(r){r=r.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&nl.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Et([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Oa{constructor(e,t,n,i){le(this,"_data",ae(e)),le(this,"wordSize",t||32),le(this,"_coerceFunc",n),le(this,"allowLoose",i),this._offset=0}get data(){return se(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Oa.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:nl.throwError("data out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Oa(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return fe.from(this.readBytes(this.wordSize))}}var Yd={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=Be:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],m=[1,256,65536,16777216],A=[6,1536,393216,100663296],_=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],C=[224,256,384,512],M=[128,256],B=["hex","buffer","arrayBuffer","array","digest"],P={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(d){return Object.prototype.toString.call(d)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(d){return typeof d=="object"&&d.buffer&&d.buffer.constructor===ArrayBuffer});for(var R=function(d,N,G){return function(U){return new c(d,N,d).update(U)[G]()}},I=function(d,N,G){return function(U,z){return new c(d,N,z).update(U)[G]()}},D=function(d,N,G){return function(U,z,te,K){return f["cshake"+d].update(U,z,te,K)[G]()}},O=function(d,N,G){return function(U,z,te,K){return f["kmac"+d].update(U,z,te,K)[G]()}},J=function(d,N,G,U){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}c.prototype.update=function(d){if(this.finalized)throw new Error(t);var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}for(var U=this.blocks,z=this.byteCount,te=d.length,K=this.blockCount,V=0,me=this.s,Q,oe;V>2]|=d[V]<<_[Q++&3];else for(Q=this.start;V>2]|=oe<<_[Q++&3]:oe<2048?(U[Q>>2]|=(192|oe>>6)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):oe<55296||oe>=57344?(U[Q>>2]|=(224|oe>>12)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):(oe=65536+((oe&1023)<<10|d.charCodeAt(++V)&1023),U[Q>>2]|=(240|oe>>18)<<_[Q++&3],U[Q>>2]|=(128|oe>>12&63)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]);if(this.lastByteIndex=Q,Q>=z){for(this.start=Q-z,this.block=U[K],Q=0;Q>8,G=d&255;G>0;)z.unshift(G),d=d>>8,G=d&255,++U;return N?z.push(U):z.unshift(U),this.update(z),z.length},c.prototype.encodeString=function(d){var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}var U=0,z=d.length;if(N)U=z;else for(var te=0;te=57344?U+=3:(K=65536+((K&1023)<<10|d.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(d),U},c.prototype.bytepad=function(d,N){for(var G=this.encode(N),U=0;U>2]|=this.padding[N&3],this.lastByteIndex===this.byteCount)for(d[0]=d[G],N=1;N>4&15]+l[V&15]+l[V>>12&15]+l[V>>8&15]+l[V>>20&15]+l[V>>16&15]+l[V>>28&15]+l[V>>24&15];te%d===0&&(T(N),z=0)}return U&&(V=N[z],K+=l[V>>4&15]+l[V&15],U>1&&(K+=l[V>>12&15]+l[V>>8&15]),U>2&&(K+=l[V>>20&15]+l[V>>16&15])),K},c.prototype.arrayBuffer=function(){this.finalize();var d=this.blockCount,N=this.s,G=this.outputBlocks,U=this.extraBytes,z=0,te=0,K=this.outputBits>>3,V;U?V=new ArrayBuffer(G+1<<2):V=new ArrayBuffer(K);for(var me=new Uint32Array(V);te>8&255,K[V+2]=me>>16&255,K[V+3]=me>>24&255;te%d===0&&T(N)}return U&&(V=te<<2,me=N[z],K[V]=me&255,U>1&&(K[V+1]=me>>8&255),U>2&&(K[V+2]=me>>16&255)),K};function y(d,N,G){c.call(this,d,N,G)}y.prototype=new c,y.prototype.finalize=function(){return this.encode(this.outputBits,!0),c.prototype.finalize.call(this)};var T=function(d){var N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae,xe,ft,de,Ce,St,pe,Ee,wt,W,ie,Ft,Se,Fe,zt,Me,Te,Zt,ke,Ie,jt,De,Pe,$t,Oe,Le,Xt,Ue,Je,qt,He,Re,pt,_e,Ne,er,ze,je,xr,Xe,qe,br,Ve,Ke,tr,rr,nr,ir,or;for(U=0;U<48;U+=2)z=d[0]^d[10]^d[20]^d[30]^d[40],te=d[1]^d[11]^d[21]^d[31]^d[41],K=d[2]^d[12]^d[22]^d[32]^d[42],V=d[3]^d[13]^d[23]^d[33]^d[43],me=d[4]^d[14]^d[24]^d[34]^d[44],Q=d[5]^d[15]^d[25]^d[35]^d[45],oe=d[6]^d[16]^d[26]^d[36]^d[46],xt=d[7]^d[17]^d[27]^d[37]^d[47],we=d[8]^d[18]^d[28]^d[38]^d[48],ge=d[9]^d[19]^d[29]^d[39]^d[49],N=we^(K<<1|V>>>31),G=ge^(V<<1|K>>>31),d[0]^=N,d[1]^=G,d[10]^=N,d[11]^=G,d[20]^=N,d[21]^=G,d[30]^=N,d[31]^=G,d[40]^=N,d[41]^=G,N=z^(me<<1|Q>>>31),G=te^(Q<<1|me>>>31),d[2]^=N,d[3]^=G,d[12]^=N,d[13]^=G,d[22]^=N,d[23]^=G,d[32]^=N,d[33]^=G,d[42]^=N,d[43]^=G,N=K^(oe<<1|xt>>>31),G=V^(xt<<1|oe>>>31),d[4]^=N,d[5]^=G,d[14]^=N,d[15]^=G,d[24]^=N,d[25]^=G,d[34]^=N,d[35]^=G,d[44]^=N,d[45]^=G,N=me^(we<<1|ge>>>31),G=Q^(ge<<1|we>>>31),d[6]^=N,d[7]^=G,d[16]^=N,d[17]^=G,d[26]^=N,d[27]^=G,d[36]^=N,d[37]^=G,d[46]^=N,d[47]^=G,N=oe^(z<<1|te>>>31),G=xt^(te<<1|z>>>31),d[8]^=N,d[9]^=G,d[18]^=N,d[19]^=G,d[28]^=N,d[29]^=G,d[38]^=N,d[39]^=G,d[48]^=N,d[49]^=G,Ct=d[0],Ae=d[1],Re=d[11]<<4|d[10]>>>28,pt=d[10]<<4|d[11]>>>28,Fe=d[20]<<3|d[21]>>>29,zt=d[21]<<3|d[20]>>>29,rr=d[31]<<9|d[30]>>>23,nr=d[30]<<9|d[31]>>>23,Ue=d[40]<<18|d[41]>>>14,Je=d[41]<<18|d[40]>>>14,Ie=d[2]<<1|d[3]>>>31,jt=d[3]<<1|d[2]>>>31,xe=d[13]<<12|d[12]>>>20,ft=d[12]<<12|d[13]>>>20,_e=d[22]<<10|d[23]>>>22,Ne=d[23]<<10|d[22]>>>22,Me=d[33]<<13|d[32]>>>19,Te=d[32]<<13|d[33]>>>19,ir=d[42]<<2|d[43]>>>30,or=d[43]<<2|d[42]>>>30,Xe=d[5]<<30|d[4]>>>2,qe=d[4]<<30|d[5]>>>2,De=d[14]<<6|d[15]>>>26,Pe=d[15]<<6|d[14]>>>26,de=d[25]<<11|d[24]>>>21,Ce=d[24]<<11|d[25]>>>21,er=d[34]<<15|d[35]>>>17,ze=d[35]<<15|d[34]>>>17,Zt=d[45]<<29|d[44]>>>3,ke=d[44]<<29|d[45]>>>3,W=d[6]<<28|d[7]>>>4,ie=d[7]<<28|d[6]>>>4,br=d[17]<<23|d[16]>>>9,Ve=d[16]<<23|d[17]>>>9,$t=d[26]<<25|d[27]>>>7,Oe=d[27]<<25|d[26]>>>7,St=d[36]<<21|d[37]>>>11,pe=d[37]<<21|d[36]>>>11,je=d[47]<<24|d[46]>>>8,xr=d[46]<<24|d[47]>>>8,qt=d[8]<<27|d[9]>>>5,He=d[9]<<27|d[8]>>>5,Ft=d[18]<<20|d[19]>>>12,Se=d[19]<<20|d[18]>>>12,Ke=d[29]<<7|d[28]>>>25,tr=d[28]<<7|d[29]>>>25,Le=d[38]<<8|d[39]>>>24,Xt=d[39]<<8|d[38]>>>24,Ee=d[48]<<14|d[49]>>>18,wt=d[49]<<14|d[48]>>>18,d[0]=Ct^~xe&de,d[1]=Ae^~ft&Ce,d[10]=W^~Ft&Fe,d[11]=ie^~Se&zt,d[20]=Ie^~De&$t,d[21]=jt^~Pe&Oe,d[30]=qt^~Re&_e,d[31]=He^~pt&Ne,d[40]=Xe^~br&Ke,d[41]=qe^~Ve&tr,d[2]=xe^~de&St,d[3]=ft^~Ce&pe,d[12]=Ft^~Fe&Me,d[13]=Se^~zt&Te,d[22]=De^~$t&Le,d[23]=Pe^~Oe&Xt,d[32]=Re^~_e&er,d[33]=pt^~Ne&ze,d[42]=br^~Ke&rr,d[43]=Ve^~tr&nr,d[4]=de^~St&Ee,d[5]=Ce^~pe&wt,d[14]=Fe^~Me&Zt,d[15]=zt^~Te&ke,d[24]=$t^~Le&Ue,d[25]=Oe^~Xt&Je,d[34]=_e^~er&je,d[35]=Ne^~ze&xr,d[44]=Ke^~rr&ir,d[45]=tr^~nr&or,d[6]=St^~Ee&Ct,d[7]=pe^~wt&Ae,d[16]=Me^~Zt&W,d[17]=Te^~ke&ie,d[26]=Le^~Ue&Ie,d[27]=Xt^~Je&jt,d[36]=er^~je&qt,d[37]=ze^~xr&He,d[46]=rr^~ir&Xe,d[47]=nr^~or&qe,d[8]=Ee^~Ct&xe,d[9]=wt^~Ae&ft,d[18]=Zt^~W&Ft,d[19]=ke^~ie&Se,d[28]=Ue^~Ie&De,d[29]=Je^~jt&Pe,d[38]=je^~qt&Re,d[39]=xr^~He&pt,d[48]=ir^~Xe&br,d[49]=or^~qe&Ve,d[0]^=S[U],d[1]^=S[U+1]};if(s)r.exports=f;else for(g=0;g>=8;return e}function hu(r,e,t){let n=0;for(let i=0;ie+1+n&&pn.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Zd(r,e){if(r.length===0&&pn.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),r[e]>=248){const t=r[e]-247;e+1+t>r.length&&pn.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=hu(r,e+1,t);return e+1+t+n>r.length&&pn.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),du(r,e,e+1+t,t+n)}else if(r[e]>=192){const t=r[e]-192;return e+1+t>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),du(r,e,e+1,t)}else if(r[e]>=184){const t=r[e]-183;e+1+t>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=hu(r,e+1,t);e+1+t+n>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=se(r.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(r[e]>=128){const t=r[e]-128;e+1+t>r.length&&pn.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=se(r.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:se(r[e])}}function os(r){const e=ae(r),t=Zd(e,0);return t.consumed!==e.length&&pn.throwArgumentError("invalid rlp data","data",r),t.result}const wb=Object.freeze(Object.defineProperty({__proto__:null,encode:qi,decode:os},Symbol.toStringTag,{value:"Module"})),Ab="address/5.7.0",ai=new q(Ab);function pu(r){lt(r,20)||ai.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=ae(gt(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Eb=9007199254740991;function _b(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const il={};for(let r=0;r<10;r++)il[String(r)]=String(r);for(let r=0;r<26;r++)il[String.fromCharCode(65+r)]=String(10+r);const xu=Math.floor(_b(Eb));function $d(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>il[n]).join("");for(;e.length>=xu;){let n=e.substring(0,xu);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function _t(r){let e=null;if(typeof r!="string"&&ai.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=pu(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&ai.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==$d(r)&&ai.throwArgumentError("bad icap checksum","address",r),e=ib(r.substring(4));e.length<40;)e="0"+e;e=pu("0x"+e)}else ai.throwArgumentError("invalid address","address",r);return e}function Cb(r){try{return _t(r),!0}catch{}return!1}function Sb(r){let e=ob(_t(r).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+$d("XE00"+e)+e}function e1(r){let e=null;try{e=_t(r.from)}catch{ai.throwArgumentError("missing from address","transaction",r)}const t=Cn(ae(fe.from(r.nonce).toHexString()));return _t(Ot(gt(qi([e,t])),12))}function Bb(r,e,t){return Fn(e)!==32&&ai.throwArgumentError("salt must be 32 bytes","salt",e),Fn(t)!==32&&ai.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),_t(Ot(gt(Et(["0xff",_t(r),e,t])),12))}const Mb=Object.freeze(Object.defineProperty({__proto__:null,getAddress:_t,isAddress:Cb,getIcapAddress:Sb,getContractAddress:e1,getCreate2Address:Bb},Symbol.toStringTag,{value:"Module"}));class kb extends $n{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=_t(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return _t(yt(e.readValue().toHexString(),20))}}class Pb extends $n{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const c0=new q(Io);function t1(r,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let u={};n=e.map(l=>{const h=l.localName;return h||c0.throwError("cannot encode object for signature with missing names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]&&c0.throwError("cannot encode object for signature with duplicate names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]=!0,t[h]})}else c0.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&c0.throwArgumentError("types/value length mismatch","tuple",t);let i=new nc(r.wordSize),o=new nc(r.wordSize),a=[];e.forEach((u,l)=>{let h=n[l];if(u.dynamic){let b=o.length;u.encode(o,h);let m=i.writeUpdatableValue();a.push(A=>{m(A+b)})}else u.encode(i,h)}),a.forEach(u=>{u(i.length)});let s=r.appendWriter(i);return s+=r.appendWriter(o),s}function r1(r,e){let t=[],n=r.subReader(0);e.forEach(o=>{let a=null;if(o.dynamic){let s=r.readValue(),u=n.subReader(s.toNumber());try{a=o.decode(u)}catch(l){if(l.code===q.errors.BUFFER_OVERRUN)throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(r)}catch(s){if(s.code===q.errors.BUFFER_OVERRUN)throw s;a=s,a.baseType=o.name,a.name=o.localName,a.type=o.type}a!=null&&t.push(a)});const i=e.reduce((o,a)=>{const s=a.localName;return s&&(o[s]||(o[s]=0),o[s]++),o},{});e.forEach((o,a)=>{let s=o.localName;if(!s||i[s]!==1||(s==="length"&&(s="_length"),t[s]!=null))return;const u=t[a];u instanceof Error?Object.defineProperty(t,s,{enumerable:!0,get:()=>{throw u}}):t[s]=u});for(let o=0;o{throw a}})}return Object.freeze(t)}class Rb extends $n{constructor(e,t,n){const i=e.type+"["+(t>=0?t:"")+"]",o=t===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&c0.throwError("insufficient data length",q.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;i>6===2;a++)o++;return o}return r===Sr.OVERRUN?t.length-e-1:0}function zb(r,e,t,n,i){return r===Sr.OVERLONG?(n.push(i),0):(n.push(65533),s1(r,e,t))}const f1=Object.freeze({error:Gb,ignore:s1,replace:zb});function ol(r,e){e==null&&(e=f1.error),r=ae(r);const t=[];let n=0;for(;n>7===0){t.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?n+=e(Sr.UNEXPECTED_CONTINUE,n-1,r,t):n+=e(Sr.BAD_PREFIX,n-1,r,t);continue}if(n-1+o>=r.length){n+=e(Sr.OVERRUN,n-1,r,t);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111){n+=e(Sr.OUT_OF_RANGE,n-1-o,r,t,s);continue}if(s>=55296&&s<=57343){n+=e(Sr.UTF16_SURROGATE,n-1-o,r,t,s);continue}if(s<=a){n+=e(Sr.OVERLONG,n-1-o,r,t,s);continue}t.push(s)}}return t}function Jt(r,e=Tn.current){e!=Tn.current&&(a1.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const o=r.charCodeAt(n);if(n>=r.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((i&1023)<<10)+(o&1023);t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return ae(t)}function Os(r){const e="0000"+r.toString(16);return"\\u"+e.substring(e.length-4)}function jb(r,e){return'"'+ol(r,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Os(t):(t-=65536,Os((t>>10&1023)+55296)+Os((t&1023)+56320))}).join("")+'"'}function ic(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function mi(r,e){return ic(ol(r,e))}function La(r,e=Tn.current){return ol(Jt(r,e))}function Xb(r){const e=Jt(r);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return se(Et([e,o1]).slice(0,32))}function qb(r){const e=ae(r);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return mi(e.slice(0,t))}function Vb(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let o=i.split(":");t+=parseInt(o[0],16),n[t]=e(o[1])}),n}function c1(r){let e=0;return r.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function sl(r,e){let t=0;for(let n=0;n=t&&r<=t+i.h&&(r-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(r-t)!==-1)continue;return i}}return null}const Kb=c1("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Qb="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),Wb=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Yb=al("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Zb=al("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),$b=al("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Vb),eg=c1("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function tg(r){return r.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function rg(r){return!!sl(r,Kb)}function ng(r){let e=sl(r,Wb);if(e)return[r+e.s];let t=Yb[r];if(t)return t;let n=Zb[r];if(n)return[r+n[0]];let i=$b[r];return i||null}function ig(r){return!!sl(r,eg)}function og(r){if(r.match(/^[a-z0-9-]*$/i)&&r.length<=59)return r.toLowerCase();let e=La(r);e=tg(e.map(n=>{if(Qb.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=ng(n);return i||[n]})),e=La(ic(e),Tn.NFKC),e.forEach(n=>{if(ig(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(rg(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ic(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}const ag=Object.freeze(Object.defineProperty({__proto__:null,_toEscapedUtf8String:jb,toUtf8Bytes:Jt,toUtf8CodePoints:La,toUtf8String:mi,Utf8ErrorFuncs:f1,get Utf8ErrorReason(){return Sr},get UnicodeNormalizationForm(){return Tn},formatBytes32String:Xb,parseBytes32String:qb,nameprep:og},Symbol.toStringTag,{value:"Module"}));class sg extends n1{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Jt(t))}decode(e){return mi(super.decode(e))}}class Yo extends $n{constructor(e,t){let n=!1;const i=[];e.forEach(a=>{a.dynamic&&(n=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,t,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const t=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||t[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,t){return t1(e,this.coders,t)}decode(e){return e.coerce(this.name,r1(e,this.coders))}}const Zo=new q(Io),fg=new RegExp(/^bytes([0-9]*)$/),cg=new RegExp(/^(u?int)([0-9]*)$/);class l1{constructor(e){le(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new kb(e.name);case"bool":return new Nb(e.name);case"string":return new sg(e.name);case"bytes":return new Fb(e.name);case"array":return new Rb(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Yo((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Ib(e.name)}let t=e.type.match(cg);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&Zo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Jb(n/8,t[1]==="int",e.name)}if(t=e.type.match(fg),t){let n=parseInt(t[1]);return(n===0||n>32)&&Zo.throwArgumentError("invalid bytes length","param",e),new Tb(n,e.name)}return Zo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Oa(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new nc(this._getWordSize())}getDefaultValue(e){const t=e.map(i=>this._getCoder(Gt.from(i)));return new Yo(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&Zo.throwError("types/values length mismatch",q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const n=e.map(a=>this._getCoder(Gt.from(a))),i=new Yo(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}decode(e,t,n){const i=e.map(a=>this._getCoder(Gt.from(a)));return new Yo(i,"_").decode(this._getReader(ae(t),n))}}const u1=new l1;function si(r){return gt(Jt(r))}const h1="hash/5.7.0";function fl(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(s)?i(s,a-1):t.push(s)})};return i(r,e),t}function ug(r){const e={};for(let t=0;t>--u&1}const b=31,m=Math.pow(2,b),A=m>>>1,_=A>>1,S=m-1;let C=0;for(let I=0;I1;){let H=D+O>>>1;I>>1|h(),J=J<<1^A,X=(X^A)<<1|A|1;B=J,P=1+X-J}let R=n-4;return M.map(I=>{switch(I-R){case 3:return R+65792+(r[s++]<<16|r[s++]<<8|r[s++]);case 2:return R+256+(r[s++]<<8|r[s++]);case 1:return R+r[s++];default:return I-1}})}function dg(r){let e=0;return()=>r[e++]}function pg(r){return dg(hg(r))}function xg(r){return r&1?~r>>1:r>>1}function bg(r,e){let t=Array(r);for(let n=0;ne[a]):t}function mg(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(vg(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(wg(t,r))}return ug(d1(e))}function yg(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function p1(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[a].push(o));return n}function vg(r,e){let t=1+e(),n=e(),i=yg(e),o=p1(i.length,1+r,e);return d1(o.map((a,s)=>{const u=a[0],l=a.slice(1);return Array(i[s]).fill(void 0).map((h,b)=>{let m=b*n;return[u+b*t,l.map(A=>A+m)]})}))}function wg(r,e){let t=1+e();return p1(t,1+r,e).map(i=>[i[0],i.slice(1)])}function Ag(r){let e=Ua(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=Ua(r,e);if(l.length==0)break;n.push({set:new Set(l),node:t()})}n.sort((l,h)=>h.set.size-l.set.size);let i=r(),o=i%3;i=i/3|0;let a=!!(i&1);i>>=1;let s=i==1,u=i==2;return{branches:n,valid:o,fe0f:a,save:s,check:u}}}function Eg(){return pg(fl("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const as=Eg(),_g=new Set(Ua(as)),Cg=new Set(Ua(as)),Sg=mg(as),Bg=Ag(as),gu=45,mu=95;function x1(r){return La(r)}function Mg(r){return r.filter(e=>e!=65039)}function b1(r){for(let e of r.split(".")){let t=x1(e);try{for(let n=t.lastIndexOf(mu)-1;n>=0;n--)if(t[n]!==mu)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===gu&&t[3]===gu)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return r}function kg(r){return b1(Pg(r,Mg))}function Pg(r,e){let t=x1(r).reverse(),n=[];for(;t.length;){let i=Ng(t);if(i){n.push(...e(i));continue}let o=t.pop();if(_g.has(o)){n.push(o);continue}if(Cg.has(o))continue;let a=Sg[o];if(a){n.push(...a);continue}throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`)}return b1(Rg(String.fromCodePoint(...n)))}function Rg(r){return r.normalize("NFC")}function Ng(r,e){var t;let n=Bg,i,o,a=[],s=r.length;for(e&&(e.length=0);s;){let u=r[--s];if(n=(t=n.branches.find(l=>l.set.has(u)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)o=u;else if(n.check&&u===o)break;a.push(u),n.fe0f&&(a.push(65039),s>0&&r[s-1]==65039&&s--),n.valid&&(i=a.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...r.slice(s).reverse()),r.length=s)}return i}const Fg=new q(h1),g1=new Uint8Array(32);g1.fill(0);function yu(r){if(r.length===0)throw new Error("invalid ENS name; empty component");return r}function ss(r){const e=Jt(kg(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(yu(e.slice(n))),t}function Tg(r){return ss(r).map(e=>mi(e)).join(".")}function Ig(r){try{return ss(r).length!==0}catch{}return!1}function ao(r){typeof r!="string"&&Fg.throwArgumentError("invalid ENS name; not a string","name",r);let e=g1;const t=ss(r);for(;t.length;)e=gt(Et([e,gt(t.pop())]));return se(e)}function m1(r){return se(Et(ss(r).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}const y1=`Ethereum Signed Message: -`;function ll(r){return typeof r=="string"&&(r=Jt(r)),gt(Et([Jt(y1),Jt(String(r.length)),r]))}var Dg=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const kt=new q(h1),v1=new Uint8Array(32);v1.fill(0);const Og=fe.from(-1),w1=fe.from(0),A1=fe.from(1),Lg=fe.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ug(r){const e=ae(r),t=e.length%32;return t?gr([e,v1.slice(t)]):se(e)}const Jg=yt(A1.toHexString(),32),Hg=yt(w1.toHexString(),32),vu={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ls=["name","version","chainId","verifyingContract","salt"];function wu(r){return function(e){return typeof e!="string"&&kt.throwArgumentError(`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const Gg={name:wu("name"),version:wu("version"),chainId:function(r){try{return fe.from(r).toString()}catch{}return kt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",r)},verifyingContract:function(r){try{return _t(r).toLowerCase()}catch{}return kt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){try{const e=ae(r);if(e.length!==32)throw new Error("bad length");return se(e)}catch{}return kt.throwArgumentError('invalid domain value "salt"',"domain.salt",r)}};function Us(r){{const e=r.match(/^(u?)int(\d*)$/);if(e){const t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&kt.throwArgumentError("invalid numeric width","type",r);const i=Lg.mask(t?n-1:n),o=t?i.add(A1).mul(Og):w1;return function(a){const s=fe.from(a);return(s.lt(o)||s.gt(i))&&kt.throwArgumentError(`value out-of-bounds for ${r}`,"value",a),yt(s.toTwos(256).toHexString(),32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&kt.throwArgumentError("invalid bytes width","type",r),function(n){return ae(n).length!==t&&kt.throwArgumentError(`invalid length for ${r}`,"value",n),Ug(n)}}}switch(r){case"address":return function(e){return yt(_t(e),32)};case"bool":return function(e){return e?Jg:Hg};case"bytes":return function(e){return gt(e)};case"string":return function(e){return si(e)}}return null}function Au(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}class sr{constructor(e){le(this,"types",Object.freeze(w0(e))),le(this,"_encoderCache",{}),le(this,"_types",{});const t={},n={},i={};Object.keys(e).forEach(s=>{t[s]={},n[s]=[],i[s]={}});for(const s in e){const u={};e[s].forEach(l=>{u[l.name]&&kt.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(s)}`,"types",e),u[l.name]=!0;const h=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];h===s&&kt.throwArgumentError(`circular type reference to ${JSON.stringify(h)}`,"types",e),!Us(h)&&(n[h]||kt.throwArgumentError(`unknown type ${JSON.stringify(h)}`,"types",e),n[h].push(s),t[s][h]=!0)})}const o=Object.keys(n).filter(s=>n[s].length===0);o.length===0?kt.throwArgumentError("missing primary type","types",e):o.length>1&&kt.throwArgumentError(`ambiguous primary types or unused types: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),le(this,"primaryType",o[0]);function a(s,u){u[s]&&kt.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),u[s]=!0,Object.keys(t[s]).forEach(l=>{!n[l]||(a(l,u),Object.keys(u).forEach(h=>{i[h][l]=!0}))}),delete u[s]}a(this.primaryType,{});for(const s in i){const u=Object.keys(i[s]);u.sort(),this._types[s]=Au(s,e[s])+u.map(l=>Au(l,e[l])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const i=Us(e);if(i)return i}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const i=t[1],o=this.getEncoder(i),a=parseInt(t[3]);return s=>{a>=0&&s.length!==a&&kt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",s);let u=s.map(o);return this._types[i]&&(u=u.map(gt)),gt(gr(u))}}const n=this.types[e];if(n){const i=si(this._types[e]);return o=>{const a=n.map(({name:s,type:u})=>{const l=this.getEncoder(u)(o[s]);return this._types[u]?gt(l):l});return a.unshift(i),gr(a)}}return kt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||kt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gt(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Us(e))return n(e,t);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const a=i[1],s=parseInt(i[3]);return s>=0&&t.length!==s&&kt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(u=>this._visit(a,u,n))}const o=this.types[e];return o?o.reduce((a,{name:s,type:u})=>(a[s]=this._visit(u,t[s],n),a),{}):kt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new sr(e)}static getPrimaryType(e){return sr.from(e).primaryType}static hashStruct(e,t,n){return sr.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){const i=vu[n];i||kt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Ls.indexOf(n.name)-Ls.indexOf(i.name)),sr.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return gr(["0x1901",sr.hashDomain(e),sr.from(t).hash(n)])}static hash(e,t,n){return gt(sr.encode(e,t,n))}static resolveNames(e,t,n,i){return Dg(this,void 0,void 0,function*(){e=vr(e);const o={};e.verifyingContract&&!lt(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const a=sr.from(t);a.visit(n,(s,u)=>(s==="address"&&!lt(u,20)&&(o[u]="0x"),u));for(const s in o)o[s]=yield i(s);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=a.visit(n,(s,u)=>s==="address"&&o[u]?o[u]:u),{domain:e,value:n}})}static getPayload(e,t,n){sr.hashDomain(e);const i={},o=[];Ls.forEach(u=>{const l=e[u];l!=null&&(i[u]=Gg[u](l),o.push({name:u,type:vu[u]}))});const a=sr.from(t),s=vr(t);return s.EIP712Domain?kt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(u,l)=>{if(u.match(/^bytes(\d*)/))return se(ae(l));if(u.match(/^u?int/))return fe.from(l).toString();switch(u){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&kt.throwArgumentError("invalid string","value",l),l}return kt.throwArgumentError("unsupported type","type",u)})}}}const zg=Object.freeze(Object.defineProperty({__proto__:null,id:si,dnsEncode:m1,namehash:ao,isValidName:Ig,ensNormalize:Tg,messagePrefix:y1,hashMessage:ll,_TypedDataEncoder:sr},Symbol.toStringTag,{value:"Module"})),Bt=new q(Io);class E1 extends gi{}class _1 extends gi{}class jg extends gi{}class oc extends gi{static isIndexed(e){return!!(e&&e._isIndexed)}}const Xg={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Eu(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);return t.error=e,t}class qg{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,le(this,"fragments",t.map(n=>En.from(n)).filter(n=>n!=null)),le(this,"_abiCoder",An(new.target,"getAbiCoder")()),le(this,"functions",{}),le(this,"errors",{}),le(this,"events",{}),le(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Bt.warn("duplicate definition - constructor");return}le(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){Bt.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||le(this,"deploy",nn.from({payable:!1,type:"constructor"})),le(this,"_isInterface",!0)}format(e){e||(e=ct.full),e===ct.sighash&&Bt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(n=>n.format(e));return e===ct.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return u1}static getAddress(e){return _t(e)}static getSighash(e){return Ot(si(e.format()),0,4)}static getEventTopic(e){return si(e.format())}getFunction(e){if(lt(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Bt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching function","name",n):i.length>1&&Bt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const t=this.functions[on.fromString(e).format()];return t||Bt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(lt(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Bt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching event","name",n):i.length>1&&Bt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const t=this.events[gn.fromString(e).format()];return t||Bt.throwArgumentError("no matching event","signature",e),t}getError(e){if(lt(e)){const n=An(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}Bt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching error","name",n):i.length>1&&Bt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const t=this.errors[on.fromString(e).format()];return t||Bt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return An(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),An(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));const n=ae(t);return se(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",se(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),se(Et([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));const n=ae(t);return se(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",se(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),se(Et([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=ae(t),i=null,o="",a=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=se(n.slice(0,4)),h=Xg[l];if(h)a=this._abiCoder.decode(h.inputs,n.slice(4)),s=h.name,u=h.signature,h.reason&&(i=a[0]),s==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:s==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const b=this.getError(l);a=this._abiCoder.decode(b.inputs,n.slice(4)),s=b.name,u=b.format()}catch{}break}}return Bt.throwError("call revert exception"+o,q.errors.CALL_EXCEPTION,{method:e.format(),data:se(t),errorArgs:a,errorName:s,errorSignature:u,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),se(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Bt.throwError("too many arguments for "+e.format(),q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,a)=>o.type==="string"?si(a):o.type==="bytes"?gt(se(a)):(o.type==="bool"&&typeof a=="boolean"&&(a=a?"0x01":"0x00"),o.type.match(/^u?int/)&&(a=fe.from(a).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[a]),yt(se(a),32));for(t.forEach((o,a)=>{let s=e.inputs[a];if(!s.indexed){o!=null&&Bt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,o);return}o==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?Bt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,o):Array.isArray(o)?n.push(o.map(u=>i(s,u))):n.push(i(s,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Bt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((a,s)=>{const u=t[s];if(a.indexed)if(a.type==="string")n.push(si(u));else if(a.type==="bytes")n.push(gt(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([a.type],[u]))}else i.push(a),o.push(u)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!lt(n[0],32)||n[0].toLowerCase()!==m)&&Bt.throwError("fragment/topic mismatch",q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],a=[];e.inputs.forEach((m,A)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(Gt.fromObject({type:"bytes32",name:m.name})),a.push(!0)):(i.push(m),a.push(!1)):(o.push(m),a.push(!1))});let s=n!=null?this._abiCoder.decode(i,Et(n)):null,u=this._abiCoder.decode(o,t,!0),l=[],h=0,b=0;e.inputs.forEach((m,A)=>{if(m.indexed)if(s==null)l[A]=new oc({_isIndexed:!0,hash:null});else if(a[A])l[A]=new oc({_isIndexed:!0,hash:s[b++]});else try{l[A]=s[b++]}catch(_){l[A]=_}else try{l[A]=u[h++]}catch(_){l[A]=_}if(m.name&&l[m.name]==null){const _=l[A];_ instanceof Error?Object.defineProperty(l,m.name,{enumerable:!0,get:()=>{throw Eu(`property ${JSON.stringify(m.name)}`,_)}}):l[m.name]=_}});for(let m=0;m{throw Eu(`index ${m}`,A)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new _1({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:fe.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new E1({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=se(e);let n=this.getError(t.substring(0,10).toLowerCase());return n?new jg({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Vg=Object.freeze(Object.defineProperty({__proto__:null,ConstructorFragment:nn,ErrorFragment:zn,EventFragment:gn,Fragment:En,FunctionFragment:on,ParamType:Gt,FormatTypes:ct,AbiCoder:l1,defaultAbiCoder:u1,Interface:qg,Indexed:oc,checkResultErrors:gb,LogDescription:E1,TransactionDescription:_1},Symbol.toStringTag,{value:"Module"})),Kg=It(Vg),Qg=It(Mb),Wg=It(lg);class ul{constructor(e){le(this,"alphabet",e),le(this,"base",e.length),le(this,"_alphabetMap",{}),le(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(a%this.base),a=a/this.base|0}let i="";for(let o=0;t[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;o>0;)t.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function nm(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=o&63|128):rm(r,i)?(o=65536+((o&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}nt.htonl=k1;function om(r,e){for(var t="",n=0;n>>0}return o}nt.join32=am;function sm(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=o>>>16&255,t[i+2]=o>>>8&255,t[i+3]=o&255):(t[i+3]=o>>>24,t[i+2]=o>>>16&255,t[i+1]=o>>>8&255,t[i]=o&255)}return t}nt.split32=sm;function fm(r,e){return r>>>e|r<<32-e}nt.rotr32=fm;function cm(r,e){return r<>>32-e}nt.rotl32=cm;function lm(r,e){return r+e>>>0}nt.sum32=lm;function um(r,e,t){return r+e+t>>>0}nt.sum32_3=um;function hm(r,e,t,n){return r+e+t+n>>>0}nt.sum32_4=hm;function dm(r,e,t,n,i){return r+e+t+n+i>>>0}nt.sum32_5=dm;function pm(r,e,t,n){var i=r[e],o=r[e+1],a=n+o>>>0,s=(a>>0,r[e+1]=a}nt.sum64=pm;function xm(r,e,t,n){var i=e+n>>>0,o=(i>>0}nt.sum64_hi=xm;function bm(r,e,t,n){var i=e+n;return i>>>0}nt.sum64_lo=bm;function gm(r,e,t,n,i,o,a,s){var u=0,l=e;l=l+n>>>0,u+=l>>0,u+=l>>0,u+=l>>0}nt.sum64_4_hi=gm;function mm(r,e,t,n,i,o,a,s){var u=e+n+o+s;return u>>>0}nt.sum64_4_lo=mm;function ym(r,e,t,n,i,o,a,s,u,l){var h=0,b=e;b=b+n>>>0,h+=b>>0,h+=b>>0,h+=b>>0,h+=b>>0}nt.sum64_5_hi=ym;function vm(r,e,t,n,i,o,a,s,u,l){var h=e+n+o+s+l;return h>>>0}nt.sum64_5_lo=vm;function wm(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}nt.rotr64_hi=wm;function Am(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}nt.rotr64_lo=Am;function Em(r,e,t){return r>>>t}nt.shr64_hi=Em;function _m(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}nt.shr64_lo=_m;var I0={},_u=nt,Cm=Do;function fs(){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}I0.BlockHash=fs;fs.prototype.update=function(e,t){if(e=_u.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=_u.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,a=8;a>>3}Ln.g0_256=Pm;function Rm(r){return Sn(r,17)^Sn(r,19)^r>>>10}Ln.g1_256=Rm;var E0=nt,Nm=I0,Fm=Ln,Js=E0.rotl32,j0=E0.sum32,Tm=E0.sum32_5,Im=Fm.ft_1,I1=Nm.BlockHash,Dm=[1518500249,1859775393,2400959708,3395469782];function In(){if(!(this instanceof In))return new In;I1.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}E0.inherits(In,I1);var Om=In;In.blockSize=512;In.outSize=160;In.hmacStrength=80;In.padLength=64;In.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),_6(e.length<=this.blockSize);for(var t=e.length;t>24&255,u[e.length+1]=b>>16&255,u[e.length+2]=b>>8&255,u[e.length+3]=b&255;let m=ae(vo(i,r,u));o||(o=m.length,h=new Uint8Array(o),a=Math.ceil(n/o),l=n-(a-1)*o),h.set(m);for(let S=1;S>8,m=h&255;b?u.push(b,m):u.push(m)}return u}t.toArray=n;function i(a){return a.length===1?"0"+a:a}t.zero2=i;function o(a){for(var s="",u=0;u(m>>1)-1?S=(m>>1)-C:S=C,A.isubn(S)):S=0,b[_]=S,A.iushrn(1)}return b}t.getNAF=n;function i(u,l){var h=[[],[]];u=u.clone(),l=l.clone();for(var b=0,m=0,A;u.cmpn(-b)>0||l.cmpn(-m)>0;){var _=u.andln(3)+b&3,S=l.andln(3)+m&3;_===3&&(_=-1),S===3&&(S=-1);var C;(_&1)===0?C=0:(A=u.andln(7)+b&7,(A===3||A===5)&&S===2?C=-_:C=_),h[0].push(C);var M;(S&1)===0?M=0:(A=l.andln(7)+m&7,(A===3||A===5)&&_===2?M=-S:M=S),h[1].push(M),2*b===C+1&&(b=1-b),2*m===M+1&&(m=1-m),u.iushrn(1),l.iushrn(1)}return h}t.getJSF=i;function o(u,l,h){var b="_"+l;u.prototype[l]=function(){return this[b]!==void 0?this[b]:this[b]=h.call(this)}}t.cachedProperty=o;function a(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=a;function s(u){return new Ze(u,"hex","le")}t.intFromLE=s}),Ja=Ur.getNAF,R6=Ur.getJSF,Ha=Ur.assert;function yi(r,e){this.type=r,this.p=new Ze(e.p,16),this.red=e.prime?Ze.red(e.prime):Ze.mont(this.p),this.zero=new Ze(0).toRed(this.red),this.one=new Ze(1).toRed(this.red),this.two=new Ze(2).toRed(this.red),this.n=e.n&&new Ze(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var $i=yi;yi.prototype.point=function(){throw new Error("Not implemented")};yi.prototype.validate=function(){throw new Error("Not implemented")};yi.prototype._fixedNafMul=function(e,t){Ha(e.precomputed);var n=e._getDoubles(),i=Ja(t,1,this._bitLength),o=(1<=s;l--)u=(u<<1)+i[l];a.push(u)}for(var h=this.jpoint(null,null,null),b=this.jpoint(null,null,null),m=o;m>0;m--){for(s=0;s=0;u--){for(var l=0;u>=0&&a[u]===0;u--)l++;if(u>=0&&l++,s=s.dblp(l),u<0)break;var h=a[u];Ha(h!==0),e.type==="affine"?h>0?s=s.mixedAdd(o[h-1>>1]):s=s.mixedAdd(o[-h-1>>1].neg()):h>0?s=s.add(o[h-1>>1]):s=s.add(o[-h-1>>1].neg())}return e.type==="affine"?s.toP():s};yi.prototype._wnafMulAdd=function(e,t,n,i,o){var a=this._wnafT1,s=this._wnafT2,u=this._wnafT3,l=0,h,b,m;for(h=0;h=1;h-=2){var _=h-1,S=h;if(a[_]!==1||a[S]!==1){u[_]=Ja(n[_],a[_],this._bitLength),u[S]=Ja(n[S],a[S],this._bitLength),l=Math.max(u[_].length,l),l=Math.max(u[S].length,l);continue}var C=[t[_],null,null,t[S]];t[_].y.cmp(t[S].y)===0?(C[1]=t[_].add(t[S]),C[2]=t[_].toJ().mixedAdd(t[S].neg())):t[_].y.cmp(t[S].y.redNeg())===0?(C[1]=t[_].toJ().mixedAdd(t[S]),C[2]=t[_].add(t[S].neg())):(C[1]=t[_].toJ().mixedAdd(t[S]),C[2]=t[_].toJ().mixedAdd(t[S].neg()));var M=[-3,-1,-5,-7,0,7,5,1,3],B=R6(n[_],n[S]);for(l=Math.max(B[0].length,l),u[_]=new Array(l),u[S]=new Array(l),b=0;b=0;h--){for(var O=0;h>=0;){var J=!0;for(b=0;b=0&&O++,I=I.dblp(O),h<0)break;for(b=0;b0?m=s[b][X-1>>1]:X<0&&(m=s[b][-X-1>>1].neg()),m.type==="affine"?I=I.mixedAdd(m):I=I.add(m))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step):!1};Qr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(A=l,_=h),b.negative&&(b=b.neg(),m=m.neg()),A.negative&&(A=A.neg(),_=_.neg()),[{a:b,b:m},{a:A,b:_}]};Wr.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),u=a.mul(i.a),l=o.mul(n.b),h=a.mul(i.b),b=e.sub(s).sub(u),m=l.add(h).neg();return{k1:b,k2:m}};Wr.prototype.pointFromX=function(e,t){e=new Ze(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)};Wr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Wr.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,a=0;a":""};Yt.prototype.isInfinity=function(){return this.inf};Yt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Yt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),a=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};Yt.prototype.getX=function(){return this.x.fromRed()};Yt.prototype.getY=function(){return this.y.fromRed()};Yt.prototype.mul=function(e){return e=new Ze(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Yt.prototype.mulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};Yt.prototype.jmulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};Yt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Yt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Yt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function fr(r,e,t,n){$i.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ze(0)):(this.x=new Ze(e,16),this.y=new Ze(t,16),this.z=new Ze(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}pl(fr,$i.BasePoint);Wr.prototype.jpoint=function(e,t,n){return new fr(this,e,t,n)};fr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};fr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};fr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),u=i.redSub(o),l=a.redSub(s);if(u.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var h=u.redSqr(),b=h.redMul(u),m=i.redMul(h),A=l.redSqr().redIAdd(b).redISub(m).redISub(m),_=l.redMul(m.redISub(A)).redISub(a.redMul(b)),S=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(A,_,S)};fr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,a=e.y.redMul(t).redMul(this.z),s=n.redSub(i),u=o.redSub(a);if(s.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),h=l.redMul(s),b=n.redMul(l),m=u.redSqr().redIAdd(h).redISub(b).redISub(b),A=u.redMul(b.redISub(m)).redISub(o.redMul(h)),_=this.z.redMul(s);return this.curve.jpoint(m,A,_)};fr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};fr.prototype.inspect=function(){return this.isInfinity()?"":""};fr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ba=L0(function(r,e){var t=e;t.base=$i,t.short=F6,t.mont=null,t.edwards=null}),ga=L0(function(r,e){var t=e,n=Ur.assert;function i(s){s.type==="short"?this.curve=new ba.short(s):s.type==="edwards"?this.curve=new ba.edwards(s):this.curve=new ba.mont(s),this.g=this.curve.g,this.n=this.curve.n,this.hash=s.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function o(s,u){Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:function(){var l=new i(u);return Object.defineProperty(t,s,{configurable:!0,enumerable:!0,value:l}),l}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Cr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Cr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Cr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Cr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Cr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var a;try{a=null.crash()}catch{a=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Cr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})});function pi(r){if(!(this instanceof pi))return new pi(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=an.toArray(r.entropy,r.entropyEnc||"hex"),t=an.toArray(r.nonce,r.nonceEnc||"hex"),n=an.toArray(r.pers,r.persEnc||"hex");dl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var K1=pi;pi.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};pi.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=an.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var T6=Ur.assert;function cs(r,e){if(r instanceof cs)return r;this._importDER(r,e)||(T6(r.r&&r.s,"Signature without r or s"),this.r=new Ze(r.r,16),this.s=new Ze(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var ls=cs;function I6(){this.place=0}function zs(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,o=0,a=e.place;o>>=0;return i<=127?!1:(e.place=a,i)}function Mu(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}cs.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Mu(t),n=Mu(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];js(i,t.length),i=i.concat(t),i.push(2),js(i,n.length);var o=i.concat(n),a=[48];return js(a,o.length),a=a.concat(o),Ur.encode(a,e)};var D6=function(){throw new Error("unsupported")},Q1=Ur.assert;function Vr(r){if(!(this instanceof Vr))return new Vr(r);typeof r=="string"&&(Q1(Object.prototype.hasOwnProperty.call(ga,r),"Unknown curve "+r),r=ga[r]),r instanceof ga.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var O6=Vr;Vr.prototype.keyPair=function(e){return new xl(this,e)};Vr.prototype.keyFromPrivate=function(e,t){return xl.fromPrivate(this,e,t)};Vr.prototype.keyFromPublic=function(e,t){return xl.fromPublic(this,e,t)};Vr.prototype.genKeyPair=function(e){e||(e={});for(var t=new K1({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||D6(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Ze(2));;){var o=new Ze(t.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Vr.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};Vr.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new Ze(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new K1({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new Ze(1)),h=0;;h++){var b=i.k?i.k(h):new Ze(u.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(l)>=0)){var m=this.g.mul(b);if(!m.isInfinity()){var A=m.getX(),_=A.umod(this.n);if(_.cmpn(0)!==0){var S=b.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var C=(m.getY().isOdd()?1:0)|(A.cmp(_)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),C^=1),new ls({r:_,s:S,recoveryParam:C})}}}}}};Vr.prototype.verify=function(e,t,n,i){e=this._truncateToN(new Ze(e,16)),n=this.keyFromPublic(n,i),t=new ls(t,"hex");var o=t.r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),u=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n),h;return this.curve._maxwellTrick?(h=this.g.jmulAdd(u,n.getPublic(),l),h.isInfinity()?!1:h.eqXToP(o)):(h=this.g.mulAdd(u,n.getPublic(),l),h.isInfinity()?!1:h.getX().umod(this.n).cmp(o)===0)};Vr.prototype.recoverPubKey=function(r,e,t,n){Q1((3&t)===t,"The recovery param is more than two bits"),e=new ls(e,n);var i=this.n,o=new Ze(r),a=e.r,s=e.s,u=t&1,l=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?a=this.curve.pointFromX(a.add(this.curve.n),u):a=this.curve.pointFromX(a,u);var h=e.r.invm(i),b=i.sub(o).mul(h).umod(i),m=s.mul(h).umod(i);return this.g.mulAdd(b,a,m)};Vr.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new ls(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(r,e,i)}catch{continue}if(o.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var L6=L0(function(r,e){var t=e;t.version="6.5.4",t.utils=Ur,t.rand=function(){throw new Error("unsupported")},t.curve=ba,t.curves=ga,t.ec=O6,t.eddsa=null}),U6=L6.ec;const J6="signing-key/5.7.0",lc=new q(J6);let Xs=null;function bn(){return Xs||(Xs=new U6("secp256k1")),Xs}class Ui{constructor(e){le(this,"curve","secp256k1"),le(this,"privateKey",se(e)),Fn(this.privateKey)!==32&&lc.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=bn().keyFromPrivate(ae(this.privateKey));le(this,"publicKey","0x"+t.getPublic(!1,"hex")),le(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),le(this,"_isSigningKey",!0)}_addPoint(e){const t=bn().keyFromPublic(ae(this.publicKey)),n=bn().keyFromPublic(ae(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=bn().keyFromPrivate(ae(this.privateKey)),n=ae(e);n.length!==32&&lc.throwArgumentError("bad digest length","digest",e);const i=t.sign(n,{canonical:!0});return Zi({recoveryParam:i.recoveryParam,r:yt("0x"+i.r.toString(16),32),s:yt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=bn().keyFromPrivate(ae(this.privateKey)),n=bn().keyFromPublic(ae(bl(e)));return yt("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function W1(r,e){const t=Zi(e),n={r:ae(t.r),s:ae(t.s)};return"0x"+bn().recoverPubKey(ae(r),n,t.recoveryParam).encode("hex",!1)}function bl(r,e){const t=ae(r);if(t.length===32){const n=new Ui(t);return e?"0x"+bn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?se(t):"0x"+bn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+bn().keyFromPublic(t).getPublic(!0,"hex"):se(t)}return lc.throwArgumentError("invalid public or private key","key","[REDACTED]")}const H6=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:Ui,recoverPublicKey:W1,computePublicKey:bl},Symbol.toStringTag,{value:"Module"})),G6="transactions/5.7.0",hr=new q(G6);var uc;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(uc||(uc={}));function gl(r){return r==="0x"?null:_t(r)}function ur(r){return r==="0x"?i1:fe.from(r)}const z6=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],j6={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ui(r){const e=bl(r);return _t(Ot(gt(Ot(e,1)),12))}function Oo(r,e){return ui(W1(ae(r),e))}function Nr(r,e){const t=Cn(fe.from(r).toHexString());return t.length>32&&hr.throwArgumentError("invalid length for "+e,"transaction:"+e,r),t}function qs(r,e){return{address:_t(r),storageKeys:(e||[]).map((t,n)=>(Fn(t)!==32&&hr.throwArgumentError("invalid access list storageKey",`accessList[${r}:${n}]`,t),t.toLowerCase()))}}function U0(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(t.length>2&&hr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),qs(t[0],t[1])):qs(t.address,t.storageKeys));const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,o)=>(i[o]=!0,i),{});return qs(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Y1(r){return U0(r).map(e=>[e.address,e.storageKeys])}function Z1(r,e){if(r.gasPrice!=null){const n=fe.from(r.gasPrice),i=fe.from(r.maxFeePerGas||0);n.eq(i)||hr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const t=[Nr(r.chainId||0,"chainId"),Nr(r.nonce||0,"nonce"),Nr(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nr(r.maxFeePerGas||0,"maxFeePerGas"),Nr(r.gasLimit||0,"gasLimit"),r.to!=null?_t(r.to):"0x",Nr(r.value||0,"value"),r.data||"0x",Y1(r.accessList||[])];if(e){const n=Zi(e);t.push(Nr(n.recoveryParam,"recoveryParam")),t.push(Cn(n.r)),t.push(Cn(n.s))}return gr(["0x02",qi(t)])}function $1(r,e){const t=[Nr(r.chainId||0,"chainId"),Nr(r.nonce||0,"nonce"),Nr(r.gasPrice||0,"gasPrice"),Nr(r.gasLimit||0,"gasLimit"),r.to!=null?_t(r.to):"0x",Nr(r.value||0,"value"),r.data||"0x",Y1(r.accessList||[])];if(e){const n=Zi(e);t.push(Nr(n.recoveryParam,"recoveryParam")),t.push(Cn(n.r)),t.push(Cn(n.s))}return gr(["0x01",qi(t)])}function X6(r,e){rl(r,j6);const t=[];z6.forEach(function(a){let s=r[a.name]||[];const u={};a.numeric&&(u.hexPad="left"),s=ae(se(s,u)),a.length&&s.length!==a.length&&s.length>0&&hr.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,s),a.maxLength&&(s=Cn(s),s.length>a.maxLength&&hr.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,s)),t.push(se(s))});let n=0;if(r.chainId!=null?(n=r.chainId,typeof n!="number"&&hr.throwArgumentError("invalid transaction.chainId","transaction",r)):e&&!To(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(se(n)),t.push("0x"),t.push("0x")),!e)return qi(t);const i=Zi(e);let o=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),o+=n*2+8,i.v>28&&i.v!==o&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(se(o)),t.push(Cn(ae(i.r))),t.push(Cn(ae(i.s))),qi(t)}function hc(r,e){if(r.type==null||r.type===0)return r.accessList!=null&&hr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",r),X6(r,e);switch(r.type){case 1:return $1(r,e);case 2:return Z1(r,e)}return hr.throwError(`unsupported transaction type: ${r.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:r.type})}function ep(r,e,t){try{const n=ur(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");r.v=n}catch{hr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}r.r=yt(e[1],32),r.s=yt(e[2],32);try{const n=gt(t(r));r.from=Oo(n,{r:r.r,s:r.s,recoveryParam:r.v})}catch{}}function q6(r){const e=os(r.slice(1));e.length!==9&&e.length!==12&&hr.throwArgumentError("invalid component count for transaction type: 2","payload",se(r));const t=ur(e[2]),n=ur(e[3]),i={type:2,chainId:ur(e[0]).toNumber(),nonce:ur(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:ur(e[4]),to:gl(e[5]),value:ur(e[6]),data:e[7],accessList:U0(e[8])};return e.length===9||(i.hash=gt(r),ep(i,e.slice(9),Z1)),i}function V6(r){const e=os(r.slice(1));e.length!==8&&e.length!==11&&hr.throwArgumentError("invalid component count for transaction type: 1","payload",se(r));const t={type:1,chainId:ur(e[0]).toNumber(),nonce:ur(e[1]).toNumber(),gasPrice:ur(e[2]),gasLimit:ur(e[3]),to:gl(e[4]),value:ur(e[5]),data:e[6],accessList:U0(e[7])};return e.length===8||(t.hash=gt(r),ep(t,e.slice(8),$1)),t}function K6(r){const e=os(r);e.length!==9&&e.length!==6&&hr.throwArgumentError("invalid raw transaction","rawTransaction",r);const t={nonce:ur(e[0]).toNumber(),gasPrice:ur(e[1]),gasLimit:ur(e[2]),to:gl(e[3]),value:ur(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=fe.from(e[6]).toNumber()}catch{return t}if(t.r=yt(e[7],32),t.s=yt(e[8],32),fe.from(t.r).isZero()&&fe.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27;const i=e.slice(0,6);t.chainId!==0&&(i.push(se(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);const o=gt(qi(i));try{t.from=Oo(o,{r:se(t.r),s:se(t.s),recoveryParam:n})}catch{}t.hash=gt(r)}return t.type=null,t}function tp(r){const e=ae(r);if(e[0]>127)return K6(e);switch(e[0]){case 1:return V6(e);case 2:return q6(e)}return hr.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const Q6=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return uc},computeAddress:ui,recoverAddress:Oo,accessListify:U0,serialize:hc,parse:tp},Symbol.toStringTag,{value:"Module"})),W6="wordlists/5.7.0",Y6=new q(W6);class Lo{constructor(e){Y6.checkAbstract(new.target,Lo),le(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let n=0;n<2048;n++){const i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";t.push(i)}return si(t.join(` + */(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=Be:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],m=[1,256,65536,16777216],A=[6,1536,393216,100663296],_=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],C=[224,256,384,512],M=[128,256],B=["hex","buffer","arrayBuffer","array","digest"],P={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(d){return Object.prototype.toString.call(d)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(d){return typeof d=="object"&&d.buffer&&d.buffer.constructor===ArrayBuffer});for(var R=function(d,N,G){return function(U){return new c(d,N,d).update(U)[G]()}},I=function(d,N,G){return function(U,z){return new c(d,N,z).update(U)[G]()}},D=function(d,N,G){return function(U,z,te,K){return f["cshake"+d].update(U,z,te,K)[G]()}},O=function(d,N,G){return function(U,z,te,K){return f["kmac"+d].update(U,z,te,K)[G]()}},J=function(d,N,G,U){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}c.prototype.update=function(d){if(this.finalized)throw new Error(t);var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}for(var U=this.blocks,z=this.byteCount,te=d.length,K=this.blockCount,V=0,me=this.s,Q,oe;V>2]|=d[V]<<_[Q++&3];else for(Q=this.start;V>2]|=oe<<_[Q++&3]:oe<2048?(U[Q>>2]|=(192|oe>>6)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):oe<55296||oe>=57344?(U[Q>>2]|=(224|oe>>12)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):(oe=65536+((oe&1023)<<10|d.charCodeAt(++V)&1023),U[Q>>2]|=(240|oe>>18)<<_[Q++&3],U[Q>>2]|=(128|oe>>12&63)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]);if(this.lastByteIndex=Q,Q>=z){for(this.start=Q-z,this.block=U[K],Q=0;Q>8,G=d&255;G>0;)z.unshift(G),d=d>>8,G=d&255,++U;return N?z.push(U):z.unshift(U),this.update(z),z.length},c.prototype.encodeString=function(d){var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}var U=0,z=d.length;if(N)U=z;else for(var te=0;te=57344?U+=3:(K=65536+((K&1023)<<10|d.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(d),U},c.prototype.bytepad=function(d,N){for(var G=this.encode(N),U=0;U>2]|=this.padding[N&3],this.lastByteIndex===this.byteCount)for(d[0]=d[G],N=1;N>4&15]+l[V&15]+l[V>>12&15]+l[V>>8&15]+l[V>>20&15]+l[V>>16&15]+l[V>>28&15]+l[V>>24&15];te%d===0&&(T(N),z=0)}return U&&(V=N[z],K+=l[V>>4&15]+l[V&15],U>1&&(K+=l[V>>12&15]+l[V>>8&15]),U>2&&(K+=l[V>>20&15]+l[V>>16&15])),K},c.prototype.arrayBuffer=function(){this.finalize();var d=this.blockCount,N=this.s,G=this.outputBlocks,U=this.extraBytes,z=0,te=0,K=this.outputBits>>3,V;U?V=new ArrayBuffer(G+1<<2):V=new ArrayBuffer(K);for(var me=new Uint32Array(V);te>8&255,K[V+2]=me>>16&255,K[V+3]=me>>24&255;te%d===0&&T(N)}return U&&(V=te<<2,me=N[z],K[V]=me&255,U>1&&(K[V+1]=me>>8&255),U>2&&(K[V+2]=me>>16&255)),K};function y(d,N,G){c.call(this,d,N,G)}y.prototype=new c,y.prototype.finalize=function(){return this.encode(this.outputBits,!0),c.prototype.finalize.call(this)};var T=function(d){var N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae,xe,ft,de,Ce,St,pe,Ee,wt,W,ie,Ft,Se,Fe,zt,Me,Te,Zt,ke,Ie,jt,De,Pe,$t,Oe,Le,Xt,Ue,Je,qt,He,Re,pt,_e,Ne,er,ze,je,xr,Xe,qe,br,Ve,Ke,tr,rr,nr,ir,or;for(U=0;U<48;U+=2)z=d[0]^d[10]^d[20]^d[30]^d[40],te=d[1]^d[11]^d[21]^d[31]^d[41],K=d[2]^d[12]^d[22]^d[32]^d[42],V=d[3]^d[13]^d[23]^d[33]^d[43],me=d[4]^d[14]^d[24]^d[34]^d[44],Q=d[5]^d[15]^d[25]^d[35]^d[45],oe=d[6]^d[16]^d[26]^d[36]^d[46],xt=d[7]^d[17]^d[27]^d[37]^d[47],we=d[8]^d[18]^d[28]^d[38]^d[48],ge=d[9]^d[19]^d[29]^d[39]^d[49],N=we^(K<<1|V>>>31),G=ge^(V<<1|K>>>31),d[0]^=N,d[1]^=G,d[10]^=N,d[11]^=G,d[20]^=N,d[21]^=G,d[30]^=N,d[31]^=G,d[40]^=N,d[41]^=G,N=z^(me<<1|Q>>>31),G=te^(Q<<1|me>>>31),d[2]^=N,d[3]^=G,d[12]^=N,d[13]^=G,d[22]^=N,d[23]^=G,d[32]^=N,d[33]^=G,d[42]^=N,d[43]^=G,N=K^(oe<<1|xt>>>31),G=V^(xt<<1|oe>>>31),d[4]^=N,d[5]^=G,d[14]^=N,d[15]^=G,d[24]^=N,d[25]^=G,d[34]^=N,d[35]^=G,d[44]^=N,d[45]^=G,N=me^(we<<1|ge>>>31),G=Q^(ge<<1|we>>>31),d[6]^=N,d[7]^=G,d[16]^=N,d[17]^=G,d[26]^=N,d[27]^=G,d[36]^=N,d[37]^=G,d[46]^=N,d[47]^=G,N=oe^(z<<1|te>>>31),G=xt^(te<<1|z>>>31),d[8]^=N,d[9]^=G,d[18]^=N,d[19]^=G,d[28]^=N,d[29]^=G,d[38]^=N,d[39]^=G,d[48]^=N,d[49]^=G,Ct=d[0],Ae=d[1],Re=d[11]<<4|d[10]>>>28,pt=d[10]<<4|d[11]>>>28,Fe=d[20]<<3|d[21]>>>29,zt=d[21]<<3|d[20]>>>29,rr=d[31]<<9|d[30]>>>23,nr=d[30]<<9|d[31]>>>23,Ue=d[40]<<18|d[41]>>>14,Je=d[41]<<18|d[40]>>>14,Ie=d[2]<<1|d[3]>>>31,jt=d[3]<<1|d[2]>>>31,xe=d[13]<<12|d[12]>>>20,ft=d[12]<<12|d[13]>>>20,_e=d[22]<<10|d[23]>>>22,Ne=d[23]<<10|d[22]>>>22,Me=d[33]<<13|d[32]>>>19,Te=d[32]<<13|d[33]>>>19,ir=d[42]<<2|d[43]>>>30,or=d[43]<<2|d[42]>>>30,Xe=d[5]<<30|d[4]>>>2,qe=d[4]<<30|d[5]>>>2,De=d[14]<<6|d[15]>>>26,Pe=d[15]<<6|d[14]>>>26,de=d[25]<<11|d[24]>>>21,Ce=d[24]<<11|d[25]>>>21,er=d[34]<<15|d[35]>>>17,ze=d[35]<<15|d[34]>>>17,Zt=d[45]<<29|d[44]>>>3,ke=d[44]<<29|d[45]>>>3,W=d[6]<<28|d[7]>>>4,ie=d[7]<<28|d[6]>>>4,br=d[17]<<23|d[16]>>>9,Ve=d[16]<<23|d[17]>>>9,$t=d[26]<<25|d[27]>>>7,Oe=d[27]<<25|d[26]>>>7,St=d[36]<<21|d[37]>>>11,pe=d[37]<<21|d[36]>>>11,je=d[47]<<24|d[46]>>>8,xr=d[46]<<24|d[47]>>>8,qt=d[8]<<27|d[9]>>>5,He=d[9]<<27|d[8]>>>5,Ft=d[18]<<20|d[19]>>>12,Se=d[19]<<20|d[18]>>>12,Ke=d[29]<<7|d[28]>>>25,tr=d[28]<<7|d[29]>>>25,Le=d[38]<<8|d[39]>>>24,Xt=d[39]<<8|d[38]>>>24,Ee=d[48]<<14|d[49]>>>18,wt=d[49]<<14|d[48]>>>18,d[0]=Ct^~xe&de,d[1]=Ae^~ft&Ce,d[10]=W^~Ft&Fe,d[11]=ie^~Se&zt,d[20]=Ie^~De&$t,d[21]=jt^~Pe&Oe,d[30]=qt^~Re&_e,d[31]=He^~pt&Ne,d[40]=Xe^~br&Ke,d[41]=qe^~Ve&tr,d[2]=xe^~de&St,d[3]=ft^~Ce&pe,d[12]=Ft^~Fe&Me,d[13]=Se^~zt&Te,d[22]=De^~$t&Le,d[23]=Pe^~Oe&Xt,d[32]=Re^~_e&er,d[33]=pt^~Ne&ze,d[42]=br^~Ke&rr,d[43]=Ve^~tr&nr,d[4]=de^~St&Ee,d[5]=Ce^~pe&wt,d[14]=Fe^~Me&Zt,d[15]=zt^~Te&ke,d[24]=$t^~Le&Ue,d[25]=Oe^~Xt&Je,d[34]=_e^~er&je,d[35]=Ne^~ze&xr,d[44]=Ke^~rr&ir,d[45]=tr^~nr&or,d[6]=St^~Ee&Ct,d[7]=pe^~wt&Ae,d[16]=Me^~Zt&W,d[17]=Te^~ke&ie,d[26]=Le^~Ue&Ie,d[27]=Xt^~Je&jt,d[36]=er^~je&qt,d[37]=ze^~xr&He,d[46]=rr^~ir&Xe,d[47]=nr^~or&qe,d[8]=Ee^~Ct&xe,d[9]=wt^~Ae&ft,d[18]=Zt^~W&Ft,d[19]=ke^~ie&Se,d[28]=Ue^~Ie&De,d[29]=Je^~jt&Pe,d[38]=je^~qt&Re,d[39]=xr^~He&pt,d[48]=ir^~Xe&br,d[49]=or^~qe&Ve,d[0]^=S[U],d[1]^=S[U+1]};if(s)r.exports=f;else for(g=0;g>=8;return e}function hu(r,e,t){let n=0;for(let i=0;ie+1+n&&pn.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function $d(r,e){if(r.length===0&&pn.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),r[e]>=248){const t=r[e]-247;e+1+t>r.length&&pn.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=hu(r,e+1,t);return e+1+t+n>r.length&&pn.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),du(r,e,e+1+t,t+n)}else if(r[e]>=192){const t=r[e]-192;return e+1+t>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),du(r,e,e+1,t)}else if(r[e]>=184){const t=r[e]-183;e+1+t>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=hu(r,e+1,t);e+1+t+n>r.length&&pn.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=se(r.slice(e+1+t,e+1+t+n));return{consumed:1+t+n,result:i}}else if(r[e]>=128){const t=r[e]-128;e+1+t>r.length&&pn.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=se(r.slice(e+1,e+1+t));return{consumed:1+t,result:n}}return{consumed:1,result:se(r[e])}}function os(r){const e=ae(r),t=$d(e,0);return t.consumed!==e.length&&pn.throwArgumentError("invalid rlp data","data",r),t.result}const Eb=Object.freeze(Object.defineProperty({__proto__:null,encode:qi,decode:os},Symbol.toStringTag,{value:"Module"})),_b="address/5.7.0",ai=new q(_b);function pu(r){lt(r,20)||ai.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=ae(gt(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Cb=9007199254740991;function Sb(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const il={};for(let r=0;r<10;r++)il[String(r)]=String(r);for(let r=0;r<26;r++)il[String.fromCharCode(65+r)]=String(10+r);const xu=Math.floor(Sb(Cb));function e1(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>il[n]).join("");for(;e.length>=xu;){let n=e.substring(0,xu);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function _t(r){let e=null;if(typeof r!="string"&&ai.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=pu(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&ai.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==e1(r)&&ai.throwArgumentError("bad icap checksum","address",r),e=ab(r.substring(4));e.length<40;)e="0"+e;e=pu("0x"+e)}else ai.throwArgumentError("invalid address","address",r);return e}function Bb(r){try{return _t(r),!0}catch{}return!1}function Mb(r){let e=sb(_t(r).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+e1("XE00"+e)+e}function t1(r){let e=null;try{e=_t(r.from)}catch{ai.throwArgumentError("missing from address","transaction",r)}const t=Cn(ae(fe.from(r.nonce).toHexString()));return _t(Ot(gt(qi([e,t])),12))}function kb(r,e,t){return Fn(e)!==32&&ai.throwArgumentError("salt must be 32 bytes","salt",e),Fn(t)!==32&&ai.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),_t(Ot(gt(Et(["0xff",_t(r),e,t])),12))}const Pb=Object.freeze(Object.defineProperty({__proto__:null,getAddress:_t,isAddress:Bb,getIcapAddress:Mb,getContractAddress:t1,getCreate2Address:kb},Symbol.toStringTag,{value:"Module"}));class Rb extends $n{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=_t(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return _t(yt(e.readValue().toHexString(),20))}}class Nb extends $n{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const c0=new q(Do);function r1(r,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let u={};n=e.map(l=>{const h=l.localName;return h||c0.throwError("cannot encode object for signature with missing names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]&&c0.throwError("cannot encode object for signature with duplicate names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]=!0,t[h]})}else c0.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&c0.throwArgumentError("types/value length mismatch","tuple",t);let i=new nc(r.wordSize),o=new nc(r.wordSize),a=[];e.forEach((u,l)=>{let h=n[l];if(u.dynamic){let b=o.length;u.encode(o,h);let m=i.writeUpdatableValue();a.push(A=>{m(A+b)})}else u.encode(i,h)}),a.forEach(u=>{u(i.length)});let s=r.appendWriter(i);return s+=r.appendWriter(o),s}function n1(r,e){let t=[],n=r.subReader(0);e.forEach(o=>{let a=null;if(o.dynamic){let s=r.readValue(),u=n.subReader(s.toNumber());try{a=o.decode(u)}catch(l){if(l.code===q.errors.BUFFER_OVERRUN)throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(r)}catch(s){if(s.code===q.errors.BUFFER_OVERRUN)throw s;a=s,a.baseType=o.name,a.name=o.localName,a.type=o.type}a!=null&&t.push(a)});const i=e.reduce((o,a)=>{const s=a.localName;return s&&(o[s]||(o[s]=0),o[s]++),o},{});e.forEach((o,a)=>{let s=o.localName;if(!s||i[s]!==1||(s==="length"&&(s="_length"),t[s]!=null))return;const u=t[a];u instanceof Error?Object.defineProperty(t,s,{enumerable:!0,get:()=>{throw u}}):t[s]=u});for(let o=0;o{throw a}})}return Object.freeze(t)}class Fb extends $n{constructor(e,t,n){const i=e.type+"["+(t>=0?t:"")+"]",o=t===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&c0.throwError("insufficient data length",q.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;i>6===2;a++)o++;return o}return r===Sr.OVERRUN?t.length-e-1:0}function Xb(r,e,t,n,i){return r===Sr.OVERLONG?(n.push(i),0):(n.push(65533),f1(r,e,t))}const c1=Object.freeze({error:jb,ignore:f1,replace:Xb});function ol(r,e){e==null&&(e=c1.error),r=ae(r);const t=[];let n=0;for(;n>7===0){t.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?n+=e(Sr.UNEXPECTED_CONTINUE,n-1,r,t):n+=e(Sr.BAD_PREFIX,n-1,r,t);continue}if(n-1+o>=r.length){n+=e(Sr.OVERRUN,n-1,r,t);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111){n+=e(Sr.OUT_OF_RANGE,n-1-o,r,t,s);continue}if(s>=55296&&s<=57343){n+=e(Sr.UTF16_SURROGATE,n-1-o,r,t,s);continue}if(s<=a){n+=e(Sr.OVERLONG,n-1-o,r,t,s);continue}t.push(s)}}return t}function Jt(r,e=Tn.current){e!=Tn.current&&(s1.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const o=r.charCodeAt(n);if(n>=r.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((i&1023)<<10)+(o&1023);t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return ae(t)}function Os(r){const e="0000"+r.toString(16);return"\\u"+e.substring(e.length-4)}function qb(r,e){return'"'+ol(r,e).map(t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?Os(t):(t-=65536,Os((t>>10&1023)+55296)+Os((t&1023)+56320))}).join("")+'"'}function ic(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function mi(r,e){return ic(ol(r,e))}function La(r,e=Tn.current){return ol(Jt(r,e))}function Vb(r){const e=Jt(r);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return se(Et([e,a1]).slice(0,32))}function Kb(r){const e=ae(r);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;e[t-1]===0;)t--;return mi(e.slice(0,t))}function Qb(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let o=i.split(":");t+=parseInt(o[0],16),n[t]=e(o[1])}),n}function l1(r){let e=0;return r.split(",").map(t=>{let n=t.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function sl(r,e){let t=0;for(let n=0;n=t&&r<=t+i.h&&(r-t)%(i.d||1)===0){if(i.e&&i.e.indexOf(r-t)!==-1)continue;return i}}return null}const Wb=l1("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Yb="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),Zb=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],$b=al("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),eg=al("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),tg=al("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Qb),rg=l1("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function ng(r){return r.reduce((e,t)=>(t.forEach(n=>{e.push(n)}),e),[])}function ig(r){return!!sl(r,Wb)}function og(r){let e=sl(r,Zb);if(e)return[r+e.s];let t=$b[r];if(t)return t;let n=eg[r];if(n)return[r+n[0]];let i=tg[r];return i||null}function ag(r){return!!sl(r,rg)}function sg(r){if(r.match(/^[a-z0-9-]*$/i)&&r.length<=59)return r.toLowerCase();let e=La(r);e=ng(e.map(n=>{if(Yb.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=og(n);return i||[n]})),e=La(ic(e),Tn.NFKC),e.forEach(n=>{if(ag(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(ig(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=ic(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}const fg=Object.freeze(Object.defineProperty({__proto__:null,_toEscapedUtf8String:qb,toUtf8Bytes:Jt,toUtf8CodePoints:La,toUtf8String:mi,Utf8ErrorFuncs:c1,get Utf8ErrorReason(){return Sr},get UnicodeNormalizationForm(){return Tn},formatBytes32String:Vb,parseBytes32String:Kb,nameprep:sg},Symbol.toStringTag,{value:"Module"}));class cg extends i1{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Jt(t))}decode(e){return mi(super.decode(e))}}class Yo extends $n{constructor(e,t){let n=!1;const i=[];e.forEach(a=>{a.dynamic&&(n=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,t,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const t=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||t[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,t){return r1(e,this.coders,t)}decode(e){return e.coerce(this.name,n1(e,this.coders))}}const Zo=new q(Do),lg=new RegExp(/^bytes([0-9]*)$/),ug=new RegExp(/^(u?int)([0-9]*)$/);class u1{constructor(e){le(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Rb(e.name);case"bool":return new Tb(e.name);case"string":return new cg(e.name);case"bytes":return new Ib(e.name);case"array":return new Fb(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Yo((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Ob(e.name)}let t=e.type.match(ug);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&Zo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Gb(n/8,t[1]==="int",e.name)}if(t=e.type.match(lg),t){let n=parseInt(t[1]);return(n===0||n>32)&&Zo.throwArgumentError("invalid bytes length","param",e),new Db(n,e.name)}return Zo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Oa(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new nc(this._getWordSize())}getDefaultValue(e){const t=e.map(i=>this._getCoder(Gt.from(i)));return new Yo(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&Zo.throwError("types/values length mismatch",q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const n=e.map(a=>this._getCoder(Gt.from(a))),i=new Yo(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}decode(e,t,n){const i=e.map(a=>this._getCoder(Gt.from(a)));return new Yo(i,"_").decode(this._getReader(ae(t),n))}}const h1=new u1;function si(r){return gt(Jt(r))}const d1="hash/5.7.0";function fl(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(s)?i(s,a-1):t.push(s)})};return i(r,e),t}function dg(r){const e={};for(let t=0;t>--u&1}const b=31,m=Math.pow(2,b),A=m>>>1,_=A>>1,S=m-1;let C=0;for(let I=0;I1;){let H=D+O>>>1;I>>1|h(),J=J<<1^A,X=(X^A)<<1|A|1;B=J,P=1+X-J}let R=n-4;return M.map(I=>{switch(I-R){case 3:return R+65792+(r[s++]<<16|r[s++]<<8|r[s++]);case 2:return R+256+(r[s++]<<8|r[s++]);case 1:return R+r[s++];default:return I-1}})}function xg(r){let e=0;return()=>r[e++]}function bg(r){return xg(pg(r))}function gg(r){return r&1?~r>>1:r>>1}function mg(r,e){let t=Array(r);for(let n=0;ne[a]):t}function vg(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(Ag(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(Eg(t,r))}return dg(p1(e))}function wg(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function x1(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[a].push(o));return n}function Ag(r,e){let t=1+e(),n=e(),i=wg(e),o=x1(i.length,1+r,e);return p1(o.map((a,s)=>{const u=a[0],l=a.slice(1);return Array(i[s]).fill(void 0).map((h,b)=>{let m=b*n;return[u+b*t,l.map(A=>A+m)]})}))}function Eg(r,e){let t=1+e();return x1(t,1+r,e).map(i=>[i[0],i.slice(1)])}function _g(r){let e=Ua(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=Ua(r,e);if(l.length==0)break;n.push({set:new Set(l),node:t()})}n.sort((l,h)=>h.set.size-l.set.size);let i=r(),o=i%3;i=i/3|0;let a=!!(i&1);i>>=1;let s=i==1,u=i==2;return{branches:n,valid:o,fe0f:a,save:s,check:u}}}function Cg(){return bg(fl("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const as=Cg(),Sg=new Set(Ua(as)),Bg=new Set(Ua(as)),Mg=vg(as),kg=_g(as),gu=45,mu=95;function b1(r){return La(r)}function Pg(r){return r.filter(e=>e!=65039)}function g1(r){for(let e of r.split(".")){let t=b1(e);try{for(let n=t.lastIndexOf(mu)-1;n>=0;n--)if(t[n]!==mu)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(n=>n<128)&&t[2]===gu&&t[3]===gu)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return r}function Rg(r){return g1(Ng(r,Pg))}function Ng(r,e){let t=b1(r).reverse(),n=[];for(;t.length;){let i=Tg(t);if(i){n.push(...e(i));continue}let o=t.pop();if(Sg.has(o)){n.push(o);continue}if(Bg.has(o))continue;let a=Mg[o];if(a){n.push(...a);continue}throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`)}return g1(Fg(String.fromCodePoint(...n)))}function Fg(r){return r.normalize("NFC")}function Tg(r,e){var t;let n=kg,i,o,a=[],s=r.length;for(e&&(e.length=0);s;){let u=r[--s];if(n=(t=n.branches.find(l=>l.set.has(u)))===null||t===void 0?void 0:t.node,!n)break;if(n.save)o=u;else if(n.check&&u===o)break;a.push(u),n.fe0f&&(a.push(65039),s>0&&r[s-1]==65039&&s--),n.valid&&(i=a.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...r.slice(s).reverse()),r.length=s)}return i}const Ig=new q(d1),m1=new Uint8Array(32);m1.fill(0);function yu(r){if(r.length===0)throw new Error("invalid ENS name; empty component");return r}function ss(r){const e=Jt(Rg(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return t.push(yu(e.slice(n))),t}function Dg(r){return ss(r).map(e=>mi(e)).join(".")}function Og(r){try{return ss(r).length!==0}catch{}return!1}function so(r){typeof r!="string"&&Ig.throwArgumentError("invalid ENS name; not a string","name",r);let e=m1;const t=ss(r);for(;t.length;)e=gt(Et([e,gt(t.pop())]));return se(e)}function y1(r){return se(Et(ss(r).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}const v1=`Ethereum Signed Message: +`;function ll(r){return typeof r=="string"&&(r=Jt(r)),gt(Et([Jt(v1),Jt(String(r.length)),r]))}var Lg=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const kt=new q(d1),w1=new Uint8Array(32);w1.fill(0);const Ug=fe.from(-1),A1=fe.from(0),E1=fe.from(1),Jg=fe.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Hg(r){const e=ae(r),t=e.length%32;return t?gr([e,w1.slice(t)]):se(e)}const Gg=yt(E1.toHexString(),32),zg=yt(A1.toHexString(),32),vu={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ls=["name","version","chainId","verifyingContract","salt"];function wu(r){return function(e){return typeof e!="string"&&kt.throwArgumentError(`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const jg={name:wu("name"),version:wu("version"),chainId:function(r){try{return fe.from(r).toString()}catch{}return kt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",r)},verifyingContract:function(r){try{return _t(r).toLowerCase()}catch{}return kt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){try{const e=ae(r);if(e.length!==32)throw new Error("bad length");return se(e)}catch{}return kt.throwArgumentError('invalid domain value "salt"',"domain.salt",r)}};function Us(r){{const e=r.match(/^(u?)int(\d*)$/);if(e){const t=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&kt.throwArgumentError("invalid numeric width","type",r);const i=Jg.mask(t?n-1:n),o=t?i.add(E1).mul(Ug):A1;return function(a){const s=fe.from(a);return(s.lt(o)||s.gt(i))&&kt.throwArgumentError(`value out-of-bounds for ${r}`,"value",a),yt(s.toTwos(256).toHexString(),32)}}}{const e=r.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&kt.throwArgumentError("invalid bytes width","type",r),function(n){return ae(n).length!==t&&kt.throwArgumentError(`invalid length for ${r}`,"value",n),Hg(n)}}}switch(r){case"address":return function(e){return yt(_t(e),32)};case"bool":return function(e){return e?Gg:zg};case"bytes":return function(e){return gt(e)};case"string":return function(e){return si(e)}}return null}function Au(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}class sr{constructor(e){le(this,"types",Object.freeze(w0(e))),le(this,"_encoderCache",{}),le(this,"_types",{});const t={},n={},i={};Object.keys(e).forEach(s=>{t[s]={},n[s]=[],i[s]={}});for(const s in e){const u={};e[s].forEach(l=>{u[l.name]&&kt.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(s)}`,"types",e),u[l.name]=!0;const h=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];h===s&&kt.throwArgumentError(`circular type reference to ${JSON.stringify(h)}`,"types",e),!Us(h)&&(n[h]||kt.throwArgumentError(`unknown type ${JSON.stringify(h)}`,"types",e),n[h].push(s),t[s][h]=!0)})}const o=Object.keys(n).filter(s=>n[s].length===0);o.length===0?kt.throwArgumentError("missing primary type","types",e):o.length>1&&kt.throwArgumentError(`ambiguous primary types or unused types: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),le(this,"primaryType",o[0]);function a(s,u){u[s]&&kt.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),u[s]=!0,Object.keys(t[s]).forEach(l=>{!n[l]||(a(l,u),Object.keys(u).forEach(h=>{i[h][l]=!0}))}),delete u[s]}a(this.primaryType,{});for(const s in i){const u=Object.keys(i[s]);u.sort(),this._types[s]=Au(s,e[s])+u.map(l=>Au(l,e[l])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const i=Us(e);if(i)return i}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const i=t[1],o=this.getEncoder(i),a=parseInt(t[3]);return s=>{a>=0&&s.length!==a&&kt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",s);let u=s.map(o);return this._types[i]&&(u=u.map(gt)),gt(gr(u))}}const n=this.types[e];if(n){const i=si(this._types[e]);return o=>{const a=n.map(({name:s,type:u})=>{const l=this.getEncoder(u)(o[s]);return this._types[u]?gt(l):l});return a.unshift(i),gr(a)}}return kt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||kt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gt(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Us(e))return n(e,t);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const a=i[1],s=parseInt(i[3]);return s>=0&&t.length!==s&&kt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(u=>this._visit(a,u,n))}const o=this.types[e];return o?o.reduce((a,{name:s,type:u})=>(a[s]=this._visit(u,t[s],n),a),{}):kt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new sr(e)}static getPrimaryType(e){return sr.from(e).primaryType}static hashStruct(e,t,n){return sr.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){const i=vu[n];i||kt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>Ls.indexOf(n.name)-Ls.indexOf(i.name)),sr.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return gr(["0x1901",sr.hashDomain(e),sr.from(t).hash(n)])}static hash(e,t,n){return gt(sr.encode(e,t,n))}static resolveNames(e,t,n,i){return Lg(this,void 0,void 0,function*(){e=vr(e);const o={};e.verifyingContract&&!lt(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const a=sr.from(t);a.visit(n,(s,u)=>(s==="address"&&!lt(u,20)&&(o[u]="0x"),u));for(const s in o)o[s]=yield i(s);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),n=a.visit(n,(s,u)=>s==="address"&&o[u]?o[u]:u),{domain:e,value:n}})}static getPayload(e,t,n){sr.hashDomain(e);const i={},o=[];Ls.forEach(u=>{const l=e[u];l!=null&&(i[u]=jg[u](l),o.push({name:u,type:vu[u]}))});const a=sr.from(t),s=vr(t);return s.EIP712Domain?kt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(u,l)=>{if(u.match(/^bytes(\d*)/))return se(ae(l));if(u.match(/^u?int/))return fe.from(l).toString();switch(u){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&kt.throwArgumentError("invalid string","value",l),l}return kt.throwArgumentError("unsupported type","type",u)})}}}const Xg=Object.freeze(Object.defineProperty({__proto__:null,id:si,dnsEncode:y1,namehash:so,isValidName:Og,ensNormalize:Dg,messagePrefix:v1,hashMessage:ll,_TypedDataEncoder:sr},Symbol.toStringTag,{value:"Module"})),Bt=new q(Do);class _1 extends gi{}class C1 extends gi{}class qg extends gi{}class oc extends gi{static isIndexed(e){return!!(e&&e._isIndexed)}}const Vg={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Eu(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);return t.error=e,t}class Kg{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,le(this,"fragments",t.map(n=>En.from(n)).filter(n=>n!=null)),le(this,"_abiCoder",An(new.target,"getAbiCoder")()),le(this,"functions",{}),le(this,"errors",{}),le(this,"events",{}),le(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Bt.warn("duplicate definition - constructor");return}le(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){Bt.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||le(this,"deploy",nn.from({payable:!1,type:"constructor"})),le(this,"_isInterface",!0)}format(e){e||(e=ct.full),e===ct.sighash&&Bt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(n=>n.format(e));return e===ct.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return h1}static getAddress(e){return _t(e)}static getSighash(e){return Ot(si(e.format()),0,4)}static getEventTopic(e){return si(e.format())}getFunction(e){if(lt(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Bt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching function","name",n):i.length>1&&Bt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const t=this.functions[on.fromString(e).format()];return t||Bt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(lt(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Bt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching event","name",n):i.length>1&&Bt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const t=this.events[gn.fromString(e).format()];return t||Bt.throwArgumentError("no matching event","signature",e),t}getError(e){if(lt(e)){const n=An(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}Bt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching error","name",n):i.length>1&&Bt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const t=this.errors[on.fromString(e).format()];return t||Bt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return An(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),An(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));const n=ae(t);return se(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",se(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),se(Et([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));const n=ae(t);return se(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",se(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),se(Et([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=ae(t),i=null,o="",a=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=se(n.slice(0,4)),h=Vg[l];if(h)a=this._abiCoder.decode(h.inputs,n.slice(4)),s=h.name,u=h.signature,h.reason&&(i=a[0]),s==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:s==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const b=this.getError(l);a=this._abiCoder.decode(b.inputs,n.slice(4)),s=b.name,u=b.format()}catch{}break}}return Bt.throwError("call revert exception"+o,q.errors.CALL_EXCEPTION,{method:e.format(),data:se(t),errorArgs:a,errorName:s,errorSignature:u,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),se(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Bt.throwError("too many arguments for "+e.format(),q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,a)=>o.type==="string"?si(a):o.type==="bytes"?gt(se(a)):(o.type==="bool"&&typeof a=="boolean"&&(a=a?"0x01":"0x00"),o.type.match(/^u?int/)&&(a=fe.from(a).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[a]),yt(se(a),32));for(t.forEach((o,a)=>{let s=e.inputs[a];if(!s.indexed){o!=null&&Bt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,o);return}o==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?Bt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,o):Array.isArray(o)?n.push(o.map(u=>i(s,u))):n.push(i(s,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Bt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((a,s)=>{const u=t[s];if(a.indexed)if(a.type==="string")n.push(si(u));else if(a.type==="bytes")n.push(gt(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([a.type],[u]))}else i.push(a),o.push(u)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!lt(n[0],32)||n[0].toLowerCase()!==m)&&Bt.throwError("fragment/topic mismatch",q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],a=[];e.inputs.forEach((m,A)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(Gt.fromObject({type:"bytes32",name:m.name})),a.push(!0)):(i.push(m),a.push(!1)):(o.push(m),a.push(!1))});let s=n!=null?this._abiCoder.decode(i,Et(n)):null,u=this._abiCoder.decode(o,t,!0),l=[],h=0,b=0;e.inputs.forEach((m,A)=>{if(m.indexed)if(s==null)l[A]=new oc({_isIndexed:!0,hash:null});else if(a[A])l[A]=new oc({_isIndexed:!0,hash:s[b++]});else try{l[A]=s[b++]}catch(_){l[A]=_}else try{l[A]=u[h++]}catch(_){l[A]=_}if(m.name&&l[m.name]==null){const _=l[A];_ instanceof Error?Object.defineProperty(l,m.name,{enumerable:!0,get:()=>{throw Eu(`property ${JSON.stringify(m.name)}`,_)}}):l[m.name]=_}});for(let m=0;m{throw Eu(`index ${m}`,A)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new C1({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:fe.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new _1({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=se(e);let n=this.getError(t.substring(0,10).toLowerCase());return n?new qg({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Qg=Object.freeze(Object.defineProperty({__proto__:null,ConstructorFragment:nn,ErrorFragment:zn,EventFragment:gn,Fragment:En,FunctionFragment:on,ParamType:Gt,FormatTypes:ct,AbiCoder:u1,defaultAbiCoder:h1,Interface:Kg,Indexed:oc,checkResultErrors:yb,LogDescription:_1,TransactionDescription:C1},Symbol.toStringTag,{value:"Module"})),Wg=It(Qg),Yg=It(Pb),Zg=It(hg);class ul{constructor(e){le(this,"alphabet",e),le(this,"base",e.length),le(this,"_alphabetMap",{}),le(this,"_leader",e.charAt(0));for(let t=0;t0;)n.push(a%this.base),a=a/this.base|0}let i="";for(let o=0;t[o]===0&&o=0;--o)i+=this.alphabet[n[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let n=0;n>=8;for(;o>0;)t.push(o&255),o>>=8}for(let n=0;e[n]===this._leader&&n=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function om(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),i=0;i>6|192,t[n++]=o&63|128):im(r,i)?(o=65536+((o&1023)<<10)+(r.charCodeAt(++i)&1023),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128)}else for(i=0;i>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}nt.htonl=P1;function sm(r,e){for(var t="",n=0;n>>0}return o}nt.join32=fm;function cm(r,e){for(var t=new Array(r.length*4),n=0,i=0;n>>24,t[i+1]=o>>>16&255,t[i+2]=o>>>8&255,t[i+3]=o&255):(t[i+3]=o>>>24,t[i+2]=o>>>16&255,t[i+1]=o>>>8&255,t[i]=o&255)}return t}nt.split32=cm;function lm(r,e){return r>>>e|r<<32-e}nt.rotr32=lm;function um(r,e){return r<>>32-e}nt.rotl32=um;function hm(r,e){return r+e>>>0}nt.sum32=hm;function dm(r,e,t){return r+e+t>>>0}nt.sum32_3=dm;function pm(r,e,t,n){return r+e+t+n>>>0}nt.sum32_4=pm;function xm(r,e,t,n,i){return r+e+t+n+i>>>0}nt.sum32_5=xm;function bm(r,e,t,n){var i=r[e],o=r[e+1],a=n+o>>>0,s=(a>>0,r[e+1]=a}nt.sum64=bm;function gm(r,e,t,n){var i=e+n>>>0,o=(i>>0}nt.sum64_hi=gm;function mm(r,e,t,n){var i=e+n;return i>>>0}nt.sum64_lo=mm;function ym(r,e,t,n,i,o,a,s){var u=0,l=e;l=l+n>>>0,u+=l>>0,u+=l>>0,u+=l>>0}nt.sum64_4_hi=ym;function vm(r,e,t,n,i,o,a,s){var u=e+n+o+s;return u>>>0}nt.sum64_4_lo=vm;function wm(r,e,t,n,i,o,a,s,u,l){var h=0,b=e;b=b+n>>>0,h+=b>>0,h+=b>>0,h+=b>>0,h+=b>>0}nt.sum64_5_hi=wm;function Am(r,e,t,n,i,o,a,s,u,l){var h=e+n+o+s+l;return h>>>0}nt.sum64_5_lo=Am;function Em(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}nt.rotr64_hi=Em;function _m(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}nt.rotr64_lo=_m;function Cm(r,e,t){return r>>>t}nt.shr64_hi=Cm;function Sm(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}nt.shr64_lo=Sm;var I0={},_u=nt,Bm=Oo;function fs(){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}I0.BlockHash=fs;fs.prototype.update=function(e,t){if(e=_u.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=_u.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=e&255}else for(i[o++]=e&255,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,a=8;a>>3}Ln.g0_256=Nm;function Fm(r){return Sn(r,17)^Sn(r,19)^r>>>10}Ln.g1_256=Fm;var E0=nt,Tm=I0,Im=Ln,Js=E0.rotl32,j0=E0.sum32,Dm=E0.sum32_5,Om=Im.ft_1,D1=Tm.BlockHash,Lm=[1518500249,1859775393,2400959708,3395469782];function In(){if(!(this instanceof In))return new In;D1.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}E0.inherits(In,D1);var Um=In;In.blockSize=512;In.outSize=160;In.hmacStrength=80;In.padLength=64;In.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),S6(e.length<=this.blockSize);for(var t=e.length;t>24&255,u[e.length+1]=b>>16&255,u[e.length+2]=b>>8&255,u[e.length+3]=b&255;let m=ae(wo(i,r,u));o||(o=m.length,h=new Uint8Array(o),a=Math.ceil(n/o),l=n-(a-1)*o),h.set(m);for(let S=1;S>8,m=h&255;b?u.push(b,m):u.push(m)}return u}t.toArray=n;function i(a){return a.length===1?"0"+a:a}t.zero2=i;function o(a){for(var s="",u=0;u(m>>1)-1?S=(m>>1)-C:S=C,A.isubn(S)):S=0,b[_]=S,A.iushrn(1)}return b}t.getNAF=n;function i(u,l){var h=[[],[]];u=u.clone(),l=l.clone();for(var b=0,m=0,A;u.cmpn(-b)>0||l.cmpn(-m)>0;){var _=u.andln(3)+b&3,S=l.andln(3)+m&3;_===3&&(_=-1),S===3&&(S=-1);var C;(_&1)===0?C=0:(A=u.andln(7)+b&7,(A===3||A===5)&&S===2?C=-_:C=_),h[0].push(C);var M;(S&1)===0?M=0:(A=l.andln(7)+m&7,(A===3||A===5)&&_===2?M=-S:M=S),h[1].push(M),2*b===C+1&&(b=1-b),2*m===M+1&&(m=1-m),u.iushrn(1),l.iushrn(1)}return h}t.getJSF=i;function o(u,l,h){var b="_"+l;u.prototype[l]=function(){return this[b]!==void 0?this[b]:this[b]=h.call(this)}}t.cachedProperty=o;function a(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=a;function s(u){return new Ze(u,"hex","le")}t.intFromLE=s}),Ja=Ur.getNAF,F6=Ur.getJSF,Ha=Ur.assert;function yi(r,e){this.type=r,this.p=new Ze(e.p,16),this.red=e.prime?Ze.red(e.prime):Ze.mont(this.p),this.zero=new Ze(0).toRed(this.red),this.one=new Ze(1).toRed(this.red),this.two=new Ze(2).toRed(this.red),this.n=e.n&&new Ze(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var $i=yi;yi.prototype.point=function(){throw new Error("Not implemented")};yi.prototype.validate=function(){throw new Error("Not implemented")};yi.prototype._fixedNafMul=function(e,t){Ha(e.precomputed);var n=e._getDoubles(),i=Ja(t,1,this._bitLength),o=(1<=s;l--)u=(u<<1)+i[l];a.push(u)}for(var h=this.jpoint(null,null,null),b=this.jpoint(null,null,null),m=o;m>0;m--){for(s=0;s=0;u--){for(var l=0;u>=0&&a[u]===0;u--)l++;if(u>=0&&l++,s=s.dblp(l),u<0)break;var h=a[u];Ha(h!==0),e.type==="affine"?h>0?s=s.mixedAdd(o[h-1>>1]):s=s.mixedAdd(o[-h-1>>1].neg()):h>0?s=s.add(o[h-1>>1]):s=s.add(o[-h-1>>1].neg())}return e.type==="affine"?s.toP():s};yi.prototype._wnafMulAdd=function(e,t,n,i,o){var a=this._wnafT1,s=this._wnafT2,u=this._wnafT3,l=0,h,b,m;for(h=0;h=1;h-=2){var _=h-1,S=h;if(a[_]!==1||a[S]!==1){u[_]=Ja(n[_],a[_],this._bitLength),u[S]=Ja(n[S],a[S],this._bitLength),l=Math.max(u[_].length,l),l=Math.max(u[S].length,l);continue}var C=[t[_],null,null,t[S]];t[_].y.cmp(t[S].y)===0?(C[1]=t[_].add(t[S]),C[2]=t[_].toJ().mixedAdd(t[S].neg())):t[_].y.cmp(t[S].y.redNeg())===0?(C[1]=t[_].toJ().mixedAdd(t[S]),C[2]=t[_].add(t[S].neg())):(C[1]=t[_].toJ().mixedAdd(t[S]),C[2]=t[_].toJ().mixedAdd(t[S].neg()));var M=[-3,-1,-5,-7,0,7,5,1,3],B=F6(n[_],n[S]);for(l=Math.max(B[0].length,l),u[_]=new Array(l),u[S]=new Array(l),b=0;b=0;h--){for(var O=0;h>=0;){var J=!0;for(b=0;b=0&&O++,I=I.dblp(O),h<0)break;for(b=0;b0?m=s[b][X-1>>1]:X<0&&(m=s[b][-X-1>>1].neg()),m.type==="affine"?I=I.mixedAdd(m):I=I.add(m))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step):!1};Qr.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,o=0;o=0&&(A=l,_=h),b.negative&&(b=b.neg(),m=m.neg()),A.negative&&(A=A.neg(),_=_.neg()),[{a:b,b:m},{a:A,b:_}]};Wr.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=o.mul(n.a),u=a.mul(i.a),l=o.mul(n.b),h=a.mul(i.b),b=e.sub(s).sub(u),m=l.add(h).neg();return{k1:b,k2:m}};Wr.prototype.pointFromX=function(e,t){e=new Ze(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)};Wr.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(o).cmpn(0)===0};Wr.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,o=this._endoWnafT2,a=0;a":""};Yt.prototype.isInfinity=function(){return this.inf};Yt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Yt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),a=o.redSqr().redISub(this.x.redAdd(this.x)),s=o.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};Yt.prototype.getX=function(){return this.x.fromRed()};Yt.prototype.getY=function(){return this.y.fromRed()};Yt.prototype.mul=function(e){return e=new Ze(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Yt.prototype.mulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};Yt.prototype.jmulAdd=function(e,t,n){var i=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};Yt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Yt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(o){return o.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t};Yt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function fr(r,e,t,n){$i.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ze(0)):(this.x=new Ze(e,16),this.y=new Ze(t,16),this.z=new Ze(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}pl(fr,$i.BasePoint);Wr.prototype.jpoint=function(e,t,n){return new fr(this,e,t,n)};fr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)};fr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};fr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),u=i.redSub(o),l=a.redSub(s);if(u.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var h=u.redSqr(),b=h.redMul(u),m=i.redMul(h),A=l.redSqr().redIAdd(b).redISub(m).redISub(m),_=l.redMul(m.redISub(A)).redISub(a.redMul(b)),S=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(A,_,S)};fr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,a=e.y.redMul(t).redMul(this.z),s=n.redSub(i),u=o.redSub(a);if(s.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),h=l.redMul(s),b=n.redMul(l),m=u.redSqr().redIAdd(h).redISub(b).redISub(b),A=u.redMul(b.redISub(m)).redISub(o.redMul(h)),_=this.z.redMul(s);return this.curve.jpoint(m,A,_)};fr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(o),this.x.cmp(n)===0)return!0}};fr.prototype.inspect=function(){return this.isInfinity()?"":""};fr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ba=L0(function(r,e){var t=e;t.base=$i,t.short=I6,t.mont=null,t.edwards=null}),ga=L0(function(r,e){var t=e,n=Ur.assert;function i(s){s.type==="short"?this.curve=new ba.short(s):s.type==="edwards"?this.curve=new ba.edwards(s):this.curve=new ba.mont(s),this.g=this.curve.g,this.n=this.curve.n,this.hash=s.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function o(s,u){Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:function(){var l=new i(u);return Object.defineProperty(t,s,{configurable:!0,enumerable:!0,value:l}),l}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Cr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Cr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Cr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Cr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Cr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Cr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var a;try{a=null.crash()}catch{a=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Cr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})});function pi(r){if(!(this instanceof pi))return new pi(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=an.toArray(r.entropy,r.entropyEnc||"hex"),t=an.toArray(r.nonce,r.nonceEnc||"hex"),n=an.toArray(r.pers,r.persEnc||"hex");dl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var Q1=pi;pi.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};pi.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=n,n=t,t=null),n&&(n=an.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length"};var D6=Ur.assert;function cs(r,e){if(r instanceof cs)return r;this._importDER(r,e)||(D6(r.r&&r.s,"Signature without r or s"),this.r=new Ze(r.r,16),this.s=new Ze(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var ls=cs;function O6(){this.place=0}function zs(r,e){var t=r[e.place++];if(!(t&128))return t;var n=t&15;if(n===0||n>4)return!1;for(var i=0,o=0,a=e.place;o>>=0;return i<=127?!1:(e.place=a,i)}function Mu(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}cs.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),n[0]&128&&(n=[0].concat(n)),t=Mu(t),n=Mu(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];js(i,t.length),i=i.concat(t),i.push(2),js(i,n.length);var o=i.concat(n),a=[48];return js(a,o.length),a=a.concat(o),Ur.encode(a,e)};var L6=function(){throw new Error("unsupported")},W1=Ur.assert;function Vr(r){if(!(this instanceof Vr))return new Vr(r);typeof r=="string"&&(W1(Object.prototype.hasOwnProperty.call(ga,r),"Unknown curve "+r),r=ga[r]),r instanceof ga.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var U6=Vr;Vr.prototype.keyPair=function(e){return new xl(this,e)};Vr.prototype.keyFromPrivate=function(e,t){return xl.fromPrivate(this,e,t)};Vr.prototype.keyFromPublic=function(e,t){return xl.fromPublic(this,e,t)};Vr.prototype.genKeyPair=function(e){e||(e={});for(var t=new Q1({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L6(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Ze(2));;){var o=new Ze(t.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Vr.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};Vr.prototype.sign=function(e,t,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new Ze(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new Q1({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new Ze(1)),h=0;;h++){var b=i.k?i.k(h):new Ze(u.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(l)>=0)){var m=this.g.mul(b);if(!m.isInfinity()){var A=m.getX(),_=A.umod(this.n);if(_.cmpn(0)!==0){var S=b.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var C=(m.getY().isOdd()?1:0)|(A.cmp(_)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),C^=1),new ls({r:_,s:S,recoveryParam:C})}}}}}};Vr.prototype.verify=function(e,t,n,i){e=this._truncateToN(new Ze(e,16)),n=this.keyFromPublic(n,i),t=new ls(t,"hex");var o=t.r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),u=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n),h;return this.curve._maxwellTrick?(h=this.g.jmulAdd(u,n.getPublic(),l),h.isInfinity()?!1:h.eqXToP(o)):(h=this.g.mulAdd(u,n.getPublic(),l),h.isInfinity()?!1:h.getX().umod(this.n).cmp(o)===0)};Vr.prototype.recoverPubKey=function(r,e,t,n){W1((3&t)===t,"The recovery param is more than two bits"),e=new ls(e,n);var i=this.n,o=new Ze(r),a=e.r,s=e.s,u=t&1,l=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?a=this.curve.pointFromX(a.add(this.curve.n),u):a=this.curve.pointFromX(a,u);var h=e.r.invm(i),b=i.sub(o).mul(h).umod(i),m=s.mul(h).umod(i);return this.g.mulAdd(b,a,m)};Vr.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new ls(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(r,e,i)}catch{continue}if(o.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var J6=L0(function(r,e){var t=e;t.version="6.5.4",t.utils=Ur,t.rand=function(){throw new Error("unsupported")},t.curve=ba,t.curves=ga,t.ec=U6,t.eddsa=null}),H6=J6.ec;const G6="signing-key/5.7.0",lc=new q(G6);let Xs=null;function bn(){return Xs||(Xs=new H6("secp256k1")),Xs}class Ui{constructor(e){le(this,"curve","secp256k1"),le(this,"privateKey",se(e)),Fn(this.privateKey)!==32&&lc.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=bn().keyFromPrivate(ae(this.privateKey));le(this,"publicKey","0x"+t.getPublic(!1,"hex")),le(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),le(this,"_isSigningKey",!0)}_addPoint(e){const t=bn().keyFromPublic(ae(this.publicKey)),n=bn().keyFromPublic(ae(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=bn().keyFromPrivate(ae(this.privateKey)),n=ae(e);n.length!==32&&lc.throwArgumentError("bad digest length","digest",e);const i=t.sign(n,{canonical:!0});return Zi({recoveryParam:i.recoveryParam,r:yt("0x"+i.r.toString(16),32),s:yt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=bn().keyFromPrivate(ae(this.privateKey)),n=bn().keyFromPublic(ae(bl(e)));return yt("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function Y1(r,e){const t=Zi(e),n={r:ae(t.r),s:ae(t.s)};return"0x"+bn().recoverPubKey(ae(r),n,t.recoveryParam).encode("hex",!1)}function bl(r,e){const t=ae(r);if(t.length===32){const n=new Ui(t);return e?"0x"+bn().keyFromPrivate(t).getPublic(!0,"hex"):n.publicKey}else{if(t.length===33)return e?se(t):"0x"+bn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+bn().keyFromPublic(t).getPublic(!0,"hex"):se(t)}return lc.throwArgumentError("invalid public or private key","key","[REDACTED]")}const z6=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:Ui,recoverPublicKey:Y1,computePublicKey:bl},Symbol.toStringTag,{value:"Module"})),j6="transactions/5.7.0",hr=new q(j6);var uc;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(uc||(uc={}));function gl(r){return r==="0x"?null:_t(r)}function ur(r){return r==="0x"?o1:fe.from(r)}const X6=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],q6={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ui(r){const e=bl(r);return _t(Ot(gt(Ot(e,1)),12))}function Lo(r,e){return ui(Y1(ae(r),e))}function Nr(r,e){const t=Cn(fe.from(r).toHexString());return t.length>32&&hr.throwArgumentError("invalid length for "+e,"transaction:"+e,r),t}function qs(r,e){return{address:_t(r),storageKeys:(e||[]).map((t,n)=>(Fn(t)!==32&&hr.throwArgumentError("invalid access list storageKey",`accessList[${r}:${n}]`,t),t.toLowerCase()))}}function U0(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(t.length>2&&hr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),qs(t[0],t[1])):qs(t.address,t.storageKeys));const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,o)=>(i[o]=!0,i),{});return qs(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Z1(r){return U0(r).map(e=>[e.address,e.storageKeys])}function $1(r,e){if(r.gasPrice!=null){const n=fe.from(r.gasPrice),i=fe.from(r.maxFeePerGas||0);n.eq(i)||hr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const t=[Nr(r.chainId||0,"chainId"),Nr(r.nonce||0,"nonce"),Nr(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nr(r.maxFeePerGas||0,"maxFeePerGas"),Nr(r.gasLimit||0,"gasLimit"),r.to!=null?_t(r.to):"0x",Nr(r.value||0,"value"),r.data||"0x",Z1(r.accessList||[])];if(e){const n=Zi(e);t.push(Nr(n.recoveryParam,"recoveryParam")),t.push(Cn(n.r)),t.push(Cn(n.s))}return gr(["0x02",qi(t)])}function ep(r,e){const t=[Nr(r.chainId||0,"chainId"),Nr(r.nonce||0,"nonce"),Nr(r.gasPrice||0,"gasPrice"),Nr(r.gasLimit||0,"gasLimit"),r.to!=null?_t(r.to):"0x",Nr(r.value||0,"value"),r.data||"0x",Z1(r.accessList||[])];if(e){const n=Zi(e);t.push(Nr(n.recoveryParam,"recoveryParam")),t.push(Cn(n.r)),t.push(Cn(n.s))}return gr(["0x01",qi(t)])}function V6(r,e){rl(r,q6);const t=[];X6.forEach(function(a){let s=r[a.name]||[];const u={};a.numeric&&(u.hexPad="left"),s=ae(se(s,u)),a.length&&s.length!==a.length&&s.length>0&&hr.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,s),a.maxLength&&(s=Cn(s),s.length>a.maxLength&&hr.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,s)),t.push(se(s))});let n=0;if(r.chainId!=null?(n=r.chainId,typeof n!="number"&&hr.throwArgumentError("invalid transaction.chainId","transaction",r)):e&&!Io(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(t.push(se(n)),t.push("0x"),t.push("0x")),!e)return qi(t);const i=Zi(e);let o=27+i.recoveryParam;return n!==0?(t.pop(),t.pop(),t.pop(),o+=n*2+8,i.v>28&&i.v!==o&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(se(o)),t.push(Cn(ae(i.r))),t.push(Cn(ae(i.s))),qi(t)}function hc(r,e){if(r.type==null||r.type===0)return r.accessList!=null&&hr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",r),V6(r,e);switch(r.type){case 1:return ep(r,e);case 2:return $1(r,e)}return hr.throwError(`unsupported transaction type: ${r.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:r.type})}function tp(r,e,t){try{const n=ur(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");r.v=n}catch{hr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}r.r=yt(e[1],32),r.s=yt(e[2],32);try{const n=gt(t(r));r.from=Lo(n,{r:r.r,s:r.s,recoveryParam:r.v})}catch{}}function K6(r){const e=os(r.slice(1));e.length!==9&&e.length!==12&&hr.throwArgumentError("invalid component count for transaction type: 2","payload",se(r));const t=ur(e[2]),n=ur(e[3]),i={type:2,chainId:ur(e[0]).toNumber(),nonce:ur(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:ur(e[4]),to:gl(e[5]),value:ur(e[6]),data:e[7],accessList:U0(e[8])};return e.length===9||(i.hash=gt(r),tp(i,e.slice(9),$1)),i}function Q6(r){const e=os(r.slice(1));e.length!==8&&e.length!==11&&hr.throwArgumentError("invalid component count for transaction type: 1","payload",se(r));const t={type:1,chainId:ur(e[0]).toNumber(),nonce:ur(e[1]).toNumber(),gasPrice:ur(e[2]),gasLimit:ur(e[3]),to:gl(e[4]),value:ur(e[5]),data:e[6],accessList:U0(e[7])};return e.length===8||(t.hash=gt(r),tp(t,e.slice(8),ep)),t}function W6(r){const e=os(r);e.length!==9&&e.length!==6&&hr.throwArgumentError("invalid raw transaction","rawTransaction",r);const t={nonce:ur(e[0]).toNumber(),gasPrice:ur(e[1]),gasLimit:ur(e[2]),to:gl(e[3]),value:ur(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=fe.from(e[6]).toNumber()}catch{return t}if(t.r=yt(e[7],32),t.s=yt(e[8],32),fe.from(t.r).isZero()&&fe.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let n=t.v-27;const i=e.slice(0,6);t.chainId!==0&&(i.push(se(t.chainId)),i.push("0x"),i.push("0x"),n-=t.chainId*2+8);const o=gt(qi(i));try{t.from=Lo(o,{r:se(t.r),s:se(t.s),recoveryParam:n})}catch{}t.hash=gt(r)}return t.type=null,t}function rp(r){const e=ae(r);if(e[0]>127)return W6(e);switch(e[0]){case 1:return Q6(e);case 2:return K6(e)}return hr.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const Y6=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return uc},computeAddress:ui,recoverAddress:Lo,accessListify:U0,serialize:hc,parse:rp},Symbol.toStringTag,{value:"Module"})),Z6="wordlists/5.7.0",$6=new q(Z6);class Uo{constructor(e){$6.checkAbstract(new.target,Uo),le(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let n=0;n<2048;n++){const i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";t.push(i)}return si(t.join(` `)+` -`)}static register(e,t){t||(t=e.locale)}}const Z6="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let so=null;function ku(r){if(so==null&&(so=Z6.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Lo.check(r)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw so=null,new Error("BIP39 Wordlist for en (English) FAILED")}class $6 extends Lo{constructor(){super("en")}getWord(e){return ku(this),so[e]}getWordIndex(e){return ku(this),so.indexOf(e)}}const rp=new $6;Lo.register(rp);const xi={en:rp},e5="hdnode/5.7.0",wo=new q(e5),t5=fe.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),r5=Jt("Bitcoin seed"),a0=2147483648;function np(r){return(1<=256)throw new Error("Depth too large!");return Pu(Et([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",se(this.depth),this.parentFingerprint,yt(se(this.index),4),this.chainCode,this.privateKey!=null?Et(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Fr(r0,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~a0));const n=new Uint8Array(37);if(e&a0){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ae(this.privateKey),1),t&&(t+="'")}else n.set(ae(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;const i=ae(vo(S0.sha512,this.chainCode,n)),o=i.slice(0,32),a=i.slice(32);let s=null,u=null;this.privateKey?s=ea(fe.from(o).add(this.privateKey).mod(t5)):u=new Ui(se(o))._addPoint(this.publicKey);let l=t;const h=this.mnemonic;return h&&(l=Object.freeze({phrase:h.phrase,path:t,locale:h.locale||"en"})),new Fr(r0,s,u,this.fingerprint,ea(a),e,this.depth+1,l)}derivePath(e){const t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=a0)throw new Error("invalid path index - "+o);n=n._derive(a0+a)}else if(o.match(/^[0-9]+$/)){const a=parseInt(o);if(a>=a0)throw new Error("invalid path index - "+o);n=n._derive(a)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,t){const n=ae(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ae(vo(S0.sha512,r5,n));return new Fr(r0,ea(i.slice(0,32)),null,"0x00000000",ea(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=ml(n),e=hs(us(e,n),n),Fr._fromSeed(ip(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Fr._fromSeed(e,null)}static fromExtendedKey(e){const t=A0.decode(e);(t.length!==82||Pu(t.slice(0,78))!==e)&&wo.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=t[4],i=se(t.slice(5,9)),o=parseInt(se(t.slice(9,13)).substring(2),16),a=se(t.slice(13,45)),s=t.slice(45,78);switch(se(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Fr(r0,null,se(s),i,a,o,n,null);case"0x0488ade4":case"0x04358394 ":if(s[0]!==0)break;return new Fr(r0,se(s.slice(1)),null,i,a,o,n,null)}return wo.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function ip(r,e){e||(e="");const t=Jt("mnemonic"+e,Tn.NFKD);return hl(Jt(r,Tn.NFKD),t,2048,64,"sha512")}function us(r,e){e=ml(e),wo.checkNormalize();const t=e.split(r);if(t.length%3!==0)throw new Error("invalid mnemonic");const n=ae(new Uint8Array(Math.ceil(11*t.length/8)));let i=0;for(let l=0;l>3]|=1<<7-i%8),i++}const o=32*t.length/3,a=t.length/3,s=np(a);if((ae(Wn(n.slice(0,o/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return se(n.slice(0,o/8))}function hs(r,e){if(e=ml(e),r=ae(r),r.length%4!==0||r.length<16||r.length>32)throw new Error("invalid entropy");const t=[0];let n=11;for(let a=0;a8?(t[t.length-1]<<=8,t[t.length-1]|=r[a],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=r[a]>>8-n,t.push(r[a]&n5(8-n)),n+=3);const i=r.length/4,o=ae(Wn(r))[0]&np(i);return t[t.length-1]<<=i,t[t.length-1]|=o>>8-i,e.join(t.map(a=>e.getWord(a)))}function i5(r,e){try{return us(r,e),!0}catch{}return!1}function o5(r){return(typeof r!="number"||r<0||r>=a0||r%1)&&wo.throwArgumentError("invalid account index","index",r),`m/44'/60'/${r}'/0/0`}const a5=Object.freeze(Object.defineProperty({__proto__:null,defaultPath:B0,HDNode:Fr,mnemonicToSeed:ip,mnemonicToEntropy:us,entropyToMnemonic:hs,isValidMnemonic:i5,getAccountPath:o5},Symbol.toStringTag,{value:"Module"})),s5=It(a5);var op={exports:{}};(function(r,e){(function(t){function n(x){return parseInt(x)===x}function i(x){if(!n(x.length))return!1;for(var c=0;c255)return!1;return!0}function o(x,c){if(x.buffer&&ArrayBuffer.isView(x)&&x.name==="Uint8Array")return c&&(x.slice?x=x.slice():x=Array.prototype.slice.call(x)),x;if(Array.isArray(x)){if(!i(x))throw new Error("Array contains invalid value: "+x);return new Uint8Array(x)}if(n(x.length)&&i(x))return new Uint8Array(x);throw new Error("unsupported array-like object")}function a(x){return new Uint8Array(x)}function s(x,c,y,T,d){(T!=null||d!=null)&&(x.slice?x=x.slice(T,d):x=Array.prototype.slice.call(x,T,d)),c.set(x,y)}var u=function(){function x(y){var T=[],d=0;for(y=encodeURI(y);d191&&N<224?(T.push(String.fromCharCode((N&31)<<6|y[d+1]&63)),d+=2):(T.push(String.fromCharCode((N&15)<<12|(y[d+1]&63)<<6|y[d+2]&63)),d+=3)}return T.join("")}return{toBytes:x,fromBytes:c}}(),l=function(){function x(T){for(var d=[],N=0;N>4]+c[G&15])}return d.join("")}return{toBytes:x,fromBytes:y}}(),h={16:10,24:12,32:14},b=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],m=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],A=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],_=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],S=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],C=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],M=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],B=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],P=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],R=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],I=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],D=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],O=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],J=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],X=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function H(x){for(var c=[],y=0;y>2,this._Ke[N][c%4]=d[c],this._Kd[x-N][c%4]=d[c];for(var G=0,U=T,z;U>16&255]<<24^m[z>>8&255]<<16^m[z&255]<<8^m[z>>24&255]^b[G]<<24,G+=1,T!=8)for(var c=1;c>8&255]<<8^m[z>>16&255]<<16^m[z>>24&255]<<24;for(var c=T/2+1;c>2,K=U%4,this._Ke[te][K]=d[c],this._Kd[x-te][K]=d[c++],U++}for(var te=1;te>24&255]^O[z>>16&255]^J[z>>8&255]^X[z&255]},L.prototype.encrypt=function(x){if(x.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var c=this._Ke.length-1,y=[0,0,0,0],T=H(x),d=0;d<4;d++)T[d]^=this._Ke[0][d];for(var N=1;N>24&255]^S[T[(d+1)%4]>>16&255]^C[T[(d+2)%4]>>8&255]^M[T[(d+3)%4]&255]^this._Ke[N][d];T=y.slice()}for(var G=a(16),U,d=0;d<4;d++)U=this._Ke[c][d],G[4*d]=(m[T[d]>>24&255]^U>>24)&255,G[4*d+1]=(m[T[(d+1)%4]>>16&255]^U>>16)&255,G[4*d+2]=(m[T[(d+2)%4]>>8&255]^U>>8)&255,G[4*d+3]=(m[T[(d+3)%4]&255]^U)&255;return G},L.prototype.decrypt=function(x){if(x.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var c=this._Kd.length-1,y=[0,0,0,0],T=H(x),d=0;d<4;d++)T[d]^=this._Kd[0][d];for(var N=1;N>24&255]^P[T[(d+3)%4]>>16&255]^R[T[(d+2)%4]>>8&255]^I[T[(d+1)%4]&255]^this._Kd[N][d];T=y.slice()}for(var G=a(16),U,d=0;d<4;d++)U=this._Kd[c][d],G[4*d]=(A[T[d]>>24&255]^U>>24)&255,G[4*d+1]=(A[T[(d+3)%4]>>16&255]^U>>16)&255,G[4*d+2]=(A[T[(d+2)%4]>>8&255]^U>>8)&255,G[4*d+3]=(A[T[(d+1)%4]&255]^U)&255;return G};var j=function(x){if(!(this instanceof j))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new L(x)};j.prototype.encrypt=function(x){if(x=o(x),x.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var c=a(x.length),y=a(16),T=0;T=0;--c)this._counter[c]=x%256,x=x>>8},g.prototype.setBytes=function(x){if(x=o(x,!0),x.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=x},g.prototype.increment=function(){for(var x=15;x>=0;x--)if(this._counter[x]===255)this._counter[x]=0;else{this._counter[x]++;break}};var w=function(x,c){if(!(this instanceof w))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",c instanceof g||(c=new g(c)),this._counter=c,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new L(x)};w.prototype.encrypt=function(x){for(var c=o(x,!0),y=0;y16)throw new Error("PKCS#7 padding byte out of range");for(var y=x.length-c,T=0;T=64;){let F=M,x=B,c=P,y=R,T=I,d=D,N=O,G=J,U,z,te,K,V;for(z=0;z<16;z++)te=E+z*4,X[z]=(w[te]&255)<<24|(w[te+1]&255)<<16|(w[te+2]&255)<<8|w[te+3]&255;for(z=16;z<64;z++)U=X[z-2],K=(U>>>17|U<<32-17)^(U>>>19|U<<32-19)^U>>>10,U=X[z-15],V=(U>>>7|U<<32-7)^(U>>>18|U<<32-18)^U>>>3,X[z]=(K+X[z-7]|0)+(V+X[z-16]|0)|0;for(z=0;z<64;z++)K=(((T>>>6|T<<32-6)^(T>>>11|T<<32-11)^(T>>>25|T<<32-25))+(T&d^~T&N)|0)+(G+(C[z]+X[z]|0)|0)|0,V=((F>>>2|F<<32-2)^(F>>>13|F<<32-13)^(F>>>22|F<<32-22))+(F&x^F&c^x&c)|0,G=N,N=d,d=T,T=y+K|0,y=c,c=x,x=F,F=K+V|0;M=M+F|0,B=B+x|0,P=P+c|0,R=R+y|0,I=I+T|0,D=D+d|0,O=O+N|0,J=J+G|0,E+=64,k-=64}}H(S);let L,j=S.length%64,v=S.length/536870912|0,f=S.length<<3,p=j<56?56:120,g=S.slice(S.length-j,S.length);for(g.push(128),L=j+1;L>>24&255),g.push(v>>>16&255),g.push(v>>>8&255),g.push(v>>>0&255),g.push(f>>>24&255),g.push(f>>>16&255),g.push(f>>>8&255),g.push(f>>>0&255),H(g),[M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255]}function o(S,C,M){S=S.length<=64?S:i(S);const B=64+C.length+4,P=new Array(B),R=new Array(64);let I,D=[];for(I=0;I<64;I++)P[I]=54;for(I=0;I=B-4;J--){if(P[J]++,P[J]<=255)return;P[J]=0}}for(;M>=32;)O(),D=D.concat(i(R.concat(i(P)))),M-=32;return M>0&&(O(),D=D.concat(i(R.concat(i(P))).slice(0,M))),D}function a(S,C,M,B,P){let R;for(h(S,(2*M-1)*16,P,0,16),R=0;R<2*M;R++)l(S,R*16,P,16),u(P,B),h(P,0,S,C+R*16,16);for(R=0;R>>32-C}function u(S,C){h(S,0,C,0,16);for(let M=8;M>0;M-=2)C[4]^=s(C[0]+C[12],7),C[8]^=s(C[4]+C[0],9),C[12]^=s(C[8]+C[4],13),C[0]^=s(C[12]+C[8],18),C[9]^=s(C[5]+C[1],7),C[13]^=s(C[9]+C[5],9),C[1]^=s(C[13]+C[9],13),C[5]^=s(C[1]+C[13],18),C[14]^=s(C[10]+C[6],7),C[2]^=s(C[14]+C[10],9),C[6]^=s(C[2]+C[14],13),C[10]^=s(C[6]+C[2],18),C[3]^=s(C[15]+C[11],7),C[7]^=s(C[3]+C[15],9),C[11]^=s(C[7]+C[3],13),C[15]^=s(C[11]+C[7],18),C[1]^=s(C[0]+C[3],7),C[2]^=s(C[1]+C[0],9),C[3]^=s(C[2]+C[1],13),C[0]^=s(C[3]+C[2],18),C[6]^=s(C[5]+C[4],7),C[7]^=s(C[6]+C[5],9),C[4]^=s(C[7]+C[6],13),C[5]^=s(C[4]+C[7],18),C[11]^=s(C[10]+C[9],7),C[8]^=s(C[11]+C[10],9),C[9]^=s(C[8]+C[11],13),C[10]^=s(C[9]+C[8],18),C[12]^=s(C[15]+C[14],7),C[13]^=s(C[12]+C[15],9),C[14]^=s(C[13]+C[12],13),C[15]^=s(C[14]+C[13],18);for(let M=0;M<16;++M)S[M]+=C[M]}function l(S,C,M,B){for(let P=0;P=256)return!1}return!0}function m(S,C){if(typeof S!="number"||S%1)throw new Error("invalid "+C);return S}function A(S,C,M,B,P,R,I){if(M=m(M,"N"),B=m(B,"r"),P=m(P,"p"),R=m(R,"dkLen"),M===0||(M&M-1)!==0)throw new Error("N must be power of 2");if(M>2147483647/128/B)throw new Error("N too large");if(B>2147483647/128/P)throw new Error("r too large");if(!b(S))throw new Error("password must be an array or buffer");if(S=Array.prototype.slice.call(S),!b(C))throw new Error("salt must be an array or buffer");C=Array.prototype.slice.call(C);let D=o(S,C,P*128*B);const O=new Uint32Array(P*32*B);for(let T=0;Tx&&(T=x);for(let N=0;Nx&&(T=x);for(let N=0;N>0&255),D.push(O[N]>>8&255),D.push(O[N]>>16&255),D.push(O[N]>>24&255);const d=o(S,D,R);return I&&I(null,1,d),d}I&&c(y)};if(!I)for(;;){const T=y();if(T!=null)return T}y()}const _={scrypt:function(S,C,M,B,P,R,I){return new Promise(function(D,O){let J=0;I&&I(0),A(S,C,M,B,P,R,function(X,H,L){if(X)O(X);else if(L)I&&J!==1&&I(1),D(new Uint8Array(L));else if(I&&H!==J)return J=H,I(H)})})},syncScrypt:function(S,C,M,B,P,R){return new Uint8Array(A(S,C,M,B,P,R))}};r.exports=_})()})(sp);const wl=sp.exports,h5="random/5.7.0",dc=new q(h5);function d5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const Ru=d5();let ma=Ru.crypto||Ru.msCrypto;(!ma||!ma.getRandomValues)&&(dc.warn("WARNING: Missing strong random number source"),ma={getRandomValues:function(r){return dc.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function l0(r){(r<=0||r>1024||r%1||r!=r)&&dc.throwArgumentError("invalid length","length",r);const e=new Uint8Array(r);return ma.getRandomValues(e),ae(e)}function p5(r){r=r.slice();for(let e=r.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1)),n=r[e];r[e]=r[t],r[t]=n}return r}const x5=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:l0,shuffled:p5},Symbol.toStringTag,{value:"Module"}));var b5=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const pc=new q(ap);function Nu(r){return r!=null&&r.mnemonic&&r.mnemonic.phrase}class g5 extends gi{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function m5(r,e,t){if(Dt(r,"crypto/cipher")==="aes-128-ctr"){const i=Ji(Dt(r,"crypto/cipherparams/iv")),o=new _n.Counter(i),a=new _n.ModeOfOperation.ctr(e,o);return ae(a.decrypt(t))}return null}function fp(r,e){const t=Ji(Dt(r,"crypto/ciphertext"));if(se(gt(Et([e.slice(16,32),t]))).substring(2)!==Dt(r,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=m5(r,e.slice(0,16),t);i||pc.throwError("unsupported cipher",q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),a=ui(i);if(r.address){let u=r.address.toLowerCase();if(u.substring(0,2)!=="0x"&&(u="0x"+u),_t(u)!==a)throw new Error("address mismatch")}const s={_isKeystoreAccount:!0,address:a,privateKey:se(i)};if(Dt(r,"x-ethers/version")==="0.1"){const u=Ji(Dt(r,"x-ethers/mnemonicCiphertext")),l=Ji(Dt(r,"x-ethers/mnemonicCounter")),h=new _n.Counter(l),b=new _n.ModeOfOperation.ctr(o,h),m=Dt(r,"x-ethers/path")||B0,A=Dt(r,"x-ethers/locale")||"en",_=ae(b.decrypt(u));try{const S=hs(_,A),C=Fr.fromMnemonic(S,null,A).derivePath(m);if(C.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=C.mnemonic}catch(S){if(S.code!==q.errors.INVALID_ARGUMENT||S.argument!=="wordlist")throw S}}return new g5(s)}function cp(r,e,t,n,i){return ae(hl(r,e,t,n,i))}function y5(r,e,t,n,i){return Promise.resolve(cp(r,e,t,n,i))}function lp(r,e,t,n,i){const o=yl(e),a=Dt(r,"crypto/kdf");if(a&&typeof a=="string"){const s=function(u,l){return pc.throwArgumentError("invalid key-derivation function parameters",u,l)};if(a.toLowerCase()==="scrypt"){const u=Ji(Dt(r,"crypto/kdfparams/salt")),l=parseInt(Dt(r,"crypto/kdfparams/n")),h=parseInt(Dt(r,"crypto/kdfparams/r")),b=parseInt(Dt(r,"crypto/kdfparams/p"));(!l||!h||!b)&&s("kdf",a),(l&l-1)!==0&&s("N",l);const m=parseInt(Dt(r,"crypto/kdfparams/dklen"));return m!==32&&s("dklen",m),n(o,u,l,h,b,64,i)}else if(a.toLowerCase()==="pbkdf2"){const u=Ji(Dt(r,"crypto/kdfparams/salt"));let l=null;const h=Dt(r,"crypto/kdfparams/prf");h==="hmac-sha256"?l="sha256":h==="hmac-sha512"?l="sha512":s("prf",h);const b=parseInt(Dt(r,"crypto/kdfparams/c")),m=parseInt(Dt(r,"crypto/kdfparams/dklen"));return m!==32&&s("dklen",m),t(o,u,b,m,l)}}return pc.throwArgumentError("unsupported key-derivation function","kdf",a)}function up(r,e){const t=JSON.parse(r),n=lp(t,e,cp,wl.syncScrypt);return fp(t,n)}function hp(r,e,t){return b5(this,void 0,void 0,function*(){const n=JSON.parse(r),i=yield lp(n,e,y5,wl.scrypt,t);return fp(n,i)})}function dp(r,e,t,n){try{if(_t(r.address)!==ui(r.privateKey))throw new Error("address/privateKey mismatch");if(Nu(r)){const C=r.mnemonic;if(Fr.fromMnemonic(C.phrase,null,C.locale).derivePath(C.path||B0).privateKey!=r.privateKey)throw new Error("mnemonic mismatch")}}catch(C){return Promise.reject(C)}typeof t=="function"&&!n&&(n=t,t={}),t||(t={});const i=ae(r.privateKey),o=yl(e);let a=null,s=null,u=null;if(Nu(r)){const C=r.mnemonic;a=ae(us(C.phrase,C.locale||"en")),s=C.path||B0,u=C.locale||"en"}let l=t.client;l||(l="ethers.js");let h=null;t.salt?h=ae(t.salt):h=l0(32);let b=null;if(t.iv){if(b=ae(t.iv),b.length!==16)throw new Error("invalid iv")}else b=l0(16);let m=null;if(t.uuid){if(m=ae(t.uuid),m.length!==16)throw new Error("invalid uuid")}else m=l0(16);let A=1<<17,_=8,S=1;return t.scrypt&&(t.scrypt.N&&(A=t.scrypt.N),t.scrypt.r&&(_=t.scrypt.r),t.scrypt.p&&(S=t.scrypt.p)),wl.scrypt(o,h,A,_,S,64,n).then(C=>{C=ae(C);const M=C.slice(0,16),B=C.slice(16,32),P=C.slice(32,64),R=new _n.Counter(b),I=new _n.ModeOfOperation.ctr(M,R),D=ae(I.encrypt(i)),O=gt(Et([B,D])),J={address:r.address.substring(2).toLowerCase(),id:f5(m),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:se(b).substring(2)},ciphertext:se(D).substring(2),kdf:"scrypt",kdfparams:{salt:se(h).substring(2),n:A,dklen:32,p:S,r:_},mac:O.substring(2)}};if(a){const X=l0(16),H=new _n.Counter(X),L=new _n.ModeOfOperation.ctr(P,H),j=ae(L.encrypt(a)),v=new Date,f=v.getUTCFullYear()+"-"+q0(v.getUTCMonth()+1,2)+"-"+q0(v.getUTCDate(),2)+"T"+q0(v.getUTCHours(),2)+"-"+q0(v.getUTCMinutes(),2)+"-"+q0(v.getUTCSeconds(),2)+".0Z";J["x-ethers"]={client:l,gethFilename:"UTC--"+f+"--"+J.address,mnemonicCounter:se(X).substring(2),mnemonicCiphertext:se(j).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(J)})}function pp(r,e,t){if(ds(r)){t&&t(0);const n=vl(r,e);return t&&t(1),Promise.resolve(n)}return ps(r)?hp(r,e,t):Promise.reject(new Error("invalid JSON wallet"))}function xp(r,e){if(ds(r))return vl(r,e);if(ps(r))return up(r,e);throw new Error("invalid JSON wallet")}const v5=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:vl,decryptKeystore:hp,decryptKeystoreSync:up,encryptKeystore:dp,isCrowdsaleWallet:ds,isKeystoreWallet:ps,getJsonWalletAddress:u5,decryptJsonWallet:pp,decryptJsonWalletSync:xp},Symbol.toStringTag,{value:"Module"})),w5=It(v5),A5=It(yb),bp=It(eb),Fu=It(k6),E5="solidity/5.7.0",_5=new RegExp("^bytes([0-9]+)$"),C5=new RegExp("^(u?int)([0-9]*)$"),S5=new RegExp("^(.*)\\[([0-9]*)\\]$"),B5="0000000000000000000000000000000000000000000000000000000000000000",s0=new q(E5);function gp(r,e,t){switch(r){case"address":return t?no(e,32):ae(e);case"string":return Jt(e);case"bytes":return ae(e);case"bool":return e=e?"0x01":"0x00",t?no(e,32):ae(e)}let n=r.match(C5);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&s0.throwArgumentError("invalid number type","type",r),t&&(i=256),e=fe.from(e).toTwos(i),no(e,i/8)}if(n=r.match(_5),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&s0.throwArgumentError("invalid bytes type","type",r),ae(e).byteLength!==i&&s0.throwArgumentError(`invalid value for ${r}`,"value",e),t?ae((e+B5).substring(0,66)):e}if(n=r.match(S5),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&s0.throwArgumentError(`invalid array length for ${r}`,"value",e);const a=[];return e.forEach(function(s){a.push(gp(i,s,!0))}),Et(a)}return s0.throwArgumentError("invalid type","type",r)}function Al(r,e){r.length!=e.length&&s0.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const t=[];return r.forEach(function(n,i){t.push(gp(n,e[i]))}),se(Et(t))}function M5(r,e){return gt(Al(r,e))}function k5(r,e){return Wn(Al(r,e))}const P5=Object.freeze(Object.defineProperty({__proto__:null,pack:Al,keccak256:M5,sha256:k5},Symbol.toStringTag,{value:"Module"})),R5=It(P5),N5=It(x5),mp=It(ub),F5=It(wb),T5=It(H6),M0=It(ag),I5=It(Q6),D5="units/5.7.0",yp=new q(D5),vp=["wei","kwei","mwei","gwei","szabo","finney","ether"];function O5(r){const e=String(r).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||r==="."||r==="-.")&&yp.throwArgumentError("invalid value","value",r);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const o=[];for(;t.length;)if(t.length<=3){o.unshift(t);break}else{const a=t.length-3;o.unshift(t.substring(a)),t=t.substring(0,a)}return n+o.join(",")+i}function wp(r,e){if(typeof e=="string"){const t=vp.indexOf(e);t!==-1&&(e=3*t)}return pa(r,e!=null?e:18)}function Ap(r,e){if(typeof r!="string"&&yp.throwArgumentError("value must be a string","value",r),typeof e=="string"){const t=vp.indexOf(e);t!==-1&&(e=3*t)}return dn(r,e!=null?e:18)}function L5(r){return wp(r,18)}function U5(r){return Ap(r,18)}const J5=Object.freeze(Object.defineProperty({__proto__:null,commify:O5,formatUnits:wp,parseUnits:Ap,formatEther:L5,parseEther:U5},Symbol.toStringTag,{value:"Module"})),H5=It(J5),G5="abstract-provider/5.7.0";var z5=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const j5=new q(G5);class X5 extends gi{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class xs{constructor(){j5.checkAbstract(new.target,xs),le(this,"_isProvider",!0)}getFeeData(){return z5(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield Ht({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(a=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=fe.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}const q5="abstract-signer/5.7.0";var Zr=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const $r=new q(q5),V5=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],K5=[q.errors.INSUFFICIENT_FUNDS,q.errors.NONCE_EXPIRED,q.errors.REPLACEMENT_UNDERPRICED];class bs{constructor(){$r.checkAbstract(new.target,bs),le(this,"_isSigner",!0)}getBalance(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Zr(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Ht(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Zr(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Ht(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return Zr(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)V5.indexOf(n)===-1&&$r.throwArgumentError("invalid transaction key: "+n,"transaction",e);const t=vr(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&$r.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return Zr(this,void 0,void 0,function*(){const t=yield Ht(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Zr(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&$r.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?$r.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&$r.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&$r.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):$r.throwError("failed to get consistent fee data",q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(K5.indexOf(i.code)>=0)throw i;return $r.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&$r.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ht(t)})}_checkProvider(e){this.provider||$r.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}const Q5="wallet/5.7.0";var Tu=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const n0=new q(Q5);function W5(r){return r!=null&<(r.privateKey,32)&&r.address!=null}function Y5(r){const e=r.mnemonic;return e&&e.phrase}class mn extends bs{constructor(e,t){if(super(),W5(e)){const n=new Ui(e.privateKey);if(le(this,"_signingKey",()=>n),le(this,"address",ui(this.publicKey)),this.address!==_t(e.address)&&n0.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Y5(e)){const i=e.mnemonic;le(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||B0,locale:i.locale||"en"}));const o=this.mnemonic,a=Fr.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);ui(a.privateKey)!==this.address&&n0.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else le(this,"_mnemonic",()=>null)}else{if(Ui.isSigningKey(e))e.curve!=="secp256k1"&&n0.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),le(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Ui(e);le(this,"_signingKey",()=>n)}le(this,"_mnemonic",()=>null),le(this,"address",ui(this.publicKey))}t&&!xs.isProvider(t)&&n0.throwArgumentError("invalid provider","provider",t),le(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new mn(this,e)}signTransaction(e){return Ht(e).then(t=>{t.from!=null&&(_t(t.from)!==this.address&&n0.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const n=this._signingKey().signDigest(gt(hc(t)));return hc(t,n)})}signMessage(e){return Tu(this,void 0,void 0,function*(){return rc(this._signingKey().signDigest(ll(e)))})}_signTypedData(e,t,n){return Tu(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,t,n,o=>(this.provider==null&&n0.throwError("cannot resolve ENS names without a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return rc(this._signingKey().signDigest(sr.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),dp(this,e,t,n)}static createRandom(e){let t=l0(16);e||(e={}),e.extraEntropy&&(t=ae(Ot(gt(Et([t,e.extraEntropy])),0,16)));const n=hs(t,e.locale);return mn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return pp(e,t,n).then(i=>new mn(i))}static fromEncryptedJsonSync(e,t){return new mn(xp(e,t))}static fromMnemonic(e,t,n){return t||(t=B0),new mn(Fr.fromMnemonic(e,null,n).derivePath(t))}}function Z5(r,e){return Oo(ll(r),e)}function $5(r,e,t,n){return Oo(sr.hash(r,e,t),n)}const e3=Object.freeze(Object.defineProperty({__proto__:null,Wallet:mn,verifyMessage:Z5,verifyTypedData:$5},Symbol.toStringTag,{value:"Module"})),t3=It(e3),r3="web/5.7.0";var n3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};function i3(r,e){return n3(this,void 0,void 0,function*(){e==null&&(e={});const t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){const a=e.fetchOptions;a.mode&&(t.mode=a.mode),a.cache&&(t.cache=a.cache),a.credentials&&(t.credentials=a.credentials),a.redirect&&(t.redirect=a.redirect),a.referrer&&(t.referrer=a.referrer)}const n=yield fetch(r,t),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((a,s)=>{o[s.toLowerCase()]=a}):n.headers.keys().forEach(a=>{o[a.toLowerCase()]=n.headers.get(a)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:ae(new Uint8Array(i))}})}var o3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const tn=new q(r3);function Iu(r){return new Promise(e=>{setTimeout(e,r)})}function ri(r,e){if(r==null)return null;if(typeof r=="string")return r;if(To(r)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return mi(r)}catch{}return se(r)}return r}function Ep(r,e,t){const n=typeof r=="object"&&r.throttleLimit!=null?r.throttleLimit:12;tn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof r=="object"?r.throttleCallback:null,o=typeof r=="object"&&typeof r.throttleSlotInterval=="number"?r.throttleSlotInterval:100;tn.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const a=typeof r=="object"?!!r.errorPassThrough:!1,s={};let u=null;const l={method:"GET"};let h=!1,b=2*60*1e3;if(typeof r=="string")u=r;else if(typeof r=="object"){if((r==null||r.url==null)&&tn.throwArgumentError("missing URL","connection.url",r),u=r.url,typeof r.timeout=="number"&&r.timeout>0&&(b=r.timeout),r.headers)for(const M in r.headers)s[M.toLowerCase()]={key:M,value:String(r.headers[M])},["if-none-match","if-modified-since"].indexOf(M.toLowerCase())>=0&&(h=!0);if(l.allowGzip=!!r.allowGzip,r.user!=null&&r.password!=null){u.substring(0,6)!=="https:"&&r.allowInsecureAuthentication!==!0&&tn.throwError("basic authentication requires a secure https url",q.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:r.user,password:"[REDACTED]"});const M=r.user+":"+r.password;s.authorization={key:"Authorization",value:"Basic "+cl(Jt(M))}}r.skipFetchSetup!=null&&(l.skipFetchSetup=!!r.skipFetchSetup),r.fetchOptions!=null&&(l.fetchOptions=vr(r.fetchOptions))}const m=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),A=u?u.match(m):null;if(A)try{const M={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]},body:fl(A[2])};let B=M.body;return t&&(B=t(M.body,M)),Promise.resolve(B)}catch(M){tn.throwError("processing response error",q.errors.SERVER_ERROR,{body:ri(A[1],A[2]),error:M,requestBody:null,requestMethod:"GET",url:u})}e&&(l.method="POST",l.body=e,s["content-type"]==null&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),s["content-length"]==null&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));const _={};Object.keys(s).forEach(M=>{const B=s[M];_[B.key]=B.value}),l.headers=_;const S=function(){let M=null;return{promise:new Promise(function(R,I){b&&(M=setTimeout(()=>{M!=null&&(M=null,I(tn.makeError("timeout",q.errors.TIMEOUT,{requestBody:ri(l.body,_["content-type"]),requestMethod:l.method,timeout:b,url:u})))},b))}),cancel:function(){M!=null&&(clearTimeout(M),M=null)}}}(),C=function(){return o3(this,void 0,void 0,function*(){for(let M=0;M=300)&&(S.cancel(),tn.throwError("bad response",q.errors.SERVER_ERROR,{status:B.statusCode,headers:B.headers,body:ri(P,B.headers?B.headers["content-type"]:null),requestBody:ri(l.body,_["content-type"]),requestMethod:l.method,url:u})),t)try{const R=yield t(P,B);return S.cancel(),R}catch(R){if(R.throttleRetry&&M{let s=null;if(o!=null)try{s=JSON.parse(mi(o))}catch(u){tn.throwError("invalid JSON",q.errors.SERVER_ERROR,{body:o,error:u})}return t&&(s=t(s,a)),s},i=null;if(e!=null){i=Jt(e);const o=typeof r=="string"?{url:r}:vr(r);o.headers?Object.keys(o.headers).filter(s=>s.toLowerCase()==="content-type").length!==0||(o.headers=vr(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},r=o}return Ep(r,i,n)}function u0(r,e){return e||(e={}),e=vr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,o=!1;const a=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{a()&&n(new Error("timeout"))},e.timeout));const s=e.retryLimit;let u=0;function l(){return r().then(function(h){if(h!==void 0)a()&&t(h);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!o){if(u++,u>s){a()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));be.ceiling&&(b=e.ceiling),setTimeout(l,b)}return null},function(h){a()&&n(h)})}l()})}const a3=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:Ep,fetchJson:gs,poll:u0},Symbol.toStringTag,{value:"Module"})),s3=It(a3);(function(r){var e=Be&&Be.__createBinding||(Object.create?function(L,j,v,f){f===void 0&&(f=v),Object.defineProperty(L,f,{enumerable:!0,get:function(){return j[v]}})}:function(L,j,v,f){f===void 0&&(f=v),L[f]=j[v]}),t=Be&&Be.__setModuleDefault||(Object.create?function(L,j){Object.defineProperty(L,"default",{enumerable:!0,value:j})}:function(L,j){L.default=j}),n=Be&&Be.__importStar||function(L){if(L&&L.__esModule)return L;var j={};if(L!=null)for(var v in L)v!=="default"&&Object.prototype.hasOwnProperty.call(L,v)&&e(j,L,v);return t(j,L),j};Object.defineProperty(r,"__esModule",{value:!0}),r.formatBytes32String=r.Utf8ErrorFuncs=r.toUtf8String=r.toUtf8CodePoints=r.toUtf8Bytes=r._toEscapedUtf8String=r.nameprep=r.hexDataSlice=r.hexDataLength=r.hexZeroPad=r.hexValue=r.hexStripZeros=r.hexConcat=r.isHexString=r.hexlify=r.base64=r.base58=r.TransactionDescription=r.LogDescription=r.Interface=r.SigningKey=r.HDNode=r.defaultPath=r.isBytesLike=r.isBytes=r.zeroPad=r.stripZeros=r.concat=r.arrayify=r.shallowCopy=r.resolveProperties=r.getStatic=r.defineReadOnly=r.deepCopy=r.checkProperties=r.poll=r.fetchJson=r._fetchData=r.RLP=r.Logger=r.checkResultErrors=r.FormatTypes=r.ParamType=r.FunctionFragment=r.EventFragment=r.ErrorFragment=r.ConstructorFragment=r.Fragment=r.defaultAbiCoder=r.AbiCoder=void 0,r.Indexed=r.Utf8ErrorReason=r.UnicodeNormalizationForm=r.SupportedAlgorithm=r.mnemonicToSeed=r.isValidMnemonic=r.entropyToMnemonic=r.mnemonicToEntropy=r.getAccountPath=r.verifyTypedData=r.verifyMessage=r.recoverPublicKey=r.computePublicKey=r.recoverAddress=r.computeAddress=r.getJsonWalletAddress=r.TransactionTypes=r.serializeTransaction=r.parseTransaction=r.accessListify=r.joinSignature=r.splitSignature=r.soliditySha256=r.solidityKeccak256=r.solidityPack=r.shuffled=r.randomBytes=r.sha512=r.sha256=r.ripemd160=r.keccak256=r.computeHmac=r.commify=r.parseUnits=r.formatUnits=r.parseEther=r.formatEther=r.isAddress=r.getCreate2Address=r.getContractAddress=r.getIcapAddress=r.getAddress=r._TypedDataEncoder=r.id=r.isValidName=r.namehash=r.hashMessage=r.dnsEncode=r.parseBytes32String=void 0;var i=Kg;Object.defineProperty(r,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(r,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(r,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(r,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}}),Object.defineProperty(r,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(r,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(r,"FormatTypes",{enumerable:!0,get:function(){return i.FormatTypes}}),Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(r,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(r,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(r,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(r,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(r,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(r,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}});var o=Qg;Object.defineProperty(r,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(r,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(r,"getContractAddress",{enumerable:!0,get:function(){return o.getContractAddress}}),Object.defineProperty(r,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(r,"isAddress",{enumerable:!0,get:function(){return o.isAddress}});var a=n(Wg);r.base64=a;var s=$g;Object.defineProperty(r,"base58",{enumerable:!0,get:function(){return s.Base58}});var u=C1;Object.defineProperty(r,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(r,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(r,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(r,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(r,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(r,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(r,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(r,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(r,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(r,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(r,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(r,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(r,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(r,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(r,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(r,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var l=S1;Object.defineProperty(r,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(r,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(r,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(r,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(r,"namehash",{enumerable:!0,get:function(){return l.namehash}});var h=s5;Object.defineProperty(r,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(r,"entropyToMnemonic",{enumerable:!0,get:function(){return h.entropyToMnemonic}}),Object.defineProperty(r,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(r,"HDNode",{enumerable:!0,get:function(){return h.HDNode}}),Object.defineProperty(r,"isValidMnemonic",{enumerable:!0,get:function(){return h.isValidMnemonic}}),Object.defineProperty(r,"mnemonicToEntropy",{enumerable:!0,get:function(){return h.mnemonicToEntropy}}),Object.defineProperty(r,"mnemonicToSeed",{enumerable:!0,get:function(){return h.mnemonicToSeed}});var b=w5;Object.defineProperty(r,"getJsonWalletAddress",{enumerable:!0,get:function(){return b.getJsonWalletAddress}});var m=A5;Object.defineProperty(r,"keccak256",{enumerable:!0,get:function(){return m.keccak256}});var A=bp;Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return A.Logger}});var _=Fu;Object.defineProperty(r,"computeHmac",{enumerable:!0,get:function(){return _.computeHmac}}),Object.defineProperty(r,"ripemd160",{enumerable:!0,get:function(){return _.ripemd160}}),Object.defineProperty(r,"sha256",{enumerable:!0,get:function(){return _.sha256}}),Object.defineProperty(r,"sha512",{enumerable:!0,get:function(){return _.sha512}});var S=R5;Object.defineProperty(r,"solidityKeccak256",{enumerable:!0,get:function(){return S.keccak256}}),Object.defineProperty(r,"solidityPack",{enumerable:!0,get:function(){return S.pack}}),Object.defineProperty(r,"soliditySha256",{enumerable:!0,get:function(){return S.sha256}});var C=N5;Object.defineProperty(r,"randomBytes",{enumerable:!0,get:function(){return C.randomBytes}}),Object.defineProperty(r,"shuffled",{enumerable:!0,get:function(){return C.shuffled}});var M=mp;Object.defineProperty(r,"checkProperties",{enumerable:!0,get:function(){return M.checkProperties}}),Object.defineProperty(r,"deepCopy",{enumerable:!0,get:function(){return M.deepCopy}}),Object.defineProperty(r,"defineReadOnly",{enumerable:!0,get:function(){return M.defineReadOnly}}),Object.defineProperty(r,"getStatic",{enumerable:!0,get:function(){return M.getStatic}}),Object.defineProperty(r,"resolveProperties",{enumerable:!0,get:function(){return M.resolveProperties}}),Object.defineProperty(r,"shallowCopy",{enumerable:!0,get:function(){return M.shallowCopy}});var B=n(F5);r.RLP=B;var P=T5;Object.defineProperty(r,"computePublicKey",{enumerable:!0,get:function(){return P.computePublicKey}}),Object.defineProperty(r,"recoverPublicKey",{enumerable:!0,get:function(){return P.recoverPublicKey}}),Object.defineProperty(r,"SigningKey",{enumerable:!0,get:function(){return P.SigningKey}});var R=M0;Object.defineProperty(r,"formatBytes32String",{enumerable:!0,get:function(){return R.formatBytes32String}}),Object.defineProperty(r,"nameprep",{enumerable:!0,get:function(){return R.nameprep}}),Object.defineProperty(r,"parseBytes32String",{enumerable:!0,get:function(){return R.parseBytes32String}}),Object.defineProperty(r,"_toEscapedUtf8String",{enumerable:!0,get:function(){return R._toEscapedUtf8String}}),Object.defineProperty(r,"toUtf8Bytes",{enumerable:!0,get:function(){return R.toUtf8Bytes}}),Object.defineProperty(r,"toUtf8CodePoints",{enumerable:!0,get:function(){return R.toUtf8CodePoints}}),Object.defineProperty(r,"toUtf8String",{enumerable:!0,get:function(){return R.toUtf8String}}),Object.defineProperty(r,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return R.Utf8ErrorFuncs}});var I=I5;Object.defineProperty(r,"accessListify",{enumerable:!0,get:function(){return I.accessListify}}),Object.defineProperty(r,"computeAddress",{enumerable:!0,get:function(){return I.computeAddress}}),Object.defineProperty(r,"parseTransaction",{enumerable:!0,get:function(){return I.parse}}),Object.defineProperty(r,"recoverAddress",{enumerable:!0,get:function(){return I.recoverAddress}}),Object.defineProperty(r,"serializeTransaction",{enumerable:!0,get:function(){return I.serialize}}),Object.defineProperty(r,"TransactionTypes",{enumerable:!0,get:function(){return I.TransactionTypes}});var D=H5;Object.defineProperty(r,"commify",{enumerable:!0,get:function(){return D.commify}}),Object.defineProperty(r,"formatEther",{enumerable:!0,get:function(){return D.formatEther}}),Object.defineProperty(r,"parseEther",{enumerable:!0,get:function(){return D.parseEther}}),Object.defineProperty(r,"formatUnits",{enumerable:!0,get:function(){return D.formatUnits}}),Object.defineProperty(r,"parseUnits",{enumerable:!0,get:function(){return D.parseUnits}});var O=t3;Object.defineProperty(r,"verifyMessage",{enumerable:!0,get:function(){return O.verifyMessage}}),Object.defineProperty(r,"verifyTypedData",{enumerable:!0,get:function(){return O.verifyTypedData}});var J=s3;Object.defineProperty(r,"_fetchData",{enumerable:!0,get:function(){return J._fetchData}}),Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return J.fetchJson}}),Object.defineProperty(r,"poll",{enumerable:!0,get:function(){return J.poll}});var X=Fu;Object.defineProperty(r,"SupportedAlgorithm",{enumerable:!0,get:function(){return X.SupportedAlgorithm}});var H=M0;Object.defineProperty(r,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return H.UnicodeNormalizationForm}}),Object.defineProperty(r,"Utf8ErrorReason",{enumerable:!0,get:function(){return H.Utf8ErrorReason}})})(Ir);var _p={exports:{}};(function(r){(function(e,t){function n(v,f){if(!v)throw new Error(f||"Assertion failed")}function i(v,f){v.super_=f;var p=function(){};p.prototype=f.prototype,v.prototype=new p,v.prototype.constructor=v}function o(v,f,p){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(v||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=el.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,g){if(typeof f=="number")return this._initNumber(f,p,g);if(typeof f=="object")return this._initArray(f,p,g);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w=0;w-=3)k=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[E]|=k<>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);else if(g==="le")for(w=0,E=0;w>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);return this._strip()};function s(v,f){var p=v.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+v)}function u(v,f,p){var g=s(v,p);return p-1>=f&&(g|=s(v,p-1)<<4),g}o.prototype._parseHex=function(f,p,g){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var w=0;w=p;w-=2)F=u(f,p,w)<=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8;else{var x=f.length-p;for(w=x%2===0?p+1:p;w=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8}this._strip()};function l(v,f,p,g){for(var w=0,E=0,k=Math.min(v.length,p),F=f;F=49?E=x-49+10:x>=17?E=x-17+10:E=x,n(x>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch{o.prototype.inspect=b}else o.prototype.inspect=b;function b(){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"],A=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var g;if(f===16||f==="hex"){g="";for(var w=0,E=0,k=0;k>>24-w&16777215,w+=2,w>=26&&(w-=26,k--),E!==0||k!==this.length-1?g=m[6-x.length]+x+g:g=x+g}for(E!==0&&(g=E.toString(16)+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(f===(f|0)&&f>=2&&f<=36){var c=A[f],y=_[f];g="";var T=this.clone();for(T.negative=0;!T.isZero();){var d=T.modrn(y).toString(f);T=T.idivn(y),T.isZero()?g=d+g:g=m[c-d.length]+d+g}for(this.isZero()&&(g="0"+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(a,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var S=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,g){this._strip();var w=this.byteLength(),E=g||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=S(f,E),F=p==="le"?"LE":"BE";return this["_toArrayLike"+F](k,w),k},o.prototype._toArrayLikeLE=function(f,p){for(var g=0,w=0,E=0,k=0;E>8&255),g>16&255),k===6?(g>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g=0&&(f[g--]=F>>8&255),g>=0&&(f[g--]=F>>16&255),k===6?(g>=0&&(f[g--]=F>>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g>=0)for(f[g--]=w;g>=0;)f[g--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,g=0;return p>=4096&&(g+=13,p>>>=13),p>=64&&(g+=7,p>>>=7),p>=8&&(g+=4,p>>>=4),p>=2&&(g+=2,p>>>=2),g+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,g=0;return(p&8191)===0&&(g+=13,p>>>=13),(p&127)===0&&(g+=7,p>>>=7),(p&15)===0&&(g+=4,p>>>=4),(p&3)===0&&(g+=2,p>>>=2),(p&1)===0&&g++,g},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function C(v){for(var f=new Array(v.bitLength()),p=0;p>>w&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var g=0;gf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,g;this.length>f.length?(p=this,g=f):(p=f,g=this);for(var w=0;wf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,g=f%26;this._expand(p),g>0&&p--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-g),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var g=f/26|0,w=f%26;return this._expand(g+1),p?this.words[g]=this.words[g]|1<f.length?(g=this,w=f):(g=f,w=this);for(var E=0,k=0;k>>26;for(;E!==0&&k>>26;if(this.length=g.length,E!==0)this.words[this.length]=E,this.length++;else if(g!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var g=this.cmp(f);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;g>0?(w=this,E=f):(w=f,E=this);for(var k=0,F=0;F>26,this.words[F]=p&67108863;for(;k!==0&&F>26,this.words[F]=p&67108863;if(k===0&&F>>26,T=x&67108863,d=Math.min(c,f.length-1),N=Math.max(0,c-v.length+1);N<=d;N++){var G=c-N|0;w=v.words[G]|0,E=f.words[N]|0,k=w*E+T,y+=k/67108864|0,T=k&67108863}p.words[c]=T|0,x=y|0}return x!==0?p.words[c]=x|0:p.length--,p._strip()}var B=function(f,p,g){var w=f.words,E=p.words,k=g.words,F=0,x,c,y,T=w[0]|0,d=T&8191,N=T>>>13,G=w[1]|0,U=G&8191,z=G>>>13,te=w[2]|0,K=te&8191,V=te>>>13,me=w[3]|0,Q=me&8191,oe=me>>>13,xt=w[4]|0,we=xt&8191,ge=xt>>>13,Ct=w[5]|0,Ae=Ct&8191,xe=Ct>>>13,ft=w[6]|0,de=ft&8191,Ce=ft>>>13,St=w[7]|0,pe=St&8191,Ee=St>>>13,wt=w[8]|0,W=wt&8191,ie=wt>>>13,Ft=w[9]|0,Se=Ft&8191,Fe=Ft>>>13,zt=E[0]|0,Me=zt&8191,Te=zt>>>13,Zt=E[1]|0,ke=Zt&8191,Ie=Zt>>>13,jt=E[2]|0,De=jt&8191,Pe=jt>>>13,$t=E[3]|0,Oe=$t&8191,Le=$t>>>13,Xt=E[4]|0,Ue=Xt&8191,Je=Xt>>>13,qt=E[5]|0,He=qt&8191,Re=qt>>>13,pt=E[6]|0,_e=pt&8191,Ne=pt>>>13,er=E[7]|0,ze=er&8191,je=er>>>13,xr=E[8]|0,Xe=xr&8191,qe=xr>>>13,br=E[9]|0,Ve=br&8191,Ke=br>>>13;g.negative=f.negative^p.negative,g.length=19,x=Math.imul(d,Me),c=Math.imul(d,Te),c=c+Math.imul(N,Me)|0,y=Math.imul(N,Te);var tr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(tr>>>26)|0,tr&=67108863,x=Math.imul(U,Me),c=Math.imul(U,Te),c=c+Math.imul(z,Me)|0,y=Math.imul(z,Te),x=x+Math.imul(d,ke)|0,c=c+Math.imul(d,Ie)|0,c=c+Math.imul(N,ke)|0,y=y+Math.imul(N,Ie)|0;var rr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(rr>>>26)|0,rr&=67108863,x=Math.imul(K,Me),c=Math.imul(K,Te),c=c+Math.imul(V,Me)|0,y=Math.imul(V,Te),x=x+Math.imul(U,ke)|0,c=c+Math.imul(U,Ie)|0,c=c+Math.imul(z,ke)|0,y=y+Math.imul(z,Ie)|0,x=x+Math.imul(d,De)|0,c=c+Math.imul(d,Pe)|0,c=c+Math.imul(N,De)|0,y=y+Math.imul(N,Pe)|0;var nr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(nr>>>26)|0,nr&=67108863,x=Math.imul(Q,Me),c=Math.imul(Q,Te),c=c+Math.imul(oe,Me)|0,y=Math.imul(oe,Te),x=x+Math.imul(K,ke)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(V,ke)|0,y=y+Math.imul(V,Ie)|0,x=x+Math.imul(U,De)|0,c=c+Math.imul(U,Pe)|0,c=c+Math.imul(z,De)|0,y=y+Math.imul(z,Pe)|0,x=x+Math.imul(d,Oe)|0,c=c+Math.imul(d,Le)|0,c=c+Math.imul(N,Oe)|0,y=y+Math.imul(N,Le)|0;var ir=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ir>>>26)|0,ir&=67108863,x=Math.imul(we,Me),c=Math.imul(we,Te),c=c+Math.imul(ge,Me)|0,y=Math.imul(ge,Te),x=x+Math.imul(Q,ke)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(oe,ke)|0,y=y+Math.imul(oe,Ie)|0,x=x+Math.imul(K,De)|0,c=c+Math.imul(K,Pe)|0,c=c+Math.imul(V,De)|0,y=y+Math.imul(V,Pe)|0,x=x+Math.imul(U,Oe)|0,c=c+Math.imul(U,Le)|0,c=c+Math.imul(z,Oe)|0,y=y+Math.imul(z,Le)|0,x=x+Math.imul(d,Ue)|0,c=c+Math.imul(d,Je)|0,c=c+Math.imul(N,Ue)|0,y=y+Math.imul(N,Je)|0;var or=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(or>>>26)|0,or&=67108863,x=Math.imul(Ae,Me),c=Math.imul(Ae,Te),c=c+Math.imul(xe,Me)|0,y=Math.imul(xe,Te),x=x+Math.imul(we,ke)|0,c=c+Math.imul(we,Ie)|0,c=c+Math.imul(ge,ke)|0,y=y+Math.imul(ge,Ie)|0,x=x+Math.imul(Q,De)|0,c=c+Math.imul(Q,Pe)|0,c=c+Math.imul(oe,De)|0,y=y+Math.imul(oe,Pe)|0,x=x+Math.imul(K,Oe)|0,c=c+Math.imul(K,Le)|0,c=c+Math.imul(V,Oe)|0,y=y+Math.imul(V,Le)|0,x=x+Math.imul(U,Ue)|0,c=c+Math.imul(U,Je)|0,c=c+Math.imul(z,Ue)|0,y=y+Math.imul(z,Je)|0,x=x+Math.imul(d,He)|0,c=c+Math.imul(d,Re)|0,c=c+Math.imul(N,He)|0,y=y+Math.imul(N,Re)|0;var wi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(wi>>>26)|0,wi&=67108863,x=Math.imul(de,Me),c=Math.imul(de,Te),c=c+Math.imul(Ce,Me)|0,y=Math.imul(Ce,Te),x=x+Math.imul(Ae,ke)|0,c=c+Math.imul(Ae,Ie)|0,c=c+Math.imul(xe,ke)|0,y=y+Math.imul(xe,Ie)|0,x=x+Math.imul(we,De)|0,c=c+Math.imul(we,Pe)|0,c=c+Math.imul(ge,De)|0,y=y+Math.imul(ge,Pe)|0,x=x+Math.imul(Q,Oe)|0,c=c+Math.imul(Q,Le)|0,c=c+Math.imul(oe,Oe)|0,y=y+Math.imul(oe,Le)|0,x=x+Math.imul(K,Ue)|0,c=c+Math.imul(K,Je)|0,c=c+Math.imul(V,Ue)|0,y=y+Math.imul(V,Je)|0,x=x+Math.imul(U,He)|0,c=c+Math.imul(U,Re)|0,c=c+Math.imul(z,He)|0,y=y+Math.imul(z,Re)|0,x=x+Math.imul(d,_e)|0,c=c+Math.imul(d,Ne)|0,c=c+Math.imul(N,_e)|0,y=y+Math.imul(N,Ne)|0;var Ai=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,x=Math.imul(pe,Me),c=Math.imul(pe,Te),c=c+Math.imul(Ee,Me)|0,y=Math.imul(Ee,Te),x=x+Math.imul(de,ke)|0,c=c+Math.imul(de,Ie)|0,c=c+Math.imul(Ce,ke)|0,y=y+Math.imul(Ce,Ie)|0,x=x+Math.imul(Ae,De)|0,c=c+Math.imul(Ae,Pe)|0,c=c+Math.imul(xe,De)|0,y=y+Math.imul(xe,Pe)|0,x=x+Math.imul(we,Oe)|0,c=c+Math.imul(we,Le)|0,c=c+Math.imul(ge,Oe)|0,y=y+Math.imul(ge,Le)|0,x=x+Math.imul(Q,Ue)|0,c=c+Math.imul(Q,Je)|0,c=c+Math.imul(oe,Ue)|0,y=y+Math.imul(oe,Je)|0,x=x+Math.imul(K,He)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(V,He)|0,y=y+Math.imul(V,Re)|0,x=x+Math.imul(U,_e)|0,c=c+Math.imul(U,Ne)|0,c=c+Math.imul(z,_e)|0,y=y+Math.imul(z,Ne)|0,x=x+Math.imul(d,ze)|0,c=c+Math.imul(d,je)|0,c=c+Math.imul(N,ze)|0,y=y+Math.imul(N,je)|0;var Ei=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,x=Math.imul(W,Me),c=Math.imul(W,Te),c=c+Math.imul(ie,Me)|0,y=Math.imul(ie,Te),x=x+Math.imul(pe,ke)|0,c=c+Math.imul(pe,Ie)|0,c=c+Math.imul(Ee,ke)|0,y=y+Math.imul(Ee,Ie)|0,x=x+Math.imul(de,De)|0,c=c+Math.imul(de,Pe)|0,c=c+Math.imul(Ce,De)|0,y=y+Math.imul(Ce,Pe)|0,x=x+Math.imul(Ae,Oe)|0,c=c+Math.imul(Ae,Le)|0,c=c+Math.imul(xe,Oe)|0,y=y+Math.imul(xe,Le)|0,x=x+Math.imul(we,Ue)|0,c=c+Math.imul(we,Je)|0,c=c+Math.imul(ge,Ue)|0,y=y+Math.imul(ge,Je)|0,x=x+Math.imul(Q,He)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(oe,He)|0,y=y+Math.imul(oe,Re)|0,x=x+Math.imul(K,_e)|0,c=c+Math.imul(K,Ne)|0,c=c+Math.imul(V,_e)|0,y=y+Math.imul(V,Ne)|0,x=x+Math.imul(U,ze)|0,c=c+Math.imul(U,je)|0,c=c+Math.imul(z,ze)|0,y=y+Math.imul(z,je)|0,x=x+Math.imul(d,Xe)|0,c=c+Math.imul(d,qe)|0,c=c+Math.imul(N,Xe)|0,y=y+Math.imul(N,qe)|0;var _i=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(_i>>>26)|0,_i&=67108863,x=Math.imul(Se,Me),c=Math.imul(Se,Te),c=c+Math.imul(Fe,Me)|0,y=Math.imul(Fe,Te),x=x+Math.imul(W,ke)|0,c=c+Math.imul(W,Ie)|0,c=c+Math.imul(ie,ke)|0,y=y+Math.imul(ie,Ie)|0,x=x+Math.imul(pe,De)|0,c=c+Math.imul(pe,Pe)|0,c=c+Math.imul(Ee,De)|0,y=y+Math.imul(Ee,Pe)|0,x=x+Math.imul(de,Oe)|0,c=c+Math.imul(de,Le)|0,c=c+Math.imul(Ce,Oe)|0,y=y+Math.imul(Ce,Le)|0,x=x+Math.imul(Ae,Ue)|0,c=c+Math.imul(Ae,Je)|0,c=c+Math.imul(xe,Ue)|0,y=y+Math.imul(xe,Je)|0,x=x+Math.imul(we,He)|0,c=c+Math.imul(we,Re)|0,c=c+Math.imul(ge,He)|0,y=y+Math.imul(ge,Re)|0,x=x+Math.imul(Q,_e)|0,c=c+Math.imul(Q,Ne)|0,c=c+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Ne)|0,x=x+Math.imul(K,ze)|0,c=c+Math.imul(K,je)|0,c=c+Math.imul(V,ze)|0,y=y+Math.imul(V,je)|0,x=x+Math.imul(U,Xe)|0,c=c+Math.imul(U,qe)|0,c=c+Math.imul(z,Xe)|0,y=y+Math.imul(z,qe)|0,x=x+Math.imul(d,Ve)|0,c=c+Math.imul(d,Ke)|0,c=c+Math.imul(N,Ve)|0,y=y+Math.imul(N,Ke)|0;var Ci=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,x=Math.imul(Se,ke),c=Math.imul(Se,Ie),c=c+Math.imul(Fe,ke)|0,y=Math.imul(Fe,Ie),x=x+Math.imul(W,De)|0,c=c+Math.imul(W,Pe)|0,c=c+Math.imul(ie,De)|0,y=y+Math.imul(ie,Pe)|0,x=x+Math.imul(pe,Oe)|0,c=c+Math.imul(pe,Le)|0,c=c+Math.imul(Ee,Oe)|0,y=y+Math.imul(Ee,Le)|0,x=x+Math.imul(de,Ue)|0,c=c+Math.imul(de,Je)|0,c=c+Math.imul(Ce,Ue)|0,y=y+Math.imul(Ce,Je)|0,x=x+Math.imul(Ae,He)|0,c=c+Math.imul(Ae,Re)|0,c=c+Math.imul(xe,He)|0,y=y+Math.imul(xe,Re)|0,x=x+Math.imul(we,_e)|0,c=c+Math.imul(we,Ne)|0,c=c+Math.imul(ge,_e)|0,y=y+Math.imul(ge,Ne)|0,x=x+Math.imul(Q,ze)|0,c=c+Math.imul(Q,je)|0,c=c+Math.imul(oe,ze)|0,y=y+Math.imul(oe,je)|0,x=x+Math.imul(K,Xe)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(V,Xe)|0,y=y+Math.imul(V,qe)|0,x=x+Math.imul(U,Ve)|0,c=c+Math.imul(U,Ke)|0,c=c+Math.imul(z,Ve)|0,y=y+Math.imul(z,Ke)|0;var Si=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Si>>>26)|0,Si&=67108863,x=Math.imul(Se,De),c=Math.imul(Se,Pe),c=c+Math.imul(Fe,De)|0,y=Math.imul(Fe,Pe),x=x+Math.imul(W,Oe)|0,c=c+Math.imul(W,Le)|0,c=c+Math.imul(ie,Oe)|0,y=y+Math.imul(ie,Le)|0,x=x+Math.imul(pe,Ue)|0,c=c+Math.imul(pe,Je)|0,c=c+Math.imul(Ee,Ue)|0,y=y+Math.imul(Ee,Je)|0,x=x+Math.imul(de,He)|0,c=c+Math.imul(de,Re)|0,c=c+Math.imul(Ce,He)|0,y=y+Math.imul(Ce,Re)|0,x=x+Math.imul(Ae,_e)|0,c=c+Math.imul(Ae,Ne)|0,c=c+Math.imul(xe,_e)|0,y=y+Math.imul(xe,Ne)|0,x=x+Math.imul(we,ze)|0,c=c+Math.imul(we,je)|0,c=c+Math.imul(ge,ze)|0,y=y+Math.imul(ge,je)|0,x=x+Math.imul(Q,Xe)|0,c=c+Math.imul(Q,qe)|0,c=c+Math.imul(oe,Xe)|0,y=y+Math.imul(oe,qe)|0,x=x+Math.imul(K,Ve)|0,c=c+Math.imul(K,Ke)|0,c=c+Math.imul(V,Ve)|0,y=y+Math.imul(V,Ke)|0;var Bi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,x=Math.imul(Se,Oe),c=Math.imul(Se,Le),c=c+Math.imul(Fe,Oe)|0,y=Math.imul(Fe,Le),x=x+Math.imul(W,Ue)|0,c=c+Math.imul(W,Je)|0,c=c+Math.imul(ie,Ue)|0,y=y+Math.imul(ie,Je)|0,x=x+Math.imul(pe,He)|0,c=c+Math.imul(pe,Re)|0,c=c+Math.imul(Ee,He)|0,y=y+Math.imul(Ee,Re)|0,x=x+Math.imul(de,_e)|0,c=c+Math.imul(de,Ne)|0,c=c+Math.imul(Ce,_e)|0,y=y+Math.imul(Ce,Ne)|0,x=x+Math.imul(Ae,ze)|0,c=c+Math.imul(Ae,je)|0,c=c+Math.imul(xe,ze)|0,y=y+Math.imul(xe,je)|0,x=x+Math.imul(we,Xe)|0,c=c+Math.imul(we,qe)|0,c=c+Math.imul(ge,Xe)|0,y=y+Math.imul(ge,qe)|0,x=x+Math.imul(Q,Ve)|0,c=c+Math.imul(Q,Ke)|0,c=c+Math.imul(oe,Ve)|0,y=y+Math.imul(oe,Ke)|0;var Mi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,x=Math.imul(Se,Ue),c=Math.imul(Se,Je),c=c+Math.imul(Fe,Ue)|0,y=Math.imul(Fe,Je),x=x+Math.imul(W,He)|0,c=c+Math.imul(W,Re)|0,c=c+Math.imul(ie,He)|0,y=y+Math.imul(ie,Re)|0,x=x+Math.imul(pe,_e)|0,c=c+Math.imul(pe,Ne)|0,c=c+Math.imul(Ee,_e)|0,y=y+Math.imul(Ee,Ne)|0,x=x+Math.imul(de,ze)|0,c=c+Math.imul(de,je)|0,c=c+Math.imul(Ce,ze)|0,y=y+Math.imul(Ce,je)|0,x=x+Math.imul(Ae,Xe)|0,c=c+Math.imul(Ae,qe)|0,c=c+Math.imul(xe,Xe)|0,y=y+Math.imul(xe,qe)|0,x=x+Math.imul(we,Ve)|0,c=c+Math.imul(we,Ke)|0,c=c+Math.imul(ge,Ve)|0,y=y+Math.imul(ge,Ke)|0;var ki=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ki>>>26)|0,ki&=67108863,x=Math.imul(Se,He),c=Math.imul(Se,Re),c=c+Math.imul(Fe,He)|0,y=Math.imul(Fe,Re),x=x+Math.imul(W,_e)|0,c=c+Math.imul(W,Ne)|0,c=c+Math.imul(ie,_e)|0,y=y+Math.imul(ie,Ne)|0,x=x+Math.imul(pe,ze)|0,c=c+Math.imul(pe,je)|0,c=c+Math.imul(Ee,ze)|0,y=y+Math.imul(Ee,je)|0,x=x+Math.imul(de,Xe)|0,c=c+Math.imul(de,qe)|0,c=c+Math.imul(Ce,Xe)|0,y=y+Math.imul(Ce,qe)|0,x=x+Math.imul(Ae,Ve)|0,c=c+Math.imul(Ae,Ke)|0,c=c+Math.imul(xe,Ve)|0,y=y+Math.imul(xe,Ke)|0;var Pi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,x=Math.imul(Se,_e),c=Math.imul(Se,Ne),c=c+Math.imul(Fe,_e)|0,y=Math.imul(Fe,Ne),x=x+Math.imul(W,ze)|0,c=c+Math.imul(W,je)|0,c=c+Math.imul(ie,ze)|0,y=y+Math.imul(ie,je)|0,x=x+Math.imul(pe,Xe)|0,c=c+Math.imul(pe,qe)|0,c=c+Math.imul(Ee,Xe)|0,y=y+Math.imul(Ee,qe)|0,x=x+Math.imul(de,Ve)|0,c=c+Math.imul(de,Ke)|0,c=c+Math.imul(Ce,Ve)|0,y=y+Math.imul(Ce,Ke)|0;var Ri=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,x=Math.imul(Se,ze),c=Math.imul(Se,je),c=c+Math.imul(Fe,ze)|0,y=Math.imul(Fe,je),x=x+Math.imul(W,Xe)|0,c=c+Math.imul(W,qe)|0,c=c+Math.imul(ie,Xe)|0,y=y+Math.imul(ie,qe)|0,x=x+Math.imul(pe,Ve)|0,c=c+Math.imul(pe,Ke)|0,c=c+Math.imul(Ee,Ve)|0,y=y+Math.imul(Ee,Ke)|0;var Ni=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,x=Math.imul(Se,Xe),c=Math.imul(Se,qe),c=c+Math.imul(Fe,Xe)|0,y=Math.imul(Fe,qe),x=x+Math.imul(W,Ve)|0,c=c+Math.imul(W,Ke)|0,c=c+Math.imul(ie,Ve)|0,y=y+Math.imul(ie,Ke)|0;var Fi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,x=Math.imul(Se,Ve),c=Math.imul(Se,Ke),c=c+Math.imul(Fe,Ve)|0,y=Math.imul(Fe,Ke);var Ti=(F+x|0)+((c&8191)<<13)|0;return F=(y+(c>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,k[0]=tr,k[1]=rr,k[2]=nr,k[3]=ir,k[4]=or,k[5]=wi,k[6]=Ai,k[7]=Ei,k[8]=_i,k[9]=Ci,k[10]=Si,k[11]=Bi,k[12]=Mi,k[13]=ki,k[14]=Pi,k[15]=Ri,k[16]=Ni,k[17]=Fi,k[18]=Ti,F!==0&&(k[19]=F,g.length++),g};Math.imul||(B=M);function P(v,f,p){p.negative=f.negative^v.negative,p.length=v.length+f.length;for(var g=0,w=0,E=0;E>>26)|0,w+=k>>>26,k&=67108863}p.words[E]=F,g=k,k=w}return g!==0?p.words[E]=g:p.length--,p._strip()}function R(v,f,p){return P(v,f,p)}o.prototype.mulTo=function(f,p){var g,w=this.length+f.length;return this.length===10&&f.length===10?g=B(this,f,p):w<63?g=M(this,f,p):w<1024?g=P(this,f,p):g=R(this,f,p),g},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),R(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var g=0,w=0;w>=26,g+=E/67108864|0,g+=k>>>26,this.words[w]=k&67108863}return g!==0&&(this.words[w]=g,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=C(f);if(p.length===0)return new o(1);for(var g=this,w=0;w=0);var p=f%26,g=(f-p)/26,w=67108863>>>26-p<<26-p,E;if(p!==0){var k=0;for(E=0;E>>26-p}k&&(this.words[E]=k,this.length++)}if(g!==0){for(E=this.length-1;E>=0;E--)this.words[E+g]=this.words[E];for(E=0;E=0);var w;p?w=(p-p%26)/26:w=0;var E=f%26,k=Math.min((f-E)/26,this.length),F=67108863^67108863>>>E<k)for(this.length-=k,c=0;c=0&&(y!==0||c>=w);c--){var T=this.words[c]|0;this.words[c]=y<<26-E|T>>>E,y=T&F}return x&&y!==0&&(x.words[x.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,g){return n(this.negative===0),this.iushrn(f,p,g)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,g=(f-p)/26,w=1<=0);var p=f%26,g=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(p!==0&&g++,this.length=Math.min(g,this.length),p!==0){var w=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(x/67108864|0),this.words[E+g]=k&67108863}for(;E>26,this.words[E+g]=k&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,E=0;E>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var g=this.length-f.length,w=this.clone(),E=f,k=E.words[E.length-1]|0,F=this._countBits(k);g=26-F,g!==0&&(E=E.ushln(g),w.iushln(g),k=E.words[E.length-1]|0);var x=w.length-E.length,c;if(p!=="mod"){c=new o(null),c.length=x+1,c.words=new Array(c.length);for(var y=0;y=0;d--){var N=(w.words[E.length+d]|0)*67108864+(w.words[E.length+d-1]|0);for(N=Math.min(N/k|0,67108863),w._ishlnsubmul(E,N,d);w.negative!==0;)N--,w.negative=0,w._ishlnsubmul(E,1,d),w.isZero()||(w.negative^=1);c&&(c.words[d]=N)}return c&&c._strip(),w._strip(),p!=="div"&&g!==0&&w.iushrn(g),{div:c||null,mod:w}},o.prototype.divmod=function(f,p,g){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,p),p!=="mod"&&(w=k.div.neg()),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.iadd(f)),{div:w,mod:E}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),p),p!=="mod"&&(w=k.div.neg()),{div:w,mod:k.mod}):(this.negative&f.negative)!==0?(k=this.neg().divmod(f.neg(),p),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.isub(f)),{div:k.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var g=p.div.negative!==0?p.mod.isub(f):p.mod,w=f.ushrn(1),E=f.andln(1),k=g.cmp(w);return k<0||E===1&&k===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=(1<<26)%f,w=0,E=this.length-1;E>=0;E--)w=(g*w+(this.words[E]|0))%f;return p?-w:w},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+g*67108864;this.words[w]=E/f|0,g=E%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=new o(0),F=new o(1),x=0;p.isEven()&&g.isEven();)p.iushrn(1),g.iushrn(1),++x;for(var c=g.clone(),y=p.clone();!p.isZero();){for(var T=0,d=1;(p.words[0]&d)===0&&T<26;++T,d<<=1);if(T>0)for(p.iushrn(T);T-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(y)),w.iushrn(1),E.iushrn(1);for(var N=0,G=1;(g.words[0]&G)===0&&N<26;++N,G<<=1);if(N>0)for(g.iushrn(N);N-- >0;)(k.isOdd()||F.isOdd())&&(k.iadd(c),F.isub(y)),k.iushrn(1),F.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(k),E.isub(F)):(g.isub(p),k.isub(w),F.isub(E))}return{a:k,b:F,gcd:g.iushln(x)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=g.clone();p.cmpn(1)>0&&g.cmpn(1)>0;){for(var F=0,x=1;(p.words[0]&x)===0&&F<26;++F,x<<=1);if(F>0)for(p.iushrn(F);F-- >0;)w.isOdd()&&w.iadd(k),w.iushrn(1);for(var c=0,y=1;(g.words[0]&y)===0&&c<26;++c,y<<=1);if(c>0)for(g.iushrn(c);c-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(E)):(g.isub(p),E.isub(w))}var T;return p.cmpn(1)===0?T=w:T=E,T.cmpn(0)<0&&T.iadd(f),T},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),g=f.clone();p.negative=0,g.negative=0;for(var w=0;p.isEven()&&g.isEven();w++)p.iushrn(1),g.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;g.isEven();)g.iushrn(1);var E=p.cmp(g);if(E<0){var k=p;p=g,g=k}else if(E===0||g.cmpn(1)===0)break;p.isub(g)}while(!0);return g.iushln(w)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,g=(f-p)/26,w=1<>>26,F&=67108863,this.words[k]=F}return E!==0&&(this.words[k]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var g;if(this.length>1)g=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var w=this.words[0]|0;g=w===f?0:wf.length)return 1;if(this.length=0;g--){var w=this.words[g]|0,E=f.words[g]|0;if(w!==E){wE&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new L(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function D(v,f){this.name=v,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,g;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),g=p.bitLength();while(g>this.n);var w=g0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function O(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(O,D),O.prototype.split=function(f,p){for(var g=4194303,w=Math.min(f.length,9),E=0;E>>22,k=F}k>>>=22,f.words[E-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},O.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,g=0;g>>=26,f.words[g]=E,p=w}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(I[f])return I[f];var p;if(f==="k256")p=new O;else if(f==="p224")p=new J;else if(f==="p192")p=new X;else if(f==="p25519")p=new H;else throw new Error("Unknown prime "+f);return I[f]=p,p};function L(v){if(typeof v=="string"){var f=o._prime(v);this.m=f.p,this.prime=f}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}L.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},L.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},L.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(h(f,f.umod(this.m)._forceRed(this)),f)},L.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},L.prototype.add=function(f,p){this._verify2(f,p);var g=f.add(p);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},L.prototype.iadd=function(f,p){this._verify2(f,p);var g=f.iadd(p);return g.cmp(this.m)>=0&&g.isub(this.m),g},L.prototype.sub=function(f,p){this._verify2(f,p);var g=f.sub(p);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},L.prototype.isub=function(f,p){this._verify2(f,p);var g=f.isub(p);return g.cmpn(0)<0&&g.iadd(this.m),g},L.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},L.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},L.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},L.prototype.isqr=function(f){return this.imul(f,f.clone())},L.prototype.sqr=function(f){return this.mul(f,f)},L.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var g=this.m.add(new o(1)).iushrn(2);return this.pow(f,g)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var k=new o(1).toRed(this),F=k.redNeg(),x=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,x).cmp(F)!==0;)c.redIAdd(F);for(var y=this.pow(c,w),T=this.pow(f,w.addn(1).iushrn(1)),d=this.pow(f,w),N=E;d.cmp(k)!==0;){for(var G=d,U=0;G.cmp(k)!==0;U++)G=G.redSqr();n(U=0;E--){for(var y=p.words[E],T=c-1;T>=0;T--){var d=y>>T&1;if(k!==w[0]&&(k=this.sqr(k)),d===0&&F===0){x=0;continue}F<<=1,F|=d,x++,!(x!==g&&(E!==0||T!==0))&&(k=this.mul(k,w[F]),x=0,F=0)}c=26}return k},L.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},L.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new j(f)};function j(v){L.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,L),j.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},j.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},j.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var g=f.imul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var g=f.mul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(r,Be)})(_p);const f3=_p.exports,c3="logger/5.7.0";let Du=!1,Ou=!1;const ya={debug:1,default:2,info:2,warning:3,error:4,off:5};let Lu=ya.default,Vs=null;function l3(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const Uu=l3();var xc;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(xc||(xc={}));var rn;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(rn||(rn={}));const Ju="0123456789abcdef";class ce{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();ya[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Lu>ya[n])&&console.log.apply(console,t)}debug(...e){this._log(ce.levels.DEBUG,e)}info(...e){this._log(ce.levels.INFO,e)}warn(...e){this._log(ce.levels.WARNING,e)}makeError(e,t,n){if(Ou)return this.makeError("censored error",t,{});t||(t=ce.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let h="";for(let b=0;b>4],h+=Ju[l[b]&15];i.push(u+"=Uint8Array(0x"+h+")")}else i.push(u+"="+JSON.stringify(l))}catch{i.push(u+"="+JSON.stringify(n[u].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const o=e;let a="";switch(t){case rn.NUMERIC_FAULT:{a="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":a+="-"+u;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case rn.CALL_EXCEPTION:case rn.INSUFFICIENT_FUNDS:case rn.MISSING_NEW:case rn.NONCE_EXPIRED:case rn.REPLACEMENT_UNDERPRICED:case rn.TRANSACTION_REPLACED:case rn.UNPREDICTABLE_GAS_LIMIT:a=t;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(n).forEach(function(u){s[u]=n[u]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,ce.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){Uu&&this.throwError("platform missing String.prototype.normalize",ce.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Uu})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,ce.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",ce.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Vs||(Vs=new ce(c3)),Vs}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Du){if(!e)return;this.globalLogger().throwError("error censorship permanent",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ou=!!e,Du=!!t}static setLogLevel(e){const t=ya[e.toLowerCase()];if(t==null){ce.globalLogger().warn("invalid log level - "+e);return}Lu=t}static from(e){return new ce(e)}}ce.errors=rn;ce.levels=xc;const u3="bytes/5.7.0",Vn=new ce(u3);function Cp(r){return!!r.toHexString}function fo(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return fo(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function h3(r){return wr(r)&&!(r.length%2)||Uo(r)}function Hu(r){return typeof r=="number"&&r==r&&r%1===0}function Uo(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!Hu(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Wt(r,e){if(e||(e={}),typeof r=="number"){Vn.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),fo(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Cp(r)&&(r=r.toHexString()),wr(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Vn.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;iWt(i)),t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),fo(n)}function d3(r){let e=Wt(r);if(e.length===0)return e;let t=0;for(;t>4]+Ks[i&15]}return t}return Vn.throwArgumentError("invalid hexlify value","value",r)}function p3(r){if(typeof r!="string")r=Pt(r);else if(!wr(r)||r.length%2)return null;return(r.length-2)/2}function Sp(r,e,t){return typeof r!="string"?r=Pt(r):(!wr(r)||r.length%2)&&Vn.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function x3(r){let e="0x";return r.forEach(t=>{e+=Pt(t).substring(2)}),e}function Bp(r,e){for(typeof r!="string"?r=Pt(r):wr(r)||Vn.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Vn.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}const b3="bignumber/5.7.0";var Ga=f3.BN;const Hn=new ce(b3),Qs={},Gu=9007199254740991;let zu=!1;class it{constructor(e,t){e!==Qs&&Hn.throwError("cannot call constructor directly; use BigNumber.from",ce.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return _r(rt(this).fromTwos(e))}toTwos(e){return _r(rt(this).toTwos(e))}abs(){return this._hex[0]==="-"?it.from(this._hex.substring(1)):this}add(e){return _r(rt(this).add(rt(e)))}sub(e){return _r(rt(this).sub(rt(e)))}div(e){return it.from(e).isZero()&&Gr("division-by-zero","div"),_r(rt(this).div(rt(e)))}mul(e){return _r(rt(this).mul(rt(e)))}mod(e){const t=rt(e);return t.isNeg()&&Gr("division-by-zero","mod"),_r(rt(this).umod(t))}pow(e){const t=rt(e);return t.isNeg()&&Gr("negative-power","pow"),_r(rt(this).pow(t))}and(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","and"),_r(rt(this).and(t))}or(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","or"),_r(rt(this).or(t))}xor(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","xor"),_r(rt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Gr("negative-width","mask"),_r(rt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Gr("negative-width","shl"),_r(rt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Gr("negative-width","shr"),_r(rt(this).shrn(e))}eq(e){return rt(this).eq(rt(e))}lt(e){return rt(this).lt(rt(e))}lte(e){return rt(this).lte(rt(e))}gt(e){return rt(this).gt(rt(e))}gte(e){return rt(this).gte(rt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return rt(this).isZero()}toNumber(){try{return rt(this).toNumber()}catch{Gr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Hn.throwError("this platform does not support BigInt",ce.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?zu||(zu=!0,Hn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Hn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ce.errors.UNEXPECTED_ARGUMENT,{}):Hn.throwError("BigNumber.toString does not accept parameters",ce.errors.UNEXPECTED_ARGUMENT,{})),rt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof it)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new it(Qs,Ao(e)):e.match(/^-?[0-9]+$/)?new it(Qs,Ao(new Ga(e))):Hn.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Gr("underflow","BigNumber.from",e),(e>=Gu||e<=-Gu)&&Gr("overflow","BigNumber.from",e),it.from(String(e));const t=e;if(typeof t=="bigint")return it.from(t.toString());if(Uo(t))return it.from(Pt(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return it.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(wr(n)||n[0]==="-"&&wr(n.substring(1))))return it.from(n)}return Hn.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Ao(r){if(typeof r!="string")return Ao(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Hn.throwArgumentError("invalid hex","value",r),r=Ao(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function _r(r){return it.from(Ao(r))}function rt(r){const e=it.from(r).toHexString();return e[0]==="-"?new Ga("-"+e.substring(3),16):new Ga(e.substring(2),16)}function Gr(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Hn.throwError(r,ce.errors.NUMERIC_FAULT,n)}function g3(r){return new Ga(r,36).toString(16)}const m3="properties/5.7.0";var y3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Mp=new ce(m3);function ve(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}function fi(r,e){for(let t=0;t<32;t++){if(r[e])return r[e];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}function ci(r){return y3(this,void 0,void 0,function*(){const e=Object.keys(r).map(n=>{const i=r[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Ki(r){const e={};for(const t in r)e[t]=r[t];return e}const v3={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function kp(r){if(r==null||v3[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const e=Object.keys(r);for(let t=0;tEo(e)));if(typeof r=="object"){const e={};for(const t in r){const n=r[t];n!==void 0&&ve(e,t,Eo(n))}return e}return Mp.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function Eo(r){return w3(r)}class ms{constructor(e){for(const t in e)this[t]=Eo(e[t])}}const Jo="abi/5.7.0",at=new ce(Jo),Qi={};let ju={calldata:!0,memory:!0,storage:!0},A3={calldata:!0,memory:!0};function ta(r,e){if(r==="bytes"||r==="string"){if(ju[e])return!0}else if(r==="address"){if(e==="payable")return!0}else if((r.indexOf("[")>=0||r==="tuple")&&A3[e])return!0;return(ju[e]||e==="payable")&&at.throwArgumentError("invalid modifier","name",e),!1}function E3(r,e){let t=r;function n(s){at.throwArgumentError(`unexpected character at position ${s}`,"param",r)}r=r.replace(/\s/g," ");function i(s){let u={type:"",name:"",parent:s,state:{allowType:!0}};return e&&(u.indexed=!1),u}let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ht.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ht.full?", ":",")+")"):t+=this.type,e!==ht.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ht.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?Kt.fromString(e,t):Kt.fromObject(e)}static fromObject(e){return Kt.isParamType(e)?e:new Kt(Qi,{name:e.name||null,type:f0(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Kt.fromObject):null})}static fromString(e,t){function n(i){return Kt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(E3(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function _o(r,e){return S3(r).map(t=>Kt.fromString(t,e))}class qn{constructor(e,t){e!==Qi&&at.throwError("use a static from method",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),va(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qn.isFragment(e)?e:typeof e=="string"?qn.fromString(e):qn.fromObject(e)}static fromObject(e){if(qn.isFragment(e))return e;switch(e.type){case"function":return vn.fromObject(e);case"event":return jn.fromObject(e);case"constructor":return yn.fromObject(e);case"error":return ii.fromObject(e);case"fallback":case"receive":return null}return at.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?jn.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?vn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?yn.fromString(e.trim()):e.split(" ")[0]==="error"?ii.fromString(e.substring(5).trim()):at.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class jn extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",e!==ht.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jn.fromString(e):jn.fromObject(e)}static fromObject(e){if(jn.isEventFragment(e))return e;e.type!=="event"&&at.throwArgumentError("invalid event object","value",e);const t={name:Co(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],type:"event"};return new jn(Qi,t)}static fromString(e){let t=e.match(So);t||at.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:at.warn("unknown modifier: "+i)}}),jn.fromObject({name:t[1].trim(),anonymous:n,inputs:_o(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Pp(r,e){e.gas=null;let t=r.split("@");return t.length!==1?(t.length>2&&at.throwArgumentError("invalid human-readable ABI signature","value",r),t[1].match(/^[0-9]+$/)||at.throwArgumentError("invalid human-readable ABI signature gas","value",r),e.gas=it.from(t[1]),t[0]):r}function Rp(r,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",r.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Np(r){let e={constant:!1,payable:!0,stateMutability:"payable"};return r.stateMutability!=null?(e.stateMutability=r.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",r.constant!=null&&!!r.constant!==e.constant&&at.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",r),e.payable=e.stateMutability==="payable",r.payable!=null&&!!r.payable!==e.payable&&at.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",r)):r.payable!=null?(e.payable=!!r.payable,r.constant==null&&!e.payable&&r.type!=="constructor"&&at.throwArgumentError("unable to determine stateMutability","value",r),e.constant=!!r.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&at.throwArgumentError("cannot have constant payable function","value",r)):r.constant!=null?(e.constant=!!r.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):r.type!=="constructor"&&at.throwArgumentError("unable to determine stateMutability","value",r),e}class yn extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ht.sighash&&at.throwError("cannot format a constructor for sighash",ce.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?yn.fromString(e):yn.fromObject(e)}static fromObject(e){if(yn.isConstructorFragment(e))return e;e.type!=="constructor"&&at.throwArgumentError("invalid constructor object","value",e);let t=Np(e);t.constant&&at.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?it.from(e.gas):null};return new yn(Qi,n)}static fromString(e){let t={type:"constructor"};e=Pp(e,t);let n=e.match(So);return(!n||n[1].trim()!=="constructor")&&at.throwArgumentError("invalid constructor string","value",e),t.inputs=_o(n[2].trim(),!1),Rp(n[3].trim(),t),yn.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class vn extends yn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",e!==ht.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?vn.fromString(e):vn.fromObject(e)}static fromObject(e){if(vn.isFunctionFragment(e))return e;e.type!=="function"&&at.throwArgumentError("invalid function object","value",e);let t=Np(e);const n={type:e.type,name:Co(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],outputs:e.outputs?e.outputs.map(Kt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?it.from(e.gas):null};return new vn(Qi,n)}static fromString(e){let t={type:"function"};e=Pp(e,t);let n=e.split(" returns ");n.length>2&&at.throwArgumentError("invalid function string","value",e);let i=n[0].match(So);if(i||at.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Co(t.name),t.inputs=_o(i[2],!1),Rp(i[3].trim(),t),n.length>1){let o=n[1].match(So);(o[1].trim()!=""||o[3].trim()!="")&&at.throwArgumentError("unexpected tokens","value",e),t.outputs=_o(o[2],!1)}else t.outputs=[];return vn.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Xu(r){const e=r.format();return(e==="Error(string)"||e==="Panic(uint256)")&&at.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",r),r}class ii extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?ii.fromString(e):ii.fromObject(e)}static fromObject(e){if(ii.isErrorFragment(e))return e;e.type!=="error"&&at.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:Co(e.name),inputs:e.inputs?e.inputs.map(Kt.fromObject):[]};return Xu(new ii(Qi,t))}static fromString(e){let t={type:"error"},n=e.match(So);return n||at.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&Co(t.name),t.inputs=_o(n[2],!1),Xu(ii.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function f0(r){return r.match(/^uint($|[^1-9])/)?r="uint256"+r.substring(4):r.match(/^int($|[^1-9])/)&&(r="int256"+r.substring(3)),r}const C3=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Co(r){return(!r||!r.match(C3))&&at.throwArgumentError(`invalid identifier "${r}"`,"value",r),r}const So=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function S3(r){r=r.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&El.throwError("value out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Hi([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class za{constructor(e,t,n,i){ve(this,"_data",Wt(e)),ve(this,"wordSize",t||32),ve(this,"_coerceFunc",n),ve(this,"allowLoose",i),this._offset=0}get data(){return Pt(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):za.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:El.throwError("data out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new za(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return it.from(this.readBytes(this.wordSize))}}var Fp={exports:{}};/** +`)}static register(e,t){t||(t=e.locale)}}const e5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let fo=null;function ku(r){if(fo==null&&(fo=e5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Uo.check(r)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw fo=null,new Error("BIP39 Wordlist for en (English) FAILED")}class t5 extends Uo{constructor(){super("en")}getWord(e){return ku(this),fo[e]}getWordIndex(e){return ku(this),fo.indexOf(e)}}const np=new t5;Uo.register(np);const xi={en:np},r5="hdnode/5.7.0",Ao=new q(r5),n5=fe.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),i5=Jt("Bitcoin seed"),a0=2147483648;function ip(r){return(1<=256)throw new Error("Depth too large!");return Pu(Et([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",se(this.depth),this.parentFingerprint,yt(se(this.index),4),this.chainCode,this.privateKey!=null?Et(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Fr(r0,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~a0));const n=new Uint8Array(37);if(e&a0){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ae(this.privateKey),1),t&&(t+="'")}else n.set(ae(this.publicKey));for(let b=24;b>=0;b-=8)n[33+(b>>3)]=e>>24-b&255;const i=ae(wo(S0.sha512,this.chainCode,n)),o=i.slice(0,32),a=i.slice(32);let s=null,u=null;this.privateKey?s=ea(fe.from(o).add(this.privateKey).mod(n5)):u=new Ui(se(o))._addPoint(this.publicKey);let l=t;const h=this.mnemonic;return h&&(l=Object.freeze({phrase:h.phrase,path:t,locale:h.locale||"en"})),new Fr(r0,s,u,this.fingerprint,ea(a),e,this.depth+1,l)}derivePath(e){const t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let n=this;for(let i=0;i=a0)throw new Error("invalid path index - "+o);n=n._derive(a0+a)}else if(o.match(/^[0-9]+$/)){const a=parseInt(o);if(a>=a0)throw new Error("invalid path index - "+o);n=n._derive(a)}else throw new Error("invalid path component - "+o)}return n}static _fromSeed(e,t){const n=ae(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ae(wo(S0.sha512,i5,n));return new Fr(r0,ea(i.slice(0,32)),null,"0x00000000",ea(i.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return n=ml(n),e=hs(us(e,n),n),Fr._fromSeed(op(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Fr._fromSeed(e,null)}static fromExtendedKey(e){const t=A0.decode(e);(t.length!==82||Pu(t.slice(0,78))!==e)&&Ao.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=t[4],i=se(t.slice(5,9)),o=parseInt(se(t.slice(9,13)).substring(2),16),a=se(t.slice(13,45)),s=t.slice(45,78);switch(se(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Fr(r0,null,se(s),i,a,o,n,null);case"0x0488ade4":case"0x04358394 ":if(s[0]!==0)break;return new Fr(r0,se(s.slice(1)),null,i,a,o,n,null)}return Ao.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function op(r,e){e||(e="");const t=Jt("mnemonic"+e,Tn.NFKD);return hl(Jt(r,Tn.NFKD),t,2048,64,"sha512")}function us(r,e){e=ml(e),Ao.checkNormalize();const t=e.split(r);if(t.length%3!==0)throw new Error("invalid mnemonic");const n=ae(new Uint8Array(Math.ceil(11*t.length/8)));let i=0;for(let l=0;l>3]|=1<<7-i%8),i++}const o=32*t.length/3,a=t.length/3,s=ip(a);if((ae(Wn(n.slice(0,o/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return se(n.slice(0,o/8))}function hs(r,e){if(e=ml(e),r=ae(r),r.length%4!==0||r.length<16||r.length>32)throw new Error("invalid entropy");const t=[0];let n=11;for(let a=0;a8?(t[t.length-1]<<=8,t[t.length-1]|=r[a],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=r[a]>>8-n,t.push(r[a]&o5(8-n)),n+=3);const i=r.length/4,o=ae(Wn(r))[0]&ip(i);return t[t.length-1]<<=i,t[t.length-1]|=o>>8-i,e.join(t.map(a=>e.getWord(a)))}function a5(r,e){try{return us(r,e),!0}catch{}return!1}function s5(r){return(typeof r!="number"||r<0||r>=a0||r%1)&&Ao.throwArgumentError("invalid account index","index",r),`m/44'/60'/${r}'/0/0`}const f5=Object.freeze(Object.defineProperty({__proto__:null,defaultPath:B0,HDNode:Fr,mnemonicToSeed:op,mnemonicToEntropy:us,entropyToMnemonic:hs,isValidMnemonic:a5,getAccountPath:s5},Symbol.toStringTag,{value:"Module"})),c5=It(f5);var ap={exports:{}};(function(r,e){(function(t){function n(x){return parseInt(x)===x}function i(x){if(!n(x.length))return!1;for(var c=0;c255)return!1;return!0}function o(x,c){if(x.buffer&&ArrayBuffer.isView(x)&&x.name==="Uint8Array")return c&&(x.slice?x=x.slice():x=Array.prototype.slice.call(x)),x;if(Array.isArray(x)){if(!i(x))throw new Error("Array contains invalid value: "+x);return new Uint8Array(x)}if(n(x.length)&&i(x))return new Uint8Array(x);throw new Error("unsupported array-like object")}function a(x){return new Uint8Array(x)}function s(x,c,y,T,d){(T!=null||d!=null)&&(x.slice?x=x.slice(T,d):x=Array.prototype.slice.call(x,T,d)),c.set(x,y)}var u=function(){function x(y){var T=[],d=0;for(y=encodeURI(y);d191&&N<224?(T.push(String.fromCharCode((N&31)<<6|y[d+1]&63)),d+=2):(T.push(String.fromCharCode((N&15)<<12|(y[d+1]&63)<<6|y[d+2]&63)),d+=3)}return T.join("")}return{toBytes:x,fromBytes:c}}(),l=function(){function x(T){for(var d=[],N=0;N>4]+c[G&15])}return d.join("")}return{toBytes:x,fromBytes:y}}(),h={16:10,24:12,32:14},b=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],m=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],A=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],_=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],S=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],C=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],M=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],B=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],P=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],R=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],I=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],D=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],O=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],J=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],X=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function H(x){for(var c=[],y=0;y>2,this._Ke[N][c%4]=d[c],this._Kd[x-N][c%4]=d[c];for(var G=0,U=T,z;U>16&255]<<24^m[z>>8&255]<<16^m[z&255]<<8^m[z>>24&255]^b[G]<<24,G+=1,T!=8)for(var c=1;c>8&255]<<8^m[z>>16&255]<<16^m[z>>24&255]<<24;for(var c=T/2+1;c>2,K=U%4,this._Ke[te][K]=d[c],this._Kd[x-te][K]=d[c++],U++}for(var te=1;te>24&255]^O[z>>16&255]^J[z>>8&255]^X[z&255]},L.prototype.encrypt=function(x){if(x.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var c=this._Ke.length-1,y=[0,0,0,0],T=H(x),d=0;d<4;d++)T[d]^=this._Ke[0][d];for(var N=1;N>24&255]^S[T[(d+1)%4]>>16&255]^C[T[(d+2)%4]>>8&255]^M[T[(d+3)%4]&255]^this._Ke[N][d];T=y.slice()}for(var G=a(16),U,d=0;d<4;d++)U=this._Ke[c][d],G[4*d]=(m[T[d]>>24&255]^U>>24)&255,G[4*d+1]=(m[T[(d+1)%4]>>16&255]^U>>16)&255,G[4*d+2]=(m[T[(d+2)%4]>>8&255]^U>>8)&255,G[4*d+3]=(m[T[(d+3)%4]&255]^U)&255;return G},L.prototype.decrypt=function(x){if(x.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var c=this._Kd.length-1,y=[0,0,0,0],T=H(x),d=0;d<4;d++)T[d]^=this._Kd[0][d];for(var N=1;N>24&255]^P[T[(d+3)%4]>>16&255]^R[T[(d+2)%4]>>8&255]^I[T[(d+1)%4]&255]^this._Kd[N][d];T=y.slice()}for(var G=a(16),U,d=0;d<4;d++)U=this._Kd[c][d],G[4*d]=(A[T[d]>>24&255]^U>>24)&255,G[4*d+1]=(A[T[(d+3)%4]>>16&255]^U>>16)&255,G[4*d+2]=(A[T[(d+2)%4]>>8&255]^U>>8)&255,G[4*d+3]=(A[T[(d+1)%4]&255]^U)&255;return G};var j=function(x){if(!(this instanceof j))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new L(x)};j.prototype.encrypt=function(x){if(x=o(x),x.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var c=a(x.length),y=a(16),T=0;T=0;--c)this._counter[c]=x%256,x=x>>8},g.prototype.setBytes=function(x){if(x=o(x,!0),x.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=x},g.prototype.increment=function(){for(var x=15;x>=0;x--)if(this._counter[x]===255)this._counter[x]=0;else{this._counter[x]++;break}};var w=function(x,c){if(!(this instanceof w))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",c instanceof g||(c=new g(c)),this._counter=c,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new L(x)};w.prototype.encrypt=function(x){for(var c=o(x,!0),y=0;y16)throw new Error("PKCS#7 padding byte out of range");for(var y=x.length-c,T=0;T=64;){let F=M,x=B,c=P,y=R,T=I,d=D,N=O,G=J,U,z,te,K,V;for(z=0;z<16;z++)te=E+z*4,X[z]=(w[te]&255)<<24|(w[te+1]&255)<<16|(w[te+2]&255)<<8|w[te+3]&255;for(z=16;z<64;z++)U=X[z-2],K=(U>>>17|U<<32-17)^(U>>>19|U<<32-19)^U>>>10,U=X[z-15],V=(U>>>7|U<<32-7)^(U>>>18|U<<32-18)^U>>>3,X[z]=(K+X[z-7]|0)+(V+X[z-16]|0)|0;for(z=0;z<64;z++)K=(((T>>>6|T<<32-6)^(T>>>11|T<<32-11)^(T>>>25|T<<32-25))+(T&d^~T&N)|0)+(G+(C[z]+X[z]|0)|0)|0,V=((F>>>2|F<<32-2)^(F>>>13|F<<32-13)^(F>>>22|F<<32-22))+(F&x^F&c^x&c)|0,G=N,N=d,d=T,T=y+K|0,y=c,c=x,x=F,F=K+V|0;M=M+F|0,B=B+x|0,P=P+c|0,R=R+y|0,I=I+T|0,D=D+d|0,O=O+N|0,J=J+G|0,E+=64,k-=64}}H(S);let L,j=S.length%64,v=S.length/536870912|0,f=S.length<<3,p=j<56?56:120,g=S.slice(S.length-j,S.length);for(g.push(128),L=j+1;L>>24&255),g.push(v>>>16&255),g.push(v>>>8&255),g.push(v>>>0&255),g.push(f>>>24&255),g.push(f>>>16&255),g.push(f>>>8&255),g.push(f>>>0&255),H(g),[M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,O>>>24&255,O>>>16&255,O>>>8&255,O>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255]}function o(S,C,M){S=S.length<=64?S:i(S);const B=64+C.length+4,P=new Array(B),R=new Array(64);let I,D=[];for(I=0;I<64;I++)P[I]=54;for(I=0;I=B-4;J--){if(P[J]++,P[J]<=255)return;P[J]=0}}for(;M>=32;)O(),D=D.concat(i(R.concat(i(P)))),M-=32;return M>0&&(O(),D=D.concat(i(R.concat(i(P))).slice(0,M))),D}function a(S,C,M,B,P){let R;for(h(S,(2*M-1)*16,P,0,16),R=0;R<2*M;R++)l(S,R*16,P,16),u(P,B),h(P,0,S,C+R*16,16);for(R=0;R>>32-C}function u(S,C){h(S,0,C,0,16);for(let M=8;M>0;M-=2)C[4]^=s(C[0]+C[12],7),C[8]^=s(C[4]+C[0],9),C[12]^=s(C[8]+C[4],13),C[0]^=s(C[12]+C[8],18),C[9]^=s(C[5]+C[1],7),C[13]^=s(C[9]+C[5],9),C[1]^=s(C[13]+C[9],13),C[5]^=s(C[1]+C[13],18),C[14]^=s(C[10]+C[6],7),C[2]^=s(C[14]+C[10],9),C[6]^=s(C[2]+C[14],13),C[10]^=s(C[6]+C[2],18),C[3]^=s(C[15]+C[11],7),C[7]^=s(C[3]+C[15],9),C[11]^=s(C[7]+C[3],13),C[15]^=s(C[11]+C[7],18),C[1]^=s(C[0]+C[3],7),C[2]^=s(C[1]+C[0],9),C[3]^=s(C[2]+C[1],13),C[0]^=s(C[3]+C[2],18),C[6]^=s(C[5]+C[4],7),C[7]^=s(C[6]+C[5],9),C[4]^=s(C[7]+C[6],13),C[5]^=s(C[4]+C[7],18),C[11]^=s(C[10]+C[9],7),C[8]^=s(C[11]+C[10],9),C[9]^=s(C[8]+C[11],13),C[10]^=s(C[9]+C[8],18),C[12]^=s(C[15]+C[14],7),C[13]^=s(C[12]+C[15],9),C[14]^=s(C[13]+C[12],13),C[15]^=s(C[14]+C[13],18);for(let M=0;M<16;++M)S[M]+=C[M]}function l(S,C,M,B){for(let P=0;P=256)return!1}return!0}function m(S,C){if(typeof S!="number"||S%1)throw new Error("invalid "+C);return S}function A(S,C,M,B,P,R,I){if(M=m(M,"N"),B=m(B,"r"),P=m(P,"p"),R=m(R,"dkLen"),M===0||(M&M-1)!==0)throw new Error("N must be power of 2");if(M>2147483647/128/B)throw new Error("N too large");if(B>2147483647/128/P)throw new Error("r too large");if(!b(S))throw new Error("password must be an array or buffer");if(S=Array.prototype.slice.call(S),!b(C))throw new Error("salt must be an array or buffer");C=Array.prototype.slice.call(C);let D=o(S,C,P*128*B);const O=new Uint32Array(P*32*B);for(let T=0;Tx&&(T=x);for(let N=0;Nx&&(T=x);for(let N=0;N>0&255),D.push(O[N]>>8&255),D.push(O[N]>>16&255),D.push(O[N]>>24&255);const d=o(S,D,R);return I&&I(null,1,d),d}I&&c(y)};if(!I)for(;;){const T=y();if(T!=null)return T}y()}const _={scrypt:function(S,C,M,B,P,R,I){return new Promise(function(D,O){let J=0;I&&I(0),A(S,C,M,B,P,R,function(X,H,L){if(X)O(X);else if(L)I&&J!==1&&I(1),D(new Uint8Array(L));else if(I&&H!==J)return J=H,I(H)})})},syncScrypt:function(S,C,M,B,P,R){return new Uint8Array(A(S,C,M,B,P,R))}};r.exports=_})()})(fp);const wl=fp.exports,p5="random/5.7.0",dc=new q(p5);function x5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const Ru=x5();let ma=Ru.crypto||Ru.msCrypto;(!ma||!ma.getRandomValues)&&(dc.warn("WARNING: Missing strong random number source"),ma={getRandomValues:function(r){return dc.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function l0(r){(r<=0||r>1024||r%1||r!=r)&&dc.throwArgumentError("invalid length","length",r);const e=new Uint8Array(r);return ma.getRandomValues(e),ae(e)}function b5(r){r=r.slice();for(let e=r.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1)),n=r[e];r[e]=r[t],r[t]=n}return r}const g5=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:l0,shuffled:b5},Symbol.toStringTag,{value:"Module"}));var m5=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const pc=new q(sp);function Nu(r){return r!=null&&r.mnemonic&&r.mnemonic.phrase}class y5 extends gi{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function v5(r,e,t){if(Dt(r,"crypto/cipher")==="aes-128-ctr"){const i=Ji(Dt(r,"crypto/cipherparams/iv")),o=new _n.Counter(i),a=new _n.ModeOfOperation.ctr(e,o);return ae(a.decrypt(t))}return null}function cp(r,e){const t=Ji(Dt(r,"crypto/ciphertext"));if(se(gt(Et([e.slice(16,32),t]))).substring(2)!==Dt(r,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=v5(r,e.slice(0,16),t);i||pc.throwError("unsupported cipher",q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),a=ui(i);if(r.address){let u=r.address.toLowerCase();if(u.substring(0,2)!=="0x"&&(u="0x"+u),_t(u)!==a)throw new Error("address mismatch")}const s={_isKeystoreAccount:!0,address:a,privateKey:se(i)};if(Dt(r,"x-ethers/version")==="0.1"){const u=Ji(Dt(r,"x-ethers/mnemonicCiphertext")),l=Ji(Dt(r,"x-ethers/mnemonicCounter")),h=new _n.Counter(l),b=new _n.ModeOfOperation.ctr(o,h),m=Dt(r,"x-ethers/path")||B0,A=Dt(r,"x-ethers/locale")||"en",_=ae(b.decrypt(u));try{const S=hs(_,A),C=Fr.fromMnemonic(S,null,A).derivePath(m);if(C.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=C.mnemonic}catch(S){if(S.code!==q.errors.INVALID_ARGUMENT||S.argument!=="wordlist")throw S}}return new y5(s)}function lp(r,e,t,n,i){return ae(hl(r,e,t,n,i))}function w5(r,e,t,n,i){return Promise.resolve(lp(r,e,t,n,i))}function up(r,e,t,n,i){const o=yl(e),a=Dt(r,"crypto/kdf");if(a&&typeof a=="string"){const s=function(u,l){return pc.throwArgumentError("invalid key-derivation function parameters",u,l)};if(a.toLowerCase()==="scrypt"){const u=Ji(Dt(r,"crypto/kdfparams/salt")),l=parseInt(Dt(r,"crypto/kdfparams/n")),h=parseInt(Dt(r,"crypto/kdfparams/r")),b=parseInt(Dt(r,"crypto/kdfparams/p"));(!l||!h||!b)&&s("kdf",a),(l&l-1)!==0&&s("N",l);const m=parseInt(Dt(r,"crypto/kdfparams/dklen"));return m!==32&&s("dklen",m),n(o,u,l,h,b,64,i)}else if(a.toLowerCase()==="pbkdf2"){const u=Ji(Dt(r,"crypto/kdfparams/salt"));let l=null;const h=Dt(r,"crypto/kdfparams/prf");h==="hmac-sha256"?l="sha256":h==="hmac-sha512"?l="sha512":s("prf",h);const b=parseInt(Dt(r,"crypto/kdfparams/c")),m=parseInt(Dt(r,"crypto/kdfparams/dklen"));return m!==32&&s("dklen",m),t(o,u,b,m,l)}}return pc.throwArgumentError("unsupported key-derivation function","kdf",a)}function hp(r,e){const t=JSON.parse(r),n=up(t,e,lp,wl.syncScrypt);return cp(t,n)}function dp(r,e,t){return m5(this,void 0,void 0,function*(){const n=JSON.parse(r),i=yield up(n,e,w5,wl.scrypt,t);return cp(n,i)})}function pp(r,e,t,n){try{if(_t(r.address)!==ui(r.privateKey))throw new Error("address/privateKey mismatch");if(Nu(r)){const C=r.mnemonic;if(Fr.fromMnemonic(C.phrase,null,C.locale).derivePath(C.path||B0).privateKey!=r.privateKey)throw new Error("mnemonic mismatch")}}catch(C){return Promise.reject(C)}typeof t=="function"&&!n&&(n=t,t={}),t||(t={});const i=ae(r.privateKey),o=yl(e);let a=null,s=null,u=null;if(Nu(r)){const C=r.mnemonic;a=ae(us(C.phrase,C.locale||"en")),s=C.path||B0,u=C.locale||"en"}let l=t.client;l||(l="ethers.js");let h=null;t.salt?h=ae(t.salt):h=l0(32);let b=null;if(t.iv){if(b=ae(t.iv),b.length!==16)throw new Error("invalid iv")}else b=l0(16);let m=null;if(t.uuid){if(m=ae(t.uuid),m.length!==16)throw new Error("invalid uuid")}else m=l0(16);let A=1<<17,_=8,S=1;return t.scrypt&&(t.scrypt.N&&(A=t.scrypt.N),t.scrypt.r&&(_=t.scrypt.r),t.scrypt.p&&(S=t.scrypt.p)),wl.scrypt(o,h,A,_,S,64,n).then(C=>{C=ae(C);const M=C.slice(0,16),B=C.slice(16,32),P=C.slice(32,64),R=new _n.Counter(b),I=new _n.ModeOfOperation.ctr(M,R),D=ae(I.encrypt(i)),O=gt(Et([B,D])),J={address:r.address.substring(2).toLowerCase(),id:l5(m),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:se(b).substring(2)},ciphertext:se(D).substring(2),kdf:"scrypt",kdfparams:{salt:se(h).substring(2),n:A,dklen:32,p:S,r:_},mac:O.substring(2)}};if(a){const X=l0(16),H=new _n.Counter(X),L=new _n.ModeOfOperation.ctr(P,H),j=ae(L.encrypt(a)),v=new Date,f=v.getUTCFullYear()+"-"+q0(v.getUTCMonth()+1,2)+"-"+q0(v.getUTCDate(),2)+"T"+q0(v.getUTCHours(),2)+"-"+q0(v.getUTCMinutes(),2)+"-"+q0(v.getUTCSeconds(),2)+".0Z";J["x-ethers"]={client:l,gethFilename:"UTC--"+f+"--"+J.address,mnemonicCounter:se(X).substring(2),mnemonicCiphertext:se(j).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(J)})}function xp(r,e,t){if(ds(r)){t&&t(0);const n=vl(r,e);return t&&t(1),Promise.resolve(n)}return ps(r)?dp(r,e,t):Promise.reject(new Error("invalid JSON wallet"))}function bp(r,e){if(ds(r))return vl(r,e);if(ps(r))return hp(r,e);throw new Error("invalid JSON wallet")}const A5=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:vl,decryptKeystore:dp,decryptKeystoreSync:hp,encryptKeystore:pp,isCrowdsaleWallet:ds,isKeystoreWallet:ps,getJsonWalletAddress:d5,decryptJsonWallet:xp,decryptJsonWalletSync:bp},Symbol.toStringTag,{value:"Module"})),E5=It(A5),_5=It(wb),gp=It(rb),Fu=It(R6),C5="solidity/5.7.0",S5=new RegExp("^bytes([0-9]+)$"),B5=new RegExp("^(u?int)([0-9]*)$"),M5=new RegExp("^(.*)\\[([0-9]*)\\]$"),k5="0000000000000000000000000000000000000000000000000000000000000000",s0=new q(C5);function mp(r,e,t){switch(r){case"address":return t?io(e,32):ae(e);case"string":return Jt(e);case"bytes":return ae(e);case"bool":return e=e?"0x01":"0x00",t?io(e,32):ae(e)}let n=r.match(B5);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&s0.throwArgumentError("invalid number type","type",r),t&&(i=256),e=fe.from(e).toTwos(i),io(e,i/8)}if(n=r.match(S5),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&s0.throwArgumentError("invalid bytes type","type",r),ae(e).byteLength!==i&&s0.throwArgumentError(`invalid value for ${r}`,"value",e),t?ae((e+k5).substring(0,66)):e}if(n=r.match(M5),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&s0.throwArgumentError(`invalid array length for ${r}`,"value",e);const a=[];return e.forEach(function(s){a.push(mp(i,s,!0))}),Et(a)}return s0.throwArgumentError("invalid type","type",r)}function Al(r,e){r.length!=e.length&&s0.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const t=[];return r.forEach(function(n,i){t.push(mp(n,e[i]))}),se(Et(t))}function P5(r,e){return gt(Al(r,e))}function R5(r,e){return Wn(Al(r,e))}const N5=Object.freeze(Object.defineProperty({__proto__:null,pack:Al,keccak256:P5,sha256:R5},Symbol.toStringTag,{value:"Module"})),F5=It(N5),T5=It(g5),yp=It(db),I5=It(Eb),D5=It(z6),M0=It(fg),O5=It(Y6),L5="units/5.7.0",vp=new q(L5),wp=["wei","kwei","mwei","gwei","szabo","finney","ether"];function U5(r){const e=String(r).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||r==="."||r==="-.")&&vp.throwArgumentError("invalid value","value",r);let t=e[0],n="";for(t.substring(0,1)==="-"&&(n="-",t=t.substring(1));t.substring(0,1)==="0";)t=t.substring(1);t===""&&(t="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const o=[];for(;t.length;)if(t.length<=3){o.unshift(t);break}else{const a=t.length-3;o.unshift(t.substring(a)),t=t.substring(0,a)}return n+o.join(",")+i}function Ap(r,e){if(typeof e=="string"){const t=wp.indexOf(e);t!==-1&&(e=3*t)}return pa(r,e!=null?e:18)}function Ep(r,e){if(typeof r!="string"&&vp.throwArgumentError("value must be a string","value",r),typeof e=="string"){const t=wp.indexOf(e);t!==-1&&(e=3*t)}return dn(r,e!=null?e:18)}function J5(r){return Ap(r,18)}function H5(r){return Ep(r,18)}const G5=Object.freeze(Object.defineProperty({__proto__:null,commify:U5,formatUnits:Ap,parseUnits:Ep,formatEther:J5,parseEther:H5},Symbol.toStringTag,{value:"Module"})),z5=It(G5),j5="abstract-provider/5.7.0";var X5=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const q5=new q(j5);class V5 extends gi{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class xs{constructor(){q5.checkAbstract(new.target,xs),le(this,"_isProvider",!0)}getFeeData(){return X5(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield Ht({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(a=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=fe.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}const K5="abstract-signer/5.7.0";var Zr=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const $r=new q(K5),Q5=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],W5=[q.errors.INSUFFICIENT_FUNDS,q.errors.NONCE_EXPIRED,q.errors.REPLACEMENT_UNDERPRICED];class bs{constructor(){$r.checkAbstract(new.target,bs),le(this,"_isSigner",!0)}getBalance(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Zr(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Ht(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Zr(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Ht(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return Zr(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Zr(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Zr(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Q5.indexOf(n)===-1&&$r.throwArgumentError("invalid transaction key: "+n,"transaction",e);const t=vr(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&$r.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return Zr(this,void 0,void 0,function*(){const t=yield Ht(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Zr(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&$r.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?$r.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&$r.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&$r.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):$r.throwError("failed to get consistent fee data",q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(W5.indexOf(i.code)>=0)throw i;return $r.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&$r.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ht(t)})}_checkProvider(e){this.provider||$r.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}const Y5="wallet/5.7.0";var Tu=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const n0=new q(Y5);function Z5(r){return r!=null&<(r.privateKey,32)&&r.address!=null}function $5(r){const e=r.mnemonic;return e&&e.phrase}class mn extends bs{constructor(e,t){if(super(),Z5(e)){const n=new Ui(e.privateKey);if(le(this,"_signingKey",()=>n),le(this,"address",ui(this.publicKey)),this.address!==_t(e.address)&&n0.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),$5(e)){const i=e.mnemonic;le(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||B0,locale:i.locale||"en"}));const o=this.mnemonic,a=Fr.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);ui(a.privateKey)!==this.address&&n0.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else le(this,"_mnemonic",()=>null)}else{if(Ui.isSigningKey(e))e.curve!=="secp256k1"&&n0.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),le(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Ui(e);le(this,"_signingKey",()=>n)}le(this,"_mnemonic",()=>null),le(this,"address",ui(this.publicKey))}t&&!xs.isProvider(t)&&n0.throwArgumentError("invalid provider","provider",t),le(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new mn(this,e)}signTransaction(e){return Ht(e).then(t=>{t.from!=null&&(_t(t.from)!==this.address&&n0.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const n=this._signingKey().signDigest(gt(hc(t)));return hc(t,n)})}signMessage(e){return Tu(this,void 0,void 0,function*(){return rc(this._signingKey().signDigest(ll(e)))})}_signTypedData(e,t,n){return Tu(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,t,n,o=>(this.provider==null&&n0.throwError("cannot resolve ENS names without a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return rc(this._signingKey().signDigest(sr.hash(i.domain,t,i.value)))})}encrypt(e,t,n){if(typeof t=="function"&&!n&&(n=t,t={}),n&&typeof n!="function")throw new Error("invalid callback");return t||(t={}),pp(this,e,t,n)}static createRandom(e){let t=l0(16);e||(e={}),e.extraEntropy&&(t=ae(Ot(gt(Et([t,e.extraEntropy])),0,16)));const n=hs(t,e.locale);return mn.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return xp(e,t,n).then(i=>new mn(i))}static fromEncryptedJsonSync(e,t){return new mn(bp(e,t))}static fromMnemonic(e,t,n){return t||(t=B0),new mn(Fr.fromMnemonic(e,null,n).derivePath(t))}}function e3(r,e){return Lo(ll(r),e)}function t3(r,e,t,n){return Lo(sr.hash(r,e,t),n)}const r3=Object.freeze(Object.defineProperty({__proto__:null,Wallet:mn,verifyMessage:e3,verifyTypedData:t3},Symbol.toStringTag,{value:"Module"})),n3=It(r3),i3="web/5.7.0";var o3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};function a3(r,e){return o3(this,void 0,void 0,function*(){e==null&&(e={});const t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){const a=e.fetchOptions;a.mode&&(t.mode=a.mode),a.cache&&(t.cache=a.cache),a.credentials&&(t.credentials=a.credentials),a.redirect&&(t.redirect=a.redirect),a.referrer&&(t.referrer=a.referrer)}const n=yield fetch(r,t),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach((a,s)=>{o[s.toLowerCase()]=a}):n.headers.keys().forEach(a=>{o[a.toLowerCase()]=n.headers.get(a)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:ae(new Uint8Array(i))}})}var s3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const tn=new q(i3);function Iu(r){return new Promise(e=>{setTimeout(e,r)})}function ri(r,e){if(r==null)return null;if(typeof r=="string")return r;if(Io(r)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return mi(r)}catch{}return se(r)}return r}function _p(r,e,t){const n=typeof r=="object"&&r.throttleLimit!=null?r.throttleLimit:12;tn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof r=="object"?r.throttleCallback:null,o=typeof r=="object"&&typeof r.throttleSlotInterval=="number"?r.throttleSlotInterval:100;tn.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const a=typeof r=="object"?!!r.errorPassThrough:!1,s={};let u=null;const l={method:"GET"};let h=!1,b=2*60*1e3;if(typeof r=="string")u=r;else if(typeof r=="object"){if((r==null||r.url==null)&&tn.throwArgumentError("missing URL","connection.url",r),u=r.url,typeof r.timeout=="number"&&r.timeout>0&&(b=r.timeout),r.headers)for(const M in r.headers)s[M.toLowerCase()]={key:M,value:String(r.headers[M])},["if-none-match","if-modified-since"].indexOf(M.toLowerCase())>=0&&(h=!0);if(l.allowGzip=!!r.allowGzip,r.user!=null&&r.password!=null){u.substring(0,6)!=="https:"&&r.allowInsecureAuthentication!==!0&&tn.throwError("basic authentication requires a secure https url",q.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:r.user,password:"[REDACTED]"});const M=r.user+":"+r.password;s.authorization={key:"Authorization",value:"Basic "+cl(Jt(M))}}r.skipFetchSetup!=null&&(l.skipFetchSetup=!!r.skipFetchSetup),r.fetchOptions!=null&&(l.fetchOptions=vr(r.fetchOptions))}const m=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),A=u?u.match(m):null;if(A)try{const M={statusCode:200,statusMessage:"OK",headers:{"content-type":A[1]},body:fl(A[2])};let B=M.body;return t&&(B=t(M.body,M)),Promise.resolve(B)}catch(M){tn.throwError("processing response error",q.errors.SERVER_ERROR,{body:ri(A[1],A[2]),error:M,requestBody:null,requestMethod:"GET",url:u})}e&&(l.method="POST",l.body=e,s["content-type"]==null&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),s["content-length"]==null&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));const _={};Object.keys(s).forEach(M=>{const B=s[M];_[B.key]=B.value}),l.headers=_;const S=function(){let M=null;return{promise:new Promise(function(R,I){b&&(M=setTimeout(()=>{M!=null&&(M=null,I(tn.makeError("timeout",q.errors.TIMEOUT,{requestBody:ri(l.body,_["content-type"]),requestMethod:l.method,timeout:b,url:u})))},b))}),cancel:function(){M!=null&&(clearTimeout(M),M=null)}}}(),C=function(){return s3(this,void 0,void 0,function*(){for(let M=0;M=300)&&(S.cancel(),tn.throwError("bad response",q.errors.SERVER_ERROR,{status:B.statusCode,headers:B.headers,body:ri(P,B.headers?B.headers["content-type"]:null),requestBody:ri(l.body,_["content-type"]),requestMethod:l.method,url:u})),t)try{const R=yield t(P,B);return S.cancel(),R}catch(R){if(R.throttleRetry&&M{let s=null;if(o!=null)try{s=JSON.parse(mi(o))}catch(u){tn.throwError("invalid JSON",q.errors.SERVER_ERROR,{body:o,error:u})}return t&&(s=t(s,a)),s},i=null;if(e!=null){i=Jt(e);const o=typeof r=="string"?{url:r}:vr(r);o.headers?Object.keys(o.headers).filter(s=>s.toLowerCase()==="content-type").length!==0||(o.headers=vr(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},r=o}return _p(r,i,n)}function u0(r,e){return e||(e={}),e=vr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,n){let i=null,o=!1;const a=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{a()&&n(new Error("timeout"))},e.timeout));const s=e.retryLimit;let u=0;function l(){return r().then(function(h){if(h!==void 0)a()&&t(h);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!o){if(u++,u>s){a()&&n(new Error("retry limit reached"));return}let b=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));be.ceiling&&(b=e.ceiling),setTimeout(l,b)}return null},function(h){a()&&n(h)})}l()})}const f3=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:_p,fetchJson:gs,poll:u0},Symbol.toStringTag,{value:"Module"})),c3=It(f3);(function(r){var e=Be&&Be.__createBinding||(Object.create?function(L,j,v,f){f===void 0&&(f=v),Object.defineProperty(L,f,{enumerable:!0,get:function(){return j[v]}})}:function(L,j,v,f){f===void 0&&(f=v),L[f]=j[v]}),t=Be&&Be.__setModuleDefault||(Object.create?function(L,j){Object.defineProperty(L,"default",{enumerable:!0,value:j})}:function(L,j){L.default=j}),n=Be&&Be.__importStar||function(L){if(L&&L.__esModule)return L;var j={};if(L!=null)for(var v in L)v!=="default"&&Object.prototype.hasOwnProperty.call(L,v)&&e(j,L,v);return t(j,L),j};Object.defineProperty(r,"__esModule",{value:!0}),r.formatBytes32String=r.Utf8ErrorFuncs=r.toUtf8String=r.toUtf8CodePoints=r.toUtf8Bytes=r._toEscapedUtf8String=r.nameprep=r.hexDataSlice=r.hexDataLength=r.hexZeroPad=r.hexValue=r.hexStripZeros=r.hexConcat=r.isHexString=r.hexlify=r.base64=r.base58=r.TransactionDescription=r.LogDescription=r.Interface=r.SigningKey=r.HDNode=r.defaultPath=r.isBytesLike=r.isBytes=r.zeroPad=r.stripZeros=r.concat=r.arrayify=r.shallowCopy=r.resolveProperties=r.getStatic=r.defineReadOnly=r.deepCopy=r.checkProperties=r.poll=r.fetchJson=r._fetchData=r.RLP=r.Logger=r.checkResultErrors=r.FormatTypes=r.ParamType=r.FunctionFragment=r.EventFragment=r.ErrorFragment=r.ConstructorFragment=r.Fragment=r.defaultAbiCoder=r.AbiCoder=void 0,r.Indexed=r.Utf8ErrorReason=r.UnicodeNormalizationForm=r.SupportedAlgorithm=r.mnemonicToSeed=r.isValidMnemonic=r.entropyToMnemonic=r.mnemonicToEntropy=r.getAccountPath=r.verifyTypedData=r.verifyMessage=r.recoverPublicKey=r.computePublicKey=r.recoverAddress=r.computeAddress=r.getJsonWalletAddress=r.TransactionTypes=r.serializeTransaction=r.parseTransaction=r.accessListify=r.joinSignature=r.splitSignature=r.soliditySha256=r.solidityKeccak256=r.solidityPack=r.shuffled=r.randomBytes=r.sha512=r.sha256=r.ripemd160=r.keccak256=r.computeHmac=r.commify=r.parseUnits=r.formatUnits=r.parseEther=r.formatEther=r.isAddress=r.getCreate2Address=r.getContractAddress=r.getIcapAddress=r.getAddress=r._TypedDataEncoder=r.id=r.isValidName=r.namehash=r.hashMessage=r.dnsEncode=r.parseBytes32String=void 0;var i=Wg;Object.defineProperty(r,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(r,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(r,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(r,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}}),Object.defineProperty(r,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(r,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(r,"FormatTypes",{enumerable:!0,get:function(){return i.FormatTypes}}),Object.defineProperty(r,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(r,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(r,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(r,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(r,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(r,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(r,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}});var o=Yg;Object.defineProperty(r,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(r,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(r,"getContractAddress",{enumerable:!0,get:function(){return o.getContractAddress}}),Object.defineProperty(r,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(r,"isAddress",{enumerable:!0,get:function(){return o.isAddress}});var a=n(Zg);r.base64=a;var s=tm;Object.defineProperty(r,"base58",{enumerable:!0,get:function(){return s.Base58}});var u=S1;Object.defineProperty(r,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(r,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(r,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(r,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(r,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(r,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(r,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(r,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(r,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(r,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(r,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(r,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(r,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(r,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(r,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(r,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var l=B1;Object.defineProperty(r,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(r,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(r,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(r,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(r,"namehash",{enumerable:!0,get:function(){return l.namehash}});var h=c5;Object.defineProperty(r,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(r,"entropyToMnemonic",{enumerable:!0,get:function(){return h.entropyToMnemonic}}),Object.defineProperty(r,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(r,"HDNode",{enumerable:!0,get:function(){return h.HDNode}}),Object.defineProperty(r,"isValidMnemonic",{enumerable:!0,get:function(){return h.isValidMnemonic}}),Object.defineProperty(r,"mnemonicToEntropy",{enumerable:!0,get:function(){return h.mnemonicToEntropy}}),Object.defineProperty(r,"mnemonicToSeed",{enumerable:!0,get:function(){return h.mnemonicToSeed}});var b=E5;Object.defineProperty(r,"getJsonWalletAddress",{enumerable:!0,get:function(){return b.getJsonWalletAddress}});var m=_5;Object.defineProperty(r,"keccak256",{enumerable:!0,get:function(){return m.keccak256}});var A=gp;Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return A.Logger}});var _=Fu;Object.defineProperty(r,"computeHmac",{enumerable:!0,get:function(){return _.computeHmac}}),Object.defineProperty(r,"ripemd160",{enumerable:!0,get:function(){return _.ripemd160}}),Object.defineProperty(r,"sha256",{enumerable:!0,get:function(){return _.sha256}}),Object.defineProperty(r,"sha512",{enumerable:!0,get:function(){return _.sha512}});var S=F5;Object.defineProperty(r,"solidityKeccak256",{enumerable:!0,get:function(){return S.keccak256}}),Object.defineProperty(r,"solidityPack",{enumerable:!0,get:function(){return S.pack}}),Object.defineProperty(r,"soliditySha256",{enumerable:!0,get:function(){return S.sha256}});var C=T5;Object.defineProperty(r,"randomBytes",{enumerable:!0,get:function(){return C.randomBytes}}),Object.defineProperty(r,"shuffled",{enumerable:!0,get:function(){return C.shuffled}});var M=yp;Object.defineProperty(r,"checkProperties",{enumerable:!0,get:function(){return M.checkProperties}}),Object.defineProperty(r,"deepCopy",{enumerable:!0,get:function(){return M.deepCopy}}),Object.defineProperty(r,"defineReadOnly",{enumerable:!0,get:function(){return M.defineReadOnly}}),Object.defineProperty(r,"getStatic",{enumerable:!0,get:function(){return M.getStatic}}),Object.defineProperty(r,"resolveProperties",{enumerable:!0,get:function(){return M.resolveProperties}}),Object.defineProperty(r,"shallowCopy",{enumerable:!0,get:function(){return M.shallowCopy}});var B=n(I5);r.RLP=B;var P=D5;Object.defineProperty(r,"computePublicKey",{enumerable:!0,get:function(){return P.computePublicKey}}),Object.defineProperty(r,"recoverPublicKey",{enumerable:!0,get:function(){return P.recoverPublicKey}}),Object.defineProperty(r,"SigningKey",{enumerable:!0,get:function(){return P.SigningKey}});var R=M0;Object.defineProperty(r,"formatBytes32String",{enumerable:!0,get:function(){return R.formatBytes32String}}),Object.defineProperty(r,"nameprep",{enumerable:!0,get:function(){return R.nameprep}}),Object.defineProperty(r,"parseBytes32String",{enumerable:!0,get:function(){return R.parseBytes32String}}),Object.defineProperty(r,"_toEscapedUtf8String",{enumerable:!0,get:function(){return R._toEscapedUtf8String}}),Object.defineProperty(r,"toUtf8Bytes",{enumerable:!0,get:function(){return R.toUtf8Bytes}}),Object.defineProperty(r,"toUtf8CodePoints",{enumerable:!0,get:function(){return R.toUtf8CodePoints}}),Object.defineProperty(r,"toUtf8String",{enumerable:!0,get:function(){return R.toUtf8String}}),Object.defineProperty(r,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return R.Utf8ErrorFuncs}});var I=O5;Object.defineProperty(r,"accessListify",{enumerable:!0,get:function(){return I.accessListify}}),Object.defineProperty(r,"computeAddress",{enumerable:!0,get:function(){return I.computeAddress}}),Object.defineProperty(r,"parseTransaction",{enumerable:!0,get:function(){return I.parse}}),Object.defineProperty(r,"recoverAddress",{enumerable:!0,get:function(){return I.recoverAddress}}),Object.defineProperty(r,"serializeTransaction",{enumerable:!0,get:function(){return I.serialize}}),Object.defineProperty(r,"TransactionTypes",{enumerable:!0,get:function(){return I.TransactionTypes}});var D=z5;Object.defineProperty(r,"commify",{enumerable:!0,get:function(){return D.commify}}),Object.defineProperty(r,"formatEther",{enumerable:!0,get:function(){return D.formatEther}}),Object.defineProperty(r,"parseEther",{enumerable:!0,get:function(){return D.parseEther}}),Object.defineProperty(r,"formatUnits",{enumerable:!0,get:function(){return D.formatUnits}}),Object.defineProperty(r,"parseUnits",{enumerable:!0,get:function(){return D.parseUnits}});var O=n3;Object.defineProperty(r,"verifyMessage",{enumerable:!0,get:function(){return O.verifyMessage}}),Object.defineProperty(r,"verifyTypedData",{enumerable:!0,get:function(){return O.verifyTypedData}});var J=c3;Object.defineProperty(r,"_fetchData",{enumerable:!0,get:function(){return J._fetchData}}),Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return J.fetchJson}}),Object.defineProperty(r,"poll",{enumerable:!0,get:function(){return J.poll}});var X=Fu;Object.defineProperty(r,"SupportedAlgorithm",{enumerable:!0,get:function(){return X.SupportedAlgorithm}});var H=M0;Object.defineProperty(r,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return H.UnicodeNormalizationForm}}),Object.defineProperty(r,"Utf8ErrorReason",{enumerable:!0,get:function(){return H.Utf8ErrorReason}})})(Ir);var Cp={exports:{}};(function(r){(function(e,t){function n(v,f){if(!v)throw new Error(f||"Assertion failed")}function i(v,f){v.super_=f;var p=function(){};p.prototype=f.prototype,v.prototype=new p,v.prototype.constructor=v}function o(v,f,p){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(v||0,f||10,p||"be"))}typeof e=="object"?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=el.Buffer}catch{}o.isBN=function(f){return f instanceof o?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===o.wordSize&&Array.isArray(f.words)},o.max=function(f,p){return f.cmp(p)>0?f:p},o.min=function(f,p){return f.cmp(p)<0?f:p},o.prototype._init=function(f,p,g){if(typeof f=="number")return this._initNumber(f,p,g);if(typeof f=="object")return this._initArray(f,p,g);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var w=0;f[0]==="-"&&(w++,this.negative=1),w=0;w-=3)k=f[w]|f[w-1]<<8|f[w-2]<<16,this.words[E]|=k<>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);else if(g==="le")for(w=0,E=0;w>>26-F&67108863,F+=24,F>=26&&(F-=26,E++);return this._strip()};function s(v,f){var p=v.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+v)}function u(v,f,p){var g=s(v,p);return p-1>=f&&(g|=s(v,p-1)<<4),g}o.prototype._parseHex=function(f,p,g){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var w=0;w=p;w-=2)F=u(f,p,w)<=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8;else{var x=f.length-p;for(w=x%2===0?p+1:p;w=18?(E-=18,k+=1,this.words[k]|=F>>>26):E+=8}this._strip()};function l(v,f,p,g){for(var w=0,E=0,k=Math.min(v.length,p),F=f;F=49?E=x-49+10:x>=17?E=x-17+10:E=x,n(x>=0&&E1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch{o.prototype.inspect=b}else o.prototype.inspect=b;function b(){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"],A=[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];o.prototype.toString=function(f,p){f=f||10,p=p|0||1;var g;if(f===16||f==="hex"){g="";for(var w=0,E=0,k=0;k>>24-w&16777215,w+=2,w>=26&&(w-=26,k--),E!==0||k!==this.length-1?g=m[6-x.length]+x+g:g=x+g}for(E!==0&&(g=E.toString(16)+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(f===(f|0)&&f>=2&&f<=36){var c=A[f],y=_[f];g="";var T=this.clone();for(T.negative=0;!T.isZero();){var d=T.modrn(y).toString(f);T=T.idivn(y),T.isZero()?g=d+g:g=m[c-d.length]+d+g}for(this.isZero()&&(g="0"+g);g.length%p!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(f,p){return this.toArrayLike(a,f,p)}),o.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var S=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};o.prototype.toArrayLike=function(f,p,g){this._strip();var w=this.byteLength(),E=g||Math.max(1,w);n(w<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=S(f,E),F=p==="le"?"LE":"BE";return this["_toArrayLike"+F](k,w),k},o.prototype._toArrayLikeLE=function(f,p){for(var g=0,w=0,E=0,k=0;E>8&255),g>16&255),k===6?(g>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g=0&&(f[g--]=F>>8&255),g>=0&&(f[g--]=F>>16&255),k===6?(g>=0&&(f[g--]=F>>24&255),w=0,k=0):(w=F>>>24,k+=2)}if(g>=0)for(f[g--]=w;g>=0;)f[g--]=0},Math.clz32?o.prototype._countBits=function(f){return 32-Math.clz32(f)}:o.prototype._countBits=function(f){var p=f,g=0;return p>=4096&&(g+=13,p>>>=13),p>=64&&(g+=7,p>>>=7),p>=8&&(g+=4,p>>>=4),p>=2&&(g+=2,p>>>=2),g+p},o.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,g=0;return(p&8191)===0&&(g+=13,p>>>=13),(p&127)===0&&(g+=7,p>>>=7),(p&15)===0&&(g+=4,p>>>=4),(p&3)===0&&(g+=2,p>>>=2),(p&1)===0&&g++,g},o.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function C(v){for(var f=new Array(v.bitLength()),p=0;p>>w&1}return f}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;pf.length?this.clone().ior(f):f.clone().ior(this)},o.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},o.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var g=0;gf.length?this.clone().iand(f):f.clone().iand(this)},o.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},o.prototype.iuxor=function(f){var p,g;this.length>f.length?(p=this,g=f):(p=f,g=this);for(var w=0;wf.length?this.clone().ixor(f):f.clone().ixor(this)},o.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},o.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,g=f%26;this._expand(p),g>0&&p--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-g),this._strip()},o.prototype.notn=function(f){return this.clone().inotn(f)},o.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var g=f/26|0,w=f%26;return this._expand(g+1),p?this.words[g]=this.words[g]|1<f.length?(g=this,w=f):(g=f,w=this);for(var E=0,k=0;k>>26;for(;E!==0&&k>>26;if(this.length=g.length,E!==0)this.words[this.length]=E,this.length++;else if(g!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},o.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var g=this.cmp(f);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,E;g>0?(w=this,E=f):(w=f,E=this);for(var k=0,F=0;F>26,this.words[F]=p&67108863;for(;k!==0&&F>26,this.words[F]=p&67108863;if(k===0&&F>>26,T=x&67108863,d=Math.min(c,f.length-1),N=Math.max(0,c-v.length+1);N<=d;N++){var G=c-N|0;w=v.words[G]|0,E=f.words[N]|0,k=w*E+T,y+=k/67108864|0,T=k&67108863}p.words[c]=T|0,x=y|0}return x!==0?p.words[c]=x|0:p.length--,p._strip()}var B=function(f,p,g){var w=f.words,E=p.words,k=g.words,F=0,x,c,y,T=w[0]|0,d=T&8191,N=T>>>13,G=w[1]|0,U=G&8191,z=G>>>13,te=w[2]|0,K=te&8191,V=te>>>13,me=w[3]|0,Q=me&8191,oe=me>>>13,xt=w[4]|0,we=xt&8191,ge=xt>>>13,Ct=w[5]|0,Ae=Ct&8191,xe=Ct>>>13,ft=w[6]|0,de=ft&8191,Ce=ft>>>13,St=w[7]|0,pe=St&8191,Ee=St>>>13,wt=w[8]|0,W=wt&8191,ie=wt>>>13,Ft=w[9]|0,Se=Ft&8191,Fe=Ft>>>13,zt=E[0]|0,Me=zt&8191,Te=zt>>>13,Zt=E[1]|0,ke=Zt&8191,Ie=Zt>>>13,jt=E[2]|0,De=jt&8191,Pe=jt>>>13,$t=E[3]|0,Oe=$t&8191,Le=$t>>>13,Xt=E[4]|0,Ue=Xt&8191,Je=Xt>>>13,qt=E[5]|0,He=qt&8191,Re=qt>>>13,pt=E[6]|0,_e=pt&8191,Ne=pt>>>13,er=E[7]|0,ze=er&8191,je=er>>>13,xr=E[8]|0,Xe=xr&8191,qe=xr>>>13,br=E[9]|0,Ve=br&8191,Ke=br>>>13;g.negative=f.negative^p.negative,g.length=19,x=Math.imul(d,Me),c=Math.imul(d,Te),c=c+Math.imul(N,Me)|0,y=Math.imul(N,Te);var tr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(tr>>>26)|0,tr&=67108863,x=Math.imul(U,Me),c=Math.imul(U,Te),c=c+Math.imul(z,Me)|0,y=Math.imul(z,Te),x=x+Math.imul(d,ke)|0,c=c+Math.imul(d,Ie)|0,c=c+Math.imul(N,ke)|0,y=y+Math.imul(N,Ie)|0;var rr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(rr>>>26)|0,rr&=67108863,x=Math.imul(K,Me),c=Math.imul(K,Te),c=c+Math.imul(V,Me)|0,y=Math.imul(V,Te),x=x+Math.imul(U,ke)|0,c=c+Math.imul(U,Ie)|0,c=c+Math.imul(z,ke)|0,y=y+Math.imul(z,Ie)|0,x=x+Math.imul(d,De)|0,c=c+Math.imul(d,Pe)|0,c=c+Math.imul(N,De)|0,y=y+Math.imul(N,Pe)|0;var nr=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(nr>>>26)|0,nr&=67108863,x=Math.imul(Q,Me),c=Math.imul(Q,Te),c=c+Math.imul(oe,Me)|0,y=Math.imul(oe,Te),x=x+Math.imul(K,ke)|0,c=c+Math.imul(K,Ie)|0,c=c+Math.imul(V,ke)|0,y=y+Math.imul(V,Ie)|0,x=x+Math.imul(U,De)|0,c=c+Math.imul(U,Pe)|0,c=c+Math.imul(z,De)|0,y=y+Math.imul(z,Pe)|0,x=x+Math.imul(d,Oe)|0,c=c+Math.imul(d,Le)|0,c=c+Math.imul(N,Oe)|0,y=y+Math.imul(N,Le)|0;var ir=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ir>>>26)|0,ir&=67108863,x=Math.imul(we,Me),c=Math.imul(we,Te),c=c+Math.imul(ge,Me)|0,y=Math.imul(ge,Te),x=x+Math.imul(Q,ke)|0,c=c+Math.imul(Q,Ie)|0,c=c+Math.imul(oe,ke)|0,y=y+Math.imul(oe,Ie)|0,x=x+Math.imul(K,De)|0,c=c+Math.imul(K,Pe)|0,c=c+Math.imul(V,De)|0,y=y+Math.imul(V,Pe)|0,x=x+Math.imul(U,Oe)|0,c=c+Math.imul(U,Le)|0,c=c+Math.imul(z,Oe)|0,y=y+Math.imul(z,Le)|0,x=x+Math.imul(d,Ue)|0,c=c+Math.imul(d,Je)|0,c=c+Math.imul(N,Ue)|0,y=y+Math.imul(N,Je)|0;var or=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(or>>>26)|0,or&=67108863,x=Math.imul(Ae,Me),c=Math.imul(Ae,Te),c=c+Math.imul(xe,Me)|0,y=Math.imul(xe,Te),x=x+Math.imul(we,ke)|0,c=c+Math.imul(we,Ie)|0,c=c+Math.imul(ge,ke)|0,y=y+Math.imul(ge,Ie)|0,x=x+Math.imul(Q,De)|0,c=c+Math.imul(Q,Pe)|0,c=c+Math.imul(oe,De)|0,y=y+Math.imul(oe,Pe)|0,x=x+Math.imul(K,Oe)|0,c=c+Math.imul(K,Le)|0,c=c+Math.imul(V,Oe)|0,y=y+Math.imul(V,Le)|0,x=x+Math.imul(U,Ue)|0,c=c+Math.imul(U,Je)|0,c=c+Math.imul(z,Ue)|0,y=y+Math.imul(z,Je)|0,x=x+Math.imul(d,He)|0,c=c+Math.imul(d,Re)|0,c=c+Math.imul(N,He)|0,y=y+Math.imul(N,Re)|0;var wi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(wi>>>26)|0,wi&=67108863,x=Math.imul(de,Me),c=Math.imul(de,Te),c=c+Math.imul(Ce,Me)|0,y=Math.imul(Ce,Te),x=x+Math.imul(Ae,ke)|0,c=c+Math.imul(Ae,Ie)|0,c=c+Math.imul(xe,ke)|0,y=y+Math.imul(xe,Ie)|0,x=x+Math.imul(we,De)|0,c=c+Math.imul(we,Pe)|0,c=c+Math.imul(ge,De)|0,y=y+Math.imul(ge,Pe)|0,x=x+Math.imul(Q,Oe)|0,c=c+Math.imul(Q,Le)|0,c=c+Math.imul(oe,Oe)|0,y=y+Math.imul(oe,Le)|0,x=x+Math.imul(K,Ue)|0,c=c+Math.imul(K,Je)|0,c=c+Math.imul(V,Ue)|0,y=y+Math.imul(V,Je)|0,x=x+Math.imul(U,He)|0,c=c+Math.imul(U,Re)|0,c=c+Math.imul(z,He)|0,y=y+Math.imul(z,Re)|0,x=x+Math.imul(d,_e)|0,c=c+Math.imul(d,Ne)|0,c=c+Math.imul(N,_e)|0,y=y+Math.imul(N,Ne)|0;var Ai=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,x=Math.imul(pe,Me),c=Math.imul(pe,Te),c=c+Math.imul(Ee,Me)|0,y=Math.imul(Ee,Te),x=x+Math.imul(de,ke)|0,c=c+Math.imul(de,Ie)|0,c=c+Math.imul(Ce,ke)|0,y=y+Math.imul(Ce,Ie)|0,x=x+Math.imul(Ae,De)|0,c=c+Math.imul(Ae,Pe)|0,c=c+Math.imul(xe,De)|0,y=y+Math.imul(xe,Pe)|0,x=x+Math.imul(we,Oe)|0,c=c+Math.imul(we,Le)|0,c=c+Math.imul(ge,Oe)|0,y=y+Math.imul(ge,Le)|0,x=x+Math.imul(Q,Ue)|0,c=c+Math.imul(Q,Je)|0,c=c+Math.imul(oe,Ue)|0,y=y+Math.imul(oe,Je)|0,x=x+Math.imul(K,He)|0,c=c+Math.imul(K,Re)|0,c=c+Math.imul(V,He)|0,y=y+Math.imul(V,Re)|0,x=x+Math.imul(U,_e)|0,c=c+Math.imul(U,Ne)|0,c=c+Math.imul(z,_e)|0,y=y+Math.imul(z,Ne)|0,x=x+Math.imul(d,ze)|0,c=c+Math.imul(d,je)|0,c=c+Math.imul(N,ze)|0,y=y+Math.imul(N,je)|0;var Ei=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,x=Math.imul(W,Me),c=Math.imul(W,Te),c=c+Math.imul(ie,Me)|0,y=Math.imul(ie,Te),x=x+Math.imul(pe,ke)|0,c=c+Math.imul(pe,Ie)|0,c=c+Math.imul(Ee,ke)|0,y=y+Math.imul(Ee,Ie)|0,x=x+Math.imul(de,De)|0,c=c+Math.imul(de,Pe)|0,c=c+Math.imul(Ce,De)|0,y=y+Math.imul(Ce,Pe)|0,x=x+Math.imul(Ae,Oe)|0,c=c+Math.imul(Ae,Le)|0,c=c+Math.imul(xe,Oe)|0,y=y+Math.imul(xe,Le)|0,x=x+Math.imul(we,Ue)|0,c=c+Math.imul(we,Je)|0,c=c+Math.imul(ge,Ue)|0,y=y+Math.imul(ge,Je)|0,x=x+Math.imul(Q,He)|0,c=c+Math.imul(Q,Re)|0,c=c+Math.imul(oe,He)|0,y=y+Math.imul(oe,Re)|0,x=x+Math.imul(K,_e)|0,c=c+Math.imul(K,Ne)|0,c=c+Math.imul(V,_e)|0,y=y+Math.imul(V,Ne)|0,x=x+Math.imul(U,ze)|0,c=c+Math.imul(U,je)|0,c=c+Math.imul(z,ze)|0,y=y+Math.imul(z,je)|0,x=x+Math.imul(d,Xe)|0,c=c+Math.imul(d,qe)|0,c=c+Math.imul(N,Xe)|0,y=y+Math.imul(N,qe)|0;var _i=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(_i>>>26)|0,_i&=67108863,x=Math.imul(Se,Me),c=Math.imul(Se,Te),c=c+Math.imul(Fe,Me)|0,y=Math.imul(Fe,Te),x=x+Math.imul(W,ke)|0,c=c+Math.imul(W,Ie)|0,c=c+Math.imul(ie,ke)|0,y=y+Math.imul(ie,Ie)|0,x=x+Math.imul(pe,De)|0,c=c+Math.imul(pe,Pe)|0,c=c+Math.imul(Ee,De)|0,y=y+Math.imul(Ee,Pe)|0,x=x+Math.imul(de,Oe)|0,c=c+Math.imul(de,Le)|0,c=c+Math.imul(Ce,Oe)|0,y=y+Math.imul(Ce,Le)|0,x=x+Math.imul(Ae,Ue)|0,c=c+Math.imul(Ae,Je)|0,c=c+Math.imul(xe,Ue)|0,y=y+Math.imul(xe,Je)|0,x=x+Math.imul(we,He)|0,c=c+Math.imul(we,Re)|0,c=c+Math.imul(ge,He)|0,y=y+Math.imul(ge,Re)|0,x=x+Math.imul(Q,_e)|0,c=c+Math.imul(Q,Ne)|0,c=c+Math.imul(oe,_e)|0,y=y+Math.imul(oe,Ne)|0,x=x+Math.imul(K,ze)|0,c=c+Math.imul(K,je)|0,c=c+Math.imul(V,ze)|0,y=y+Math.imul(V,je)|0,x=x+Math.imul(U,Xe)|0,c=c+Math.imul(U,qe)|0,c=c+Math.imul(z,Xe)|0,y=y+Math.imul(z,qe)|0,x=x+Math.imul(d,Ve)|0,c=c+Math.imul(d,Ke)|0,c=c+Math.imul(N,Ve)|0,y=y+Math.imul(N,Ke)|0;var Ci=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,x=Math.imul(Se,ke),c=Math.imul(Se,Ie),c=c+Math.imul(Fe,ke)|0,y=Math.imul(Fe,Ie),x=x+Math.imul(W,De)|0,c=c+Math.imul(W,Pe)|0,c=c+Math.imul(ie,De)|0,y=y+Math.imul(ie,Pe)|0,x=x+Math.imul(pe,Oe)|0,c=c+Math.imul(pe,Le)|0,c=c+Math.imul(Ee,Oe)|0,y=y+Math.imul(Ee,Le)|0,x=x+Math.imul(de,Ue)|0,c=c+Math.imul(de,Je)|0,c=c+Math.imul(Ce,Ue)|0,y=y+Math.imul(Ce,Je)|0,x=x+Math.imul(Ae,He)|0,c=c+Math.imul(Ae,Re)|0,c=c+Math.imul(xe,He)|0,y=y+Math.imul(xe,Re)|0,x=x+Math.imul(we,_e)|0,c=c+Math.imul(we,Ne)|0,c=c+Math.imul(ge,_e)|0,y=y+Math.imul(ge,Ne)|0,x=x+Math.imul(Q,ze)|0,c=c+Math.imul(Q,je)|0,c=c+Math.imul(oe,ze)|0,y=y+Math.imul(oe,je)|0,x=x+Math.imul(K,Xe)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(V,Xe)|0,y=y+Math.imul(V,qe)|0,x=x+Math.imul(U,Ve)|0,c=c+Math.imul(U,Ke)|0,c=c+Math.imul(z,Ve)|0,y=y+Math.imul(z,Ke)|0;var Si=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Si>>>26)|0,Si&=67108863,x=Math.imul(Se,De),c=Math.imul(Se,Pe),c=c+Math.imul(Fe,De)|0,y=Math.imul(Fe,Pe),x=x+Math.imul(W,Oe)|0,c=c+Math.imul(W,Le)|0,c=c+Math.imul(ie,Oe)|0,y=y+Math.imul(ie,Le)|0,x=x+Math.imul(pe,Ue)|0,c=c+Math.imul(pe,Je)|0,c=c+Math.imul(Ee,Ue)|0,y=y+Math.imul(Ee,Je)|0,x=x+Math.imul(de,He)|0,c=c+Math.imul(de,Re)|0,c=c+Math.imul(Ce,He)|0,y=y+Math.imul(Ce,Re)|0,x=x+Math.imul(Ae,_e)|0,c=c+Math.imul(Ae,Ne)|0,c=c+Math.imul(xe,_e)|0,y=y+Math.imul(xe,Ne)|0,x=x+Math.imul(we,ze)|0,c=c+Math.imul(we,je)|0,c=c+Math.imul(ge,ze)|0,y=y+Math.imul(ge,je)|0,x=x+Math.imul(Q,Xe)|0,c=c+Math.imul(Q,qe)|0,c=c+Math.imul(oe,Xe)|0,y=y+Math.imul(oe,qe)|0,x=x+Math.imul(K,Ve)|0,c=c+Math.imul(K,Ke)|0,c=c+Math.imul(V,Ve)|0,y=y+Math.imul(V,Ke)|0;var Bi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,x=Math.imul(Se,Oe),c=Math.imul(Se,Le),c=c+Math.imul(Fe,Oe)|0,y=Math.imul(Fe,Le),x=x+Math.imul(W,Ue)|0,c=c+Math.imul(W,Je)|0,c=c+Math.imul(ie,Ue)|0,y=y+Math.imul(ie,Je)|0,x=x+Math.imul(pe,He)|0,c=c+Math.imul(pe,Re)|0,c=c+Math.imul(Ee,He)|0,y=y+Math.imul(Ee,Re)|0,x=x+Math.imul(de,_e)|0,c=c+Math.imul(de,Ne)|0,c=c+Math.imul(Ce,_e)|0,y=y+Math.imul(Ce,Ne)|0,x=x+Math.imul(Ae,ze)|0,c=c+Math.imul(Ae,je)|0,c=c+Math.imul(xe,ze)|0,y=y+Math.imul(xe,je)|0,x=x+Math.imul(we,Xe)|0,c=c+Math.imul(we,qe)|0,c=c+Math.imul(ge,Xe)|0,y=y+Math.imul(ge,qe)|0,x=x+Math.imul(Q,Ve)|0,c=c+Math.imul(Q,Ke)|0,c=c+Math.imul(oe,Ve)|0,y=y+Math.imul(oe,Ke)|0;var Mi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,x=Math.imul(Se,Ue),c=Math.imul(Se,Je),c=c+Math.imul(Fe,Ue)|0,y=Math.imul(Fe,Je),x=x+Math.imul(W,He)|0,c=c+Math.imul(W,Re)|0,c=c+Math.imul(ie,He)|0,y=y+Math.imul(ie,Re)|0,x=x+Math.imul(pe,_e)|0,c=c+Math.imul(pe,Ne)|0,c=c+Math.imul(Ee,_e)|0,y=y+Math.imul(Ee,Ne)|0,x=x+Math.imul(de,ze)|0,c=c+Math.imul(de,je)|0,c=c+Math.imul(Ce,ze)|0,y=y+Math.imul(Ce,je)|0,x=x+Math.imul(Ae,Xe)|0,c=c+Math.imul(Ae,qe)|0,c=c+Math.imul(xe,Xe)|0,y=y+Math.imul(xe,qe)|0,x=x+Math.imul(we,Ve)|0,c=c+Math.imul(we,Ke)|0,c=c+Math.imul(ge,Ve)|0,y=y+Math.imul(ge,Ke)|0;var ki=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(ki>>>26)|0,ki&=67108863,x=Math.imul(Se,He),c=Math.imul(Se,Re),c=c+Math.imul(Fe,He)|0,y=Math.imul(Fe,Re),x=x+Math.imul(W,_e)|0,c=c+Math.imul(W,Ne)|0,c=c+Math.imul(ie,_e)|0,y=y+Math.imul(ie,Ne)|0,x=x+Math.imul(pe,ze)|0,c=c+Math.imul(pe,je)|0,c=c+Math.imul(Ee,ze)|0,y=y+Math.imul(Ee,je)|0,x=x+Math.imul(de,Xe)|0,c=c+Math.imul(de,qe)|0,c=c+Math.imul(Ce,Xe)|0,y=y+Math.imul(Ce,qe)|0,x=x+Math.imul(Ae,Ve)|0,c=c+Math.imul(Ae,Ke)|0,c=c+Math.imul(xe,Ve)|0,y=y+Math.imul(xe,Ke)|0;var Pi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,x=Math.imul(Se,_e),c=Math.imul(Se,Ne),c=c+Math.imul(Fe,_e)|0,y=Math.imul(Fe,Ne),x=x+Math.imul(W,ze)|0,c=c+Math.imul(W,je)|0,c=c+Math.imul(ie,ze)|0,y=y+Math.imul(ie,je)|0,x=x+Math.imul(pe,Xe)|0,c=c+Math.imul(pe,qe)|0,c=c+Math.imul(Ee,Xe)|0,y=y+Math.imul(Ee,qe)|0,x=x+Math.imul(de,Ve)|0,c=c+Math.imul(de,Ke)|0,c=c+Math.imul(Ce,Ve)|0,y=y+Math.imul(Ce,Ke)|0;var Ri=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,x=Math.imul(Se,ze),c=Math.imul(Se,je),c=c+Math.imul(Fe,ze)|0,y=Math.imul(Fe,je),x=x+Math.imul(W,Xe)|0,c=c+Math.imul(W,qe)|0,c=c+Math.imul(ie,Xe)|0,y=y+Math.imul(ie,qe)|0,x=x+Math.imul(pe,Ve)|0,c=c+Math.imul(pe,Ke)|0,c=c+Math.imul(Ee,Ve)|0,y=y+Math.imul(Ee,Ke)|0;var Ni=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,x=Math.imul(Se,Xe),c=Math.imul(Se,qe),c=c+Math.imul(Fe,Xe)|0,y=Math.imul(Fe,qe),x=x+Math.imul(W,Ve)|0,c=c+Math.imul(W,Ke)|0,c=c+Math.imul(ie,Ve)|0,y=y+Math.imul(ie,Ke)|0;var Fi=(F+x|0)+((c&8191)<<13)|0;F=(y+(c>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,x=Math.imul(Se,Ve),c=Math.imul(Se,Ke),c=c+Math.imul(Fe,Ve)|0,y=Math.imul(Fe,Ke);var Ti=(F+x|0)+((c&8191)<<13)|0;return F=(y+(c>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,k[0]=tr,k[1]=rr,k[2]=nr,k[3]=ir,k[4]=or,k[5]=wi,k[6]=Ai,k[7]=Ei,k[8]=_i,k[9]=Ci,k[10]=Si,k[11]=Bi,k[12]=Mi,k[13]=ki,k[14]=Pi,k[15]=Ri,k[16]=Ni,k[17]=Fi,k[18]=Ti,F!==0&&(k[19]=F,g.length++),g};Math.imul||(B=M);function P(v,f,p){p.negative=f.negative^v.negative,p.length=v.length+f.length;for(var g=0,w=0,E=0;E>>26)|0,w+=k>>>26,k&=67108863}p.words[E]=F,g=k,k=w}return g!==0?p.words[E]=g:p.length--,p._strip()}function R(v,f,p){return P(v,f,p)}o.prototype.mulTo=function(f,p){var g,w=this.length+f.length;return this.length===10&&f.length===10?g=B(this,f,p):w<63?g=M(this,f,p):w<1024?g=P(this,f,p):g=R(this,f,p),g},o.prototype.mul=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},o.prototype.mulf=function(f){var p=new o(null);return p.words=new Array(this.length+f.length),R(this,f,p)},o.prototype.imul=function(f){return this.clone().mulTo(f,this)},o.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var g=0,w=0;w>=26,g+=E/67108864|0,g+=k>>>26,this.words[w]=k&67108863}return g!==0&&(this.words[w]=g,this.length++),p?this.ineg():this},o.prototype.muln=function(f){return this.clone().imuln(f)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(f){var p=C(f);if(p.length===0)return new o(1);for(var g=this,w=0;w=0);var p=f%26,g=(f-p)/26,w=67108863>>>26-p<<26-p,E;if(p!==0){var k=0;for(E=0;E>>26-p}k&&(this.words[E]=k,this.length++)}if(g!==0){for(E=this.length-1;E>=0;E--)this.words[E+g]=this.words[E];for(E=0;E=0);var w;p?w=(p-p%26)/26:w=0;var E=f%26,k=Math.min((f-E)/26,this.length),F=67108863^67108863>>>E<k)for(this.length-=k,c=0;c=0&&(y!==0||c>=w);c--){var T=this.words[c]|0;this.words[c]=y<<26-E|T>>>E,y=T&F}return x&&y!==0&&(x.words[x.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(f,p,g){return n(this.negative===0),this.iushrn(f,p,g)},o.prototype.shln=function(f){return this.clone().ishln(f)},o.prototype.ushln=function(f){return this.clone().iushln(f)},o.prototype.shrn=function(f){return this.clone().ishrn(f)},o.prototype.ushrn=function(f){return this.clone().iushrn(f)},o.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,g=(f-p)/26,w=1<=0);var p=f%26,g=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(p!==0&&g++,this.length=Math.min(g,this.length),p!==0){var w=67108863^67108863>>>p<=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},o.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p>26)-(x/67108864|0),this.words[E+g]=k&67108863}for(;E>26,this.words[E+g]=k&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,E=0;E>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(f,p){var g=this.length-f.length,w=this.clone(),E=f,k=E.words[E.length-1]|0,F=this._countBits(k);g=26-F,g!==0&&(E=E.ushln(g),w.iushln(g),k=E.words[E.length-1]|0);var x=w.length-E.length,c;if(p!=="mod"){c=new o(null),c.length=x+1,c.words=new Array(c.length);for(var y=0;y=0;d--){var N=(w.words[E.length+d]|0)*67108864+(w.words[E.length+d-1]|0);for(N=Math.min(N/k|0,67108863),w._ishlnsubmul(E,N,d);w.negative!==0;)N--,w.negative=0,w._ishlnsubmul(E,1,d),w.isZero()||(w.negative^=1);c&&(c.words[d]=N)}return c&&c._strip(),w._strip(),p!=="div"&&g!==0&&w.iushrn(g),{div:c||null,mod:w}},o.prototype.divmod=function(f,p,g){if(n(!f.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var w,E,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,p),p!=="mod"&&(w=k.div.neg()),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.iadd(f)),{div:w,mod:E}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),p),p!=="mod"&&(w=k.div.neg()),{div:w,mod:k.mod}):(this.negative&f.negative)!==0?(k=this.neg().divmod(f.neg(),p),p!=="div"&&(E=k.mod.neg(),g&&E.negative!==0&&E.isub(f)),{div:k.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new o(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new o(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new o(this.modrn(f.words[0]))}:this._wordDiv(f,p)},o.prototype.div=function(f){return this.divmod(f,"div",!1).div},o.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},o.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},o.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var g=p.div.negative!==0?p.mod.isub(f):p.mod,w=f.ushrn(1),E=f.andln(1),k=g.cmp(w);return k<0||E===1&&k===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},o.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=(1<<26)%f,w=0,E=this.length-1;E>=0;E--)w=(g*w+(this.words[E]|0))%f;return p?-w:w},o.prototype.modn=function(f){return this.modrn(f)},o.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var g=0,w=this.length-1;w>=0;w--){var E=(this.words[w]|0)+g*67108864;this.words[w]=E/f|0,g=E%f}return this._strip(),p?this.ineg():this},o.prototype.divn=function(f){return this.clone().idivn(f)},o.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=new o(0),F=new o(1),x=0;p.isEven()&&g.isEven();)p.iushrn(1),g.iushrn(1),++x;for(var c=g.clone(),y=p.clone();!p.isZero();){for(var T=0,d=1;(p.words[0]&d)===0&&T<26;++T,d<<=1);if(T>0)for(p.iushrn(T);T-- >0;)(w.isOdd()||E.isOdd())&&(w.iadd(c),E.isub(y)),w.iushrn(1),E.iushrn(1);for(var N=0,G=1;(g.words[0]&G)===0&&N<26;++N,G<<=1);if(N>0)for(g.iushrn(N);N-- >0;)(k.isOdd()||F.isOdd())&&(k.iadd(c),F.isub(y)),k.iushrn(1),F.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(k),E.isub(F)):(g.isub(p),k.isub(w),F.isub(E))}return{a:k,b:F,gcd:g.iushln(x)}},o.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,g=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var w=new o(1),E=new o(0),k=g.clone();p.cmpn(1)>0&&g.cmpn(1)>0;){for(var F=0,x=1;(p.words[0]&x)===0&&F<26;++F,x<<=1);if(F>0)for(p.iushrn(F);F-- >0;)w.isOdd()&&w.iadd(k),w.iushrn(1);for(var c=0,y=1;(g.words[0]&y)===0&&c<26;++c,y<<=1);if(c>0)for(g.iushrn(c);c-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);p.cmp(g)>=0?(p.isub(g),w.isub(E)):(g.isub(p),E.isub(w))}var T;return p.cmpn(1)===0?T=w:T=E,T.cmpn(0)<0&&T.iadd(f),T},o.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),g=f.clone();p.negative=0,g.negative=0;for(var w=0;p.isEven()&&g.isEven();w++)p.iushrn(1),g.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;g.isEven();)g.iushrn(1);var E=p.cmp(g);if(E<0){var k=p;p=g,g=k}else if(E===0||g.cmpn(1)===0)break;p.isub(g)}while(!0);return g.iushln(w)},o.prototype.invm=function(f){return this.egcd(f).a.umod(f)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(f){return this.words[0]&f},o.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,g=(f-p)/26,w=1<>>26,F&=67108863,this.words[k]=F}return E!==0&&(this.words[k]=E,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var g;if(this.length>1)g=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var w=this.words[0]|0;g=w===f?0:wf.length)return 1;if(this.length=0;g--){var w=this.words[g]|0,E=f.words[g]|0;if(w!==E){wE&&(p=1);break}}return p},o.prototype.gtn=function(f){return this.cmpn(f)===1},o.prototype.gt=function(f){return this.cmp(f)===1},o.prototype.gten=function(f){return this.cmpn(f)>=0},o.prototype.gte=function(f){return this.cmp(f)>=0},o.prototype.ltn=function(f){return this.cmpn(f)===-1},o.prototype.lt=function(f){return this.cmp(f)===-1},o.prototype.lten=function(f){return this.cmpn(f)<=0},o.prototype.lte=function(f){return this.cmp(f)<=0},o.prototype.eqn=function(f){return this.cmpn(f)===0},o.prototype.eq=function(f){return this.cmp(f)===0},o.red=function(f){return new L(f)},o.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(f){return this.red=f,this},o.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},o.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},o.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},o.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},o.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},o.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},o.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},o.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function D(v,f){this.name=v,this.p=new o(f,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var f=new o(null);return f.words=new Array(Math.ceil(this.n/13)),f},D.prototype.ireduce=function(f){var p=f,g;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),g=p.bitLength();while(g>this.n);var w=g0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},D.prototype.split=function(f,p){f.iushrn(this.n,0,p)},D.prototype.imulK=function(f){return f.imul(this.k)};function O(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(O,D),O.prototype.split=function(f,p){for(var g=4194303,w=Math.min(f.length,9),E=0;E>>22,k=F}k>>>=22,f.words[E-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},O.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,g=0;g>>=26,f.words[g]=E,p=w}return p!==0&&(f.words[f.length++]=p),f},o._prime=function(f){if(I[f])return I[f];var p;if(f==="k256")p=new O;else if(f==="p224")p=new J;else if(f==="p192")p=new X;else if(f==="p25519")p=new H;else throw new Error("Unknown prime "+f);return I[f]=p,p};function L(v){if(typeof v=="string"){var f=o._prime(v);this.m=f.p,this.prime=f}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}L.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},L.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},L.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(h(f,f.umod(this.m)._forceRed(this)),f)},L.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},L.prototype.add=function(f,p){this._verify2(f,p);var g=f.add(p);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},L.prototype.iadd=function(f,p){this._verify2(f,p);var g=f.iadd(p);return g.cmp(this.m)>=0&&g.isub(this.m),g},L.prototype.sub=function(f,p){this._verify2(f,p);var g=f.sub(p);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},L.prototype.isub=function(f,p){this._verify2(f,p);var g=f.isub(p);return g.cmpn(0)<0&&g.iadd(this.m),g},L.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},L.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},L.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},L.prototype.isqr=function(f){return this.imul(f,f.clone())},L.prototype.sqr=function(f){return this.mul(f,f)},L.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var g=this.m.add(new o(1)).iushrn(2);return this.pow(f,g)}for(var w=this.m.subn(1),E=0;!w.isZero()&&w.andln(1)===0;)E++,w.iushrn(1);n(!w.isZero());var k=new o(1).toRed(this),F=k.redNeg(),x=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);this.pow(c,x).cmp(F)!==0;)c.redIAdd(F);for(var y=this.pow(c,w),T=this.pow(f,w.addn(1).iushrn(1)),d=this.pow(f,w),N=E;d.cmp(k)!==0;){for(var G=d,U=0;G.cmp(k)!==0;U++)G=G.redSqr();n(U=0;E--){for(var y=p.words[E],T=c-1;T>=0;T--){var d=y>>T&1;if(k!==w[0]&&(k=this.sqr(k)),d===0&&F===0){x=0;continue}F<<=1,F|=d,x++,!(x!==g&&(E!==0||T!==0))&&(k=this.mul(k,w[F]),x=0,F=0)}c=26}return k},L.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},L.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},o.mont=function(f){return new j(f)};function j(v){L.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(j,L),j.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},j.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},j.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var g=f.imul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new o(0)._forceRed(this);var g=f.mul(p),w=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=g.isub(w).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},j.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(r,Be)})(Cp);const l3=Cp.exports,u3="logger/5.7.0";let Du=!1,Ou=!1;const ya={debug:1,default:2,info:2,warning:3,error:4,off:5};let Lu=ya.default,Vs=null;function h3(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const Uu=h3();var xc;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(xc||(xc={}));var rn;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(rn||(rn={}));const Ju="0123456789abcdef";class ce{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();ya[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Lu>ya[n])&&console.log.apply(console,t)}debug(...e){this._log(ce.levels.DEBUG,e)}info(...e){this._log(ce.levels.INFO,e)}warn(...e){this._log(ce.levels.WARNING,e)}makeError(e,t,n){if(Ou)return this.makeError("censored error",t,{});t||(t=ce.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(u=>{const l=n[u];try{if(l instanceof Uint8Array){let h="";for(let b=0;b>4],h+=Ju[l[b]&15];i.push(u+"=Uint8Array(0x"+h+")")}else i.push(u+"="+JSON.stringify(l))}catch{i.push(u+"="+JSON.stringify(n[u].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);const o=e;let a="";switch(t){case rn.NUMERIC_FAULT:{a="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":a+="-"+u;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case rn.CALL_EXCEPTION:case rn.INSUFFICIENT_FUNDS:case rn.MISSING_NEW:case rn.NONCE_EXPIRED:case rn.REPLACEMENT_UNDERPRICED:case rn.TRANSACTION_REPLACED:case rn.UNPREDICTABLE_GAS_LIMIT:a=t;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(n).forEach(function(u){s[u]=n[u]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,ce.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,i){e||this.throwError(t,n,i)}assertArgument(e,t,n,i){e||this.throwArgumentError(t,n,i)}checkNormalize(e){Uu&&this.throwError("platform missing String.prototype.normalize",ce.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Uu})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n?n=": "+n:n="",et&&this.throwError("too many arguments"+n,ce.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",ce.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Vs||(Vs=new ce(u3)),Vs}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Du){if(!e)return;this.globalLogger().throwError("error censorship permanent",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ou=!!e,Du=!!t}static setLogLevel(e){const t=ya[e.toLowerCase()];if(t==null){ce.globalLogger().warn("invalid log level - "+e);return}Lu=t}static from(e){return new ce(e)}}ce.errors=rn;ce.levels=xc;const d3="bytes/5.7.0",Vn=new ce(d3);function Sp(r){return!!r.toHexString}function co(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return co(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function p3(r){return wr(r)&&!(r.length%2)||Jo(r)}function Hu(r){return typeof r=="number"&&r==r&&r%1===0}function Jo(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!Hu(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Wt(r,e){if(e||(e={}),typeof r=="number"){Vn.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),co(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Sp(r)&&(r=r.toHexString()),wr(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Vn.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;iWt(i)),t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),co(n)}function x3(r){let e=Wt(r);if(e.length===0)return e;let t=0;for(;t>4]+Ks[i&15]}return t}return Vn.throwArgumentError("invalid hexlify value","value",r)}function b3(r){if(typeof r!="string")r=Pt(r);else if(!wr(r)||r.length%2)return null;return(r.length-2)/2}function Bp(r,e,t){return typeof r!="string"?r=Pt(r):(!wr(r)||r.length%2)&&Vn.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function g3(r){let e="0x";return r.forEach(t=>{e+=Pt(t).substring(2)}),e}function Mp(r,e){for(typeof r!="string"?r=Pt(r):wr(r)||Vn.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Vn.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}const m3="bignumber/5.7.0";var Ga=l3.BN;const Hn=new ce(m3),Qs={},Gu=9007199254740991;let zu=!1;class it{constructor(e,t){e!==Qs&&Hn.throwError("cannot call constructor directly; use BigNumber.from",ce.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return _r(rt(this).fromTwos(e))}toTwos(e){return _r(rt(this).toTwos(e))}abs(){return this._hex[0]==="-"?it.from(this._hex.substring(1)):this}add(e){return _r(rt(this).add(rt(e)))}sub(e){return _r(rt(this).sub(rt(e)))}div(e){return it.from(e).isZero()&&Gr("division-by-zero","div"),_r(rt(this).div(rt(e)))}mul(e){return _r(rt(this).mul(rt(e)))}mod(e){const t=rt(e);return t.isNeg()&&Gr("division-by-zero","mod"),_r(rt(this).umod(t))}pow(e){const t=rt(e);return t.isNeg()&&Gr("negative-power","pow"),_r(rt(this).pow(t))}and(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","and"),_r(rt(this).and(t))}or(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","or"),_r(rt(this).or(t))}xor(e){const t=rt(e);return(this.isNegative()||t.isNeg())&&Gr("unbound-bitwise-result","xor"),_r(rt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Gr("negative-width","mask"),_r(rt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Gr("negative-width","shl"),_r(rt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Gr("negative-width","shr"),_r(rt(this).shrn(e))}eq(e){return rt(this).eq(rt(e))}lt(e){return rt(this).lt(rt(e))}lte(e){return rt(this).lte(rt(e))}gt(e){return rt(this).gt(rt(e))}gte(e){return rt(this).gte(rt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return rt(this).isZero()}toNumber(){try{return rt(this).toNumber()}catch{Gr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Hn.throwError("this platform does not support BigInt",ce.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?zu||(zu=!0,Hn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Hn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ce.errors.UNEXPECTED_ARGUMENT,{}):Hn.throwError("BigNumber.toString does not accept parameters",ce.errors.UNEXPECTED_ARGUMENT,{})),rt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof it)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new it(Qs,Eo(e)):e.match(/^-?[0-9]+$/)?new it(Qs,Eo(new Ga(e))):Hn.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Gr("underflow","BigNumber.from",e),(e>=Gu||e<=-Gu)&&Gr("overflow","BigNumber.from",e),it.from(String(e));const t=e;if(typeof t=="bigint")return it.from(t.toString());if(Jo(t))return it.from(Pt(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return it.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(wr(n)||n[0]==="-"&&wr(n.substring(1))))return it.from(n)}return Hn.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Eo(r){if(typeof r!="string")return Eo(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Hn.throwArgumentError("invalid hex","value",r),r=Eo(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function _r(r){return it.from(Eo(r))}function rt(r){const e=it.from(r).toHexString();return e[0]==="-"?new Ga("-"+e.substring(3),16):new Ga(e.substring(2),16)}function Gr(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Hn.throwError(r,ce.errors.NUMERIC_FAULT,n)}function y3(r){return new Ga(r,36).toString(16)}const v3="properties/5.7.0";var w3=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const kp=new ce(v3);function ve(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}function fi(r,e){for(let t=0;t<32;t++){if(r[e])return r[e];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}function ci(r){return w3(this,void 0,void 0,function*(){const e=Object.keys(r).map(n=>{const i=r[n];return Promise.resolve(i).then(o=>({key:n,value:o}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Ki(r){const e={};for(const t in r)e[t]=r[t];return e}const A3={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Pp(r){if(r==null||A3[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const e=Object.keys(r);for(let t=0;t_o(e)));if(typeof r=="object"){const e={};for(const t in r){const n=r[t];n!==void 0&&ve(e,t,_o(n))}return e}return kp.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function _o(r){return E3(r)}class ms{constructor(e){for(const t in e)this[t]=_o(e[t])}}const Ho="abi/5.7.0",at=new ce(Ho),Qi={};let ju={calldata:!0,memory:!0,storage:!0},_3={calldata:!0,memory:!0};function ta(r,e){if(r==="bytes"||r==="string"){if(ju[e])return!0}else if(r==="address"){if(e==="payable")return!0}else if((r.indexOf("[")>=0||r==="tuple")&&_3[e])return!0;return(ju[e]||e==="payable")&&at.throwArgumentError("invalid modifier","name",e),!1}function C3(r,e){let t=r;function n(s){at.throwArgumentError(`unexpected character at position ${s}`,"param",r)}r=r.replace(/\s/g," ");function i(s){let u={type:"",name:"",parent:s,state:{allowType:!0}};return e&&(u.indexed=!1),u}let o={type:"",name:"",state:{allowType:!0}},a=o;for(let s=0;sJSON.parse(i.format(e)))),JSON.stringify(n)}let t="";return this.baseType==="array"?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==ht.sighash&&(t+=this.type),t+="("+this.components.map(n=>n.format(e)).join(e===ht.full?", ":",")+")"):t+=this.type,e!==ht.sighash&&(this.indexed===!0&&(t+=" indexed"),e===ht.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return typeof e=="string"?Kt.fromString(e,t):Kt.fromObject(e)}static fromObject(e){return Kt.isParamType(e)?e:new Kt(Qi,{name:e.name||null,type:f0(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Kt.fromObject):null})}static fromString(e,t){function n(i){return Kt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(C3(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Co(r,e){return M3(r).map(t=>Kt.fromString(t,e))}class qn{constructor(e,t){e!==Qi&&at.throwError("use a static from method",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),va(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return qn.isFragment(e)?e:typeof e=="string"?qn.fromString(e):qn.fromObject(e)}static fromObject(e){if(qn.isFragment(e))return e;switch(e.type){case"function":return vn.fromObject(e);case"event":return jn.fromObject(e);case"constructor":return yn.fromObject(e);case"error":return ii.fromObject(e);case"fallback":case"receive":return null}return at.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?jn.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?vn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?yn.fromString(e.trim()):e.split(" ")[0]==="error"?ii.fromString(e.substring(5).trim()):at.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class jn extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",e!==ht.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jn.fromString(e):jn.fromObject(e)}static fromObject(e){if(jn.isEventFragment(e))return e;e.type!=="event"&&at.throwArgumentError("invalid event object","value",e);const t={name:So(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],type:"event"};return new jn(Qi,t)}static fromString(e){let t=e.match(Bo);t||at.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:at.warn("unknown modifier: "+i)}}),jn.fromObject({name:t[1].trim(),anonymous:n,inputs:Co(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Rp(r,e){e.gas=null;let t=r.split("@");return t.length!==1?(t.length>2&&at.throwArgumentError("invalid human-readable ABI signature","value",r),t[1].match(/^[0-9]+$/)||at.throwArgumentError("invalid human-readable ABI signature gas","value",r),e.gas=it.from(t[1]),t[0]):r}function Np(r,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",r.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function Fp(r){let e={constant:!1,payable:!0,stateMutability:"payable"};return r.stateMutability!=null?(e.stateMutability=r.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",r.constant!=null&&!!r.constant!==e.constant&&at.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",r),e.payable=e.stateMutability==="payable",r.payable!=null&&!!r.payable!==e.payable&&at.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",r)):r.payable!=null?(e.payable=!!r.payable,r.constant==null&&!e.payable&&r.type!=="constructor"&&at.throwArgumentError("unable to determine stateMutability","value",r),e.constant=!!r.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&at.throwArgumentError("cannot have constant payable function","value",r)):r.constant!=null?(e.constant=!!r.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):r.type!=="constructor"&&at.throwArgumentError("unable to determine stateMutability","value",r),e}class yn extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===ht.sighash&&at.throwError("cannot format a constructor for sighash",ce.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "),t.trim()}static from(e){return typeof e=="string"?yn.fromString(e):yn.fromObject(e)}static fromObject(e){if(yn.isConstructorFragment(e))return e;e.type!=="constructor"&&at.throwArgumentError("invalid constructor object","value",e);let t=Fp(e);t.constant&&at.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?it.from(e.gas):null};return new yn(Qi,n)}static fromString(e){let t={type:"constructor"};e=Rp(e,t);let n=e.match(Bo);return(!n||n[1].trim()!=="constructor")&&at.throwArgumentError("invalid constructor string","value",e),t.inputs=Co(n[2].trim(),!1),Np(n[3].trim(),t),yn.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class vn extends yn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",e!==ht.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return typeof e=="string"?vn.fromString(e):vn.fromObject(e)}static fromObject(e){if(vn.isFunctionFragment(e))return e;e.type!=="function"&&at.throwArgumentError("invalid function object","value",e);let t=Fp(e);const n={type:e.type,name:So(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(Kt.fromObject):[],outputs:e.outputs?e.outputs.map(Kt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?it.from(e.gas):null};return new vn(Qi,n)}static fromString(e){let t={type:"function"};e=Rp(e,t);let n=e.split(" returns ");n.length>2&&at.throwArgumentError("invalid function string","value",e);let i=n[0].match(Bo);if(i||at.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&So(t.name),t.inputs=Co(i[2],!1),Np(i[3].trim(),t),n.length>1){let o=n[1].match(Bo);(o[1].trim()!=""||o[3].trim()!="")&&at.throwArgumentError("unexpected tokens","value",e),t.outputs=Co(o[2],!1)}else t.outputs=[];return vn.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Xu(r){const e=r.format();return(e==="Error(string)"||e==="Panic(uint256)")&&at.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",r),r}class ii extends qn{format(e){if(e||(e=ht.sighash),ht[e]||at.throwArgumentError("invalid format type","format",e),e===ht.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t="";return e!==ht.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ht.full?", ":",")+") ",t.trim()}static from(e){return typeof e=="string"?ii.fromString(e):ii.fromObject(e)}static fromObject(e){if(ii.isErrorFragment(e))return e;e.type!=="error"&&at.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:So(e.name),inputs:e.inputs?e.inputs.map(Kt.fromObject):[]};return Xu(new ii(Qi,t))}static fromString(e){let t={type:"error"},n=e.match(Bo);return n||at.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&So(t.name),t.inputs=Co(n[2],!1),Xu(ii.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function f0(r){return r.match(/^uint($|[^1-9])/)?r="uint256"+r.substring(4):r.match(/^int($|[^1-9])/)&&(r="int256"+r.substring(3)),r}const B3=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function So(r){return(!r||!r.match(B3))&&at.throwArgumentError(`invalid identifier "${r}"`,"value",r),r}const Bo=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function M3(r){r=r.trim();let e=[],t="",n=0;for(let i=0;ithis.wordSize&&El.throwError("value out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Hi([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class za{constructor(e,t,n,i){ve(this,"_data",Wt(e)),ve(this,"wordSize",t||32),ve(this,"_coerceFunc",n),ve(this,"allowLoose",i),this._offset=0}get data(){return Pt(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):za.coerce(e,t)}_peekBytes(e,t,n){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?i=t:El.throwError("data out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new za(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return it.from(this.readBytes(this.wordSize))}}var Tp={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=Be:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],m=[1,256,65536,16777216],A=[6,1536,393216,100663296],_=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],C=[224,256,384,512],M=[128,256],B=["hex","buffer","arrayBuffer","array","digest"],P={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(d){return Object.prototype.toString.call(d)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(d){return typeof d=="object"&&d.buffer&&d.buffer.constructor===ArrayBuffer});for(var R=function(d,N,G){return function(U){return new c(d,N,d).update(U)[G]()}},I=function(d,N,G){return function(U,z){return new c(d,N,z).update(U)[G]()}},D=function(d,N,G){return function(U,z,te,K){return f["cshake"+d].update(U,z,te,K)[G]()}},O=function(d,N,G){return function(U,z,te,K){return f["kmac"+d].update(U,z,te,K)[G]()}},J=function(d,N,G,U){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}c.prototype.update=function(d){if(this.finalized)throw new Error(t);var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}for(var U=this.blocks,z=this.byteCount,te=d.length,K=this.blockCount,V=0,me=this.s,Q,oe;V>2]|=d[V]<<_[Q++&3];else for(Q=this.start;V>2]|=oe<<_[Q++&3]:oe<2048?(U[Q>>2]|=(192|oe>>6)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):oe<55296||oe>=57344?(U[Q>>2]|=(224|oe>>12)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):(oe=65536+((oe&1023)<<10|d.charCodeAt(++V)&1023),U[Q>>2]|=(240|oe>>18)<<_[Q++&3],U[Q>>2]|=(128|oe>>12&63)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]);if(this.lastByteIndex=Q,Q>=z){for(this.start=Q-z,this.block=U[K],Q=0;Q>8,G=d&255;G>0;)z.unshift(G),d=d>>8,G=d&255,++U;return N?z.push(U):z.unshift(U),this.update(z),z.length},c.prototype.encodeString=function(d){var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}var U=0,z=d.length;if(N)U=z;else for(var te=0;te=57344?U+=3:(K=65536+((K&1023)<<10|d.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(d),U},c.prototype.bytepad=function(d,N){for(var G=this.encode(N),U=0;U>2]|=this.padding[N&3],this.lastByteIndex===this.byteCount)for(d[0]=d[G],N=1;N>4&15]+l[V&15]+l[V>>12&15]+l[V>>8&15]+l[V>>20&15]+l[V>>16&15]+l[V>>28&15]+l[V>>24&15];te%d===0&&(T(N),z=0)}return U&&(V=N[z],K+=l[V>>4&15]+l[V&15],U>1&&(K+=l[V>>12&15]+l[V>>8&15]),U>2&&(K+=l[V>>20&15]+l[V>>16&15])),K},c.prototype.arrayBuffer=function(){this.finalize();var d=this.blockCount,N=this.s,G=this.outputBlocks,U=this.extraBytes,z=0,te=0,K=this.outputBits>>3,V;U?V=new ArrayBuffer(G+1<<2):V=new ArrayBuffer(K);for(var me=new Uint32Array(V);te>8&255,K[V+2]=me>>16&255,K[V+3]=me>>24&255;te%d===0&&T(N)}return U&&(V=te<<2,me=N[z],K[V]=me&255,U>1&&(K[V+1]=me>>8&255),U>2&&(K[V+2]=me>>16&255)),K};function y(d,N,G){c.call(this,d,N,G)}y.prototype=new c,y.prototype.finalize=function(){return this.encode(this.outputBits,!0),c.prototype.finalize.call(this)};var T=function(d){var N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae,xe,ft,de,Ce,St,pe,Ee,wt,W,ie,Ft,Se,Fe,zt,Me,Te,Zt,ke,Ie,jt,De,Pe,$t,Oe,Le,Xt,Ue,Je,qt,He,Re,pt,_e,Ne,er,ze,je,xr,Xe,qe,br,Ve,Ke,tr,rr,nr,ir,or;for(U=0;U<48;U+=2)z=d[0]^d[10]^d[20]^d[30]^d[40],te=d[1]^d[11]^d[21]^d[31]^d[41],K=d[2]^d[12]^d[22]^d[32]^d[42],V=d[3]^d[13]^d[23]^d[33]^d[43],me=d[4]^d[14]^d[24]^d[34]^d[44],Q=d[5]^d[15]^d[25]^d[35]^d[45],oe=d[6]^d[16]^d[26]^d[36]^d[46],xt=d[7]^d[17]^d[27]^d[37]^d[47],we=d[8]^d[18]^d[28]^d[38]^d[48],ge=d[9]^d[19]^d[29]^d[39]^d[49],N=we^(K<<1|V>>>31),G=ge^(V<<1|K>>>31),d[0]^=N,d[1]^=G,d[10]^=N,d[11]^=G,d[20]^=N,d[21]^=G,d[30]^=N,d[31]^=G,d[40]^=N,d[41]^=G,N=z^(me<<1|Q>>>31),G=te^(Q<<1|me>>>31),d[2]^=N,d[3]^=G,d[12]^=N,d[13]^=G,d[22]^=N,d[23]^=G,d[32]^=N,d[33]^=G,d[42]^=N,d[43]^=G,N=K^(oe<<1|xt>>>31),G=V^(xt<<1|oe>>>31),d[4]^=N,d[5]^=G,d[14]^=N,d[15]^=G,d[24]^=N,d[25]^=G,d[34]^=N,d[35]^=G,d[44]^=N,d[45]^=G,N=me^(we<<1|ge>>>31),G=Q^(ge<<1|we>>>31),d[6]^=N,d[7]^=G,d[16]^=N,d[17]^=G,d[26]^=N,d[27]^=G,d[36]^=N,d[37]^=G,d[46]^=N,d[47]^=G,N=oe^(z<<1|te>>>31),G=xt^(te<<1|z>>>31),d[8]^=N,d[9]^=G,d[18]^=N,d[19]^=G,d[28]^=N,d[29]^=G,d[38]^=N,d[39]^=G,d[48]^=N,d[49]^=G,Ct=d[0],Ae=d[1],Re=d[11]<<4|d[10]>>>28,pt=d[10]<<4|d[11]>>>28,Fe=d[20]<<3|d[21]>>>29,zt=d[21]<<3|d[20]>>>29,rr=d[31]<<9|d[30]>>>23,nr=d[30]<<9|d[31]>>>23,Ue=d[40]<<18|d[41]>>>14,Je=d[41]<<18|d[40]>>>14,Ie=d[2]<<1|d[3]>>>31,jt=d[3]<<1|d[2]>>>31,xe=d[13]<<12|d[12]>>>20,ft=d[12]<<12|d[13]>>>20,_e=d[22]<<10|d[23]>>>22,Ne=d[23]<<10|d[22]>>>22,Me=d[33]<<13|d[32]>>>19,Te=d[32]<<13|d[33]>>>19,ir=d[42]<<2|d[43]>>>30,or=d[43]<<2|d[42]>>>30,Xe=d[5]<<30|d[4]>>>2,qe=d[4]<<30|d[5]>>>2,De=d[14]<<6|d[15]>>>26,Pe=d[15]<<6|d[14]>>>26,de=d[25]<<11|d[24]>>>21,Ce=d[24]<<11|d[25]>>>21,er=d[34]<<15|d[35]>>>17,ze=d[35]<<15|d[34]>>>17,Zt=d[45]<<29|d[44]>>>3,ke=d[44]<<29|d[45]>>>3,W=d[6]<<28|d[7]>>>4,ie=d[7]<<28|d[6]>>>4,br=d[17]<<23|d[16]>>>9,Ve=d[16]<<23|d[17]>>>9,$t=d[26]<<25|d[27]>>>7,Oe=d[27]<<25|d[26]>>>7,St=d[36]<<21|d[37]>>>11,pe=d[37]<<21|d[36]>>>11,je=d[47]<<24|d[46]>>>8,xr=d[46]<<24|d[47]>>>8,qt=d[8]<<27|d[9]>>>5,He=d[9]<<27|d[8]>>>5,Ft=d[18]<<20|d[19]>>>12,Se=d[19]<<20|d[18]>>>12,Ke=d[29]<<7|d[28]>>>25,tr=d[28]<<7|d[29]>>>25,Le=d[38]<<8|d[39]>>>24,Xt=d[39]<<8|d[38]>>>24,Ee=d[48]<<14|d[49]>>>18,wt=d[49]<<14|d[48]>>>18,d[0]=Ct^~xe&de,d[1]=Ae^~ft&Ce,d[10]=W^~Ft&Fe,d[11]=ie^~Se&zt,d[20]=Ie^~De&$t,d[21]=jt^~Pe&Oe,d[30]=qt^~Re&_e,d[31]=He^~pt&Ne,d[40]=Xe^~br&Ke,d[41]=qe^~Ve&tr,d[2]=xe^~de&St,d[3]=ft^~Ce&pe,d[12]=Ft^~Fe&Me,d[13]=Se^~zt&Te,d[22]=De^~$t&Le,d[23]=Pe^~Oe&Xt,d[32]=Re^~_e&er,d[33]=pt^~Ne&ze,d[42]=br^~Ke&rr,d[43]=Ve^~tr&nr,d[4]=de^~St&Ee,d[5]=Ce^~pe&wt,d[14]=Fe^~Me&Zt,d[15]=zt^~Te&ke,d[24]=$t^~Le&Ue,d[25]=Oe^~Xt&Je,d[34]=_e^~er&je,d[35]=Ne^~ze&xr,d[44]=Ke^~rr&ir,d[45]=tr^~nr&or,d[6]=St^~Ee&Ct,d[7]=pe^~wt&Ae,d[16]=Me^~Zt&W,d[17]=Te^~ke&ie,d[26]=Le^~Ue&Ie,d[27]=Xt^~Je&jt,d[36]=er^~je&qt,d[37]=ze^~xr&He,d[46]=rr^~ir&Xe,d[47]=nr^~or&qe,d[8]=Ee^~Ct&xe,d[9]=wt^~Ae&ft,d[18]=Zt^~W&Ft,d[19]=ke^~ie&Se,d[28]=Ue^~Ie&De,d[29]=Je^~jt&Pe,d[38]=je^~qt&Re,d[39]=xr^~He&pt,d[48]=ir^~Xe&br,d[49]=or^~qe&Ve,d[0]^=S[U],d[1]^=S[U+1]};if(s)r.exports=f;else for(g=0;g>=8;return e}function Tp(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(o){n=n.concat(Tp(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=qu(n.length);return i.unshift(247+i.length),i.concat(n)}h3(r)||P3.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(Wt(r));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=qu(e.length);return t.unshift(183+t.length),t.concat(e)}function R3(r){return Pt(Tp(r))}const N3="address/5.7.0",h0=new ce(N3);function Vu(r){wr(r,20)||h0.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Wt(Bo(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const F3=9007199254740991;function T3(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const _l={};for(let r=0;r<10;r++)_l[String(r)]=String(r);for(let r=0;r<26;r++)_l[String.fromCharCode(65+r)]=String(10+r);const Ku=Math.floor(T3(F3));function I3(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>_l[n]).join("");for(;e.length>=Ku;){let n=e.substring(0,Ku);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function Yn(r){let e=null;if(typeof r!="string"&&h0.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=Vu(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&h0.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==I3(r)&&h0.throwArgumentError("bad icap checksum","address",r),e=g3(r.substring(4));e.length<40;)e="0"+e;e=Vu("0x"+e)}else h0.throwArgumentError("invalid address","address",r);return e}function Ip(r){let e=null;try{e=Yn(r.from)}catch{h0.throwArgumentError("missing from address","transaction",r)}const t=d3(Wt(it.from(r.nonce).toHexString()));return Yn(Sp(Bo(R3([e,t])),12))}class D3 extends ei{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Yn(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return Yn(Bp(e.readValue().toHexString(),20))}}class O3 extends ei{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const d0=new ce(Jo);function Dp(r,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let u={};n=e.map(l=>{const h=l.localName;return h||d0.throwError("cannot encode object for signature with missing names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]&&d0.throwError("cannot encode object for signature with duplicate names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]=!0,t[h]})}else d0.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&d0.throwArgumentError("types/value length mismatch","tuple",t);let i=new bc(r.wordSize),o=new bc(r.wordSize),a=[];e.forEach((u,l)=>{let h=n[l];if(u.dynamic){let b=o.length;u.encode(o,h);let m=i.writeUpdatableValue();a.push(A=>{m(A+b)})}else u.encode(i,h)}),a.forEach(u=>{u(i.length)});let s=r.appendWriter(i);return s+=r.appendWriter(o),s}function Op(r,e){let t=[],n=r.subReader(0);e.forEach(o=>{let a=null;if(o.dynamic){let s=r.readValue(),u=n.subReader(s.toNumber());try{a=o.decode(u)}catch(l){if(l.code===ce.errors.BUFFER_OVERRUN)throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(r)}catch(s){if(s.code===ce.errors.BUFFER_OVERRUN)throw s;a=s,a.baseType=o.name,a.name=o.localName,a.type=o.type}a!=null&&t.push(a)});const i=e.reduce((o,a)=>{const s=a.localName;return s&&(o[s]||(o[s]=0),o[s]++),o},{});e.forEach((o,a)=>{let s=o.localName;if(!s||i[s]!==1||(s==="length"&&(s="_length"),t[s]!=null))return;const u=t[a];u instanceof Error?Object.defineProperty(t,s,{enumerable:!0,get:()=>{throw u}}):t[s]=u});for(let o=0;o{throw a}})}return Object.freeze(t)}class L3 extends ei{constructor(e,t,n){const i=e.type+"["+(t>=0?t:"")+"]",o=t===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&d0.throwError("insufficient data length",ce.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;i>6===2;a++)o++;return o}return r===Tr.OVERRUN?t.length-e-1:0}function W3(r,e,t,n,i){return r===Tr.OVERLONG?(n.push(i),0):(n.push(65533),Jp(r,e,t))}const Y3=Object.freeze({error:Q3,ignore:Jp,replace:W3});function Z3(r,e){e==null&&(e=Y3.error),r=Wt(r);const t=[];let n=0;for(;n>7===0){t.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?n+=e(Tr.UNEXPECTED_CONTINUE,n-1,r,t):n+=e(Tr.BAD_PREFIX,n-1,r,t);continue}if(n-1+o>=r.length){n+=e(Tr.OVERRUN,n-1,r,t);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111){n+=e(Tr.OUT_OF_RANGE,n-1-o,r,t,s);continue}if(s>=55296&&s<=57343){n+=e(Tr.UTF16_SURROGATE,n-1-o,r,t,s);continue}if(s<=a){n+=e(Tr.OVERLONG,n-1-o,r,t,s);continue}t.push(s)}}return t}function Hp(r,e=ja.current){e!=ja.current&&(Up.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const o=r.charCodeAt(n);if(n>=r.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((i&1023)<<10)+(o&1023);t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return Wt(t)}function $3(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function e8(r,e){return $3(Z3(r,e))}class t8 extends Lp{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Hp(t))}decode(e){return e8(super.decode(e))}}class ra extends ei{constructor(e,t){let n=!1;const i=[];e.forEach(a=>{a.dynamic&&(n=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,t,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const t=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||t[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,t){return Dp(e,this.coders,t)}decode(e){return e.coerce(this.name,Op(e,this.coders))}}const na=new ce(Jo),r8=new RegExp(/^bytes([0-9]*)$/),n8=new RegExp(/^(u?int)([0-9]*)$/);class i8{constructor(e){ve(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new D3(e.name);case"bool":return new U3(e.name);case"string":return new t8(e.name);case"bytes":return new J3(e.name);case"array":return new L3(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ra((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new G3(e.name)}let t=e.type.match(n8);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&na.throwArgumentError("invalid "+t[1]+" bit length","param",e),new V3(n/8,t[1]==="int",e.name)}if(t=e.type.match(r8),t){let n=parseInt(t[1]);return(n===0||n>32)&&na.throwArgumentError("invalid bytes length","param",e),new H3(n,e.name)}return na.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new za(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new bc(this._getWordSize())}getDefaultValue(e){const t=e.map(i=>this._getCoder(Kt.from(i)));return new ra(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&na.throwError("types/values length mismatch",ce.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const n=e.map(a=>this._getCoder(Kt.from(a))),i=new ra(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}decode(e,t,n){const i=e.map(a=>this._getCoder(Kt.from(a)));return new ra(i,"_").decode(this._getReader(Wt(t),n))}}const o8=new i8;function ia(r){return Bo(Hp(r))}const Mt=new ce(Jo);class a8 extends ms{}class s8 extends ms{}class f8 extends ms{}class gc extends ms{static isIndexed(e){return!!(e&&e._isIndexed)}}const c8={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Qu(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);return t.error=e,t}class mc{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,ve(this,"fragments",t.map(n=>qn.from(n)).filter(n=>n!=null)),ve(this,"_abiCoder",fi(new.target,"getAbiCoder")()),ve(this,"functions",{}),ve(this,"errors",{}),ve(this,"events",{}),ve(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Mt.warn("duplicate definition - constructor");return}ve(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){Mt.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||ve(this,"deploy",yn.from({payable:!1,type:"constructor"})),ve(this,"_isInterface",!0)}format(e){e||(e=ht.full),e===ht.sighash&&Mt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(n=>n.format(e));return e===ht.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return o8}static getAddress(e){return Yn(e)}static getSighash(e){return Sp(ia(e.format()),0,4)}static getEventTopic(e){return ia(e.format())}getFunction(e){if(wr(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Mt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching function","name",n):i.length>1&&Mt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const t=this.functions[vn.fromString(e).format()];return t||Mt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(wr(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Mt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching event","name",n):i.length>1&&Mt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const t=this.events[jn.fromString(e).format()];return t||Mt.throwArgumentError("no matching event","signature",e),t}getError(e){if(wr(e)){const n=fi(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}Mt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching error","name",n):i.length>1&&Mt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const t=this.errors[vn.fromString(e).format()];return t||Mt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return fi(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),fi(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));const n=Wt(t);return Pt(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Pt(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),Pt(Hi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));const n=Wt(t);return Pt(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Pt(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),Pt(Hi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=Wt(t),i=null,o="",a=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=Pt(n.slice(0,4)),h=c8[l];if(h)a=this._abiCoder.decode(h.inputs,n.slice(4)),s=h.name,u=h.signature,h.reason&&(i=a[0]),s==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:s==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const b=this.getError(l);a=this._abiCoder.decode(b.inputs,n.slice(4)),s=b.name,u=b.format()}catch{}break}}return Mt.throwError("call revert exception"+o,ce.errors.CALL_EXCEPTION,{method:e.format(),data:Pt(t),errorArgs:a,errorName:s,errorSignature:u,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),Pt(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Mt.throwError("too many arguments for "+e.format(),ce.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,a)=>o.type==="string"?ia(a):o.type==="bytes"?Bo(Pt(a)):(o.type==="bool"&&typeof a=="boolean"&&(a=a?"0x01":"0x00"),o.type.match(/^u?int/)&&(a=it.from(a).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[a]),Bp(Pt(a),32));for(t.forEach((o,a)=>{let s=e.inputs[a];if(!s.indexed){o!=null&&Mt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,o);return}o==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?Mt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,o):Array.isArray(o)?n.push(o.map(u=>i(s,u))):n.push(i(s,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Mt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((a,s)=>{const u=t[s];if(a.indexed)if(a.type==="string")n.push(ia(u));else if(a.type==="bytes")n.push(Bo(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([a.type],[u]))}else i.push(a),o.push(u)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!wr(n[0],32)||n[0].toLowerCase()!==m)&&Mt.throwError("fragment/topic mismatch",ce.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],a=[];e.inputs.forEach((m,A)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(Kt.fromObject({type:"bytes32",name:m.name})),a.push(!0)):(i.push(m),a.push(!1)):(o.push(m),a.push(!1))});let s=n!=null?this._abiCoder.decode(i,Hi(n)):null,u=this._abiCoder.decode(o,t,!0),l=[],h=0,b=0;e.inputs.forEach((m,A)=>{if(m.indexed)if(s==null)l[A]=new gc({_isIndexed:!0,hash:null});else if(a[A])l[A]=new gc({_isIndexed:!0,hash:s[b++]});else try{l[A]=s[b++]}catch(_){l[A]=_}else try{l[A]=u[h++]}catch(_){l[A]=_}if(m.name&&l[m.name]==null){const _=l[A];_ instanceof Error?Object.defineProperty(l,m.name,{enumerable:!0,get:()=>{throw Qu(`property ${JSON.stringify(m.name)}`,_)}}):l[m.name]=_}});for(let m=0;m{throw Qu(`index ${m}`,A)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new s8({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:it.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new a8({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=Pt(e);let n=this.getError(t.substring(0,10).toLowerCase());return n?new f8({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const l8="abstract-provider/5.7.0";var u8=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const h8=new ce(l8);class Cl{constructor(){h8.checkAbstract(new.target,Cl),ve(this,"_isProvider",!0)}getFeeData(){return u8(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield ci({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(a=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=it.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}const d8="abstract-signer/5.7.0";var en=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const zr=new ce(d8),p8=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],x8=[ce.errors.INSUFFICIENT_FUNDS,ce.errors.NONCE_EXPIRED,ce.errors.REPLACEMENT_UNDERPRICED];class Ho{constructor(){zr.checkAbstract(new.target,Ho),ve(this,"_isSigner",!0)}getBalance(e){return en(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return en(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return en(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield ci(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return en(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield ci(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return en(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return en(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return en(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return en(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return en(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)p8.indexOf(n)===-1&&zr.throwArgumentError("invalid transaction key: "+n,"transaction",e);const t=Ki(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&zr.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return en(this,void 0,void 0,function*(){const t=yield ci(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>en(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&zr.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?zr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&zr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&zr.throwError("network does not support EIP-1559",ce.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):zr.throwError("failed to get consistent fee data",ce.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(x8.indexOf(i.code)>=0)throw i;return zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ce.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&zr.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield ci(t)})}_checkProvider(e){this.provider||zr.throwError("missing provider",ce.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Sl extends Ho{constructor(e,t){super(),ve(this,"address",e),ve(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{zr.throwError(e,ce.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Sl(this.address,e)}}const b8="transactions/5.7.0",Gp=new ce(b8);var Wu;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(Wu||(Wu={}));function Ws(r,e){return{address:Yn(r),storageKeys:(e||[]).map((t,n)=>(p3(t)!==32&&Gp.throwArgumentError("invalid access list storageKey",`accessList[${r}:${n}]`,t),t.toLowerCase()))}}function g8(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(t.length>2&&Gp.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Ws(t[0],t[1])):Ws(t.address,t.storageKeys));const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,o)=>(i[o]=!0,i),{});return Ws(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}const m8="contracts/5.7.0";var bi=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const bt=new ce(m8),y8={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Xa(r,e){return bi(this,void 0,void 0,function*(){const t=yield e;typeof t!="string"&&bt.throwArgumentError("invalid address or ENS name","name",t);try{return Yn(t)}catch{}r||bt.throwError("a provider or signer is needed to resolve ENS names",ce.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield r.resolveName(t);return n==null&&bt.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function co(r,e,t){return bi(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>co(r,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Xa(r,e):t.type==="tuple"?yield co(r,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>co(r,n,t.arrayChildren))):Promise.reject(bt.makeError("invalid value for array",ce.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function ys(r,e,t){return bi(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=Ki(t.pop())),bt.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),r.signer?n.from?n.from=ci({override:Xa(r.signer,n.from),signer:r.signer.getAddress()}).then(l=>bi(this,void 0,void 0,function*(){return Yn(l.signer)!==l.override&&bt.throwError("Contract with a Signer cannot override from",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=r.signer.getAddress():n.from&&(n.from=Xa(r.provider,n.from));const i=yield ci({args:co(r.signer||r.provider,t,e.inputs),address:r.resolvedAddress,overrides:ci(n)||{}}),o=r.interface.encodeFunctionData(e,i.args),a={data:o,to:i.address},s=i.overrides;if(s.nonce!=null&&(a.nonce=it.from(s.nonce).toNumber()),s.gasLimit!=null&&(a.gasLimit=it.from(s.gasLimit)),s.gasPrice!=null&&(a.gasPrice=it.from(s.gasPrice)),s.maxFeePerGas!=null&&(a.maxFeePerGas=it.from(s.maxFeePerGas)),s.maxPriorityFeePerGas!=null&&(a.maxPriorityFeePerGas=it.from(s.maxPriorityFeePerGas)),s.from!=null&&(a.from=s.from),s.type!=null&&(a.type=s.type),s.accessList!=null&&(a.accessList=g8(s.accessList)),a.gasLimit==null&&e.gas!=null){let l=21e3;const h=Wt(o);for(let b=0;bn[l]!=null);return u.length&&bt.throwError(`cannot override ${u.map(l=>JSON.stringify(l)).join(",")}`,ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a})}function v8(r,e){return function(...t){return ys(r,e,t)}}function w8(r,e){const t=r.signer||r.provider;return function(...n){return bi(this,void 0,void 0,function*(){t||bt.throwError("estimate require a provider or signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield ys(r,e,n);return yield t.estimateGas(i)})}}function zp(r,e){const t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(o=>{let a=Eo(o),s=null;try{s=r.interface.parseLog(o)}catch{}return s&&(a.args=s.args,a.decode=(u,l)=>r.interface.decodeEventLog(s.eventFragment,u,l),a.event=s.name,a.eventSignature=s.signature),a.removeListener=()=>r.provider,a.getBlock=()=>r.provider.getBlock(i.blockHash),a.getTransaction=()=>r.provider.getTransaction(i.transactionHash),a.getTransactionReceipt=()=>Promise.resolve(i),a}),i))}function jp(r,e,t){const n=r.signer||r.provider;return function(...i){return bi(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const u=Ki(i.pop());u.blockTag!=null&&(o=yield u.blockTag),delete u.blockTag,i.push(u)}r.deployTransaction!=null&&(yield r._deployed(o));const a=yield ys(r,e,i),s=yield n.call(a,o);try{let u=r.interface.decodeFunctionResult(e,s);return t&&e.outputs.length===1&&(u=u[0]),u}catch(u){throw u.code===ce.errors.CALL_EXCEPTION&&(u.address=r.address,u.args=i,u.transaction=a),u}})}}function A8(r,e){return function(...t){return bi(this,void 0,void 0,function*(){r.signer||bt.throwError("sending a transaction requires a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),r.deployTransaction!=null&&(yield r._deployed());const n=yield ys(r,e,t),i=yield r.signer.sendTransaction(n);return zp(r,i),i})}}function Yu(r,e,t){return e.constant?jp(r,e,t):A8(r,e)}function Xp(r){return r.address&&(r.topics==null||r.topics.length===0)?"*":(r.address||"*")+"@"+(r.topics?r.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Mo{constructor(e,t){ve(this,"tag",e),ve(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class E8 extends Mo{constructor(){super("error",null)}}class Zu extends Mo{constructor(e,t,n,i){const o={address:e};let a=t.getEventTopic(n);i?(a!==i[0]&&bt.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[a],super(Xp(o),o),ve(this,"address",e),ve(this,"interface",t),ve(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=B3(e.args);if(t.length)throw t[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class $u extends Mo{constructor(e,t){super("*",{address:e}),ve(this,"address",e),ve(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}}class _8{constructor(e,t,n){ve(this,"interface",fi(new.target,"getInterface")(t)),n==null?(ve(this,"provider",null),ve(this,"signer",null)):Ho.isSigner(n)?(ve(this,"provider",n.provider||null),ve(this,"signer",n)):Cl.isProvider(n)?(ve(this,"provider",n),ve(this,"signer",null)):bt.throwArgumentError("invalid signer or provider","signerOrProvider",n),ve(this,"callStatic",{}),ve(this,"estimateGas",{}),ve(this,"functions",{}),ve(this,"populateTransaction",{}),ve(this,"filters",{});{const a={};Object.keys(this.interface.events).forEach(s=>{const u=this.interface.events[s];ve(this.filters,s,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(u,l)})),a[u.name]||(a[u.name]=[]),a[u.name].push(s)}),Object.keys(a).forEach(s=>{const u=a[s];u.length===1?ve(this.filters,s,this.filters[u[0]]):bt.warn(`Duplicate definition of ${s} (${u.join(", ")})`)})}if(ve(this,"_runningEvents",{}),ve(this,"_wrappedEmits",{}),e==null&&bt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ve(this,"address",e),this.provider)ve(this,"resolvedAddress",Xa(this.provider,e));else try{ve(this,"resolvedAddress",Promise.resolve(Yn(e)))}catch{bt.throwError("provider is required to use ENS name as contract address",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(a=>{});const i={},o={};Object.keys(this.interface.functions).forEach(a=>{const s=this.interface.functions[a];if(o[a]){bt.warn(`Duplicate ABI entry for ${JSON.stringify(a)}`);return}o[a]=!0;{const u=s.name;i[`%${u}`]||(i[`%${u}`]=[]),i[`%${u}`].push(a)}this[a]==null&&ve(this,a,Yu(this,s,!0)),this.functions[a]==null&&ve(this.functions,a,Yu(this,s,!1)),this.callStatic[a]==null&&ve(this.callStatic,a,jp(this,s,!0)),this.populateTransaction[a]==null&&ve(this.populateTransaction,a,v8(this,s)),this.estimateGas[a]==null&&ve(this.estimateGas,a,w8(this,s))}),Object.keys(i).forEach(a=>{const s=i[a];if(s.length>1)return;a=a.substring(1);const u=s[0];try{this[a]==null&&ve(this,a,this[u])}catch{}this.functions[a]==null&&ve(this.functions,a,this.functions[u]),this.callStatic[a]==null&&ve(this.callStatic,a,this.callStatic[u]),this.populateTransaction[a]==null&&ve(this.populateTransaction,a,this.populateTransaction[u]),this.estimateGas[a]==null&&ve(this.estimateGas,a,this.estimateGas[u])})}static getContractAddress(e){return Ip(e)}static getInterface(e){return mc.isInterface(e)?e:new mc(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&bt.throwError("contract not deployed",ce.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||bt.throwError("sending a transactions require a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=Ki(e||{});return["from","to"].forEach(function(n){t[n]!=null&&bt.throwError("cannot override "+n,ce.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new Sl(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ve(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return gc.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new E8);if(e==="event")return this._normalizeRunningEvent(new Mo("event",null));if(e==="*")return this._normalizeRunningEvent(new $u(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Zu(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Zu(this.address,this.interface,i,e.topics))}catch{}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Mo(Xp(t),t))}return this._normalizeRunningEvent(new $u(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){const i=Eo(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||bt.throwError("events require a provider or a signer with a provider",ce.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let a=this._wrapEvent(e,o,t);if(a.decodeError==null)try{const s=e.getEmit(a);this.emit(e.filter,...s)}catch(s){a.decodeError=s.error}e.filter!=null&&this.emit("event",a),a.decodeError!=null&&this.emit("error",a.decodeError,a)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){const i=this._getRunningEvent(e),o=Ki(i.filter);return typeof t=="string"&&wr(t,32)?(n!=null&&bt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=t):(o.fromBlock=t!=null?t:0,o.toBlock=n!=null?n:"latest"),this.provider.getLogs(o).then(a=>a.map(s=>this._wrapEvent(i,s,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}}class yc extends _8{}class C8{constructor(e,t,n){let i=null;typeof t=="string"?i=t:Uo(t)?i=Pt(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!wr(i)||i.length%2)&&bt.throwArgumentError("invalid bytecode","bytecode",t),n&&!Ho.isSigner(n)&&bt.throwArgumentError("invalid signer","signer",n),ve(this,"bytecode",i),ve(this,"interface",fi(new.target,"getInterface")(e)),ve(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=Ki(e.pop());for(const n in t)if(!y8[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&bt.throwError("cannot override "+n,ce.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!it.from(t.value).isZero()&&!this.interface.deploy.payable&&bt.throwError("non-payable constructor cannot override value",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),bt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Pt(Hi([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return bi(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),bt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const n=yield co(this.signer,e,this.interface.deploy.inputs);n.push(t);const i=this.getDeployTransaction(...n),o=yield this.signer.sendTransaction(i),a=fi(this.constructor,"getContractAddress")(o),s=fi(this.constructor,"getContract")(a,this.interface,this.signer);return zp(s,o),ve(s,"deployTransaction",o),s})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&bt.throwError("missing compiler output",ce.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return yc.getInterface(e)}static getContractAddress(e){return Ip(e)}static getContract(e,t,n){return new yc(e,t,n)}}const S8="ethers/5.7.0";new ce(S8);const wa=[{inputs:[{internalType:"address[]",name:"solutions",type:"address[]"},{internalType:"address[]",name:"keys",type:"address[]"},{internalType:"bytes",name:"questsRootCid",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"completedChapter",type:"uint256"},{indexed:!0,internalType:"address",name:"player",type:"address"}],name:"ChapterCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"GAME_MASTER_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint96",name:"",type:"uint96"},{internalType:"uint256",name:"",type:"uint256"}],name:"_chapterToPlayers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_gameMasters",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_keyToPos",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_playerToCurrentChapter",outputs:[{internalType:"uint96",name:"",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_playerToKeys",outputs:[{internalType:"uint80",name:"",type:"uint80"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_players",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_questsRootCid",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_solutions",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solution",type:"address"}],name:"addSolution",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currentChapter",outputs:[{internalType:"uint96",name:"",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"a",type:"address"}],name:"getAddressHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"page",type:"uint256"}],name:"getLeaderboard",outputs:[{internalType:"uint256[32]",name:"leaderboard",type:"uint256[32]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getQuestsRootCID",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"questsRootCid",type:"bytes"}],name:"setQuestsRootCID",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"submit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"submitKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalChapters",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalKeys",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],qp="0x60806040523480156200001157600080fd5b5060405162001cc038038062001cc08339810160408190526200003491620003a0565b6200003f336200014b565b82516200005490600790602086019062000237565b50600a62000063828262000530565b5060005b82518160ff161015620000f3576200008181600162000612565b60046000858460ff16815181106200009d576200009d6200062e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080620000ea9062000644565b91505062000067565b5081516006805460ff191660ff909216919091179055620001166000336200019b565b620001427f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b4336200019b565b50505062000666565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001a782826200020a565b620002065760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b8280548282559060005260206000209081019282156200028f579160200282015b828111156200028f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000258565b506200029d929150620002a1565b5090565b5b808211156200029d5760008155600101620002a2565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002f957620002f9620002b8565b604052919050565b600082601f8301126200031357600080fd5b815160206001600160401b03821115620003315762000331620002b8565b8160051b62000342828201620002ce565b92835284810182019282810190878511156200035d57600080fd5b83870192505b84831015620003955782516001600160a01b0381168114620003855760008081fd5b8252918301919083019062000363565b979650505050505050565b600080600060608486031215620003b657600080fd5b83516001600160401b0380821115620003ce57600080fd5b620003dc8783880162000301565b9450602091508186015181811115620003f457600080fd5b620004028882890162000301565b9450506040860151818111156200041857600080fd5b8601601f810188136200042a57600080fd5b8051828111156200043f576200043f620002b8565b62000453601f8201601f19168501620002ce565b925080835288848284010111156200046a57600080fd5b60005b818110156200048a5782810185015184820186015284016200046d565b506000848285010152505080925050509250925092565b600181811c90821680620004b657607f821691505b602082108103620004d757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200052b57600081815260208120601f850160051c81016020861015620005065750805b601f850160051c820191505b81811015620005275782815560010162000512565b5050505b505050565b81516001600160401b038111156200054c576200054c620002b8565b62000564816200055d8454620004a1565b84620004dd565b602080601f8311600181146200059c5760008415620005835750858301515b600019600386901b1c1916600185901b17855562000527565b600085815260208120601f198616915b82811015620005cd57888601518255948401946001909101908401620005ac565b5085821015620005ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115620002315762000231620005fc565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036200065d576200065d620005fc565b60010192915050565b61164a80620006766000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638006a17411610104578063a6bd257a116100a2578063d3a8291f11610071578063d3a8291f14610467578063d547741f1461048a578063e97b0a261461049d578063f2fde38b146104b057600080fd5b8063a6bd257a14610412578063ad1def1e14610425578063bbfff4611461044c578063c3d8bfed1461045f57600080fd5b806391d14854116100de57806391d14854146103c257806394f7972e146103d5578063a217fddf146103ea578063a34b46fe146103f257600080fd5b80638006a1741461038b578063832e16951461039e5780638da5cb5b146103b157600080fd5b80633ba2981011610171578063488bdabc1161014b578063488bdabc14610333578063626bb7fb14610352578063715018a61461036557806376f0a0e81461036d57600080fd5b80633ba298101461029857806341587823146102d957806345d62ede146102ec57600080fd5b80632d49241c116101ad5780632d49241c146102325780632f2ff15d1461025d57806336568abe146102725780633b81720a1461028557600080fd5b806301ffc9a7146101d45780630db4e5f1146101fc578063248a9ca31461020e575b600080fd5b6101e76101e2366004611111565b6104c3565b60405190151581526020015b60405180910390f35b6007545b6040519081526020016101f3565b61020061021c36600461113b565b6000908152600160208190526040909120015490565b61024561024036600461113b565b6104fa565b6040516001600160a01b0390911681526020016101f3565b61027061026b366004611170565b610524565b005b610270610280366004611170565b61054f565b61024561029336600461113b565b6105d2565b6102c16102a636600461119c565b6003602052600090815260409020546001600160601b031681565b6040516001600160601b0390911681526020016101f3565b6102456102e736600461113b565b6105e2565b6103186102fa36600461119c565b60056020526000908152604090205469ffffffffffffffffffff1681565b60405169ffffffffffffffffffff90911681526020016101f3565b6006546103409060ff1681565b60405160ff90911681526020016101f3565b6102706103603660046111b7565b6105f2565b61027061070a565b336000908152600360205260409020546001600160601b03166102c1565b6102706103993660046111b7565b61071e565b6102706103ac36600461119c565b610930565b6000546001600160a01b0316610245565b6101e76103d0366004611170565b6109ad565b6103dd6109d8565b6040516101f39190611242565b610200600081565b61040561040036600461113b565b610a66565b6040516101f39190611255565b61024561042036600461128b565b610b61565b6102007f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b481565b61020061045a36600461119c565b610b99565b6103dd610bfe565b61034061047536600461119c565b60046020526000908152604090205460ff1681565b610270610498366004611170565b610c90565b6102706104ab3660046112d9565b610cb6565b6102706104be36600461119c565b610cec565b60006001600160e01b03198216637965db0b60e01b14806104f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6007818154811061050a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000828152600160208190526040909120015461054081610d65565b61054a8383610d6f565b505050565b6001600160a01b03811633146105c45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105ce8282610dda565b5050565b6009818154811061050a57600080fd5b6008818154811061050a57600080fd5b600060016105ff33610b99565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561064d573d6000803e3d6000fd5b505060408051601f1901516001600160a01b03811660009081526004602052919091205490925060ff169050806106b25760405162461bcd60e51b815260206004820152600960248201526857726f6e67206b657960b81b60448201526064016105bb565b6106bd6001826113a0565b336000908152600560205260409020805469ffffffffffffffffffff600160ff949094169390931b83169281169290921769ffffffffffffffffffff199092169190911790555050505050565b610712610e41565b61071c6000610e9b565b565b33600090815260036020526040812054600780546001600160601b0390921692918390811061074f5761074f6113b9565b60009182526020822001546001600160a01b0316915061076e33610b99565b60408051600081526020810180835283905260ff89169181019190915260608101879052608081018690529091506001600160a01b0383169060019060a0016020604051602081039080840390855afa1580156107cf573d6000803e3d6000fd5b505050602060405103516001600160a01b0316146108215760405162461bcd60e51b815260206004820152600f60248201526e2bb937b7339039b7b63aba34b7b71760891b60448201526064016105bb565b336000908152600360205260408120546001600160601b0316900361088357600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b031916331790555b33600090815260036020526040812080546001600160601b0316916108a7836113cf565b82546101009290920a6001600160601b038181021990931691831602179091558416600081815260026020908152604080832080546001810182559084529183209091018054336001600160a01b0319909116811790915590519093507f2eba109031d1dc66e58c335884697c94f36785182e2b5dac5f706b8647a5c5829190a3505050505050565b7f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b461095a81610d65565b50600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b0392909216919091179055565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600a80546109e5906113f5565b80601f0160208091040260200160405190810160405280929190818152602001828054610a11906113f5565b8015610a5e5780601f10610a3357610100808354040283529160200191610a5e565b820191906000526020600020905b815481529060010190602001808311610a4157829003601f168201915b505050505081565b610a6e6110f2565b6000610a7b60208461142f565b905060005b602081108015610a9a5750600854610a98838361144e565b105b15610b5a5760006008610aad848461144e565b81548110610abd57610abd6113b9565b6000918252602080832091909101546001600160a01b038116808452600583526040808520546003855294205490945069ffffffffffffffffffff84169360ff90911660089190911b6affffffffffffffffffff001660609290921b6bffffffffffffffffffffffff1916919091171790869085908110610b4057610b406113b9565b602002015250819050610b5281611461565b915050610a80565b5050919050565b60026020528160005260406000208181548110610b7d57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a32300000000060208201526bffffffffffffffffffffffff19606083901b16603c820152600090605001604051602081830303815290604052805190602001209050919050565b6060600a8054610c0d906113f5565b80601f0160208091040260200160405190810160405280929190818152602001828054610c39906113f5565b8015610c865780601f10610c5b57610100808354040283529160200191610c86565b820191906000526020600020905b815481529060010190602001808311610c6957829003601f168201915b5050505050905090565b60008281526001602081905260409091200154610cac81610d65565b61054a8383610dda565b7f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b4610ce081610d65565b600a61054a83826114c8565b610cf4610e41565b6001600160a01b038116610d595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105bb565b610d6281610e9b565b50565b610d628133610eeb565b610d7982826109ad565b6105ce5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610de482826109ad565b156105ce5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546001600160a01b0316331461071c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105bb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ef582826109ad565b6105ce57610f0d816001600160a01b03166014610f4f565b610f18836020610f4f565b604051602001610f29929190611588565b60408051601f198184030181529082905262461bcd60e51b82526105bb91600401611242565b60606000610f5e83600261142f565b610f6990600261144e565b67ffffffffffffffff811115610f8157610f816112c3565b6040519080825280601f01601f191660200182016040528015610fab576020820181803683370190505b509050600360fc1b81600081518110610fc657610fc66113b9565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ff557610ff56113b9565b60200101906001600160f81b031916908160001a905350600061101984600261142f565b61102490600161144e565b90505b600181111561109c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611058576110586113b9565b1a60f81b82828151811061106e5761106e6113b9565b60200101906001600160f81b031916908160001a90535060049490941c93611095816115fd565b9050611027565b5083156110eb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bb565b9392505050565b6040518061040001604052806020906020820280368337509192915050565b60006020828403121561112357600080fd5b81356001600160e01b0319811681146110eb57600080fd5b60006020828403121561114d57600080fd5b5035919050565b80356001600160a01b038116811461116b57600080fd5b919050565b6000806040838503121561118357600080fd5b8235915061119360208401611154565b90509250929050565b6000602082840312156111ae57600080fd5b6110eb82611154565b6000806000606084860312156111cc57600080fd5b833560ff811681146111dd57600080fd5b95602085013595506040909401359392505050565b60005b8381101561120d5781810151838201526020016111f5565b50506000910152565b6000815180845261122e8160208601602086016111f2565b601f01601f19169290920160200192915050565b6020815260006110eb6020830184611216565b6104008101818360005b602080821061126e5750611282565b82518452928301929091019060010161125f565b50505092915050565b6000806040838503121561129e57600080fd5b82356001600160601b03811681146112b557600080fd5b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156112eb57600080fd5b813567ffffffffffffffff8082111561130357600080fd5b818401915084601f83011261131757600080fd5b813581811115611329576113296112c3565b604051601f8201601f19908116603f01168101908382118183101715611351576113516112c3565b8160405282815287602084870101111561136a57600080fd5b826020860160208301376000928101602001929092525095945050505050565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156104f4576104f461138a565b634e487b7160e01b600052603260045260246000fd5b60006001600160601b038083168181036113eb576113eb61138a565b6001019392505050565b600181811c9082168061140957607f821691505b60208210810361142957634e487b7160e01b600052602260045260246000fd5b50919050565b60008160001904831182151516156114495761144961138a565b500290565b808201808211156104f4576104f461138a565b6000600182016114735761147361138a565b5060010190565b601f82111561054a57600081815260208120601f850160051c810160208610156114a15750805b601f850160051c820191505b818110156114c0578281556001016114ad565b505050505050565b815167ffffffffffffffff8111156114e2576114e26112c3565b6114f6816114f084546113f5565b8461147a565b602080601f83116001811461152b57600084156115135750858301515b600019600386901b1c1916600185901b1785556114c0565b600085815260208120601f198616915b8281101561155a5788860151825594840194600190910190840161153b565b50858210156115785787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516115c08160178501602088016111f2565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516115f18160288401602088016111f2565b01602801949350505050565b60008161160c5761160c61138a565b50600019019056fea2646970667358221220da0ea57f2b699f15f581b29aac545335652c254f0f04899c8a16f3a6a5e1af4564736f6c63430008100033",B8=r=>r.length>1;class Bl extends C8{constructor(...e){B8(e)?super(...e):super(wa,qp,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new mc(wa)}static connect(e,t){return new yc(e,wa,t)}}Bl.bytecode=qp;Bl.abi=wa;const M8="networks/5.7.0",eh=new q(M8);function k8(r){return r&&typeof r.renetwork=="function"}function oi(r){const e=function(t,n){n==null&&(n={});const i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(r,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(r,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(r,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby"];try{const a=new t.PocketProvider(r,n.pocket);a.network&&o.indexOf(a.network.name)===-1&&i.push(a)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(r))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],a=new t.AnkrProvider(r,n.ankr);a.network&&o.indexOf(a.network.name)===-1&&i.push(a)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:r==="homestead"&&(o=2),new t.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(t){return oi(t)},e}function qa(r,e){const t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(r,e):null};return t.renetwork=function(n){return qa(r,n)},t}const th={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:oi("homestead")},rh={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:oi("ropsten")},nh={chainId:63,name:"classicMordor",_defaultProvider:qa("https://www.ethercluster.com/mordor","classicMordor")},oa={unspecified:{chainId:0,name:"unspecified"},homestead:th,mainnet:th,morden:{chainId:2,name:"morden"},ropsten:rh,testnet:rh,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:oi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:oi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:oi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},classic:{chainId:61,name:"classic",_defaultProvider:qa("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:nh,classicTestnet:nh,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qa("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:oi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:oi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function P8(r){if(r==null)return null;if(typeof r=="number"){for(const n in oa){const i=oa[n];if(i.chainId===r)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:r,name:"unknown"}}if(typeof r=="string"){const n=oa[r];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=oa[r.name];if(!e)return typeof r.chainId!="number"&&eh.throwArgumentError("invalid network chainId","network",r),r;r.chainId!==0&&r.chainId!==e.chainId&&eh.throwArgumentError("network chainId mismatch","network",r);let t=r._defaultProvider||null;return t==null&&e._defaultProvider&&(k8(e._defaultProvider)?t=e._defaultProvider.renetwork(r):t=e._defaultProvider),{name:r.name,chainId:e.chainId,ensAddress:r.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Va="qpzry9x8gf2tvdw0s3jn54khce6mua7l",vc={};for(var aa=0;aa>25;return(r&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Vp(r){for(var e=1,t=0;t126)return"Invalid prefix ("+r+")";e=m0(e)^n>>5}for(e=m0(e),t=0;tt)throw new TypeError("Exceeds length limit");r=r.toLowerCase();var n=Vp(r);if(typeof n=="string")throw new Error(n);for(var i=r+"1",o=0;o>5!==0)throw new Error("Non 5-bit word");n=m0(n)^a,i+=Va.charAt(a)}for(o=0;o<6;++o)n=m0(n);for(n^=1,o=0;o<6;++o){var s=n>>(5-o)*5&31;i+=Va.charAt(s)}return i}function Kp(r,e){if(e=e||90,r.length<8)return r+" too short";if(r.length>e)return"Exceeds length limit";var t=r.toLowerCase(),n=r.toUpperCase();if(r!==t&&r!==n)return"Mixed-case string "+r;r=t;var i=r.lastIndexOf("1");if(i===-1)return"No separator character for "+r;if(i===0)return"Missing prefix for "+r;var o=r.slice(0,i),a=r.slice(i+1);if(a.length<6)return"Data too short";var s=Vp(o);if(typeof s=="string")return s;for(var u=[],l=0;l=a.length)&&u.push(b)}return s!==1?"Invalid checksum for "+r:{prefix:o,words:u}}function N8(){var r=Kp.apply(null,arguments);if(typeof r=="object")return r}function F8(r){var e=Kp.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function vs(r,e,t,n){for(var i=0,o=0,a=(1<=t;)o-=t,s.push(i>>o&a);if(n)o>0&&s.push(i<=e)return"Excess padding";if(i<this.data(b,!0);return e.transaction={hash:a,type:l,accessList:ye.allowNull(this.accessList.bind(this),null),blockHash:ye.allowNull(a,null),blockNumber:ye.allowNull(u,null),transactionIndex:ye.allowNull(u,null),confirmations:ye.allowNull(u,null),from:t,gasPrice:ye.allowNull(n),maxPriorityFeePerGas:ye.allowNull(n),maxFeePerGas:ye.allowNull(n),gasLimit:n,to:ye.allowNull(t,null),value:n,nonce:u,data:o,r:ye.allowNull(this.uint256),s:ye.allowNull(this.uint256),v:ye.allowNull(u),creates:ye.allowNull(t,null),raw:ye.allowNull(o)},e.transactionRequest={from:ye.allowNull(t),nonce:ye.allowNull(u),gasLimit:ye.allowNull(n),gasPrice:ye.allowNull(n),maxPriorityFeePerGas:ye.allowNull(n),maxFeePerGas:ye.allowNull(n),to:ye.allowNull(t),value:ye.allowNull(n),data:ye.allowNull(h),type:ye.allowNull(u),accessList:ye.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:a,address:t,topics:ye.arrayOf(a),data:o,logIndex:u,blockHash:a},e.receipt={to:ye.allowNull(this.address,null),from:ye.allowNull(this.address,null),contractAddress:ye.allowNull(t,null),transactionIndex:u,root:ye.allowNull(s),gasUsed:n,logsBloom:ye.allowNull(o),blockHash:a,transactionHash:a,logs:ye.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:ye.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:ye.allowNull(n),status:ye.allowNull(u),type:l},e.block={hash:ye.allowNull(a),parentHash:a,number:u,timestamp:u,nonce:ye.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ye.allowNull(t),extraData:o,transactions:ye.allowNull(ye.arrayOf(a)),baseFeePerGas:ye.allowNull(n)},e.blockWithTransactions=vr(e.block),e.blockWithTransactions.transactions=ye.allowNull(ye.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ye.allowNull(i,void 0),toBlock:ye.allowNull(i,void 0),blockHash:ye.allowNull(a,void 0),address:ye.allowNull(t,void 0),topics:ye.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ye.allowNull(u),blockHash:ye.allowNull(a),transactionIndex:u,removed:ye.allowNull(this.boolean.bind(this)),address:t,data:ye.allowFalsish(o,"0x"),topics:ye.arrayOf(a),transactionHash:a,logIndex:u},e}accessList(e){return U0(e||[])}number(e){return e==="0x"?0:fe.from(e).toNumber()}type(e){return e==="0x"||e==null?0:fe.from(e).toNumber()}bigNumber(e){return fe.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),lt(e))?e.toLowerCase():V0.throwArgumentError("invalid hash","value",e)}data(e,t){const n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return _t(e)}callAddress(e){if(!lt(e,32))return null;const t=_t(Ot(e,12));return t===Db?null:t}contractAddress(e){return e1(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||lt(e))return is(e);throw new Error("invalid blockTag")}hash(e,t){const n=this.hex(e,t);return Fn(n)!==32?V0.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const t=fe.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!lt(e))throw new Error("invalid uint256");return yt(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=ye.check(t,e);return i._difficulty=n==null?null:fe.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ye.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&fe.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const t=ye.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;lt(n)&&(n=fe.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),lt(n)&&(n=fe.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return tp(e)}receiptLog(e){return ye.check(this.formats.receiptLog,e)}receipt(e){const t=ye.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){const n=fe.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&V0.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):V0.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&V0.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return ye.check(this.formats.filter,e)}filterLog(e){return ye.check(this.formats.filterLog,e)}static check(e,t){const n={};for(const i in e)try{const o=e[i](t[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=t[i],o}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const n=[];return t.forEach(function(i){n.push(e(i))}),n}}}var Ye=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const et=new q(ws),L8=10;function oh(r){return r==null?"null":(Fn(r)!==32&&et.throwArgumentError("invalid topic","topic",r),r.toLowerCase())}function ah(r){for(r=r.slice();r.length>0&&r[r.length-1]==null;)r.pop();return r.map(e=>{if(Array.isArray(e)){const t={};e.forEach(i=>{t[oh(i)]=!0});const n=Object.keys(t);return n.sort(),n.join("|")}else return oh(e)}).join("&")}function U8(r){return r===""?[]:r.split(/&/g).map(e=>{if(e==="")return[];const t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function i0(r){if(typeof r=="string"){if(r=r.toLowerCase(),Fn(r)===32)return"tx:"+r;if(r.indexOf(":")===-1)return r}else{if(Array.isArray(r))return"filter:*:"+ah(r);if(X5.isForkEvent(r))throw et.warn("not implemented"),new Error("not implemented");if(r&&typeof r=="object")return"filter:"+(r.address||"*")+":"+ah(r.topics||[])}throw new Error("invalid event - "+r)}function K0(){return new Date().getTime()}function sh(r){return new Promise(e=>{setTimeout(e,r)})}const J8=["block","network","pending","poll"];class H8{constructor(e,t,n){le(this,"tag",e),le(this,"listener",t),le(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const t=e[1],n=U8(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||J8.indexOf(this.tag)>=0}}const G8={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Zs(r){return yt(fe.from(r).toHexString(),32)}function fh(r){return A0.encode(Et([r,Ot(Wn(Wn(r)),0,4)]))}const Qp=new RegExp("^(ipfs)://(.*)$","i"),ch=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Qp,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Aa(r,e){try{return mi(ko(r,e))}catch{}return null}function ko(r,e){if(r==="0x")return null;const t=fe.from(Ot(r,e,e+32)).toNumber(),n=fe.from(Ot(r,t,t+32)).toNumber();return Ot(r,t+32,t+32+n)}function $s(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):et.throwArgumentError("unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}function lh(r){const e=ae(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function z8(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}function Wp(r){const e=[];let t=0;for(let n=0;nfe.from(e).eq(1)).catch(e=>{if(e.code===q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return Ye(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:gr([e,ao(this.name),t||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=gr(["0x9061b923",Wp([m1(this.name),n.data])]));try{let o=yield this.provider.call(n);return ae(o).length%32===4&&et.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=ko(o,0)),o}catch(o){if(o.code===q.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,t){return Ye(this,void 0,void 0,function*(){const n=yield this._fetch(e,t);return n!=null?ko(n,0):null})}_getAddress(e,t){const n=G8[String(e)];if(n==null&&et.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);const i=ae(t);if(n.p2pkh!=null){const o=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const a=parseInt(o[1],16);if(o[2].length===a*2&&a>=1&&a<=75)return fh(Et([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const a=parseInt(o[1],16);if(o[2].length===a*2&&a>=1&&a<=75)return fh(Et([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let a=i[0];if(a===0?o!==20&&o!==32&&(a=-1):a=-1,a>=0&&i.length===2+o&&o>=1&&o<=75){const s=ih.toWords(i.slice(2));return s.unshift(a),ih.encode(n.prefix,s)}}return null}getAddress(e){return Ye(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===o1?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===q.errors.CALL_EXCEPTION)return null;throw i}const t=yield this._fetchBytes("0xf1cb7e06",Zs(e));if(t==null||t==="0x")return null;const n=this._getAddress(e,t);return n==null&&et.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return Ye(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(t==null)return null;for(let n=0;na[u]);return"sia://"+s}return et.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Ye(this,void 0,void 0,function*(){let t=Jt(e);t=Et([Zs(64),Zs(t.length),t]),t.length%32!==0&&(t=Et([t,yt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",se(t));return n==null||n==="0x"?null:mi(n)})}}let ef=null,j8=1;class X8 extends xs{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),le(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{const t=An(new.target,"getNetwork")(e);t?(le(this,"_network",t),this.emit("network",t,null)):et.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Ye(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||et.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:le(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return u0(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ef==null&&(ef=new ye),ef}static getNetwork(e){return P8(e==null?"homestead":e)}ccipReadFetch(e,t,n){return Ye(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=t.toLowerCase(),a=[];for(let s=0;s=0?null:JSON.stringify({data:o,sender:i}),b=yield gs({url:l,errorPassThrough:!0},h,(A,_)=>(A.status=_.statusCode,A));if(b.data)return b.data;const m=b.message||"unknown error";if(b.status>=400&&b.status<500)return et.throwError(`response not found during CCIP fetch: ${m}`,q.errors.SERVER_ERROR,{url:u,errorMessage:m});a.push(m)}return et.throwError(`error encountered during CCIP fetch: ${a.map(s=>JSON.stringify(s)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:a})})}_getInternalBlockNumber(e){return Ye(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(K0()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const t=K0(),n=Ht({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const a=K0();return i=fe.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Ye(this,void 0,void 0,function*(){const e=j8++,t=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)et.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",et.makeError("network block skew detected",q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let a=this.getTransactionReceipt(o).then(s=>(!s||s.blockNumber==null||(this._emitted["t:"+o]=s.blockNumber,this.emit(o,s)),null)).catch(s=>{this.emit("error",s)});t.push(a);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const a=o.toBlock-this._maxFilterBlockRange;a>o.fromBlock&&(o.fromBlock=a),o.fromBlock<0&&(o.fromBlock=0);const s=this.getLogs(o).then(u=>{i._inflight=!1,u.length!==0&&u.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(o,l)})}).catch(u=>{this.emit("error",u),i._inflight=!1});t.push(s)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Ye(this,void 0,void 0,function*(){return et.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Ye(this,void 0,void 0,function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield sh(0),this._network;const n=et.makeError("underlying network changed",q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=K0();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return Ye(this,void 0,void 0,function*(){return this._waitForTransaction(e,t==null?1:t,n||0,null)})}_waitForTransaction(e,t,n,i){return Ye(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise((a,s)=>{const u=[];let l=!1;const h=function(){return l?!0:(l=!0,u.forEach(m=>{m()}),!1)},b=m=>{m.confirmations{this.removeListener(e,b)}),i){let m=i.startBlock,A=null;const _=S=>Ye(this,void 0,void 0,function*(){l||(yield sh(1e3),this.getTransactionCount(i.from).then(C=>Ye(this,void 0,void 0,function*(){if(!l){if(C<=i.nonce)m=S;else{{const M=yield this.getTransaction(e);if(M&&M.blockNumber!=null)return}for(A==null&&(A=m-3,A{l||this.once("block",_)}))});if(l)return;this.once("block",_),u.push(()=>{this.removeListener("block",_)})}if(typeof n=="number"&&n>0){const m=setTimeout(()=>{h()||s(et.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);m.unref&&m.unref(),u.push(()=>{clearTimeout(m)})}})})}getBlockNumber(){return Ye(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return fe.from(e)}catch(t){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return fe.from(i)}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return fe.from(i).toNumber()}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return se(i)}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,t,n){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(a=>is(a))}),o=yield this.perform("getStorageAt",i);try{return se(o)}catch(a){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:a})}})}_wrapTransaction(e,t,n){if(t!=null&&Fn(t)!==32)throw new Error("invalid response - sendTransaction");const i=e;return t!=null&&e.hash!==t&&et.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(o,a)=>Ye(this,void 0,void 0,function*(){o==null&&(o=1),a==null&&(a=0);let s;o!==0&&n!=null&&(s={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const u=yield this._waitForTransaction(e.hash,o,a,s);return u==null&&o===0?null:(this._emitted["t:"+e.hash]=u.blockNumber,u.status===0&&et.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),u)}),i}sendTransaction(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then(o=>se(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return Ye(this,void 0,void 0,function*(){const t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?fe.from(o):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o!=null?o:null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?se(o):null))}),this.formatter.transactionRequest(yield Ht(n))})}_getFilter(e){return Ye(this,void 0,void 0,function*(){e=yield e;const t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ht(t))})}_call(e,t,n){return Ye(this,void 0,void 0,function*(){n>=L8&&et.throwError("CCIP read exceeded maximum redirections",q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&Fn(o)%32===4)try{const a=Ot(o,4),s=Ot(a,0,32);fe.from(s).eq(i)||et.throwError("CCIP Read sender did not match",q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const u=[],l=fe.from(Ot(a,32,64)).toNumber(),h=fe.from(Ot(a,l,l+32)).toNumber(),b=Ot(a,l+32);for(let M=0;MYe(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let a=null;for(let u=0;uthis._wrapTransaction(u)),s}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return u0(()=>Ye(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;a<=0&&(a=1),i.confirmations=a}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return u0(()=>Ye(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;a<=0&&(a=1),i.confirmations=a}return i}),{oncePoll:this})})}getLogs(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Ht({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ye.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Ye(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Ye(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&et.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return Ye(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;const n=yield this._getResolver(t,"getResolver");if(n!=null){const i=new uh(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return Ye(this,void 0,void 0,function*(){t==null&&(t="ENS");const n=yield this.getNetwork();n.ensAddress||et.throwError("network does not support ENS",q.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ao(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Ye(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(lt(e))throw n}typeof e!="string"&&et.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return Ye(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;const i=Aa(yield this.call({to:n,data:"0x691f3431"+ao(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Ye(this,void 0,void 0,function*(){let t=null;if(lt(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(o,"getAvatar");if(!a)return null;t=new uh(this,a,o);try{const s=yield t.getAvatar();if(s)return s.url}catch(s){if(s.code!==q.errors.CALL_EXCEPTION)throw s}try{const s=Aa(yield this.call({to:a,data:"0x691f3431"+ao(o).substring(2)}),0);t=yield this.getResolver(s)}catch(s){if(s.code!==q.errors.CALL_EXCEPTION)throw s;return null}}else if(t=yield this.getResolver(e),!t)return null;const n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return et.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){const i=new H8(i0(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],o=i0(e);return this._events=this._events.filter(a=>a.tag!==o?!0:(setTimeout(()=>{a.listener.apply(this,t)},0),n=!0,a.once?(i.push(a),!1):!0)),i.forEach(a=>{this._stopEvent(a)}),n}listenerCount(e){if(!e)return this._events.length;let t=i0(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=i0(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);const n=[];let i=!1,o=i0(e);return this._events=this._events.filter(a=>a.tag!==o||a.listener!=t||i?!0:(i=!0,n.push(a),!1)),n.forEach(a=>{this._stopEvent(a)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{const n=i0(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}}var Gn=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Lt=new q(ws),q8=["call","estimateGas"];function lo(r,e){if(r==null)return null;if(typeof r.message=="string"&&r.message.match("reverted")){const t=lt(r.data)?r.data:null;if(!e||t)return{message:r.message,data:t}}if(typeof r=="object"){for(const t in r){const n=lo(r[t],e);if(n)return n}return null}if(typeof r=="string")try{return lo(JSON.parse(r),e)}catch{}return null}function Yp(r,e,t){const n=t.transaction||t.signedTransaction;if(r==="call"){const o=lo(e,!0);if(o)return o.data;Lt.throwError("missing revert data in call exception; Transaction reverted without a reason string",q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(r==="estimateGas"){let o=lo(e.body,!1);o==null&&(o=lo(e,!1)),o&&Lt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:r,transaction:n,error:e})}let i=e.message;throw e.code===q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit/i)&&Lt.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:r,transaction:n}),i.match(/nonce (is )?too low/i)&&Lt.throwError("nonce has already been used",q.errors.NONCE_EXPIRED,{error:e,method:r,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Lt.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:r,transaction:n}),i.match(/only replay-protected/i)&&Lt.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:r,transaction:n}),q8.indexOf(r)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&Lt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:r,transaction:n}),e}function hh(r){return new Promise(function(e){setTimeout(e,r)})}function V8(r){if(r.error){const e=new Error(r.error.message);throw e.code=r.error.code,e.data=r.error.data,e}return r.result}function Q0(r){return r&&r.toLowerCase()}const wc={};class Zp extends bs{constructor(e,t,n){if(super(),e!==wc)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");le(this,"provider",t),n==null&&(n=0),typeof n=="string"?(le(this,"_address",this.provider.formatter.address(n)),le(this,"_index",null)):typeof n=="number"?(le(this,"_index",n),le(this,"_address",null)):Lt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Lt.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new K8(wc,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Lt.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=vr(e);const t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=vr(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Gn(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Lt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ht({tx:Ht(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Lt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(a=>a,a=>(typeof a.message=="string"&&a.message.match(/user denied/i)&&Lt.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Yp("sendTransaction",a,o)))})}signTransaction(e){return Lt.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Gn(this,void 0,void 0,function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield u0(()=>Gn(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Gn(this,void 0,void 0,function*(){const t=typeof e=="string"?Jt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[se(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,message:t}),i}})}_legacySignMessage(e){return Gn(this,void 0,void 0,function*(){const t=typeof e=="string"?Jt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),se(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,message:t}),i}})}_signTypedData(e,t,n){return Gn(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,t,n,a=>this.provider.resolveName(a)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(sr.getPayload(i.domain,t,i.value))])}catch(a){throw typeof a.message=="string"&&a.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,message:{domain:i.domain,types:t,value:i.value}}),a}})}unlock(e){return Gn(this,void 0,void 0,function*(){const t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class K8 extends Zp{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}}const Q8={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class W8 extends X8{constructor(e,t){let n=t;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(a=>{i(a)},a=>{o(a)})},0)})),super(n),e||(e=An(this.constructor,"defaultUrl")()),typeof e=="string"?le(this,"connection",Object.freeze({url:e})):le(this,"connection",Object.freeze(vr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Gn(this,void 0,void 0,function*(){yield hh(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const t=An(this.constructor,"getNetwork");try{return t(fe.from(e).toNumber())}catch(n){return Lt.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Lt.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Zp(wc,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:w0(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=gs(this.connection,JSON.stringify(n),V8).then(a=>(this.emit("debug",{action:"response",request:n,response:a,provider:this}),a),a=>{throw this.emit("debug",{action:"response",error:a,request:n,provider:this}),a});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Q0(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Q0(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Q0(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Q0(t.address),yt(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{const n=An(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{const n=An(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=Q0(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Gn(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=t.transaction;if(i&&i.type!=null&&fe.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(t=vr(t),t.transaction=vr(i),delete t.transaction.type)}}const n=this.prepareRequest(e,t);n==null&&Lt.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Yp(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=t)return null;let a=Promise.resolve();return o.forEach(function(s){e._emitted["t:"+s.toLowerCase()]="pending",a=a.then(function(){return e.getTransaction(s).then(function(u){return e.emit("pending",u),null})})}),a.then(function(){return hh(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const n=vr(Q8);if(t)for(const o in t)t[o]&&(n[o]=!0);rl(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const a=is(fe.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=a}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=se(e[o]))}),e.accessList&&(i.accessList=U0(e.accessList)),i}}var Y8=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Z8=new q(ws);class $8 extends W8{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Y8(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||Z8.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(le(this,"_network",t),this.emit("network",t,null))),t})}}const ey="ethers/5.7.0";new q(ey);const $p={TreasureHuntCreator:"0x22D5c0F55393F8D12e53721A30181C6ed7Ff2BD1"},dh="https://faucet.dist0rtion.com:3000/",ty="https://eth-sepolia.g.alchemy.com/v2/KuSTsjL_6qzGTklJR1pWmr4OTgCEIQcR";class ry{constructor(e=window.localStorage){Rs(this,"storage");this.storage=e}get(e,t){const n=this.storage.getItem(e);return n===null?t===void 0?null:t:JSON.parse(n)}set(e,t,n){let i;if(t instanceof Function){const o=this.get(e,n);i=t(o)}else i=t;return this.storage.setItem(e,JSON.stringify(i)),i}has(e){return this.get(e)!==null}getsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}clear(){this.storage.clear()}}const Li=new ry;function Ml(r,e){const t=Wi(Li.getsert(r,e));return t.subscribe(n=>{Li.set(r,n)}),t}class Go extends Error{constructor(t,n){super(t);Rs(this,"parentError");Object.setPrototypeOf(this,Go.prototype),this.parentError=n}}class ny extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Go.prototype)}}function iy(r){return new Promise(e=>{setTimeout(e,r)})}function zo(r,e=!1){return async()=>{for(let t=0;t<3;t++)try{return await r()}catch(n){if(e||n instanceof Go)console.error("Retry",t+1,n),await iy(1e3);else throw console.log("Unknown error"),n}throw console.error("Panic",r),new ny("Panic")}}function As(r,e=!1){return zo(r,e)()}var kl={},jo={},Es={};Object.defineProperty(Es,"__esModule",{value:!0});Es.version=void 0;Es.version="wordlists/5.7.0";(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.logger=void 0;var e=S1,t=mp,n=bp,i=Es;r.logger=new n.Logger(i.version);var o=function(){function a(s){var u=this.constructor;r.logger.checkAbstract(u,a),(0,t.defineReadOnly)(this,"locale",s)}return a.prototype.split=function(s){return s.toLowerCase().split(/ +/g)},a.prototype.join=function(s){return s.join(" ")},a.check=function(s){for(var u=[],l=0;l<2048;l++){var h=s.getWord(l);if(l!==s.getWordIndex(h))return"0x";u.push(h)}return(0,e.id)(u.join(` + */(function(r){(function(){var e="input is invalid type",t="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?i=Be:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],m=[1,256,65536,16777216],A=[6,1536,393216,100663296],_=[0,8,16,24],S=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],C=[224,256,384,512],M=[128,256],B=["hex","buffer","arrayBuffer","array","digest"],P={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(d){return Object.prototype.toString.call(d)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(d){return typeof d=="object"&&d.buffer&&d.buffer.constructor===ArrayBuffer});for(var R=function(d,N,G){return function(U){return new c(d,N,d).update(U)[G]()}},I=function(d,N,G){return function(U,z){return new c(d,N,z).update(U)[G]()}},D=function(d,N,G){return function(U,z,te,K){return f["cshake"+d].update(U,z,te,K)[G]()}},O=function(d,N,G){return function(U,z,te,K){return f["kmac"+d].update(U,z,te,K)[G]()}},J=function(d,N,G,U){for(var z=0;z>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}c.prototype.update=function(d){if(this.finalized)throw new Error(t);var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}for(var U=this.blocks,z=this.byteCount,te=d.length,K=this.blockCount,V=0,me=this.s,Q,oe;V>2]|=d[V]<<_[Q++&3];else for(Q=this.start;V>2]|=oe<<_[Q++&3]:oe<2048?(U[Q>>2]|=(192|oe>>6)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):oe<55296||oe>=57344?(U[Q>>2]|=(224|oe>>12)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]):(oe=65536+((oe&1023)<<10|d.charCodeAt(++V)&1023),U[Q>>2]|=(240|oe>>18)<<_[Q++&3],U[Q>>2]|=(128|oe>>12&63)<<_[Q++&3],U[Q>>2]|=(128|oe>>6&63)<<_[Q++&3],U[Q>>2]|=(128|oe&63)<<_[Q++&3]);if(this.lastByteIndex=Q,Q>=z){for(this.start=Q-z,this.block=U[K],Q=0;Q>8,G=d&255;G>0;)z.unshift(G),d=d>>8,G=d&255,++U;return N?z.push(U):z.unshift(U),this.update(z),z.length},c.prototype.encodeString=function(d){var N,G=typeof d;if(G!=="string"){if(G==="object"){if(d===null)throw new Error(e);if(u&&d.constructor===ArrayBuffer)d=new Uint8Array(d);else if(!Array.isArray(d)&&(!u||!ArrayBuffer.isView(d)))throw new Error(e)}else throw new Error(e);N=!0}var U=0,z=d.length;if(N)U=z;else for(var te=0;te=57344?U+=3:(K=65536+((K&1023)<<10|d.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(d),U},c.prototype.bytepad=function(d,N){for(var G=this.encode(N),U=0;U>2]|=this.padding[N&3],this.lastByteIndex===this.byteCount)for(d[0]=d[G],N=1;N>4&15]+l[V&15]+l[V>>12&15]+l[V>>8&15]+l[V>>20&15]+l[V>>16&15]+l[V>>28&15]+l[V>>24&15];te%d===0&&(T(N),z=0)}return U&&(V=N[z],K+=l[V>>4&15]+l[V&15],U>1&&(K+=l[V>>12&15]+l[V>>8&15]),U>2&&(K+=l[V>>20&15]+l[V>>16&15])),K},c.prototype.arrayBuffer=function(){this.finalize();var d=this.blockCount,N=this.s,G=this.outputBlocks,U=this.extraBytes,z=0,te=0,K=this.outputBits>>3,V;U?V=new ArrayBuffer(G+1<<2):V=new ArrayBuffer(K);for(var me=new Uint32Array(V);te>8&255,K[V+2]=me>>16&255,K[V+3]=me>>24&255;te%d===0&&T(N)}return U&&(V=te<<2,me=N[z],K[V]=me&255,U>1&&(K[V+1]=me>>8&255),U>2&&(K[V+2]=me>>16&255)),K};function y(d,N,G){c.call(this,d,N,G)}y.prototype=new c,y.prototype.finalize=function(){return this.encode(this.outputBits,!0),c.prototype.finalize.call(this)};var T=function(d){var N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae,xe,ft,de,Ce,St,pe,Ee,wt,W,ie,Ft,Se,Fe,zt,Me,Te,Zt,ke,Ie,jt,De,Pe,$t,Oe,Le,Xt,Ue,Je,qt,He,Re,pt,_e,Ne,er,ze,je,xr,Xe,qe,br,Ve,Ke,tr,rr,nr,ir,or;for(U=0;U<48;U+=2)z=d[0]^d[10]^d[20]^d[30]^d[40],te=d[1]^d[11]^d[21]^d[31]^d[41],K=d[2]^d[12]^d[22]^d[32]^d[42],V=d[3]^d[13]^d[23]^d[33]^d[43],me=d[4]^d[14]^d[24]^d[34]^d[44],Q=d[5]^d[15]^d[25]^d[35]^d[45],oe=d[6]^d[16]^d[26]^d[36]^d[46],xt=d[7]^d[17]^d[27]^d[37]^d[47],we=d[8]^d[18]^d[28]^d[38]^d[48],ge=d[9]^d[19]^d[29]^d[39]^d[49],N=we^(K<<1|V>>>31),G=ge^(V<<1|K>>>31),d[0]^=N,d[1]^=G,d[10]^=N,d[11]^=G,d[20]^=N,d[21]^=G,d[30]^=N,d[31]^=G,d[40]^=N,d[41]^=G,N=z^(me<<1|Q>>>31),G=te^(Q<<1|me>>>31),d[2]^=N,d[3]^=G,d[12]^=N,d[13]^=G,d[22]^=N,d[23]^=G,d[32]^=N,d[33]^=G,d[42]^=N,d[43]^=G,N=K^(oe<<1|xt>>>31),G=V^(xt<<1|oe>>>31),d[4]^=N,d[5]^=G,d[14]^=N,d[15]^=G,d[24]^=N,d[25]^=G,d[34]^=N,d[35]^=G,d[44]^=N,d[45]^=G,N=me^(we<<1|ge>>>31),G=Q^(ge<<1|we>>>31),d[6]^=N,d[7]^=G,d[16]^=N,d[17]^=G,d[26]^=N,d[27]^=G,d[36]^=N,d[37]^=G,d[46]^=N,d[47]^=G,N=oe^(z<<1|te>>>31),G=xt^(te<<1|z>>>31),d[8]^=N,d[9]^=G,d[18]^=N,d[19]^=G,d[28]^=N,d[29]^=G,d[38]^=N,d[39]^=G,d[48]^=N,d[49]^=G,Ct=d[0],Ae=d[1],Re=d[11]<<4|d[10]>>>28,pt=d[10]<<4|d[11]>>>28,Fe=d[20]<<3|d[21]>>>29,zt=d[21]<<3|d[20]>>>29,rr=d[31]<<9|d[30]>>>23,nr=d[30]<<9|d[31]>>>23,Ue=d[40]<<18|d[41]>>>14,Je=d[41]<<18|d[40]>>>14,Ie=d[2]<<1|d[3]>>>31,jt=d[3]<<1|d[2]>>>31,xe=d[13]<<12|d[12]>>>20,ft=d[12]<<12|d[13]>>>20,_e=d[22]<<10|d[23]>>>22,Ne=d[23]<<10|d[22]>>>22,Me=d[33]<<13|d[32]>>>19,Te=d[32]<<13|d[33]>>>19,ir=d[42]<<2|d[43]>>>30,or=d[43]<<2|d[42]>>>30,Xe=d[5]<<30|d[4]>>>2,qe=d[4]<<30|d[5]>>>2,De=d[14]<<6|d[15]>>>26,Pe=d[15]<<6|d[14]>>>26,de=d[25]<<11|d[24]>>>21,Ce=d[24]<<11|d[25]>>>21,er=d[34]<<15|d[35]>>>17,ze=d[35]<<15|d[34]>>>17,Zt=d[45]<<29|d[44]>>>3,ke=d[44]<<29|d[45]>>>3,W=d[6]<<28|d[7]>>>4,ie=d[7]<<28|d[6]>>>4,br=d[17]<<23|d[16]>>>9,Ve=d[16]<<23|d[17]>>>9,$t=d[26]<<25|d[27]>>>7,Oe=d[27]<<25|d[26]>>>7,St=d[36]<<21|d[37]>>>11,pe=d[37]<<21|d[36]>>>11,je=d[47]<<24|d[46]>>>8,xr=d[46]<<24|d[47]>>>8,qt=d[8]<<27|d[9]>>>5,He=d[9]<<27|d[8]>>>5,Ft=d[18]<<20|d[19]>>>12,Se=d[19]<<20|d[18]>>>12,Ke=d[29]<<7|d[28]>>>25,tr=d[28]<<7|d[29]>>>25,Le=d[38]<<8|d[39]>>>24,Xt=d[39]<<8|d[38]>>>24,Ee=d[48]<<14|d[49]>>>18,wt=d[49]<<14|d[48]>>>18,d[0]=Ct^~xe&de,d[1]=Ae^~ft&Ce,d[10]=W^~Ft&Fe,d[11]=ie^~Se&zt,d[20]=Ie^~De&$t,d[21]=jt^~Pe&Oe,d[30]=qt^~Re&_e,d[31]=He^~pt&Ne,d[40]=Xe^~br&Ke,d[41]=qe^~Ve&tr,d[2]=xe^~de&St,d[3]=ft^~Ce&pe,d[12]=Ft^~Fe&Me,d[13]=Se^~zt&Te,d[22]=De^~$t&Le,d[23]=Pe^~Oe&Xt,d[32]=Re^~_e&er,d[33]=pt^~Ne&ze,d[42]=br^~Ke&rr,d[43]=Ve^~tr&nr,d[4]=de^~St&Ee,d[5]=Ce^~pe&wt,d[14]=Fe^~Me&Zt,d[15]=zt^~Te&ke,d[24]=$t^~Le&Ue,d[25]=Oe^~Xt&Je,d[34]=_e^~er&je,d[35]=Ne^~ze&xr,d[44]=Ke^~rr&ir,d[45]=tr^~nr&or,d[6]=St^~Ee&Ct,d[7]=pe^~wt&Ae,d[16]=Me^~Zt&W,d[17]=Te^~ke&ie,d[26]=Le^~Ue&Ie,d[27]=Xt^~Je&jt,d[36]=er^~je&qt,d[37]=ze^~xr&He,d[46]=rr^~ir&Xe,d[47]=nr^~or&qe,d[8]=Ee^~Ct&xe,d[9]=wt^~Ae&ft,d[18]=Zt^~W&Ft,d[19]=ke^~ie&Se,d[28]=Ue^~Ie&De,d[29]=Je^~jt&Pe,d[38]=je^~qt&Re,d[39]=xr^~He&pt,d[48]=ir^~Xe&br,d[49]=or^~qe&Ve,d[0]^=S[U],d[1]^=S[U+1]};if(s)r.exports=f;else for(g=0;g>=8;return e}function Ip(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(o){n=n.concat(Ip(o))}),n.length<=55)return n.unshift(192+n.length),n;const i=qu(n.length);return i.unshift(247+i.length),i.concat(n)}p3(r)||N3.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(Wt(r));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const t=qu(e.length);return t.unshift(183+t.length),t.concat(e)}function F3(r){return Pt(Ip(r))}const T3="address/5.7.0",h0=new ce(T3);function Vu(r){wr(r,20)||h0.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const n=Wt(Mo(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const I3=9007199254740991;function D3(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const _l={};for(let r=0;r<10;r++)_l[String(r)]=String(r);for(let r=0;r<26;r++)_l[String.fromCharCode(65+r)]=String(10+r);const Ku=Math.floor(D3(I3));function O3(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>_l[n]).join("");for(;e.length>=Ku;){let n=e.substring(0,Ku);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function Yn(r){let e=null;if(typeof r!="string"&&h0.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=Vu(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&h0.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==O3(r)&&h0.throwArgumentError("bad icap checksum","address",r),e=y3(r.substring(4));e.length<40;)e="0"+e;e=Vu("0x"+e)}else h0.throwArgumentError("invalid address","address",r);return e}function Dp(r){let e=null;try{e=Yn(r.from)}catch{h0.throwArgumentError("missing from address","transaction",r)}const t=x3(Wt(it.from(r.nonce).toHexString()));return Yn(Bp(Mo(F3([e,t])),12))}class L3 extends ei{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Yn(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}decode(e){return Yn(Mp(e.readValue().toHexString(),20))}}class U3 extends ei{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const d0=new ce(Ho);function Op(r,e,t){let n=null;if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let u={};n=e.map(l=>{const h=l.localName;return h||d0.throwError("cannot encode object for signature with missing names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]&&d0.throwError("cannot encode object for signature with duplicate names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:t}),u[h]=!0,t[h]})}else d0.throwArgumentError("invalid tuple value","tuple",t);e.length!==n.length&&d0.throwArgumentError("types/value length mismatch","tuple",t);let i=new bc(r.wordSize),o=new bc(r.wordSize),a=[];e.forEach((u,l)=>{let h=n[l];if(u.dynamic){let b=o.length;u.encode(o,h);let m=i.writeUpdatableValue();a.push(A=>{m(A+b)})}else u.encode(i,h)}),a.forEach(u=>{u(i.length)});let s=r.appendWriter(i);return s+=r.appendWriter(o),s}function Lp(r,e){let t=[],n=r.subReader(0);e.forEach(o=>{let a=null;if(o.dynamic){let s=r.readValue(),u=n.subReader(s.toNumber());try{a=o.decode(u)}catch(l){if(l.code===ce.errors.BUFFER_OVERRUN)throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(r)}catch(s){if(s.code===ce.errors.BUFFER_OVERRUN)throw s;a=s,a.baseType=o.name,a.name=o.localName,a.type=o.type}a!=null&&t.push(a)});const i=e.reduce((o,a)=>{const s=a.localName;return s&&(o[s]||(o[s]=0),o[s]++),o},{});e.forEach((o,a)=>{let s=o.localName;if(!s||i[s]!==1||(s==="length"&&(s="_length"),t[s]!=null))return;const u=t[a];u instanceof Error?Object.defineProperty(t,s,{enumerable:!0,get:()=>{throw u}}):t[s]=u});for(let o=0;o{throw a}})}return Object.freeze(t)}class J3 extends ei{constructor(e,t,n){const i=e.type+"["+(t>=0?t:"")+"]",o=t===-1||e.dynamic;super("array",i,n,o),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&d0.throwError("insufficient data length",ce.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let i=0;i>6===2;a++)o++;return o}return r===Tr.OVERRUN?t.length-e-1:0}function Z3(r,e,t,n,i){return r===Tr.OVERLONG?(n.push(i),0):(n.push(65533),Hp(r,e,t))}const $3=Object.freeze({error:Y3,ignore:Hp,replace:Z3});function e8(r,e){e==null&&(e=$3.error),r=Wt(r);const t=[];let n=0;for(;n>7===0){t.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?n+=e(Tr.UNEXPECTED_CONTINUE,n-1,r,t):n+=e(Tr.BAD_PREFIX,n-1,r,t);continue}if(n-1+o>=r.length){n+=e(Tr.OVERRUN,n-1,r,t);continue}let s=i&(1<<8-o-1)-1;for(let u=0;u1114111){n+=e(Tr.OUT_OF_RANGE,n-1-o,r,t,s);continue}if(s>=55296&&s<=57343){n+=e(Tr.UTF16_SURROGATE,n-1-o,r,t,s);continue}if(s<=a){n+=e(Tr.OVERLONG,n-1-o,r,t,s);continue}t.push(s)}}return t}function Gp(r,e=ja.current){e!=ja.current&&(Jp.checkNormalize(),r=r.normalize(e));let t=[];for(let n=0;n>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;const o=r.charCodeAt(n);if(n>=r.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((i&1023)<<10)+(o&1023);t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return Wt(t)}function t8(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function r8(r,e){return t8(e8(r,e))}class n8 extends Up{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Gp(t))}decode(e){return r8(super.decode(e))}}class ra extends ei{constructor(e,t){let n=!1;const i=[];e.forEach(a=>{a.dynamic&&(n=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,t,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const t=this.coders.reduce((n,i)=>{const o=i.localName;return o&&(n[o]||(n[o]=0),n[o]++),n},{});return this.coders.forEach((n,i)=>{let o=n.localName;!o||t[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,t){return Op(e,this.coders,t)}decode(e){return e.coerce(this.name,Lp(e,this.coders))}}const na=new ce(Ho),i8=new RegExp(/^bytes([0-9]*)$/),o8=new RegExp(/^(u?int)([0-9]*)$/);class a8{constructor(e){ve(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new L3(e.name);case"bool":return new H3(e.name);case"string":return new n8(e.name);case"bytes":return new G3(e.name);case"array":return new J3(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ra((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new j3(e.name)}let t=e.type.match(o8);if(t){let n=parseInt(t[2]||"256");return(n===0||n>256||n%8!==0)&&na.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Q3(n/8,t[1]==="int",e.name)}if(t=e.type.match(i8),t){let n=parseInt(t[1]);return(n===0||n>32)&&na.throwArgumentError("invalid bytes length","param",e),new z3(n,e.name)}return na.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new za(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new bc(this._getWordSize())}getDefaultValue(e){const t=e.map(i=>this._getCoder(Kt.from(i)));return new ra(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&na.throwError("types/values length mismatch",ce.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const n=e.map(a=>this._getCoder(Kt.from(a))),i=new ra(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}decode(e,t,n){const i=e.map(a=>this._getCoder(Kt.from(a)));return new ra(i,"_").decode(this._getReader(Wt(t),n))}}const s8=new a8;function ia(r){return Mo(Gp(r))}const Mt=new ce(Ho);class f8 extends ms{}class c8 extends ms{}class l8 extends ms{}class gc extends ms{static isIndexed(e){return!!(e&&e._isIndexed)}}const u8={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Qu(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);return t.error=e,t}class mc{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,ve(this,"fragments",t.map(n=>qn.from(n)).filter(n=>n!=null)),ve(this,"_abiCoder",fi(new.target,"getAbiCoder")()),ve(this,"functions",{}),ve(this,"errors",{}),ve(this,"events",{}),ve(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Mt.warn("duplicate definition - constructor");return}ve(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=n.format();if(i[o]){Mt.warn("duplicate definition - "+o);return}i[o]=n}),this.deploy||ve(this,"deploy",yn.from({payable:!1,type:"constructor"})),ve(this,"_isInterface",!0)}format(e){e||(e=ht.full),e===ht.sighash&&Mt.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(n=>n.format(e));return e===ht.json?JSON.stringify(t.map(n=>JSON.parse(n))):t}static getAbiCoder(){return s8}static getAddress(e){return Yn(e)}static getSighash(e){return Bp(ia(e.format()),0,4)}static getEventTopic(e){return ia(e.format())}getFunction(e){if(wr(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Mt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching function","name",n):i.length>1&&Mt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const t=this.functions[vn.fromString(e).format()];return t||Mt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(wr(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Mt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching event","name",n):i.length>1&&Mt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const t=this.events[jn.fromString(e).format()];return t||Mt.throwArgumentError("no matching event","signature",e),t}getError(e){if(wr(e)){const n=fi(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===n(o))return this.errors[i]}Mt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===n);return i.length===0?Mt.throwArgumentError("no matching error","name",n):i.length>1&&Mt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const t=this.errors[vn.fromString(e).format()];return t||Mt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return fi(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),fi(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));const n=Wt(t);return Pt(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Pt(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),Pt(Hi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));const n=Wt(t);return Pt(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Pt(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),Pt(Hi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let n=Wt(t),i=null,o="",a=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=Pt(n.slice(0,4)),h=u8[l];if(h)a=this._abiCoder.decode(h.inputs,n.slice(4)),s=h.name,u=h.signature,h.reason&&(i=a[0]),s==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:s==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const b=this.getError(l);a=this._abiCoder.decode(b.inputs,n.slice(4)),s=b.name,u=b.format()}catch{}break}}return Mt.throwError("call revert exception"+o,ce.errors.CALL_EXCEPTION,{method:e.format(),data:Pt(t),errorArgs:a,errorName:s,errorSignature:u,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),Pt(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Mt.throwError("too many arguments for "+e.format(),ce.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(o,a)=>o.type==="string"?ia(a):o.type==="bytes"?Mo(Pt(a)):(o.type==="bool"&&typeof a=="boolean"&&(a=a?"0x01":"0x00"),o.type.match(/^u?int/)&&(a=it.from(a).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[a]),Mp(Pt(a),32));for(t.forEach((o,a)=>{let s=e.inputs[a];if(!s.indexed){o!=null&&Mt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,o);return}o==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?Mt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,o):Array.isArray(o)?n.push(o.map(u=>i(s,u))):n.push(i(s,o))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Mt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((a,s)=>{const u=t[s];if(a.indexed)if(a.type==="string")n.push(ia(u));else if(a.type==="bytes")n.push(Mo(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([a.type],[u]))}else i.push(a),o.push(u)}),{data:this._abiCoder.encode(i,o),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let m=this.getEventTopic(e);(!wr(n[0],32)||n[0].toLowerCase()!==m)&&Mt.throwError("fragment/topic mismatch",ce.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:m,value:n[0]}),n=n.slice(1)}let i=[],o=[],a=[];e.inputs.forEach((m,A)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(Kt.fromObject({type:"bytes32",name:m.name})),a.push(!0)):(i.push(m),a.push(!1)):(o.push(m),a.push(!1))});let s=n!=null?this._abiCoder.decode(i,Hi(n)):null,u=this._abiCoder.decode(o,t,!0),l=[],h=0,b=0;e.inputs.forEach((m,A)=>{if(m.indexed)if(s==null)l[A]=new gc({_isIndexed:!0,hash:null});else if(a[A])l[A]=new gc({_isIndexed:!0,hash:s[b++]});else try{l[A]=s[b++]}catch(_){l[A]=_}else try{l[A]=u[h++]}catch(_){l[A]=_}if(m.name&&l[m.name]==null){const _=l[A];_ instanceof Error?Object.defineProperty(l,m.name,{enumerable:!0,get:()=>{throw Qu(`property ${JSON.stringify(m.name)}`,_)}}):l[m.name]=_}});for(let m=0;m{throw Qu(`index ${m}`,A)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new c8({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:it.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new f8({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=Pt(e);let n=this.getError(t.substring(0,10).toLowerCase());return n?new l8({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const h8="abstract-provider/5.7.0";var d8=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const p8=new ce(h8);class Cl{constructor(){p8.checkAbstract(new.target,Cl),ve(this,"_isProvider",!0)}getFeeData(){return d8(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield ci({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(a=>null)});let n=null,i=null,o=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,o=it.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}const x8="abstract-signer/5.7.0";var en=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const zr=new ce(x8),b8=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],g8=[ce.errors.INSUFFICIENT_FUNDS,ce.errors.NONCE_EXPIRED,ce.errors.REPLACEMENT_UNDERPRICED];class Go{constructor(){zr.checkAbstract(new.target,Go),ve(this,"_isSigner",!0)}getBalance(e){return en(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return en(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return en(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield ci(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return en(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield ci(this.checkTransaction(e));return yield this.provider.call(n,t)})}sendTransaction(e){return en(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)})}getChainId(){return en(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return en(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return en(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return en(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)b8.indexOf(n)===-1&&zr.throwArgumentError("invalid transaction key: "+n,"transaction",e);const t=Ki(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&zr.throwArgumentError("from address mismatch","transaction",e),n[0])),t}populateTransaction(e){return en(this,void 0,void 0,function*(){const t=yield ci(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>en(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&zr.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const n=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||n)?zr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&n&&zr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&zr.throwError("network does not support EIP-1559",ce.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):zr.throwError("failed to get consistent fee data",ce.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(g8.indexOf(i.code)>=0)throw i;return zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ce.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&zr.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield ci(t)})}_checkProvider(e){this.provider||zr.throwError("missing provider",ce.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Sl extends Go{constructor(e,t){super(),ve(this,"address",e),ve(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{zr.throwError(e,ce.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Sl(this.address,e)}}const m8="transactions/5.7.0",zp=new ce(m8);var Wu;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(Wu||(Wu={}));function Ws(r,e){return{address:Yn(r),storageKeys:(e||[]).map((t,n)=>(b3(t)!==32&&zp.throwArgumentError("invalid access list storageKey",`accessList[${r}:${n}]`,t),t.toLowerCase()))}}function y8(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(t.length>2&&zp.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,t),Ws(t[0],t[1])):Ws(t.address,t.storageKeys));const e=Object.keys(r).map(t=>{const n=r[t].reduce((i,o)=>(i[o]=!0,i),{});return Ws(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}const v8="contracts/5.7.0";var bi=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const bt=new ce(v8),w8={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function Xa(r,e){return bi(this,void 0,void 0,function*(){const t=yield e;typeof t!="string"&&bt.throwArgumentError("invalid address or ENS name","name",t);try{return Yn(t)}catch{}r||bt.throwError("a provider or signer is needed to resolve ENS names",ce.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield r.resolveName(t);return n==null&&bt.throwArgumentError("resolver or addr is not configured for ENS name","name",t),n})}function lo(r,e,t){return bi(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((n,i)=>lo(r,Array.isArray(e)?e[i]:e[n.name],n))):t.type==="address"?yield Xa(r,e):t.type==="tuple"?yield lo(r,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>lo(r,n,t.arrayChildren))):Promise.reject(bt.makeError("invalid value for array",ce.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function ys(r,e,t){return bi(this,void 0,void 0,function*(){let n={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(n=Ki(t.pop())),bt.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),r.signer?n.from?n.from=ci({override:Xa(r.signer,n.from),signer:r.signer.getAddress()}).then(l=>bi(this,void 0,void 0,function*(){return Yn(l.signer)!==l.override&&bt.throwError("Contract with a Signer cannot override from",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=r.signer.getAddress():n.from&&(n.from=Xa(r.provider,n.from));const i=yield ci({args:lo(r.signer||r.provider,t,e.inputs),address:r.resolvedAddress,overrides:ci(n)||{}}),o=r.interface.encodeFunctionData(e,i.args),a={data:o,to:i.address},s=i.overrides;if(s.nonce!=null&&(a.nonce=it.from(s.nonce).toNumber()),s.gasLimit!=null&&(a.gasLimit=it.from(s.gasLimit)),s.gasPrice!=null&&(a.gasPrice=it.from(s.gasPrice)),s.maxFeePerGas!=null&&(a.maxFeePerGas=it.from(s.maxFeePerGas)),s.maxPriorityFeePerGas!=null&&(a.maxPriorityFeePerGas=it.from(s.maxPriorityFeePerGas)),s.from!=null&&(a.from=s.from),s.type!=null&&(a.type=s.type),s.accessList!=null&&(a.accessList=y8(s.accessList)),a.gasLimit==null&&e.gas!=null){let l=21e3;const h=Wt(o);for(let b=0;bn[l]!=null);return u.length&&bt.throwError(`cannot override ${u.map(l=>JSON.stringify(l)).join(",")}`,ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),a})}function A8(r,e){return function(...t){return ys(r,e,t)}}function E8(r,e){const t=r.signer||r.provider;return function(...n){return bi(this,void 0,void 0,function*(){t||bt.throwError("estimate require a provider or signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield ys(r,e,n);return yield t.estimateGas(i)})}}function jp(r,e){const t=e.wait.bind(e);e.wait=n=>t(n).then(i=>(i.events=i.logs.map(o=>{let a=_o(o),s=null;try{s=r.interface.parseLog(o)}catch{}return s&&(a.args=s.args,a.decode=(u,l)=>r.interface.decodeEventLog(s.eventFragment,u,l),a.event=s.name,a.eventSignature=s.signature),a.removeListener=()=>r.provider,a.getBlock=()=>r.provider.getBlock(i.blockHash),a.getTransaction=()=>r.provider.getTransaction(i.transactionHash),a.getTransactionReceipt=()=>Promise.resolve(i),a}),i))}function Xp(r,e,t){const n=r.signer||r.provider;return function(...i){return bi(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const u=Ki(i.pop());u.blockTag!=null&&(o=yield u.blockTag),delete u.blockTag,i.push(u)}r.deployTransaction!=null&&(yield r._deployed(o));const a=yield ys(r,e,i),s=yield n.call(a,o);try{let u=r.interface.decodeFunctionResult(e,s);return t&&e.outputs.length===1&&(u=u[0]),u}catch(u){throw u.code===ce.errors.CALL_EXCEPTION&&(u.address=r.address,u.args=i,u.transaction=a),u}})}}function _8(r,e){return function(...t){return bi(this,void 0,void 0,function*(){r.signer||bt.throwError("sending a transaction requires a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),r.deployTransaction!=null&&(yield r._deployed());const n=yield ys(r,e,t),i=yield r.signer.sendTransaction(n);return jp(r,i),i})}}function Yu(r,e,t){return e.constant?Xp(r,e,t):_8(r,e)}function qp(r){return r.address&&(r.topics==null||r.topics.length===0)?"*":(r.address||"*")+"@"+(r.topics?r.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class ko{constructor(e,t){ve(this,"tag",e),ve(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(n=>t||n.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class C8 extends ko{constructor(){super("error",null)}}class Zu extends ko{constructor(e,t,n,i){const o={address:e};let a=t.getEventTopic(n);i?(a!==i[0]&&bt.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[a],super(qp(o),o),ve(this,"address",e),ve(this,"interface",t),ve(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,n)=>this.interface.decodeEventLog(this.fragment,t,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=k3(e.args);if(t.length)throw t[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class $u extends ko{constructor(e,t){super("*",{address:e}),ve(this,"address",e),ve(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(n,i)=>this.interface.decodeEventLog(t.eventFragment,n,i),e.args=t.args}catch{}}}class S8{constructor(e,t,n){ve(this,"interface",fi(new.target,"getInterface")(t)),n==null?(ve(this,"provider",null),ve(this,"signer",null)):Go.isSigner(n)?(ve(this,"provider",n.provider||null),ve(this,"signer",n)):Cl.isProvider(n)?(ve(this,"provider",n),ve(this,"signer",null)):bt.throwArgumentError("invalid signer or provider","signerOrProvider",n),ve(this,"callStatic",{}),ve(this,"estimateGas",{}),ve(this,"functions",{}),ve(this,"populateTransaction",{}),ve(this,"filters",{});{const a={};Object.keys(this.interface.events).forEach(s=>{const u=this.interface.events[s];ve(this.filters,s,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(u,l)})),a[u.name]||(a[u.name]=[]),a[u.name].push(s)}),Object.keys(a).forEach(s=>{const u=a[s];u.length===1?ve(this.filters,s,this.filters[u[0]]):bt.warn(`Duplicate definition of ${s} (${u.join(", ")})`)})}if(ve(this,"_runningEvents",{}),ve(this,"_wrappedEmits",{}),e==null&&bt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ve(this,"address",e),this.provider)ve(this,"resolvedAddress",Xa(this.provider,e));else try{ve(this,"resolvedAddress",Promise.resolve(Yn(e)))}catch{bt.throwError("provider is required to use ENS name as contract address",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(a=>{});const i={},o={};Object.keys(this.interface.functions).forEach(a=>{const s=this.interface.functions[a];if(o[a]){bt.warn(`Duplicate ABI entry for ${JSON.stringify(a)}`);return}o[a]=!0;{const u=s.name;i[`%${u}`]||(i[`%${u}`]=[]),i[`%${u}`].push(a)}this[a]==null&&ve(this,a,Yu(this,s,!0)),this.functions[a]==null&&ve(this.functions,a,Yu(this,s,!1)),this.callStatic[a]==null&&ve(this.callStatic,a,Xp(this,s,!0)),this.populateTransaction[a]==null&&ve(this.populateTransaction,a,A8(this,s)),this.estimateGas[a]==null&&ve(this.estimateGas,a,E8(this,s))}),Object.keys(i).forEach(a=>{const s=i[a];if(s.length>1)return;a=a.substring(1);const u=s[0];try{this[a]==null&&ve(this,a,this[u])}catch{}this.functions[a]==null&&ve(this.functions,a,this.functions[u]),this.callStatic[a]==null&&ve(this.callStatic,a,this.callStatic[u]),this.populateTransaction[a]==null&&ve(this.populateTransaction,a,this.populateTransaction[u]),this.estimateGas[a]==null&&ve(this.estimateGas,a,this.estimateGas[u])})}static getContractAddress(e){return Dp(e)}static getInterface(e){return mc.isInterface(e)?e:new mc(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&bt.throwError("contract not deployed",ce.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||bt.throwError("sending a transactions require a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=Ki(e||{});return["from","to"].forEach(function(n){t[n]!=null&&bt.throwError("cannot override "+n,ce.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new Sl(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ve(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return gc.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new C8);if(e==="event")return this._normalizeRunningEvent(new ko("event",null));if(e==="*")return this._normalizeRunningEvent(new $u(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Zu(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Zu(this.address,this.interface,i,e.topics))}catch{}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new ko(qp(t),t))}return this._normalizeRunningEvent(new $u(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){const i=_o(t);return i.removeListener=()=>{!n||(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,n){if(this.provider||bt.throwError("events require a provider or a signer with a provider",ce.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let a=this._wrapEvent(e,o,t);if(a.decodeError==null)try{const s=e.getEmit(a);this.emit(e.filter,...s)}catch(s){a.decodeError=s.error}e.filter!=null&&this.emit("event",a),a.decodeError!=null&&this.emit("error",a.decodeError,a)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,n){const i=this._getRunningEvent(e),o=Ki(i.filter);return typeof t=="string"&&wr(t,32)?(n!=null&&bt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=t):(o.fromBlock=t!=null?t:0,o.toBlock=n!=null?n:"latest"),this.provider.getLogs(o).then(a=>a.map(s=>this._wrapEvent(i,s,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(t)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,n)=>t+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const t=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}}class yc extends S8{}class B8{constructor(e,t,n){let i=null;typeof t=="string"?i=t:Jo(t)?i=Pt(t):t&&typeof t.object=="string"?i=t.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!wr(i)||i.length%2)&&bt.throwArgumentError("invalid bytecode","bytecode",t),n&&!Go.isSigner(n)&&bt.throwArgumentError("invalid signer","signer",n),ve(this,"bytecode",i),ve(this,"interface",fi(new.target,"getInterface")(e)),ve(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){t=Ki(e.pop());for(const n in t)if(!w8[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{t[n]!=null&&bt.throwError("cannot override "+n,ce.errors.UNSUPPORTED_OPERATION,{operation:n})}),t.value&&!it.from(t.value).isZero()&&!this.interface.deploy.payable&&bt.throwError("non-payable constructor cannot override value",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),bt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Pt(Hi([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return bi(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),bt.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const n=yield lo(this.signer,e,this.interface.deploy.inputs);n.push(t);const i=this.getDeployTransaction(...n),o=yield this.signer.sendTransaction(i),a=fi(this.constructor,"getContractAddress")(o),s=fi(this.constructor,"getContract")(a,this.interface,this.signer);return jp(s,o),ve(s,"deployTransaction",o),s})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){e==null&&bt.throwError("missing compiler output",ce.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,t)}static getInterface(e){return yc.getInterface(e)}static getContractAddress(e){return Dp(e)}static getContract(e,t,n){return new yc(e,t,n)}}const M8="ethers/5.7.0";new ce(M8);const wa=[{inputs:[{internalType:"address[]",name:"solutions",type:"address[]"},{internalType:"address[]",name:"keys",type:"address[]"},{internalType:"bytes",name:"questsRootCid",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"completedChapter",type:"uint256"},{indexed:!0,internalType:"address",name:"player",type:"address"}],name:"ChapterCompleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"GAME_MASTER_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint96",name:"",type:"uint96"},{internalType:"uint256",name:"",type:"uint256"}],name:"_chapterToPlayers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_gameMasters",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_keyToPos",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_playerToCurrentChapter",outputs:[{internalType:"uint96",name:"",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"_playerToKeys",outputs:[{internalType:"uint80",name:"",type:"uint80"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_players",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_questsRootCid",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"_solutions",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"solution",type:"address"}],name:"addSolution",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currentChapter",outputs:[{internalType:"uint96",name:"",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"a",type:"address"}],name:"getAddressHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"page",type:"uint256"}],name:"getLeaderboard",outputs:[{internalType:"uint256[32]",name:"leaderboard",type:"uint256[32]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getQuestsRootCID",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"questsRootCid",type:"bytes"}],name:"setQuestsRootCID",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"submit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"submitKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalChapters",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalKeys",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],Vp="0x60806040523480156200001157600080fd5b5060405162001cc038038062001cc08339810160408190526200003491620003a0565b6200003f336200014b565b82516200005490600790602086019062000237565b50600a62000063828262000530565b5060005b82518160ff161015620000f3576200008181600162000612565b60046000858460ff16815181106200009d576200009d6200062e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080620000ea9062000644565b91505062000067565b5081516006805460ff191660ff909216919091179055620001166000336200019b565b620001427f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b4336200019b565b50505062000666565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001a782826200020a565b620002065760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b8280548282559060005260206000209081019282156200028f579160200282015b828111156200028f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000258565b506200029d929150620002a1565b5090565b5b808211156200029d5760008155600101620002a2565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002f957620002f9620002b8565b604052919050565b600082601f8301126200031357600080fd5b815160206001600160401b03821115620003315762000331620002b8565b8160051b62000342828201620002ce565b92835284810182019282810190878511156200035d57600080fd5b83870192505b84831015620003955782516001600160a01b0381168114620003855760008081fd5b8252918301919083019062000363565b979650505050505050565b600080600060608486031215620003b657600080fd5b83516001600160401b0380821115620003ce57600080fd5b620003dc8783880162000301565b9450602091508186015181811115620003f457600080fd5b620004028882890162000301565b9450506040860151818111156200041857600080fd5b8601601f810188136200042a57600080fd5b8051828111156200043f576200043f620002b8565b62000453601f8201601f19168501620002ce565b925080835288848284010111156200046a57600080fd5b60005b818110156200048a5782810185015184820186015284016200046d565b506000848285010152505080925050509250925092565b600181811c90821680620004b657607f821691505b602082108103620004d757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200052b57600081815260208120601f850160051c81016020861015620005065750805b601f850160051c820191505b81811015620005275782815560010162000512565b5050505b505050565b81516001600160401b038111156200054c576200054c620002b8565b62000564816200055d8454620004a1565b84620004dd565b602080601f8311600181146200059c5760008415620005835750858301515b600019600386901b1c1916600185901b17855562000527565b600085815260208120601f198616915b82811015620005cd57888601518255948401946001909101908401620005ac565b5085821015620005ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115620002315762000231620005fc565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036200065d576200065d620005fc565b60010192915050565b61164a80620006766000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638006a17411610104578063a6bd257a116100a2578063d3a8291f11610071578063d3a8291f14610467578063d547741f1461048a578063e97b0a261461049d578063f2fde38b146104b057600080fd5b8063a6bd257a14610412578063ad1def1e14610425578063bbfff4611461044c578063c3d8bfed1461045f57600080fd5b806391d14854116100de57806391d14854146103c257806394f7972e146103d5578063a217fddf146103ea578063a34b46fe146103f257600080fd5b80638006a1741461038b578063832e16951461039e5780638da5cb5b146103b157600080fd5b80633ba2981011610171578063488bdabc1161014b578063488bdabc14610333578063626bb7fb14610352578063715018a61461036557806376f0a0e81461036d57600080fd5b80633ba298101461029857806341587823146102d957806345d62ede146102ec57600080fd5b80632d49241c116101ad5780632d49241c146102325780632f2ff15d1461025d57806336568abe146102725780633b81720a1461028557600080fd5b806301ffc9a7146101d45780630db4e5f1146101fc578063248a9ca31461020e575b600080fd5b6101e76101e2366004611111565b6104c3565b60405190151581526020015b60405180910390f35b6007545b6040519081526020016101f3565b61020061021c36600461113b565b6000908152600160208190526040909120015490565b61024561024036600461113b565b6104fa565b6040516001600160a01b0390911681526020016101f3565b61027061026b366004611170565b610524565b005b610270610280366004611170565b61054f565b61024561029336600461113b565b6105d2565b6102c16102a636600461119c565b6003602052600090815260409020546001600160601b031681565b6040516001600160601b0390911681526020016101f3565b6102456102e736600461113b565b6105e2565b6103186102fa36600461119c565b60056020526000908152604090205469ffffffffffffffffffff1681565b60405169ffffffffffffffffffff90911681526020016101f3565b6006546103409060ff1681565b60405160ff90911681526020016101f3565b6102706103603660046111b7565b6105f2565b61027061070a565b336000908152600360205260409020546001600160601b03166102c1565b6102706103993660046111b7565b61071e565b6102706103ac36600461119c565b610930565b6000546001600160a01b0316610245565b6101e76103d0366004611170565b6109ad565b6103dd6109d8565b6040516101f39190611242565b610200600081565b61040561040036600461113b565b610a66565b6040516101f39190611255565b61024561042036600461128b565b610b61565b6102007f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b481565b61020061045a36600461119c565b610b99565b6103dd610bfe565b61034061047536600461119c565b60046020526000908152604090205460ff1681565b610270610498366004611170565b610c90565b6102706104ab3660046112d9565b610cb6565b6102706104be36600461119c565b610cec565b60006001600160e01b03198216637965db0b60e01b14806104f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6007818154811061050a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000828152600160208190526040909120015461054081610d65565b61054a8383610d6f565b505050565b6001600160a01b03811633146105c45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105ce8282610dda565b5050565b6009818154811061050a57600080fd5b6008818154811061050a57600080fd5b600060016105ff33610b99565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561064d573d6000803e3d6000fd5b505060408051601f1901516001600160a01b03811660009081526004602052919091205490925060ff169050806106b25760405162461bcd60e51b815260206004820152600960248201526857726f6e67206b657960b81b60448201526064016105bb565b6106bd6001826113a0565b336000908152600560205260409020805469ffffffffffffffffffff600160ff949094169390931b83169281169290921769ffffffffffffffffffff199092169190911790555050505050565b610712610e41565b61071c6000610e9b565b565b33600090815260036020526040812054600780546001600160601b0390921692918390811061074f5761074f6113b9565b60009182526020822001546001600160a01b0316915061076e33610b99565b60408051600081526020810180835283905260ff89169181019190915260608101879052608081018690529091506001600160a01b0383169060019060a0016020604051602081039080840390855afa1580156107cf573d6000803e3d6000fd5b505050602060405103516001600160a01b0316146108215760405162461bcd60e51b815260206004820152600f60248201526e2bb937b7339039b7b63aba34b7b71760891b60448201526064016105bb565b336000908152600360205260408120546001600160601b0316900361088357600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b031916331790555b33600090815260036020526040812080546001600160601b0316916108a7836113cf565b82546101009290920a6001600160601b038181021990931691831602179091558416600081815260026020908152604080832080546001810182559084529183209091018054336001600160a01b0319909116811790915590519093507f2eba109031d1dc66e58c335884697c94f36785182e2b5dac5f706b8647a5c5829190a3505050505050565b7f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b461095a81610d65565b50600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b0392909216919091179055565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600a80546109e5906113f5565b80601f0160208091040260200160405190810160405280929190818152602001828054610a11906113f5565b8015610a5e5780601f10610a3357610100808354040283529160200191610a5e565b820191906000526020600020905b815481529060010190602001808311610a4157829003601f168201915b505050505081565b610a6e6110f2565b6000610a7b60208461142f565b905060005b602081108015610a9a5750600854610a98838361144e565b105b15610b5a5760006008610aad848461144e565b81548110610abd57610abd6113b9565b6000918252602080832091909101546001600160a01b038116808452600583526040808520546003855294205490945069ffffffffffffffffffff84169360ff90911660089190911b6affffffffffffffffffff001660609290921b6bffffffffffffffffffffffff1916919091171790869085908110610b4057610b406113b9565b602002015250819050610b5281611461565b915050610a80565b5050919050565b60026020528160005260406000208181548110610b7d57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a32300000000060208201526bffffffffffffffffffffffff19606083901b16603c820152600090605001604051602081830303815290604052805190602001209050919050565b6060600a8054610c0d906113f5565b80601f0160208091040260200160405190810160405280929190818152602001828054610c39906113f5565b8015610c865780601f10610c5b57610100808354040283529160200191610c86565b820191906000526020600020905b815481529060010190602001808311610c6957829003601f168201915b5050505050905090565b60008281526001602081905260409091200154610cac81610d65565b61054a8383610dda565b7f1d93c87416ca7b54f0fb8323167b72760e8e2ec93d48660953897a150f97a8b4610ce081610d65565b600a61054a83826114c8565b610cf4610e41565b6001600160a01b038116610d595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105bb565b610d6281610e9b565b50565b610d628133610eeb565b610d7982826109ad565b6105ce5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610de482826109ad565b156105ce5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546001600160a01b0316331461071c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105bb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ef582826109ad565b6105ce57610f0d816001600160a01b03166014610f4f565b610f18836020610f4f565b604051602001610f29929190611588565b60408051601f198184030181529082905262461bcd60e51b82526105bb91600401611242565b60606000610f5e83600261142f565b610f6990600261144e565b67ffffffffffffffff811115610f8157610f816112c3565b6040519080825280601f01601f191660200182016040528015610fab576020820181803683370190505b509050600360fc1b81600081518110610fc657610fc66113b9565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ff557610ff56113b9565b60200101906001600160f81b031916908160001a905350600061101984600261142f565b61102490600161144e565b90505b600181111561109c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611058576110586113b9565b1a60f81b82828151811061106e5761106e6113b9565b60200101906001600160f81b031916908160001a90535060049490941c93611095816115fd565b9050611027565b5083156110eb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bb565b9392505050565b6040518061040001604052806020906020820280368337509192915050565b60006020828403121561112357600080fd5b81356001600160e01b0319811681146110eb57600080fd5b60006020828403121561114d57600080fd5b5035919050565b80356001600160a01b038116811461116b57600080fd5b919050565b6000806040838503121561118357600080fd5b8235915061119360208401611154565b90509250929050565b6000602082840312156111ae57600080fd5b6110eb82611154565b6000806000606084860312156111cc57600080fd5b833560ff811681146111dd57600080fd5b95602085013595506040909401359392505050565b60005b8381101561120d5781810151838201526020016111f5565b50506000910152565b6000815180845261122e8160208601602086016111f2565b601f01601f19169290920160200192915050565b6020815260006110eb6020830184611216565b6104008101818360005b602080821061126e5750611282565b82518452928301929091019060010161125f565b50505092915050565b6000806040838503121561129e57600080fd5b82356001600160601b03811681146112b557600080fd5b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156112eb57600080fd5b813567ffffffffffffffff8082111561130357600080fd5b818401915084601f83011261131757600080fd5b813581811115611329576113296112c3565b604051601f8201601f19908116603f01168101908382118183101715611351576113516112c3565b8160405282815287602084870101111561136a57600080fd5b826020860160208301376000928101602001929092525095945050505050565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156104f4576104f461138a565b634e487b7160e01b600052603260045260246000fd5b60006001600160601b038083168181036113eb576113eb61138a565b6001019392505050565b600181811c9082168061140957607f821691505b60208210810361142957634e487b7160e01b600052602260045260246000fd5b50919050565b60008160001904831182151516156114495761144961138a565b500290565b808201808211156104f4576104f461138a565b6000600182016114735761147361138a565b5060010190565b601f82111561054a57600081815260208120601f850160051c810160208610156114a15750805b601f850160051c820191505b818110156114c0578281556001016114ad565b505050505050565b815167ffffffffffffffff8111156114e2576114e26112c3565b6114f6816114f084546113f5565b8461147a565b602080601f83116001811461152b57600084156115135750858301515b600019600386901b1c1916600185901b1785556114c0565b600085815260208120601f198616915b8281101561155a5788860151825594840194600190910190840161153b565b50858210156115785787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516115c08160178501602088016111f2565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516115f18160288401602088016111f2565b01602801949350505050565b60008161160c5761160c61138a565b50600019019056fea2646970667358221220da0ea57f2b699f15f581b29aac545335652c254f0f04899c8a16f3a6a5e1af4564736f6c63430008100033",k8=r=>r.length>1;class Bl extends B8{constructor(...e){k8(e)?super(...e):super(wa,Vp,e[0])}deploy(e,t,n,i){return super.deploy(e,t,n,i||{})}getDeployTransaction(e,t,n,i){return super.getDeployTransaction(e,t,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new mc(wa)}static connect(e,t){return new yc(e,wa,t)}}Bl.bytecode=Vp;Bl.abi=wa;const P8="networks/5.7.0",eh=new q(P8);function R8(r){return r&&typeof r.renetwork=="function"}function oi(r){const e=function(t,n){n==null&&(n={});const i=[];if(t.InfuraProvider&&n.infura!=="-")try{i.push(new t.InfuraProvider(r,n.infura))}catch{}if(t.EtherscanProvider&&n.etherscan!=="-")try{i.push(new t.EtherscanProvider(r,n.etherscan))}catch{}if(t.AlchemyProvider&&n.alchemy!=="-")try{i.push(new t.AlchemyProvider(r,n.alchemy))}catch{}if(t.PocketProvider&&n.pocket!=="-"){const o=["goerli","ropsten","rinkeby"];try{const a=new t.PocketProvider(r,n.pocket);a.network&&o.indexOf(a.network.name)===-1&&i.push(a)}catch{}}if(t.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new t.CloudflareProvider(r))}catch{}if(t.AnkrProvider&&n.ankr!=="-")try{const o=["ropsten"],a=new t.AnkrProvider(r,n.ankr);a.network&&o.indexOf(a.network.name)===-1&&i.push(a)}catch{}if(i.length===0)return null;if(t.FallbackProvider){let o=1;return n.quorum!=null?o=n.quorum:r==="homestead"&&(o=2),new t.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(t){return oi(t)},e}function qa(r,e){const t=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(r,e):null};return t.renetwork=function(n){return qa(r,n)},t}const th={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:oi("homestead")},rh={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:oi("ropsten")},nh={chainId:63,name:"classicMordor",_defaultProvider:qa("https://www.ethercluster.com/mordor","classicMordor")},oa={unspecified:{chainId:0,name:"unspecified"},homestead:th,mainnet:th,morden:{chainId:2,name:"morden"},ropsten:rh,testnet:rh,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:oi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:oi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:oi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},classic:{chainId:61,name:"classic",_defaultProvider:qa("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:nh,classicTestnet:nh,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qa("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:oi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:oi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function N8(r){if(r==null)return null;if(typeof r=="number"){for(const n in oa){const i=oa[n];if(i.chainId===r)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:r,name:"unknown"}}if(typeof r=="string"){const n=oa[r];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=oa[r.name];if(!e)return typeof r.chainId!="number"&&eh.throwArgumentError("invalid network chainId","network",r),r;r.chainId!==0&&r.chainId!==e.chainId&&eh.throwArgumentError("network chainId mismatch","network",r);let t=r._defaultProvider||null;return t==null&&e._defaultProvider&&(R8(e._defaultProvider)?t=e._defaultProvider.renetwork(r):t=e._defaultProvider),{name:r.name,chainId:e.chainId,ensAddress:r.ensAddress||e.ensAddress||null,_defaultProvider:t}}var Va="qpzry9x8gf2tvdw0s3jn54khce6mua7l",vc={};for(var aa=0;aa>25;return(r&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Kp(r){for(var e=1,t=0;t126)return"Invalid prefix ("+r+")";e=m0(e)^n>>5}for(e=m0(e),t=0;tt)throw new TypeError("Exceeds length limit");r=r.toLowerCase();var n=Kp(r);if(typeof n=="string")throw new Error(n);for(var i=r+"1",o=0;o>5!==0)throw new Error("Non 5-bit word");n=m0(n)^a,i+=Va.charAt(a)}for(o=0;o<6;++o)n=m0(n);for(n^=1,o=0;o<6;++o){var s=n>>(5-o)*5&31;i+=Va.charAt(s)}return i}function Qp(r,e){if(e=e||90,r.length<8)return r+" too short";if(r.length>e)return"Exceeds length limit";var t=r.toLowerCase(),n=r.toUpperCase();if(r!==t&&r!==n)return"Mixed-case string "+r;r=t;var i=r.lastIndexOf("1");if(i===-1)return"No separator character for "+r;if(i===0)return"Missing prefix for "+r;var o=r.slice(0,i),a=r.slice(i+1);if(a.length<6)return"Data too short";var s=Kp(o);if(typeof s=="string")return s;for(var u=[],l=0;l=a.length)&&u.push(b)}return s!==1?"Invalid checksum for "+r:{prefix:o,words:u}}function T8(){var r=Qp.apply(null,arguments);if(typeof r=="object")return r}function I8(r){var e=Qp.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function vs(r,e,t,n){for(var i=0,o=0,a=(1<=t;)o-=t,s.push(i>>o&a);if(n)o>0&&s.push(i<=e)return"Excess padding";if(i<this.data(b,!0);return e.transaction={hash:a,type:l,accessList:ye.allowNull(this.accessList.bind(this),null),blockHash:ye.allowNull(a,null),blockNumber:ye.allowNull(u,null),transactionIndex:ye.allowNull(u,null),confirmations:ye.allowNull(u,null),from:t,gasPrice:ye.allowNull(n),maxPriorityFeePerGas:ye.allowNull(n),maxFeePerGas:ye.allowNull(n),gasLimit:n,to:ye.allowNull(t,null),value:n,nonce:u,data:o,r:ye.allowNull(this.uint256),s:ye.allowNull(this.uint256),v:ye.allowNull(u),creates:ye.allowNull(t,null),raw:ye.allowNull(o)},e.transactionRequest={from:ye.allowNull(t),nonce:ye.allowNull(u),gasLimit:ye.allowNull(n),gasPrice:ye.allowNull(n),maxPriorityFeePerGas:ye.allowNull(n),maxFeePerGas:ye.allowNull(n),to:ye.allowNull(t),value:ye.allowNull(n),data:ye.allowNull(h),type:ye.allowNull(u),accessList:ye.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:a,address:t,topics:ye.arrayOf(a),data:o,logIndex:u,blockHash:a},e.receipt={to:ye.allowNull(this.address,null),from:ye.allowNull(this.address,null),contractAddress:ye.allowNull(t,null),transactionIndex:u,root:ye.allowNull(s),gasUsed:n,logsBloom:ye.allowNull(o),blockHash:a,transactionHash:a,logs:ye.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:ye.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:ye.allowNull(n),status:ye.allowNull(u),type:l},e.block={hash:ye.allowNull(a),parentHash:a,number:u,timestamp:u,nonce:ye.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ye.allowNull(t),extraData:o,transactions:ye.allowNull(ye.arrayOf(a)),baseFeePerGas:ye.allowNull(n)},e.blockWithTransactions=vr(e.block),e.blockWithTransactions.transactions=ye.allowNull(ye.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ye.allowNull(i,void 0),toBlock:ye.allowNull(i,void 0),blockHash:ye.allowNull(a,void 0),address:ye.allowNull(t,void 0),topics:ye.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ye.allowNull(u),blockHash:ye.allowNull(a),transactionIndex:u,removed:ye.allowNull(this.boolean.bind(this)),address:t,data:ye.allowFalsish(o,"0x"),topics:ye.arrayOf(a),transactionHash:a,logIndex:u},e}accessList(e){return U0(e||[])}number(e){return e==="0x"?0:fe.from(e).toNumber()}type(e){return e==="0x"||e==null?0:fe.from(e).toNumber()}bigNumber(e){return fe.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),lt(e))?e.toLowerCase():V0.throwArgumentError("invalid hash","value",e)}data(e,t){const n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return _t(e)}callAddress(e){if(!lt(e,32))return null;const t=_t(Ot(e,12));return t===Lb?null:t}contractAddress(e){return t1(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||lt(e))return is(e);throw new Error("invalid blockTag")}hash(e,t){const n=this.hex(e,t);return Fn(n)!==32?V0.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const t=fe.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!lt(e))throw new Error("invalid uint256");return yt(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=ye.check(t,e);return i._difficulty=n==null?null:fe.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ye.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&fe.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const t=ye.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;lt(n)&&(n=fe.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;n==null&&t.v==null&&(n=e.chainId),lt(n)&&(n=fe.from(n).toNumber()),typeof n!="number"&&t.v!=null&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),t.chainId=n}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return rp(e)}receiptLog(e){return ye.check(this.formats.receiptLog,e)}receipt(e){const t=ye.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){const n=fe.from(t.root).toNumber();n===0||n===1?(t.status!=null&&t.status!==n&&V0.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=n,delete t.root):V0.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&V0.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return ye.check(this.formats.filter,e)}filterLog(e){return ye.check(this.formats.filterLog,e)}static check(e,t){const n={};for(const i in e)try{const o=e[i](t[i]);o!==void 0&&(n[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=t[i],o}return n}static allowNull(e,t){return function(n){return n==null?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const n=[];return t.forEach(function(i){n.push(e(i))}),n}}}var Ye=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const et=new q(ws),J8=10;function oh(r){return r==null?"null":(Fn(r)!==32&&et.throwArgumentError("invalid topic","topic",r),r.toLowerCase())}function ah(r){for(r=r.slice();r.length>0&&r[r.length-1]==null;)r.pop();return r.map(e=>{if(Array.isArray(e)){const t={};e.forEach(i=>{t[oh(i)]=!0});const n=Object.keys(t);return n.sort(),n.join("|")}else return oh(e)}).join("&")}function H8(r){return r===""?[]:r.split(/&/g).map(e=>{if(e==="")return[];const t=e.split("|").map(n=>n==="null"?null:n);return t.length===1?t[0]:t})}function i0(r){if(typeof r=="string"){if(r=r.toLowerCase(),Fn(r)===32)return"tx:"+r;if(r.indexOf(":")===-1)return r}else{if(Array.isArray(r))return"filter:*:"+ah(r);if(V5.isForkEvent(r))throw et.warn("not implemented"),new Error("not implemented");if(r&&typeof r=="object")return"filter:"+(r.address||"*")+":"+ah(r.topics||[])}throw new Error("invalid event - "+r)}function K0(){return new Date().getTime()}function sh(r){return new Promise(e=>{setTimeout(e,r)})}const G8=["block","network","pending","poll"];class z8{constructor(e,t,n){le(this,"tag",e),le(this,"listener",t),le(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const t=e[1],n=H8(e[2]),i={};return n.length>0&&(i.topics=n),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||G8.indexOf(this.tag)>=0}}const j8={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Zs(r){return yt(fe.from(r).toHexString(),32)}function fh(r){return A0.encode(Et([r,Ot(Wn(Wn(r)),0,4)]))}const Wp=new RegExp("^(ipfs)://(.*)$","i"),ch=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Wp,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Aa(r,e){try{return mi(Po(r,e))}catch{}return null}function Po(r,e){if(r==="0x")return null;const t=fe.from(Ot(r,e,e+32)).toNumber(),n=fe.from(Ot(r,t,t+32)).toNumber();return Ot(r,t+32,t+32+n)}function $s(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):et.throwArgumentError("unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}function lh(r){const e=ae(r);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function X8(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}function Yp(r){const e=[];let t=0;for(let n=0;nfe.from(e).eq(1)).catch(e=>{if(e.code===q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return Ye(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:gr([e,so(this.name),t||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=gr(["0x9061b923",Yp([y1(this.name),n.data])]));try{let o=yield this.provider.call(n);return ae(o).length%32===4&&et.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:o}),i&&(o=Po(o,0)),o}catch(o){if(o.code===q.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,t){return Ye(this,void 0,void 0,function*(){const n=yield this._fetch(e,t);return n!=null?Po(n,0):null})}_getAddress(e,t){const n=j8[String(e)];if(n==null&&et.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(t);const i=ae(t);if(n.p2pkh!=null){const o=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const a=parseInt(o[1],16);if(o[2].length===a*2&&a>=1&&a<=75)return fh(Et([[n.p2pkh],"0x"+o[2]]))}}if(n.p2sh!=null){const o=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const a=parseInt(o[1],16);if(o[2].length===a*2&&a>=1&&a<=75)return fh(Et([[n.p2sh],"0x"+o[2]]))}}if(n.prefix!=null){const o=i[1];let a=i[0];if(a===0?o!==20&&o!==32&&(a=-1):a=-1,a>=0&&i.length===2+o&&o>=1&&o<=75){const s=ih.toWords(i.slice(2));return s.unshift(a),ih.encode(n.prefix,s)}}return null}getAddress(e){return Ye(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===a1?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===q.errors.CALL_EXCEPTION)return null;throw i}const t=yield this._fetchBytes("0xf1cb7e06",Zs(e));if(t==null||t==="0x")return null;const n=this._getAddress(e,t);return n==null&&et.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n})}getAvatar(){return Ye(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(t==null)return null;for(let n=0;na[u]);return"sia://"+s}return et.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Ye(this,void 0,void 0,function*(){let t=Jt(e);t=Et([Zs(64),Zs(t.length),t]),t.length%32!==0&&(t=Et([t,yt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",se(t));return n==null||n==="0x"?null:mi(n)})}}let ef=null,q8=1;class V8 extends xs{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),le(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{const t=An(new.target,"getNetwork")(e);t?(le(this,"_network",t),this.emit("network",t,null)):et.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Ye(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||et.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:le(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return u0(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ef==null&&(ef=new ye),ef}static getNetwork(e){return N8(e==null?"homestead":e)}ccipReadFetch(e,t,n){return Ye(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),o=t.toLowerCase(),a=[];for(let s=0;s=0?null:JSON.stringify({data:o,sender:i}),b=yield gs({url:l,errorPassThrough:!0},h,(A,_)=>(A.status=_.statusCode,A));if(b.data)return b.data;const m=b.message||"unknown error";if(b.status>=400&&b.status<500)return et.throwError(`response not found during CCIP fetch: ${m}`,q.errors.SERVER_ERROR,{url:u,errorMessage:m});a.push(m)}return et.throwError(`error encountered during CCIP fetch: ${a.map(s=>JSON.stringify(s)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:a})})}_getInternalBlockNumber(e){return Ye(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(K0()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const t=K0(),n=Ht({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),o;const a=K0();return i=fe.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Ye(this,void 0,void 0,function*(){const e=q8++,t=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)et.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",et.makeError("network block skew detected",q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&n-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let a=this.getTransactionReceipt(o).then(s=>(!s||s.blockNumber==null||(this._emitted["t:"+o]=s.blockNumber,this.emit(o,s)),null)).catch(s=>{this.emit("error",s)});t.push(a);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=n;const a=o.toBlock-this._maxFilterBlockRange;a>o.fromBlock&&(o.fromBlock=a),o.fromBlock<0&&(o.fromBlock=0);const s=this.getLogs(o).then(u=>{i._inflight=!1,u.length!==0&&u.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(o,l)})}).catch(u=>{this.emit("error",u),i._inflight=!1});t.push(s)}break}}}),this._lastBlockNumber=n,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Ye(this,void 0,void 0,function*(){return et.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Ye(this,void 0,void 0,function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield sh(0),this._network;const n=et.makeError("underlying network changed",q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=K0();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return Ye(this,void 0,void 0,function*(){return this._waitForTransaction(e,t==null?1:t,n||0,null)})}_waitForTransaction(e,t,n,i){return Ye(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise((a,s)=>{const u=[];let l=!1;const h=function(){return l?!0:(l=!0,u.forEach(m=>{m()}),!1)},b=m=>{m.confirmations{this.removeListener(e,b)}),i){let m=i.startBlock,A=null;const _=S=>Ye(this,void 0,void 0,function*(){l||(yield sh(1e3),this.getTransactionCount(i.from).then(C=>Ye(this,void 0,void 0,function*(){if(!l){if(C<=i.nonce)m=S;else{{const M=yield this.getTransaction(e);if(M&&M.blockNumber!=null)return}for(A==null&&(A=m-3,A{l||this.once("block",_)}))});if(l)return;this.once("block",_),u.push(()=>{this.removeListener("block",_)})}if(typeof n=="number"&&n>0){const m=setTimeout(()=>{h()||s(et.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);m.unref&&m.unref(),u.push(()=>{clearTimeout(m)})}})})}getBlockNumber(){return Ye(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return fe.from(e)}catch(t){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",n);try{return fe.from(i)}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:o})}})}getTransactionCount(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",n);try{return fe.from(i).toNumber()}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:o})}})}getCode(e,t){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",n);try{return se(i)}catch(o){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:o})}})}getStorageAt(e,t,n){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Ht({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then(a=>is(a))}),o=yield this.perform("getStorageAt",i);try{return se(o)}catch(a){return et.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:a})}})}_wrapTransaction(e,t,n){if(t!=null&&Fn(t)!==32)throw new Error("invalid response - sendTransaction");const i=e;return t!=null&&e.hash!==t&&et.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(o,a)=>Ye(this,void 0,void 0,function*(){o==null&&(o=1),a==null&&(a=0);let s;o!==0&&n!=null&&(s={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const u=yield this._waitForTransaction(e.hash,o,a,s);return u==null&&o===0?null:(this._emitted["t:"+e.hash]=u.blockNumber,u.status===0&&et.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),u)}),i}sendTransaction(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then(o=>se(o)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,o,i)}catch(o){throw o.transaction=n,o.transactionHash=n.hash,o}})}_getTransactionRequest(e){return Ye(this,void 0,void 0,function*(){const t=yield e,n={};return["from","to"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?fe.from(o):null))}),["type"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o!=null?o:null))}),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(n[i]=Promise.resolve(t[i]).then(o=>o?se(o):null))}),this.formatter.transactionRequest(yield Ht(n))})}_getFilter(e){return Ye(this,void 0,void 0,function*(){e=yield e;const t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(t[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(t[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ht(t))})}_call(e,t,n){return Ye(this,void 0,void 0,function*(){n>=J8&&et.throwError("CCIP read exceeded maximum redirections",q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&t==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&Fn(o)%32===4)try{const a=Ot(o,4),s=Ot(a,0,32);fe.from(s).eq(i)||et.throwError("CCIP Read sender did not match",q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const u=[],l=fe.from(Ot(a,32,64)).toNumber(),h=fe.from(Ot(a,l,l+32)).toNumber(),b=Ot(a,l+32);for(let M=0;MYe(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(t){let a=null;for(let u=0;uthis._wrapTransaction(u)),s}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return u0(()=>Ye(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;a<=0&&(a=1),i.confirmations=a}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return u0(()=>Ye(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",t);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;a<=0&&(a=1),i.confirmations=a}return i}),{oncePoll:this})})}getLogs(e){return Ye(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Ht({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ye.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Ye(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Ye(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&et.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return Ye(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;const n=yield this._getResolver(t,"getResolver");if(n!=null){const i=new uh(this,n,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return Ye(this,void 0,void 0,function*(){t==null&&(t="ENS");const n=yield this.getNetwork();n.ensAddress||et.throwError("network does not support ENS",q.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+so(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Ye(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(lt(e))throw n}typeof e!="string"&&et.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return Ye(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const t=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(n==null)return null;const i=Aa(yield this.call({to:n,data:"0x691f3431"+so(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Ye(this,void 0,void 0,function*(){let t=null;if(lt(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(o,"getAvatar");if(!a)return null;t=new uh(this,a,o);try{const s=yield t.getAvatar();if(s)return s.url}catch(s){if(s.code!==q.errors.CALL_EXCEPTION)throw s}try{const s=Aa(yield this.call({to:a,data:"0x691f3431"+so(o).substring(2)}),0);t=yield this.getResolver(s)}catch(s){if(s.code!==q.errors.CALL_EXCEPTION)throw s;return null}}else if(t=yield this.getResolver(e),!t)return null;const n=yield t.getAvatar();return n==null?null:n.url})}perform(e,t){return et.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,n){const i=new z8(i0(e),t,n);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,i=[],o=i0(e);return this._events=this._events.filter(a=>a.tag!==o?!0:(setTimeout(()=>{a.listener.apply(this,t)},0),n=!0,a.once?(i.push(a),!1):!0)),i.forEach(a=>{this._stopEvent(a)}),n}listenerCount(e){if(!e)return this._events.length;let t=i0(e);return this._events.filter(n=>n.tag===t).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let t=i0(e);return this._events.filter(n=>n.tag===t).map(n=>n.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);const n=[];let i=!1,o=i0(e);return this._events=this._events.filter(a=>a.tag!==o||a.listener!=t||i?!0:(i=!0,n.push(a),!1)),n.forEach(a=>{this._stopEvent(a)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{const n=i0(e);this._events=this._events.filter(i=>i.tag!==n?!0:(t.push(i),!1))}return t.forEach(n=>{this._stopEvent(n)}),this}}var Gn=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const Lt=new q(ws),K8=["call","estimateGas"];function uo(r,e){if(r==null)return null;if(typeof r.message=="string"&&r.message.match("reverted")){const t=lt(r.data)?r.data:null;if(!e||t)return{message:r.message,data:t}}if(typeof r=="object"){for(const t in r){const n=uo(r[t],e);if(n)return n}return null}if(typeof r=="string")try{return uo(JSON.parse(r),e)}catch{}return null}function Zp(r,e,t){const n=t.transaction||t.signedTransaction;if(r==="call"){const o=uo(e,!0);if(o)return o.data;Lt.throwError("missing revert data in call exception; Transaction reverted without a reason string",q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(r==="estimateGas"){let o=uo(e.body,!1);o==null&&(o=uo(e,!1)),o&&Lt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:r,transaction:n,error:e})}let i=e.message;throw e.code===q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit/i)&&Lt.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:r,transaction:n}),i.match(/nonce (is )?too low/i)&&Lt.throwError("nonce has already been used",q.errors.NONCE_EXPIRED,{error:e,method:r,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Lt.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:r,transaction:n}),i.match(/only replay-protected/i)&&Lt.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:r,transaction:n}),K8.indexOf(r)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&Lt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:r,transaction:n}),e}function hh(r){return new Promise(function(e){setTimeout(e,r)})}function Q8(r){if(r.error){const e=new Error(r.error.message);throw e.code=r.error.code,e.data=r.error.data,e}return r.result}function Q0(r){return r&&r.toLowerCase()}const wc={};class $p extends bs{constructor(e,t,n){if(super(),e!==wc)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");le(this,"provider",t),n==null&&(n=0),typeof n=="string"?(le(this,"_address",this.provider.formatter.address(n)),le(this,"_index",null)):typeof n=="number"?(le(this,"_index",n),le(this,"_address",null)):Lt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Lt.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new W8(wc,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Lt.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=vr(e);const t=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=vr(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Gn(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Lt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ht({tx:Ht(e),sender:t}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Lt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const o=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(a=>a,a=>(typeof a.message=="string"&&a.message.match(/user denied/i)&&Lt.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Zp("sendTransaction",a,o)))})}signTransaction(e){return Lt.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Gn(this,void 0,void 0,function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield u0(()=>Gn(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Gn(this,void 0,void 0,function*(){const t=typeof e=="string"?Jt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[se(t),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,message:t}),i}})}_legacySignMessage(e){return Gn(this,void 0,void 0,function*(){const t=typeof e=="string"?Jt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),se(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,message:t}),i}})}_signTypedData(e,t,n){return Gn(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,t,n,a=>this.provider.resolveName(a)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(sr.getPayload(i.domain,t,i.value))])}catch(a){throw typeof a.message=="string"&&a.message.match(/user denied/i)&&Lt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,message:{domain:i.domain,types:t,value:i.value}}),a}})}unlock(e){return Gn(this,void 0,void 0,function*(){const t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class W8 extends $p{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(t,n)}))}}const Y8={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Z8 extends V8{constructor(e,t){let n=t;n==null&&(n=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(a=>{i(a)},a=>{o(a)})},0)})),super(n),e||(e=An(this.constructor,"defaultUrl")()),typeof e=="string"?le(this,"connection",Object.freeze({url:e})):le(this,"connection",Object.freeze(vr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Gn(this,void 0,void 0,function*(){yield hh(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const t=An(this.constructor,"getNetwork");try{return t(fe.from(e).toNumber())}catch(n){return Lt.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Lt.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new $p(wc,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:w0(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=gs(this.connection,JSON.stringify(n),Q8).then(a=>(this.emit("debug",{action:"response",request:n,response:a,provider:this}),a),a=>{throw this.emit("debug",{action:"response",error:a,request:n,provider:this}),a});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Q0(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Q0(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Q0(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Q0(t.address),yt(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{const n=An(this.constructor,"hexlifyTransaction");return["eth_call",[n(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{const n=An(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[n(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=Q0(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Gn(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=t.transaction;if(i&&i.type!=null&&fe.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(t=vr(t),t.transaction=vr(i),delete t.transaction.type)}}const n=this.prepareRequest(e,t);n==null&&Lt.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Zp(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(o){if(e._pendingFilter!=t)return null;let a=Promise.resolve();return o.forEach(function(s){e._emitted["t:"+s.toLowerCase()]="pending",a=a.then(function(){return e.getTransaction(s).then(function(u){return e.emit("pending",u),null})})}),a.then(function(){return hh(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const n=vr(Y8);if(t)for(const o in t)t[o]&&(n[o]=!0);rl(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const a=is(fe.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=a}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=se(e[o]))}),e.accessList&&(i.accessList=U0(e.accessList)),i}}var $8=globalThis&&globalThis.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(h){try{l(n.next(h))}catch(b){a(b)}}function u(h){try{l(n.throw(h))}catch(b){a(b)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((n=n.apply(r,e||[])).next())})};const ey=new q(ws);class ty extends Z8{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return $8(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ey.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(le(this,"_network",t),this.emit("network",t,null))),t})}}const ry="ethers/5.7.0";new q(ry);const ex={TreasureHuntCreator:"0x22D5c0F55393F8D12e53721A30181C6ed7Ff2BD1"},dh="https://faucet.dist0rtion.com:3000",ny="https://eth-sepolia.g.alchemy.com/v2/KuSTsjL_6qzGTklJR1pWmr4OTgCEIQcR";class iy{constructor(e=window.localStorage){Rs(this,"storage");this.storage=e}get(e,t){const n=this.storage.getItem(e);return n===null?t===void 0?null:t:JSON.parse(n)}set(e,t,n){let i;if(t instanceof Function){const o=this.get(e,n);i=t(o)}else i=t;return this.storage.setItem(e,JSON.stringify(i)),i}has(e){return this.get(e)!==null}getsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}clear(){this.storage.clear()}}const Li=new iy;function Ml(r,e){const t=Wi(Li.getsert(r,e));return t.subscribe(n=>{Li.set(r,n)}),t}class zo extends Error{constructor(t,n){super(t);Rs(this,"parentError");Object.setPrototypeOf(this,zo.prototype),this.parentError=n}}class oy extends Error{constructor(e){super(e),Object.setPrototypeOf(this,zo.prototype)}}function ay(r){return new Promise(e=>{setTimeout(e,r)})}function jo(r,e=!1){return async()=>{for(let t=0;t<3;t++)try{return await r()}catch(n){if(e||n instanceof zo)console.error("Retry",t+1,n),await ay(1e3);else throw console.log("Unknown error"),n}throw console.error("Panic",r),new oy("Panic")}}function As(r,e=!1){return jo(r,e)()}var kl={},Xo={},Es={};Object.defineProperty(Es,"__esModule",{value:!0});Es.version=void 0;Es.version="wordlists/5.7.0";(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Wordlist=r.logger=void 0;var e=B1,t=yp,n=gp,i=Es;r.logger=new n.Logger(i.version);var o=function(){function a(s){var u=this.constructor;r.logger.checkAbstract(u,a),(0,t.defineReadOnly)(this,"locale",s)}return a.prototype.split=function(s){return s.toLowerCase().split(/ +/g)},a.prototype.join=function(s){return s.join(" ")},a.check=function(s){for(var u=[],l=0;l<2048;l++){var h=s.getWord(l);if(l!==s.getWordIndex(h))return"0x";u.push(h)}return(0,e.id)(u.join(` `)+` -`)},a.register=function(s,u){u||(u=s.locale)},a}();r.Wordlist=o})(jo);var oy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kl,"__esModule",{value:!0});var ex=kl.langEs=void 0,Ka=M0,_s=jo,ay="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo",tx={},Y0=null;function rx(r){return _s.logger.checkNormalize(),(0,Ka.toUtf8String)(Array.prototype.filter.call((0,Ka.toUtf8Bytes)(r.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function sy(r){var e=[];return Array.prototype.forEach.call((0,Ka.toUtf8Bytes)(r),function(t){t===47?(e.push(204),e.push(129)):t===126?(e.push(110),e.push(204),e.push(131)):e.push(t)}),(0,Ka.toUtf8String)(e)}function ph(r){if(Y0==null&&(Y0=ay.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return sy(e)}),Y0.forEach(function(e,t){tx[rx(e)]=t}),_s.Wordlist.check(r)!=="0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"))throw Y0=null,new Error("BIP39 Wordlist for es (Spanish) FAILED")}var fy=function(r){oy(e,r);function e(){return r.call(this,"es")||this}return e.prototype.getWord=function(t){return ph(this),Y0[t]},e.prototype.getWordIndex=function(t){return ph(this),tx[rx(t)]},e}(_s.Wordlist),nx=new fy;ex=kl.langEs=nx;_s.Wordlist.register(nx);var Pl={},cy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Pl,"__esModule",{value:!0});var ix=Pl.langFr=void 0,Qa=M0,Cs=jo,ly="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie",Z0=null,ox={};function ax(r){return Cs.logger.checkNormalize(),(0,Qa.toUtf8String)(Array.prototype.filter.call((0,Qa.toUtf8Bytes)(r.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function uy(r){var e=[];return Array.prototype.forEach.call((0,Qa.toUtf8Bytes)(r),function(t){t===47?(e.push(204),e.push(129)):t===45?(e.push(204),e.push(128)):e.push(t)}),(0,Qa.toUtf8String)(e)}function xh(r){if(Z0==null&&(Z0=ly.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return uy(e)}),Z0.forEach(function(e,t){ox[ax(e)]=t}),Cs.Wordlist.check(r)!=="0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"))throw Z0=null,new Error("BIP39 Wordlist for fr (French) FAILED")}var hy=function(r){cy(e,r);function e(){return r.call(this,"fr")||this}return e.prototype.getWord=function(t){return xh(this),Z0[t]},e.prototype.getWordIndex=function(t){return xh(this),ox[ax(t)]},e}(Cs.Wordlist),sx=new hy;ix=Pl.langFr=sx;Cs.Wordlist.register(sx);var Rl={},dy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Rl,"__esModule",{value:!0});var fx=Rl.langJa=void 0,py=C1,jr=M0,Wa=jo,xy=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"],by="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt",Rr=null;function bh(r){return(0,py.hexlify)((0,jr.toUtf8Bytes)(r))}var gy="0xe3818de38284e3818f",my="0xe3818de38283e3818f";function gh(r){if(Rr!==null)return;Rr=[];var e={};e[(0,jr.toUtf8String)([227,130,154])]=!1,e[(0,jr.toUtf8String)([227,130,153])]=!1,e[(0,jr.toUtf8String)([227,130,133])]=(0,jr.toUtf8String)([227,130,134]),e[(0,jr.toUtf8String)([227,129,163])]=(0,jr.toUtf8String)([227,129,164]),e[(0,jr.toUtf8String)([227,130,131])]=(0,jr.toUtf8String)([227,130,132]),e[(0,jr.toUtf8String)([227,130,135])]=(0,jr.toUtf8String)([227,130,136]);function t(b){for(var m="",A=0;Am?1:0}for(var i=3;i<=9;i++)for(var o=xy[i-3],a=0;a?";function mh(r){if(p0[r.locale]===null){p0[r.locale]=[];for(var e=0,t=0;t<2048;t++){var n=_y.indexOf(tf[t*3]),i=[228+(n>>2),128+rf.indexOf(tf[t*3+1]),128+rf.indexOf(tf[t*3+2])];if(r.locale==="zh_tw")for(var o=n%4,a=o;a<3;a++)i[a]=rf.indexOf(Ay[e++])+(a==0?228:128);p0[r.locale].push((0,wy.toUtf8String)(i))}if(Xo.Wordlist.check(r)!==Ey[r.locale])throw p0[r.locale]=null,new Error("BIP39 Wordlist for "+r.locale+" (Chinese) FAILED")}}var ux=function(r){vy(e,r);function e(t){return r.call(this,"zh_"+t)||this}return e.prototype.getWord=function(t){return mh(this),p0[this.locale][t]},e.prototype.getWordIndex=function(t){return mh(this),p0[this.locale].indexOf(t)},e.prototype.split=function(t){return t=t.replace(/(?:\u3000| )+/g,""),t.split("")},e}(Xo.Wordlist),Nl=new ux("cn"),Fl=Po.langZhCn=Nl;Xo.Wordlist.register(Nl);Xo.Wordlist.register(Nl,"zh");var hx=new ux("tw");lx=Po.langZhTw=hx;Xo.Wordlist.register(hx);xi.es=ex;xi.fr=ix;xi.ja=fx;xi.zh=Fl;xi.zh_cn=Fl;xi.zh_tw=lx;const dx=ns(new $8(ty)),Oi=Ml("mnemonic",()=>mn.createRandom().mnemonic.phrase),qr=pr([dx,Oi],([r,e],t)=>{if(r&&e){const n=Date.now();try{t(mn.fromMnemonic(e).connect(r))}catch{Oi.set(null),window.location.reload()}console.log(Date.now()-n)}else t(null)}),y0=pr(qr,r=>r?r.address:null),$0=Wi(6e4),Ea=pr([qr,$0],([r],e)=>{if(r){const t=zo(async()=>{const i=await r.getBalance();e(i)}),n=window.setInterval(t,6e4);return t(),()=>window.clearInterval(n)}else e(null)}),v0=pr(Ea,r=>r?r.lt(Ir.parseEther("0.01")):!1);var px={exports:{}};function Cy(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var nf={exports:{}},yh;function st(){return yh||(yh=1,function(r,e){(function(t,n){r.exports=n()})(Be,function(){var t=t||function(n,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Be<"u"&&Be.crypto&&(o=Be.crypto),!o&&typeof Cy=="function")try{o=el}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function B(){}return function(P){var R;return B.prototype=P,R=new B,B.prototype=null,R}}(),u={},l=u.lib={},h=l.Base=function(){return{extend:function(B){var P=s(this);return B&&P.mixIn(B),(!P.hasOwnProperty("init")||this.init===P.init)&&(P.init=function(){P.$super.init.apply(this,arguments)}),P.init.prototype=P,P.$super=this,P},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var P in B)B.hasOwnProperty(P)&&(this[P]=B[P]);B.hasOwnProperty("toString")&&(this.toString=B.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),b=l.WordArray=h.extend({init:function(B,P){B=this.words=B||[],P!=i?this.sigBytes=P:this.sigBytes=B.length*4},toString:function(B){return(B||A).stringify(this)},concat:function(B){var P=this.words,R=B.words,I=this.sigBytes,D=B.sigBytes;if(this.clamp(),I%4)for(var O=0;O>>2]>>>24-O%4*8&255;P[I+O>>>2]|=J<<24-(I+O)%4*8}else for(var X=0;X>>2]=R[X>>>2];return this.sigBytes+=D,this},clamp:function(){var B=this.words,P=this.sigBytes;B[P>>>2]&=4294967295<<32-P%4*8,B.length=n.ceil(P/4)},clone:function(){var B=h.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){for(var P=[],R=0;R>>2]>>>24-D%4*8&255;I.push((O>>>4).toString(16)),I.push((O&15).toString(16))}return I.join("")},parse:function(B){for(var P=B.length,R=[],I=0;I>>3]|=parseInt(B.substr(I,2),16)<<24-I%8*4;return new b.init(R,P/2)}},_=m.Latin1={stringify:function(B){for(var P=B.words,R=B.sigBytes,I=[],D=0;D>>2]>>>24-D%4*8&255;I.push(String.fromCharCode(O))}return I.join("")},parse:function(B){for(var P=B.length,R=[],I=0;I>>2]|=(B.charCodeAt(I)&255)<<24-I%4*8;return new b.init(R,P)}},S=m.Utf8={stringify:function(B){try{return decodeURIComponent(escape(_.stringify(B)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(B){return _.parse(unescape(encodeURIComponent(B)))}},C=l.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new b.init,this._nDataBytes=0},_append:function(B){typeof B=="string"&&(B=S.parse(B)),this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var P,R=this._data,I=R.words,D=R.sigBytes,O=this.blockSize,J=O*4,X=D/J;B?X=n.ceil(X):X=n.max((X|0)-this._minBufferSize,0);var H=X*O,L=n.min(H*4,D);if(H){for(var j=0;j>>2]|=u[b]<<24-b%4*8;a.call(this,h,l)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(af)),af.exports}var sf={exports:{}},Ah;function By(){return Ah||(Ah=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var l=u.words,h=u.sigBytes,b=[],m=0;m>>2]>>>16-m%4*8&65535;b.push(String.fromCharCode(A))}return b.join("")},parse:function(u){for(var l=u.length,h=[],b=0;b>>1]|=u.charCodeAt(b)<<16-b%2*16;return o.create(h,l*2)}},a.Utf16LE={stringify:function(u){for(var l=u.words,h=u.sigBytes,b=[],m=0;m>>2]>>>16-m%4*8&65535);b.push(String.fromCharCode(A))}return b.join("")},parse:function(u){for(var l=u.length,h=[],b=0;b>>1]|=s(u.charCodeAt(b)<<16-b%2*16);return o.create(h,l*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(sf)),sf.exports}var ff={exports:{}},Eh;function J0(){return Eh||(Eh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Base64={stringify:function(u){var l=u.words,h=u.sigBytes,b=this._map;u.clamp();for(var m=[],A=0;A>>2]>>>24-A%4*8&255,S=l[A+1>>>2]>>>24-(A+1)%4*8&255,C=l[A+2>>>2]>>>24-(A+2)%4*8&255,M=_<<16|S<<8|C,B=0;B<4&&A+B*.75>>6*(3-B)&63));var P=b.charAt(64);if(P)for(;m.length%4;)m.push(P);return m.join("")},parse:function(u){var l=u.length,h=this._map,b=this._reverseMap;if(!b){b=this._reverseMap=[];for(var m=0;m>>6-A%4*2,C=_|S;b[m>>>2]|=C<<24-m%4*8,m++}return o.create(b,m)}}(),t.enc.Base64})}(ff)),ff.exports}var cf={exports:{}},_h;function My(){return _h||(_h=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Base64url={stringify:function(u,l=!0){var h=u.words,b=u.sigBytes,m=l?this._safe_map:this._map;u.clamp();for(var A=[],_=0;_>>2]>>>24-_%4*8&255,C=h[_+1>>>2]>>>24-(_+1)%4*8&255,M=h[_+2>>>2]>>>24-(_+2)%4*8&255,B=S<<16|C<<8|M,P=0;P<4&&_+P*.75>>6*(3-P)&63));var R=m.charAt(64);if(R)for(;A.length%4;)A.push(R);return A.join("")},parse:function(u,l=!0){var h=u.length,b=l?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var A=0;A>>6-A%4*2,C=_|S;b[m>>>2]|=C<<24-m%4*8,m++}return o.create(b,m)}}(),t.enc.Base64url})}(cf)),cf.exports}var lf={exports:{}},Ch;function H0(){return Ch||(Ch=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,l=[];(function(){for(var S=0;S<64;S++)l[S]=n.abs(n.sin(S+1))*4294967296|0})();var h=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(S,C){for(var M=0;M<16;M++){var B=C+M,P=S[B];S[B]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}var R=this._hash.words,I=S[C+0],D=S[C+1],O=S[C+2],J=S[C+3],X=S[C+4],H=S[C+5],L=S[C+6],j=S[C+7],v=S[C+8],f=S[C+9],p=S[C+10],g=S[C+11],w=S[C+12],E=S[C+13],k=S[C+14],F=S[C+15],x=R[0],c=R[1],y=R[2],T=R[3];x=b(x,c,y,T,I,7,l[0]),T=b(T,x,c,y,D,12,l[1]),y=b(y,T,x,c,O,17,l[2]),c=b(c,y,T,x,J,22,l[3]),x=b(x,c,y,T,X,7,l[4]),T=b(T,x,c,y,H,12,l[5]),y=b(y,T,x,c,L,17,l[6]),c=b(c,y,T,x,j,22,l[7]),x=b(x,c,y,T,v,7,l[8]),T=b(T,x,c,y,f,12,l[9]),y=b(y,T,x,c,p,17,l[10]),c=b(c,y,T,x,g,22,l[11]),x=b(x,c,y,T,w,7,l[12]),T=b(T,x,c,y,E,12,l[13]),y=b(y,T,x,c,k,17,l[14]),c=b(c,y,T,x,F,22,l[15]),x=m(x,c,y,T,D,5,l[16]),T=m(T,x,c,y,L,9,l[17]),y=m(y,T,x,c,g,14,l[18]),c=m(c,y,T,x,I,20,l[19]),x=m(x,c,y,T,H,5,l[20]),T=m(T,x,c,y,p,9,l[21]),y=m(y,T,x,c,F,14,l[22]),c=m(c,y,T,x,X,20,l[23]),x=m(x,c,y,T,f,5,l[24]),T=m(T,x,c,y,k,9,l[25]),y=m(y,T,x,c,J,14,l[26]),c=m(c,y,T,x,v,20,l[27]),x=m(x,c,y,T,E,5,l[28]),T=m(T,x,c,y,O,9,l[29]),y=m(y,T,x,c,j,14,l[30]),c=m(c,y,T,x,w,20,l[31]),x=A(x,c,y,T,H,4,l[32]),T=A(T,x,c,y,v,11,l[33]),y=A(y,T,x,c,g,16,l[34]),c=A(c,y,T,x,k,23,l[35]),x=A(x,c,y,T,D,4,l[36]),T=A(T,x,c,y,X,11,l[37]),y=A(y,T,x,c,j,16,l[38]),c=A(c,y,T,x,p,23,l[39]),x=A(x,c,y,T,E,4,l[40]),T=A(T,x,c,y,I,11,l[41]),y=A(y,T,x,c,J,16,l[42]),c=A(c,y,T,x,L,23,l[43]),x=A(x,c,y,T,f,4,l[44]),T=A(T,x,c,y,w,11,l[45]),y=A(y,T,x,c,F,16,l[46]),c=A(c,y,T,x,O,23,l[47]),x=_(x,c,y,T,I,6,l[48]),T=_(T,x,c,y,j,10,l[49]),y=_(y,T,x,c,k,15,l[50]),c=_(c,y,T,x,H,21,l[51]),x=_(x,c,y,T,w,6,l[52]),T=_(T,x,c,y,J,10,l[53]),y=_(y,T,x,c,p,15,l[54]),c=_(c,y,T,x,D,21,l[55]),x=_(x,c,y,T,v,6,l[56]),T=_(T,x,c,y,F,10,l[57]),y=_(y,T,x,c,L,15,l[58]),c=_(c,y,T,x,E,21,l[59]),x=_(x,c,y,T,X,6,l[60]),T=_(T,x,c,y,g,10,l[61]),y=_(y,T,x,c,O,15,l[62]),c=_(c,y,T,x,f,21,l[63]),R[0]=R[0]+x|0,R[1]=R[1]+c|0,R[2]=R[2]+y|0,R[3]=R[3]+T|0},_doFinalize:function(){var S=this._data,C=S.words,M=this._nDataBytes*8,B=S.sigBytes*8;C[B>>>5]|=128<<24-B%32;var P=n.floor(M/4294967296),R=M;C[(B+64>>>9<<4)+15]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,C[(B+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,S.sigBytes=(C.length+1)*4,this._process();for(var I=this._hash,D=I.words,O=0;O<4;O++){var J=D[O];D[O]=(J<<8|J>>>24)&16711935|(J<<24|J>>>8)&4278255360}return I},clone:function(){var S=s.clone.call(this);return S._hash=this._hash.clone(),S}});function b(S,C,M,B,P,R,I){var D=S+(C&M|~C&B)+P+I;return(D<>>32-R)+C}function m(S,C,M,B,P,R,I){var D=S+(C&B|M&~B)+P+I;return(D<>>32-R)+C}function A(S,C,M,B,P,R,I){var D=S+(C^M^B)+P+I;return(D<>>32-R)+C}function _(S,C,M,B,P,R,I){var D=S+(M^(C|~B))+P+I;return(D<>>32-R)+C}i.MD5=s._createHelper(h),i.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5})}(lf)),lf.exports}var uf={exports:{}},Sh;function Tl(){return Sh||(Sh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(h,b){for(var m=this._hash.words,A=m[0],_=m[1],S=m[2],C=m[3],M=m[4],B=0;B<80;B++){if(B<16)u[B]=h[b+B]|0;else{var P=u[B-3]^u[B-8]^u[B-14]^u[B-16];u[B]=P<<1|P>>>31}var R=(A<<5|A>>>27)+M+u[B];B<20?R+=(_&S|~_&C)+1518500249:B<40?R+=(_^S^C)+1859775393:B<60?R+=(_&S|_&C|S&C)-1894007588:R+=(_^S^C)-899497514,M=C,C=S,S=_<<30|_>>>2,_=A,A=R}m[0]=m[0]+A|0,m[1]=m[1]+_|0,m[2]=m[2]+S|0,m[3]=m[3]+C|0,m[4]=m[4]+M|0},_doFinalize:function(){var h=this._data,b=h.words,m=this._nDataBytes*8,A=h.sigBytes*8;return b[A>>>5]|=128<<24-A%32,b[(A+64>>>9<<4)+14]=Math.floor(m/4294967296),b[(A+64>>>9<<4)+15]=m,h.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});n.SHA1=a._createHelper(l),n.HmacSHA1=a._createHmacHelper(l)}(),t.SHA1})}(uf)),uf.exports}var hf={exports:{}},Bh;function xx(){return Bh||(Bh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,l=[],h=[];(function(){function A(M){for(var B=n.sqrt(M),P=2;P<=B;P++)if(!(M%P))return!1;return!0}function _(M){return(M-(M|0))*4294967296|0}for(var S=2,C=0;C<64;)A(S)&&(C<8&&(l[C]=_(n.pow(S,1/2))),h[C]=_(n.pow(S,1/3)),C++),S++})();var b=[],m=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(l.slice(0))},_doProcessBlock:function(A,_){for(var S=this._hash.words,C=S[0],M=S[1],B=S[2],P=S[3],R=S[4],I=S[5],D=S[6],O=S[7],J=0;J<64;J++){if(J<16)b[J]=A[_+J]|0;else{var X=b[J-15],H=(X<<25|X>>>7)^(X<<14|X>>>18)^X>>>3,L=b[J-2],j=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;b[J]=H+b[J-7]+j+b[J-16]}var v=R&I^~R&D,f=C&M^C&B^M&B,p=(C<<30|C>>>2)^(C<<19|C>>>13)^(C<<10|C>>>22),g=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),w=O+g+v+h[J]+b[J],E=p+f;O=D,D=I,I=R,R=P+w|0,P=B,B=M,M=C,C=w+E|0}S[0]=S[0]+C|0,S[1]=S[1]+M|0,S[2]=S[2]+B|0,S[3]=S[3]+P|0,S[4]=S[4]+R|0,S[5]=S[5]+I|0,S[6]=S[6]+D|0,S[7]=S[7]+O|0},_doFinalize:function(){var A=this._data,_=A.words,S=this._nDataBytes*8,C=A.sigBytes*8;return _[C>>>5]|=128<<24-C%32,_[(C+64>>>9<<4)+14]=n.floor(S/4294967296),_[(C+64>>>9<<4)+15]=S,A.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var A=s.clone.call(this);return A._hash=this._hash.clone(),A}});i.SHA256=s._createHelper(m),i.HmacSHA256=s._createHmacHelper(m)}(Math),t.SHA256})}(hf)),hf.exports}var df={exports:{}},Mh;function ky(){return Mh||(Mh=1,function(r,e){(function(t,n,i){r.exports=n(st(),xx())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var l=s._doFinalize.call(this);return l.sigBytes-=4,l}});n.SHA224=s._createHelper(u),n.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(df)),df.exports}var pf={exports:{}},kh;function bx(){return kh||(kh=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.Hasher,a=n.x64,s=a.Word,u=a.WordArray,l=n.algo;function h(){return s.create.apply(s,arguments)}var b=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],m=[];(function(){for(var _=0;_<80;_++)m[_]=h()})();var A=l.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(_,S){for(var C=this._hash.words,M=C[0],B=C[1],P=C[2],R=C[3],I=C[4],D=C[5],O=C[6],J=C[7],X=M.high,H=M.low,L=B.high,j=B.low,v=P.high,f=P.low,p=R.high,g=R.low,w=I.high,E=I.low,k=D.high,F=D.low,x=O.high,c=O.low,y=J.high,T=J.low,d=X,N=H,G=L,U=j,z=v,te=f,K=p,V=g,me=w,Q=E,oe=k,xt=F,we=x,ge=c,Ct=y,Ae=T,xe=0;xe<80;xe++){var ft,de,Ce=m[xe];if(xe<16)de=Ce.high=_[S+xe*2]|0,ft=Ce.low=_[S+xe*2+1]|0;else{var St=m[xe-15],pe=St.high,Ee=St.low,wt=(pe>>>1|Ee<<31)^(pe>>>8|Ee<<24)^pe>>>7,W=(Ee>>>1|pe<<31)^(Ee>>>8|pe<<24)^(Ee>>>7|pe<<25),ie=m[xe-2],Ft=ie.high,Se=ie.low,Fe=(Ft>>>19|Se<<13)^(Ft<<3|Se>>>29)^Ft>>>6,zt=(Se>>>19|Ft<<13)^(Se<<3|Ft>>>29)^(Se>>>6|Ft<<26),Me=m[xe-7],Te=Me.high,Zt=Me.low,ke=m[xe-16],Ie=ke.high,jt=ke.low;ft=W+Zt,de=wt+Te+(ft>>>0>>0?1:0),ft=ft+zt,de=de+Fe+(ft>>>0>>0?1:0),ft=ft+jt,de=de+Ie+(ft>>>0>>0?1:0),Ce.high=de,Ce.low=ft}var De=me&oe^~me&we,Pe=Q&xt^~Q&ge,$t=d&G^d&z^G&z,Oe=N&U^N&te^U&te,Le=(d>>>28|N<<4)^(d<<30|N>>>2)^(d<<25|N>>>7),Xt=(N>>>28|d<<4)^(N<<30|d>>>2)^(N<<25|d>>>7),Ue=(me>>>14|Q<<18)^(me>>>18|Q<<14)^(me<<23|Q>>>9),Je=(Q>>>14|me<<18)^(Q>>>18|me<<14)^(Q<<23|me>>>9),qt=b[xe],He=qt.high,Re=qt.low,pt=Ae+Je,_e=Ct+Ue+(pt>>>0>>0?1:0),pt=pt+Pe,_e=_e+De+(pt>>>0>>0?1:0),pt=pt+Re,_e=_e+He+(pt>>>0>>0?1:0),pt=pt+ft,_e=_e+de+(pt>>>0>>0?1:0),Ne=Xt+Oe,er=Le+$t+(Ne>>>0>>0?1:0);Ct=we,Ae=ge,we=oe,ge=xt,oe=me,xt=Q,Q=V+pt|0,me=K+_e+(Q>>>0>>0?1:0)|0,K=z,V=te,z=G,te=U,G=d,U=N,N=pt+Ne|0,d=_e+er+(N>>>0>>0?1:0)|0}H=M.low=H+N,M.high=X+d+(H>>>0>>0?1:0),j=B.low=j+U,B.high=L+G+(j>>>0>>0?1:0),f=P.low=f+te,P.high=v+z+(f>>>0>>0?1:0),g=R.low=g+V,R.high=p+K+(g>>>0>>0?1:0),E=I.low=E+Q,I.high=w+me+(E>>>0>>0?1:0),F=D.low=F+xt,D.high=k+oe+(F>>>0>>0?1:0),c=O.low=c+ge,O.high=x+we+(c>>>0>>0?1:0),T=J.low=T+Ae,J.high=y+Ct+(T>>>0>>0?1:0)},_doFinalize:function(){var _=this._data,S=_.words,C=this._nDataBytes*8,M=_.sigBytes*8;S[M>>>5]|=128<<24-M%32,S[(M+128>>>10<<5)+30]=Math.floor(C/4294967296),S[(M+128>>>10<<5)+31]=C,_.sigBytes=S.length*4,this._process();var B=this._hash.toX32();return B},clone:function(){var _=o.clone.call(this);return _._hash=this._hash.clone(),_},blockSize:1024/32});n.SHA512=o._createHelper(A),n.HmacSHA512=o._createHmacHelper(A)}(),t.SHA512})}(pf)),pf.exports}var xf={exports:{}},Ph;function Py(){return Ph||(Ph=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss(),bx())})(Be,function(t){return function(){var n=t,i=n.x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,l=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var h=u._doFinalize.call(this);return h.sigBytes-=16,h}});n.SHA384=u._createHelper(l),n.HmacSHA384=u._createHmacHelper(l)}(),t.SHA384})}(xf)),xf.exports}var bf={exports:{}},Rh;function Ry(){return Rh||(Rh=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,l=u.Word,h=i.algo,b=[],m=[],A=[];(function(){for(var C=1,M=0,B=0;B<24;B++){b[C+5*M]=(B+1)*(B+2)/2%64;var P=M%5,R=(2*C+3*M)%5;C=P,M=R}for(var C=0;C<5;C++)for(var M=0;M<5;M++)m[C+5*M]=M+(2*C+3*M)%5*5;for(var I=1,D=0;D<24;D++){for(var O=0,J=0,X=0;X<7;X++){if(I&1){var H=(1<>>24)&16711935|(I<<24|I>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360;var O=B[R];O.high^=D,O.low^=I}for(var J=0;J<24;J++){for(var X=0;X<5;X++){for(var H=0,L=0,j=0;j<5;j++){var O=B[X+5*j];H^=O.high,L^=O.low}var v=_[X];v.high=H,v.low=L}for(var X=0;X<5;X++)for(var f=_[(X+4)%5],p=_[(X+1)%5],g=p.high,w=p.low,H=f.high^(g<<1|w>>>31),L=f.low^(w<<1|g>>>31),j=0;j<5;j++){var O=B[X+5*j];O.high^=H,O.low^=L}for(var E=1;E<25;E++){var H,L,O=B[E],k=O.high,F=O.low,x=b[E];x<32?(H=k<>>32-x,L=F<>>32-x):(H=F<>>64-x,L=k<>>64-x);var c=_[m[E]];c.high=H,c.low=L}var y=_[0],T=B[0];y.high=T.high,y.low=T.low;for(var X=0;X<5;X++)for(var j=0;j<5;j++){var E=X+5*j,O=B[E],d=_[E],N=_[(X+1)%5+5*j],G=_[(X+2)%5+5*j];O.high=d.high^~N.high&G.high,O.low=d.low^~N.low&G.low}var O=B[0],U=A[J];O.high^=U.high,O.low^=U.low}},_doFinalize:function(){var C=this._data,M=C.words;this._nDataBytes*8;var B=C.sigBytes*8,P=this.blockSize*32;M[B>>>5]|=1<<24-B%32,M[(n.ceil((B+1)/P)*P>>>5)-1]|=128,C.sigBytes=M.length*4,this._process();for(var R=this._state,I=this.cfg.outputLength/8,D=I/8,O=[],J=0;J>>24)&16711935|(H<<24|H>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,O.push(L),O.push(H)}return new a.init(O,I)},clone:function(){for(var C=s.clone.call(this),M=C._state=this._state.slice(0),B=0;B<25;B++)M[B]=M[B].clone();return C}});i.SHA3=s._createHelper(S),i.HmacSHA3=s._createHmacHelper(S)}(Math),t.SHA3})}(bf)),bf.exports}var gf={exports:{}},Nh;function Ny(){return Nh||(Nh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){/** @preserve +`)},a.register=function(s,u){u||(u=s.locale)},a}();r.Wordlist=o})(Xo);var sy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kl,"__esModule",{value:!0});var tx=kl.langEs=void 0,Ka=M0,_s=Xo,fy="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo",rx={},Z0=null;function nx(r){return _s.logger.checkNormalize(),(0,Ka.toUtf8String)(Array.prototype.filter.call((0,Ka.toUtf8Bytes)(r.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function cy(r){var e=[];return Array.prototype.forEach.call((0,Ka.toUtf8Bytes)(r),function(t){t===47?(e.push(204),e.push(129)):t===126?(e.push(110),e.push(204),e.push(131)):e.push(t)}),(0,Ka.toUtf8String)(e)}function ph(r){if(Z0==null&&(Z0=fy.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return cy(e)}),Z0.forEach(function(e,t){rx[nx(e)]=t}),_s.Wordlist.check(r)!=="0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"))throw Z0=null,new Error("BIP39 Wordlist for es (Spanish) FAILED")}var ly=function(r){sy(e,r);function e(){return r.call(this,"es")||this}return e.prototype.getWord=function(t){return ph(this),Z0[t]},e.prototype.getWordIndex=function(t){return ph(this),rx[nx(t)]},e}(_s.Wordlist),ix=new ly;tx=kl.langEs=ix;_s.Wordlist.register(ix);var Pl={},uy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Pl,"__esModule",{value:!0});var ox=Pl.langFr=void 0,Qa=M0,Cs=Xo,hy="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie",$0=null,ax={};function sx(r){return Cs.logger.checkNormalize(),(0,Qa.toUtf8String)(Array.prototype.filter.call((0,Qa.toUtf8Bytes)(r.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function dy(r){var e=[];return Array.prototype.forEach.call((0,Qa.toUtf8Bytes)(r),function(t){t===47?(e.push(204),e.push(129)):t===45?(e.push(204),e.push(128)):e.push(t)}),(0,Qa.toUtf8String)(e)}function xh(r){if($0==null&&($0=hy.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return dy(e)}),$0.forEach(function(e,t){ax[sx(e)]=t}),Cs.Wordlist.check(r)!=="0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"))throw $0=null,new Error("BIP39 Wordlist for fr (French) FAILED")}var py=function(r){uy(e,r);function e(){return r.call(this,"fr")||this}return e.prototype.getWord=function(t){return xh(this),$0[t]},e.prototype.getWordIndex=function(t){return xh(this),ax[sx(t)]},e}(Cs.Wordlist),fx=new py;ox=Pl.langFr=fx;Cs.Wordlist.register(fx);var Rl={},xy=Be&&Be.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Rl,"__esModule",{value:!0});var cx=Rl.langJa=void 0,by=S1,jr=M0,Wa=Xo,gy=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"],my="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt",Rr=null;function bh(r){return(0,by.hexlify)((0,jr.toUtf8Bytes)(r))}var yy="0xe3818de38284e3818f",vy="0xe3818de38283e3818f";function gh(r){if(Rr!==null)return;Rr=[];var e={};e[(0,jr.toUtf8String)([227,130,154])]=!1,e[(0,jr.toUtf8String)([227,130,153])]=!1,e[(0,jr.toUtf8String)([227,130,133])]=(0,jr.toUtf8String)([227,130,134]),e[(0,jr.toUtf8String)([227,129,163])]=(0,jr.toUtf8String)([227,129,164]),e[(0,jr.toUtf8String)([227,130,131])]=(0,jr.toUtf8String)([227,130,132]),e[(0,jr.toUtf8String)([227,130,135])]=(0,jr.toUtf8String)([227,130,136]);function t(b){for(var m="",A=0;Am?1:0}for(var i=3;i<=9;i++)for(var o=gy[i-3],a=0;a?";function mh(r){if(p0[r.locale]===null){p0[r.locale]=[];for(var e=0,t=0;t<2048;t++){var n=Sy.indexOf(tf[t*3]),i=[228+(n>>2),128+rf.indexOf(tf[t*3+1]),128+rf.indexOf(tf[t*3+2])];if(r.locale==="zh_tw")for(var o=n%4,a=o;a<3;a++)i[a]=rf.indexOf(_y[e++])+(a==0?228:128);p0[r.locale].push((0,Ey.toUtf8String)(i))}if(qo.Wordlist.check(r)!==Cy[r.locale])throw p0[r.locale]=null,new Error("BIP39 Wordlist for "+r.locale+" (Chinese) FAILED")}}var hx=function(r){Ay(e,r);function e(t){return r.call(this,"zh_"+t)||this}return e.prototype.getWord=function(t){return mh(this),p0[this.locale][t]},e.prototype.getWordIndex=function(t){return mh(this),p0[this.locale].indexOf(t)},e.prototype.split=function(t){return t=t.replace(/(?:\u3000| )+/g,""),t.split("")},e}(qo.Wordlist),Nl=new hx("cn"),Fl=Ro.langZhCn=Nl;qo.Wordlist.register(Nl);qo.Wordlist.register(Nl,"zh");var dx=new hx("tw");ux=Ro.langZhTw=dx;qo.Wordlist.register(dx);xi.es=tx;xi.fr=ox;xi.ja=cx;xi.zh=Fl;xi.zh_cn=Fl;xi.zh_tw=ux;const px=ns(new ty(ny)),Oi=Ml("mnemonic",()=>mn.createRandom().mnemonic.phrase),qr=pr([px,Oi],([r,e],t)=>{if(r&&e){const n=Date.now();try{t(mn.fromMnemonic(e).connect(r))}catch{Oi.set(null),window.location.reload()}console.log(Date.now()-n)}else t(null)}),y0=pr(qr,r=>r?r.address:null),eo=Wi(6e4),Ea=pr([qr,eo],([r],e)=>{if(r){const t=jo(async()=>{const i=await r.getBalance();e(i)}),n=window.setInterval(t,6e4);return t(),()=>window.clearInterval(n)}else e(null)}),v0=pr(Ea,r=>r?r.lt(Ir.parseEther("0.01")):!1);var xx={exports:{}};function By(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var nf={exports:{}},yh;function st(){return yh||(yh=1,function(r,e){(function(t,n){r.exports=n()})(Be,function(){var t=t||function(n,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Be<"u"&&Be.crypto&&(o=Be.crypto),!o&&typeof By=="function")try{o=el}catch{}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function B(){}return function(P){var R;return B.prototype=P,R=new B,B.prototype=null,R}}(),u={},l=u.lib={},h=l.Base=function(){return{extend:function(B){var P=s(this);return B&&P.mixIn(B),(!P.hasOwnProperty("init")||this.init===P.init)&&(P.init=function(){P.$super.init.apply(this,arguments)}),P.init.prototype=P,P.$super=this,P},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var P in B)B.hasOwnProperty(P)&&(this[P]=B[P]);B.hasOwnProperty("toString")&&(this.toString=B.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),b=l.WordArray=h.extend({init:function(B,P){B=this.words=B||[],P!=i?this.sigBytes=P:this.sigBytes=B.length*4},toString:function(B){return(B||A).stringify(this)},concat:function(B){var P=this.words,R=B.words,I=this.sigBytes,D=B.sigBytes;if(this.clamp(),I%4)for(var O=0;O>>2]>>>24-O%4*8&255;P[I+O>>>2]|=J<<24-(I+O)%4*8}else for(var X=0;X>>2]=R[X>>>2];return this.sigBytes+=D,this},clamp:function(){var B=this.words,P=this.sigBytes;B[P>>>2]&=4294967295<<32-P%4*8,B.length=n.ceil(P/4)},clone:function(){var B=h.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){for(var P=[],R=0;R>>2]>>>24-D%4*8&255;I.push((O>>>4).toString(16)),I.push((O&15).toString(16))}return I.join("")},parse:function(B){for(var P=B.length,R=[],I=0;I>>3]|=parseInt(B.substr(I,2),16)<<24-I%8*4;return new b.init(R,P/2)}},_=m.Latin1={stringify:function(B){for(var P=B.words,R=B.sigBytes,I=[],D=0;D>>2]>>>24-D%4*8&255;I.push(String.fromCharCode(O))}return I.join("")},parse:function(B){for(var P=B.length,R=[],I=0;I>>2]|=(B.charCodeAt(I)&255)<<24-I%4*8;return new b.init(R,P)}},S=m.Utf8={stringify:function(B){try{return decodeURIComponent(escape(_.stringify(B)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(B){return _.parse(unescape(encodeURIComponent(B)))}},C=l.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new b.init,this._nDataBytes=0},_append:function(B){typeof B=="string"&&(B=S.parse(B)),this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var P,R=this._data,I=R.words,D=R.sigBytes,O=this.blockSize,J=O*4,X=D/J;B?X=n.ceil(X):X=n.max((X|0)-this._minBufferSize,0);var H=X*O,L=n.min(H*4,D);if(H){for(var j=0;j>>2]|=u[b]<<24-b%4*8;a.call(this,h,l)}else a.apply(this,arguments)};s.prototype=o}}(),t.lib.WordArray})}(af)),af.exports}var sf={exports:{}},Ah;function ky(){return Ah||(Ah=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Utf16=a.Utf16BE={stringify:function(u){for(var l=u.words,h=u.sigBytes,b=[],m=0;m>>2]>>>16-m%4*8&65535;b.push(String.fromCharCode(A))}return b.join("")},parse:function(u){for(var l=u.length,h=[],b=0;b>>1]|=u.charCodeAt(b)<<16-b%2*16;return o.create(h,l*2)}},a.Utf16LE={stringify:function(u){for(var l=u.words,h=u.sigBytes,b=[],m=0;m>>2]>>>16-m%4*8&65535);b.push(String.fromCharCode(A))}return b.join("")},parse:function(u){for(var l=u.length,h=[],b=0;b>>1]|=s(u.charCodeAt(b)<<16-b%2*16);return o.create(h,l*2)}};function s(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(sf)),sf.exports}var ff={exports:{}},Eh;function J0(){return Eh||(Eh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Base64={stringify:function(u){var l=u.words,h=u.sigBytes,b=this._map;u.clamp();for(var m=[],A=0;A>>2]>>>24-A%4*8&255,S=l[A+1>>>2]>>>24-(A+1)%4*8&255,C=l[A+2>>>2]>>>24-(A+2)%4*8&255,M=_<<16|S<<8|C,B=0;B<4&&A+B*.75>>6*(3-B)&63));var P=b.charAt(64);if(P)for(;m.length%4;)m.push(P);return m.join("")},parse:function(u){var l=u.length,h=this._map,b=this._reverseMap;if(!b){b=this._reverseMap=[];for(var m=0;m>>6-A%4*2,C=_|S;b[m>>>2]|=C<<24-m%4*8,m++}return o.create(b,m)}}(),t.enc.Base64})}(ff)),ff.exports}var cf={exports:{}},_h;function Py(){return _h||(_h=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.enc;a.Base64url={stringify:function(u,l=!0){var h=u.words,b=u.sigBytes,m=l?this._safe_map:this._map;u.clamp();for(var A=[],_=0;_>>2]>>>24-_%4*8&255,C=h[_+1>>>2]>>>24-(_+1)%4*8&255,M=h[_+2>>>2]>>>24-(_+2)%4*8&255,B=S<<16|C<<8|M,P=0;P<4&&_+P*.75>>6*(3-P)&63));var R=m.charAt(64);if(R)for(;A.length%4;)A.push(R);return A.join("")},parse:function(u,l=!0){var h=u.length,b=l?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var A=0;A>>6-A%4*2,C=_|S;b[m>>>2]|=C<<24-m%4*8,m++}return o.create(b,m)}}(),t.enc.Base64url})}(cf)),cf.exports}var lf={exports:{}},Ch;function H0(){return Ch||(Ch=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,l=[];(function(){for(var S=0;S<64;S++)l[S]=n.abs(n.sin(S+1))*4294967296|0})();var h=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(S,C){for(var M=0;M<16;M++){var B=C+M,P=S[B];S[B]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}var R=this._hash.words,I=S[C+0],D=S[C+1],O=S[C+2],J=S[C+3],X=S[C+4],H=S[C+5],L=S[C+6],j=S[C+7],v=S[C+8],f=S[C+9],p=S[C+10],g=S[C+11],w=S[C+12],E=S[C+13],k=S[C+14],F=S[C+15],x=R[0],c=R[1],y=R[2],T=R[3];x=b(x,c,y,T,I,7,l[0]),T=b(T,x,c,y,D,12,l[1]),y=b(y,T,x,c,O,17,l[2]),c=b(c,y,T,x,J,22,l[3]),x=b(x,c,y,T,X,7,l[4]),T=b(T,x,c,y,H,12,l[5]),y=b(y,T,x,c,L,17,l[6]),c=b(c,y,T,x,j,22,l[7]),x=b(x,c,y,T,v,7,l[8]),T=b(T,x,c,y,f,12,l[9]),y=b(y,T,x,c,p,17,l[10]),c=b(c,y,T,x,g,22,l[11]),x=b(x,c,y,T,w,7,l[12]),T=b(T,x,c,y,E,12,l[13]),y=b(y,T,x,c,k,17,l[14]),c=b(c,y,T,x,F,22,l[15]),x=m(x,c,y,T,D,5,l[16]),T=m(T,x,c,y,L,9,l[17]),y=m(y,T,x,c,g,14,l[18]),c=m(c,y,T,x,I,20,l[19]),x=m(x,c,y,T,H,5,l[20]),T=m(T,x,c,y,p,9,l[21]),y=m(y,T,x,c,F,14,l[22]),c=m(c,y,T,x,X,20,l[23]),x=m(x,c,y,T,f,5,l[24]),T=m(T,x,c,y,k,9,l[25]),y=m(y,T,x,c,J,14,l[26]),c=m(c,y,T,x,v,20,l[27]),x=m(x,c,y,T,E,5,l[28]),T=m(T,x,c,y,O,9,l[29]),y=m(y,T,x,c,j,14,l[30]),c=m(c,y,T,x,w,20,l[31]),x=A(x,c,y,T,H,4,l[32]),T=A(T,x,c,y,v,11,l[33]),y=A(y,T,x,c,g,16,l[34]),c=A(c,y,T,x,k,23,l[35]),x=A(x,c,y,T,D,4,l[36]),T=A(T,x,c,y,X,11,l[37]),y=A(y,T,x,c,j,16,l[38]),c=A(c,y,T,x,p,23,l[39]),x=A(x,c,y,T,E,4,l[40]),T=A(T,x,c,y,I,11,l[41]),y=A(y,T,x,c,J,16,l[42]),c=A(c,y,T,x,L,23,l[43]),x=A(x,c,y,T,f,4,l[44]),T=A(T,x,c,y,w,11,l[45]),y=A(y,T,x,c,F,16,l[46]),c=A(c,y,T,x,O,23,l[47]),x=_(x,c,y,T,I,6,l[48]),T=_(T,x,c,y,j,10,l[49]),y=_(y,T,x,c,k,15,l[50]),c=_(c,y,T,x,H,21,l[51]),x=_(x,c,y,T,w,6,l[52]),T=_(T,x,c,y,J,10,l[53]),y=_(y,T,x,c,p,15,l[54]),c=_(c,y,T,x,D,21,l[55]),x=_(x,c,y,T,v,6,l[56]),T=_(T,x,c,y,F,10,l[57]),y=_(y,T,x,c,L,15,l[58]),c=_(c,y,T,x,E,21,l[59]),x=_(x,c,y,T,X,6,l[60]),T=_(T,x,c,y,g,10,l[61]),y=_(y,T,x,c,O,15,l[62]),c=_(c,y,T,x,f,21,l[63]),R[0]=R[0]+x|0,R[1]=R[1]+c|0,R[2]=R[2]+y|0,R[3]=R[3]+T|0},_doFinalize:function(){var S=this._data,C=S.words,M=this._nDataBytes*8,B=S.sigBytes*8;C[B>>>5]|=128<<24-B%32;var P=n.floor(M/4294967296),R=M;C[(B+64>>>9<<4)+15]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,C[(B+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,S.sigBytes=(C.length+1)*4,this._process();for(var I=this._hash,D=I.words,O=0;O<4;O++){var J=D[O];D[O]=(J<<8|J>>>24)&16711935|(J<<24|J>>>8)&4278255360}return I},clone:function(){var S=s.clone.call(this);return S._hash=this._hash.clone(),S}});function b(S,C,M,B,P,R,I){var D=S+(C&M|~C&B)+P+I;return(D<>>32-R)+C}function m(S,C,M,B,P,R,I){var D=S+(C&B|M&~B)+P+I;return(D<>>32-R)+C}function A(S,C,M,B,P,R,I){var D=S+(C^M^B)+P+I;return(D<>>32-R)+C}function _(S,C,M,B,P,R,I){var D=S+(M^(C|~B))+P+I;return(D<>>32-R)+C}i.MD5=s._createHelper(h),i.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5})}(lf)),lf.exports}var uf={exports:{}},Sh;function Tl(){return Sh||(Sh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=i.Hasher,s=n.algo,u=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(h,b){for(var m=this._hash.words,A=m[0],_=m[1],S=m[2],C=m[3],M=m[4],B=0;B<80;B++){if(B<16)u[B]=h[b+B]|0;else{var P=u[B-3]^u[B-8]^u[B-14]^u[B-16];u[B]=P<<1|P>>>31}var R=(A<<5|A>>>27)+M+u[B];B<20?R+=(_&S|~_&C)+1518500249:B<40?R+=(_^S^C)+1859775393:B<60?R+=(_&S|_&C|S&C)-1894007588:R+=(_^S^C)-899497514,M=C,C=S,S=_<<30|_>>>2,_=A,A=R}m[0]=m[0]+A|0,m[1]=m[1]+_|0,m[2]=m[2]+S|0,m[3]=m[3]+C|0,m[4]=m[4]+M|0},_doFinalize:function(){var h=this._data,b=h.words,m=this._nDataBytes*8,A=h.sigBytes*8;return b[A>>>5]|=128<<24-A%32,b[(A+64>>>9<<4)+14]=Math.floor(m/4294967296),b[(A+64>>>9<<4)+15]=m,h.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});n.SHA1=a._createHelper(l),n.HmacSHA1=a._createHmacHelper(l)}(),t.SHA1})}(uf)),uf.exports}var hf={exports:{}},Bh;function bx(){return Bh||(Bh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,l=[],h=[];(function(){function A(M){for(var B=n.sqrt(M),P=2;P<=B;P++)if(!(M%P))return!1;return!0}function _(M){return(M-(M|0))*4294967296|0}for(var S=2,C=0;C<64;)A(S)&&(C<8&&(l[C]=_(n.pow(S,1/2))),h[C]=_(n.pow(S,1/3)),C++),S++})();var b=[],m=u.SHA256=s.extend({_doReset:function(){this._hash=new a.init(l.slice(0))},_doProcessBlock:function(A,_){for(var S=this._hash.words,C=S[0],M=S[1],B=S[2],P=S[3],R=S[4],I=S[5],D=S[6],O=S[7],J=0;J<64;J++){if(J<16)b[J]=A[_+J]|0;else{var X=b[J-15],H=(X<<25|X>>>7)^(X<<14|X>>>18)^X>>>3,L=b[J-2],j=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;b[J]=H+b[J-7]+j+b[J-16]}var v=R&I^~R&D,f=C&M^C&B^M&B,p=(C<<30|C>>>2)^(C<<19|C>>>13)^(C<<10|C>>>22),g=(R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25),w=O+g+v+h[J]+b[J],E=p+f;O=D,D=I,I=R,R=P+w|0,P=B,B=M,M=C,C=w+E|0}S[0]=S[0]+C|0,S[1]=S[1]+M|0,S[2]=S[2]+B|0,S[3]=S[3]+P|0,S[4]=S[4]+R|0,S[5]=S[5]+I|0,S[6]=S[6]+D|0,S[7]=S[7]+O|0},_doFinalize:function(){var A=this._data,_=A.words,S=this._nDataBytes*8,C=A.sigBytes*8;return _[C>>>5]|=128<<24-C%32,_[(C+64>>>9<<4)+14]=n.floor(S/4294967296),_[(C+64>>>9<<4)+15]=S,A.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var A=s.clone.call(this);return A._hash=this._hash.clone(),A}});i.SHA256=s._createHelper(m),i.HmacSHA256=s._createHmacHelper(m)}(Math),t.SHA256})}(hf)),hf.exports}var df={exports:{}},Mh;function Ry(){return Mh||(Mh=1,function(r,e){(function(t,n,i){r.exports=n(st(),bx())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=n.algo,s=a.SHA256,u=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var l=s._doFinalize.call(this);return l.sigBytes-=4,l}});n.SHA224=s._createHelper(u),n.HmacSHA224=s._createHmacHelper(u)}(),t.SHA224})}(df)),df.exports}var pf={exports:{}},kh;function gx(){return kh||(kh=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.Hasher,a=n.x64,s=a.Word,u=a.WordArray,l=n.algo;function h(){return s.create.apply(s,arguments)}var b=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],m=[];(function(){for(var _=0;_<80;_++)m[_]=h()})();var A=l.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(_,S){for(var C=this._hash.words,M=C[0],B=C[1],P=C[2],R=C[3],I=C[4],D=C[5],O=C[6],J=C[7],X=M.high,H=M.low,L=B.high,j=B.low,v=P.high,f=P.low,p=R.high,g=R.low,w=I.high,E=I.low,k=D.high,F=D.low,x=O.high,c=O.low,y=J.high,T=J.low,d=X,N=H,G=L,U=j,z=v,te=f,K=p,V=g,me=w,Q=E,oe=k,xt=F,we=x,ge=c,Ct=y,Ae=T,xe=0;xe<80;xe++){var ft,de,Ce=m[xe];if(xe<16)de=Ce.high=_[S+xe*2]|0,ft=Ce.low=_[S+xe*2+1]|0;else{var St=m[xe-15],pe=St.high,Ee=St.low,wt=(pe>>>1|Ee<<31)^(pe>>>8|Ee<<24)^pe>>>7,W=(Ee>>>1|pe<<31)^(Ee>>>8|pe<<24)^(Ee>>>7|pe<<25),ie=m[xe-2],Ft=ie.high,Se=ie.low,Fe=(Ft>>>19|Se<<13)^(Ft<<3|Se>>>29)^Ft>>>6,zt=(Se>>>19|Ft<<13)^(Se<<3|Ft>>>29)^(Se>>>6|Ft<<26),Me=m[xe-7],Te=Me.high,Zt=Me.low,ke=m[xe-16],Ie=ke.high,jt=ke.low;ft=W+Zt,de=wt+Te+(ft>>>0>>0?1:0),ft=ft+zt,de=de+Fe+(ft>>>0>>0?1:0),ft=ft+jt,de=de+Ie+(ft>>>0>>0?1:0),Ce.high=de,Ce.low=ft}var De=me&oe^~me&we,Pe=Q&xt^~Q&ge,$t=d&G^d&z^G&z,Oe=N&U^N&te^U&te,Le=(d>>>28|N<<4)^(d<<30|N>>>2)^(d<<25|N>>>7),Xt=(N>>>28|d<<4)^(N<<30|d>>>2)^(N<<25|d>>>7),Ue=(me>>>14|Q<<18)^(me>>>18|Q<<14)^(me<<23|Q>>>9),Je=(Q>>>14|me<<18)^(Q>>>18|me<<14)^(Q<<23|me>>>9),qt=b[xe],He=qt.high,Re=qt.low,pt=Ae+Je,_e=Ct+Ue+(pt>>>0>>0?1:0),pt=pt+Pe,_e=_e+De+(pt>>>0>>0?1:0),pt=pt+Re,_e=_e+He+(pt>>>0>>0?1:0),pt=pt+ft,_e=_e+de+(pt>>>0>>0?1:0),Ne=Xt+Oe,er=Le+$t+(Ne>>>0>>0?1:0);Ct=we,Ae=ge,we=oe,ge=xt,oe=me,xt=Q,Q=V+pt|0,me=K+_e+(Q>>>0>>0?1:0)|0,K=z,V=te,z=G,te=U,G=d,U=N,N=pt+Ne|0,d=_e+er+(N>>>0>>0?1:0)|0}H=M.low=H+N,M.high=X+d+(H>>>0>>0?1:0),j=B.low=j+U,B.high=L+G+(j>>>0>>0?1:0),f=P.low=f+te,P.high=v+z+(f>>>0>>0?1:0),g=R.low=g+V,R.high=p+K+(g>>>0>>0?1:0),E=I.low=E+Q,I.high=w+me+(E>>>0>>0?1:0),F=D.low=F+xt,D.high=k+oe+(F>>>0>>0?1:0),c=O.low=c+ge,O.high=x+we+(c>>>0>>0?1:0),T=J.low=T+Ae,J.high=y+Ct+(T>>>0>>0?1:0)},_doFinalize:function(){var _=this._data,S=_.words,C=this._nDataBytes*8,M=_.sigBytes*8;S[M>>>5]|=128<<24-M%32,S[(M+128>>>10<<5)+30]=Math.floor(C/4294967296),S[(M+128>>>10<<5)+31]=C,_.sigBytes=S.length*4,this._process();var B=this._hash.toX32();return B},clone:function(){var _=o.clone.call(this);return _._hash=this._hash.clone(),_},blockSize:1024/32});n.SHA512=o._createHelper(A),n.HmacSHA512=o._createHmacHelper(A)}(),t.SHA512})}(pf)),pf.exports}var xf={exports:{}},Ph;function Ny(){return Ph||(Ph=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss(),gx())})(Be,function(t){return function(){var n=t,i=n.x64,o=i.Word,a=i.WordArray,s=n.algo,u=s.SHA512,l=s.SHA384=u.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var h=u._doFinalize.call(this);return h.sigBytes-=16,h}});n.SHA384=u._createHelper(l),n.HmacSHA384=u._createHmacHelper(l)}(),t.SHA384})}(xf)),xf.exports}var bf={exports:{}},Rh;function Fy(){return Rh||(Rh=1,function(r,e){(function(t,n,i){r.exports=n(st(),Ss())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.x64,l=u.Word,h=i.algo,b=[],m=[],A=[];(function(){for(var C=1,M=0,B=0;B<24;B++){b[C+5*M]=(B+1)*(B+2)/2%64;var P=M%5,R=(2*C+3*M)%5;C=P,M=R}for(var C=0;C<5;C++)for(var M=0;M<5;M++)m[C+5*M]=M+(2*C+3*M)%5*5;for(var I=1,D=0;D<24;D++){for(var O=0,J=0,X=0;X<7;X++){if(I&1){var H=(1<>>24)&16711935|(I<<24|I>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360;var O=B[R];O.high^=D,O.low^=I}for(var J=0;J<24;J++){for(var X=0;X<5;X++){for(var H=0,L=0,j=0;j<5;j++){var O=B[X+5*j];H^=O.high,L^=O.low}var v=_[X];v.high=H,v.low=L}for(var X=0;X<5;X++)for(var f=_[(X+4)%5],p=_[(X+1)%5],g=p.high,w=p.low,H=f.high^(g<<1|w>>>31),L=f.low^(w<<1|g>>>31),j=0;j<5;j++){var O=B[X+5*j];O.high^=H,O.low^=L}for(var E=1;E<25;E++){var H,L,O=B[E],k=O.high,F=O.low,x=b[E];x<32?(H=k<>>32-x,L=F<>>32-x):(H=F<>>64-x,L=k<>>64-x);var c=_[m[E]];c.high=H,c.low=L}var y=_[0],T=B[0];y.high=T.high,y.low=T.low;for(var X=0;X<5;X++)for(var j=0;j<5;j++){var E=X+5*j,O=B[E],d=_[E],N=_[(X+1)%5+5*j],G=_[(X+2)%5+5*j];O.high=d.high^~N.high&G.high,O.low=d.low^~N.low&G.low}var O=B[0],U=A[J];O.high^=U.high,O.low^=U.low}},_doFinalize:function(){var C=this._data,M=C.words;this._nDataBytes*8;var B=C.sigBytes*8,P=this.blockSize*32;M[B>>>5]|=1<<24-B%32,M[(n.ceil((B+1)/P)*P>>>5)-1]|=128,C.sigBytes=M.length*4,this._process();for(var R=this._state,I=this.cfg.outputLength/8,D=I/8,O=[],J=0;J>>24)&16711935|(H<<24|H>>>8)&4278255360,L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,O.push(L),O.push(H)}return new a.init(O,I)},clone:function(){for(var C=s.clone.call(this),M=C._state=this._state.slice(0),B=0;B<25;B++)M[B]=M[B].clone();return C}});i.SHA3=s._createHelper(S),i.HmacSHA3=s._createHmacHelper(S)}(Math),t.SHA3})}(bf)),bf.exports}var gf={exports:{}},Nh;function Ty(){return Nh||(Nh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -29,14 +29,14 @@ var y2=Object.defineProperty;var v2=(r,e,t)=>e in r?y2(r,e,{enumerable:!0,config - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */return function(n){var i=t,o=i.lib,a=o.WordArray,s=o.Hasher,u=i.algo,l=a.create([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]),h=a.create([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]),b=a.create([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]),m=a.create([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]),A=a.create([0,1518500249,1859775393,2400959708,2840853838]),_=a.create([1352829926,1548603684,1836072691,2053994217,0]),S=u.RIPEMD160=s.extend({_doReset:function(){this._hash=a.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(D,O){for(var J=0;J<16;J++){var X=O+J,H=D[X];D[X]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360}var L=this._hash.words,j=A.words,v=_.words,f=l.words,p=h.words,g=b.words,w=m.words,E,k,F,x,c,y,T,d,N,G;y=E=L[0],T=k=L[1],d=F=L[2],N=x=L[3],G=c=L[4];for(var U,J=0;J<80;J+=1)U=E+D[O+f[J]]|0,J<16?U+=C(k,F,x)+j[0]:J<32?U+=M(k,F,x)+j[1]:J<48?U+=B(k,F,x)+j[2]:J<64?U+=P(k,F,x)+j[3]:U+=R(k,F,x)+j[4],U=U|0,U=I(U,g[J]),U=U+c|0,E=c,c=x,x=I(F,10),F=k,k=U,U=y+D[O+p[J]]|0,J<16?U+=R(T,d,N)+v[0]:J<32?U+=P(T,d,N)+v[1]:J<48?U+=B(T,d,N)+v[2]:J<64?U+=M(T,d,N)+v[3]:U+=C(T,d,N)+v[4],U=U|0,U=I(U,w[J]),U=U+G|0,y=G,G=N,N=I(d,10),d=T,T=U;U=L[1]+F+N|0,L[1]=L[2]+x+G|0,L[2]=L[3]+c+y|0,L[3]=L[4]+E+T|0,L[4]=L[0]+k+d|0,L[0]=U},_doFinalize:function(){var D=this._data,O=D.words,J=this._nDataBytes*8,X=D.sigBytes*8;O[X>>>5]|=128<<24-X%32,O[(X+64>>>9<<4)+14]=(J<<8|J>>>24)&16711935|(J<<24|J>>>8)&4278255360,D.sigBytes=(O.length+1)*4,this._process();for(var H=this._hash,L=H.words,j=0;j<5;j++){var v=L[j];L[j]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}return H},clone:function(){var D=s.clone.call(this);return D._hash=this._hash.clone(),D}});function C(D,O,J){return D^O^J}function M(D,O,J){return D&O|~D&J}function B(D,O,J){return(D|~O)^J}function P(D,O,J){return D&J|O&~J}function R(D,O,J){return D^(O|~J)}function I(D,O){return D<>>32-O}i.RIPEMD160=s._createHelper(S),i.HmacRIPEMD160=s._createHmacHelper(S)}(),t.RIPEMD160})}(gf)),gf.exports}var mf={exports:{}},Fh;function Il(){return Fh||(Fh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){(function(){var n=t,i=n.lib,o=i.Base,a=n.enc,s=a.Utf8,u=n.algo;u.HMAC=o.extend({init:function(l,h){l=this._hasher=new l.init,typeof h=="string"&&(h=s.parse(h));var b=l.blockSize,m=b*4;h.sigBytes>m&&(h=l.finalize(h)),h.clamp();for(var A=this._oKey=h.clone(),_=this._iKey=h.clone(),S=A.words,C=_.words,M=0;M>>2]&255;H.sigBytes-=L}};o.BlockCipher=A.extend({cfg:A.cfg.extend({mode:C,padding:B}),reset:function(){var H;A.reset.call(this);var L=this.cfg,j=L.iv,v=L.mode;this._xformMode==this._ENC_XFORM_MODE?H=v.createEncryptor:(H=v.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==H?this._mode.init(this,j&&j.words):(this._mode=H.call(v,this,j&&j.words),this._mode.__creator=H)},_doProcessBlock:function(H,L){this._mode.processBlock(H,L)},_doFinalize:function(){var H,L=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(L.pad(this._data,this.blockSize),H=this._process(!0)):(H=this._process(!0),L.unpad(H)),H},blockSize:128/32});var P=o.CipherParams=a.extend({init:function(H){this.mixIn(H)},toString:function(H){return(H||this.formatter).stringify(this)}}),R=i.format={},I=R.OpenSSL={stringify:function(H){var L,j=H.ciphertext,v=H.salt;return v?L=s.create([1398893684,1701076831]).concat(v).concat(j):L=j,L.toString(h)},parse:function(H){var L,j=h.parse(H),v=j.words;return v[0]==1398893684&&v[1]==1701076831&&(L=s.create(v.slice(2,4)),v.splice(0,4),j.sigBytes-=16),P.create({ciphertext:j,salt:L})}},D=o.SerializableCipher=a.extend({cfg:a.extend({format:I}),encrypt:function(H,L,j,v){v=this.cfg.extend(v);var f=H.createEncryptor(j,v),p=f.finalize(L),g=f.cfg;return P.create({ciphertext:p,key:j,iv:g.iv,algorithm:H,mode:g.mode,padding:g.padding,blockSize:H.blockSize,formatter:v.format})},decrypt:function(H,L,j,v){v=this.cfg.extend(v),L=this._parse(L,v.format);var f=H.createDecryptor(j,v).finalize(L.ciphertext);return f},_parse:function(H,L){return typeof H=="string"?L.parse(H,this):H}}),O=i.kdf={},J=O.OpenSSL={execute:function(H,L,j,v){v||(v=s.random(64/8));var f=m.create({keySize:L+j}).compute(H,v),p=s.create(f.words.slice(L),j*4);return f.sigBytes=L*4,P.create({key:f,iv:p,salt:v})}},X=o.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:J}),encrypt:function(H,L,j,v){v=this.cfg.extend(v);var f=v.kdf.execute(j,H.keySize,H.ivSize);v.iv=f.iv;var p=D.encrypt.call(this,H,L,f.key,v);return p.mixIn(f),p},decrypt:function(H,L,j,v){v=this.cfg.extend(v),L=this._parse(L,v.format);var f=v.kdf.execute(j,H.keySize,H.ivSize,L.salt);v.iv=f.iv;var p=D.decrypt.call(this,H,L,f.key,v);return p}})}()})}(wf)),wf.exports}var Af={exports:{}},Oh;function Ty(){return Oh||(Oh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.mode.CFB=function(){var n=t.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(o,a){var s=this._cipher,u=s.blockSize;i.call(this,o,a,u,s),this._prevBlock=o.slice(a,a+u)}}),n.Decryptor=n.extend({processBlock:function(o,a){var s=this._cipher,u=s.blockSize,l=o.slice(a,a+u);i.call(this,o,a,u,s),this._prevBlock=l}});function i(o,a,s,u){var l,h=this._iv;h?(l=h.slice(0),this._iv=void 0):l=this._prevBlock,u.encryptBlock(l,0);for(var b=0;b>>24)&16711935|(H<<24|H>>>8)&4278255360}var L=this._hash.words,j=A.words,v=_.words,f=l.words,p=h.words,g=b.words,w=m.words,E,k,F,x,c,y,T,d,N,G;y=E=L[0],T=k=L[1],d=F=L[2],N=x=L[3],G=c=L[4];for(var U,J=0;J<80;J+=1)U=E+D[O+f[J]]|0,J<16?U+=C(k,F,x)+j[0]:J<32?U+=M(k,F,x)+j[1]:J<48?U+=B(k,F,x)+j[2]:J<64?U+=P(k,F,x)+j[3]:U+=R(k,F,x)+j[4],U=U|0,U=I(U,g[J]),U=U+c|0,E=c,c=x,x=I(F,10),F=k,k=U,U=y+D[O+p[J]]|0,J<16?U+=R(T,d,N)+v[0]:J<32?U+=P(T,d,N)+v[1]:J<48?U+=B(T,d,N)+v[2]:J<64?U+=M(T,d,N)+v[3]:U+=C(T,d,N)+v[4],U=U|0,U=I(U,w[J]),U=U+G|0,y=G,G=N,N=I(d,10),d=T,T=U;U=L[1]+F+N|0,L[1]=L[2]+x+G|0,L[2]=L[3]+c+y|0,L[3]=L[4]+E+T|0,L[4]=L[0]+k+d|0,L[0]=U},_doFinalize:function(){var D=this._data,O=D.words,J=this._nDataBytes*8,X=D.sigBytes*8;O[X>>>5]|=128<<24-X%32,O[(X+64>>>9<<4)+14]=(J<<8|J>>>24)&16711935|(J<<24|J>>>8)&4278255360,D.sigBytes=(O.length+1)*4,this._process();for(var H=this._hash,L=H.words,j=0;j<5;j++){var v=L[j];L[j]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}return H},clone:function(){var D=s.clone.call(this);return D._hash=this._hash.clone(),D}});function C(D,O,J){return D^O^J}function M(D,O,J){return D&O|~D&J}function B(D,O,J){return(D|~O)^J}function P(D,O,J){return D&J|O&~J}function R(D,O,J){return D^(O|~J)}function I(D,O){return D<>>32-O}i.RIPEMD160=s._createHelper(S),i.HmacRIPEMD160=s._createHmacHelper(S)}(),t.RIPEMD160})}(gf)),gf.exports}var mf={exports:{}},Fh;function Il(){return Fh||(Fh=1,function(r,e){(function(t,n){r.exports=n(st())})(Be,function(t){(function(){var n=t,i=n.lib,o=i.Base,a=n.enc,s=a.Utf8,u=n.algo;u.HMAC=o.extend({init:function(l,h){l=this._hasher=new l.init,typeof h=="string"&&(h=s.parse(h));var b=l.blockSize,m=b*4;h.sigBytes>m&&(h=l.finalize(h)),h.clamp();for(var A=this._oKey=h.clone(),_=this._iKey=h.clone(),S=A.words,C=_.words,M=0;M>>2]&255;H.sigBytes-=L}};o.BlockCipher=A.extend({cfg:A.cfg.extend({mode:C,padding:B}),reset:function(){var H;A.reset.call(this);var L=this.cfg,j=L.iv,v=L.mode;this._xformMode==this._ENC_XFORM_MODE?H=v.createEncryptor:(H=v.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==H?this._mode.init(this,j&&j.words):(this._mode=H.call(v,this,j&&j.words),this._mode.__creator=H)},_doProcessBlock:function(H,L){this._mode.processBlock(H,L)},_doFinalize:function(){var H,L=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(L.pad(this._data,this.blockSize),H=this._process(!0)):(H=this._process(!0),L.unpad(H)),H},blockSize:128/32});var P=o.CipherParams=a.extend({init:function(H){this.mixIn(H)},toString:function(H){return(H||this.formatter).stringify(this)}}),R=i.format={},I=R.OpenSSL={stringify:function(H){var L,j=H.ciphertext,v=H.salt;return v?L=s.create([1398893684,1701076831]).concat(v).concat(j):L=j,L.toString(h)},parse:function(H){var L,j=h.parse(H),v=j.words;return v[0]==1398893684&&v[1]==1701076831&&(L=s.create(v.slice(2,4)),v.splice(0,4),j.sigBytes-=16),P.create({ciphertext:j,salt:L})}},D=o.SerializableCipher=a.extend({cfg:a.extend({format:I}),encrypt:function(H,L,j,v){v=this.cfg.extend(v);var f=H.createEncryptor(j,v),p=f.finalize(L),g=f.cfg;return P.create({ciphertext:p,key:j,iv:g.iv,algorithm:H,mode:g.mode,padding:g.padding,blockSize:H.blockSize,formatter:v.format})},decrypt:function(H,L,j,v){v=this.cfg.extend(v),L=this._parse(L,v.format);var f=H.createDecryptor(j,v).finalize(L.ciphertext);return f},_parse:function(H,L){return typeof H=="string"?L.parse(H,this):H}}),O=i.kdf={},J=O.OpenSSL={execute:function(H,L,j,v){v||(v=s.random(64/8));var f=m.create({keySize:L+j}).compute(H,v),p=s.create(f.words.slice(L),j*4);return f.sigBytes=L*4,P.create({key:f,iv:p,salt:v})}},X=o.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:J}),encrypt:function(H,L,j,v){v=this.cfg.extend(v);var f=v.kdf.execute(j,H.keySize,H.ivSize);v.iv=f.iv;var p=D.encrypt.call(this,H,L,f.key,v);return p.mixIn(f),p},decrypt:function(H,L,j,v){v=this.cfg.extend(v),L=this._parse(L,v.format);var f=v.kdf.execute(j,H.keySize,H.ivSize,L.salt);v.iv=f.iv;var p=D.decrypt.call(this,H,L,f.key,v);return p}})}()})}(wf)),wf.exports}var Af={exports:{}},Oh;function Dy(){return Oh||(Oh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.mode.CFB=function(){var n=t.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(o,a){var s=this._cipher,u=s.blockSize;i.call(this,o,a,u,s),this._prevBlock=o.slice(a,a+u)}}),n.Decryptor=n.extend({processBlock:function(o,a){var s=this._cipher,u=s.blockSize,l=o.slice(a,a+u);i.call(this,o,a,u,s),this._prevBlock=l}});function i(o,a,s,u){var l,h=this._iv;h?(l=h.slice(0),this._iv=void 0):l=this._prevBlock,u.encryptBlock(l,0);for(var b=0;b>24&255)===255){var u=s>>16&255,l=s>>8&255,h=s&255;u===255?(u=0,l===255?(l=0,h===255?h=0:++h):++l):++u,s=0,s+=u<<16,s+=l<<8,s+=h}else s+=1<<24;return s}function o(s){return(s[0]=i(s[0]))===0&&(s[1]=i(s[1])),s}var a=n.Encryptor=n.extend({processBlock:function(s,u){var l=this._cipher,h=l.blockSize,b=this._iv,m=this._counter;b&&(m=this._counter=b.slice(0),this._iv=void 0),o(m);var A=m.slice(0);l.encryptBlock(A,0);for(var _=0;_>>2]|=s<<24-u%4*8,n.sigBytes+=s},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},t.pad.Ansix923})}(Bf)),Bf.exports}var Mf={exports:{}},zh;function Jy(){return zh||(zh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.Iso10126={pad:function(n,i){var o=i*4,a=o-n.sigBytes%o;n.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},t.pad.Iso10126})}(Mf)),Mf.exports}var kf={exports:{}},jh;function Hy(){return jh||(jh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.Iso97971={pad:function(n,i){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,i)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(kf)),kf.exports}var Pf={exports:{}},Xh;function Gy(){return Xh||(Xh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.ZeroPadding={pad:function(n,i){var o=i*4;n.clamp(),n.sigBytes+=o-(n.sigBytes%o||o)},unpad:function(n){for(var i=n.words,o=n.sigBytes-1,o=n.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){n.sigBytes=o+1;break}}},t.pad.ZeroPadding})}(Pf)),Pf.exports}var Rf={exports:{}},qh;function zy(){return qh||(qh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(Rf)),Rf.exports}var Nf={exports:{}},Vh;function jy(){return Vh||(Vh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.CipherParams,s=i.enc,u=s.Hex,l=i.format;l.Hex={stringify:function(h){return h.ciphertext.toString(u)},parse:function(h){var b=u.parse(h);return a.create({ciphertext:b})}}}(),t.format.Hex})}(Nf)),Nf.exports}var Ff={exports:{}},Kh;function Xy(){return Kh||(Kh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.BlockCipher,a=n.algo,s=[],u=[],l=[],h=[],b=[],m=[],A=[],_=[],S=[],C=[];(function(){for(var P=[],R=0;R<256;R++)R<128?P[R]=R<<1:P[R]=R<<1^283;for(var I=0,D=0,R=0;R<256;R++){var O=D^D<<1^D<<2^D<<3^D<<4;O=O>>>8^O&255^99,s[I]=O,u[O]=I;var J=P[I],X=P[J],H=P[X],L=P[O]*257^O*16843008;l[I]=L<<24|L>>>8,h[I]=L<<16|L>>>16,b[I]=L<<8|L>>>24,m[I]=L;var L=H*16843009^X*65537^J*257^I*16843008;A[O]=L<<24|L>>>8,_[O]=L<<16|L>>>16,S[O]=L<<8|L>>>24,C[O]=L,I?(I=J^P[P[P[H^J]]],D^=P[P[D]]):I=D=1}})();var M=[0,1,2,4,8,16,32,64,128,27,54],B=a.AES=o.extend({_doReset:function(){var P;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,I=R.words,D=R.sigBytes/4,O=this._nRounds=D+6,J=(O+1)*4,X=this._keySchedule=[],H=0;H6&&H%D==4&&(P=s[P>>>24]<<24|s[P>>>16&255]<<16|s[P>>>8&255]<<8|s[P&255]):(P=P<<8|P>>>24,P=s[P>>>24]<<24|s[P>>>16&255]<<16|s[P>>>8&255]<<8|s[P&255],P^=M[H/D|0]<<24),X[H]=X[H-D]^P);for(var L=this._invKeySchedule=[],j=0;j>>24]]^_[s[P>>>16&255]]^S[s[P>>>8&255]]^C[s[P&255]]}}},encryptBlock:function(P,R){this._doCryptBlock(P,R,this._keySchedule,l,h,b,m,s)},decryptBlock:function(P,R){var I=P[R+1];P[R+1]=P[R+3],P[R+3]=I,this._doCryptBlock(P,R,this._invKeySchedule,A,_,S,C,u);var I=P[R+1];P[R+1]=P[R+3],P[R+3]=I},_doCryptBlock:function(P,R,I,D,O,J,X,H){for(var L=this._nRounds,j=P[R]^I[0],v=P[R+1]^I[1],f=P[R+2]^I[2],p=P[R+3]^I[3],g=4,w=1;w>>24]^O[v>>>16&255]^J[f>>>8&255]^X[p&255]^I[g++],k=D[v>>>24]^O[f>>>16&255]^J[p>>>8&255]^X[j&255]^I[g++],F=D[f>>>24]^O[p>>>16&255]^J[j>>>8&255]^X[v&255]^I[g++],x=D[p>>>24]^O[j>>>16&255]^J[v>>>8&255]^X[f&255]^I[g++];j=E,v=k,f=F,p=x}var E=(H[j>>>24]<<24|H[v>>>16&255]<<16|H[f>>>8&255]<<8|H[p&255])^I[g++],k=(H[v>>>24]<<24|H[f>>>16&255]<<16|H[p>>>8&255]<<8|H[j&255])^I[g++],F=(H[f>>>24]<<24|H[p>>>16&255]<<16|H[j>>>8&255]<<8|H[v&255])^I[g++],x=(H[p>>>24]<<24|H[j>>>16&255]<<16|H[v>>>8&255]<<8|H[f&255])^I[g++];P[R]=E,P[R+1]=k,P[R+2]=F,P[R+3]=x},keySize:256/32});n.AES=o._createHelper(B)}(),t.AES})}(Ff)),Ff.exports}var Tf={exports:{}},Qh;function qy(){return Qh||(Qh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=i.BlockCipher,s=n.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],b=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],A=s.DES=a.extend({_doReset:function(){for(var M=this._key,B=M.words,P=[],R=0;R<56;R++){var I=u[R]-1;P[R]=B[I>>>5]>>>31-I%32&1}for(var D=this._subKeys=[],O=0;O<16;O++){for(var J=D[O]=[],X=h[O],R=0;R<24;R++)J[R/6|0]|=P[(l[R]-1+X)%28]<<31-R%6,J[4+(R/6|0)]|=P[28+(l[R+24]-1+X)%28]<<31-R%6;J[0]=J[0]<<1|J[0]>>>31;for(var R=1;R<7;R++)J[R]=J[R]>>>(R-1)*4+3;J[7]=J[7]<<5|J[7]>>>27}for(var H=this._invSubKeys=[],R=0;R<16;R++)H[R]=D[15-R]},encryptBlock:function(M,B){this._doCryptBlock(M,B,this._subKeys)},decryptBlock:function(M,B){this._doCryptBlock(M,B,this._invSubKeys)},_doCryptBlock:function(M,B,P){this._lBlock=M[B],this._rBlock=M[B+1],_.call(this,4,252645135),_.call(this,16,65535),S.call(this,2,858993459),S.call(this,8,16711935),_.call(this,1,1431655765);for(var R=0;R<16;R++){for(var I=P[R],D=this._lBlock,O=this._rBlock,J=0,X=0;X<8;X++)J|=b[X][((O^I[X])&m[X])>>>0];this._lBlock=O,this._rBlock=D^J}var H=this._lBlock;this._lBlock=this._rBlock,this._rBlock=H,_.call(this,1,1431655765),S.call(this,8,16711935),S.call(this,2,858993459),_.call(this,16,65535),_.call(this,4,252645135),M[B]=this._lBlock,M[B+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function _(M,B){var P=(this._lBlock>>>M^this._rBlock)&B;this._rBlock^=P,this._lBlock^=P<>>M^this._lBlock)&B;this._lBlock^=P,this._rBlock^=P<192.");var P=B.slice(0,2),R=B.length<4?B.slice(0,2):B.slice(2,4),I=B.length<6?B.slice(0,2):B.slice(4,6);this._des1=A.createEncryptor(o.create(P)),this._des2=A.createEncryptor(o.create(R)),this._des3=A.createEncryptor(o.create(I))},encryptBlock:function(M,B){this._des1.encryptBlock(M,B),this._des2.decryptBlock(M,B),this._des3.encryptBlock(M,B)},decryptBlock:function(M,B){this._des3.decryptBlock(M,B),this._des2.encryptBlock(M,B),this._des1.decryptBlock(M,B)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=a._createHelper(C)}(),t.TripleDES})}(Tf)),Tf.exports}var If={exports:{}},Wh;function Vy(){return Wh||(Wh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=a.RC4=o.extend({_doReset:function(){for(var h=this._key,b=h.words,m=h.sigBytes,A=this._S=[],_=0;_<256;_++)A[_]=_;for(var _=0,S=0;_<256;_++){var C=_%m,M=b[C>>>2]>>>24-C%4*8&255;S=(S+A[_]+M)%256;var B=A[_];A[_]=A[S],A[S]=B}this._i=this._j=0},_doProcessBlock:function(h,b){h[b]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var h=this._S,b=this._i,m=this._j,A=0,_=0;_<4;_++){b=(b+1)%256,m=(m+h[b])%256;var S=h[b];h[b]=h[m],h[m]=S,A|=h[(h[b]+h[m])%256]<<24-_*8}return this._i=b,this._j=m,A}n.RC4=o._createHelper(s);var l=a.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var h=this.cfg.drop;h>0;h--)u.call(this)}});n.RC4Drop=o._createHelper(l)}(),t.RC4})}(If)),If.exports}var Df={exports:{}},Yh;function Ky(){return Yh||(Yh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],u=[],l=[],h=a.Rabbit=o.extend({_doReset:function(){for(var m=this._key.words,A=this.cfg.iv,_=0;_<4;_++)m[_]=(m[_]<<8|m[_]>>>24)&16711935|(m[_]<<24|m[_]>>>8)&4278255360;var S=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],C=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var _=0;_<4;_++)b.call(this);for(var _=0;_<8;_++)C[_]^=S[_+4&7];if(A){var M=A.words,B=M[0],P=M[1],R=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,I=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,D=R>>>16|I&4294901760,O=I<<16|R&65535;C[0]^=R,C[1]^=D,C[2]^=I,C[3]^=O,C[4]^=R,C[5]^=D,C[6]^=I,C[7]^=O;for(var _=0;_<4;_++)b.call(this)}},_doProcessBlock:function(m,A){var _=this._X;b.call(this),s[0]=_[0]^_[5]>>>16^_[3]<<16,s[1]=_[2]^_[7]>>>16^_[5]<<16,s[2]=_[4]^_[1]>>>16^_[7]<<16,s[3]=_[6]^_[3]>>>16^_[1]<<16;for(var S=0;S<4;S++)s[S]=(s[S]<<8|s[S]>>>24)&16711935|(s[S]<<24|s[S]>>>8)&4278255360,m[A+S]^=s[S]},blockSize:128/32,ivSize:64/32});function b(){for(var m=this._X,A=this._C,_=0;_<8;_++)u[_]=A[_];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0>>0?1:0)|0,this._b=A[7]>>>0>>0?1:0;for(var _=0;_<8;_++){var S=m[_]+A[_],C=S&65535,M=S>>>16,B=((C*C>>>17)+C*M>>>15)+M*M,P=((S&4294901760)*S|0)+((S&65535)*S|0);l[_]=B^P}m[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,m[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,m[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,m[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,m[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,m[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,m[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,m[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}n.Rabbit=o._createHelper(h)}(),t.Rabbit})}(Df)),Df.exports}var Of={exports:{}},Zh;function Qy(){return Zh||(Zh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],u=[],l=[],h=a.RabbitLegacy=o.extend({_doReset:function(){var m=this._key.words,A=this.cfg.iv,_=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],S=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var C=0;C<4;C++)b.call(this);for(var C=0;C<8;C++)S[C]^=_[C+4&7];if(A){var M=A.words,B=M[0],P=M[1],R=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,I=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,D=R>>>16|I&4294901760,O=I<<16|R&65535;S[0]^=R,S[1]^=D,S[2]^=I,S[3]^=O,S[4]^=R,S[5]^=D,S[6]^=I,S[7]^=O;for(var C=0;C<4;C++)b.call(this)}},_doProcessBlock:function(m,A){var _=this._X;b.call(this),s[0]=_[0]^_[5]>>>16^_[3]<<16,s[1]=_[2]^_[7]>>>16^_[5]<<16,s[2]=_[4]^_[1]>>>16^_[7]<<16,s[3]=_[6]^_[3]>>>16^_[1]<<16;for(var S=0;S<4;S++)s[S]=(s[S]<<8|s[S]>>>24)&16711935|(s[S]<<24|s[S]>>>8)&4278255360,m[A+S]^=s[S]},blockSize:128/32,ivSize:64/32});function b(){for(var m=this._X,A=this._C,_=0;_<8;_++)u[_]=A[_];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0>>0?1:0)|0,this._b=A[7]>>>0>>0?1:0;for(var _=0;_<8;_++){var S=m[_]+A[_],C=S&65535,M=S>>>16,B=((C*C>>>17)+C*M>>>15)+M*M,P=((S&4294901760)*S|0)+((S&65535)*S|0);l[_]=B^P}m[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,m[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,m[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,m[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,m[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,m[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,m[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,m[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}n.RabbitLegacy=o._createHelper(h)}(),t.RabbitLegacy})}(Of)),Of.exports}(function(r,e){(function(t,n,i){r.exports=n(st(),Ss(),Sy(),By(),J0(),My(),H0(),Tl(),xx(),ky(),bx(),Py(),Ry(),Ny(),Il(),Fy(),e0(),cr(),Ty(),Iy(),Dy(),Oy(),Ly(),Uy(),Jy(),Hy(),Gy(),zy(),jy(),Xy(),qy(),Vy(),Ky(),Qy())})(Be,function(t){return t})})(px);const $h=px.exports;function gx(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let G0=gx();function Wy(r){G0=r}const Yy=/[&<>"']/,Zy=/[&<>"']/g,$y=/[<>"']|&(?!#?\w+;)/,e4=/[<>"']|&(?!#?\w+;)/g,t4={"&":"&","<":"<",">":">",'"':""","'":"'"},ed=r=>t4[r];function Vt(r,e){if(e){if(Yy.test(r))return r.replace(Zy,ed)}else if($y.test(r))return r.replace(e4,ed);return r}const r4=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function mx(r){return r.replace(r4,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const n4=/(^|[^\[])\^/g;function vt(r,e){r=typeof r=="string"?r:r.source,e=e||"";const t={replace:(n,i)=>(i=i.source||i,i=i.replace(n4,"$1"),r=r.replace(n,i),t),getRegex:()=>new RegExp(r,e)};return t}const i4=/[^\w:]/g,o4=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function td(r,e,t){if(r){let n;try{n=decodeURIComponent(mx(t)).replace(i4,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!o4.test(t)&&(t=c4(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const sa={},a4=/^[^:]+:\/*[^/]*$/,s4=/^([^:]+:)[\s\S]*$/,f4=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c4(r,e){sa[" "+r]||(a4.test(r)?sa[" "+r]=r+"/":sa[" "+r]=_a(r,"/",!0)),r=sa[" "+r];const t=r.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:r.replace(s4,"$1")+e:e.charAt(0)==="/"?t?e:r.replace(f4,"$1")+e:r+e}const Ya={exec:function(){}};function un(r){let e=1,t,n;for(;e{let u=!1,l=a;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),n=t.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length1;)e&1&&(t+=r),e>>=1,r+=r;return t+r}function id(r,e,t,n){const i=e.href,o=e.title?Vt(e.title):null,a=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){n.state.inLink=!0;const s={type:"link",raw:t,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,s}return{type:"image",raw:t,href:i,title:o,text:Vt(a)}}function u4(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(` + */return t.mode.CTRGladman=function(){var n=t.lib.BlockCipherMode.extend();function i(s){if((s>>24&255)===255){var u=s>>16&255,l=s>>8&255,h=s&255;u===255?(u=0,l===255?(l=0,h===255?h=0:++h):++l):++u,s=0,s+=u<<16,s+=l<<8,s+=h}else s+=1<<24;return s}function o(s){return(s[0]=i(s[0]))===0&&(s[1]=i(s[1])),s}var a=n.Encryptor=n.extend({processBlock:function(s,u){var l=this._cipher,h=l.blockSize,b=this._iv,m=this._counter;b&&(m=this._counter=b.slice(0),this._iv=void 0),o(m);var A=m.slice(0);l.encryptBlock(A,0);for(var _=0;_>>2]|=s<<24-u%4*8,n.sigBytes+=s},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},t.pad.Ansix923})}(Bf)),Bf.exports}var Mf={exports:{}},zh;function Gy(){return zh||(zh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.Iso10126={pad:function(n,i){var o=i*4,a=o-n.sigBytes%o;n.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},t.pad.Iso10126})}(Mf)),Mf.exports}var kf={exports:{}},jh;function zy(){return jh||(jh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.Iso97971={pad:function(n,i){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,i)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(kf)),kf.exports}var Pf={exports:{}},Xh;function jy(){return Xh||(Xh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.ZeroPadding={pad:function(n,i){var o=i*4;n.clamp(),n.sigBytes+=o-(n.sigBytes%o||o)},unpad:function(n){for(var i=n.words,o=n.sigBytes-1,o=n.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){n.sigBytes=o+1;break}}},t.pad.ZeroPadding})}(Pf)),Pf.exports}var Rf={exports:{}},qh;function Xy(){return qh||(qh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(Rf)),Rf.exports}var Nf={exports:{}},Vh;function qy(){return Vh||(Vh=1,function(r,e){(function(t,n,i){r.exports=n(st(),cr())})(Be,function(t){return function(n){var i=t,o=i.lib,a=o.CipherParams,s=i.enc,u=s.Hex,l=i.format;l.Hex={stringify:function(h){return h.ciphertext.toString(u)},parse:function(h){var b=u.parse(h);return a.create({ciphertext:b})}}}(),t.format.Hex})}(Nf)),Nf.exports}var Ff={exports:{}},Kh;function Vy(){return Kh||(Kh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.BlockCipher,a=n.algo,s=[],u=[],l=[],h=[],b=[],m=[],A=[],_=[],S=[],C=[];(function(){for(var P=[],R=0;R<256;R++)R<128?P[R]=R<<1:P[R]=R<<1^283;for(var I=0,D=0,R=0;R<256;R++){var O=D^D<<1^D<<2^D<<3^D<<4;O=O>>>8^O&255^99,s[I]=O,u[O]=I;var J=P[I],X=P[J],H=P[X],L=P[O]*257^O*16843008;l[I]=L<<24|L>>>8,h[I]=L<<16|L>>>16,b[I]=L<<8|L>>>24,m[I]=L;var L=H*16843009^X*65537^J*257^I*16843008;A[O]=L<<24|L>>>8,_[O]=L<<16|L>>>16,S[O]=L<<8|L>>>24,C[O]=L,I?(I=J^P[P[P[H^J]]],D^=P[P[D]]):I=D=1}})();var M=[0,1,2,4,8,16,32,64,128,27,54],B=a.AES=o.extend({_doReset:function(){var P;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var R=this._keyPriorReset=this._key,I=R.words,D=R.sigBytes/4,O=this._nRounds=D+6,J=(O+1)*4,X=this._keySchedule=[],H=0;H6&&H%D==4&&(P=s[P>>>24]<<24|s[P>>>16&255]<<16|s[P>>>8&255]<<8|s[P&255]):(P=P<<8|P>>>24,P=s[P>>>24]<<24|s[P>>>16&255]<<16|s[P>>>8&255]<<8|s[P&255],P^=M[H/D|0]<<24),X[H]=X[H-D]^P);for(var L=this._invKeySchedule=[],j=0;j>>24]]^_[s[P>>>16&255]]^S[s[P>>>8&255]]^C[s[P&255]]}}},encryptBlock:function(P,R){this._doCryptBlock(P,R,this._keySchedule,l,h,b,m,s)},decryptBlock:function(P,R){var I=P[R+1];P[R+1]=P[R+3],P[R+3]=I,this._doCryptBlock(P,R,this._invKeySchedule,A,_,S,C,u);var I=P[R+1];P[R+1]=P[R+3],P[R+3]=I},_doCryptBlock:function(P,R,I,D,O,J,X,H){for(var L=this._nRounds,j=P[R]^I[0],v=P[R+1]^I[1],f=P[R+2]^I[2],p=P[R+3]^I[3],g=4,w=1;w>>24]^O[v>>>16&255]^J[f>>>8&255]^X[p&255]^I[g++],k=D[v>>>24]^O[f>>>16&255]^J[p>>>8&255]^X[j&255]^I[g++],F=D[f>>>24]^O[p>>>16&255]^J[j>>>8&255]^X[v&255]^I[g++],x=D[p>>>24]^O[j>>>16&255]^J[v>>>8&255]^X[f&255]^I[g++];j=E,v=k,f=F,p=x}var E=(H[j>>>24]<<24|H[v>>>16&255]<<16|H[f>>>8&255]<<8|H[p&255])^I[g++],k=(H[v>>>24]<<24|H[f>>>16&255]<<16|H[p>>>8&255]<<8|H[j&255])^I[g++],F=(H[f>>>24]<<24|H[p>>>16&255]<<16|H[j>>>8&255]<<8|H[v&255])^I[g++],x=(H[p>>>24]<<24|H[j>>>16&255]<<16|H[v>>>8&255]<<8|H[f&255])^I[g++];P[R]=E,P[R+1]=k,P[R+2]=F,P[R+3]=x},keySize:256/32});n.AES=o._createHelper(B)}(),t.AES})}(Ff)),Ff.exports}var Tf={exports:{}},Qh;function Ky(){return Qh||(Qh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.WordArray,a=i.BlockCipher,s=n.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],b=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],A=s.DES=a.extend({_doReset:function(){for(var M=this._key,B=M.words,P=[],R=0;R<56;R++){var I=u[R]-1;P[R]=B[I>>>5]>>>31-I%32&1}for(var D=this._subKeys=[],O=0;O<16;O++){for(var J=D[O]=[],X=h[O],R=0;R<24;R++)J[R/6|0]|=P[(l[R]-1+X)%28]<<31-R%6,J[4+(R/6|0)]|=P[28+(l[R+24]-1+X)%28]<<31-R%6;J[0]=J[0]<<1|J[0]>>>31;for(var R=1;R<7;R++)J[R]=J[R]>>>(R-1)*4+3;J[7]=J[7]<<5|J[7]>>>27}for(var H=this._invSubKeys=[],R=0;R<16;R++)H[R]=D[15-R]},encryptBlock:function(M,B){this._doCryptBlock(M,B,this._subKeys)},decryptBlock:function(M,B){this._doCryptBlock(M,B,this._invSubKeys)},_doCryptBlock:function(M,B,P){this._lBlock=M[B],this._rBlock=M[B+1],_.call(this,4,252645135),_.call(this,16,65535),S.call(this,2,858993459),S.call(this,8,16711935),_.call(this,1,1431655765);for(var R=0;R<16;R++){for(var I=P[R],D=this._lBlock,O=this._rBlock,J=0,X=0;X<8;X++)J|=b[X][((O^I[X])&m[X])>>>0];this._lBlock=O,this._rBlock=D^J}var H=this._lBlock;this._lBlock=this._rBlock,this._rBlock=H,_.call(this,1,1431655765),S.call(this,8,16711935),S.call(this,2,858993459),_.call(this,16,65535),_.call(this,4,252645135),M[B]=this._lBlock,M[B+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function _(M,B){var P=(this._lBlock>>>M^this._rBlock)&B;this._rBlock^=P,this._lBlock^=P<>>M^this._lBlock)&B;this._lBlock^=P,this._rBlock^=P<192.");var P=B.slice(0,2),R=B.length<4?B.slice(0,2):B.slice(2,4),I=B.length<6?B.slice(0,2):B.slice(4,6);this._des1=A.createEncryptor(o.create(P)),this._des2=A.createEncryptor(o.create(R)),this._des3=A.createEncryptor(o.create(I))},encryptBlock:function(M,B){this._des1.encryptBlock(M,B),this._des2.decryptBlock(M,B),this._des3.encryptBlock(M,B)},decryptBlock:function(M,B){this._des3.decryptBlock(M,B),this._des2.encryptBlock(M,B),this._des1.decryptBlock(M,B)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=a._createHelper(C)}(),t.TripleDES})}(Tf)),Tf.exports}var If={exports:{}},Wh;function Qy(){return Wh||(Wh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=a.RC4=o.extend({_doReset:function(){for(var h=this._key,b=h.words,m=h.sigBytes,A=this._S=[],_=0;_<256;_++)A[_]=_;for(var _=0,S=0;_<256;_++){var C=_%m,M=b[C>>>2]>>>24-C%4*8&255;S=(S+A[_]+M)%256;var B=A[_];A[_]=A[S],A[S]=B}this._i=this._j=0},_doProcessBlock:function(h,b){h[b]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var h=this._S,b=this._i,m=this._j,A=0,_=0;_<4;_++){b=(b+1)%256,m=(m+h[b])%256;var S=h[b];h[b]=h[m],h[m]=S,A|=h[(h[b]+h[m])%256]<<24-_*8}return this._i=b,this._j=m,A}n.RC4=o._createHelper(s);var l=a.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var h=this.cfg.drop;h>0;h--)u.call(this)}});n.RC4Drop=o._createHelper(l)}(),t.RC4})}(If)),If.exports}var Df={exports:{}},Yh;function Wy(){return Yh||(Yh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],u=[],l=[],h=a.Rabbit=o.extend({_doReset:function(){for(var m=this._key.words,A=this.cfg.iv,_=0;_<4;_++)m[_]=(m[_]<<8|m[_]>>>24)&16711935|(m[_]<<24|m[_]>>>8)&4278255360;var S=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],C=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var _=0;_<4;_++)b.call(this);for(var _=0;_<8;_++)C[_]^=S[_+4&7];if(A){var M=A.words,B=M[0],P=M[1],R=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,I=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,D=R>>>16|I&4294901760,O=I<<16|R&65535;C[0]^=R,C[1]^=D,C[2]^=I,C[3]^=O,C[4]^=R,C[5]^=D,C[6]^=I,C[7]^=O;for(var _=0;_<4;_++)b.call(this)}},_doProcessBlock:function(m,A){var _=this._X;b.call(this),s[0]=_[0]^_[5]>>>16^_[3]<<16,s[1]=_[2]^_[7]>>>16^_[5]<<16,s[2]=_[4]^_[1]>>>16^_[7]<<16,s[3]=_[6]^_[3]>>>16^_[1]<<16;for(var S=0;S<4;S++)s[S]=(s[S]<<8|s[S]>>>24)&16711935|(s[S]<<24|s[S]>>>8)&4278255360,m[A+S]^=s[S]},blockSize:128/32,ivSize:64/32});function b(){for(var m=this._X,A=this._C,_=0;_<8;_++)u[_]=A[_];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0>>0?1:0)|0,this._b=A[7]>>>0>>0?1:0;for(var _=0;_<8;_++){var S=m[_]+A[_],C=S&65535,M=S>>>16,B=((C*C>>>17)+C*M>>>15)+M*M,P=((S&4294901760)*S|0)+((S&65535)*S|0);l[_]=B^P}m[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,m[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,m[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,m[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,m[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,m[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,m[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,m[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}n.Rabbit=o._createHelper(h)}(),t.Rabbit})}(Df)),Df.exports}var Of={exports:{}},Zh;function Yy(){return Zh||(Zh=1,function(r,e){(function(t,n,i){r.exports=n(st(),J0(),H0(),e0(),cr())})(Be,function(t){return function(){var n=t,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],u=[],l=[],h=a.RabbitLegacy=o.extend({_doReset:function(){var m=this._key.words,A=this.cfg.iv,_=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],S=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var C=0;C<4;C++)b.call(this);for(var C=0;C<8;C++)S[C]^=_[C+4&7];if(A){var M=A.words,B=M[0],P=M[1],R=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,I=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,D=R>>>16|I&4294901760,O=I<<16|R&65535;S[0]^=R,S[1]^=D,S[2]^=I,S[3]^=O,S[4]^=R,S[5]^=D,S[6]^=I,S[7]^=O;for(var C=0;C<4;C++)b.call(this)}},_doProcessBlock:function(m,A){var _=this._X;b.call(this),s[0]=_[0]^_[5]>>>16^_[3]<<16,s[1]=_[2]^_[7]>>>16^_[5]<<16,s[2]=_[4]^_[1]>>>16^_[7]<<16,s[3]=_[6]^_[3]>>>16^_[1]<<16;for(var S=0;S<4;S++)s[S]=(s[S]<<8|s[S]>>>24)&16711935|(s[S]<<24|s[S]>>>8)&4278255360,m[A+S]^=s[S]},blockSize:128/32,ivSize:64/32});function b(){for(var m=this._X,A=this._C,_=0;_<8;_++)u[_]=A[_];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0>>0?1:0)|0,this._b=A[7]>>>0>>0?1:0;for(var _=0;_<8;_++){var S=m[_]+A[_],C=S&65535,M=S>>>16,B=((C*C>>>17)+C*M>>>15)+M*M,P=((S&4294901760)*S|0)+((S&65535)*S|0);l[_]=B^P}m[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,m[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,m[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,m[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,m[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,m[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,m[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,m[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}n.RabbitLegacy=o._createHelper(h)}(),t.RabbitLegacy})}(Of)),Of.exports}(function(r,e){(function(t,n,i){r.exports=n(st(),Ss(),My(),ky(),J0(),Py(),H0(),Tl(),bx(),Ry(),gx(),Ny(),Fy(),Ty(),Il(),Iy(),e0(),cr(),Dy(),Oy(),Ly(),Uy(),Jy(),Hy(),Gy(),zy(),jy(),Xy(),qy(),Vy(),Ky(),Qy(),Wy(),Yy())})(Be,function(t){return t})})(xx);const $h=xx.exports;function mx(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let G0=mx();function Zy(r){G0=r}const $y=/[&<>"']/,e4=/[&<>"']/g,t4=/[<>"']|&(?!#?\w+;)/,r4=/[<>"']|&(?!#?\w+;)/g,n4={"&":"&","<":"<",">":">",'"':""","'":"'"},ed=r=>n4[r];function Vt(r,e){if(e){if($y.test(r))return r.replace(e4,ed)}else if(t4.test(r))return r.replace(r4,ed);return r}const i4=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function yx(r){return r.replace(i4,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const o4=/(^|[^\[])\^/g;function vt(r,e){r=typeof r=="string"?r:r.source,e=e||"";const t={replace:(n,i)=>(i=i.source||i,i=i.replace(o4,"$1"),r=r.replace(n,i),t),getRegex:()=>new RegExp(r,e)};return t}const a4=/[^\w:]/g,s4=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function td(r,e,t){if(r){let n;try{n=decodeURIComponent(yx(t)).replace(a4,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!s4.test(t)&&(t=u4(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const sa={},f4=/^[^:]+:\/*[^/]*$/,c4=/^([^:]+:)[\s\S]*$/,l4=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u4(r,e){sa[" "+r]||(f4.test(r)?sa[" "+r]=r+"/":sa[" "+r]=_a(r,"/",!0)),r=sa[" "+r];const t=r.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:r.replace(c4,"$1")+e:e.charAt(0)==="/"?t?e:r.replace(l4,"$1")+e:r+e}const Ya={exec:function(){}};function un(r){let e=1,t,n;for(;e{let u=!1,l=a;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),n=t.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length1;)e&1&&(t+=r),e>>=1,r+=r;return t+r}function id(r,e,t,n){const i=e.href,o=e.title?Vt(e.title):null,a=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){n.state.inLink=!0;const s={type:"link",raw:t,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,s}return{type:"image",raw:t,href:i,title:o,text:Vt(a)}}function d4(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(` `).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[a]=o;return a.length>=n.length?i.slice(n.length):i}).join(` `)}class Dl{constructor(e){this.options=e||G0}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_a(n,` -`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],i=u4(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const i=_a(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,i,o,a,s,u,l,h,b,m,A,_,S=t[1].trim();const C=S.length>1,M={type:"list",raw:"",ordered:C,start:C?+S.slice(0,-1):"",loose:!1,items:[]};S=C?`\\d{1,9}\\${S.slice(-1)}`:`\\${S}`,this.options.pedantic&&(S=C?S:"[*+-]");const B=new RegExp(`^( {0,3}${S})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(_=!1,!(!(t=B.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),h=t[2].split(` +`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],i=d4(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const i=_a(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,i,o,a,s,u,l,h,b,m,A,_,S=t[1].trim();const C=S.length>1,M={type:"list",raw:"",ordered:C,start:C?+S.slice(0,-1):"",loose:!1,items:[]};S=C?`\\d{1,9}\\${S.slice(-1)}`:`\\${S}`,this.options.pedantic&&(S=C?S:"[*+-]");const B=new RegExp(`^( {0,3}${S})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(_=!1,!(!(t=B.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),h=t[2].split(` `,1)[0],b=e.split(` `,1)[0],this.options.pedantic?(a=2,A=h.trimLeft()):(a=t[2].search(/[^ ]/),a=a>4?1:a,A=h.slice(a),a+=t[1].length),u=!1,!h&&/^ *$/.test(b)&&(n+=b+` `,e=e.substring(b.length+1),_=!0),!_){const R=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),I=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),D=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),O=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;e&&(m=e.split(` @@ -46,8 +46,8 @@ var y2=Object.defineProperty;var v2=(r,e,t)=>e in r?y2(r,e,{enumerable:!0,config `,e=e.substring(m.length+1)}}M.loose||(l?M.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(A),i&&(o=i[0]!=="[ ] ",A=A.replace(/^\[[ xX]\] +/,""))),M.items.push({type:"list_item",raw:n,task:!!i,checked:o,loose:!1,text:A}),M.raw+=n}M.items[M.items.length-1].raw=n.trimRight(),M.items[M.items.length-1].text=A.trimRight(),M.raw=M.raw.trimRight();const P=M.items.length;for(s=0;sD.type==="space"),I=R.every(D=>{const O=D.raw.split("");let J=0;for(const X of O)if(X===` `&&(J+=1),J>1)return!0;return!1});!M.loose&&R.length&&I&&(M.loose=!0,M.items[s].loose=!0)}return M}}html(e){const t=this.rules.block.html.exec(e);if(t){const n={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(t[0]):Vt(t[0]);n.type="paragraph",n.text=i,n.tokens=this.lexer.inline(i)}return n}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));const n=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:n,raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const n={type:"table",header:rd(t[1]).map(i=>({text:i})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(n.header.length===n.align.length){n.raw=t[0];let i=n.align.length,o,a,s,u;for(o=0;o({text:l}));for(i=n.header.length,a=0;a/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Vt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const a=_a(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=l4(t[2],"()");if(a>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),id(t,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," ");if(i=t[i.toLowerCase()],!i||!i.href){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return id(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(n===""||this.rules.inline.punctuation.exec(n))){const a=i[0].length-1;let s,u,l=a,h=0;const b=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(b.lastIndex=0,t=t.slice(-1*e.length+a);(i=b.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(u=s.length,i[3]||i[4]){l+=u;continue}else if((i[5]||i[6])&&a%3&&!((a+u)%3)){h+=u;continue}if(l-=u,l>0)continue;if(u=Math.min(u,u+l+h),Math.min(a,u)%2){const A=e.slice(1,a+i.index+u);return{type:"em",raw:e.slice(0,a+i.index+u+1),text:A,tokens:this.lexer.inlineTokens(A)}}const m=e.slice(2,a+i.index+u-1);return{type:"strong",raw:e.slice(0,a+i.index+u+1),text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const i=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return i&&o&&(n=n.substring(1,n.length-1)),n=Vt(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let i,o;return n[2]==="@"?(i=Vt(this.options.mangle?t(n[1]):n[1]),o="mailto:"+i):(i=Vt(n[1]),o=i),{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let i,o;if(n[2]==="@")i=Vt(this.options.mangle?t(n[0]):n[0]),o="mailto:"+i;else{let a;do a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(a!==n[0]);i=Vt(n[0]),n[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Vt(n[0]):n[0]:i=Vt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}}}}const Ge={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ya,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ge._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ge._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ge.def=vt(Ge.def).replace("label",Ge._label).replace("title",Ge._title).getRegex();Ge.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ge.listItemStart=vt(/^( *)(bull) */).replace("bull",Ge.bullet).getRegex();Ge.list=vt(Ge.list).replace(/bull/g,Ge.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ge.def.source+")").getRegex();Ge._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ge._comment=/|$)/;Ge.html=vt(Ge.html,"i").replace("comment",Ge._comment).replace("tag",Ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ge.paragraph=vt(Ge._paragraph).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.blockquote=vt(Ge.blockquote).replace("paragraph",Ge.paragraph).getRegex();Ge.normal=un({},Ge);Ge.gfm=un({},Ge.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Ge.gfm.table=vt(Ge.gfm.table).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.gfm.paragraph=vt(Ge._paragraph).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ge.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.pedantic=un({},Ge.normal,{html:vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ge._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ya,paragraph:vt(Ge.normal._paragraph).replace("hr",Ge.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Ge.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ya,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ya,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";be.punctuation=vt(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex();be.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;be.escapedEmSt=/\\\*|\\_/g;be._comment=vt(Ge._comment).replace("(?:-->|$)","-->").getRegex();be.emStrong.lDelim=vt(be.emStrong.lDelim).replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimAst=vt(be.emStrong.rDelimAst,"g").replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimUnd=vt(be.emStrong.rDelimUnd,"g").replace(/punct/g,be._punctuation).getRegex();be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;be._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;be.autolink=vt(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex();be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;be.tag=vt(be.tag).replace("comment",be._comment).replace("attribute",be._attribute).getRegex();be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;be._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;be.link=vt(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex();be.reflink=vt(be.reflink).replace("label",be._label).replace("ref",Ge._label).getRegex();be.nolink=vt(be.nolink).replace("ref",Ge._label).getRegex();be.reflinkSearch=vt(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex();be.normal=un({},be);be.pedantic=un({},be.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:vt(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()});be.gfm=un({},be.normal,{escape:vt(be.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),e+="&#"+n+";";return e}class Zn{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G0,this.options.tokenizer=this.options.tokenizer||new Dl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Ge.normal,inline:be.normal};this.options.pedantic?(t.block=Ge.pedantic,t.inline=be.pedantic):this.options.gfm&&(t.block=Ge.gfm,this.options.breaks?t.inline=be.breaks:t.inline=be.gfm),this.tokenizer.rules=t}static get rules(){return{block:Ge,inline:be}}static lex(e,t){return new Zn(t).lex(e)}static lexInline(e,t){return new Zn(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Vt(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Vt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const a=_a(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=h4(t[2],"()");if(a>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),id(t,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," ");if(i=t[i.toLowerCase()],!i||!i.href){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return id(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(n===""||this.rules.inline.punctuation.exec(n))){const a=i[0].length-1;let s,u,l=a,h=0;const b=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(b.lastIndex=0,t=t.slice(-1*e.length+a);(i=b.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(u=s.length,i[3]||i[4]){l+=u;continue}else if((i[5]||i[6])&&a%3&&!((a+u)%3)){h+=u;continue}if(l-=u,l>0)continue;if(u=Math.min(u,u+l+h),Math.min(a,u)%2){const A=e.slice(1,a+i.index+u);return{type:"em",raw:e.slice(0,a+i.index+u+1),text:A,tokens:this.lexer.inlineTokens(A)}}const m=e.slice(2,a+i.index+u-1);return{type:"strong",raw:e.slice(0,a+i.index+u+1),text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const i=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return i&&o&&(n=n.substring(1,n.length-1)),n=Vt(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let i,o;return n[2]==="@"?(i=Vt(this.options.mangle?t(n[1]):n[1]),o="mailto:"+i):(i=Vt(n[1]),o=i),{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let i,o;if(n[2]==="@")i=Vt(this.options.mangle?t(n[0]):n[0]),o="mailto:"+i;else{let a;do a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(a!==n[0]);i=Vt(n[0]),n[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Vt(n[0]):n[0]:i=Vt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}}}}const Ge={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ya,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ge._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ge._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ge.def=vt(Ge.def).replace("label",Ge._label).replace("title",Ge._title).getRegex();Ge.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ge.listItemStart=vt(/^( *)(bull) */).replace("bull",Ge.bullet).getRegex();Ge.list=vt(Ge.list).replace(/bull/g,Ge.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ge.def.source+")").getRegex();Ge._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ge._comment=/|$)/;Ge.html=vt(Ge.html,"i").replace("comment",Ge._comment).replace("tag",Ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ge.paragraph=vt(Ge._paragraph).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.blockquote=vt(Ge.blockquote).replace("paragraph",Ge.paragraph).getRegex();Ge.normal=un({},Ge);Ge.gfm=un({},Ge.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Ge.gfm.table=vt(Ge.gfm.table).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.gfm.paragraph=vt(Ge._paragraph).replace("hr",Ge.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ge.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ge._tag).getRegex();Ge.pedantic=un({},Ge.normal,{html:vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ge._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ya,paragraph:vt(Ge.normal._paragraph).replace("hr",Ge.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Ge.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ya,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ya,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";be.punctuation=vt(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex();be.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;be.escapedEmSt=/\\\*|\\_/g;be._comment=vt(Ge._comment).replace("(?:-->|$)","-->").getRegex();be.emStrong.lDelim=vt(be.emStrong.lDelim).replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimAst=vt(be.emStrong.rDelimAst,"g").replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimUnd=vt(be.emStrong.rDelimUnd,"g").replace(/punct/g,be._punctuation).getRegex();be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;be._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;be.autolink=vt(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex();be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;be.tag=vt(be.tag).replace("comment",be._comment).replace("attribute",be._attribute).getRegex();be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;be._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;be.link=vt(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex();be.reflink=vt(be.reflink).replace("label",be._label).replace("ref",Ge._label).getRegex();be.nolink=vt(be.nolink).replace("ref",Ge._label).getRegex();be.reflinkSearch=vt(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex();be.normal=un({},be);be.pedantic=un({},be.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:vt(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()});be.gfm=un({},be.normal,{escape:vt(be.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),e+="&#"+n+";";return e}class Zn{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G0,this.options.tokenizer=this.options.tokenizer||new Dl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Ge.normal,inline:be.normal};this.options.pedantic?(t.block=Ge.pedantic,t.inline=be.pedantic):this.options.gfm&&(t.block=Ge.gfm,this.options.breaks?t.inline=be.breaks:t.inline=be.gfm),this.tokenizer.rules=t}static get rules(){return{block:Ge,inline:be}}static lex(e,t){return new Zn(t).lex(e)}static lexInline(e,t){return new Zn(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,` `),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(s,u,l)=>u+" ".repeat(l.length));let n,i,o,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(n=s.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=` `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+n.raw,i.text+=` @@ -57,7 +57,7 @@ var y2=Object.defineProperty;var v2=(r,e,t)=>e in r?y2(r,e,{enumerable:!0,config `+n.raw,i.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n),a=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&i.type==="text"?(i.raw+=` `+n.raw,i.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,i,o,a=e,s,u,l;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+nd("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+nd("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(u||(l=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,l)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,od)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,od))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const b=e.slice(1);let m;this.options.extensions.startInline.forEach(function(A){m=A.call({lexer:this},b),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(o=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(o,h4)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(l=n.raw.slice(-1)),u=!0,i=t[t.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}}class Ol{constructor(e){this.options=e||G0}code(e,t,n){const i=(t||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(e,i);o!=null&&o!==e&&(n=!0,e=o)}return e=e.replace(/\n$/,"")+` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,i,o,a=e,s,u,l;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+nd("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+nd("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(u||(l=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,l)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,od)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,od))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const b=e.slice(1);let m;this.options.extensions.startInline.forEach(function(A){m=A.call({lexer:this},b),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(o=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(o,p4)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(l=n.raw.slice(-1)),u=!0,i=t[t.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}}class Ol{constructor(e){this.options=e||G0}code(e,t,n){const i=(t||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(e,i);o!=null&&o!==e&&(n=!0,e=o)}return e=e.replace(/\n$/,"")+` `,i?'
'+(n?e:Vt(e,!0))+`
`:"
"+(n?e:Vt(e,!0))+`
`}blockquote(e){return`
@@ -77,43 +77,43 @@ ${e}
`}tablerow(e){return` ${e} `}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` -`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
":"
"}del(e){return`${e}`}link(e,t,n){if(e=td(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i='
",i}image(e,t,n){if(e=td(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i=`${n}":">",i}text(e){return e}}class vx{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class wx{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do i++,n=e+"-"+i;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class kn{constructor(e){this.options=e||G0,this.options.renderer=this.options.renderer||new Ol,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new vx,this.slugger=new wx}static parse(e,t){return new kn(t).parse(e)}static parseInline(e,t){return new kn(t).parseInline(e)}parse(e,t=!0){let n="",i,o,a,s,u,l,h,b,m,A,_,S,C,M,B,P,R,I,D;const O=e.length;for(i=0;i0&&B.tokens[0].type==="paragraph"?(B.tokens[0].text=I+" "+B.tokens[0].text,B.tokens[0].tokens&&B.tokens[0].tokens.length>0&&B.tokens[0].tokens[0].type==="text"&&(B.tokens[0].tokens[0].text=I+" "+B.tokens[0].tokens[0].text)):B.tokens.unshift({type:"text",text:I}):M+=I),M+=this.parse(B.tokens,C),m+=this.renderer.listitem(M,R,P);n+=this.renderer.list(m,_,S);continue}case"html":{n+=this.renderer.html(A.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(A.tokens));continue}case"text":{for(m=A.tokens?this.parseInline(A.tokens):A.text;i+1"u"||r===null)throw new Error("marked(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=un({},Qe.defaults,e||{}),yx(e),t){const i=e.highlight;let o;try{o=Zn.lex(r,e)}catch(u){return t(u)}const a=function(u){let l;if(!u)try{e.walkTokens&&Qe.walkTokens(o,e.walkTokens),l=kn.parse(o,e)}catch(h){u=h}return e.highlight=i,u?t(u):t(null,l)};if(!i||i.length<3||(delete e.highlight,!o.length))return a();let s=0;Qe.walkTokens(o,function(u){u.type==="code"&&(s++,setTimeout(()=>{i(u.text,u.lang,function(l,h){if(l)return a(l);h!=null&&h!==u.text&&(u.text=h,u.escaped=!0),s--,s===0&&a()})},0))}),s===0&&a();return}function n(i){if(i.message+=` -Please report this to https://github.com/markedjs/marked.`,e.silent)return"

An error occurred:

"+Vt(i.message+"",!0)+"
";throw i}try{const i=Zn.lex(r,e);if(e.walkTokens){if(e.async)return Promise.all(Qe.walkTokens(i,e.walkTokens)).then(()=>kn.parse(i,e)).catch(n);Qe.walkTokens(i,e.walkTokens)}return kn.parse(i,e)}catch(i){n(i)}}Qe.options=Qe.setOptions=function(r){return un(Qe.defaults,r),Wy(Qe.defaults),Qe};Qe.getDefaults=gx;Qe.defaults=G0;Qe.use=function(...r){const e=un({},...r),t=Qe.defaults.extensions||{renderers:{},childTokens:{}};let n;r.forEach(i=>{if(i.extensions&&(n=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const a=t.renderers?t.renderers[o.name]:null;a?t.renderers[o.name]=function(...s){let u=o.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)})),i.renderer){const o=Qe.defaults.renderer||new Ol;for(const a in i.renderer){const s=o[a];o[a]=(...u)=>{let l=i.renderer[a].apply(o,u);return l===!1&&(l=s.apply(o,u)),l}}e.renderer=o}if(i.tokenizer){const o=Qe.defaults.tokenizer||new Dl;for(const a in i.tokenizer){const s=o[a];o[a]=(...u)=>{let l=i.tokenizer[a].apply(o,u);return l===!1&&(l=s.apply(o,u)),l}}e.tokenizer=o}if(i.walkTokens){const o=Qe.defaults.walkTokens;e.walkTokens=function(a){let s=[];return s.push(i.walkTokens.call(this,a)),o&&(s=s.concat(o.call(this,a))),s}}n&&(e.extensions=t),Qe.setOptions(e)})};Qe.walkTokens=function(r,e){let t=[];for(const n of r)switch(t=t.concat(e.call(Qe,n)),n.type){case"table":{for(const i of n.header)t=t.concat(Qe.walkTokens(i.tokens,e));for(const i of n.rows)for(const o of i)t=t.concat(Qe.walkTokens(o.tokens,e));break}case"list":{t=t.concat(Qe.walkTokens(n.items,e));break}default:Qe.defaults.extensions&&Qe.defaults.extensions.childTokens&&Qe.defaults.extensions.childTokens[n.type]?Qe.defaults.extensions.childTokens[n.type].forEach(function(i){t=t.concat(Qe.walkTokens(n[i],e))}):n.tokens&&(t=t.concat(Qe.walkTokens(n.tokens,e)))}return t};Qe.parseInline=function(r,e){if(typeof r>"u"||r===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");e=un({},Qe.defaults,e||{}),yx(e);try{const t=Zn.lexInline(r,e);return e.walkTokens&&Qe.walkTokens(t,e.walkTokens),kn.parseInline(t,e)}catch(t){if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,e.silent)return"

An error occurred:

"+Vt(t.message+"",!0)+"
";throw t}};Qe.Parser=kn;Qe.parser=kn.parse;Qe.Renderer=Ol;Qe.TextRenderer=vx;Qe.Lexer=Zn;Qe.lexer=Zn.lex;Qe.Tokenizer=Dl;Qe.Slugger=wx;Qe.parse=Qe;Qe.options;Qe.setOptions;Qe.use;Qe.walkTokens;Qe.parseInline;kn.parse;Zn.lex;function Ac(r){return r.substring(0,6)+"\u2026"+r.substring(16,20)}async function Za(r,e){e=e.toLowerCase();const t=Ir.keccak256(Ir.toUtf8Bytes(e)),i=await new mn(t).signMessage(Ir.arrayify(r));return Ir.splitSignature(i)}const d4=["A","B","C","D","E","F","G","H","I","L","M"];async function p4(r,e){function t(o){const a=o.shr(96).toHexString(),s=o.shr(8).mask(80),u=[];for(var l=0;la.chapter-o.chapter||a.keys.filter(s=>s).length-o.keys.filter(s=>s).length),i}const Ax=$p.TreasureHuntCreator.toLowerCase(),Br=Ml(`${Ax}:game`,{}),eo=Ml(`${Ax}:lastTransactionMined`,null),Mr=pr(qr,r=>r?Bl.connect($p.TreasureHuntCreator,r):null,null),x4=pr(Mr,(r,e)=>{if(r){const t=zo(async()=>{const i=await r.getQuestsRootCID();console.log("Update quests root CID",i),e(i)},!0),n=window.setInterval(t,3e4);return t(),()=>window.clearInterval(n)}}),Lf=pr(Mr,(r,e)=>{r&&As(async()=>{e((await r.totalChapters()).toNumber())},!0)}),b4=pr(Mr,(r,e)=>{r&&As(async()=>{e(await r.totalKeys())},!0)},null),Ca=pr([Mr,eo],([r],e)=>{r?As(async()=>{e((await r.currentChapter()).toNumber())},!0):e(null)},null),Gi=Wi(!1),g4=pr([x4,Ca],([r,e],t)=>{if(r&&e!==null){const n=e.toString(),i=E2(Br);n in i||(i[n]={solution:null,questHash:null,questHashLastSeen:null,transactionHash:null},Br.set(i)),console.log("Load new quest",e,i);let o=null;try{e>0&&(o=i[(e-1).toString()].solution)}catch(a){console.error("current quest error",a),Gi.set(!0);return}As(async()=>{const a=`/game-data/${r}/${e}`;let s;try{const u=await fetch(a);console.log("IPFS response:",u),s=await u.text()}catch(u){throw console.log(u),Go}if(o!==null){console.log("solution is",o);const u=Ir.keccak256(Ir.toUtf8Bytes(o));s=$h.AES.decrypt(s,u.toString()).toString($h.enc.Utf8),t(s)}else t(s);i[n].questHash=Ir.keccak256(Ir.toUtf8Bytes(s)),i[n].questHashLastSeen===null&&(i[n].questHashLastSeen=i[n].questHash),Br.set(i)})}}),Uf=pr(g4,r=>r?Qe(r):null);let Jf=-1;const Sa=pr([Mr,b4],([r,e],t)=>{if(window.clearInterval(Jf),r&&e!==null){const n=zo(async()=>{t(await p4(r,e))});return Jf=window.setInterval(n,6e4),n(),()=>window.clearInterval(Jf)}else t(null)}),m4=60*60*1e3,Ex=Wi(Date.now());function _x(){Li.set("ensAddresses",r=>{if(r===null)return{};for(let e in r)r[e].lastUpdate=0;return r},{}),Ex.set(Date.now())}const Hf=pr([dx,Sa,Ex],([r,e],t)=>{r&&e?zo(async()=>{console.log("Task: update ens addresses");const i="ensAddresses",o=Li.getsert(i,{});t(o);for(let a=0;am4){console.log("lookup ENS for address",s);try{const u=await r.lookupAddress(s);if(u){o[s].ensName=u,o[s].lastUpdate=Date.now(),Li.set(i,o),t(o);const l=await r.getAvatar(s);l&&(l.startsWith("ipfs://")?o[s].avatar=`https://gateway.pinata.cloud/ipfs/${l.replace("ipfs://","")}`:l.startsWith("bzz://")?o[s].avatar=`https://bzz.link/bzz/${l.replace("bzz://","")}/`:o[s].avatar=l,o[s].lastUpdate=Date.now(),Li.set(i,o),t(o))}}catch(u){console.error(u)}}o[s].lastUpdate=Date.now(),Li.set(i,o)}})():t({})});const{console:Di}=rs,yr="src/components/Chapter.svelte";function Ec(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("div"),t=Y("p"),t.textContent=`This game stores the session in your browser (no cookie, no login, no +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
":"
"}del(e){return`${e}`}link(e,t,n){if(e=td(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i='
",i}image(e,t,n){if(e=td(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i=`${n}":">",i}text(e){return e}}class wx{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Ax{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do i++,n=e+"-"+i;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class kn{constructor(e){this.options=e||G0,this.options.renderer=this.options.renderer||new Ol,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wx,this.slugger=new Ax}static parse(e,t){return new kn(t).parse(e)}static parseInline(e,t){return new kn(t).parseInline(e)}parse(e,t=!0){let n="",i,o,a,s,u,l,h,b,m,A,_,S,C,M,B,P,R,I,D;const O=e.length;for(i=0;i0&&B.tokens[0].type==="paragraph"?(B.tokens[0].text=I+" "+B.tokens[0].text,B.tokens[0].tokens&&B.tokens[0].tokens.length>0&&B.tokens[0].tokens[0].type==="text"&&(B.tokens[0].tokens[0].text=I+" "+B.tokens[0].tokens[0].text)):B.tokens.unshift({type:"text",text:I}):M+=I),M+=this.parse(B.tokens,C),m+=this.renderer.listitem(M,R,P);n+=this.renderer.list(m,_,S);continue}case"html":{n+=this.renderer.html(A.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(A.tokens));continue}case"text":{for(m=A.tokens?this.parseInline(A.tokens):A.text;i+1"u"||r===null)throw new Error("marked(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=un({},Qe.defaults,e||{}),vx(e),t){const i=e.highlight;let o;try{o=Zn.lex(r,e)}catch(u){return t(u)}const a=function(u){let l;if(!u)try{e.walkTokens&&Qe.walkTokens(o,e.walkTokens),l=kn.parse(o,e)}catch(h){u=h}return e.highlight=i,u?t(u):t(null,l)};if(!i||i.length<3||(delete e.highlight,!o.length))return a();let s=0;Qe.walkTokens(o,function(u){u.type==="code"&&(s++,setTimeout(()=>{i(u.text,u.lang,function(l,h){if(l)return a(l);h!=null&&h!==u.text&&(u.text=h,u.escaped=!0),s--,s===0&&a()})},0))}),s===0&&a();return}function n(i){if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,e.silent)return"

An error occurred:

"+Vt(i.message+"",!0)+"
";throw i}try{const i=Zn.lex(r,e);if(e.walkTokens){if(e.async)return Promise.all(Qe.walkTokens(i,e.walkTokens)).then(()=>kn.parse(i,e)).catch(n);Qe.walkTokens(i,e.walkTokens)}return kn.parse(i,e)}catch(i){n(i)}}Qe.options=Qe.setOptions=function(r){return un(Qe.defaults,r),Zy(Qe.defaults),Qe};Qe.getDefaults=mx;Qe.defaults=G0;Qe.use=function(...r){const e=un({},...r),t=Qe.defaults.extensions||{renderers:{},childTokens:{}};let n;r.forEach(i=>{if(i.extensions&&(n=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const a=t.renderers?t.renderers[o.name]:null;a?t.renderers[o.name]=function(...s){let u=o.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)})),i.renderer){const o=Qe.defaults.renderer||new Ol;for(const a in i.renderer){const s=o[a];o[a]=(...u)=>{let l=i.renderer[a].apply(o,u);return l===!1&&(l=s.apply(o,u)),l}}e.renderer=o}if(i.tokenizer){const o=Qe.defaults.tokenizer||new Dl;for(const a in i.tokenizer){const s=o[a];o[a]=(...u)=>{let l=i.tokenizer[a].apply(o,u);return l===!1&&(l=s.apply(o,u)),l}}e.tokenizer=o}if(i.walkTokens){const o=Qe.defaults.walkTokens;e.walkTokens=function(a){let s=[];return s.push(i.walkTokens.call(this,a)),o&&(s=s.concat(o.call(this,a))),s}}n&&(e.extensions=t),Qe.setOptions(e)})};Qe.walkTokens=function(r,e){let t=[];for(const n of r)switch(t=t.concat(e.call(Qe,n)),n.type){case"table":{for(const i of n.header)t=t.concat(Qe.walkTokens(i.tokens,e));for(const i of n.rows)for(const o of i)t=t.concat(Qe.walkTokens(o.tokens,e));break}case"list":{t=t.concat(Qe.walkTokens(n.items,e));break}default:Qe.defaults.extensions&&Qe.defaults.extensions.childTokens&&Qe.defaults.extensions.childTokens[n.type]?Qe.defaults.extensions.childTokens[n.type].forEach(function(i){t=t.concat(Qe.walkTokens(n[i],e))}):n.tokens&&(t=t.concat(Qe.walkTokens(n.tokens,e)))}return t};Qe.parseInline=function(r,e){if(typeof r>"u"||r===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");e=un({},Qe.defaults,e||{}),vx(e);try{const t=Zn.lexInline(r,e);return e.walkTokens&&Qe.walkTokens(t,e.walkTokens),kn.parseInline(t,e)}catch(t){if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,e.silent)return"

An error occurred:

"+Vt(t.message+"",!0)+"
";throw t}};Qe.Parser=kn;Qe.parser=kn.parse;Qe.Renderer=Ol;Qe.TextRenderer=wx;Qe.Lexer=Zn;Qe.lexer=Zn.lex;Qe.Tokenizer=Dl;Qe.Slugger=Ax;Qe.parse=Qe;Qe.options;Qe.setOptions;Qe.use;Qe.walkTokens;Qe.parseInline;kn.parse;Zn.lex;function Ac(r){return r.substring(0,6)+"\u2026"+r.substring(16,20)}async function Za(r,e){e=e.toLowerCase();const t=Ir.keccak256(Ir.toUtf8Bytes(e)),i=await new mn(t).signMessage(Ir.arrayify(r));return Ir.splitSignature(i)}const x4=["A","B","C","D","E","F","G","H","I","L","M"];async function b4(r,e){function t(o){const a=o.shr(96).toHexString(),s=o.shr(8).mask(80),u=[];for(var l=0;la.chapter-o.chapter||a.keys.filter(s=>s).length-o.keys.filter(s=>s).length),i}const Ex=ex.TreasureHuntCreator.toLowerCase(),Br=Ml(`${Ex}:game`,{}),to=Ml(`${Ex}:lastTransactionMined`,null),Mr=pr(qr,r=>r?Bl.connect(ex.TreasureHuntCreator,r):null,null),g4=pr(Mr,(r,e)=>{if(r){const t=jo(async()=>{const i=await r.getQuestsRootCID();console.log("Update quests root CID",i),e(i)},!0),n=window.setInterval(t,3e4);return t(),()=>window.clearInterval(n)}}),Lf=pr(Mr,(r,e)=>{r&&As(async()=>{e((await r.totalChapters()).toNumber())},!0)}),m4=pr(Mr,(r,e)=>{r&&As(async()=>{e(await r.totalKeys())},!0)},null),Ca=pr([Mr,to],([r],e)=>{r?As(async()=>{e((await r.currentChapter()).toNumber())},!0):e(null)},null),Gi=Wi(!1),y4=pr([g4,Ca],([r,e],t)=>{if(r&&e!==null){const n=e.toString(),i=C2(Br);n in i||(i[n]={solution:null,questHash:null,questHashLastSeen:null,transactionHash:null},Br.set(i)),console.log("Load new quest",e,i);let o=null;try{e>0&&(o=i[(e-1).toString()].solution)}catch(a){console.error("current quest error",a),Gi.set(!0);return}As(async()=>{const a=`/game-data/${r}/${e}`;let s;try{const u=await fetch(a);console.log("IPFS response:",u),s=await u.text()}catch(u){throw console.log(u),zo}if(o!==null){console.log("solution is",o);const u=Ir.keccak256(Ir.toUtf8Bytes(o));s=$h.AES.decrypt(s,u.toString()).toString($h.enc.Utf8),t(s)}else t(s);i[n].questHash=Ir.keccak256(Ir.toUtf8Bytes(s)),i[n].questHashLastSeen===null&&(i[n].questHashLastSeen=i[n].questHash),Br.set(i)})}}),Uf=pr(y4,r=>r?Qe(r):null);let Jf=-1;const Sa=pr([Mr,m4],([r,e],t)=>{if(window.clearInterval(Jf),r&&e!==null){const n=jo(async()=>{t(await b4(r,e))});return Jf=window.setInterval(n,6e4),n(),()=>window.clearInterval(Jf)}else t(null)}),v4=60*60*1e3,_x=Wi(Date.now());function Cx(){Li.set("ensAddresses",r=>{if(r===null)return{};for(let e in r)r[e].lastUpdate=0;return r},{}),_x.set(Date.now())}const Hf=pr([px,Sa,_x],([r,e],t)=>{r&&e?jo(async()=>{console.log("Task: update ens addresses");const i="ensAddresses",o=Li.getsert(i,{});t(o);for(let a=0;av4){console.log("lookup ENS for address",s);try{const u=await r.lookupAddress(s);if(u){o[s].ensName=u,o[s].lastUpdate=Date.now(),Li.set(i,o),t(o);const l=await r.getAvatar(s);l&&(l.startsWith("ipfs://")?o[s].avatar=`https://gateway.pinata.cloud/ipfs/${l.replace("ipfs://","")}`:l.startsWith("bzz://")?o[s].avatar=`https://bzz.link/bzz/${l.replace("bzz://","")}/`:o[s].avatar=l,o[s].lastUpdate=Date.now(),Li.set(i,o),t(o))}}catch(u){console.error(u)}}o[s].lastUpdate=Date.now(),Li.set(i,o)}})():t({})});const{console:Di}=rs,yr="src/components/Chapter.svelte";function Ec(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("div"),t=Y("p"),t.textContent=`This game stores the session in your browser (no cookie, no login, no recover password). Be aware that if you use incognito you might lose your progress.`,n=he(),i=Y("p"),o=Y("strong"),a=$e(`The game uses a burner wallet and runs on the Sepolia test network, - check your address in the `),s=Y("a"),s.textContent="settings",u=$e(" page."),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,38,4,1084),ne(s,"href","#/settings"),ne(s,"class","s-6-tURBQVAPMl"),Z(s,yr,46,34,1402),ne(o,"class","s-6-tURBQVAPMl"),Z(o,yr,44,6,1283),ne(i,"class","s-6-tURBQVAPMl"),Z(i,yr,43,4,1273),ne(e,"class","thc--notification warning s-6-tURBQVAPMl"),Z(e,yr,37,2,1040)},m:function(b,m){$(b,e,m),re(e,t),re(e,n),re(e,i),re(i,o),re(o,a),re(o,s),re(o,u)},d:function(b){b&&ee(e)}};return ue("SvelteRegisterBlock",{block:l,id:Ec.name,type:"if",source:"(37:0) {#if currentChapter === 0}",ctx:r}),l}function _c(r){let e,t,n,i,o,a,s,u,l,h,b=r[5]==="waiting"&&Cc(r),m=r[5]==="error"&&Sc(r);const A={c:function(){e=Y("div"),t=Y("p"),t.textContent="Your wallet is low in balance, refill it to play the game",n=he(),b&&b.c(),i=he(),m&&m.c(),o=he(),a=Y("button"),s=$e("Refill Wallet (it's free!)"),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,59,6,1664),a.disabled=u=r[5]!==null,ne(a,"class","s-6-tURBQVAPMl"),Z(a,yr,66,6,1952),ne(e,"class","thc--notification warning s-6-tURBQVAPMl"),Z(e,yr,58,4,1618)},m:function(S,C){$(S,e,C),re(e,t),re(e,n),b&&b.m(e,null),re(e,i),m&&m.m(e,null),re(e,o),re(e,a),re(a,s),l||(h=Qt(a,"click",r[6],!1,!1,!1),l=!0)},p:function(S,C){S[5]==="waiting"?b||(b=Cc(S),b.c(),b.m(e,i)):b&&(b.d(1),b=null),S[5]==="error"?m||(m=Sc(S),m.c(),m.m(e,o)):m&&(m.d(1),m=null),C&32&&u!==(u=S[5]!==null)&&ji(a,"disabled",u)},d:function(S){S&&ee(e),b&&b.d(),m&&m.d(),l=!1,h()}};return ue("SvelteRegisterBlock",{block:A,id:_c.name,type:"if",source:"(58:2) {#if lowBalance}",ctx:r}),A}function Cc(r){let e;const t={c:function(){e=Y("p"),e.textContent="Please wait, it may take up to 15 seconds",ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,61,8,1782)},m:function(i,o){$(i,e,o)},d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Cc.name,type:"if",source:'(61:6) {#if refillWalletStatus === \\"waiting\\"}',ctx:r}),t}function Sc(r){let e;const t={c:function(){e=Y("p"),e.textContent="There was an error, please retry",ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,64,8,1894)},m:function(i,o){$(i,e,o)},d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Sc.name,type:"if",source:'(64:6) {#if refillWalletStatus === \\"error\\"}',ctx:r}),t}function Bc(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("form"),t=Y("input"),n=he(),i=Y("button"),o=$e("Submit"),t.disabled=r[3],ne(t,"placeholder","solution to the puzzle"),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,74,6,2193),i.disabled=a=r[3]||r[4].length===0,ne(i,"type","submit"),ne(i,"class","s-6-tURBQVAPMl"),Z(i,yr,79,6,2320),ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,73,4,2144)},m:function(b,m){$(b,e,m),re(e,t),xn(t,r[4]),re(e,n),re(e,i),re(i,o),s||(u=[Qt(t,"input",r[10]),Qt(e,"submit",ka(r[7]),!1,!0,!1)],s=!0)},p:function(b,m){m&8&&ji(t,"disabled",b[3]),m&16&&t.value!==b[4]&&xn(t,b[4]),m&24&&a!==(a=b[3]||b[4].length===0)&&ji(i,"disabled",a)},d:function(b){b&&ee(e),s=!1,ln(u)}};return ue("SvelteRegisterBlock",{block:l,id:Bc.name,type:"if",source:"(73:2) {#if currentChapter !== totalChapters - 1}",ctx:r}),l}function Mc(r){let e,t,n,i,o,a=r[1]===0&&Ec(r),s=r[3]&&_c(r),u=r[1]!==r[2]-1&&Bc(r);const l={c:function(){a&&a.c(),e=he(),t=Y("article"),n=Y("section"),i=he(),s&&s.c(),o=he(),u&&u.c(),ne(n,"class","thc--chapter-text s-6-tURBQVAPMl"),Z(n,yr,53,2,1516),ne(t,"class","thc--chapter s-6-tURBQVAPMl"),Z(t,yr,52,0,1483)},l:function(b){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(b,m){a&&a.m(b,m),$(b,e,m),$(b,t,m),re(t,n),n.innerHTML=r[0],re(t,i),s&&s.m(t,null),re(t,o),u&&u.m(t,null)},p:function(b,[m]){b[1]===0?a||(a=Ec(b),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),m&1&&(n.innerHTML=b[0]),b[3]?s?s.p(b,m):(s=_c(b),s.c(),s.m(t,o)):s&&(s.d(1),s=null),b[1]!==b[2]-1?u?u.p(b,m):(u=Bc(b),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},i:We,o:We,d:function(b){a&&a.d(b),b&&ee(e),b&&ee(t),s&&s.d(),u&&u.d()}};return ue("SvelteRegisterBlock",{block:l,id:Mc.name,type:"component",source:"",ctx:r}),l}function y4(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),window.location.reload())}function v4(r,e,t){let n;Rt($0,"reloadBalanceTrigger"),Nt(r,$0,B=>t(11,n=B));let{$$slots:i={},$$scope:o}=e;Or("Chapter",i,[]);let{currentQuestHtml:a}=e,{currentChapter:s}=e,{totalChapters:u}=e,{address:l}=e,{lowBalance:h}=e,{onSubmitSolution:b}=e;console.log("current",a);let m="",A=null;async function _(){t(5,A="waiting");try{await fetch(`${dh}/tokens?address=${l}`),Xn($0,n=Date.now(),n)}catch(B){console.error(B),t(5,A="error")}}async function S(){await b(m)&&t(4,m="")}const C=["currentQuestHtml","currentChapter","totalChapters","address","lowBalance","onSubmitSolution"];Object.keys(e).forEach(B=>{!~C.indexOf(B)&&B.slice(0,2)!=="$$"&&B!=="slot"&&Di.warn(` was created with unknown prop '${B}'`)});function M(){m=this.value,t(4,m)}return r.$$set=B=>{"currentQuestHtml"in B&&t(0,a=B.currentQuestHtml),"currentChapter"in B&&t(1,s=B.currentChapter),"totalChapters"in B&&t(2,u=B.totalChapters),"address"in B&&t(8,l=B.address),"lowBalance"in B&&t(3,h=B.lowBalance),"onSubmitSolution"in B&&t(9,b=B.onSubmitSolution)},r.$capture_state=()=>({ethereumFaucetEndpoint:dh,reloadBalanceTrigger:$0,currentQuestHtml:a,currentChapter:s,totalChapters:u,address:l,lowBalance:h,onSubmitSolution:b,solution:m,refillWalletStatus:A,refillWallet:_,onReset:y4,onSubmit:S,$reloadBalanceTrigger:n}),r.$inject_state=B=>{"currentQuestHtml"in B&&t(0,a=B.currentQuestHtml),"currentChapter"in B&&t(1,s=B.currentChapter),"totalChapters"in B&&t(2,u=B.totalChapters),"address"in B&&t(8,l=B.address),"lowBalance"in B&&t(3,h=B.lowBalance),"onSubmitSolution"in B&&t(9,b=B.onSubmitSolution),"solution"in B&&t(4,m=B.solution),"refillWalletStatus"in B&&t(5,A=B.refillWalletStatus)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[a,s,u,h,m,A,_,S,l,b,M]}class Cx extends Lr{constructor(e){super(e),Dr(this,e,v4,Mc,Pr,{currentQuestHtml:0,currentChapter:1,totalChapters:2,address:8,lowBalance:3,onSubmitSolution:9}),ue("SvelteRegisterComponent",{component:this,tagName:"Chapter",options:e,id:Mc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("currentQuestHtml"in n)&&Di.warn(" was created without expected prop 'currentQuestHtml'"),t[1]===void 0&&!("currentChapter"in n)&&Di.warn(" was created without expected prop 'currentChapter'"),t[2]===void 0&&!("totalChapters"in n)&&Di.warn(" was created without expected prop 'totalChapters'"),t[8]===void 0&&!("address"in n)&&Di.warn(" was created without expected prop 'address'"),t[3]===void 0&&!("lowBalance"in n)&&Di.warn(" was created without expected prop 'lowBalance'"),t[9]===void 0&&!("onSubmitSolution"in n)&&Di.warn(" was created without expected prop 'onSubmitSolution'")}get currentQuestHtml(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set currentQuestHtml(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get currentChapter(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set currentChapter(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get totalChapters(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set totalChapters(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get address(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set address(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get lowBalance(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set lowBalance(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get onSubmitSolution(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set onSubmitSolution(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const fa="src/components/Update.svelte";function kc(r){let e,t,n,i,o,a,s;const u={c:function(){e=Y("div"),t=Y("section"),n=Y("p"),n.textContent="This chapter has been updated, please give it another read \u{1F64F}",i=he(),o=Y("button"),o.textContent="OK",ne(n,"class","s-oPN-lW1g5GmB"),Z(n,fa,5,4,85),ne(o,"class","s-oPN-lW1g5GmB"),Z(o,fa,6,4,158),ne(t,"class","s-oPN-lW1g5GmB"),Z(t,fa,4,2,71),ne(e,"class","s-oPN-lW1g5GmB"),Z(e,fa,3,0,63)},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){$(h,e,b),re(e,t),re(t,n),re(t,i),re(t,o),a||(s=Qt(o,"click",function(){Fo(r[0])&&r[0].apply(this,arguments)},!1,!1,!1),a=!0)},p:function(h,[b]){r=h},i:We,o:We,d:function(h){h&&ee(e),a=!1,s()}};return ue("SvelteRegisterBlock",{block:u,id:kc.name,type:"component",source:"",ctx:r}),u}function w4(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Update",n,[]);let{onQuestUpdatedConfirm:o}=e;const a=["onQuestUpdatedConfirm"];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$$set=s=>{"onQuestUpdatedConfirm"in s&&t(0,o=s.onQuestUpdatedConfirm)},r.$capture_state=()=>({onQuestUpdatedConfirm:o}),r.$inject_state=s=>{"onQuestUpdatedConfirm"in s&&t(0,o=s.onQuestUpdatedConfirm)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o]}class Sx extends Lr{constructor(e){super(e),Dr(this,e,w4,kc,Pr,{onQuestUpdatedConfirm:0}),ue("SvelteRegisterComponent",{component:this,tagName:"Update",options:e,id:kc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("onQuestUpdatedConfirm"in n)&&console.warn(" was created without expected prop 'onQuestUpdatedConfirm'")}get onQuestUpdatedConfirm(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set onQuestUpdatedConfirm(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const{console:A4}=rs,Ar="src/Game.svelte";function Bx(r){let e,t,n,i,o;e=new Cx({props:{currentChapter:r[0],currentQuestHtml:r[7],totalChapters:r[8],address:r[5].address,lowBalance:r[9],onSubmitSolution:r[10]},$$inline:!0});let a=r[1]!=="IDLE"&&Pc(r),s=r[3]&&Rc(r);const u={c:function(){Nn(e.$$.fragment),t=he(),a&&a.c(),n=he(),s&&s.c(),i=Kr()},m:function(h,b){sn(e,h,b),$(h,t,b),a&&a.m(h,b),$(h,n,b),s&&s.m(h,b),$(h,i,b),o=!0},p:function(h,b){const m={};b&1&&(m.currentChapter=h[0]),b&128&&(m.currentQuestHtml=h[7]),b&256&&(m.totalChapters=h[8]),b&32&&(m.address=h[5].address),b&512&&(m.lowBalance=h[9]),e.$set(m),h[1]!=="IDLE"?a?(a.p(h,b),b&2&&dt(a,1)):(a=Pc(h),a.c(),dt(a,1),a.m(n.parentNode,n)):a&&(Pn(),At(a,1,1,()=>{a=null}),Rn()),h[3]?s?(s.p(h,b),b&8&&dt(s,1)):(s=Rc(h),s.c(),dt(s,1),s.m(i.parentNode,i)):s&&(Pn(),At(s,1,1,()=>{s=null}),Rn())},i:function(h){o||(dt(e.$$.fragment,h),dt(a),dt(s),o=!0)},o:function(h){At(e.$$.fragment,h),At(a),At(s),o=!1},d:function(h){fn(e,h),h&&ee(t),a&&a.d(h),h&&ee(n),s&&s.d(h),h&&ee(i)}};return ue("SvelteRegisterBlock",{block:u,id:Bx.name,type:"if",source:"(71:129) ",ctx:r}),u}function Mx(r){let e,t,n,i;const o={c:function(){e=Y("p"),t=$e(`The game is br0ken, something happened to the storage. Reach out to our + check your address in the `),s=Y("a"),s.textContent="settings",u=$e(" page."),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,38,4,1084),ne(s,"href","#/settings"),ne(s,"class","s-6-tURBQVAPMl"),Z(s,yr,46,34,1402),ne(o,"class","s-6-tURBQVAPMl"),Z(o,yr,44,6,1283),ne(i,"class","s-6-tURBQVAPMl"),Z(i,yr,43,4,1273),ne(e,"class","thc--notification warning s-6-tURBQVAPMl"),Z(e,yr,37,2,1040)},m:function(b,m){$(b,e,m),re(e,t),re(e,n),re(e,i),re(i,o),re(o,a),re(o,s),re(o,u)},d:function(b){b&&ee(e)}};return ue("SvelteRegisterBlock",{block:l,id:Ec.name,type:"if",source:"(37:0) {#if currentChapter === 0}",ctx:r}),l}function _c(r){let e,t,n,i,o,a,s,u,l,h,b=r[5]==="waiting"&&Cc(r),m=r[5]==="error"&&Sc(r);const A={c:function(){e=Y("div"),t=Y("p"),t.textContent="Your wallet is low in balance, refill it to play the game",n=he(),b&&b.c(),i=he(),m&&m.c(),o=he(),a=Y("button"),s=$e("Refill Wallet (it's free!)"),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,59,6,1664),a.disabled=u=r[5]!==null,ne(a,"class","s-6-tURBQVAPMl"),Z(a,yr,66,6,1952),ne(e,"class","thc--notification warning s-6-tURBQVAPMl"),Z(e,yr,58,4,1618)},m:function(S,C){$(S,e,C),re(e,t),re(e,n),b&&b.m(e,null),re(e,i),m&&m.m(e,null),re(e,o),re(e,a),re(a,s),l||(h=Qt(a,"click",r[6],!1,!1,!1),l=!0)},p:function(S,C){S[5]==="waiting"?b||(b=Cc(S),b.c(),b.m(e,i)):b&&(b.d(1),b=null),S[5]==="error"?m||(m=Sc(S),m.c(),m.m(e,o)):m&&(m.d(1),m=null),C&32&&u!==(u=S[5]!==null)&&ji(a,"disabled",u)},d:function(S){S&&ee(e),b&&b.d(),m&&m.d(),l=!1,h()}};return ue("SvelteRegisterBlock",{block:A,id:_c.name,type:"if",source:"(58:2) {#if lowBalance}",ctx:r}),A}function Cc(r){let e;const t={c:function(){e=Y("p"),e.textContent="Please wait, it may take up to 15 seconds",ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,61,8,1782)},m:function(i,o){$(i,e,o)},d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Cc.name,type:"if",source:'(61:6) {#if refillWalletStatus === \\"waiting\\"}',ctx:r}),t}function Sc(r){let e;const t={c:function(){e=Y("p"),e.textContent="There was an error, please retry",ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,64,8,1894)},m:function(i,o){$(i,e,o)},d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Sc.name,type:"if",source:'(64:6) {#if refillWalletStatus === \\"error\\"}',ctx:r}),t}function Bc(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("form"),t=Y("input"),n=he(),i=Y("button"),o=$e("Submit"),t.disabled=r[3],ne(t,"placeholder","solution to the puzzle"),ne(t,"class","s-6-tURBQVAPMl"),Z(t,yr,74,6,2193),i.disabled=a=r[3]||r[4].length===0,ne(i,"type","submit"),ne(i,"class","s-6-tURBQVAPMl"),Z(i,yr,79,6,2320),ne(e,"class","s-6-tURBQVAPMl"),Z(e,yr,73,4,2144)},m:function(b,m){$(b,e,m),re(e,t),xn(t,r[4]),re(e,n),re(e,i),re(i,o),s||(u=[Qt(t,"input",r[10]),Qt(e,"submit",ka(r[7]),!1,!0,!1)],s=!0)},p:function(b,m){m&8&&ji(t,"disabled",b[3]),m&16&&t.value!==b[4]&&xn(t,b[4]),m&24&&a!==(a=b[3]||b[4].length===0)&&ji(i,"disabled",a)},d:function(b){b&&ee(e),s=!1,ln(u)}};return ue("SvelteRegisterBlock",{block:l,id:Bc.name,type:"if",source:"(73:2) {#if currentChapter !== totalChapters - 1}",ctx:r}),l}function Mc(r){let e,t,n,i,o,a=r[1]===0&&Ec(r),s=r[3]&&_c(r),u=r[1]!==r[2]-1&&Bc(r);const l={c:function(){a&&a.c(),e=he(),t=Y("article"),n=Y("section"),i=he(),s&&s.c(),o=he(),u&&u.c(),ne(n,"class","thc--chapter-text s-6-tURBQVAPMl"),Z(n,yr,53,2,1516),ne(t,"class","thc--chapter s-6-tURBQVAPMl"),Z(t,yr,52,0,1483)},l:function(b){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(b,m){a&&a.m(b,m),$(b,e,m),$(b,t,m),re(t,n),n.innerHTML=r[0],re(t,i),s&&s.m(t,null),re(t,o),u&&u.m(t,null)},p:function(b,[m]){b[1]===0?a||(a=Ec(b),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),m&1&&(n.innerHTML=b[0]),b[3]?s?s.p(b,m):(s=_c(b),s.c(),s.m(t,o)):s&&(s.d(1),s=null),b[1]!==b[2]-1?u?u.p(b,m):(u=Bc(b),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},i:We,o:We,d:function(b){a&&a.d(b),b&&ee(e),b&&ee(t),s&&s.d(),u&&u.d()}};return ue("SvelteRegisterBlock",{block:l,id:Mc.name,type:"component",source:"",ctx:r}),l}function w4(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),window.location.reload())}function A4(r,e,t){let n;Rt(eo,"reloadBalanceTrigger"),Nt(r,eo,B=>t(11,n=B));let{$$slots:i={},$$scope:o}=e;Or("Chapter",i,[]);let{currentQuestHtml:a}=e,{currentChapter:s}=e,{totalChapters:u}=e,{address:l}=e,{lowBalance:h}=e,{onSubmitSolution:b}=e;console.log("current",a);let m="",A=null;async function _(){t(5,A="waiting");try{await fetch(`${dh}/tokens?address=${l}`),Xn(eo,n=Date.now(),n)}catch(B){console.error(B),t(5,A="error")}}async function S(){await b(m)&&t(4,m="")}const C=["currentQuestHtml","currentChapter","totalChapters","address","lowBalance","onSubmitSolution"];Object.keys(e).forEach(B=>{!~C.indexOf(B)&&B.slice(0,2)!=="$$"&&B!=="slot"&&Di.warn(` was created with unknown prop '${B}'`)});function M(){m=this.value,t(4,m)}return r.$$set=B=>{"currentQuestHtml"in B&&t(0,a=B.currentQuestHtml),"currentChapter"in B&&t(1,s=B.currentChapter),"totalChapters"in B&&t(2,u=B.totalChapters),"address"in B&&t(8,l=B.address),"lowBalance"in B&&t(3,h=B.lowBalance),"onSubmitSolution"in B&&t(9,b=B.onSubmitSolution)},r.$capture_state=()=>({ethereumFaucetEndpoint:dh,reloadBalanceTrigger:eo,currentQuestHtml:a,currentChapter:s,totalChapters:u,address:l,lowBalance:h,onSubmitSolution:b,solution:m,refillWalletStatus:A,refillWallet:_,onReset:w4,onSubmit:S,$reloadBalanceTrigger:n}),r.$inject_state=B=>{"currentQuestHtml"in B&&t(0,a=B.currentQuestHtml),"currentChapter"in B&&t(1,s=B.currentChapter),"totalChapters"in B&&t(2,u=B.totalChapters),"address"in B&&t(8,l=B.address),"lowBalance"in B&&t(3,h=B.lowBalance),"onSubmitSolution"in B&&t(9,b=B.onSubmitSolution),"solution"in B&&t(4,m=B.solution),"refillWalletStatus"in B&&t(5,A=B.refillWalletStatus)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[a,s,u,h,m,A,_,S,l,b,M]}class Sx extends Lr{constructor(e){super(e),Dr(this,e,A4,Mc,Pr,{currentQuestHtml:0,currentChapter:1,totalChapters:2,address:8,lowBalance:3,onSubmitSolution:9}),ue("SvelteRegisterComponent",{component:this,tagName:"Chapter",options:e,id:Mc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("currentQuestHtml"in n)&&Di.warn(" was created without expected prop 'currentQuestHtml'"),t[1]===void 0&&!("currentChapter"in n)&&Di.warn(" was created without expected prop 'currentChapter'"),t[2]===void 0&&!("totalChapters"in n)&&Di.warn(" was created without expected prop 'totalChapters'"),t[8]===void 0&&!("address"in n)&&Di.warn(" was created without expected prop 'address'"),t[3]===void 0&&!("lowBalance"in n)&&Di.warn(" was created without expected prop 'lowBalance'"),t[9]===void 0&&!("onSubmitSolution"in n)&&Di.warn(" was created without expected prop 'onSubmitSolution'")}get currentQuestHtml(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set currentQuestHtml(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get currentChapter(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set currentChapter(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get totalChapters(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set totalChapters(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get address(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set address(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get lowBalance(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set lowBalance(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get onSubmitSolution(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set onSubmitSolution(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const fa="src/components/Update.svelte";function kc(r){let e,t,n,i,o,a,s;const u={c:function(){e=Y("div"),t=Y("section"),n=Y("p"),n.textContent="This chapter has been updated, please give it another read \u{1F64F}",i=he(),o=Y("button"),o.textContent="OK",ne(n,"class","s-oPN-lW1g5GmB"),Z(n,fa,5,4,85),ne(o,"class","s-oPN-lW1g5GmB"),Z(o,fa,6,4,158),ne(t,"class","s-oPN-lW1g5GmB"),Z(t,fa,4,2,71),ne(e,"class","s-oPN-lW1g5GmB"),Z(e,fa,3,0,63)},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){$(h,e,b),re(e,t),re(t,n),re(t,i),re(t,o),a||(s=Qt(o,"click",function(){To(r[0])&&r[0].apply(this,arguments)},!1,!1,!1),a=!0)},p:function(h,[b]){r=h},i:We,o:We,d:function(h){h&&ee(e),a=!1,s()}};return ue("SvelteRegisterBlock",{block:u,id:kc.name,type:"component",source:"",ctx:r}),u}function E4(r,e,t){let{$$slots:n={},$$scope:i}=e;Or("Update",n,[]);let{onQuestUpdatedConfirm:o}=e;const a=["onQuestUpdatedConfirm"];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$$set=s=>{"onQuestUpdatedConfirm"in s&&t(0,o=s.onQuestUpdatedConfirm)},r.$capture_state=()=>({onQuestUpdatedConfirm:o}),r.$inject_state=s=>{"onQuestUpdatedConfirm"in s&&t(0,o=s.onQuestUpdatedConfirm)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o]}class Bx extends Lr{constructor(e){super(e),Dr(this,e,E4,kc,Pr,{onQuestUpdatedConfirm:0}),ue("SvelteRegisterComponent",{component:this,tagName:"Update",options:e,id:kc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("onQuestUpdatedConfirm"in n)&&console.warn(" was created without expected prop 'onQuestUpdatedConfirm'")}get onQuestUpdatedConfirm(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set onQuestUpdatedConfirm(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const{console:_4}=rs,Ar="src/Game.svelte";function Mx(r){let e,t,n,i,o;e=new Sx({props:{currentChapter:r[0],currentQuestHtml:r[7],totalChapters:r[8],address:r[5].address,lowBalance:r[9],onSubmitSolution:r[10]},$$inline:!0});let a=r[1]!=="IDLE"&&Pc(r),s=r[3]&&Rc(r);const u={c:function(){Nn(e.$$.fragment),t=he(),a&&a.c(),n=he(),s&&s.c(),i=Kr()},m:function(h,b){sn(e,h,b),$(h,t,b),a&&a.m(h,b),$(h,n,b),s&&s.m(h,b),$(h,i,b),o=!0},p:function(h,b){const m={};b&1&&(m.currentChapter=h[0]),b&128&&(m.currentQuestHtml=h[7]),b&256&&(m.totalChapters=h[8]),b&32&&(m.address=h[5].address),b&512&&(m.lowBalance=h[9]),e.$set(m),h[1]!=="IDLE"?a?(a.p(h,b),b&2&&dt(a,1)):(a=Pc(h),a.c(),dt(a,1),a.m(n.parentNode,n)):a&&(Pn(),At(a,1,1,()=>{a=null}),Rn()),h[3]?s?(s.p(h,b),b&8&&dt(s,1)):(s=Rc(h),s.c(),dt(s,1),s.m(i.parentNode,i)):s&&(Pn(),At(s,1,1,()=>{s=null}),Rn())},i:function(h){o||(dt(e.$$.fragment,h),dt(a),dt(s),o=!0)},o:function(h){At(e.$$.fragment,h),At(a),At(s),o=!1},d:function(h){fn(e,h),h&&ee(t),a&&a.d(h),h&&ee(n),s&&s.d(h),h&&ee(i)}};return ue("SvelteRegisterBlock",{block:u,id:Mx.name,type:"if",source:"(71:129) ",ctx:r}),u}function kx(r){let e,t,n,i;const o={c:function(){e=Y("p"),t=$e(`The game is br0ken, something happened to the storage. Reach out to our discord and ask for help or go to `),n=Y("a"),n.textContent="Settings",i=$e(` and restart - the game.`),ne(n,"href","#/settings"),Z(n,Ar,67,38,2375),Z(e,Ar,65,2,2257)},m:function(s,u){$(s,e,u),re(e,t),re(e,n),re(e,i)},p:We,i:We,o:We,d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:Mx.name,type:"if",source:"(65:0) {#if $fuckFuckFuckFuckFuck}",ctx:r}),o}function Pc(r){let e,t,n,i;function o(l,h){return l[1]==="CHECK"?Nx:l[1]==="WRONG"?Rx:l[1]==="ERROR"?Px:kx}let a=o(r),s=a(r);const u={c:function(){e=Y("div"),t=Y("div"),s.c(),Z(t,Ar,82,6,2868),ne(e,"class","thc--chapter-state"),Z(e,Ar,81,4,2813)},m:function(h,b){$(h,e,b),re(e,t),s.m(t,null),i=!0},p:function(h,b){a===(a=o(h))&&s?s.p(h,b):(s.d(1),s=a(h),s&&(s.c(),s.m(t,null)))},i:function(h){i||(zi(()=>{n||(n=Na(e,di,{},!0)),n.run(1)}),i=!0)},o:function(h){n||(n=Na(e,di,{},!1)),n.run(0),i=!1},d:function(h){h&&ee(e),s.d(),h&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:u,id:Pc.name,type:"if",source:'(81:2) {#if state !== \\"IDLE\\"}',ctx:r}),u}function kx(r){let e,t,n;function i(u,l){if(u[1]==="MINING")return Tx;if(u[1]==="SUCCESS")return Fx}let o=i(r),a=o&&o(r);const s={c:function(){e=Y("h2"),e.textContent="Correct answer",t=he(),a&&a.c(),n=Kr(),Z(e,Ar,95,10,3298)},m:function(l,h){$(l,e,h),$(l,t,h),a&&a.m(l,h),$(l,n,h)},p:function(l,h){o===(o=i(l))&&a?a.p(l,h):(a&&a.d(1),a=o&&o(l),a&&(a.c(),a.m(n.parentNode,n)))},d:function(l){l&&ee(e),l&&ee(t),a&&a.d(l),l&&ee(n)}};return ue("SvelteRegisterBlock",{block:s,id:kx.name,type:"else",source:"(95:8) {:else}",ctx:r}),s}function Px(r){let e,t,n,i;const o={c:function(){e=Y("p"),e.textContent="Something bad happened, get in contact with us, we can help you.",t=he(),n=Y("pre"),i=$e(r[2]),Z(e,Ar,90,10,3147),Z(n,Ar,93,10,3253)},m:function(s,u){$(s,e,u),$(s,t,u),$(s,n,u),re(n,i)},p:function(s,u){u&4&&hi(i,s[2])},d:function(s){s&&ee(e),s&&ee(t),s&&ee(n)}};return ue("SvelteRegisterBlock",{block:o,id:Px.name,type:"if",source:"(90:36) ",ctx:r}),o}function Rx(r){let e,t,n,i,o;const a={c:function(){e=Y("h2"),e.textContent="Wrong answer",t=he(),n=Y("button"),n.textContent="Try again",Z(e,Ar,87,10,3007),Z(n,Ar,88,10,3039)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[14],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Rx.name,type:"if",source:"(87:36) ",ctx:r}),a}function Nx(r){let e,t,n;const i={c:function(){e=Y("h2"),e.textContent="Checking",t=he(),n=Y("p"),n.textContent="Checking",Z(e,Ar,84,10,2916),Z(n,Ar,85,10,2944)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Nx.name,type:"if",source:'(84:8) {#if state === \\"CHECK\\"}',ctx:r}),i}function Fx(r){let e,t,n,i,o;const a={c:function(){e=Y("p"),e.textContent="Your score has been updated.",t=he(),n=Y("button"),n.textContent="Go to next chapter",Z(e,Ar,105,12,3789),Z(n,Ar,106,12,3837)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[11],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Fx.name,type:"if",source:"(105:40) ",ctx:r}),a}function Tx(r){let e,t,n;const i={c:function(){e=Y("p"),e.textContent="Please wait some seconds because blockchains are fast.",t=he(),n=Y("p"),n.textContent=`Keep this window open, wait, cross your fingers, don't enter any + the game.`),ne(n,"href","#/settings"),Z(n,Ar,67,38,2375),Z(e,Ar,65,2,2257)},m:function(s,u){$(s,e,u),re(e,t),re(e,n),re(e,i)},p:We,i:We,o:We,d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:kx.name,type:"if",source:"(65:0) {#if $fuckFuckFuckFuckFuck}",ctx:r}),o}function Pc(r){let e,t,n,i;function o(l,h){return l[1]==="CHECK"?Fx:l[1]==="WRONG"?Nx:l[1]==="ERROR"?Rx:Px}let a=o(r),s=a(r);const u={c:function(){e=Y("div"),t=Y("div"),s.c(),Z(t,Ar,82,6,2868),ne(e,"class","thc--chapter-state"),Z(e,Ar,81,4,2813)},m:function(h,b){$(h,e,b),re(e,t),s.m(t,null),i=!0},p:function(h,b){a===(a=o(h))&&s?s.p(h,b):(s.d(1),s=a(h),s&&(s.c(),s.m(t,null)))},i:function(h){i||(zi(()=>{n||(n=Na(e,di,{},!0)),n.run(1)}),i=!0)},o:function(h){n||(n=Na(e,di,{},!1)),n.run(0),i=!1},d:function(h){h&&ee(e),s.d(),h&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:u,id:Pc.name,type:"if",source:'(81:2) {#if state !== \\"IDLE\\"}',ctx:r}),u}function Px(r){let e,t,n;function i(u,l){if(u[1]==="MINING")return Ix;if(u[1]==="SUCCESS")return Tx}let o=i(r),a=o&&o(r);const s={c:function(){e=Y("h2"),e.textContent="Correct answer",t=he(),a&&a.c(),n=Kr(),Z(e,Ar,95,10,3298)},m:function(l,h){$(l,e,h),$(l,t,h),a&&a.m(l,h),$(l,n,h)},p:function(l,h){o===(o=i(l))&&a?a.p(l,h):(a&&a.d(1),a=o&&o(l),a&&(a.c(),a.m(n.parentNode,n)))},d:function(l){l&&ee(e),l&&ee(t),a&&a.d(l),l&&ee(n)}};return ue("SvelteRegisterBlock",{block:s,id:Px.name,type:"else",source:"(95:8) {:else}",ctx:r}),s}function Rx(r){let e,t,n,i;const o={c:function(){e=Y("p"),e.textContent="Something bad happened, get in contact with us, we can help you.",t=he(),n=Y("pre"),i=$e(r[2]),Z(e,Ar,90,10,3147),Z(n,Ar,93,10,3253)},m:function(s,u){$(s,e,u),$(s,t,u),$(s,n,u),re(n,i)},p:function(s,u){u&4&&hi(i,s[2])},d:function(s){s&&ee(e),s&&ee(t),s&&ee(n)}};return ue("SvelteRegisterBlock",{block:o,id:Rx.name,type:"if",source:"(90:36) ",ctx:r}),o}function Nx(r){let e,t,n,i,o;const a={c:function(){e=Y("h2"),e.textContent="Wrong answer",t=he(),n=Y("button"),n.textContent="Try again",Z(e,Ar,87,10,3007),Z(n,Ar,88,10,3039)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[14],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Nx.name,type:"if",source:"(87:36) ",ctx:r}),a}function Fx(r){let e,t,n;const i={c:function(){e=Y("h2"),e.textContent="Checking",t=he(),n=Y("p"),n.textContent="Checking",Z(e,Ar,84,10,2916),Z(n,Ar,85,10,2944)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Fx.name,type:"if",source:'(84:8) {#if state === \\"CHECK\\"}',ctx:r}),i}function Tx(r){let e,t,n,i,o;const a={c:function(){e=Y("p"),e.textContent="Your score has been updated.",t=he(),n=Y("button"),n.textContent="Go to next chapter",Z(e,Ar,105,12,3789),Z(n,Ar,106,12,3837)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[11],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Tx.name,type:"if",source:"(105:40) ",ctx:r}),a}function Ix(r){let e,t,n;const i={c:function(){e=Y("p"),e.textContent="Please wait some seconds because blockchains are fast.",t=he(),n=Y("p"),n.textContent=`Keep this window open, wait, cross your fingers, don't enter any Faraday cage, don't drop your mobile phone in the toilet or in any other liquid, make sure you have enough battery left, don't lock - your mobile phone.`,Z(e,Ar,97,12,3369),Z(n,Ar,98,12,3443)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Tx.name,type:"if",source:'(97:10) {#if state === \\"MINING\\"}',ctx:r}),i}function Rc(r){let e,t;e=new Sx({props:{onQuestUpdatedConfirm:r[12]},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:We,i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:Rc.name,type:"if",source:"(114:2) {#if currentQuestUpdated}",ctx:r}),n}function Nc(r){let e,t,n,i;const o=[Mx,Bx],a=[];function s(l,h){return l[6]?0:l[5]!==null&&l[4]!==null&&l[0]!==null&&l[7]!==null&&l[8]!==null?1:-1}~(e=s(r))&&(t=a[e]=o[e](r));const u={c:function(){t&&t.c(),n=Kr()},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){~e&&a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?~e&&a[e].p(h,b):(t&&(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn()),~e?(t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n)):t=null)},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){~e&&a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Nc.name,type:"component",source:"",ctx:r}),u}function E4(r,e,t){let n,i,o,a,s,u,l,h,b;Rt(Ca,"currentChapter"),Nt(r,Ca,D=>t(0,n=D)),Rt(Br,"game"),Nt(r,Br,D=>t(13,i=D)),Rt(eo,"lastTransactionMined"),Nt(r,eo,D=>t(15,o=D)),Rt(Mr,"thc"),Nt(r,Mr,D=>t(4,a=D)),Rt(qr,"signer"),Nt(r,qr,D=>t(5,s=D)),Rt(Gi,"fuckFuckFuckFuckFuck"),Nt(r,Gi,D=>t(6,u=D)),Rt(Uf,"currentQuestHtml"),Nt(r,Uf,D=>t(7,l=D)),Rt(Lf,"totalChapters"),Nt(r,Lf,D=>t(8,h=D)),Rt(v0,"lowBalance"),Nt(r,v0,D=>t(9,b=D));let{$$slots:m={},$$scope:A}=e;Or("Game",m,[]);let _="IDLE",S;async function C(D){const O=s.address,J=a,X=n;D=D.toLowerCase(),t(1,_="CHECK");const{r:H,s:L,v:j}=await Za(O,D);Xn(Br,i[X.toString()].solution=D,i);try{const v=await J.submit(j,H,L);console.log(v),t(1,_="MINING");const f=await v.wait();return console.log("Transaction Mined: "+f),console.log(f),t(1,_="SUCCESS"),Xn(eo,o=v.hash,o),Xn(Br,i[X.toString()].transactionHash=v.hash,i),!0}catch(v){return v.toString().toLowerCase().includes("wrong solution")?t(1,_="WRONG"):(console.log("error submitting solution",v),t(1,_="ERROR"),t(2,S=v.toString())),!1}}function M(){t(1,_="IDLE"),window.scrollTo({top:0,behavior:"smooth"})}function B(){n!==null&&Xn(Br,i[n.toString()].questHashLastSeen=i[n.toString()].questHash,i)}let P=!1;const R=[];Object.keys(e).forEach(D=>{!~R.indexOf(D)&&D.slice(0,2)!=="$$"&&D!=="slot"&&A4.warn(` was created with unknown prop '${D}'`)});const I=()=>t(1,_="IDLE");return r.$capture_state=()=>({game:Br,currentChapter:Ca,currentQuestHtml:Uf,lastTransactionMined:eo,thc:Mr,totalChapters:Lf,fuckFuckFuckFuckFuck:Gi,lowBalance:v0,signer:qr,Chapter:Cx,signatureFromSolution:Za,fade:di,Update:Sx,state:_,error:S,onSubmitSolution:C,onCloseModal:M,onQuestUpdatedConfirm:B,currentQuestUpdated:P,$currentChapter:n,$game:i,$lastTransactionMined:o,$thc:a,$signer:s,$fuckFuckFuckFuckFuck:u,$currentQuestHtml:l,$totalChapters:h,$lowBalance:b}),r.$inject_state=D=>{"state"in D&&t(1,_=D.state),"error"in D&&t(2,S=D.error),"currentQuestUpdated"in D&&t(3,P=D.currentQuestUpdated)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),r.$$.update=()=>{r.$$.dirty&8193&&t(3,P=n!==null&&i[n.toString()]&&i[n.toString()].questHashLastSeen!==i[n.toString()].questHash)},[n,_,S,P,a,s,u,l,h,b,C,M,B,i,I]}class _4 extends Lr{constructor(e){super(e),Dr(this,e,E4,Nc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Game",options:e,id:Nc.name})}}const{console:C4}=rs,Ut="src/Keys.svelte";function Ix(r){let e,t,n,i,o,a,s,u,l,h,b,m,A,_,S,C,M=r[0]!=="IDLE"&&Fc(r);const B={c:function(){e=Y("p"),t=$e(`Did you find a key? Submit it with this form to add it to your score in the - leaderboard. More info in the `),n=Y("a"),n.textContent="FAQs",i=$e("."),o=he(),a=Y("form"),s=Y("input"),u=he(),l=Y("button"),h=$e("Submit"),m=he(),M&&M.c(),A=Kr(),ne(n,"href","#/about"),Z(n,Ut,51,34,1568),Z(e,Ut,49,2,1450),s.disabled=r[6],ne(s,"placeholder","Key"),Z(s,Ut,54,4,1655),l.disabled=b=r[6]||r[2].length===0,ne(l,"type","submit"),Z(l,Ut,55,4,1727),Z(a,Ut,53,2,1605)},m:function(R,I){$(R,e,I),re(e,t),re(e,n),re(e,i),$(R,o,I),$(R,a,I),re(a,s),xn(s,r[2]),re(a,u),re(a,l),re(l,h),$(R,m,I),M&&M.m(R,I),$(R,A,I),_=!0,S||(C=[Qt(s,"input",r[9]),Qt(a,"submit",ka(r[7]),!1,!0,!1)],S=!0)},p:function(R,I){(!_||I&64)&&ji(s,"disabled",R[6]),I&4&&s.value!==R[2]&&xn(s,R[2]),(!_||I&68&&b!==(b=R[6]||R[2].length===0))&&ji(l,"disabled",b),R[0]!=="IDLE"?M?(M.p(R,I),I&1&&dt(M,1)):(M=Fc(R),M.c(),dt(M,1),M.m(A.parentNode,A)):M&&(Pn(),At(M,1,1,()=>{M=null}),Rn())},i:function(R){_||(dt(M),_=!0)},o:function(R){At(M),_=!1},d:function(R){R&&ee(e),R&&ee(o),R&&ee(a),R&&ee(m),M&&M.d(R),R&&ee(A),S=!1,ln(C)}};return ue("SvelteRegisterBlock",{block:B,id:Ix.name,type:"if",source:"(49:44) ",ctx:r}),B}function Dx(r){let e,t,n,i;const o={c:function(){e=Y("p"),t=$e(`The game is br0ken, something happened to the storage. Reach out to our + your mobile phone.`,Z(e,Ar,97,12,3369),Z(n,Ar,98,12,3443)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Ix.name,type:"if",source:'(97:10) {#if state === \\"MINING\\"}',ctx:r}),i}function Rc(r){let e,t;e=new Bx({props:{onQuestUpdatedConfirm:r[12]},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:We,i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:Rc.name,type:"if",source:"(114:2) {#if currentQuestUpdated}",ctx:r}),n}function Nc(r){let e,t,n,i;const o=[kx,Mx],a=[];function s(l,h){return l[6]?0:l[5]!==null&&l[4]!==null&&l[0]!==null&&l[7]!==null&&l[8]!==null?1:-1}~(e=s(r))&&(t=a[e]=o[e](r));const u={c:function(){t&&t.c(),n=Kr()},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){~e&&a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?~e&&a[e].p(h,b):(t&&(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn()),~e?(t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n)):t=null)},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){~e&&a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Nc.name,type:"component",source:"",ctx:r}),u}function C4(r,e,t){let n,i,o,a,s,u,l,h,b;Rt(Ca,"currentChapter"),Nt(r,Ca,D=>t(0,n=D)),Rt(Br,"game"),Nt(r,Br,D=>t(13,i=D)),Rt(to,"lastTransactionMined"),Nt(r,to,D=>t(15,o=D)),Rt(Mr,"thc"),Nt(r,Mr,D=>t(4,a=D)),Rt(qr,"signer"),Nt(r,qr,D=>t(5,s=D)),Rt(Gi,"fuckFuckFuckFuckFuck"),Nt(r,Gi,D=>t(6,u=D)),Rt(Uf,"currentQuestHtml"),Nt(r,Uf,D=>t(7,l=D)),Rt(Lf,"totalChapters"),Nt(r,Lf,D=>t(8,h=D)),Rt(v0,"lowBalance"),Nt(r,v0,D=>t(9,b=D));let{$$slots:m={},$$scope:A}=e;Or("Game",m,[]);let _="IDLE",S;async function C(D){const O=s.address,J=a,X=n;D=D.toLowerCase(),t(1,_="CHECK");const{r:H,s:L,v:j}=await Za(O,D);Xn(Br,i[X.toString()].solution=D,i);try{const v=await J.submit(j,H,L);console.log(v),t(1,_="MINING");const f=await v.wait();return console.log("Transaction Mined: "+f),console.log(f),t(1,_="SUCCESS"),Xn(to,o=v.hash,o),Xn(Br,i[X.toString()].transactionHash=v.hash,i),!0}catch(v){return v.toString().toLowerCase().includes("wrong solution")?t(1,_="WRONG"):(console.log("error submitting solution",v),t(1,_="ERROR"),t(2,S=v.toString())),!1}}function M(){t(1,_="IDLE"),window.scrollTo({top:0,behavior:"smooth"})}function B(){n!==null&&Xn(Br,i[n.toString()].questHashLastSeen=i[n.toString()].questHash,i)}let P=!1;const R=[];Object.keys(e).forEach(D=>{!~R.indexOf(D)&&D.slice(0,2)!=="$$"&&D!=="slot"&&_4.warn(` was created with unknown prop '${D}'`)});const I=()=>t(1,_="IDLE");return r.$capture_state=()=>({game:Br,currentChapter:Ca,currentQuestHtml:Uf,lastTransactionMined:to,thc:Mr,totalChapters:Lf,fuckFuckFuckFuckFuck:Gi,lowBalance:v0,signer:qr,Chapter:Sx,signatureFromSolution:Za,fade:di,Update:Bx,state:_,error:S,onSubmitSolution:C,onCloseModal:M,onQuestUpdatedConfirm:B,currentQuestUpdated:P,$currentChapter:n,$game:i,$lastTransactionMined:o,$thc:a,$signer:s,$fuckFuckFuckFuckFuck:u,$currentQuestHtml:l,$totalChapters:h,$lowBalance:b}),r.$inject_state=D=>{"state"in D&&t(1,_=D.state),"error"in D&&t(2,S=D.error),"currentQuestUpdated"in D&&t(3,P=D.currentQuestUpdated)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),r.$$.update=()=>{r.$$.dirty&8193&&t(3,P=n!==null&&i[n.toString()]&&i[n.toString()].questHashLastSeen!==i[n.toString()].questHash)},[n,_,S,P,a,s,u,l,h,b,C,M,B,i,I]}class S4 extends Lr{constructor(e){super(e),Dr(this,e,C4,Nc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Game",options:e,id:Nc.name})}}const{console:B4}=rs,Ut="src/Keys.svelte";function Dx(r){let e,t,n,i,o,a,s,u,l,h,b,m,A,_,S,C,M=r[0]!=="IDLE"&&Fc(r);const B={c:function(){e=Y("p"),t=$e(`Did you find a key? Submit it with this form to add it to your score in the + leaderboard. More info in the `),n=Y("a"),n.textContent="FAQs",i=$e("."),o=he(),a=Y("form"),s=Y("input"),u=he(),l=Y("button"),h=$e("Submit"),m=he(),M&&M.c(),A=Kr(),ne(n,"href","#/about"),Z(n,Ut,51,34,1568),Z(e,Ut,49,2,1450),s.disabled=r[6],ne(s,"placeholder","Key"),Z(s,Ut,54,4,1655),l.disabled=b=r[6]||r[2].length===0,ne(l,"type","submit"),Z(l,Ut,55,4,1727),Z(a,Ut,53,2,1605)},m:function(R,I){$(R,e,I),re(e,t),re(e,n),re(e,i),$(R,o,I),$(R,a,I),re(a,s),xn(s,r[2]),re(a,u),re(a,l),re(l,h),$(R,m,I),M&&M.m(R,I),$(R,A,I),_=!0,S||(C=[Qt(s,"input",r[9]),Qt(a,"submit",ka(r[7]),!1,!0,!1)],S=!0)},p:function(R,I){(!_||I&64)&&ji(s,"disabled",R[6]),I&4&&s.value!==R[2]&&xn(s,R[2]),(!_||I&68&&b!==(b=R[6]||R[2].length===0))&&ji(l,"disabled",b),R[0]!=="IDLE"?M?(M.p(R,I),I&1&&dt(M,1)):(M=Fc(R),M.c(),dt(M,1),M.m(A.parentNode,A)):M&&(Pn(),At(M,1,1,()=>{M=null}),Rn())},i:function(R){_||(dt(M),_=!0)},o:function(R){At(M),_=!1},d:function(R){R&&ee(e),R&&ee(o),R&&ee(a),R&&ee(m),M&&M.d(R),R&&ee(A),S=!1,ln(C)}};return ue("SvelteRegisterBlock",{block:B,id:Dx.name,type:"if",source:"(49:44) ",ctx:r}),B}function Ox(r){let e,t,n,i;const o={c:function(){e=Y("p"),t=$e(`The game is br0ken, something happened to the storage. Reach out to our discord and ask for help or go to `),n=Y("a"),n.textContent="Settings",i=$e(` and restart - the game.`),ne(n,"href","#/settings"),Z(n,Ut,45,38,1336),Z(e,Ut,43,2,1218)},m:function(s,u){$(s,e,u),re(e,t),re(e,n),re(e,i)},p:We,i:We,o:We,d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:Dx.name,type:"if",source:"(43:0) {#if $fuckFuckFuckFuckFuck}",ctx:r}),o}function Fc(r){let e,t,n,i;function o(l,h){return l[0]==="CHECK"?Jx:l[0]==="WRONG"?Ux:l[0]==="ERROR"?Lx:Ox}let a=o(r),s=a(r);const u={c:function(){e=Y("div"),t=Y("div"),s.c(),Z(t,Ut,62,6,1915),ne(e,"class","thc--chapter-state"),Z(e,Ut,61,4,1860)},m:function(h,b){$(h,e,b),re(e,t),s.m(t,null),i=!0},p:function(h,b){a===(a=o(h))&&s?s.p(h,b):(s.d(1),s=a(h),s&&(s.c(),s.m(t,null)))},i:function(h){i||(zi(()=>{n||(n=Na(e,di,{},!0)),n.run(1)}),i=!0)},o:function(h){n||(n=Na(e,di,{},!1)),n.run(0),i=!1},d:function(h){h&&ee(e),s.d(),h&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:u,id:Fc.name,type:"if",source:'(61:2) {#if state !== \\"IDLE\\"}',ctx:r}),u}function Ox(r){let e,t,n;function i(u,l){if(u[0]==="MINING")return Gx;if(u[0]==="SUCCESS")return Hx}let o=i(r),a=o&&o(r);const s={c:function(){e=Y("h2"),e.textContent="Correct Key",t=he(),a&&a.c(),n=Kr(),Z(e,Ut,75,10,2342)},m:function(l,h){$(l,e,h),$(l,t,h),a&&a.m(l,h),$(l,n,h)},p:function(l,h){o===(o=i(l))&&a?a.p(l,h):(a&&a.d(1),a=o&&o(l),a&&(a.c(),a.m(n.parentNode,n)))},d:function(l){l&&ee(e),l&&ee(t),a&&a.d(l),l&&ee(n)}};return ue("SvelteRegisterBlock",{block:s,id:Ox.name,type:"else",source:"(75:8) {:else}",ctx:r}),s}function Lx(r){let e,t,n,i;const o={c:function(){e=Y("p"),e.textContent="Something bad happened, get in contact with us, we can help you.",t=he(),n=Y("pre"),i=$e(r[1]),Z(e,Ut,70,10,2191),Z(n,Ut,73,10,2297)},m:function(s,u){$(s,e,u),$(s,t,u),$(s,n,u),re(n,i)},p:function(s,u){u&2&&hi(i,s[1])},d:function(s){s&&ee(e),s&&ee(t),s&&ee(n)}};return ue("SvelteRegisterBlock",{block:o,id:Lx.name,type:"if",source:"(70:36) ",ctx:r}),o}function Ux(r){let e,t,n,i,o;const a={c:function(){e=Y("h2"),e.textContent="Wrong Key",t=he(),n=Y("button"),n.textContent="Try again",Z(e,Ut,67,10,2054),Z(n,Ut,68,10,2083)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[10],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Ux.name,type:"if",source:"(67:36) ",ctx:r}),a}function Jx(r){let e,t,n;const i={c:function(){e=Y("h2"),e.textContent="Checking",t=he(),n=Y("p"),n.textContent="Checking",Z(e,Ut,64,10,1963),Z(n,Ut,65,10,1991)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Jx.name,type:"if",source:'(64:8) {#if state === \\"CHECK\\"}',ctx:r}),i}function Hx(r){let e,t,n,i,o;const a={c:function(){e=Y("p"),e.textContent="Your score has been updated.",t=he(),n=Y("button"),n.textContent="Close",Z(e,Ut,85,12,2830),Z(n,Ut,86,12,2878)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[8],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Hx.name,type:"if",source:"(85:40) ",ctx:r}),a}function Gx(r){let e,t,n;const i={c:function(){e=Y("p"),e.textContent="Please wait some seconds because blockchains are fast.",t=he(),n=Y("p"),n.textContent=`Keep this window open, wait, cross your fingers, don't enter any + the game.`),ne(n,"href","#/settings"),Z(n,Ut,45,38,1336),Z(e,Ut,43,2,1218)},m:function(s,u){$(s,e,u),re(e,t),re(e,n),re(e,i)},p:We,i:We,o:We,d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:Ox.name,type:"if",source:"(43:0) {#if $fuckFuckFuckFuckFuck}",ctx:r}),o}function Fc(r){let e,t,n,i;function o(l,h){return l[0]==="CHECK"?Hx:l[0]==="WRONG"?Jx:l[0]==="ERROR"?Ux:Lx}let a=o(r),s=a(r);const u={c:function(){e=Y("div"),t=Y("div"),s.c(),Z(t,Ut,62,6,1915),ne(e,"class","thc--chapter-state"),Z(e,Ut,61,4,1860)},m:function(h,b){$(h,e,b),re(e,t),s.m(t,null),i=!0},p:function(h,b){a===(a=o(h))&&s?s.p(h,b):(s.d(1),s=a(h),s&&(s.c(),s.m(t,null)))},i:function(h){i||(zi(()=>{n||(n=Na(e,di,{},!0)),n.run(1)}),i=!0)},o:function(h){n||(n=Na(e,di,{},!1)),n.run(0),i=!1},d:function(h){h&&ee(e),s.d(),h&&n&&n.end()}};return ue("SvelteRegisterBlock",{block:u,id:Fc.name,type:"if",source:'(61:2) {#if state !== \\"IDLE\\"}',ctx:r}),u}function Lx(r){let e,t,n;function i(u,l){if(u[0]==="MINING")return zx;if(u[0]==="SUCCESS")return Gx}let o=i(r),a=o&&o(r);const s={c:function(){e=Y("h2"),e.textContent="Correct Key",t=he(),a&&a.c(),n=Kr(),Z(e,Ut,75,10,2342)},m:function(l,h){$(l,e,h),$(l,t,h),a&&a.m(l,h),$(l,n,h)},p:function(l,h){o===(o=i(l))&&a?a.p(l,h):(a&&a.d(1),a=o&&o(l),a&&(a.c(),a.m(n.parentNode,n)))},d:function(l){l&&ee(e),l&&ee(t),a&&a.d(l),l&&ee(n)}};return ue("SvelteRegisterBlock",{block:s,id:Lx.name,type:"else",source:"(75:8) {:else}",ctx:r}),s}function Ux(r){let e,t,n,i;const o={c:function(){e=Y("p"),e.textContent="Something bad happened, get in contact with us, we can help you.",t=he(),n=Y("pre"),i=$e(r[1]),Z(e,Ut,70,10,2191),Z(n,Ut,73,10,2297)},m:function(s,u){$(s,e,u),$(s,t,u),$(s,n,u),re(n,i)},p:function(s,u){u&2&&hi(i,s[1])},d:function(s){s&&ee(e),s&&ee(t),s&&ee(n)}};return ue("SvelteRegisterBlock",{block:o,id:Ux.name,type:"if",source:"(70:36) ",ctx:r}),o}function Jx(r){let e,t,n,i,o;const a={c:function(){e=Y("h2"),e.textContent="Wrong Key",t=he(),n=Y("button"),n.textContent="Try again",Z(e,Ut,67,10,2054),Z(n,Ut,68,10,2083)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[10],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Jx.name,type:"if",source:"(67:36) ",ctx:r}),a}function Hx(r){let e,t,n;const i={c:function(){e=Y("h2"),e.textContent="Checking",t=he(),n=Y("p"),n.textContent="Checking",Z(e,Ut,64,10,1963),Z(n,Ut,65,10,1991)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Hx.name,type:"if",source:'(64:8) {#if state === \\"CHECK\\"}',ctx:r}),i}function Gx(r){let e,t,n,i,o;const a={c:function(){e=Y("p"),e.textContent="Your score has been updated.",t=he(),n=Y("button"),n.textContent="Close",Z(e,Ut,85,12,2830),Z(n,Ut,86,12,2878)},m:function(u,l){$(u,e,l),$(u,t,l),$(u,n,l),i||(o=Qt(n,"click",r[8],!1,!1,!1),i=!0)},p:We,d:function(u){u&&ee(e),u&&ee(t),u&&ee(n),i=!1,o()}};return ue("SvelteRegisterBlock",{block:a,id:Gx.name,type:"if",source:"(85:40) ",ctx:r}),a}function zx(r){let e,t,n;const i={c:function(){e=Y("p"),e.textContent="Please wait some seconds because blockchains are fast.",t=he(),n=Y("p"),n.textContent=`Keep this window open, wait, cross your fingers, don't enter any Faraday cage, don't drop your mobile phone in the toilet or in any other liquid, make sure you have enough battery left, don't lock - your mobile phone.`,Z(e,Ut,77,12,2410),Z(n,Ut,78,12,2484)},m:function(a,s){$(a,e,s),$(a,t,s),$(a,n,s)},p:We,d:function(a){a&&ee(e),a&&ee(t),a&&ee(n)}};return ue("SvelteRegisterBlock",{block:i,id:Gx.name,type:"if",source:'(77:10) {#if state === \\"MINING\\"}',ctx:r}),i}function Tc(r){let e,t,n,i;const o=[Dx,Ix],a=[];function s(l,h){return l[5]?0:l[4]!==null&&l[3]!==null?1:-1}~(e=s(r))&&(t=a[e]=o[e](r));const u={c:function(){t&&t.c(),n=Kr()},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){~e&&a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?~e&&a[e].p(h,b):(t&&(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn()),~e?(t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n)):t=null)},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){~e&&a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Tc.name,type:"component",source:"",ctx:r}),u}function S4(r,e,t){let n,i,o,a;Rt(Mr,"thc"),Nt(r,Mr,M=>t(3,n=M)),Rt(qr,"signer"),Nt(r,qr,M=>t(4,i=M)),Rt(Gi,"fuckFuckFuckFuckFuck"),Nt(r,Gi,M=>t(5,o=M)),Rt(v0,"lowBalance"),Nt(r,v0,M=>t(6,a=M));let{$$slots:s={},$$scope:u}=e;Or("Keys",s,[]);let l="IDLE",h,b="";async function m(){const M=i.address,B=n;t(0,l="CHECK");const{r:P,s:R,v:I}=await Za(M,b);try{const D=await B.submitKey(I,P,R);console.log(D),t(0,l="MINING");const O=await D.wait();return console.log("Transaction Mined: "+O),console.log(O),t(0,l="SUCCESS"),!0}catch(D){return D.toString().toLowerCase().includes("wrong")?t(0,l="WRONG"):(console.log("error submitting solution",D),t(0,l="ERROR"),t(1,h=D.toString())),!1}}function A(){t(2,b=""),t(0,l="IDLE"),window.scrollTo({top:0,behavior:"smooth"})}const _=[];Object.keys(e).forEach(M=>{!~_.indexOf(M)&&M.slice(0,2)!=="$$"&&M!=="slot"&&C4.warn(` was created with unknown prop '${M}'`)});function S(){b=this.value,t(2,b)}const C=()=>t(0,l="IDLE");return r.$capture_state=()=>({fuckFuckFuckFuckFuck:Gi,thc:Mr,lowBalance:v0,signer:qr,fade:di,signatureFromSolution:Za,state:l,error:h,key:b,onSubmitKey:m,onCloseModal:A,$thc:n,$signer:i,$fuckFuckFuckFuckFuck:o,$lowBalance:a}),r.$inject_state=M=>{"state"in M&&t(0,l=M.state),"error"in M&&t(1,h=M.error),"key"in M&&t(2,b=M.key)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[l,h,b,n,i,o,a,m,A,S,C]}class B4 extends Lr{constructor(e){super(e),Dr(this,e,S4,Tc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Keys",options:e,id:Tc.name})}}var Ro={},k0={},zx={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.randArr=new Array(4);function e(n){let i;for(i=0;i>19^n^n>>8,(r.randArr[3]>>>0)/(1<<31>>>0)}r.random=t})(zx);var qo={};Object.defineProperty(qo,"__esModule",{value:!0});qo.DEFAULT_SIZE=8;qo.DEFAULT_SCALE=4;Object.defineProperty(k0,"__esModule",{value:!0});const ni=zx,ad=qo;function Ba(){let r=Math.floor(ni.random()*360),e=ni.random()*60+40+"%",t=(ni.random()+ni.random()+ni.random()+ni.random())*25+"%";return"hsl("+r+","+e+","+t+")"}k0.createColor=Ba;function M4(r){let e=r,t=r,n=Math.ceil(e/2),i=e-n,o=[];for(let a=0;a{a[m]=null}),Rn()),~e?(t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n)):t=null)},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){~e&&a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Tc.name,type:"component",source:"",ctx:r}),u}function M4(r,e,t){let n,i,o,a;Rt(Mr,"thc"),Nt(r,Mr,M=>t(3,n=M)),Rt(qr,"signer"),Nt(r,qr,M=>t(4,i=M)),Rt(Gi,"fuckFuckFuckFuckFuck"),Nt(r,Gi,M=>t(5,o=M)),Rt(v0,"lowBalance"),Nt(r,v0,M=>t(6,a=M));let{$$slots:s={},$$scope:u}=e;Or("Keys",s,[]);let l="IDLE",h,b="";async function m(){const M=i.address,B=n;t(0,l="CHECK");const{r:P,s:R,v:I}=await Za(M,b);try{const D=await B.submitKey(I,P,R);console.log(D),t(0,l="MINING");const O=await D.wait();return console.log("Transaction Mined: "+O),console.log(O),t(0,l="SUCCESS"),!0}catch(D){return D.toString().toLowerCase().includes("wrong")?t(0,l="WRONG"):(console.log("error submitting solution",D),t(0,l="ERROR"),t(1,h=D.toString())),!1}}function A(){t(2,b=""),t(0,l="IDLE"),window.scrollTo({top:0,behavior:"smooth"})}const _=[];Object.keys(e).forEach(M=>{!~_.indexOf(M)&&M.slice(0,2)!=="$$"&&M!=="slot"&&B4.warn(` was created with unknown prop '${M}'`)});function S(){b=this.value,t(2,b)}const C=()=>t(0,l="IDLE");return r.$capture_state=()=>({fuckFuckFuckFuckFuck:Gi,thc:Mr,lowBalance:v0,signer:qr,fade:di,signatureFromSolution:Za,state:l,error:h,key:b,onSubmitKey:m,onCloseModal:A,$thc:n,$signer:i,$fuckFuckFuckFuckFuck:o,$lowBalance:a}),r.$inject_state=M=>{"state"in M&&t(0,l=M.state),"error"in M&&t(1,h=M.error),"key"in M&&t(2,b=M.key)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[l,h,b,n,i,o,a,m,A,S,C]}class k4 extends Lr{constructor(e){super(e),Dr(this,e,M4,Tc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Keys",options:e,id:Tc.name})}}var No={},k0={},jx={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.randArr=new Array(4);function e(n){let i;for(i=0;i>19^n^n>>8,(r.randArr[3]>>>0)/(1<<31>>>0)}r.random=t})(jx);var W0={},ad;function Xx(){return ad||(ad=1,Object.defineProperty(W0,"__esModule",{value:!0}),W0.DEFAULT_SIZE=8,W0.DEFAULT_SCALE=4),W0}Object.defineProperty(k0,"__esModule",{value:!0});const ni=jx,sd=Xx();function Ba(){let r=Math.floor(ni.random()*360),e=ni.random()*60+40+"%",t=(ni.random()+ni.random()+ni.random()+ni.random())*25+"%";return"hsl("+r+","+e+","+t+")"}k0.createColor=Ba;function P4(r){let e=r,t=r,n=Math.ceil(e/2),i=e-n,o=[];for(let a=0;a{!~u.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(` was created with unknown prop '${l}'`)}),r.$$set=l=>{"address"in l&&t(0,o=l.address),"ensAddresses"in l&&t(1,a=l.ensAddresses),"leaderboard"in l&&t(2,s=l.leaderboard)},r.$capture_state=()=>({ensAddressesRefresh:_x,shortAddress:Ac,blockies:R4,address:o,ensAddresses:a,leaderboard:s}),r.$inject_state=l=>{"address"in l&&t(0,o=l.address),"ensAddresses"in l&&t(1,a=l.ensAddresses),"leaderboard"in l&&t(2,s=l.leaderboard)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o,a,s]}class Kx extends Lr{constructor(e){super(e),Dr(this,e,N4,Uc,Pr,{address:0,ensAddresses:1,leaderboard:2}),ue("SvelteRegisterComponent",{component:this,tagName:"Leaderboard",options:e,id:Uc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("address"in n)&&console.warn(" was created without expected prop 'address'"),t[1]===void 0&&!("ensAddresses"in n)&&console.warn(" was created without expected prop 'ensAddresses'"),t[2]===void 0&&!("leaderboard"in n)&&console.warn(" was created without expected prop 'leaderboard'")}get address(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set address(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get ensAddresses(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set ensAddresses(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get leaderboard(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set leaderboard(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const F4="src/Leaderboard.svelte";function Jc(r){let e,t;e=new Kx({props:{address:r[1],ensAddresses:r[2],leaderboard:r[0]},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:function(o,a){const s={};a&2&&(s.address=o[1]),a&4&&(s.ensAddresses=o[2]),a&1&&(s.leaderboard=o[0]),e.$set(s)},i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:Jc.name,type:"if",source:"(7:0) {#if $leaderboard && $address && $ensAddresses}",ctx:r}),n}function Hc(r){let e,t,n,i,o=r[0]&&r[1]&&r[2]&&Jc(r);const a={c:function(){e=Y("h1"),e.textContent="Leaderboard",t=he(),o&&o.c(),n=Kr(),Z(e,F4,5,0,195)},l:function(u){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(u,l){$(u,e,l),$(u,t,l),o&&o.m(u,l),$(u,n,l),i=!0},p:function(u,[l]){u[0]&&u[1]&&u[2]?o?(o.p(u,l),l&7&&dt(o,1)):(o=Jc(u),o.c(),dt(o,1),o.m(n.parentNode,n)):o&&(Pn(),At(o,1,1,()=>{o=null}),Rn())},i:function(u){i||(dt(o),i=!0)},o:function(u){At(o),i=!1},d:function(u){u&&ee(e),u&&ee(t),o&&o.d(u),u&&ee(n)}};return ue("SvelteRegisterBlock",{block:a,id:Hc.name,type:"component",source:"",ctx:r}),a}function T4(r,e,t){let n,i,o;Rt(Sa,"leaderboard"),Nt(r,Sa,l=>t(0,n=l)),Rt(y0,"address"),Nt(r,y0,l=>t(1,i=l)),Rt(Hf,"ensAddresses"),Nt(r,Hf,l=>t(2,o=l));let{$$slots:a={},$$scope:s}=e;Or("Leaderboard",a,[]);const u=[];return Object.keys(e).forEach(l=>{!~u.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(` was created with unknown prop '${l}'`)}),r.$capture_state=()=>({address:y0,leaderboard:Sa,ensAddresses:Hf,Leaderboard:Kx,$leaderboard:n,$address:i,$ensAddresses:o}),[n,i,o]}class I4 extends Lr{constructor(e){super(e),Dr(this,e,T4,Hc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Leaderboard_1",options:e,id:Hc.name})}}var P0={},D4=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Qx={},Jr={};let Ll;const O4=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Jr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Jr.getSymbolTotalCodewords=function(e){return O4[e]};Jr.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e};Jr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Ll=e};Jr.isKanjiModeEnabled=function(){return typeof Ll<"u"};Jr.toSJIS=function(e){return Ll(e)};var Bs={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,i){if(r.isValid(n))return n;try{return e(n)}catch{return i}}})(Bs);function Wx(){this.buffer=[],this.length=0}Wx.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let t=0;t>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var L4=Wx;function Vo(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}Vo.prototype.set=function(r,e,t,n){const i=r*this.size+e;this.data[i]=t,n&&(this.reservedBit[i]=!0)};Vo.prototype.get=function(r,e){return this.data[r*this.size+e]};Vo.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};Vo.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var U4=Vo,Yx={};(function(r){const e=Jr.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,o=e(n),a=o===145?26:Math.ceil((o-13)/(2*i-2))*2,s=[o-7];for(let u=1;u=0&&i<=7},r.from=function(i){return r.isValid(i)?parseInt(i,10):void 0},r.getPenaltyN1=function(i){const o=i.size;let a=0,s=0,u=0,l=null,h=null;for(let b=0;b=5&&(a+=e.N1+(s-5)),l=A,s=1),A=i.get(m,b),A===h?u++:(u>=5&&(a+=e.N1+(u-5)),h=A,u=1)}s>=5&&(a+=e.N1+(s-5)),u>=5&&(a+=e.N1+(u-5))}return a},r.getPenaltyN2=function(i){const o=i.size;let a=0;for(let s=0;s=10&&(s===1488||s===93)&&a++,u=u<<1&2047|i.get(h,l),h>=10&&(u===1488||u===93)&&a++}return a*e.N3},r.getPenaltyN4=function(i){let o=0;const a=i.data.length;for(let u=0;u=0;){const a=o[0];for(let u=0;u0){const o=new Uint8Array(this.degree);return o.set(n,i),o}return n};var H4=Ul,r2={},vi={},Jl={};Jl.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Un={};const n2="[0-9]+",G4="[A-Z $%*+\\-./:]+";let No="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";No=No.replace(/u/g,"\\u");const z4="(?:(?![A-Z0-9 $%*+\\-./:]|"+No+`)(?:.|[\r -]))+`;Un.KANJI=new RegExp(No,"g");Un.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Un.BYTE=new RegExp(z4,"g");Un.NUMERIC=new RegExp(n2,"g");Un.ALPHANUMERIC=new RegExp(G4,"g");const j4=new RegExp("^"+No+"$"),X4=new RegExp("^"+n2+"$"),q4=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Un.testKanji=function(e){return j4.test(e)};Un.testNumeric=function(e){return X4.test(e)};Un.testAlphanumeric=function(e){return q4.test(e)};(function(r){const e=Jl,t=Un;r.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},r.getBestModeForData=function(o){return t.testNumeric(o)?r.NUMERIC:t.testAlphanumeric(o)?r.ALPHANUMERIC:t.testKanji(o)?r.KANJI:r.BYTE},r.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},r.isValid=function(o){return o&&o.bit&&o.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+i)}}r.from=function(o,a){if(r.isValid(o))return o;try{return n(o)}catch{return a}}})(vi);(function(r){const e=Jr,t=Ms,n=Bs,i=vi,o=Jl,a=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,s=e.getBCHDigit(a);function u(m,A,_){for(let S=1;S<=40;S++)if(A<=r.getCapacity(S,_,m))return S}function l(m,A){return i.getCharCountIndicator(m,A)+4}function h(m,A){let _=0;return m.forEach(function(S){_+=l(S.mode,A)+S.getBitsLength()}),_}function b(m,A){for(let _=1;_<=40;_++)if(h(m,_)<=r.getCapacity(_,A,i.MIXED))return _}r.from=function(A,_){return o.isValid(A)?parseInt(A,10):_},r.getCapacity=function(A,_,S){if(!o.isValid(A))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=i.BYTE);const C=e.getSymbolTotalCodewords(A),M=t.getTotalCodewordsCount(A,_),B=(C-M)*8;if(S===i.MIXED)return B;const P=B-l(S,A);switch(S){case i.NUMERIC:return Math.floor(P/10*3);case i.ALPHANUMERIC:return Math.floor(P/11*2);case i.KANJI:return Math.floor(P/13);case i.BYTE:default:return Math.floor(P/8)}},r.getBestVersionForData=function(A,_){let S;const C=n.from(_,n.M);if(Array.isArray(A)){if(A.length>1)return b(A,C);if(A.length===0)return 1;S=A[0]}else S=A;return u(S.mode,S.getLength(),C)},r.getEncodedBits=function(A){if(!o.isValid(A)||A<7)throw new Error("Invalid QR Code version");let _=A<<12;for(;e.getBCHDigit(_)-s>=0;)_^=a<=0;)i^=o2<0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,o*3+1))};var Q4=R0;const W4=vi,Gf=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function N0(r){this.mode=W4.ALPHANUMERIC,this.data=r}N0.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};N0.prototype.getLength=function(){return this.data.length};N0.prototype.getBitsLength=function(){return N0.getBitsLength(this.data.length)};N0.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=Gf.indexOf(this.data[t])*45;n+=Gf.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(Gf.indexOf(this.data[t]),6)};var Y4=N0,Z4=function(e){for(var t=[],n=e.length,i=0;i=55296&&o<=56319&&n>i+1){var a=e.charCodeAt(i+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,i+=1)}if(o<128){t.push(o);continue}if(o<2048){t.push(o>>6|192),t.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){t.push(o>>12|224),t.push(o>>6&63|128),t.push(o&63|128);continue}if(o>=65536&&o<=1114111){t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const $4=Z4,ev=vi;function F0(r){this.mode=ev.BYTE,typeof r=="string"&&(r=$4(r)),this.data=new Uint8Array(r)}F0.getBitsLength=function(e){return e*8};F0.prototype.getLength=function(){return this.data.length};F0.prototype.getBitsLength=function(){return F0.getBitsLength(this.data.length)};F0.prototype.write=function(r){for(let e=0,t=this.data.length;e=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` -Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var iv=T0,s2={exports:{}};(function(r){var e={single_source_shortest_paths:function(t,n,i){var o={},a={};a[n]=0;var s=e.PriorityQueue.make();s.push(n,0);for(var u,l,h,b,m,A,_,S,C;!s.empty();){u=s.pop(),l=u.value,b=u.cost,m=t[l]||{};for(h in m)m.hasOwnProperty(h)&&(A=m[h],_=b+A,S=a[h],C=typeof a[h]>"u",(C||S>_)&&(a[h]=_,s.push(h,_),o[h]=l))}if(typeof i<"u"&&typeof a[i]>"u"){var M=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(M)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var i=[],o=n;o;)i.push(o),t[o],o=t[o];return i.reverse(),i},find_path:function(t,n,i){var o=e.single_source_shortest_paths(t,n,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,i={},o;t=t||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var i={value:t,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(s2);(function(r){const e=vi,t=Q4,n=Y4,i=tv,o=iv,a=Un,s=Jr,u=s2.exports;function l(M){return unescape(encodeURIComponent(M)).length}function h(M,B,P){const R=[];let I;for(;(I=M.exec(P))!==null;)R.push({data:I[0],index:I.index,mode:B,length:I[0].length});return R}function b(M){const B=h(a.NUMERIC,e.NUMERIC,M),P=h(a.ALPHANUMERIC,e.ALPHANUMERIC,M);let R,I;return s.isKanjiModeEnabled()?(R=h(a.BYTE,e.BYTE,M),I=h(a.KANJI,e.KANJI,M)):(R=h(a.BYTE_KANJI,e.BYTE,M),I=[]),B.concat(P,R,I).sort(function(O,J){return O.index-J.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function m(M,B){switch(B){case e.NUMERIC:return t.getBitsLength(M);case e.ALPHANUMERIC:return n.getBitsLength(M);case e.KANJI:return o.getBitsLength(M);case e.BYTE:return i.getBitsLength(M)}}function A(M){return M.reduce(function(B,P){const R=B.length-1>=0?B[B.length-1]:null;return R&&R.mode===P.mode?(B[B.length-1].data+=P.data,B):(B.push(P),B)},[])}function _(M){const B=[];for(let P=0;P=0&&s<=6&&(u===0||u===6)||u>=0&&u<=6&&(s===0||s===6)||s>=2&&s<=4&&u>=2&&u<=4?r.set(o+s,a+u,!0,!0):r.set(o+s,a+u,!1,!0))}}function dv(r){const e=r.size;for(let t=8;t>s&1)===1,r.set(i,o,a,!0),r.set(o,i,a,!0)}function Xf(r,e,t){const n=r.size,i=lv.getEncodedBits(e,t);let o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?r.set(o,8,a,!0):o<8?r.set(o+1,8,a,!0):r.set(n-15+o,8,a,!0),o<8?r.set(8,n-o-1,a,!0):o<9?r.set(8,15-o-1+1,a,!0):r.set(8,15-o-1,a,!0);r.set(n-8,8,1,!0)}function bv(r,e){const t=r.size;let n=-1,i=t-1,o=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let u=0;u<2;u++)if(!r.isReserved(i,s-u)){let l=!1;a>>o&1)===1),r.set(i,s-u,l),o--,o===-1&&(a++,o=7)}if(i+=n,i<0||t<=i){i-=n,n=-n;break}}}function gv(r,e,t){const n=new ov;t.forEach(function(u){n.put(u.mode.bit,4),n.put(u.getLength(),uv.getCharCountIndicator(u.mode,r)),u.write(n)});const i=Ps.getSymbolTotalCodewords(r),o=jc.getTotalCodewordsCount(r,e),a=(i-o)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const s=(a-n.getLengthInBits())/8;for(let u=0;u{!~u.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(` was created with unknown prop '${l}'`)}),r.$$set=l=>{"address"in l&&t(0,o=l.address),"ensAddresses"in l&&t(1,a=l.ensAddresses),"leaderboard"in l&&t(2,s=l.leaderboard)},r.$capture_state=()=>({ensAddressesRefresh:Cx,shortAddress:Ac,blockies:F4,address:o,ensAddresses:a,leaderboard:s}),r.$inject_state=l=>{"address"in l&&t(0,o=l.address),"ensAddresses"in l&&t(1,a=l.ensAddresses),"leaderboard"in l&&t(2,s=l.leaderboard)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[o,a,s]}class Wx extends Lr{constructor(e){super(e),Dr(this,e,T4,Uc,Pr,{address:0,ensAddresses:1,leaderboard:2}),ue("SvelteRegisterComponent",{component:this,tagName:"Leaderboard",options:e,id:Uc.name});const{ctx:t}=this.$$,n=e.props||{};t[0]===void 0&&!("address"in n)&&console.warn(" was created without expected prop 'address'"),t[1]===void 0&&!("ensAddresses"in n)&&console.warn(" was created without expected prop 'ensAddresses'"),t[2]===void 0&&!("leaderboard"in n)&&console.warn(" was created without expected prop 'leaderboard'")}get address(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set address(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get ensAddresses(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set ensAddresses(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}get leaderboard(){throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''")}set leaderboard(e){throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''")}}const I4="src/Leaderboard.svelte";function Jc(r){let e,t;e=new Wx({props:{address:r[1],ensAddresses:r[2],leaderboard:r[0]},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:function(o,a){const s={};a&2&&(s.address=o[1]),a&4&&(s.ensAddresses=o[2]),a&1&&(s.leaderboard=o[0]),e.$set(s)},i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:Jc.name,type:"if",source:"(7:0) {#if $leaderboard && $address && $ensAddresses}",ctx:r}),n}function Hc(r){let e,t,n,i,o=r[0]&&r[1]&&r[2]&&Jc(r);const a={c:function(){e=Y("h1"),e.textContent="Leaderboard",t=he(),o&&o.c(),n=Kr(),Z(e,I4,5,0,195)},l:function(u){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(u,l){$(u,e,l),$(u,t,l),o&&o.m(u,l),$(u,n,l),i=!0},p:function(u,[l]){u[0]&&u[1]&&u[2]?o?(o.p(u,l),l&7&&dt(o,1)):(o=Jc(u),o.c(),dt(o,1),o.m(n.parentNode,n)):o&&(Pn(),At(o,1,1,()=>{o=null}),Rn())},i:function(u){i||(dt(o),i=!0)},o:function(u){At(o),i=!1},d:function(u){u&&ee(e),u&&ee(t),o&&o.d(u),u&&ee(n)}};return ue("SvelteRegisterBlock",{block:a,id:Hc.name,type:"component",source:"",ctx:r}),a}function D4(r,e,t){let n,i,o;Rt(Sa,"leaderboard"),Nt(r,Sa,l=>t(0,n=l)),Rt(y0,"address"),Nt(r,y0,l=>t(1,i=l)),Rt(Hf,"ensAddresses"),Nt(r,Hf,l=>t(2,o=l));let{$$slots:a={},$$scope:s}=e;Or("Leaderboard",a,[]);const u=[];return Object.keys(e).forEach(l=>{!~u.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(` was created with unknown prop '${l}'`)}),r.$capture_state=()=>({address:y0,leaderboard:Sa,ensAddresses:Hf,Leaderboard:Wx,$leaderboard:n,$address:i,$ensAddresses:o}),[n,i,o]}class O4 extends Lr{constructor(e){super(e),Dr(this,e,D4,Hc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Leaderboard_1",options:e,id:Hc.name})}}var P0={},L4=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Yx={},Jr={};let Ll;const U4=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Jr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Jr.getSymbolTotalCodewords=function(e){return U4[e]};Jr.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e};Jr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Ll=e};Jr.isKanjiModeEnabled=function(){return typeof Ll<"u"};Jr.toSJIS=function(e){return Ll(e)};var Bs={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,i){if(r.isValid(n))return n;try{return e(n)}catch{return i}}})(Bs);function Zx(){this.buffer=[],this.length=0}Zx.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let t=0;t>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var J4=Zx;function Vo(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}Vo.prototype.set=function(r,e,t,n){const i=r*this.size+e;this.data[i]=t,n&&(this.reservedBit[i]=!0)};Vo.prototype.get=function(r,e){return this.data[r*this.size+e]};Vo.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};Vo.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var H4=Vo,$x={};(function(r){const e=Jr.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,o=e(n),a=o===145?26:Math.ceil((o-13)/(2*i-2))*2,s=[o-7];for(let u=1;u=0&&i<=7},r.from=function(i){return r.isValid(i)?parseInt(i,10):void 0},r.getPenaltyN1=function(i){const o=i.size;let a=0,s=0,u=0,l=null,h=null;for(let b=0;b=5&&(a+=e.N1+(s-5)),l=A,s=1),A=i.get(m,b),A===h?u++:(u>=5&&(a+=e.N1+(u-5)),h=A,u=1)}s>=5&&(a+=e.N1+(s-5)),u>=5&&(a+=e.N1+(u-5))}return a},r.getPenaltyN2=function(i){const o=i.size;let a=0;for(let s=0;s=10&&(s===1488||s===93)&&a++,u=u<<1&2047|i.get(h,l),h>=10&&(u===1488||u===93)&&a++}return a*e.N3},r.getPenaltyN4=function(i){let o=0;const a=i.data.length;for(let u=0;u=0;){const a=o[0];for(let u=0;u0){const o=new Uint8Array(this.degree);return o.set(n,i),o}return n};var z4=Ul,i2={},vi={},Jl={};Jl.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Un={};const o2="[0-9]+",j4="[A-Z $%*+\\-./:]+";let Fo="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Fo=Fo.replace(/u/g,"\\u");const X4="(?:(?![A-Z0-9 $%*+\\-./:]|"+Fo+`)(?:.|[\r +]))+`;Un.KANJI=new RegExp(Fo,"g");Un.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Un.BYTE=new RegExp(X4,"g");Un.NUMERIC=new RegExp(o2,"g");Un.ALPHANUMERIC=new RegExp(j4,"g");const q4=new RegExp("^"+Fo+"$"),V4=new RegExp("^"+o2+"$"),K4=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Un.testKanji=function(e){return q4.test(e)};Un.testNumeric=function(e){return V4.test(e)};Un.testAlphanumeric=function(e){return K4.test(e)};(function(r){const e=Jl,t=Un;r.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},r.getBestModeForData=function(o){return t.testNumeric(o)?r.NUMERIC:t.testAlphanumeric(o)?r.ALPHANUMERIC:t.testKanji(o)?r.KANJI:r.BYTE},r.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},r.isValid=function(o){return o&&o.bit&&o.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+i)}}r.from=function(o,a){if(r.isValid(o))return o;try{return n(o)}catch{return a}}})(vi);(function(r){const e=Jr,t=Ms,n=Bs,i=vi,o=Jl,a=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,s=e.getBCHDigit(a);function u(m,A,_){for(let S=1;S<=40;S++)if(A<=r.getCapacity(S,_,m))return S}function l(m,A){return i.getCharCountIndicator(m,A)+4}function h(m,A){let _=0;return m.forEach(function(S){_+=l(S.mode,A)+S.getBitsLength()}),_}function b(m,A){for(let _=1;_<=40;_++)if(h(m,_)<=r.getCapacity(_,A,i.MIXED))return _}r.from=function(A,_){return o.isValid(A)?parseInt(A,10):_},r.getCapacity=function(A,_,S){if(!o.isValid(A))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=i.BYTE);const C=e.getSymbolTotalCodewords(A),M=t.getTotalCodewordsCount(A,_),B=(C-M)*8;if(S===i.MIXED)return B;const P=B-l(S,A);switch(S){case i.NUMERIC:return Math.floor(P/10*3);case i.ALPHANUMERIC:return Math.floor(P/11*2);case i.KANJI:return Math.floor(P/13);case i.BYTE:default:return Math.floor(P/8)}},r.getBestVersionForData=function(A,_){let S;const C=n.from(_,n.M);if(Array.isArray(A)){if(A.length>1)return b(A,C);if(A.length===0)return 1;S=A[0]}else S=A;return u(S.mode,S.getLength(),C)},r.getEncodedBits=function(A){if(!o.isValid(A)||A<7)throw new Error("Invalid QR Code version");let _=A<<12;for(;e.getBCHDigit(_)-s>=0;)_^=a<=0;)i^=s2<0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,o*3+1))};var Y4=R0;const Z4=vi,Gf=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function N0(r){this.mode=Z4.ALPHANUMERIC,this.data=r}N0.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};N0.prototype.getLength=function(){return this.data.length};N0.prototype.getBitsLength=function(){return N0.getBitsLength(this.data.length)};N0.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=Gf.indexOf(this.data[t])*45;n+=Gf.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(Gf.indexOf(this.data[t]),6)};var $4=N0,ev=function(e){for(var t=[],n=e.length,i=0;i=55296&&o<=56319&&n>i+1){var a=e.charCodeAt(i+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,i+=1)}if(o<128){t.push(o);continue}if(o<2048){t.push(o>>6|192),t.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){t.push(o>>12|224),t.push(o>>6&63|128),t.push(o&63|128);continue}if(o>=65536&&o<=1114111){t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const tv=ev,rv=vi;function F0(r){this.mode=rv.BYTE,typeof r=="string"&&(r=tv(r)),this.data=new Uint8Array(r)}F0.getBitsLength=function(e){return e*8};F0.prototype.getLength=function(){return this.data.length};F0.prototype.getBitsLength=function(){return F0.getBitsLength(this.data.length)};F0.prototype.write=function(r){for(let e=0,t=this.data.length;e=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var av=T0,c2={exports:{}};(function(r){var e={single_source_shortest_paths:function(t,n,i){var o={},a={};a[n]=0;var s=e.PriorityQueue.make();s.push(n,0);for(var u,l,h,b,m,A,_,S,C;!s.empty();){u=s.pop(),l=u.value,b=u.cost,m=t[l]||{};for(h in m)m.hasOwnProperty(h)&&(A=m[h],_=b+A,S=a[h],C=typeof a[h]>"u",(C||S>_)&&(a[h]=_,s.push(h,_),o[h]=l))}if(typeof i<"u"&&typeof a[i]>"u"){var M=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(M)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var i=[],o=n;o;)i.push(o),t[o],o=t[o];return i.reverse(),i},find_path:function(t,n,i){var o=e.single_source_shortest_paths(t,n,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,i={},o;t=t||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var i={value:t,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(c2);(function(r){const e=vi,t=Y4,n=$4,i=nv,o=av,a=Un,s=Jr,u=c2.exports;function l(M){return unescape(encodeURIComponent(M)).length}function h(M,B,P){const R=[];let I;for(;(I=M.exec(P))!==null;)R.push({data:I[0],index:I.index,mode:B,length:I[0].length});return R}function b(M){const B=h(a.NUMERIC,e.NUMERIC,M),P=h(a.ALPHANUMERIC,e.ALPHANUMERIC,M);let R,I;return s.isKanjiModeEnabled()?(R=h(a.BYTE,e.BYTE,M),I=h(a.KANJI,e.KANJI,M)):(R=h(a.BYTE_KANJI,e.BYTE,M),I=[]),B.concat(P,R,I).sort(function(O,J){return O.index-J.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function m(M,B){switch(B){case e.NUMERIC:return t.getBitsLength(M);case e.ALPHANUMERIC:return n.getBitsLength(M);case e.KANJI:return o.getBitsLength(M);case e.BYTE:return i.getBitsLength(M)}}function A(M){return M.reduce(function(B,P){const R=B.length-1>=0?B[B.length-1]:null;return R&&R.mode===P.mode?(B[B.length-1].data+=P.data,B):(B.push(P),B)},[])}function _(M){const B=[];for(let P=0;P=0&&s<=6&&(u===0||u===6)||u>=0&&u<=6&&(s===0||s===6)||s>=2&&s<=4&&u>=2&&u<=4?r.set(o+s,a+u,!0,!0):r.set(o+s,a+u,!1,!0))}}function xv(r){const e=r.size;for(let t=8;t>s&1)===1,r.set(i,o,a,!0),r.set(o,i,a,!0)}function Xf(r,e,t){const n=r.size,i=hv.getEncodedBits(e,t);let o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?r.set(o,8,a,!0):o<8?r.set(o+1,8,a,!0):r.set(n-15+o,8,a,!0),o<8?r.set(8,n-o-1,a,!0):o<9?r.set(8,15-o-1+1,a,!0):r.set(8,15-o-1,a,!0);r.set(n-8,8,1,!0)}function mv(r,e){const t=r.size;let n=-1,i=t-1,o=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let u=0;u<2;u++)if(!r.isReserved(i,s-u)){let l=!1;a>>o&1)===1),r.set(i,s-u,l),o--,o===-1&&(a++,o=7)}if(i+=n,i<0||t<=i){i-=n,n=-n;break}}}function yv(r,e,t){const n=new sv;t.forEach(function(u){n.put(u.mode.bit,4),n.put(u.getLength(),dv.getCharCountIndicator(u.mode,r)),u.write(n)});const i=Ps.getSymbolTotalCodewords(r),o=jc.getTotalCodewordsCount(r,e),a=(i-o)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const s=(a-n.getLengthInBits())/8;for(let u=0;u=7&&xv(u,e),bv(u,a),isNaN(n)&&(n=zc.getBestMask(u,Xf.bind(null,u,t))),zc.applyMask(n,u),Xf(u,t,n),{modules:u,version:e,errorCorrectionLevel:t,maskPattern:n,segments:i}}Qx.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let n=zf.M,i,o;return typeof t<"u"&&(n=zf.from(t.errorCorrectionLevel,zf.M),i=es.from(t.version),o=zc.from(t.maskPattern),t.toSJISFunc&&Ps.setToSJISFunction(t.toSJISFunc)),yv(e,i,n,o)};var f2={},Hl={};(function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(o){return[o,o]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,o=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:o,scale:o?4:a,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},r.getImageWidth=function(n,i){const o=r.getScale(n,i);return Math.floor((n+i.margin*2)*o)},r.qrToImageData=function(n,i,o){const a=i.modules.size,s=i.modules.data,u=r.getScale(a,o),l=Math.floor((a+o.margin*2)*u),h=o.margin*u,b=[o.color.light,o.color.dark];for(let m=0;m=h&&A>=h&&m"u"&&(!a||!a.getContext)&&(u=a,a=void 0),a||(l=n()),u=e.getOptions(u);const h=e.getImageWidth(o.modules.size,u),b=l.getContext("2d"),m=b.createImageData(h,h);return e.qrToImageData(m.data,o,u),t(b,l,h),b.putImageData(m,0,0),l},r.renderToDataURL=function(o,a,s){let u=s;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),u||(u={});const l=r.render(o,a,u),h=u.type||"image/png",b=u.rendererOpts||{};return l.toDataURL(h,b.quality)}})(f2);var c2={};const vv=Hl;function ud(r,e){const t=r.a/255,n=e+'="'+r.hex+'"';return t<1?n+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function qf(r,e,t){let n=r+e;return typeof t<"u"&&(n+=" "+t),n}function wv(r,e,t){let n="",i=0,o=!1,a=0;for(let s=0;s0&&u>0&&r[s-1]||(n+=o?qf("M",u+t,.5+l+t):qf("m",i,0),i=0,o=!1),u+1':"",l="',h='viewBox="0 0 '+s+" "+s+'"',b=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",m=''+u+l+` -`;return typeof n=="function"&&n(null,m),m};const Av=D4,Xc=Qx,l2=f2,Ev=c2;function Gl(r,e,t,n,i){const o=[].slice.call(arguments,1),a=o.length,s=typeof o[a-1]=="function";if(!s&&!Av())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(i=t,t=e,e=n=void 0):a===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=t,t=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=e,e=n=void 0):a===2&&!e.getContext&&(n=t,t=e,e=void 0),new Promise(function(u,l){try{const h=Xc.create(t,n);u(r(h,e,n))}catch(h){l(h)}})}try{const u=Xc.create(t,n);i(null,r(u,e,n))}catch(u){i(u)}}P0.create=Xc.create;P0.toCanvas=Gl.bind(null,l2.render);P0.toDataURL=Gl.bind(null,l2.renderToDataURL);P0.toString=Gl.bind(null,function(r,e,t){return Ev.render(r,t)});const ut="src/Settings.svelte";function u2(r){let e;const t={c:function(){e=$e("loading\u2026")},m:function(i,o){$(i,e,o)},p:We,d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:u2.name,type:"else",source:"(81:2) {:else}",ctx:r}),t}function h2(r){let e,t=r[9].address+"",n,i;const o={c:function(){e=Y("a"),n=$e(t),ne(e,"href",i="https://sepolia.etherscan.io/address/"+r[9].address),ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,77,4,1901)},m:function(s,u){$(s,e,u),re(e,n)},p:function(s,u){u&512&&t!==(t=s[9].address+"")&&hi(n,t),u&512&&i!==(i="https://sepolia.etherscan.io/address/"+s[9].address)&&ne(e,"href",i)},d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:h2.name,type:"if",source:"(77:2) {#if $thc}",ctx:r}),o}function d2(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("label"),t=$e(`Mnemonic +`);const a=yv(e,t,i),s=Ps.getSymbolSize(e),u=new fv(s);return pv(u,e),xv(u),bv(u,e),Xf(u,t,0),e>=7&&gv(u,e),mv(u,a),isNaN(n)&&(n=zc.getBestMask(u,Xf.bind(null,u,t))),zc.applyMask(n,u),Xf(u,t,n),{modules:u,version:e,errorCorrectionLevel:t,maskPattern:n,segments:i}}Yx.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let n=zf.M,i,o;return typeof t<"u"&&(n=zf.from(t.errorCorrectionLevel,zf.M),i=es.from(t.version),o=zc.from(t.maskPattern),t.toSJISFunc&&Ps.setToSJISFunction(t.toSJISFunc)),wv(e,i,n,o)};var l2={},Hl={};(function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(o){return[o,o]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,o=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:o,scale:o?4:a,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},r.getImageWidth=function(n,i){const o=r.getScale(n,i);return Math.floor((n+i.margin*2)*o)},r.qrToImageData=function(n,i,o){const a=i.modules.size,s=i.modules.data,u=r.getScale(a,o),l=Math.floor((a+o.margin*2)*u),h=o.margin*u,b=[o.color.light,o.color.dark];for(let m=0;m=h&&A>=h&&m"u"&&(!a||!a.getContext)&&(u=a,a=void 0),a||(l=n()),u=e.getOptions(u);const h=e.getImageWidth(o.modules.size,u),b=l.getContext("2d"),m=b.createImageData(h,h);return e.qrToImageData(m.data,o,u),t(b,l,h),b.putImageData(m,0,0),l},r.renderToDataURL=function(o,a,s){let u=s;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),u||(u={});const l=r.render(o,a,u),h=u.type||"image/png",b=u.rendererOpts||{};return l.toDataURL(h,b.quality)}})(l2);var u2={};const Av=Hl;function hd(r,e){const t=r.a/255,n=e+'="'+r.hex+'"';return t<1?n+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function qf(r,e,t){let n=r+e;return typeof t<"u"&&(n+=" "+t),n}function Ev(r,e,t){let n="",i=0,o=!1,a=0;for(let s=0;s0&&u>0&&r[s-1]||(n+=o?qf("M",u+t,.5+l+t):qf("m",i,0),i=0,o=!1),u+1':"",l="',h='viewBox="0 0 '+s+" "+s+'"',b=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",m=''+u+l+` +`;return typeof n=="function"&&n(null,m),m};const _v=L4,Xc=Yx,h2=l2,Cv=u2;function Gl(r,e,t,n,i){const o=[].slice.call(arguments,1),a=o.length,s=typeof o[a-1]=="function";if(!s&&!_v())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(i=t,t=e,e=n=void 0):a===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=t,t=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=e,e=n=void 0):a===2&&!e.getContext&&(n=t,t=e,e=void 0),new Promise(function(u,l){try{const h=Xc.create(t,n);u(r(h,e,n))}catch(h){l(h)}})}try{const u=Xc.create(t,n);i(null,r(u,e,n))}catch(u){i(u)}}P0.create=Xc.create;P0.toCanvas=Gl.bind(null,h2.render);P0.toDataURL=Gl.bind(null,h2.renderToDataURL);P0.toString=Gl.bind(null,function(r,e,t){return Cv.render(r,t)});const ut="src/Settings.svelte";function d2(r){let e;const t={c:function(){e=$e("loading\u2026")},m:function(i,o){$(i,e,o)},p:We,d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:d2.name,type:"else",source:"(81:2) {:else}",ctx:r}),t}function p2(r){let e,t=r[9].address+"",n,i;const o={c:function(){e=Y("a"),n=$e(t),ne(e,"href",i="https://sepolia.etherscan.io/address/"+r[9].address),ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,77,4,1901)},m:function(s,u){$(s,e,u),re(e,n)},p:function(s,u){u&512&&t!==(t=s[9].address+"")&&hi(n,t),u&512&&i!==(i="https://sepolia.etherscan.io/address/"+s[9].address)&&ne(e,"href",i)},d:function(s){s&&ee(e)}};return ue("SvelteRegisterBlock",{block:o,id:p2.name,type:"if",source:"(77:2) {#if $thc}",ctx:r}),o}function x2(r){let e,t,n,i,o,a,s,u;const l={c:function(){e=Y("label"),t=$e(`Mnemonic `),n=Y("textarea"),i=he(),o=Y("label"),a=$e(`Game State - `),s=Y("input"),n.readOnly=!0,n.value=r[6],ne(n,"class","s-g4Ms0k5s1Xlv"),Z(n,ut,102,4,2389),ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,100,2,2364),s.readOnly=!0,s.value=u=window.btoa(JSON.stringify(r[5])),ne(s,"class","s-g4Ms0k5s1Xlv"),Z(s,ut,106,4,2471),ne(o,"class","s-g4Ms0k5s1Xlv"),Z(o,ut,104,2,2444)},m:function(b,m){$(b,e,m),re(e,t),re(e,n),$(b,i,m),$(b,o,m),re(o,a),re(o,s)},p:function(b,m){m&64&&ji(n,"value",b[6]),m&32&&u!==(u=window.btoa(JSON.stringify(b[5])))&&s.value!==u&&ji(s,"value",u)},d:function(b){b&&ee(e),b&&ee(i),b&&ee(o)}};return ue("SvelteRegisterBlock",{block:l,id:d2.name,type:"else",source:"(100:0) {:else}",ctx:r}),l}function p2(r){let e,t,n;const i={c:function(){e=Y("button"),e.textContent="Reveal secrets",ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,98,2,2289)},m:function(a,s){$(a,e,s),t||(n=Qt(e,"click",r[14],!1,!1,!1),t=!0)},p:We,d:function(a){a&&ee(e),t=!1,n()}};return ue("SvelteRegisterBlock",{block:i,id:p2.name,type:"if",source:"(98:0) {#if !reveal}",ctx:r}),i}function qc(r){let e,t,n,i,o,a=(r[7]?r[7].address:"loading\u2026")+"",s,u,l,h,b,m,A,_=r[8]?Ir.formatEther(r[8])+" Ether":"loading\u2026",S,C,M,B,P,R,I,D,O,J,X,H,L,j,v,f,p,g,w,E,k,F,x,c,y,T,d,N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae;function xe(wt,W){return wt[9]?h2:u2}let ft=xe(r),de=ft(r);function Ce(wt,W){return wt[0]?d2:p2}let St=Ce(r),pe=St(r);const Ee={c:function(){e=Y("h1"),e.textContent="Settings",t=he(),n=Y("h2"),n.textContent="Wallet address",i=he(),o=Y("p"),s=$e(a),u=he(),l=Y("canvas"),h=he(),b=Y("h2"),b.textContent="Wallet balance",m=he(),A=Y("p"),S=$e(_),C=he(),M=Y("h2"),M.textContent="Network",B=he(),P=Y("p"),P.textContent="Sepolia",R=he(),I=Y("h2"),I.textContent="Smart Contract",D=he(),O=Y("p"),de.c(),J=he(),X=Y("h2"),X.textContent="Change Seedphrase",H=he(),L=Y("form"),j=Y("label"),v=$e(`Mnemonic + `),s=Y("input"),n.readOnly=!0,n.value=r[6],ne(n,"class","s-g4Ms0k5s1Xlv"),Z(n,ut,102,4,2389),ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,100,2,2364),s.readOnly=!0,s.value=u=window.btoa(JSON.stringify(r[5])),ne(s,"class","s-g4Ms0k5s1Xlv"),Z(s,ut,106,4,2471),ne(o,"class","s-g4Ms0k5s1Xlv"),Z(o,ut,104,2,2444)},m:function(b,m){$(b,e,m),re(e,t),re(e,n),$(b,i,m),$(b,o,m),re(o,a),re(o,s)},p:function(b,m){m&64&&ji(n,"value",b[6]),m&32&&u!==(u=window.btoa(JSON.stringify(b[5])))&&s.value!==u&&ji(s,"value",u)},d:function(b){b&&ee(e),b&&ee(i),b&&ee(o)}};return ue("SvelteRegisterBlock",{block:l,id:x2.name,type:"else",source:"(100:0) {:else}",ctx:r}),l}function b2(r){let e,t,n;const i={c:function(){e=Y("button"),e.textContent="Reveal secrets",ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,98,2,2289)},m:function(a,s){$(a,e,s),t||(n=Qt(e,"click",r[14],!1,!1,!1),t=!0)},p:We,d:function(a){a&&ee(e),t=!1,n()}};return ue("SvelteRegisterBlock",{block:i,id:b2.name,type:"if",source:"(98:0) {#if !reveal}",ctx:r}),i}function qc(r){let e,t,n,i,o,a=(r[7]?r[7].address:"loading\u2026")+"",s,u,l,h,b,m,A,_=r[8]?Ir.formatEther(r[8])+" Ether":"loading\u2026",S,C,M,B,P,R,I,D,O,J,X,H,L,j,v,f,p,g,w,E,k,F,x,c,y,T,d,N,G,U,z,te,K,V,me,Q,oe,xt,we,ge,Ct,Ae;function xe(wt,W){return wt[9]?p2:d2}let ft=xe(r),de=ft(r);function Ce(wt,W){return wt[0]?x2:b2}let St=Ce(r),pe=St(r);const Ee={c:function(){e=Y("h1"),e.textContent="Settings",t=he(),n=Y("h2"),n.textContent="Wallet address",i=he(),o=Y("p"),s=$e(a),u=he(),l=Y("canvas"),h=he(),b=Y("h2"),b.textContent="Wallet balance",m=he(),A=Y("p"),S=$e(_),C=he(),M=Y("h2"),M.textContent="Network",B=he(),P=Y("p"),P.textContent="Sepolia",R=he(),I=Y("h2"),I.textContent="Smart Contract",D=he(),O=Y("p"),de.c(),J=he(),X=Y("h2"),X.textContent="Change Seedphrase",H=he(),L=Y("form"),j=Y("label"),v=$e(`Mnemonic `),f=Y("textarea"),p=he(),g=Y("button"),g.textContent="Change",w=he(),E=Y("h2"),E.textContent="Mnemonic and game secret",k=he(),pe.c(),F=he(),x=Y("h2"),x.textContent="Restore game",c=he(),y=Y("form"),T=Y("label"),d=$e(`Mnemonic `),N=Y("textarea"),G=he(),U=Y("label"),z=$e(`Game State - `),te=Y("input"),K=he(),V=Y("button"),V.textContent="Restore",me=he(),Q=Y("h2"),Q.textContent="Reset",oe=he(),xt=Y("p"),xt.textContent="Reset the current session, you'll start from Chapter 0 again",we=he(),ge=Y("button"),ge.textContent="Reset game",ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,53,0,1567),ne(n,"class","s-g4Ms0k5s1Xlv"),Z(n,ut,55,0,1586),ne(o,"class","scroll s-g4Ms0k5s1Xlv"),Z(o,ut,57,0,1611),ne(l,"class","s-g4Ms0k5s1Xlv"),Z(l,ut,61,0,1679),ne(b,"class","s-g4Ms0k5s1Xlv"),Z(b,ut,63,0,1710),ne(A,"class","s-g4Ms0k5s1Xlv"),Z(A,ut,65,0,1735),ne(M,"class","s-g4Ms0k5s1Xlv"),Z(M,ut,69,0,1806),ne(P,"class","s-g4Ms0k5s1Xlv"),Z(P,ut,71,0,1824),ne(I,"class","s-g4Ms0k5s1Xlv"),Z(I,ut,73,0,1840),ne(O,"class","scroll s-g4Ms0k5s1Xlv"),Z(O,ut,75,0,1865),ne(X,"class","s-g4Ms0k5s1Xlv"),Z(X,ut,85,0,2031),ne(f,"class","s-g4Ms0k5s1Xlv"),Z(f,ut,90,4,2137),ne(j,"class","s-g4Ms0k5s1Xlv"),Z(j,ut,88,2,2112),ne(g,"type","submit"),ne(g,"class","s-g4Ms0k5s1Xlv"),Z(g,ut,92,2,2191),ne(L,"class","s-g4Ms0k5s1Xlv"),Z(L,ut,87,0,2059),ne(E,"class","s-g4Ms0k5s1Xlv"),Z(E,ut,95,0,2238),ne(x,"class","s-g4Ms0k5s1Xlv"),Z(x,ut,110,0,2551),ne(N,"class","s-g4Ms0k5s1Xlv"),Z(N,ut,115,4,2649),ne(T,"class","s-g4Ms0k5s1Xlv"),Z(T,ut,113,2,2624),ne(te,"class","s-g4Ms0k5s1Xlv"),Z(te,ut,119,4,2731),ne(U,"class","s-g4Ms0k5s1Xlv"),Z(U,ut,117,2,2704),ne(V,"type","submit"),ne(V,"class","s-g4Ms0k5s1Xlv"),Z(V,ut,121,2,2779),ne(y,"class","s-g4Ms0k5s1Xlv"),Z(y,ut,112,0,2574),ne(Q,"class","s-g4Ms0k5s1Xlv"),Z(Q,ut,124,0,2827),ne(xt,"class","s-g4Ms0k5s1Xlv"),Z(xt,ut,126,0,2843),ne(ge,"class","s-g4Ms0k5s1Xlv"),Z(ge,ut,128,0,2912)},l:function(W){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(W,ie){$(W,e,ie),$(W,t,ie),$(W,n,ie),$(W,i,ie),$(W,o,ie),re(o,s),$(W,u,ie),$(W,l,ie),r[12](l),$(W,h,ie),$(W,b,ie),$(W,m,ie),$(W,A,ie),re(A,S),$(W,C,ie),$(W,M,ie),$(W,B,ie),$(W,P,ie),$(W,R,ie),$(W,I,ie),$(W,D,ie),$(W,O,ie),de.m(O,null),$(W,J,ie),$(W,X,ie),$(W,H,ie),$(W,L,ie),re(L,j),re(j,v),re(j,f),xn(f,r[2]),re(L,p),re(L,g),$(W,w,ie),$(W,E,ie),$(W,k,ie),pe.m(W,ie),$(W,F,ie),$(W,x,ie),$(W,c,ie),$(W,y,ie),re(y,T),re(T,d),re(T,N),xn(N,r[3]),re(y,G),re(y,U),re(U,z),re(U,te),xn(te,r[4]),re(y,K),re(y,V),$(W,me,ie),$(W,Q,ie),$(W,oe,ie),$(W,xt,ie),$(W,we,ie),$(W,ge,ie),Ct||(Ae=[Qt(f,"input",r[13]),Qt(L,"submit",ka(r[10]),!1,!0,!1),Qt(N,"input",r[15]),Qt(te,"input",r[16]),Qt(y,"submit",ka(r[11]),!1,!0,!1),Qt(ge,"click",x2,!1,!1,!1)],Ct=!0)},p:function(W,[ie]){ie&128&&a!==(a=(W[7]?W[7].address:"loading\u2026")+"")&&hi(s,a),ie&256&&_!==(_=W[8]?Ir.formatEther(W[8])+" Ether":"loading\u2026")&&hi(S,_),ft===(ft=xe(W))&&de?de.p(W,ie):(de.d(1),de=ft(W),de&&(de.c(),de.m(O,null))),ie&4&&xn(f,W[2]),St===(St=Ce(W))&&pe?pe.p(W,ie):(pe.d(1),pe=St(W),pe&&(pe.c(),pe.m(F.parentNode,F))),ie&8&&xn(N,W[3]),ie&16&&te.value!==W[4]&&xn(te,W[4])},i:We,o:We,d:function(W){W&&ee(e),W&&ee(t),W&&ee(n),W&&ee(i),W&&ee(o),W&&ee(u),W&&ee(l),r[12](null),W&&ee(h),W&&ee(b),W&&ee(m),W&&ee(A),W&&ee(C),W&&ee(M),W&&ee(B),W&&ee(P),W&&ee(R),W&&ee(I),W&&ee(D),W&&ee(O),de.d(),W&&ee(J),W&&ee(X),W&&ee(H),W&&ee(L),W&&ee(w),W&&ee(E),W&&ee(k),pe.d(W),W&&ee(F),W&&ee(x),W&&ee(c),W&&ee(y),W&&ee(me),W&&ee(Q),W&&ee(oe),W&&ee(xt),W&&ee(we),W&&ee(ge),Ct=!1,ln(Ae)}};return ue("SvelteRegisterBlock",{block:Ee,id:qc.name,type:"component",source:"",ctx:r}),Ee}function x2(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),window.location.reload())}function _v(r,e,t){let n,i,o,a,s;Rt(Br,"game"),Nt(r,Br,O=>t(5,n=O)),Rt(Oi,"mnemonic"),Nt(r,Oi,O=>t(6,i=O)),Rt(qr,"signer"),Nt(r,qr,O=>t(7,o=O)),Rt(Ea,"balance"),Nt(r,Ea,O=>t(8,a=O)),Rt(Mr,"thc"),Nt(r,Mr,O=>t(9,s=O));let{$$slots:u={},$$scope:l}=e;Or("Settings",u,[]);let h=!1,b,m,A,_=null;Xl(()=>{P0.toCanvas(b,`ethereum:${o.address}`,{width:200})});async function S(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),Xn(Oi,i=m,i),window.location.reload())}async function C(){if(prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"){localStorage.clear(),Xn(Oi,i=A,i);try{_?Xn(Br,n=JSON.parse(window.atob(_)),n):Xn(Br,n={},n)}catch{alert("There was an error importing the game. Please try again."),localStorage.clear();return}window.location.reload()}}const M=[];Object.keys(e).forEach(O=>{!~M.indexOf(O)&&O.slice(0,2)!=="$$"&&O!=="slot"&&console.warn(` was created with unknown prop '${O}'`)});function B(O){Kf[O?"unshift":"push"](()=>{b=O,t(1,b)})}function P(){m=this.value,t(2,m)}const R=()=>t(0,h=!0);function I(){A=this.value,t(3,A)}function D(){_=this.value,t(4,_)}return r.$capture_state=()=>({formatEther:Ir.formatEther,QRCode:P0,onMount:Xl,signer:qr,balance:Ea,mnemonic:Oi,thc:Mr,game:Br,reveal:h,canvas:b,changeMnemonic:m,restoreMnemonic:A,restoreGame:_,onChangeMnemonic:S,onRestoreGame:C,onReset:x2,$game:n,$mnemonic:i,$signer:o,$balance:a,$thc:s}),r.$inject_state=O=>{"reveal"in O&&t(0,h=O.reveal),"canvas"in O&&t(1,b=O.canvas),"changeMnemonic"in O&&t(2,m=O.changeMnemonic),"restoreMnemonic"in O&&t(3,A=O.restoreMnemonic),"restoreGame"in O&&t(4,_=O.restoreGame)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[h,b,m,A,_,n,i,o,a,s,S,C,B,P,R,I,D]}class Cv extends Lr{constructor(e){super(e),Dr(this,e,_v,qc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Settings",options:e,id:qc.name})}}const lr="src/About.svelte";function Vc(r){let e,t,n,i,o,a,s,u,l,h,b,m,A,_,S,C,M,B,P,R,I,D,O,J,X,H,L,j,v,f,p;const g={c:function(){e=Y("h1"),e.textContent="FAQ",t=he(),n=Y("h3"),n.textContent="I'm stuck, can I get a hint?",i=he(),o=Y("ul"),a=Y("li"),s=$e("Join our "),u=Y("a"),u.textContent="Discord server",l=$e(`. (sorry we + `),te=Y("input"),K=he(),V=Y("button"),V.textContent="Restore",me=he(),Q=Y("h2"),Q.textContent="Reset",oe=he(),xt=Y("p"),xt.textContent="Reset the current session, you'll start from Chapter 0 again",we=he(),ge=Y("button"),ge.textContent="Reset game",ne(e,"class","s-g4Ms0k5s1Xlv"),Z(e,ut,53,0,1567),ne(n,"class","s-g4Ms0k5s1Xlv"),Z(n,ut,55,0,1586),ne(o,"class","scroll s-g4Ms0k5s1Xlv"),Z(o,ut,57,0,1611),ne(l,"class","s-g4Ms0k5s1Xlv"),Z(l,ut,61,0,1679),ne(b,"class","s-g4Ms0k5s1Xlv"),Z(b,ut,63,0,1710),ne(A,"class","s-g4Ms0k5s1Xlv"),Z(A,ut,65,0,1735),ne(M,"class","s-g4Ms0k5s1Xlv"),Z(M,ut,69,0,1806),ne(P,"class","s-g4Ms0k5s1Xlv"),Z(P,ut,71,0,1824),ne(I,"class","s-g4Ms0k5s1Xlv"),Z(I,ut,73,0,1840),ne(O,"class","scroll s-g4Ms0k5s1Xlv"),Z(O,ut,75,0,1865),ne(X,"class","s-g4Ms0k5s1Xlv"),Z(X,ut,85,0,2031),ne(f,"class","s-g4Ms0k5s1Xlv"),Z(f,ut,90,4,2137),ne(j,"class","s-g4Ms0k5s1Xlv"),Z(j,ut,88,2,2112),ne(g,"type","submit"),ne(g,"class","s-g4Ms0k5s1Xlv"),Z(g,ut,92,2,2191),ne(L,"class","s-g4Ms0k5s1Xlv"),Z(L,ut,87,0,2059),ne(E,"class","s-g4Ms0k5s1Xlv"),Z(E,ut,95,0,2238),ne(x,"class","s-g4Ms0k5s1Xlv"),Z(x,ut,110,0,2551),ne(N,"class","s-g4Ms0k5s1Xlv"),Z(N,ut,115,4,2649),ne(T,"class","s-g4Ms0k5s1Xlv"),Z(T,ut,113,2,2624),ne(te,"class","s-g4Ms0k5s1Xlv"),Z(te,ut,119,4,2731),ne(U,"class","s-g4Ms0k5s1Xlv"),Z(U,ut,117,2,2704),ne(V,"type","submit"),ne(V,"class","s-g4Ms0k5s1Xlv"),Z(V,ut,121,2,2779),ne(y,"class","s-g4Ms0k5s1Xlv"),Z(y,ut,112,0,2574),ne(Q,"class","s-g4Ms0k5s1Xlv"),Z(Q,ut,124,0,2827),ne(xt,"class","s-g4Ms0k5s1Xlv"),Z(xt,ut,126,0,2843),ne(ge,"class","s-g4Ms0k5s1Xlv"),Z(ge,ut,128,0,2912)},l:function(W){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(W,ie){$(W,e,ie),$(W,t,ie),$(W,n,ie),$(W,i,ie),$(W,o,ie),re(o,s),$(W,u,ie),$(W,l,ie),r[12](l),$(W,h,ie),$(W,b,ie),$(W,m,ie),$(W,A,ie),re(A,S),$(W,C,ie),$(W,M,ie),$(W,B,ie),$(W,P,ie),$(W,R,ie),$(W,I,ie),$(W,D,ie),$(W,O,ie),de.m(O,null),$(W,J,ie),$(W,X,ie),$(W,H,ie),$(W,L,ie),re(L,j),re(j,v),re(j,f),xn(f,r[2]),re(L,p),re(L,g),$(W,w,ie),$(W,E,ie),$(W,k,ie),pe.m(W,ie),$(W,F,ie),$(W,x,ie),$(W,c,ie),$(W,y,ie),re(y,T),re(T,d),re(T,N),xn(N,r[3]),re(y,G),re(y,U),re(U,z),re(U,te),xn(te,r[4]),re(y,K),re(y,V),$(W,me,ie),$(W,Q,ie),$(W,oe,ie),$(W,xt,ie),$(W,we,ie),$(W,ge,ie),Ct||(Ae=[Qt(f,"input",r[13]),Qt(L,"submit",ka(r[10]),!1,!0,!1),Qt(N,"input",r[15]),Qt(te,"input",r[16]),Qt(y,"submit",ka(r[11]),!1,!0,!1),Qt(ge,"click",g2,!1,!1,!1)],Ct=!0)},p:function(W,[ie]){ie&128&&a!==(a=(W[7]?W[7].address:"loading\u2026")+"")&&hi(s,a),ie&256&&_!==(_=W[8]?Ir.formatEther(W[8])+" Ether":"loading\u2026")&&hi(S,_),ft===(ft=xe(W))&&de?de.p(W,ie):(de.d(1),de=ft(W),de&&(de.c(),de.m(O,null))),ie&4&&xn(f,W[2]),St===(St=Ce(W))&&pe?pe.p(W,ie):(pe.d(1),pe=St(W),pe&&(pe.c(),pe.m(F.parentNode,F))),ie&8&&xn(N,W[3]),ie&16&&te.value!==W[4]&&xn(te,W[4])},i:We,o:We,d:function(W){W&&ee(e),W&&ee(t),W&&ee(n),W&&ee(i),W&&ee(o),W&&ee(u),W&&ee(l),r[12](null),W&&ee(h),W&&ee(b),W&&ee(m),W&&ee(A),W&&ee(C),W&&ee(M),W&&ee(B),W&&ee(P),W&&ee(R),W&&ee(I),W&&ee(D),W&&ee(O),de.d(),W&&ee(J),W&&ee(X),W&&ee(H),W&&ee(L),W&&ee(w),W&&ee(E),W&&ee(k),pe.d(W),W&&ee(F),W&&ee(x),W&&ee(c),W&&ee(y),W&&ee(me),W&&ee(Q),W&&ee(oe),W&&ee(xt),W&&ee(we),W&&ee(ge),Ct=!1,ln(Ae)}};return ue("SvelteRegisterBlock",{block:Ee,id:qc.name,type:"component",source:"",ctx:r}),Ee}function g2(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),window.location.reload())}function Sv(r,e,t){let n,i,o,a,s;Rt(Br,"game"),Nt(r,Br,O=>t(5,n=O)),Rt(Oi,"mnemonic"),Nt(r,Oi,O=>t(6,i=O)),Rt(qr,"signer"),Nt(r,qr,O=>t(7,o=O)),Rt(Ea,"balance"),Nt(r,Ea,O=>t(8,a=O)),Rt(Mr,"thc"),Nt(r,Mr,O=>t(9,s=O));let{$$slots:u={},$$scope:l}=e;Or("Settings",u,[]);let h=!1,b,m,A,_=null;Xl(()=>{P0.toCanvas(b,`ethereum:${o.address}`,{width:200})});async function S(){prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"&&(localStorage.clear(),Xn(Oi,i=m,i),window.location.reload())}async function C(){if(prompt('WARNING: this action will reset your current game, type "yes" to confirm.')==="yes"){localStorage.clear(),Xn(Oi,i=A,i);try{_?Xn(Br,n=JSON.parse(window.atob(_)),n):Xn(Br,n={},n)}catch{alert("There was an error importing the game. Please try again."),localStorage.clear();return}window.location.reload()}}const M=[];Object.keys(e).forEach(O=>{!~M.indexOf(O)&&O.slice(0,2)!=="$$"&&O!=="slot"&&console.warn(` was created with unknown prop '${O}'`)});function B(O){Kf[O?"unshift":"push"](()=>{b=O,t(1,b)})}function P(){m=this.value,t(2,m)}const R=()=>t(0,h=!0);function I(){A=this.value,t(3,A)}function D(){_=this.value,t(4,_)}return r.$capture_state=()=>({formatEther:Ir.formatEther,QRCode:P0,onMount:Xl,signer:qr,balance:Ea,mnemonic:Oi,thc:Mr,game:Br,reveal:h,canvas:b,changeMnemonic:m,restoreMnemonic:A,restoreGame:_,onChangeMnemonic:S,onRestoreGame:C,onReset:g2,$game:n,$mnemonic:i,$signer:o,$balance:a,$thc:s}),r.$inject_state=O=>{"reveal"in O&&t(0,h=O.reveal),"canvas"in O&&t(1,b=O.canvas),"changeMnemonic"in O&&t(2,m=O.changeMnemonic),"restoreMnemonic"in O&&t(3,A=O.restoreMnemonic),"restoreGame"in O&&t(4,_=O.restoreGame)},e&&"$$inject"in e&&r.$inject_state(e.$$inject),[h,b,m,A,_,n,i,o,a,s,S,C,B,P,R,I,D]}class Bv extends Lr{constructor(e){super(e),Dr(this,e,Sv,qc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"Settings",options:e,id:qc.name})}}const lr="src/About.svelte";function Vc(r){let e,t,n,i,o,a,s,u,l,h,b,m,A,_,S,C,M,B,P,R,I,D,O,J,X,H,L,j,v,f,p;const g={c:function(){e=Y("h1"),e.textContent="FAQ",t=he(),n=Y("h3"),n.textContent="I'm stuck, can I get a hint?",i=he(),o=Y("ul"),a=Y("li"),s=$e("Join our "),u=Y("a"),u.textContent="Discord server",l=$e(`. (sorry we were too lazy to set up one in matrix).`),h=he(),b=Y("li"),m=$e("Visit us at our assembly "),A=Y("a"),A.textContent="Social Dist0rtion Protocol",_=he(),S=Y("li"),S.textContent="Or write us on twitter, we will do our best to be responsive.",C=he(),M=Y("h3"),M.textContent="I want to speak to the manager",B=he(),P=Y("p"),R=Y("strong"),R.textContent="37c3 thc",I=$e(` is a treasure hunt challenge (THC for short) created by `),D=Y("a"),D.textContent="Social Dist0rtion Protocol",O=$e(`. We do this for the clout so don't forget to follow on tweeeeetererer: - `),J=Y("a"),J.textContent="@dist0rtionporoto",X=he(),H=Y("h3"),H.textContent="Show me the code",L=he(),j=Y("p"),v=$e("The Holy Code of Treasure Hunt Creator (or THCTHC for short) is published on "),f=Y("a"),f.textContent="GitHub",p=$e("."),ne(e,"class","s-KaHxPYp-SZ61"),Z(e,lr,0,0,0),ne(n,"class","s-KaHxPYp-SZ61"),Z(n,lr,2,0,14),ne(u,"href","https://discord.gg/MFrZwPAJ"),ne(u,"class","s-KaHxPYp-SZ61"),Z(u,lr,5,13,77),ne(a,"class","s-KaHxPYp-SZ61"),Z(a,lr,4,2,59),ne(A,"href","https://37c3.c3nav.de/l/sdp/@0,135.59,153.08,5"),ne(A,"class","s-KaHxPYp-SZ61"),Z(A,lr,9,29,233),ne(b,"class","s-KaHxPYp-SZ61"),Z(b,lr,8,2,199),ne(S,"class","s-KaHxPYp-SZ61"),Z(S,lr,14,2,349),ne(o,"class","s-KaHxPYp-SZ61"),Z(o,lr,3,0,52),ne(M,"class","s-KaHxPYp-SZ61"),Z(M,lr,26,0,736),ne(R,"class","s-KaHxPYp-SZ61"),Z(R,lr,28,2,782),ne(D,"href","https://www.dist0rtion.com"),ne(D,"class","s-KaHxPYp-SZ61"),Z(D,lr,30,2,868),ne(J,"href","https://twitter.com/dist0rtionproto"),ne(J,"class","s-KaHxPYp-SZ61"),Z(J,lr,32,2,1011),ne(P,"class","s-KaHxPYp-SZ61"),Z(P,lr,27,0,776),ne(H,"class","s-KaHxPYp-SZ61"),Z(H,lr,59,0,2146),ne(f,"href","https://github.com/social-dist0rtion-protocol/thc"),ne(f,"class","s-KaHxPYp-SZ61"),Z(f,lr,61,79,2255),ne(j,"class","s-KaHxPYp-SZ61"),Z(j,lr,60,0,2172)},l:function(E){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(E,k){$(E,e,k),$(E,t,k),$(E,n,k),$(E,i,k),$(E,o,k),re(o,a),re(a,s),re(a,u),re(a,l),re(o,h),re(o,b),re(b,m),re(b,A),re(o,_),re(o,S),$(E,C,k),$(E,M,k),$(E,B,k),$(E,P,k),re(P,R),re(P,I),re(P,D),re(P,O),re(P,J),$(E,X,k),$(E,H,k),$(E,L,k),$(E,j,k),re(j,v),re(j,f),re(j,p)},p:We,i:We,o:We,d:function(E){E&&ee(e),E&&ee(t),E&&ee(n),E&&ee(i),E&&ee(o),E&&ee(C),E&&ee(M),E&&ee(B),E&&ee(P),E&&ee(X),E&&ee(H),E&&ee(L),E&&ee(j)}};return ue("SvelteRegisterBlock",{block:g,id:Vc.name,type:"component",source:"",ctx:r}),g}function Sv(r,e){let{$$slots:t={},$$scope:n}=e;Or("About",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(` was created with unknown prop '${o}'`)}),[]}class Bv extends Lr{constructor(e){super(e),Dr(this,e,Sv,Vc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"About",options:e,id:Vc.name})}}function Kc(r){let e;const t={c:function(){e=$e("not found :/")},l:function(i){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(i,o){$(i,e,o)},p:We,i:We,o:We,d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Kc.name,type:"component",source:"",ctx:r}),t}function Mv(r,e){let{$$slots:t={},$$scope:n}=e;Or("NotFound",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(` was created with unknown prop '${o}'`)}),[]}class kv extends Lr{constructor(e){super(e),Dr(this,e,Mv,Kc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"NotFound",options:e,id:Kc.name})}}const b2={"/":_4,"/keys":B4,"/leaderboard":I4,"/settings":Cv,"/about":Bv,"*":kv},hd="src/App.svelte";function g2(r){let e,t,n,i,o,a,s;e=new Od({$$inline:!0}),i=new Dd({props:{routes:b2},$$inline:!0});const u={c:function(){Nn(e.$$.fragment),t=he(),n=Y("main"),Nn(i.$$.fragment),o=he(),a=Y("footer"),Z(n,hd,12,2,315),Z(a,hd,16,2,359)},m:function(h,b){sn(e,h,b),$(h,t,b),$(h,n,b),sn(i,n,null),$(h,o,b),$(h,a,b),s=!0},p:We,i:function(h){s||(dt(e.$$.fragment,h),dt(i.$$.fragment,h),s=!0)},o:function(h){At(e.$$.fragment,h),At(i.$$.fragment,h),s=!1},d:function(h){fn(e,h),h&&ee(t),h&&ee(n),fn(i),h&&ee(o),h&&ee(a)}};return ue("SvelteRegisterBlock",{block:u,id:g2.name,type:"else",source:"(10:0) {:else}",ctx:r}),u}function m2(r){let e,t;e=new Ld({props:{fullscreen:!0},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:We,i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:m2.name,type:"if",source:"(8:0) {#if !$address}",ctx:r}),n}function Qc(r){let e,t,n,i;const o=[m2,g2],a=[];function s(l,h){return l[0]?1:0}e=s(r),t=a[e]=o[e](r);const u={c:function(){t.c(),n=Kr()},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?a[e].p(h,b):(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn(),t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n))},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Qc.name,type:"component",source:"",ctx:r}),u}function Pv(r,e,t){let n;Rt(y0,"address"),Nt(r,y0,s=>t(0,n=s));let{$$slots:i={},$$scope:o}=e;Or("App",i,[]);const a=[];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$capture_state=()=>({Router:Dd,Header:Od,Loader:Ld,routes:b2,address:y0,$address:n}),[n]}class Rv extends Lr{constructor(e){super(e),Dr(this,e,Pv,Qc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"App",options:e,id:Qc.name})}}const dd=document.getElementById("app");if(dd)new Rv({target:dd});else throw"Error: mount point for app doesn't exist."; + `),J=Y("a"),J.textContent="@dist0rtionporoto",X=he(),H=Y("h3"),H.textContent="Show me the code",L=he(),j=Y("p"),v=$e("The Holy Code of Treasure Hunt Creator (or THCTHC for short) is published on "),f=Y("a"),f.textContent="GitHub",p=$e("."),ne(e,"class","s-KaHxPYp-SZ61"),Z(e,lr,0,0,0),ne(n,"class","s-KaHxPYp-SZ61"),Z(n,lr,2,0,14),ne(u,"href","https://discord.gg/MFrZwPAJ"),ne(u,"class","s-KaHxPYp-SZ61"),Z(u,lr,5,13,77),ne(a,"class","s-KaHxPYp-SZ61"),Z(a,lr,4,2,59),ne(A,"href","https://37c3.c3nav.de/l/sdp/@0,135.59,153.08,5"),ne(A,"class","s-KaHxPYp-SZ61"),Z(A,lr,9,29,233),ne(b,"class","s-KaHxPYp-SZ61"),Z(b,lr,8,2,199),ne(S,"class","s-KaHxPYp-SZ61"),Z(S,lr,14,2,349),ne(o,"class","s-KaHxPYp-SZ61"),Z(o,lr,3,0,52),ne(M,"class","s-KaHxPYp-SZ61"),Z(M,lr,26,0,736),ne(R,"class","s-KaHxPYp-SZ61"),Z(R,lr,28,2,782),ne(D,"href","https://www.dist0rtion.com"),ne(D,"class","s-KaHxPYp-SZ61"),Z(D,lr,30,2,868),ne(J,"href","https://twitter.com/dist0rtionproto"),ne(J,"class","s-KaHxPYp-SZ61"),Z(J,lr,32,2,1011),ne(P,"class","s-KaHxPYp-SZ61"),Z(P,lr,27,0,776),ne(H,"class","s-KaHxPYp-SZ61"),Z(H,lr,59,0,2146),ne(f,"href","https://github.com/social-dist0rtion-protocol/thc"),ne(f,"class","s-KaHxPYp-SZ61"),Z(f,lr,61,79,2255),ne(j,"class","s-KaHxPYp-SZ61"),Z(j,lr,60,0,2172)},l:function(E){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(E,k){$(E,e,k),$(E,t,k),$(E,n,k),$(E,i,k),$(E,o,k),re(o,a),re(a,s),re(a,u),re(a,l),re(o,h),re(o,b),re(b,m),re(b,A),re(o,_),re(o,S),$(E,C,k),$(E,M,k),$(E,B,k),$(E,P,k),re(P,R),re(P,I),re(P,D),re(P,O),re(P,J),$(E,X,k),$(E,H,k),$(E,L,k),$(E,j,k),re(j,v),re(j,f),re(j,p)},p:We,i:We,o:We,d:function(E){E&&ee(e),E&&ee(t),E&&ee(n),E&&ee(i),E&&ee(o),E&&ee(C),E&&ee(M),E&&ee(B),E&&ee(P),E&&ee(X),E&&ee(H),E&&ee(L),E&&ee(j)}};return ue("SvelteRegisterBlock",{block:g,id:Vc.name,type:"component",source:"",ctx:r}),g}function Mv(r,e){let{$$slots:t={},$$scope:n}=e;Or("About",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(` was created with unknown prop '${o}'`)}),[]}class kv extends Lr{constructor(e){super(e),Dr(this,e,Mv,Vc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"About",options:e,id:Vc.name})}}function Kc(r){let e;const t={c:function(){e=$e("not found :/")},l:function(i){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(i,o){$(i,e,o)},p:We,i:We,o:We,d:function(i){i&&ee(e)}};return ue("SvelteRegisterBlock",{block:t,id:Kc.name,type:"component",source:"",ctx:r}),t}function Pv(r,e){let{$$slots:t={},$$scope:n}=e;Or("NotFound",t,[]);const i=[];return Object.keys(e).forEach(o=>{!~i.indexOf(o)&&o.slice(0,2)!=="$$"&&o!=="slot"&&console.warn(` was created with unknown prop '${o}'`)}),[]}class Rv extends Lr{constructor(e){super(e),Dr(this,e,Pv,Kc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"NotFound",options:e,id:Kc.name})}}const m2={"/":S4,"/keys":k4,"/leaderboard":O4,"/settings":Bv,"/about":kv,"*":Rv},dd="src/App.svelte";function y2(r){let e,t,n,i,o,a,s;e=new Ld({$$inline:!0}),i=new Od({props:{routes:m2},$$inline:!0});const u={c:function(){Nn(e.$$.fragment),t=he(),n=Y("main"),Nn(i.$$.fragment),o=he(),a=Y("footer"),Z(n,dd,12,2,315),Z(a,dd,16,2,359)},m:function(h,b){sn(e,h,b),$(h,t,b),$(h,n,b),sn(i,n,null),$(h,o,b),$(h,a,b),s=!0},p:We,i:function(h){s||(dt(e.$$.fragment,h),dt(i.$$.fragment,h),s=!0)},o:function(h){At(e.$$.fragment,h),At(i.$$.fragment,h),s=!1},d:function(h){fn(e,h),h&&ee(t),h&&ee(n),fn(i),h&&ee(o),h&&ee(a)}};return ue("SvelteRegisterBlock",{block:u,id:y2.name,type:"else",source:"(10:0) {:else}",ctx:r}),u}function v2(r){let e,t;e=new Ud({props:{fullscreen:!0},$$inline:!0});const n={c:function(){Nn(e.$$.fragment)},m:function(o,a){sn(e,o,a),t=!0},p:We,i:function(o){t||(dt(e.$$.fragment,o),t=!0)},o:function(o){At(e.$$.fragment,o),t=!1},d:function(o){fn(e,o)}};return ue("SvelteRegisterBlock",{block:n,id:v2.name,type:"if",source:"(8:0) {#if !$address}",ctx:r}),n}function Qc(r){let e,t,n,i;const o=[v2,y2],a=[];function s(l,h){return l[0]?1:0}e=s(r),t=a[e]=o[e](r);const u={c:function(){t.c(),n=Kr()},l:function(h){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(h,b){a[e].m(h,b),$(h,n,b),i=!0},p:function(h,[b]){let m=e;e=s(h),e===m?a[e].p(h,b):(Pn(),At(a[m],1,1,()=>{a[m]=null}),Rn(),t=a[e],t?t.p(h,b):(t=a[e]=o[e](h),t.c()),dt(t,1),t.m(n.parentNode,n))},i:function(h){i||(dt(t),i=!0)},o:function(h){At(t),i=!1},d:function(h){a[e].d(h),h&&ee(n)}};return ue("SvelteRegisterBlock",{block:u,id:Qc.name,type:"component",source:"",ctx:r}),u}function Nv(r,e,t){let n;Rt(y0,"address"),Nt(r,y0,s=>t(0,n=s));let{$$slots:i={},$$scope:o}=e;Or("App",i,[]);const a=[];return Object.keys(e).forEach(s=>{!~a.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&console.warn(` was created with unknown prop '${s}'`)}),r.$capture_state=()=>({Router:Od,Header:Ld,Loader:Ud,routes:m2,address:y0,$address:n}),[n]}class Fv extends Lr{constructor(e){super(e),Dr(this,e,Nv,Qc,Pr,{}),ue("SvelteRegisterComponent",{component:this,tagName:"App",options:e,id:Qc.name})}}const pd=document.getElementById("app");if(pd)new Fv({target:pd});else throw"Error: mount point for app doesn't exist."; diff --git a/index.html b/index.html index 06d94c4..e89b87f 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -37c3
\ No newline at end of file +37c3
\ No newline at end of file