From fda83437d73961097e02e0399bd2f6e35785ce5f Mon Sep 17 00:00:00 2001 From: EmelyanenkoK Date: Thu, 14 Dec 2023 07:11:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ton-bloc?= =?UTF-8?q?kchain/verifier@a1a718ecdb20ff344f2f65a7cdbfcf0a3c503e20=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- .../{index.d713f301.js => index.9d39f999.js} | 2 +- assets/index.b81e02f1.js | 1242 +++++++++++++++++ assets/index.b98184c3.js | 1242 ----------------- index.html | 2 +- 5 files changed, 1245 insertions(+), 1245 deletions(-) rename assets/{index.d713f301.js => index.9d39f999.js} (99%) create mode 100644 assets/index.b81e02f1.js delete mode 100644 assets/index.b98184c3.js diff --git a/404.html b/404.html index 5f15937..7cbc170 100644 --- a/404.html +++ b/404.html @@ -38,7 +38,7 @@ - + diff --git a/assets/index.d713f301.js b/assets/index.9d39f999.js similarity index 99% rename from assets/index.d713f301.js rename to assets/index.9d39f999.js index 008f976..8dfc9d8 100644 --- a/assets/index.d713f301.js +++ b/assets/index.9d39f999.js @@ -1,4 +1,4 @@ -import{g as HI}from"./index.b98184c3.js";function sI(S,t){for(var L=0;Ln[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;Dn[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;D0&&(wA(CA(A.output,0)),A.output=[])}},default_tty1_ops:{put_char:function(A,B){B===null||B===10?(p(CA(A.output,0)),A.output=[]):B!=0&&A.output.push(B)},fsync:function(A){A.output&&A.output.length>0&&(p(CA(A.output,0)),A.output=[])}}};function Zg(A,B){gA.fill(0,A,A+B)}function Wg(A,B){return Math.ceil(A/B)*B}function kB(A){A=Wg(A,65536);var B=qB(65536,A);return B?(Zg(B,A),B):0}var J={ops_table:null,mount:function(A){return J.createNode(null,"/",16895,0)},createNode:function(A,B,g,Q){if(I.isBlkdev(g)||I.isFIFO(g))throw new I.ErrnoError(63);J.ops_table||(J.ops_table={dir:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,lookup:J.node_ops.lookup,mknod:J.node_ops.mknod,rename:J.node_ops.rename,unlink:J.node_ops.unlink,rmdir:J.node_ops.rmdir,readdir:J.node_ops.readdir,symlink:J.node_ops.symlink},stream:{llseek:J.stream_ops.llseek}},file:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:{llseek:J.stream_ops.llseek,read:J.stream_ops.read,write:J.stream_ops.write,allocate:J.stream_ops.allocate,mmap:J.stream_ops.mmap,msync:J.stream_ops.msync}},link:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,readlink:J.node_ops.readlink},stream:{}},chrdev:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:I.chrdev_stream_ops}});var C=I.createNode(A,B,g,Q);return I.isDir(C.mode)?(C.node_ops=J.ops_table.dir.node,C.stream_ops=J.ops_table.dir.stream,C.contents={}):I.isFile(C.mode)?(C.node_ops=J.ops_table.file.node,C.stream_ops=J.ops_table.file.stream,C.usedBytes=0,C.contents=null):I.isLink(C.mode)?(C.node_ops=J.ops_table.link.node,C.stream_ops=J.ops_table.link.stream):I.isChrdev(C.mode)&&(C.node_ops=J.ops_table.chrdev.node,C.stream_ops=J.ops_table.chrdev.stream),C.timestamp=Date.now(),A&&(A.contents[B]=C,A.timestamp=C.timestamp),C},getFileDataAsTypedArray:function(A){return A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0)},expandFileStorage:function(A,B){var g=A.contents?A.contents.length:0;if(!(g>=B)){var Q=1024*1024;B=Math.max(B,g*(g>>0),g!=0&&(B=Math.max(B,256));var C=A.contents;A.contents=new Uint8Array(B),A.usedBytes>0&&A.contents.set(C.subarray(0,A.usedBytes),0)}},resizeFileStorage:function(A,B){if(A.usedBytes!=B)if(B==0)A.contents=null,A.usedBytes=0;else{var g=A.contents;A.contents=new Uint8Array(B),g&&A.contents.set(g.subarray(0,Math.min(B,A.usedBytes))),A.usedBytes=B}},node_ops:{getattr:function(A){var B={};return B.dev=I.isChrdev(A.mode)?A.id:1,B.ino=A.id,B.mode=A.mode,B.nlink=1,B.uid=0,B.gid=0,B.rdev=A.rdev,I.isDir(A.mode)?B.size=4096:I.isFile(A.mode)?B.size=A.usedBytes:I.isLink(A.mode)?B.size=A.link.length:B.size=0,B.atime=new Date(A.timestamp),B.mtime=new Date(A.timestamp),B.ctime=new Date(A.timestamp),B.blksize=4096,B.blocks=Math.ceil(B.size/B.blksize),B},setattr:function(A,B){B.mode!==void 0&&(A.mode=B.mode),B.timestamp!==void 0&&(A.timestamp=B.timestamp),B.size!==void 0&&J.resizeFileStorage(A,B.size)},lookup:function(A,B){throw I.genericErrors[44]},mknod:function(A,B,g,Q){return J.createNode(A,B,g,Q)},rename:function(A,B,g){if(I.isDir(A.mode)){var Q;try{Q=I.lookupNode(B,g)}catch{}if(Q)for(var C in Q.contents)throw new I.ErrnoError(55)}delete A.parent.contents[A.name],A.parent.timestamp=Date.now(),A.name=g,B.contents[g]=A,B.timestamp=A.parent.timestamp,A.parent=B},unlink:function(A,B){delete A.contents[B],A.timestamp=Date.now()},rmdir:function(A,B){var g=I.lookupNode(A,B);for(var Q in g.contents)throw new I.ErrnoError(55);delete A.contents[B],A.timestamp=Date.now()},readdir:function(A){var B=[".",".."];for(var g in A.contents)!A.contents.hasOwnProperty(g)||B.push(g);return B},symlink:function(A,B,g){var Q=J.createNode(A,B,41471,0);return Q.link=g,Q},readlink:function(A){if(!I.isLink(A.mode))throw new I.ErrnoError(28);return A.link}},stream_ops:{read:function(A,B,g,Q,C){var E=A.node.contents;if(C>=A.node.usedBytes)return 0;var D=Math.min(A.node.usedBytes-C,Q);if(D>8&&E.subarray)B.set(E.subarray(C,C+D),g);else for(var N=0;N0||g+B{$A(E,'Loading data file "'+A+'" failed (no arrayBuffer).'),B(new Uint8Array(E)),C&&lA()},E=>{if(g)g();else throw'Loading data file "'+A+'" failed.'}),C&&TA()}var I={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(A,B={})=>{if(A=YA.resolve(I.cwd(),A),!A)return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};if(B=Object.assign(g,B),B.recurse_count>8)throw new I.ErrnoError(32);for(var Q=m.normalizeArray(A.split("/").filter(y=>!!y),!1),C=I.root,E="/",D=0;D40)throw new I.ErrnoError(32)}}return{path:E,node:C}},getPath:A=>{for(var B;;){if(I.isRoot(A)){var g=A.mount.mountpoint;return B?g[g.length-1]!=="/"?g+"/"+B:g+B:g}B=B?A.name+"/"+B:A.name,A=A.parent}},hashName:(A,B)=>{for(var g=0,Q=0;Q>>0)%I.nameTable.length},hashAddNode:A=>{var B=I.hashName(A.parent.id,A.name);A.name_next=I.nameTable[B],I.nameTable[B]=A},hashRemoveNode:A=>{var B=I.hashName(A.parent.id,A.name);if(I.nameTable[B]===A)I.nameTable[B]=A.name_next;else for(var g=I.nameTable[B];g;){if(g.name_next===A){g.name_next=A.name_next;break}g=g.name_next}},lookupNode:(A,B)=>{var g=I.mayLookup(A);if(g)throw new I.ErrnoError(g,A);for(var Q=I.hashName(A.id,B),C=I.nameTable[Q];C;C=C.name_next){var E=C.name;if(C.parent.id===A.id&&E===B)return C}return I.lookup(A,B)},createNode:(A,B,g,Q)=>{var C=new I.FSNode(A,B,g,Q);return I.hashAddNode(C),C},destroyNode:A=>{I.hashRemoveNode(A)},isRoot:A=>A===A.parent,isMountpoint:A=>!!A.mounted,isFile:A=>(A&61440)===32768,isDir:A=>(A&61440)===16384,isLink:A=>(A&61440)===40960,isChrdev:A=>(A&61440)===8192,isBlkdev:A=>(A&61440)===24576,isFIFO:A=>(A&61440)===4096,isSocket:A=>(A&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:A=>{var B=I.flagModes[A];if(typeof B>"u")throw new Error("Unknown file open mode: "+A);return B},flagsToPermissionString:A=>{var B=["r","w","rw"][A&3];return A&512&&(B+="w"),B},nodePermissions:(A,B)=>I.ignorePermissions?0:B.includes("r")&&!(A.mode&292)||B.includes("w")&&!(A.mode&146)||B.includes("x")&&!(A.mode&73)?2:0,mayLookup:A=>{var B=I.nodePermissions(A,"x");return B||(A.node_ops.lookup?0:2)},mayCreate:(A,B)=>{try{var g=I.lookupNode(A,B);return 20}catch{}return I.nodePermissions(A,"wx")},mayDelete:(A,B,g)=>{var Q;try{Q=I.lookupNode(A,B)}catch(E){return E.errno}var C=I.nodePermissions(A,"wx");if(C)return C;if(g){if(!I.isDir(Q.mode))return 54;if(I.isRoot(Q)||I.getPath(Q)===I.cwd())return 10}else if(I.isDir(Q.mode))return 31;return 0},mayOpen:(A,B)=>A?I.isLink(A.mode)?32:I.isDir(A.mode)&&(I.flagsToPermissionString(B)!=="r"||B&512)?31:I.nodePermissions(A,I.flagsToPermissionString(B)):44,MAX_OPEN_FDS:4096,nextfd:(A=0,B=I.MAX_OPEN_FDS)=>{for(var g=A;g<=B;g++)if(!I.streams[g])return g;throw new I.ErrnoError(33)},getStream:A=>I.streams[A],createStream:(A,B,g)=>{I.FSStream||(I.FSStream=function(){this.shared={}},I.FSStream.prototype={},Object.defineProperties(I.FSStream.prototype,{object:{get:function(){return this.node},set:function(C){this.node=C}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(C){this.shared.flags=C}},position:{get:function(){return this.shared.position},set:function(C){this.shared.position=C}}})),A=Object.assign(new I.FSStream,A);var Q=I.nextfd(B,g);return A.fd=Q,I.streams[Q]=A,A},closeStream:A=>{I.streams[A]=null},chrdev_stream_ops:{open:A=>{var B=I.getDevice(A.node.rdev);A.stream_ops=B.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:()=>{throw new I.ErrnoError(70)}},major:A=>A>>8,minor:A=>A&255,makedev:(A,B)=>A<<8|B,registerDevice:(A,B)=>{I.devices[A]={stream_ops:B}},getDevice:A=>I.devices[A],getMounts:A=>{for(var B=[],g=[A];g.length;){var Q=g.pop();B.push(Q),g.push.apply(g,Q.mounts)}return B},syncfs:(A,B)=>{typeof A=="function"&&(B=A,A=!1),I.syncFSRequests++,I.syncFSRequests>1&&p("warning: "+I.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var g=I.getMounts(I.root.mount),Q=0;function C(D){return I.syncFSRequests--,B(D)}function E(D){if(D)return E.errored?void 0:(E.errored=!0,C(D));++Q>=g.length&&C(null)}g.forEach(D=>{if(!D.type.syncfs)return E(null);D.type.syncfs(D,A,E)})},mount:(A,B,g)=>{var Q=g==="/",C=!g,E;if(Q&&I.root)throw new I.ErrnoError(10);if(!Q&&!C){var D=I.lookupPath(g,{follow_mount:!1});if(g=D.path,E=D.node,I.isMountpoint(E))throw new I.ErrnoError(10);if(!I.isDir(E.mode))throw new I.ErrnoError(54)}var N={type:A,opts:B,mountpoint:g,mounts:[]},F=A.mount(N);return F.mount=N,N.root=F,Q?I.root=F:E&&(E.mounted=N,E.mount&&E.mount.mounts.push(N)),F},unmount:A=>{var B=I.lookupPath(A,{follow_mount:!1});if(!I.isMountpoint(B.node))throw new I.ErrnoError(28);var g=B.node,Q=g.mounted,C=I.getMounts(Q);Object.keys(I.nameTable).forEach(D=>{for(var N=I.nameTable[D];N;){var F=N.name_next;C.includes(N.mount)&&I.destroyNode(N),N=F}}),g.mounted=null;var E=g.mount.mounts.indexOf(Q);g.mount.mounts.splice(E,1)},lookup:(A,B)=>A.node_ops.lookup(A,B),mknod:(A,B,g)=>{var Q=I.lookupPath(A,{parent:!0}),C=Q.node,E=m.basename(A);if(!E||E==="."||E==="..")throw new I.ErrnoError(28);var D=I.mayCreate(C,E);if(D)throw new I.ErrnoError(D);if(!C.node_ops.mknod)throw new I.ErrnoError(63);return C.node_ops.mknod(C,E,B,g)},create:(A,B)=>(B=B!==void 0?B:438,B&=4095,B|=32768,I.mknod(A,B,0)),mkdir:(A,B)=>(B=B!==void 0?B:511,B&=1023,B|=16384,I.mknod(A,B,0)),mkdirTree:(A,B)=>{for(var g=A.split("/"),Q="",C=0;C(typeof g>"u"&&(g=B,B=438),B|=8192,I.mknod(A,B,g)),symlink:(A,B)=>{if(!YA.resolve(A))throw new I.ErrnoError(44);var g=I.lookupPath(B,{parent:!0}),Q=g.node;if(!Q)throw new I.ErrnoError(44);var C=m.basename(B),E=I.mayCreate(Q,C);if(E)throw new I.ErrnoError(E);if(!Q.node_ops.symlink)throw new I.ErrnoError(63);return Q.node_ops.symlink(Q,C,A)},rename:(A,B)=>{var g=m.dirname(A),Q=m.dirname(B),C=m.basename(A),E=m.basename(B),D,N,F;if(D=I.lookupPath(A,{parent:!0}),N=D.node,D=I.lookupPath(B,{parent:!0}),F=D.node,!N||!F)throw new I.ErrnoError(44);if(N.mount!==F.mount)throw new I.ErrnoError(75);var o=I.lookupNode(N,C),h=YA.relative(A,Q);if(h.charAt(0)!==".")throw new I.ErrnoError(28);if(h=YA.relative(B,g),h.charAt(0)!==".")throw new I.ErrnoError(55);var y;try{y=I.lookupNode(F,E)}catch{}if(o!==y){var Y=I.isDir(o.mode),i=I.mayDelete(N,C,Y);if(i)throw new I.ErrnoError(i);if(i=y?I.mayDelete(F,E,Y):I.mayCreate(F,E),i)throw new I.ErrnoError(i);if(!N.node_ops.rename)throw new I.ErrnoError(63);if(I.isMountpoint(o)||y&&I.isMountpoint(y))throw new I.ErrnoError(10);if(F!==N&&(i=I.nodePermissions(N,"w"),i))throw new I.ErrnoError(i);I.hashRemoveNode(o);try{N.node_ops.rename(o,F,E)}catch(k){throw k}finally{I.hashAddNode(o)}}},rmdir:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node,Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!0);if(E)throw new I.ErrnoError(E);if(!g.node_ops.rmdir)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.rmdir(g,Q),I.destroyNode(C)},readdir:A=>{var B=I.lookupPath(A,{follow:!0}),g=B.node;if(!g.node_ops.readdir)throw new I.ErrnoError(54);return g.node_ops.readdir(g)},unlink:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node;if(!g)throw new I.ErrnoError(44);var Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!1);if(E)throw new I.ErrnoError(E);if(!g.node_ops.unlink)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.unlink(g,Q),I.destroyNode(C)},readlink:A=>{var B=I.lookupPath(A),g=B.node;if(!g)throw new I.ErrnoError(44);if(!g.node_ops.readlink)throw new I.ErrnoError(28);return YA.resolve(I.getPath(g.parent),g.node_ops.readlink(g))},stat:(A,B)=>{var g=I.lookupPath(A,{follow:!B}),Q=g.node;if(!Q)throw new I.ErrnoError(44);if(!Q.node_ops.getattr)throw new I.ErrnoError(63);return Q.node_ops.getattr(Q)},lstat:A=>I.stat(A,!0),chmod:(A,B,g)=>{var Q;if(typeof A=="string"){var C=I.lookupPath(A,{follow:!g});Q=C.node}else Q=A;if(!Q.node_ops.setattr)throw new I.ErrnoError(63);Q.node_ops.setattr(Q,{mode:B&4095|Q.mode&-4096,timestamp:Date.now()})},lchmod:(A,B)=>{I.chmod(A,B,!0)},fchmod:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);I.chmod(g.node,B)},chown:(A,B,g,Q)=>{var C;if(typeof A=="string"){var E=I.lookupPath(A,{follow:!Q});C=E.node}else C=A;if(!C.node_ops.setattr)throw new I.ErrnoError(63);C.node_ops.setattr(C,{timestamp:Date.now()})},lchown:(A,B,g)=>{I.chown(A,B,g,!0)},fchown:(A,B,g)=>{var Q=I.getStream(A);if(!Q)throw new I.ErrnoError(8);I.chown(Q.node,B,g)},truncate:(A,B)=>{if(B<0)throw new I.ErrnoError(28);var g;if(typeof A=="string"){var Q=I.lookupPath(A,{follow:!0});g=Q.node}else g=A;if(!g.node_ops.setattr)throw new I.ErrnoError(63);if(I.isDir(g.mode))throw new I.ErrnoError(31);if(!I.isFile(g.mode))throw new I.ErrnoError(28);var C=I.nodePermissions(g,"w");if(C)throw new I.ErrnoError(C);g.node_ops.setattr(g,{size:B,timestamp:Date.now()})},ftruncate:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);if((g.flags&2097155)===0)throw new I.ErrnoError(28);I.truncate(g.node,B)},utime:(A,B,g)=>{var Q=I.lookupPath(A,{follow:!0}),C=Q.node;C.node_ops.setattr(C,{timestamp:Math.max(B,g)})},open:(A,B,g)=>{if(A==="")throw new I.ErrnoError(44);B=typeof B=="string"?I.modeStringToFlags(B):B,g=typeof g>"u"?438:g,B&64?g=g&4095|32768:g=0;var Q;if(typeof A=="object")Q=A;else{A=m.normalize(A);try{var C=I.lookupPath(A,{follow:!(B&131072)});Q=C.node}catch{}}var E=!1;if(B&64)if(Q){if(B&128)throw new I.ErrnoError(20)}else Q=I.mknod(A,g,0),E=!0;if(!Q)throw new I.ErrnoError(44);if(I.isChrdev(Q.mode)&&(B&=-513),B&65536&&!I.isDir(Q.mode))throw new I.ErrnoError(54);if(!E){var D=I.mayOpen(Q,B);if(D)throw new I.ErrnoError(D)}B&512&&!E&&I.truncate(Q,0),B&=-131713;var N=I.createStream({node:Q,path:I.getPath(Q),flags:B,seekable:!0,position:0,stream_ops:Q.stream_ops,ungotten:[],error:!1});return N.stream_ops.open&&N.stream_ops.open(N),G.logReadFiles&&!(B&1)&&(I.readFiles||(I.readFiles={}),A in I.readFiles||(I.readFiles[A]=1)),N},close:A=>{if(I.isClosed(A))throw new I.ErrnoError(8);A.getdents&&(A.getdents=null);try{A.stream_ops.close&&A.stream_ops.close(A)}catch(B){throw B}finally{I.closeStream(A.fd)}A.fd=null},isClosed:A=>A.fd===null,llseek:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(!A.seekable||!A.stream_ops.llseek)throw new I.ErrnoError(70);if(g!=0&&g!=1&&g!=2)throw new I.ErrnoError(28);return A.position=A.stream_ops.llseek(A,B,g),A.ungotten=[],A.position},read:(A,B,g,Q,C)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===1)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.read)throw new I.ErrnoError(28);var E=typeof C<"u";if(!E)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var D=A.stream_ops.read(A,B,g,Q,C);return E||(A.position+=D),D},write:(A,B,g,Q,C,E)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.write)throw new I.ErrnoError(28);A.seekable&&A.flags&1024&&I.llseek(A,0,2);var D=typeof C<"u";if(!D)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var N=A.stream_ops.write(A,B,g,Q,C,E);return D||(A.position+=N),N},allocate:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(B<0||g<=0)throw new I.ErrnoError(28);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(!I.isFile(A.node.mode)&&!I.isDir(A.node.mode))throw new I.ErrnoError(43);if(!A.stream_ops.allocate)throw new I.ErrnoError(138);A.stream_ops.allocate(A,B,g)},mmap:(A,B,g,Q,C)=>{if((Q&2)!==0&&(C&2)===0&&(A.flags&2097155)!==2)throw new I.ErrnoError(2);if((A.flags&2097155)===1)throw new I.ErrnoError(2);if(!A.stream_ops.mmap)throw new I.ErrnoError(43);return A.stream_ops.mmap(A,B,g,Q,C)},msync:(A,B,g,Q,C)=>!A||!A.stream_ops.msync?0:A.stream_ops.msync(A,B,g,Q,C),munmap:A=>0,ioctl:(A,B,g)=>{if(!A.stream_ops.ioctl)throw new I.ErrnoError(59);return A.stream_ops.ioctl(A,B,g)},readFile:(A,B={})=>{if(B.flags=B.flags||0,B.encoding=B.encoding||"binary",B.encoding!=="utf8"&&B.encoding!=="binary")throw new Error('Invalid encoding type "'+B.encoding+'"');var g,Q=I.open(A,B.flags),C=I.stat(A),E=C.size,D=new Uint8Array(E);return I.read(Q,D,0,E,0),B.encoding==="utf8"?g=CA(D,0):B.encoding==="binary"&&(g=D),I.close(Q),g},writeFile:(A,B,g={})=>{g.flags=g.flags||577;var Q=I.open(A,g.flags,g.mode);if(typeof B=="string"){var C=new Uint8Array(e(B)+1),E=aA(B,C,0,C.length);I.write(Q,C,0,E,void 0,g.canOwn)}else if(ArrayBuffer.isView(B))I.write(Q,B,0,B.byteLength,void 0,g.canOwn);else throw new Error("Unsupported data type");I.close(Q)},cwd:()=>I.currentPath,chdir:A=>{var B=I.lookupPath(A,{follow:!0});if(B.node===null)throw new I.ErrnoError(44);if(!I.isDir(B.node.mode))throw new I.ErrnoError(54);var g=I.nodePermissions(B.node,"x");if(g)throw new I.ErrnoError(g);I.currentPath=B.path},createDefaultDirectories:()=>{I.mkdir("/tmp"),I.mkdir("/home"),I.mkdir("/home/web_user")},createDefaultDevices:()=>{I.mkdir("/dev"),I.registerDevice(I.makedev(1,3),{read:()=>0,write:(B,g,Q,C,E)=>C}),I.mkdev("/dev/null",I.makedev(1,3)),cA.register(I.makedev(5,0),cA.default_tty_ops),cA.register(I.makedev(6,0),cA.default_tty1_ops),I.mkdev("/dev/tty",I.makedev(5,0)),I.mkdev("/dev/tty1",I.makedev(6,0));var A=Vg();I.createDevice("/dev","random",A),I.createDevice("/dev","urandom",A),I.mkdir("/dev/shm"),I.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{I.mkdir("/proc");var A=I.mkdir("/proc/self");I.mkdir("/proc/self/fd"),I.mount({mount:()=>{var B=I.createNode(A,"fd",16895,73);return B.node_ops={lookup:(g,Q)=>{var C=+Q,E=I.getStream(C);if(!E)throw new I.ErrnoError(8);var D={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>E.path}};return D.parent=D,D}},B}},{},"/proc/self/fd")},createStandardStreams:()=>{G.stdin?I.createDevice("/dev","stdin",G.stdin):I.symlink("/dev/tty","/dev/stdin"),G.stdout?I.createDevice("/dev","stdout",null,G.stdout):I.symlink("/dev/tty","/dev/stdout"),G.stderr?I.createDevice("/dev","stderr",null,G.stderr):I.symlink("/dev/tty1","/dev/stderr"),I.open("/dev/stdin",0),I.open("/dev/stdout",1),I.open("/dev/stderr",1)},ensureErrnoError:()=>{I.ErrnoError||(I.ErrnoError=function(B,g){this.node=g,this.setErrno=function(Q){this.errno=Q},this.setErrno(B),this.message="FS error"},I.ErrnoError.prototype=new Error,I.ErrnoError.prototype.constructor=I.ErrnoError,[44].forEach(A=>{I.genericErrors[A]=new I.ErrnoError(A),I.genericErrors[A].stack=""}))},staticInit:()=>{I.ensureErrnoError(),I.nameTable=new Array(4096),I.mount(J,{},"/"),I.createDefaultDirectories(),I.createDefaultDevices(),I.createSpecialDirectories(),I.filesystems={MEMFS:J}},init:(A,B,g)=>{I.init.initialized=!0,I.ensureErrnoError(),G.stdin=A||G.stdin,G.stdout=B||G.stdout,G.stderr=g||G.stderr,I.createStandardStreams()},quit:()=>{I.init.initialized=!1;for(var A=0;A{var g=0;return A&&(g|=365),B&&(g|=146),g},findObject:(A,B)=>{var g=I.analyzePath(A,B);return g.exists?g.object:null},analyzePath:(A,B)=>{try{var g=I.lookupPath(A,{follow:!B});A=g.path}catch{}var Q={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var g=I.lookupPath(A,{parent:!0});Q.parentExists=!0,Q.parentPath=g.path,Q.parentObject=g.node,Q.name=m.basename(A),g=I.lookupPath(A,{follow:!B}),Q.exists=!0,Q.path=g.path,Q.object=g.node,Q.name=g.node.name,Q.isRoot=g.path==="/"}catch(C){Q.error=C.errno}return Q},createPath:(A,B,g,Q)=>{A=typeof A=="string"?A:I.getPath(A);for(var C=B.split("/").reverse();C.length;){var E=C.pop();if(!!E){var D=m.join2(A,E);try{I.mkdir(D)}catch{}A=D}}return D},createFile:(A,B,g,Q,C)=>{var E=m.join2(typeof A=="string"?A:I.getPath(A),B),D=I.getMode(Q,C);return I.create(E,D)},createDataFile:(A,B,g,Q,C,E)=>{var D=B;A&&(A=typeof A=="string"?A:I.getPath(A),D=B?m.join2(A,B):A);var N=I.getMode(Q,C),F=I.create(D,N);if(g){if(typeof g=="string"){for(var o=new Array(g.length),h=0,y=g.length;h{var C=m.join2(typeof A=="string"?A:I.getPath(A),B),E=I.getMode(!!g,!!Q);I.createDevice.major||(I.createDevice.major=64);var D=I.makedev(I.createDevice.major++,0);return I.registerDevice(D,{open:N=>{N.seekable=!1},close:N=>{Q&&Q.buffer&&Q.buffer.length&&Q(10)},read:(N,F,o,h,y)=>{for(var Y=0,i=0;i{for(var Y=0;Y{if(A.isDevice||A.isFolder||A.link||A.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(r)try{A.contents=qA(r(A.url),!0),A.usedBytes=A.contents.length}catch{throw new I.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(A,B,g,Q,C)=>{function E(){this.lengthKnown=!1,this.chunks=[]}if(E.prototype.get=function(i){if(!(i>this.length-1||i<0)){var k=i%this.chunkSize,Z=i/this.chunkSize|0;return this.getter(Z)[k]}},E.prototype.setDataGetter=function(i){this.getter=i},E.prototype.cacheLength=function(){var i=new XMLHttpRequest;if(i.open("HEAD",g,!1),i.send(null),!(i.status>=200&&i.status<300||i.status===304))throw new Error("Couldn't load "+g+". Status: "+i.status);var k=Number(i.getResponseHeader("Content-length")),Z,c=(Z=i.getResponseHeader("Accept-Ranges"))&&Z==="bytes",q=(Z=i.getResponseHeader("Content-Encoding"))&&Z==="gzip",U=1024*1024;c||(U=k);var a=(x,BA)=>{if(x>BA)throw new Error("invalid range ("+x+", "+BA+") or no bytes requested!");if(BA>k-1)throw new Error("only "+k+" bytes available! programmer error!");var w=new XMLHttpRequest;if(w.open("GET",g,!1),k!==U&&w.setRequestHeader("Range","bytes="+x+"-"+BA),w.responseType="arraybuffer",w.overrideMimeType&&w.overrideMimeType("text/plain; charset=x-user-defined"),w.send(null),!(w.status>=200&&w.status<300||w.status===304))throw new Error("Couldn't load "+g+". Status: "+w.status);return w.response!==void 0?new Uint8Array(w.response||[]):qA(w.responseText||"",!0)},V=this;V.setDataGetter(x=>{var BA=x*U,w=(x+1)*U-1;if(w=Math.min(w,k-1),typeof V.chunks[x]>"u"&&(V.chunks[x]=a(BA,w)),typeof V.chunks[x]>"u")throw new Error("doXHR failed!");return V.chunks[x]}),(q||!k)&&(U=k=1,k=this.getter(0).length,U=k,wA("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=k,this._chunkSize=U,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var D,N}else var N={isDevice:!1,url:g};var F=I.createFile(A,B,N,Q,C);N.contents?F.contents=N.contents:N.url&&(F.contents=null,F.url=N.url),Object.defineProperties(F,{usedBytes:{get:function(){return this.contents.length}}});var o={},h=Object.keys(F.stream_ops);h.forEach(Y=>{var i=F.stream_ops[Y];o[Y]=function(){return I.forceLoadFile(F),i.apply(null,arguments)}});function y(Y,i,k,Z,c){var q=Y.node.contents;if(c>=q.length)return 0;var U=Math.min(q.length-c,Z);if(q.slice)for(var a=0;a(I.forceLoadFile(F),y(Y,i,k,Z,c)),o.mmap=(Y,i,k,Z,c)=>{I.forceLoadFile(F);var q=kB(i);if(!q)throw new I.ErrnoError(48);return y(Y,W,q,i,k),{ptr:q,allocated:!0}},F.stream_ops=o,F},createPreloadedFile:(A,B,g,Q,C,E,D,N,F,o)=>{var h=B?YA.resolve(m.join2(A,B)):A;function y(Y){function i(k){o&&o(),N||I.createDataFile(A,B,k,Q,C,F),E&&E(),lA()}Browser.handledByPreloadPlugin(Y,h,i,()=>{D&&D(),lA()})||i(Y)}TA(),typeof g=="string"?dg(g,Y=>y(Y),D):y(g)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=()=>{wA("creating db");var E=C.result;E.createObjectStore(I.DB_STORE_NAME)},C.onsuccess=()=>{var E=C.result,D=E.transaction([I.DB_STORE_NAME],"readwrite"),N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.put(I.analyzePath(Y).object.contents,Y);i.onsuccess=()=>{F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g},loadFilesFromDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=g,C.onsuccess=()=>{var E=C.result;try{var D=E.transaction([I.DB_STORE_NAME],"readonly")}catch(Y){g(Y);return}var N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.get(Y);i.onsuccess=()=>{I.analyzePath(Y).exists&&I.unlink(Y),I.createDataFile(m.dirname(Y),m.basename(Y),i.result,!0,!0,!0),F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g}},j={DEFAULT_POLLMASK:5,calculateAt:function(A,B,g){if(m.isAbs(B))return B;var Q;if(A===-100)Q=I.cwd();else{var C=I.getStream(A);if(!C)throw new I.ErrnoError(8);Q=C.path}if(B.length==0){if(!g)throw new I.ErrnoError(44);return Q}return m.join2(Q,B)},doStat:function(A,B,g){try{var Q=A(B)}catch(C){if(C&&C.node&&m.normalize(B)!==m.normalize(I.getPath(C.node)))return-54;throw C}return R[g>>2]=Q.dev,R[g+8>>2]=Q.ino,R[g+12>>2]=Q.mode,R[g+16>>2]=Q.nlink,R[g+20>>2]=Q.uid,R[g+24>>2]=Q.gid,R[g+28>>2]=Q.rdev,X=[Q.size>>>0,(M=Q.size,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+40>>2]=X[0],R[g+44>>2]=X[1],R[g+48>>2]=4096,R[g+52>>2]=Q.blocks,X=[Math.floor(Q.atime.getTime()/1e3)>>>0,(M=Math.floor(Q.atime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+56>>2]=X[0],R[g+60>>2]=X[1],R[g+64>>2]=0,X=[Math.floor(Q.mtime.getTime()/1e3)>>>0,(M=Math.floor(Q.mtime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+72>>2]=X[0],R[g+76>>2]=X[1],R[g+80>>2]=0,X=[Math.floor(Q.ctime.getTime()/1e3)>>>0,(M=Math.floor(Q.ctime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+88>>2]=X[0],R[g+92>>2]=X[1],R[g+96>>2]=0,X=[Q.ino>>>0,(M=Q.ino,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+104>>2]=X[0],R[g+108>>2]=X[1],0},doMsync:function(A,B,g,Q,C){var E=gA.slice(A,A+g);I.msync(B,E,C,g,Q)},varargs:void 0,get:function(){j.varargs+=4;var A=R[j.varargs-4>>2];return A},getStr:function(A){var B=GA(A);return B},getStreamFromFD:function(A){var B=I.getStream(A);if(!B)throw new I.ErrnoError(8);return B}};function mg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 0:{var C=j.get();if(C<0)return-28;var E;return E=I.createStream(Q,C),E.fd}case 1:case 2:return 0;case 3:return Q.flags;case 4:{var C=j.get();return Q.flags|=C,0}case 5:{var C=j.get(),D=0;return hA[C+D>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Lg(28),-1;default:return-28}}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function jg(A,B){try{var g=j.getStreamFromFD(A);return j.doStat(I.stat,g.path,B)}catch(Q){if(typeof I>"u"||!(Q instanceof I.ErrnoError))throw Q;return-Q.errno}}function lg(A,B){try{if(B===0)return-28;var g=I.cwd(),Q=e(g)+1;return B"u"||!(C instanceof I.ErrnoError))throw C;return-C.errno}}function qg(A,B,g){try{var Q=j.getStreamFromFD(A);Q.getdents||(Q.getdents=I.readdir(Q.path));for(var C=280,E=0,D=I.llseek(Q,0,1),N=Math.floor(D/C);N>>0,(M=F,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E>>2]=X[0],R[B+E+4>>2]=X[1],X=[(N+1)*C>>>0,(M=(N+1)*C,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E+8>>2]=X[0],R[B+E+12>>2]=X[1],hA[B+E+16>>1]=280,W[B+E+18>>0]=o,KA(h,B+E+19,256),E+=C,N+=1}return I.llseek(Q,N*C,0),E}catch(i){if(typeof I>"u"||!(i instanceof I.ErrnoError))throw i;return-i.errno}}function xg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 21509:case 21505:return Q.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return Q.tty?0:-59;case 21519:{if(!Q.tty)return-59;var C=j.get();return R[C>>2]=0,0}case 21520:return Q.tty?-28:-59;case 21531:{var C=j.get();return I.ioctl(Q,B,C)}case 21523:return Q.tty?0:-59;case 21524:return Q.tty?0:-59;default:return-28}}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function bg(A,B){try{return A=j.getStr(A),j.doStat(I.lstat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function Xg(A,B,g,Q){try{B=j.getStr(B);var C=Q&256,E=Q&4096;return Q=Q&-4353,B=j.calculateAt(A,B,E),j.doStat(C?I.lstat:I.stat,B,g)}catch(D){if(typeof I>"u"||!(D instanceof I.ErrnoError))throw D;return-D.errno}}function fg(A,B,g,Q){j.varargs=Q;try{B=j.getStr(B),B=j.calculateAt(A,B);var C=Q?j.get():0;return I.open(B,g,C).fd}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function tg(A,B,g,Q){try{if(B=j.getStr(B),B=j.calculateAt(A,B),Q<=0)return-28;var C=I.readlink(B),E=Math.min(Q,e(C)),D=W[g+E];return KA(C,g,Q+1),W[g+E]=D,E}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function Tg(A,B){try{return A=j.getStr(A),j.doStat(I.stat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function pg(){return Date.now()}function ng(A){do{var B=d[A>>2];A+=4;var g=d[A>>2];A+=4;var Q=d[A>>2];A+=4;var C=GA(B);I.createPath("/",m.dirname(C),!0,!0),I.createDataFile(C,null,W.subarray(Q,Q+g),!0,!0,!0)}while(d[A>>2])}var zg=!0;function rg(){return zg}function yB(A){return d[A>>2]+R[A+4>>2]*4294967296}function eg(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getUTCSeconds(),R[B+4>>2]=g.getUTCMinutes(),R[B+8>>2]=g.getUTCHours(),R[B+12>>2]=g.getUTCDate(),R[B+16>>2]=g.getUTCMonth(),R[B+20>>2]=g.getUTCFullYear()-1900,R[B+24>>2]=g.getUTCDay();var Q=Date.UTC(g.getUTCFullYear(),0,1,0,0,0,0),C=(g.getTime()-Q)/(1e3*60*60*24)|0;R[B+28>>2]=C}function Og(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getSeconds(),R[B+4>>2]=g.getMinutes(),R[B+8>>2]=g.getHours(),R[B+12>>2]=g.getDate(),R[B+16>>2]=g.getMonth(),R[B+20>>2]=g.getFullYear()-1900,R[B+24>>2]=g.getDay();var Q=new Date(g.getFullYear(),0,1),C=(g.getTime()-Q.getTime())/(1e3*60*60*24)|0;R[B+28>>2]=C,R[B+36>>2]=-(g.getTimezoneOffset()*60);var E=new Date(g.getFullYear(),6,1).getTimezoneOffset(),D=Q.getTimezoneOffset(),N=(E!=D&&g.getTimezoneOffset()==Math.min(D,E))|0;R[B+32>>2]=N}function vg(A,B,g,Q,C,E){try{var D=I.getStream(C);D&&(g&2&&j.doMsync(A,D,B,Q,E),I.munmap(D))}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function aB(A){var B=e(A)+1,g=EB(B);return g&&aA(A,W,g,B),g}function ug(A,B,g){var Q=new Date().getFullYear(),C=new Date(Q,0,1),E=new Date(Q,6,1),D=C.getTimezoneOffset(),N=E.getTimezoneOffset(),F=Math.max(D,N);R[A>>2]=F*60,R[B>>2]=Number(D!=N);function o(k){var Z=k.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Z?Z[1]:"GMT"}var h=o(C),y=o(E),Y=aB(h),i=aB(y);N>2]=Y,d[g+4>>2]=i):(d[g>>2]=i,d[g+4>>2]=Y)}function BB(A,B,g){BB.called||(BB.called=!0,ug(A,B,g))}function Pg(){oA("")}var gB=[];function _g(A,B){gB.length=0;var g;for(B>>=2;g=gA[A++];)B+=g!=105&B,gB.push(g==105?R[B]:kA[B++>>1]),++B;return gB}function $g(A,B,g){var Q=_g(B,g);return og[A].apply(null,Q)}var MB;MB=()=>performance.now();function AQ(A){return A<0||A===0&&1/A===-1/0}function BQ(A,B){return(A>>>0)+B*4294967296}function gQ(A,B){return(A>>>0)+(B>>>0)*4294967296}function SB(A,B){if(A<=0)return A;var g=B<=32?Math.abs(1<=g&&(B<=32||A>g)&&(A=-2*g+A),A}function JB(A,B){return A>=0?A:B<=32?2*Math.abs(1<>3],Q+=8):DA=="i64"?(iA=[R[Q>>2],R[Q+4>>2]],Q+=8):(DA="i32",iA=R[Q>>2],Q+=4),iA}for(var D=[],N,F,o;;){var h=g;if(N=W[g>>0],N===0)break;if(F=W[g+1>>0],N==37){var y=!1,Y=!1,i=!1,k=!1,Z=!1;A:for(;;){switch(F){case 43:y=!0;break;case 45:Y=!0;break;case 35:i=!0;break;case 48:if(k)break A;k=!0;break;case 32:Z=!0;break;default:break A}g++,F=W[g+1>>0]}var c=0;if(F==42)c=E("i32"),g++,F=W[g+1>>0];else for(;F>=48&&F<=57;)c=c*10+(F-48),g++,F=W[g+1>>0];var q=!1,U=-1;if(F==46){if(U=0,q=!0,g++,F=W[g+1>>0],F==42)U=E("i32"),g++;else for(;;){var a=W[g+1>>0];if(a<48||a>57)break;U=U*10+(a-48),g++}F=W[g+1>>0]}U<0&&(U=6,q=!1);var V;switch(String.fromCharCode(F)){case"h":var x=W[g+2>>0];x==104?(g++,V=1):V=2;break;case"l":var x=W[g+2>>0];x==108?(g++,V=8):V=4;break;case"L":case"q":case"j":V=8;break;case"z":case"t":case"I":V=4;break;default:V=null}switch(V&&g++,F=W[g+1>>0],String.fromCharCode(F)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var BA=F==100||F==105;V=V||4,o=E("i"+V*8);var w;if(V==8&&(o=F==117?gQ(o[0],o[1]):BQ(o[0],o[1])),V<=4){var JI=Math.pow(256,V)-1;o=(BA?SB:JB)(o&JI,V*8)}var XA=Math.abs(o),P="";if(F==100||F==105)w=SB(o,8*V).toString(10);else if(F==117)w=JB(o,8*V).toString(10),o=Math.abs(o);else if(F==111)w=(i?"0":"")+XA.toString(8);else if(F==120||F==88){if(P=i&&o!=0?"0x":"",o<0){o=-o,w=(XA-1).toString(16);for(var PB=[],EA=0;EA=0&&(y?P="+"+P:Z&&(P=" "+P)),w.charAt(0)=="-"&&(P="-"+P,w=w.substr(1));P.length+w.lengthNB&&NB>=-4?(F=(F==103?"f":"F").charCodeAt(0),U-=NB+1):(F=(F==103?"e":"E").charCodeAt(0),U--),fA=Math.min(U,20)}F==101||F==69?(w=o.toExponential(fA),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):(F==102||F==70)&&(w=o.toFixed(fA),o===0&&AQ(o)&&(w="-"+w));var IA=w.split("e");if(_B&&!i)for(;IA[0].length>1&&IA[0].includes(".")&&(IA[0].slice(-1)=="0"||IA[0].slice(-1)==".");)IA[0]=IA[0].slice(0,-1);else for(i&&w.indexOf(".")==-1&&(IA[0]+=".");U>fA++;)IA[0]+="0";w=IA[0]+(IA.length>1?"e"+IA[1]:""),F==69&&(w=w.toUpperCase()),o>=0&&(y?w="+"+w:Z&&(w=" "+w))}for(;w.length>0]);else D=D.concat(qA("(null)".substr(0,ZA),!0));if(Y)for(;ZA0;)D.push(32);Y||D.push(E("i8"));break}case"n":{var cI=E("i32*");R[cI>>2]=D.length;break}case"%":{D.push(N);break}default:for(var EA=h;EA>0])}g+=2}else D.push(N),g+=1}return D}function QB(A){if(!A||!A.callee||!A.callee.name)return[null,"",""];A.callee.toString();var B=A.callee.name,g="(",Q=!0;for(var C in A){var E=A[C];Q||(g+=", "),Q=!1,typeof E=="number"||typeof E=="string"?g+=E:g+="("+typeof E+")"}g+=")";var D=A.callee.caller;return A=D?D.arguments:[],Q&&(g=""),[A,B,g]}function VA(A){VA.shown||(VA.shown={}),VA.shown[A]||(VA.shown[A]=1,p(A))}function CQ(A){var B=Yg(),g=B.lastIndexOf("_emscripten_log"),Q=B.lastIndexOf("_emscripten_get_callstack"),C=B.indexOf(` `,Math.max(g,Q))+1;B=B.slice(C),A&32&&VA("EM_LOG_DEMANGLE is deprecated; ignoring"),A&8&&typeof emscripten_source_map>"u"&&(VA('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),A^=8,A|=16);var E=null;if(A&128)for(E=QB(arguments);E[1].includes("_emscripten_");)E=QB(E[0]);var D=B.split(` diff --git a/assets/index.b81e02f1.js b/assets/index.b81e02f1.js new file mode 100644 index 0000000..1a8fe0c --- /dev/null +++ b/assets/index.b81e02f1.js @@ -0,0 +1,1242 @@ +function SH(e,t){for(var r=0;ri[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerpolicy&&(a.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?a.credentials="include":o.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();window.location.hostname==="tonverifier.live"&&window.location.replace(window.location.href.replace("tonverifier.live","verifier.ton.org"));var _n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gb(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}),r}var WO={},Yb={};Yb.byteLength=EH;Yb.toByteArray=TH;Yb.fromByteArray=PH;var pu=[],ll=[],CH=typeof Uint8Array<"u"?Uint8Array:Array,f_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ep=0,kH=f_.length;Ep0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function EH(e){var t=VO(e),r=t[0],i=t[1];return(r+i)*3/4-i}function AH(e,t,r){return(t+r)*3/4-r}function TH(e){var t,r=VO(e),i=r[0],o=r[1],a=new CH(AH(e,i,o)),s=0,l=o>0?i-4:i,u;for(u=0;u>16&255,a[s++]=t>>8&255,a[s++]=t&255;return o===2&&(t=ll[e.charCodeAt(u)]<<2|ll[e.charCodeAt(u+1)]>>4,a[s++]=t&255),o===1&&(t=ll[e.charCodeAt(u)]<<10|ll[e.charCodeAt(u+1)]<<4|ll[e.charCodeAt(u+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function IH(e){return pu[e>>18&63]+pu[e>>12&63]+pu[e>>6&63]+pu[e&63]}function RH(e,t,r){for(var i,o=[],a=t;al?l:s+a));return i===1?(t=e[r-1],o.push(pu[t>>2]+pu[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],o.push(pu[t>>10]+pu[t>>4&63]+pu[t<<2&63]+"=")),o.join("")}var K4={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */K4.read=function(e,t,r,i,o){var a,s,l=o*8-i-1,u=(1<>1,d=-7,p=r?o-1:0,v=r?-1:1,x=e[t+p];for(p+=v,a=x&(1<<-d)-1,x>>=-d,d+=l;d>0;a=a*256+e[t+p],p+=v,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=i;d>0;s=s*256+e[t+p],p+=v,d-=8);if(a===0)a=1-c;else{if(a===u)return s?NaN:(x?-1:1)*(1/0);s=s+Math.pow(2,i),a=a-c}return(x?-1:1)*s*Math.pow(2,a-i)};K4.write=function(e,t,r,i,o,a){var s,l,u,c=a*8-o-1,d=(1<>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=i?0:a-1,b=i?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+p>=1?t+=v/u:t+=v*Math.pow(2,1-p),t*u>=2&&(s++,u/=2),s+p>=d?(l=0,s=d):s+p>=1?(l=(t*u-1)*Math.pow(2,o),s=s+p):(l=t*Math.pow(2,p-1)*Math.pow(2,o),s=0));o>=8;e[r+x]=l&255,x+=b,l/=256,o-=8);for(s=s<0;e[r+x]=s&255,x+=b,s/=256,c-=8);e[r+x-b]|=y*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=Yb,r=K4,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=a(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const $=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf($,C),$.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.byteOffset}});function s($){if($>o)throw new RangeError('The value "'+$+'" is invalid for option "size"');const C=new Uint8Array($);return Object.setPrototypeOf(C,l.prototype),C}function l($,C,T){if(typeof $=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p($)}return u($,C,T)}l.poolSize=8192;function u($,C,T){if(typeof $=="string")return v($,C);if(ArrayBuffer.isView($))return b($);if($==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(lt($,ArrayBuffer)||$&<($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(lt($,SharedArrayBuffer)||$&<($.buffer,SharedArrayBuffer)))return y($,C,T);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=$.valueOf&&$.valueOf();if(Z!=null&&Z!==$)return l.from(Z,C,T);const ve=_($);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return l.from($[Symbol.toPrimitive]("string"),C,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}l.from=function($,C,T){return u($,C,T)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function c($){if(typeof $!="number")throw new TypeError('"size" argument must be of type number');if($<0)throw new RangeError('The value "'+$+'" is invalid for option "size"')}function d($,C,T){return c($),$<=0?s($):C!==void 0?typeof T=="string"?s($).fill(C,T):s($).fill(C):s($)}l.alloc=function($,C,T){return d($,C,T)};function p($){return c($),s($<0?0:k($)|0)}l.allocUnsafe=function($){return p($)},l.allocUnsafeSlow=function($){return p($)};function v($,C){if((typeof C!="string"||C==="")&&(C="utf8"),!l.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const T=O($,C)|0;let Z=s(T);const ve=Z.write($,C);return ve!==T&&(Z=Z.slice(0,ve)),Z}function x($){const C=$.length<0?0:k($.length)|0,T=s(C);for(let Z=0;Z=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return $|0}function E($){return+$!=$&&($=0),l.alloc(+$)}l.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==l.prototype},l.compare=function(C,T){if(lt(C,Uint8Array)&&(C=l.from(C,C.offset,C.byteLength)),lt(T,Uint8Array)&&(T=l.from(T,T.offset,T.byteLength)),!l.isBuffer(C)||!l.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===T)return 0;let Z=C.length,ve=T.length;for(let je=0,ct=Math.min(Z,ve);jeve.length?(l.isBuffer(ct)||(ct=l.from(ct)),ct.copy(ve,je)):Uint8Array.prototype.set.call(ve,ct,je);else if(l.isBuffer(ct))ct.copy(ve,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=ct.length}return ve};function O($,C){if(l.isBuffer($))return $.length;if(ArrayBuffer.isView($)||lt($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);const T=$.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&T===0)return 0;let ve=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Ie($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return Be($).length;default:if(ve)return Z?-1:Ie($).length;C=(""+C).toLowerCase(),ve=!0}}l.byteLength=O;function U($,C,T){let Z=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,C>>>=0,T<=C))return"";for($||($="utf8");;)switch($){case"hex":return J(this,C,T);case"utf8":case"utf-8":return P(this,C,T);case"ascii":return pe(this,C,T);case"latin1":case"binary":return xe(this,C,T);case"base64":return oe(this,C,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,C,T);default:if(Z)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),Z=!0}}l.prototype._isBuffer=!0;function D($,C,T){const Z=$[C];$[C]=$[T],$[T]=Z}l.prototype.swap16=function(){const C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;TT&&(C+=" ... "),""},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(C,T,Z,ve,je){if(lt(C,Uint8Array)&&(C=l.from(C,C.offset,C.byteLength)),!l.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(T===void 0&&(T=0),Z===void 0&&(Z=C?C.length:0),ve===void 0&&(ve=0),je===void 0&&(je=this.length),T<0||Z>C.length||ve<0||je>this.length)throw new RangeError("out of range index");if(ve>=je&&T>=Z)return 0;if(ve>=je)return-1;if(T>=Z)return 1;if(T>>>=0,Z>>>=0,ve>>>=0,je>>>=0,this===C)return 0;let ct=je-ve,ur=Z-T;const Dr=Math.min(ct,ur),hr=this.slice(ve,je),Rr=C.slice(T,Z);for(let Gr=0;Gr2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,jt(T)&&(T=ve?0:$.length-1),T<0&&(T=$.length+T),T>=$.length){if(ve)return-1;T=$.length-1}else if(T<0)if(ve)T=0;else return-1;if(typeof C=="string"&&(C=l.from(C,Z)),l.isBuffer(C))return C.length===0?-1:F($,C,T,Z,ve);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call($,C,T):Uint8Array.prototype.lastIndexOf.call($,C,T):F($,[C],T,Z,ve);throw new TypeError("val must be string, number or Buffer")}function F($,C,T,Z,ve){let je=1,ct=$.length,ur=C.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if($.length<2||C.length<2)return-1;je=2,ct/=2,ur/=2,T/=2}function Dr(Rr,Gr){return je===1?Rr[Gr]:Rr.readUInt16BE(Gr*je)}let hr;if(ve){let Rr=-1;for(hr=T;hrct&&(T=ct-ur),hr=T;hr>=0;hr--){let Rr=!0;for(let Gr=0;Grve&&(Z=ve)):Z=ve;const je=C.length;Z>je/2&&(Z=je/2);let ct;for(ct=0;ct>>0,isFinite(Z)?(Z=Z>>>0,ve===void 0&&(ve="utf8")):(ve=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const je=this.length-T;if((Z===void 0||Z>je)&&(Z=je),C.length>0&&(Z<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");let ct=!1;for(;;)switch(ve){case"hex":return H(this,C,T,Z);case"utf8":case"utf-8":return W(this,C,T,Z);case"ascii":case"latin1":case"binary":return G(this,C,T,Z);case"base64":return ae(this,C,T,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,C,T,Z);default:if(ct)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),ct=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe($,C,T){return C===0&&T===$.length?t.fromByteArray($):t.fromByteArray($.slice(C,T))}function P($,C,T){T=Math.min($.length,T);const Z=[];let ve=C;for(;ve239?4:je>223?3:je>191?2:1;if(ve+ur<=T){let Dr,hr,Rr,Gr;switch(ur){case 1:je<128&&(ct=je);break;case 2:Dr=$[ve+1],(Dr&192)===128&&(Gr=(je&31)<<6|Dr&63,Gr>127&&(ct=Gr));break;case 3:Dr=$[ve+1],hr=$[ve+2],(Dr&192)===128&&(hr&192)===128&&(Gr=(je&15)<<12|(Dr&63)<<6|hr&63,Gr>2047&&(Gr<55296||Gr>57343)&&(ct=Gr));break;case 4:Dr=$[ve+1],hr=$[ve+2],Rr=$[ve+3],(Dr&192)===128&&(hr&192)===128&&(Rr&192)===128&&(Gr=(je&15)<<18|(Dr&63)<<12|(hr&63)<<6|Rr&63,Gr>65535&&Gr<1114112&&(ct=Gr))}}ct===null?(ct=65533,ur=1):ct>65535&&(ct-=65536,Z.push(ct>>>10&1023|55296),ct=56320|ct&1023),Z.push(ct),ve+=ur}return le(Z)}const ee=4096;function le($){const C=$.length;if(C<=ee)return String.fromCharCode.apply(String,$);let T="",Z=0;for(;ZZ)&&(T=Z);let ve="";for(let je=C;jeZ&&(C=Z),T<0?(T+=Z,T<0&&(T=0)):T>Z&&(T=Z),TT)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(C,T,Z){C=C>>>0,T=T>>>0,Z||Le(C,T,this.length);let ve=this[C],je=1,ct=0;for(;++ct>>0,T=T>>>0,Z||Le(C,T,this.length);let ve=this[C+--T],je=1;for(;T>0&&(je*=256);)ve+=this[C+--T]*je;return ve},l.prototype.readUint8=l.prototype.readUInt8=function(C,T){return C=C>>>0,T||Le(C,1,this.length),this[C]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(C,T){return C=C>>>0,T||Le(C,2,this.length),this[C]|this[C+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(C,T){return C=C>>>0,T||Le(C,2,this.length),this[C]<<8|this[C+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(C,T){return C=C>>>0,T||Le(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(C,T){return C=C>>>0,T||Le(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},l.prototype.readBigUInt64LE=ie(function(C){C=C>>>0,yr(C,"offset");const T=this[C],Z=this[C+7];(T===void 0||Z===void 0)&&ne(C,this.length-8);const ve=T+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,je=this[++C]+this[++C]*2**8+this[++C]*2**16+Z*2**24;return BigInt(ve)+(BigInt(je)<>>0,yr(C,"offset");const T=this[C],Z=this[C+7];(T===void 0||Z===void 0)&&ne(C,this.length-8);const ve=T*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],je=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+Z;return(BigInt(ve)<>>0,T=T>>>0,Z||Le(C,T,this.length);let ve=this[C],je=1,ct=0;for(;++ct=je&&(ve-=Math.pow(2,8*T)),ve},l.prototype.readIntBE=function(C,T,Z){C=C>>>0,T=T>>>0,Z||Le(C,T,this.length);let ve=T,je=1,ct=this[C+--ve];for(;ve>0&&(je*=256);)ct+=this[C+--ve]*je;return je*=128,ct>=je&&(ct-=Math.pow(2,8*T)),ct},l.prototype.readInt8=function(C,T){return C=C>>>0,T||Le(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},l.prototype.readInt16LE=function(C,T){C=C>>>0,T||Le(C,2,this.length);const Z=this[C]|this[C+1]<<8;return Z&32768?Z|4294901760:Z},l.prototype.readInt16BE=function(C,T){C=C>>>0,T||Le(C,2,this.length);const Z=this[C+1]|this[C]<<8;return Z&32768?Z|4294901760:Z},l.prototype.readInt32LE=function(C,T){return C=C>>>0,T||Le(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},l.prototype.readInt32BE=function(C,T){return C=C>>>0,T||Le(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},l.prototype.readBigInt64LE=ie(function(C){C=C>>>0,yr(C,"offset");const T=this[C],Z=this[C+7];(T===void 0||Z===void 0)&&ne(C,this.length-8);const ve=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(Z<<24);return(BigInt(ve)<>>0,yr(C,"offset");const T=this[C],Z=this[C+7];(T===void 0||Z===void 0)&&ne(C,this.length-8);const ve=(T<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(ve)<>>0,T||Le(C,4,this.length),r.read(this,C,!0,23,4)},l.prototype.readFloatBE=function(C,T){return C=C>>>0,T||Le(C,4,this.length),r.read(this,C,!1,23,4)},l.prototype.readDoubleLE=function(C,T){return C=C>>>0,T||Le(C,8,this.length),r.read(this,C,!0,52,8)},l.prototype.readDoubleBE=function(C,T){return C=C>>>0,T||Le(C,8,this.length),r.read(this,C,!1,52,8)};function He($,C,T,Z,ve,je){if(!l.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>ve||C$.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(C,T,Z,ve){if(C=+C,T=T>>>0,Z=Z>>>0,!ve){const ur=Math.pow(2,8*Z)-1;He(this,C,T,Z,ur,0)}let je=1,ct=0;for(this[T]=C&255;++ct>>0,Z=Z>>>0,!ve){const ur=Math.pow(2,8*Z)-1;He(this,C,T,Z,ur,0)}let je=Z-1,ct=1;for(this[T+je]=C&255;--je>=0&&(ct*=256);)this[T+je]=C/ct&255;return T+Z},l.prototype.writeUint8=l.prototype.writeUInt8=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,1,255,0),this[T]=C&255,T+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,2,65535,0),this[T]=C&255,this[T+1]=C>>>8,T+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,2,65535,0),this[T]=C>>>8,this[T+1]=C&255,T+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,4,4294967295,0),this[T+3]=C>>>24,this[T+2]=C>>>16,this[T+1]=C>>>8,this[T]=C&255,T+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,4,4294967295,0),this[T]=C>>>24,this[T+1]=C>>>16,this[T+2]=C>>>8,this[T+3]=C&255,T+4};function nr($,C,T,Z,ve){Kt(C,Z,ve,$,T,7);let je=Number(C&BigInt(4294967295));$[T++]=je,je=je>>8,$[T++]=je,je=je>>8,$[T++]=je,je=je>>8,$[T++]=je;let ct=Number(C>>BigInt(32)&BigInt(4294967295));return $[T++]=ct,ct=ct>>8,$[T++]=ct,ct=ct>>8,$[T++]=ct,ct=ct>>8,$[T++]=ct,T}function Bt($,C,T,Z,ve){Kt(C,Z,ve,$,T,7);let je=Number(C&BigInt(4294967295));$[T+7]=je,je=je>>8,$[T+6]=je,je=je>>8,$[T+5]=je,je=je>>8,$[T+4]=je;let ct=Number(C>>BigInt(32)&BigInt(4294967295));return $[T+3]=ct,ct=ct>>8,$[T+2]=ct,ct=ct>>8,$[T+1]=ct,ct=ct>>8,$[T]=ct,T+8}l.prototype.writeBigUInt64LE=ie(function(C,T=0){return nr(this,C,T,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=ie(function(C,T=0){return Bt(this,C,T,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(C,T,Z,ve){if(C=+C,T=T>>>0,!ve){const Dr=Math.pow(2,8*Z-1);He(this,C,T,Z,Dr-1,-Dr)}let je=0,ct=1,ur=0;for(this[T]=C&255;++je>0)-ur&255;return T+Z},l.prototype.writeIntBE=function(C,T,Z,ve){if(C=+C,T=T>>>0,!ve){const Dr=Math.pow(2,8*Z-1);He(this,C,T,Z,Dr-1,-Dr)}let je=Z-1,ct=1,ur=0;for(this[T+je]=C&255;--je>=0&&(ct*=256);)C<0&&ur===0&&this[T+je+1]!==0&&(ur=1),this[T+je]=(C/ct>>0)-ur&255;return T+Z},l.prototype.writeInt8=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,1,127,-128),C<0&&(C=255+C+1),this[T]=C&255,T+1},l.prototype.writeInt16LE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,2,32767,-32768),this[T]=C&255,this[T+1]=C>>>8,T+2},l.prototype.writeInt16BE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,2,32767,-32768),this[T]=C>>>8,this[T+1]=C&255,T+2},l.prototype.writeInt32LE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,4,2147483647,-2147483648),this[T]=C&255,this[T+1]=C>>>8,this[T+2]=C>>>16,this[T+3]=C>>>24,T+4},l.prototype.writeInt32BE=function(C,T,Z){return C=+C,T=T>>>0,Z||He(this,C,T,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[T]=C>>>24,this[T+1]=C>>>16,this[T+2]=C>>>8,this[T+3]=C&255,T+4},l.prototype.writeBigInt64LE=ie(function(C,T=0){return nr(this,C,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=ie(function(C,T=0){return Bt(this,C,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rt($,C,T,Z,ve,je){if(T+Z>$.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function Jt($,C,T,Z,ve){return C=+C,T=T>>>0,ve||Rt($,C,T,4),r.write($,C,T,Z,23,4),T+4}l.prototype.writeFloatLE=function(C,T,Z){return Jt(this,C,T,!0,Z)},l.prototype.writeFloatBE=function(C,T,Z){return Jt(this,C,T,!1,Z)};function vr($,C,T,Z,ve){return C=+C,T=T>>>0,ve||Rt($,C,T,8),r.write($,C,T,Z,52,8),T+8}l.prototype.writeDoubleLE=function(C,T,Z){return vr(this,C,T,!0,Z)},l.prototype.writeDoubleBE=function(C,T,Z){return vr(this,C,T,!1,Z)},l.prototype.copy=function(C,T,Z,ve){if(!l.isBuffer(C))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ve&&ve!==0&&(ve=this.length),T>=C.length&&(T=C.length),T||(T=0),ve>0&&ve=this.length)throw new RangeError("Index out of range");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),C.length-T>>0,Z=Z===void 0?this.length:Z>>>0,C||(C=0);let je;if(typeof C=="number")for(je=T;je2**32?ve=Ct(String(T)):typeof T=="bigint"&&(ve=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(ve=Ct(ve)),ve+="n"),Z+=` It must be ${C}. Received ${ve}`,Z},RangeError);function Ct($){let C="",T=$.length;const Z=$[0]==="-"?1:0;for(;T>=Z+4;T-=3)C=`_${$.slice(T-3,T)}${C}`;return`${$.slice(0,T)}${C}`}function Lt($,C,T){yr(C,"offset"),($[C]===void 0||$[C+T]===void 0)&&ne(C,$.length-(T+1))}function Kt($,C,T,Z,ve,je){if($>T||$3?C===0||C===BigInt(0)?ur=`>= 0${ct} and < 2${ct} ** ${(je+1)*8}${ct}`:ur=`>= -(2${ct} ** ${(je+1)*8-1}${ct}) and < 2 ** ${(je+1)*8-1}${ct}`:ur=`>= ${C}${ct} and <= ${T}${ct}`,new At.ERR_OUT_OF_RANGE("value",ur,$)}Lt(Z,ve,je)}function yr($,C){if(typeof $!="number")throw new At.ERR_INVALID_ARG_TYPE(C,"number",$)}function ne($,C,T){throw Math.floor($)!==$?(yr($,T),new At.ERR_OUT_OF_RANGE(T||"offset","an integer",$)):C<0?new At.ERR_BUFFER_OUT_OF_BOUNDS:new At.ERR_OUT_OF_RANGE(T||"offset",`>= ${T?1:0} and <= ${C}`,$)}const Mt=/[^+/0-9A-Za-z-_]/g;function Nt($){if($=$.split("=")[0],$=$.trim().replace(Mt,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function Ie($,C){C=C||1/0;let T;const Z=$.length;let ve=null;const je=[];for(let ct=0;ct55295&&T<57344){if(!ve){if(T>56319){(C-=3)>-1&&je.push(239,191,189);continue}else if(ct+1===Z){(C-=3)>-1&&je.push(239,191,189);continue}ve=T;continue}if(T<56320){(C-=3)>-1&&je.push(239,191,189),ve=T;continue}T=(ve-55296<<10|T-56320)+65536}else ve&&(C-=3)>-1&&je.push(239,191,189);if(ve=null,T<128){if((C-=1)<0)break;je.push(T)}else if(T<2048){if((C-=2)<0)break;je.push(T>>6|192,T&63|128)}else if(T<65536){if((C-=3)<0)break;je.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((C-=4)<0)break;je.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return je}function Ae($){const C=[];for(let T=0;T<$.length;++T)C.push($.charCodeAt(T)&255);return C}function fe($,C){let T,Z,ve;const je=[];for(let ct=0;ct<$.length&&!((C-=2)<0);++ct)T=$.charCodeAt(ct),Z=T>>8,ve=T%256,je.push(ve),je.push(Z);return je}function Be($){return t.toByteArray(Nt($))}function rt($,C,T,Z){let ve;for(ve=0;ve=C.length||ve>=$.length);++ve)C[ve+T]=$[ve];return ve}function lt($,C){return $ instanceof C||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===C.name}function jt($){return $!==$}const ce=function(){const $="0123456789abcdef",C=new Array(256);for(let T=0;T<16;++T){const Z=T*16;for(let ve=0;ve<16;++ve)C[Z+ve]=$[T]+$[ve]}return C}();function ie($){return typeof BigInt>"u"?de:$}function de(){throw new Error("BigInt not supported")}})(WO);globalThis.Buffer=WO.Buffer;class Qh{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const f0=typeof window>"u"||"Deno"in window;function dl(){}function MH(e,t){return typeof e=="function"?e(t):e}function w3(e){return typeof e=="number"&&e>=0&&e!==1/0}function qO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rm(e,t,r){return Xh(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function OH(e,t,r){return Xh(e)?typeof t=="function"?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Hc(e,t,r){return Xh(e)?[{...t,queryKey:e},r]:[e||{},t]}function BH(e,t,r){return Xh(e)?[{...t,mutationKey:e},r]:[e||{},t]}function z8(e,t){const{type:r="all",exact:i,fetchStatus:o,predicate:a,queryKey:s,stale:l}=e;if(Xh(s)){if(i){if(t.queryHash!==G4(s,t.options))return!1}else if(!x1(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof o<"u"&&o!==t.state.fetchStatus||a&&!a(t))}function H8(e,t){const{exact:r,fetching:i,predicate:o,mutationKey:a}=e;if(Xh(a)){if(!t.options.mutationKey)return!1;if(r){if(hf(t.options.mutationKey)!==hf(a))return!1}else if(!x1(t.options.mutationKey,a))return!1}return!(typeof i=="boolean"&&t.state.status==="loading"!==i||o&&!o(t))}function G4(e,t){return(t?.queryKeyHashFn||hf)(e)}function hf(e){return JSON.stringify(e,(t,r)=>_3(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function x1(e,t){return KO(e,t)}function KO(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!KO(e[r],t[r])):!1}function GO(e,t){if(e===t)return e;const r=W8(e)&&W8(t);if(r||_3(e)&&_3(t)){const i=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{};let l=0;for(let u=0;u"u")return!0;const r=t.prototype;return!(!V8(r)||!r.hasOwnProperty("isPrototypeOf"))}function V8(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xh(e){return Array.isArray(e)}function YO(e){return new Promise(t=>{setTimeout(t,e)})}function q8(e){YO(0).then(e)}function UH(){if(typeof AbortController=="function")return new AbortController}function S3(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?GO(e,t):t}class DH extends Qh{constructor(){super(),this.setup=t=>{if(!f0&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const _1=new DH;class LH extends Qh{constructor(){super(),this.setup=t=>{if(!f0&&window.addEventListener){const r=()=>t();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const S1=new LH;function NH(e){return Math.min(1e3*2**e,3e4)}function Zb(e){return(e??"online")==="online"?S1.isOnline():!0}class ZO{constructor(t){this.revert=t?.revert,this.silent=t?.silent}}function Kv(e){return e instanceof ZO}function QO(e){let t=!1,r=0,i=!1,o,a,s;const l=new Promise((_,k)=>{a=_,s=k}),u=_=>{i||(x(new ZO(_)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},p=()=>!_1.isFocused()||e.networkMode!=="always"&&!S1.isOnline(),v=_=>{i||(i=!0,e.onSuccess==null||e.onSuccess(_),o?.(),a(_))},x=_=>{i||(i=!0,e.onError==null||e.onError(_),o?.(),s(_))},b=()=>new Promise(_=>{o=k=>{if(i||!p())return _(k)},e.onPause==null||e.onPause()}).then(()=>{o=void 0,i||e.onContinue==null||e.onContinue()}),y=()=>{if(i)return;let _;try{_=e.fn()}catch(k){_=Promise.reject(k)}Promise.resolve(_).then(v).catch(k=>{var E,O;if(i)return;const U=(E=e.retry)!=null?E:3,D=(O=e.retryDelay)!=null?O:NH,j=typeof D=="function"?D(r,k):D,F=U===!0||typeof U=="number"&&r{if(p())return b()}).then(()=>{t?x(k):y()})})};return Zb(e.networkMode)?y():b().then(y),{promise:l,cancel:u,continue:()=>{o?.()},cancelRetry:c,continueRetry:d}}const Y4=console;function jH(){let e=[],t=0,r=d=>{d()},i=d=>{d()};const o=d=>{let p;t++;try{p=d()}finally{t--,t||l()}return p},a=d=>{t?e.push(d):q8(()=>{r(d)})},s=d=>(...p)=>{a(()=>{d(...p)})},l=()=>{const d=e;e=[],d.length&&q8(()=>{i(()=>{d.forEach(p=>{r(p)})})})};return{batch:o,batchCalls:s,schedule:a,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{i=d}}}const Xo=jH();class XO{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),w3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(f0?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class $H extends XO{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Y4,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||FH(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const i=S3(this.state.data,t,this.options);return this.dispatch({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const i=this.promise;return(r=this.retryer)==null||r.cancel(t),i?i.then(dl).catch(dl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!qO(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(i=>i.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(i=>i.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var i,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var a;return(a=this.retryer)==null||a.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(b=>b.options.queryFn);x&&this.setOptions(x.options)}Array.isArray(this.options.queryKey);const s=UH(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(l);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(u(d),(i=this.options.behavior)==null||i.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=d.fetchOptions)==null?void 0:o.meta)){var p;this.dispatch({type:"fetch",meta:(p=d.fetchOptions)==null?void 0:p.meta})}const v=x=>{if(Kv(x)&&x.silent||this.dispatch({type:"error",error:x}),!Kv(x)){var b,y;(b=(y=this.cache.config).onError)==null||b.call(y,x,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=QO({fn:d.fetchFn,abort:s?.abort.bind(s),onSuccess:x=>{var b,y;if(typeof x>"u"){v(new Error("undefined"));return}this.setData(x),(b=(y=this.cache.config).onSuccess)==null||b.call(y,x,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(x,b)=>{this.dispatch({type:"failed",failureCount:x,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=i=>{var o,a;switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Zb(this.options.networkMode)?"fetching":"paused",...!i.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(a=t.dataUpdatedAt)!=null?a:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Kv(s)&&s.revert&&this.revertState?{...this.revertState}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=r(this.state),Xo.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function FH(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class zH extends Qh{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,i){var o;const a=r.queryKey,s=(o=r.queryHash)!=null?o:G4(a,r);let l=this.get(s);return l||(l=new $H({cache:this,logger:t.getLogger(),queryKey:a,queryHash:s,options:t.defaultQueryOptions(r),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(i=>i!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Xo.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[i]=Hc(t,r);return typeof i.exact>"u"&&(i.exact=!0),this.queries.find(o=>z8(i,o))}findAll(t,r){const[i]=Hc(t,r);return Object.keys(i).length>0?this.queries.filter(o=>z8(i,o)):this.queries}notify(t){Xo.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Xo.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Xo.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class HH extends XO{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Y4,this.observers=[],this.state=t.state||JO(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(r=>r!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const t=()=>{var O;return this.retryer=QO({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(U,D)=>{this.dispatch({type:"failed",failureCount:U,error:D})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var i,o,a,s,l,u;if(!r){var c,d,p,v;this.dispatch({type:"loading",variables:this.options.variables}),await((c=(d=this.mutationCache.config).onMutate)==null?void 0:c.call(d,this.state.variables,this));const U=await((p=(v=this.options).onMutate)==null?void 0:p.call(v,this.state.variables));U!==this.state.context&&this.dispatch({type:"loading",context:U,variables:this.state.variables})}const O=await t();return await((i=(o=this.mutationCache.config).onSuccess)==null?void 0:i.call(o,O,this.state.variables,this.state.context,this)),await((a=(s=this.options).onSuccess)==null?void 0:a.call(s,O,this.state.variables,this.state.context)),await((l=(u=this.options).onSettled)==null?void 0:l.call(u,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var x,b,y,_,k,E;throw await((x=(b=this.mutationCache.config).onError)==null?void 0:x.call(b,O,this.state.variables,this.state.context,this)),await((y=(_=this.options).onError)==null?void 0:y.call(_,O,this.state.variables,this.state.context)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,O,this.state.variables,this.state.context)),O}finally{this.dispatch({type:"error",error:O})}}}dispatch(t){const r=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"loading":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Zb(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...i,...t.state}}};this.state=r(this.state),Xo.batch(()=>{this.observers.forEach(i=>{i.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function JO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class WH extends Qh{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,i){const o=new HH({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:i,defaultOptions:r.mutationKey?t.getMutationDefaults(r.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){Xo.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(r=>H8(t,r))}findAll(t){return this.mutations.filter(r=>H8(t,r))}notify(t){Xo.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.mutations.filter(r=>r.state.isPaused);return Xo.batch(()=>t.reduce((r,i)=>r.then(()=>i.continue().catch(dl)),Promise.resolve()))}}function VH(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,i,o,a,s;const l=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,u=(i=e.fetchOptions)==null||(o=i.meta)==null?void 0:o.fetchMore,c=u?.pageParam,d=u?.direction==="forward",p=u?.direction==="backward",v=((a=e.state.data)==null?void 0:a.pages)||[],x=((s=e.state.data)==null?void 0:s.pageParams)||[];let b=x,y=!1;const _=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>{var F;if((F=e.signal)!=null&&F.aborted)y=!0;else{var H;(H=e.signal)==null||H.addEventListener("abort",()=>{y=!0})}return e.signal}})},k=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),E=(j,F,H,W)=>(b=W?[F,...b]:[...b,F],W?[H,...j]:[...j,H]),O=(j,F,H,W)=>{if(y)return Promise.reject("Cancelled");if(typeof H>"u"&&!F&&j.length)return Promise.resolve(j);const G={queryKey:e.queryKey,pageParam:H,meta:e.options.meta};_(G);const ae=k(G);return Promise.resolve(ae).then(oe=>E(j,H,oe,W))};let U;if(!v.length)U=O([]);else if(d){const j=typeof c<"u",F=j?c:K8(e.options,v);U=O(v,j,F)}else if(p){const j=typeof c<"u",F=j?c:qH(e.options,v);U=O(v,j,F,!0)}else{b=[];const j=typeof e.options.getNextPageParam>"u";U=(l&&v[0]?l(v[0],0,v):!0)?O([],j,x[0]):Promise.resolve(E([],x[0],v[0]));for(let H=1;H{if(l&&v[H]?l(v[H],H,v):!0){const ae=j?x[H]:K8(e.options,W);return O(W,j,ae)}return Promise.resolve(E(W,x[H],v[H]))})}return U.then(j=>({pages:j,pageParams:b}))}}}}function K8(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function qH(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class KH{constructor(t={}){this.queryCache=t.queryCache||new zH,this.mutationCache=t.mutationCache||new WH,this.logger=t.logger||Y4,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=_1.subscribe(()=>{_1.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=S1.subscribe(()=>{S1.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[i]=Hc(t,r);return i.fetchStatus="fetching",this.queryCache.findAll(i).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var i;return(i=this.queryCache.find(t,r))==null?void 0:i.state.data}ensureQueryData(t,r,i){const o=Rm(t,r,i),a=this.getQueryData(o.queryKey);return a?Promise.resolve(a):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:i})=>{const o=i.data;return[r,o]})}setQueryData(t,r,i){const o=this.queryCache.find(t),a=o?.state.data,s=MH(r,a);if(typeof s>"u")return;const l=Rm(t),u=this.defaultQueryOptions(l);return this.queryCache.build(this,u).setData(s,{...i,manual:!0})}setQueriesData(t,r,i){return Xo.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,r,i)]))}getQueryState(t,r){var i;return(i=this.queryCache.find(t,r))==null?void 0:i.state}removeQueries(t,r){const[i]=Hc(t,r),o=this.queryCache;Xo.batch(()=>{o.findAll(i).forEach(a=>{o.remove(a)})})}resetQueries(t,r,i){const[o,a]=Hc(t,r,i),s=this.queryCache,l={type:"active",...o};return Xo.batch(()=>(s.findAll(o).forEach(u=>{u.reset()}),this.refetchQueries(l,a)))}cancelQueries(t,r,i){const[o,a={}]=Hc(t,r,i);typeof a.revert>"u"&&(a.revert=!0);const s=Xo.batch(()=>this.queryCache.findAll(o).map(l=>l.cancel(a)));return Promise.all(s).then(dl).catch(dl)}invalidateQueries(t,r,i){const[o,a]=Hc(t,r,i);return Xo.batch(()=>{var s,l;if(this.queryCache.findAll(o).forEach(c=>{c.invalidate()}),o.refetchType==="none")return Promise.resolve();const u={...o,type:(s=(l=o.refetchType)!=null?l:o.type)!=null?s:"active"};return this.refetchQueries(u,a)})}refetchQueries(t,r,i){const[o,a]=Hc(t,r,i),s=Xo.batch(()=>this.queryCache.findAll(o).filter(u=>!u.isDisabled()).map(u=>{var c;return u.fetch(void 0,{...a,cancelRefetch:(c=a?.cancelRefetch)!=null?c:!0,meta:{refetchPage:o.refetchPage}})}));let l=Promise.all(s).then(dl);return a!=null&&a.throwOnError||(l=l.catch(dl)),l}fetchQuery(t,r,i){const o=Rm(t,r,i),a=this.defaultQueryOptions(o);typeof a.retry>"u"&&(a.retry=!1);const s=this.queryCache.build(this,a);return s.isStaleByTime(a.staleTime)?s.fetch(a):Promise.resolve(s.state.data)}prefetchQuery(t,r,i){return this.fetchQuery(t,r,i).then(dl).catch(dl)}fetchInfiniteQuery(t,r,i){const o=Rm(t,r,i);return o.behavior=VH(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,i){return this.fetchInfiniteQuery(t,r,i).then(dl).catch(dl)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,r){const i=this.queryDefaults.find(o=>hf(t)===hf(o.queryKey));i?i.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(i=>x1(t,i.queryKey));return r?.defaultOptions}setMutationDefaults(t,r){const i=this.mutationDefaults.find(o=>hf(t)===hf(o.mutationKey));i?i.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(i=>x1(t,i.mutationKey));return r?.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r={...this.defaultOptions.queries,...this.getQueryDefaults(t?.queryKey),...t,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=G4(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t?.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class GH extends Qh{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),G8(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return C3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return C3(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const i=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),x3(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const a=this.hasListeners();a&&Y8(this.currentQuery,o,this.options,i)&&this.executeFetch(),this.updateResult(r),a&&(this.currentQuery!==o||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();a&&(this.currentQuery!==o||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t);return this.createResult(r,t)}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),t[i])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...r}={}){return this.fetch({...r,meta:{refetchPage:t}})}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),i=this.client.getQueryCache().build(this.client,r);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,r))}fetch(t){var r;return this.executeFetch({...t,cancelRefetch:(r=t.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(dl)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),f0||this.currentResult.isStale||!w3(this.options.staleTime))return;const r=qO(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(f0||this.options.enabled===!1||!w3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||_1.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const i=this.currentQuery,o=this.options,a=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,u=t!==i,c=u?t.state:this.currentQueryInitialState,d=u?this.currentResult:this.previousQueryResult,{state:p}=t;let{dataUpdatedAt:v,error:x,errorUpdatedAt:b,fetchStatus:y,status:_}=p,k=!1,E=!1,O;if(r._optimisticResults){const H=this.hasListeners(),W=!H&&G8(t,r),G=H&&Y8(t,i,r,o);(W||G)&&(y=Zb(t.options.networkMode)?"fetching":"paused",v||(_="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!p.dataUpdatedAt&&d!=null&&d.isSuccess&&_!=="error")O=d.data,v=d.dataUpdatedAt,_=d.status,k=!0;else if(r.select&&typeof p.data<"u")if(a&&p.data===s?.data&&r.select===this.selectFn)O=this.selectResult;else try{this.selectFn=r.select,O=r.select(p.data),O=S3(a?.data,O,r),this.selectResult=O,this.selectError=null}catch(H){this.selectError=H}else O=p.data;if(typeof r.placeholderData<"u"&&typeof O>"u"&&_==="loading"){let H;if(a!=null&&a.isPlaceholderData&&r.placeholderData===l?.placeholderData)H=a.data;else if(H=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof H<"u")try{H=r.select(H),this.selectError=null}catch(W){this.selectError=W}typeof H<"u"&&(_="success",O=S3(a?.data,H,r),E=!0)}this.selectError&&(x=this.selectError,O=this.selectResult,b=Date.now(),_="error");const U=y==="fetching",D=_==="loading",j=_==="error";return{status:_,fetchStatus:y,isLoading:D,isSuccess:_==="success",isError:j,isInitialLoading:D&&U,data:O,dataUpdatedAt:v,error:x,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:U,isRefetching:U&&!D,isLoadingError:j&&p.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:E,isPreviousData:k,isRefetchError:j&&p.dataUpdatedAt!==0,isStale:Z4(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,x3(i,r))return;this.currentResult=i;const o={cache:!0},a=()=>{if(!r)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==r[c]&&l.has(c)})};t?.listeners!==!1&&a()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Kv(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Xo.batch(()=>{if(t.onSuccess){var r,i,o,a;(r=(i=this.options).onSuccess)==null||r.call(i,this.currentResult.data),(o=(a=this.options).onSettled)==null||o.call(a,this.currentResult.data,null)}else if(t.onError){var s,l,u,c;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(u=(c=this.options).onSettled)==null||u.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(d=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function YH(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function G8(e,t){return YH(e,t)||e.state.dataUpdatedAt>0&&C3(e,t,t.refetchOnMount)}function C3(e,t,r){if(t.enabled!==!1){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&Z4(e,t)}return!1}function Y8(e,t,r,i){return r.enabled!==!1&&(e!==t||i.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Z4(e,r)}function Z4(e,t){return e.isStaleByTime(t.staleTime)}class ZH extends Qh{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.client.defaultMutationOptions(t),x3(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:JO(),r={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(t){Xo.batch(()=>{if(this.mutateOptions){if(t.onSuccess){var r,i,o,a;(r=(i=this.mutateOptions).onSuccess)==null||r.call(i,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(o=(a=this.mutateOptions).onSettled)==null||o.call(a,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var s,l,u,c;(s=(l=this.mutateOptions).onError)==null||s.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(c=this.mutateOptions).onSettled)==null||u.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(d=>{d(this.currentResult)})})}}var ml={exports:{}},rl={},X={exports:{}},Ni={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ly=Symbol.for("react.element"),QH=Symbol.for("react.portal"),XH=Symbol.for("react.fragment"),JH=Symbol.for("react.strict_mode"),eW=Symbol.for("react.profiler"),tW=Symbol.for("react.provider"),rW=Symbol.for("react.context"),nW=Symbol.for("react.forward_ref"),iW=Symbol.for("react.suspense"),oW=Symbol.for("react.memo"),aW=Symbol.for("react.lazy"),Z8=Symbol.iterator;function sW(e){return e===null||typeof e!="object"?null:(e=Z8&&e[Z8]||e["@@iterator"],typeof e=="function"?e:null)}var eB={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tB=Object.assign,rB={};function Jh(e,t,r){this.props=e,this.context=t,this.refs=rB,this.updater=r||eB}Jh.prototype.isReactComponent={};Jh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nB(){}nB.prototype=Jh.prototype;function Q4(e,t,r){this.props=e,this.context=t,this.refs=rB,this.updater=r||eB}var X4=Q4.prototype=new nB;X4.constructor=Q4;tB(X4,Jh.prototype);X4.isPureReactComponent=!0;var Q8=Array.isArray,iB=Object.prototype.hasOwnProperty,J4={current:null},oB={key:!0,ref:!0,__self:!0,__source:!0};function aB(e,t,r){var i,o={},a=null,s=null;if(t!=null)for(i in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)iB.call(t,i)&&!oB.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(l===1)o.children=r;else if(1>>1,He=xe[Le];if(0>>1;Leo(Rt,ft))Jto(vr,Rt)?(xe[Le]=vr,xe[Jt]=ft,Le=Jt):(xe[Le]=Rt,xe[Bt]=ft,Le=Bt);else if(Jto(vr,ft))xe[Le]=vr,xe[Jt]=ft,Le=Jt;else break e}}return J}function o(xe,J){var ft=xe.sortIndex-J.sortIndex;return ft!==0?ft:xe.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,p=null,v=3,x=!1,b=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(xe){for(var J=r(c);J!==null;){if(J.callback===null)i(c);else if(J.startTime<=xe)i(c),J.sortIndex=J.expirationTime,t(u,J);else break;J=r(c)}}function U(xe){if(y=!1,O(xe),!b)if(r(u)!==null)b=!0,le(D);else{var J=r(c);J!==null&&pe(U,J.startTime-xe)}}function D(xe,J){b=!1,y&&(y=!1,k(H),H=-1),x=!0;var ft=v;try{for(O(J),p=r(u);p!==null&&(!(p.expirationTime>J)||xe&&!ae());){var Le=p.callback;if(typeof Le=="function"){p.callback=null,v=p.priorityLevel;var He=Le(p.expirationTime<=J);J=e.unstable_now(),typeof He=="function"?p.callback=He:p===r(u)&&i(u),O(J)}else i(u);p=r(u)}if(p!==null)var nr=!0;else{var Bt=r(c);Bt!==null&&pe(U,Bt.startTime-J),nr=!1}return nr}finally{p=null,v=ft,x=!1}}var j=!1,F=null,H=-1,W=5,G=-1;function ae(){return!(e.unstable_now()-Gxe||125Le?(xe.sortIndex=ft,t(c,xe),r(u)===null&&xe===r(c)&&(y?(k(H),H=-1):y=!0,pe(U,ft-Le))):(xe.sortIndex=He,t(u,xe),b||x||(b=!0,le(D))),xe},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(xe){var J=v;return function(){var ft=v;v=J;try{return xe.apply(this,arguments)}finally{v=ft}}}})(lB);(function(e){e.exports=lB})(sB);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var uB=X.exports,Qs=sB.exports;function tn(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),k3=Object.prototype.hasOwnProperty,fW=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,J8={},eA={};function pW(e){return k3.call(eA,e)?!0:k3.call(J8,e)?!1:fW.test(e)?eA[e]=!0:(J8[e]=!0,!1)}function hW(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gW(e,t,r,i){if(t===null||typeof t>"u"||hW(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ms(e,t,r,i,o,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var Wa={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wa[e]=new ms(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wa[t]=new ms(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wa[e]=new ms(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wa[e]=new ms(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Wa[e]=new ms(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wa[e]=new ms(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wa[e]=new ms(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wa[e]=new ms(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wa[e]=new ms(e,5,!1,e.toLowerCase(),null,!1,!1)});var tC=/[\-:]([a-z])/g;function rC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(tC,rC);Wa[t]=new ms(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(tC,rC);Wa[t]=new ms(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(tC,rC);Wa[t]=new ms(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wa[e]=new ms(e,1,!1,e.toLowerCase(),null,!1,!1)});Wa.xlinkHref=new ms("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wa[e]=new ms(e,1,!1,e.toLowerCase(),null,!0,!0)});function nC(e,t,r,i){var o=Wa.hasOwnProperty(t)?Wa[t]:null;(o!==null?o.type!==0:i||!(2l||o[s]!==a[l]){var u=` +`+o[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{g_=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pm(e):""}function mW(e){switch(e.tag){case 5:return Pm(e.type);case 16:return Pm("Lazy");case 13:return Pm("Suspense");case 19:return Pm("SuspenseList");case 0:case 2:case 15:return e=m_(e.type,!1),e;case 11:return e=m_(e.type.render,!1),e;case 1:return e=m_(e.type,!0),e;default:return""}}function I3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gp:return"Fragment";case Kp:return"Portal";case E3:return"Profiler";case iC:return"StrictMode";case A3:return"Suspense";case T3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fB:return(e.displayName||"Context")+".Consumer";case dB:return(e._context.displayName||"Context")+".Provider";case oC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case aC:return t=e.displayName||null,t!==null?t:I3(e.type)||"Memo";case Wc:t=e._payload,e=e._init;try{return I3(e(t))}catch{}}return null}function yW(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return I3(t);case 8:return t===iC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vW(e){var t=hB(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){i=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nv(e){e._valueTracker||(e._valueTracker=vW(e))}function gB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=hB(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function C1(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function R3(e,t){var r=t.checked;return ea({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function rA(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Sd(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mB(e,t){t=t.checked,t!=null&&nC(e,"checked",t,!1)}function P3(e,t){mB(e,t);var r=Sd(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?M3(e,t.type,r):t.hasOwnProperty("defaultValue")&&M3(e,t.type,Sd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nA(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function M3(e,t,r){(t!=="number"||C1(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Mm=Array.isArray;function dh(e,t,r,i){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=iv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function h0(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bW=["Webkit","ms","Moz","O"];Object.keys(zm).forEach(function(e){bW.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zm[t]=zm[e]})});function wB(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zm.hasOwnProperty(e)&&zm[e]?(""+t).trim():t+"px"}function xB(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,o=wB(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,o):e[r]=o}}var wW=ea({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U3(e,t){if(t){if(wW[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(tn(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(tn(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(tn(61))}if(t.style!=null&&typeof t.style!="object")throw Error(tn(62))}}function D3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var L3=null;function sC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var N3=null,fh=null,ph=null;function aA(e){if(e=dy(e)){if(typeof N3!="function")throw Error(tn(280));var t=e.stateNode;t&&(t=tw(t),N3(e.stateNode,e.type,t))}}function _B(e){fh?ph?ph.push(e):ph=[e]:fh=e}function SB(){if(fh){var e=fh,t=ph;if(ph=fh=null,aA(e),t)for(e=0;e>>=0,e===0?32:31-(PW(e)/MW|0)|0}var ov=64,av=4194304;function Om(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function T1(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes,s=r&268435455;if(s!==0){var l=s&~o;l!==0?i=Om(l):(a&=s,a!==0&&(i=Om(a)))}else s=r&~o,s!==0?i=Om(s):a!==0&&(i=Om(a));if(i===0)return 0;if(t!==0&&t!==i&&(t&o)===0&&(o=i&-i,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function uy(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ql(t),e[t]=r}function DW(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=Wm),gA=String.fromCharCode(32),mA=!1;function HB(e,t){switch(e){case"keyup":return cV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yp=!1;function fV(e,t){switch(e){case"compositionend":return WB(t);case"keypress":return t.which!==32?null:(mA=!0,gA);case"textInput":return e=t.data,e===gA&&mA?null:e;default:return null}}function pV(e,t){if(Yp)return e==="compositionend"||!gC&&HB(e,t)?(e=FB(),Qv=fC=Qc=null,Yp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=wA(r)}}function GB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?GB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YB(){for(var e=window,t=C1();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=C1(e.document)}return t}function mC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _V(e){var t=YB(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&GB(r.ownerDocument.documentElement,r)){if(i!==null&&mC(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(i.start,o);i=i.end===void 0?a:Math.min(i.end,o),!e.extend&&a>i&&(o=i,i=a,a=o),o=xA(r,a);var s=xA(r,i);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Zp=null,W3=null,qm=null,V3=!1;function _A(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;V3||Zp==null||Zp!==C1(i)||(i=Zp,"selectionStart"in i&&mC(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),qm&&w0(qm,i)||(qm=i,i=P1(W3,"onSelect"),0Jp||(e.current=Q3[Jp],Q3[Jp]=null,Jp--)}function Po(e,t){Jp++,Q3[Jp]=e.current,e.current=t}var Cd={},os=Nd(Cd),Es=Nd(!1),Rf=Cd;function Ch(e,t){var r=e.type.contextTypes;if(!r)return Cd;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function As(e){return e=e.childContextTypes,e!=null}function O1(){No(Es),No(os)}function IA(e,t,r){if(os.current!==Cd)throw Error(tn(168));Po(os,t),Po(Es,r)}function i9(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var o in i)if(!(o in t))throw Error(tn(108,yW(e)||"Unknown",o));return ea({},r,i)}function B1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cd,Rf=os.current,Po(os,e),Po(Es,Es.current),!0}function RA(e,t,r){var i=e.stateNode;if(!i)throw Error(tn(169));r?(e=i9(e,t,Rf),i.__reactInternalMemoizedMergedChildContext=e,No(Es),No(os),Po(os,e)):No(Es),Po(Es,r)}var ec=null,rw=!1,R_=!1;function o9(e){ec===null?ec=[e]:ec.push(e)}function BV(e){rw=!0,o9(e)}function jd(){if(!R_&&ec!==null){R_=!0;var e=0,t=mo;try{var r=ec;for(mo=1;e>=s,o-=s,oc=1<<32-ql(t)+o|r<H?(W=F,F=null):W=F.sibling;var G=v(k,F,O[H],U);if(G===null){F===null&&(F=W);break}e&&F&&G.alternate===null&&t(k,F),E=a(G,E,H),j===null?D=G:j.sibling=G,j=G,F=W}if(H===O.length)return r(k,F),Ho&&of(k,H),D;if(F===null){for(;HH?(W=F,F=null):W=F.sibling;var ae=v(k,F,G.value,U);if(ae===null){F===null&&(F=W);break}e&&F&&ae.alternate===null&&t(k,F),E=a(ae,E,H),j===null?D=ae:j.sibling=ae,j=ae,F=W}if(G.done)return r(k,F),Ho&&of(k,H),D;if(F===null){for(;!G.done;H++,G=O.next())G=p(k,G.value,U),G!==null&&(E=a(G,E,H),j===null?D=G:j.sibling=G,j=G);return Ho&&of(k,H),D}for(F=i(k,F);!G.done;H++,G=O.next())G=x(F,k,H,G.value,U),G!==null&&(e&&G.alternate!==null&&F.delete(G.key===null?H:G.key),E=a(G,E,H),j===null?D=G:j.sibling=G,j=G);return e&&F.forEach(function(V){return t(k,V)}),Ho&&of(k,H),D}function _(k,E,O,U){if(typeof O=="object"&&O!==null&&O.type===Gp&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case rv:e:{for(var D=O.key,j=E;j!==null;){if(j.key===D){if(D=O.type,D===Gp){if(j.tag===7){r(k,j.sibling),E=o(j,O.props.children),E.return=k,k=E;break e}}else if(j.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Wc&&LA(D)===j.type){r(k,j.sibling),E=o(j,O.props),E.ref=Vg(k,j,O),E.return=k,k=E;break e}r(k,j);break}else t(k,j);j=j.sibling}O.type===Gp?(E=_f(O.props.children,k.mode,U,O.key),E.return=k,k=E):(U=o1(O.type,O.key,O.props,null,k.mode,U),U.ref=Vg(k,E,O),U.return=k,k=U)}return s(k);case Kp:e:{for(j=O.key;E!==null;){if(E.key===j)if(E.tag===4&&E.stateNode.containerInfo===O.containerInfo&&E.stateNode.implementation===O.implementation){r(k,E.sibling),E=o(E,O.children||[]),E.return=k,k=E;break e}else{r(k,E);break}else t(k,E);E=E.sibling}E=N_(O,k.mode,U),E.return=k,k=E}return s(k);case Wc:return j=O._init,_(k,E,j(O._payload),U)}if(Mm(O))return b(k,E,O,U);if($g(O))return y(k,E,O,U);pv(k,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,E!==null&&E.tag===6?(r(k,E.sibling),E=o(E,O),E.return=k,k=E):(r(k,E),E=L_(O,k.mode,U),E.return=k,k=E),s(k)):r(k,E)}return _}var Eh=p9(!0),h9=p9(!1),fy={},xu=Nd(fy),C0=Nd(fy),k0=Nd(fy);function yf(e){if(e===fy)throw Error(tn(174));return e}function kC(e,t){switch(Po(k0,t),Po(C0,e),Po(xu,fy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:B3(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=B3(t,e)}No(xu),Po(xu,t)}function Ah(){No(xu),No(C0),No(k0)}function g9(e){yf(k0.current);var t=yf(xu.current),r=B3(t,e.type);t!==r&&(Po(C0,e),Po(xu,r))}function EC(e){C0.current===e&&(No(xu),No(C0))}var Qo=Nd(0);function $1(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var P_=[];function AC(){for(var e=0;er?r:4,e(!0);var i=M_.transition;M_.transition={};try{e(!1),t()}finally{mo=r,M_.transition=i}}function P9(){return kl().memoizedState}function NV(e,t,r){var i=fd(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},M9(e))O9(t,r);else if(r=u9(e,t,r,i),r!==null){var o=hs();Kl(r,e,i,o),B9(r,t,i)}}function jV(e,t,r){var i=fd(e),o={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(M9(e))O9(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,l=a(s,r);if(o.hasEagerState=!0,o.eagerState=l,Gl(l,s)){var u=t.interleaved;u===null?(o.next=o,SC(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}r=u9(e,t,o,i),r!==null&&(o=hs(),Kl(r,e,i,o),B9(r,t,i))}}function M9(e){var t=e.alternate;return e===Jo||t!==null&&t===Jo}function O9(e,t){Km=F1=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function B9(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,uC(e,r)}}var z1={readContext:Cl,useCallback:Ga,useContext:Ga,useEffect:Ga,useImperativeHandle:Ga,useInsertionEffect:Ga,useLayoutEffect:Ga,useMemo:Ga,useReducer:Ga,useRef:Ga,useState:Ga,useDebugValue:Ga,useDeferredValue:Ga,useTransition:Ga,useMutableSource:Ga,useSyncExternalStore:Ga,useId:Ga,unstable_isNewReconciler:!1},$V={readContext:Cl,useCallback:function(e,t){return uu().memoizedState=[e,t===void 0?null:t],e},useContext:Cl,useEffect:jA,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,t1(4194308,4,E9.bind(null,t,e),r)},useLayoutEffect:function(e,t){return t1(4194308,4,e,t)},useInsertionEffect:function(e,t){return t1(4,2,e,t)},useMemo:function(e,t){var r=uu();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=uu();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=NV.bind(null,Jo,e),[i.memoizedState,e]},useRef:function(e){var t=uu();return e={current:e},t.memoizedState=e},useState:NA,useDebugValue:MC,useDeferredValue:function(e){return uu().memoizedState=e},useTransition:function(){var e=NA(!1),t=e[0];return e=LV.bind(null,e[1]),uu().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Jo,o=uu();if(Ho){if(r===void 0)throw Error(tn(407));r=r()}else{if(r=t(),Ba===null)throw Error(tn(349));(Mf&30)!==0||v9(i,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,jA(w9.bind(null,i,a,e),[e]),i.flags|=2048,T0(9,b9.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=uu(),t=Ba.identifierPrefix;if(Ho){var r=ac,i=oc;r=(i&~(1<<32-ql(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=E0++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=s.createElement(r,{is:i.is}):(e=s.createElement(r),r==="select"&&(s=e,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):e=s.createElementNS(e,r),e[hu]=t,e[S0]=i,H9(e,t,!1,!1),t.stateNode=e;e:{switch(s=D3(r,i),r){case"dialog":Bo("cancel",e),Bo("close",e),o=i;break;case"iframe":case"object":case"embed":Bo("load",e),o=i;break;case"video":case"audio":for(o=0;oIh&&(t.flags|=128,i=!0,qg(a,!1),t.lanes=4194304)}else{if(!i)if(e=$1(s),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),qg(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Ho)return Ya(t),null}else 2*ca()-a.renderingStartTime>Ih&&r!==1073741824&&(t.flags|=128,i=!0,qg(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(r=a.last,r!==null?r.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ca(),t.sibling=null,r=Qo.current,Po(Qo,i?r&1|2:r&1),t):(Ya(t),null);case 22:case 23:return NC(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Ws&1073741824)!==0&&(Ya(t),t.subtreeFlags&6&&(t.flags|=8192)):Ya(t),null;case 24:return null;case 25:return null}throw Error(tn(156,t.tag))}function GV(e,t){switch(vC(t),t.tag){case 1:return As(t.type)&&O1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ah(),No(Es),No(os),AC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return EC(t),null;case 13:if(No(Qo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(tn(340));kh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return No(Qo),null;case 4:return Ah(),null;case 10:return _C(t.type._context),null;case 22:case 23:return NC(),null;case 24:return null;default:return null}}var gv=!1,es=!1,YV=typeof WeakSet=="function"?WeakSet:Set,Dn=null;function nh(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){ia(e,t,i)}else r.current=null}function uS(e,t,r){try{r()}catch(i){ia(e,t,i)}}var GA=!1;function ZV(e,t){if(q3=I1,e=YB(),mC(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var o=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,c=0,d=0,p=e,v=null;t:for(;;){for(var x;p!==r||o!==0&&p.nodeType!==3||(l=s+o),p!==a||i!==0&&p.nodeType!==3||(u=s+i),p.nodeType===3&&(s+=p.nodeValue.length),(x=p.firstChild)!==null;)v=p,p=x;for(;;){if(p===e)break t;if(v===r&&++c===o&&(l=s),v===a&&++d===i&&(u=s),(x=p.nextSibling)!==null)break;p=v,v=p.parentNode}p=x}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(K3={focusedElem:e,selectionRange:r},I1=!1,Dn=t;Dn!==null;)if(t=Dn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dn=e;else for(;Dn!==null;){t=Dn;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var y=b.memoizedProps,_=b.memoizedState,k=t.stateNode,E=k.getSnapshotBeforeUpdate(t.elementType===t.type?y:Dl(t.type,y),_);k.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(tn(163))}}catch(U){ia(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,Dn=e;break}Dn=t.return}return b=GA,GA=!1,b}function Gm(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&uS(t,r,a)}o=o.next}while(o!==i)}}function ow(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function cS(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function q9(e){var t=e.alternate;t!==null&&(e.alternate=null,q9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hu],delete t[S0],delete t[Z3],delete t[MV],delete t[OV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function K9(e){return e.tag===5||e.tag===3||e.tag===4}function YA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||K9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dS(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=M1));else if(i!==4&&(e=e.child,e!==null))for(dS(e,t,r),e=e.sibling;e!==null;)dS(e,t,r),e=e.sibling}function fS(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(fS(e,t,r),e=e.sibling;e!==null;)fS(e,t,r),e=e.sibling}var La=null,Ll=!1;function Nc(e,t,r){for(r=r.child;r!==null;)G9(e,t,r),r=r.sibling}function G9(e,t,r){if(wu&&typeof wu.onCommitFiberUnmount=="function")try{wu.onCommitFiberUnmount(Qb,r)}catch{}switch(r.tag){case 5:es||nh(r,t);case 6:var i=La,o=Ll;La=null,Nc(e,t,r),La=i,Ll=o,La!==null&&(Ll?(e=La,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):La.removeChild(r.stateNode));break;case 18:La!==null&&(Ll?(e=La,r=r.stateNode,e.nodeType===8?I_(e.parentNode,r):e.nodeType===1&&I_(e,r),v0(e)):I_(La,r.stateNode));break;case 4:i=La,o=Ll,La=r.stateNode.containerInfo,Ll=!0,Nc(e,t,r),La=i,Ll=o;break;case 0:case 11:case 14:case 15:if(!es&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){o=i=i.next;do{var a=o,s=a.destroy;a=a.tag,s!==void 0&&((a&2)!==0||(a&4)!==0)&&uS(r,t,s),o=o.next}while(o!==i)}Nc(e,t,r);break;case 1:if(!es&&(nh(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(l){ia(r,t,l)}Nc(e,t,r);break;case 21:Nc(e,t,r);break;case 22:r.mode&1?(es=(i=es)||r.memoizedState!==null,Nc(e,t,r),es=i):Nc(e,t,r);break;default:Nc(e,t,r)}}function ZA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new YV),t.forEach(function(i){var o=oq.bind(null,e,i);r.has(i)||(r.add(i),i.then(o,o))})}}function Bl(e,t){var r=t.deletions;if(r!==null)for(var i=0;io&&(o=s),i&=~a}if(i=o,i=ca()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*XV(i/1960))-i,10e?16:e,Xc===null)var i=!1;else{if(e=Xc,Xc=null,V1=0,(qi&6)!==0)throw Error(tn(331));var o=qi;for(qi|=4,Dn=e.current;Dn!==null;){var a=Dn,s=a.child;if((Dn.flags&16)!==0){var l=a.deletions;if(l!==null){for(var u=0;uca()-DC?xf(e,0):UC|=r),Ts(e,t)}function rU(e,t){t===0&&((e.mode&1)===0?t=1:(t=av,av<<=1,(av&130023424)===0&&(av=4194304)));var r=hs();e=yc(e,t),e!==null&&(uy(e,t,r),Ts(e,r))}function iq(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),rU(e,r)}function oq(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(tn(314))}i!==null&&i.delete(t),rU(e,r)}var nU;nU=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Es.current)ks=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return ks=!1,qV(e,t,r);ks=(e.flags&131072)!==0}else ks=!1,Ho&&(t.flags&1048576)!==0&&a9(t,D1,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;r1(e,t),e=t.pendingProps;var o=Ch(t,os.current);gh(t,r),o=IC(null,t,i,e,o,r);var a=RC();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,As(i)?(a=!0,B1(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,CC(t),o.updater=nw,t.stateNode=o,o._reactInternals=t,rS(t,i,e,r),t=oS(null,t,i,!0,a,r)):(t.tag=0,Ho&&a&&yC(t),us(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(r1(e,t),e=t.pendingProps,o=i._init,i=o(i._payload),t.type=i,o=t.tag=sq(i),e=Dl(i,e),o){case 0:t=iS(null,t,i,e,r);break e;case 1:t=VA(null,t,i,e,r);break e;case 11:t=HA(null,t,i,e,r);break e;case 14:t=WA(null,t,i,Dl(i.type,e),r);break e}throw Error(tn(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Dl(i,o),iS(e,t,i,o,r);case 1:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Dl(i,o),VA(e,t,i,o,r);case 3:e:{if($9(t),e===null)throw Error(tn(387));i=t.pendingProps,a=t.memoizedState,o=a.element,c9(e,t),j1(t,i,null,r);var s=t.memoizedState;if(i=s.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Th(Error(tn(423)),t),t=qA(e,t,i,r,o);break e}else if(i!==o){o=Th(Error(tn(424)),t),t=qA(e,t,i,r,o);break e}else for(Ks=ud(t.stateNode.containerInfo.firstChild),Ys=t,Ho=!0,jl=null,r=h9(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(kh(),i===o){t=vc(e,t,r);break e}us(e,t,i,r)}t=t.child}return t;case 5:return g9(t),e===null&&J3(t),i=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,s=o.children,G3(i,o)?s=null:a!==null&&G3(i,a)&&(t.flags|=32),j9(e,t),us(e,t,s,r),t.child;case 6:return e===null&&J3(t),null;case 13:return F9(e,t,r);case 4:return kC(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Eh(t,null,i,r):us(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Dl(i,o),HA(e,t,i,o,r);case 7:return us(e,t,t.pendingProps,r),t.child;case 8:return us(e,t,t.pendingProps.children,r),t.child;case 12:return us(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Po(L1,i._currentValue),i._currentValue=s,a!==null)if(Gl(a.value,s)){if(a.children===o.children&&!Es.current){t=vc(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===i){if(a.tag===1){u=lc(-1,r&-r),u.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),eS(a.return,r,t),l.lanes|=r;break}u=u.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(tn(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),eS(s,r,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}us(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,gh(t,r),o=Cl(o),i=i(o),t.flags|=1,us(e,t,i,r),t.child;case 14:return i=t.type,o=Dl(i,t.pendingProps),o=Dl(i.type,o),WA(e,t,i,o,r);case 15:return L9(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Dl(i,o),r1(e,t),t.tag=1,As(i)?(e=!0,B1(t)):e=!1,gh(t,r),f9(t,i,o),rS(t,i,o,r),oS(null,t,i,!0,e,r);case 19:return z9(e,t,r);case 22:return N9(e,t,r)}throw Error(tn(156,t.tag))};function iU(e,t){return RB(e,t)}function aq(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vl(e,t,r,i){return new aq(e,t,r,i)}function $C(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sq(e){if(typeof e=="function")return $C(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oC)return 11;if(e===aC)return 14}return 2}function pd(e,t){var r=e.alternate;return r===null?(r=vl(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function o1(e,t,r,i,o,a){var s=2;if(i=e,typeof e=="function")$C(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gp:return _f(r.children,o,a,t);case iC:s=8,o|=8;break;case E3:return e=vl(12,r,t,o|2),e.elementType=E3,e.lanes=a,e;case A3:return e=vl(13,r,t,o),e.elementType=A3,e.lanes=a,e;case T3:return e=vl(19,r,t,o),e.elementType=T3,e.lanes=a,e;case pB:return sw(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dB:s=10;break e;case fB:s=9;break e;case oC:s=11;break e;case aC:s=14;break e;case Wc:s=16,i=null;break e}throw Error(tn(130,e==null?e:typeof e,""))}return t=vl(s,r,t,o),t.elementType=e,t.type=i,t.lanes=a,t}function _f(e,t,r,i){return e=vl(7,e,i,t),e.lanes=r,e}function sw(e,t,r,i){return e=vl(22,e,i,t),e.elementType=pB,e.lanes=r,e.stateNode={isHidden:!1},e}function L_(e,t,r){return e=vl(6,e,null,t),e.lanes=r,e}function N_(e,t,r){return t=vl(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lq(e,t,r,i,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=v_(0),this.expirationTimes=v_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=v_(0),this.identifierPrefix=i,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function FC(e,t,r,i,o,a,s,l,u){return e=new lq(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=vl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},CC(a),e}function uq(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}t(),e.exports=rl})(ml);const vv=Kb(ml.exports);var VC={exports:{}},lU={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rh=X.exports;function hq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gq=typeof Object.is=="function"?Object.is:hq,mq=Rh.useState,yq=Rh.useEffect,vq=Rh.useLayoutEffect,bq=Rh.useDebugValue;function wq(e,t){var r=t(),i=mq({inst:{value:r,getSnapshot:t}}),o=i[0].inst,a=i[1];return vq(function(){o.value=r,o.getSnapshot=t,j_(o)&&a({inst:o})},[e,r,t]),yq(function(){return j_(o)&&a({inst:o}),e(function(){j_(o)&&a({inst:o})})},[e]),bq(r),r}function j_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gq(e,r)}catch{return!0}}function xq(e,t){return t()}var _q=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xq:wq;lU.useSyncExternalStore=Rh.useSyncExternalStore!==void 0?Rh.useSyncExternalStore:_q;(function(e){e.exports=lU})(VC);const qC=VC.exports.useSyncExternalStore;var fw={exports:{}},pw={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sq=X.exports,Cq=Symbol.for("react.element"),kq=Symbol.for("react.fragment"),Eq=Object.prototype.hasOwnProperty,Aq=Sq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Tq={key:!0,ref:!0,__self:!0,__source:!0};function uU(e,t,r){var i,o={},a=null,s=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(i in t)Eq.call(t,i)&&!Tq.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)o[i]===void 0&&(o[i]=t[i]);return{$$typeof:Cq,type:e,key:a,ref:s,props:o,_owner:Aq.current}}pw.Fragment=kq;pw.jsx=uU;pw.jsxs=uU;(function(e){e.exports=pw})(fw);const ta=fw.exports.Fragment,L=fw.exports.jsx,Ut=fw.exports.jsxs,Iq=Object.freeze(Object.defineProperty({__proto__:null,Fragment:ta,jsx:L,jsxs:Ut},Symbol.toStringTag,{value:"Module"})),iT=X.exports.createContext(void 0),cU=X.exports.createContext(!1);function dU(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=iT),window.ReactQueryClientContext):iT)}const hw=({context:e}={})=>{const t=X.exports.useContext(dU(e,X.exports.useContext(cU)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rq=({client:e,children:t,context:r,contextSharing:i=!1})=>{X.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=dU(r,i);return L(cU.Provider,{value:!r&&i,children:L(o.Provider,{value:e,children:t})})},fU=X.exports.createContext(!1),Pq=()=>X.exports.useContext(fU);fU.Provider;function Mq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Oq=X.exports.createContext(Mq()),Bq=()=>X.exports.useContext(Oq);function pU(e,t){return typeof e=="function"?e(...t):!!e}const Uq=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Dq=e=>{X.exports.useEffect(()=>{e.clearReset()},[e])},Lq=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:i})=>e.isError&&!t.isReset()&&!e.isFetching&&pU(r,[e.error,i]),Nq=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},jq=(e,t)=>e.isLoading&&e.isFetching&&!t,$q=(e,t,r)=>e?.suspense&&jq(t,r),Fq=(e,t,r)=>t.fetchOptimistic(e).then(({data:i})=>{e.onSuccess==null||e.onSuccess(i),e.onSettled==null||e.onSettled(i,null)}).catch(i=>{r.clearReset(),e.onError==null||e.onError(i),e.onSettled==null||e.onSettled(void 0,i)});function zq(e,t){const r=hw({context:e.context}),i=Pq(),o=Bq(),a=r.defaultQueryOptions(e);a._optimisticResults=i?"isRestoring":"optimistic",a.onError&&(a.onError=Xo.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=Xo.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=Xo.batchCalls(a.onSettled)),Nq(a),Uq(a,o),Dq(o);const[s]=X.exports.useState(()=>new t(r,a)),l=s.getOptimisticResult(a);if(qC(X.exports.useCallback(u=>i?()=>{}:s.subscribe(Xo.batchCalls(u)),[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),X.exports.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),$q(a,l,i))throw Fq(a,s,o);if(Lq({result:l,errorResetBoundary:o,useErrorBoundary:a.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return a.notifyOnChangeProps?l:s.trackResult(l)}function bc(e,t,r){const i=Rm(e,t,r);return zq(i,GH)}function Hq(e,t,r){const[i,o={}]=BH(e,t,r),a=hw({context:o.context}),s=a.getMutationCache();return qC(X.exports.useCallback(l=>s.subscribe(Xo.batchCalls(l)),[s]),()=>a.isMutating(i),()=>a.isMutating(i))}function hU(e,t,r){const i=OH(e,t,r),o=hw({context:i.context}),[a]=X.exports.useState(()=>new ZH(o,i));X.exports.useEffect(()=>{a.setOptions(i)},[a,i]);const s=qC(X.exports.useCallback(u=>a.subscribe(Xo.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=X.exports.useCallback((u,c)=>{a.mutate(u,c).catch(Wq)},[a]);if(s.error&&pU(a.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}function Wq(){}var yS={},oT=ml.exports;yS.createRoot=oT.createRoot,yS.hydrateRoot=oT.hydrateRoot;/** + * @remix-run/router v1.2.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function qq(){return Math.random().toString(36).substr(2,8)}function sT(e){return{usr:e.state,key:e.key}}function vS(e,t,r,i){return r===void 0&&(r=null),G1({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rg(t):t,{state:r,key:t&&t.key||i||qq()})}function KC(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function rg(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function Kq(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,r=typeof e=="string"?e:KC(e);return Ua(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}function Gq(e,t,r,i){i===void 0&&(i={});let{window:o=document.defaultView,v5Compat:a=!1}=i,s=o.history,l=Jc.Pop,u=null;function c(){l=Jc.Pop,u&&u({action:l,location:v.location})}function d(x,b){l=Jc.Push;let y=vS(v.location,x,b);r&&r(y,x);let _=sT(y),k=v.createHref(y);try{s.pushState(_,"",k)}catch{o.location.assign(k)}a&&u&&u({action:l,location:v.location})}function p(x,b){l=Jc.Replace;let y=vS(v.location,x,b);r&&r(y,x);let _=sT(y),k=v.createHref(y);s.replaceState(_,"",k),a&&u&&u({action:l,location:v.location})}let v={get action(){return l},get location(){return e(o,s)},listen(x){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(aT,c),u=x,()=>{o.removeEventListener(aT,c),u=null}},createHref(x){return t(o,x)},encodeLocation(x){let b=Kq(typeof x=="string"?x:KC(x));return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:p,go(x){return s.go(x)}};return v}var lT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lT||(lT={}));function Yq(e,t,r){r===void 0&&(r="/");let i=typeof t=="string"?rg(t):t,o=yU(i.pathname||"/",r);if(o==null)return null;let a=gU(e);Zq(a);let s=null;for(let l=0;s==null&&l{let u={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};u.relativePath.startsWith("/")&&(Ua(u.relativePath.startsWith(i),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(i.length));let c=Sf([i,u.relativePath]),d=r.concat(u);a.children&&a.children.length>0&&(Ua(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),gU(a.children,t,d,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:nK(c,a.index),routesMeta:d})};return e.forEach((a,s)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))o(a,s);else for(let u of mU(a.path))o(a,s,u)}),t}function mU(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(i.length===0)return o?[a,""]:[a];let s=mU(i.join("/")),l=[];return l.push(...s.map(u=>u===""?a:[a,u].join("/"))),o&&l.push(...s),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Zq(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:iK(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const Qq=/^:\w+$/,Xq=3,Jq=2,eK=1,tK=10,rK=-2,uT=e=>e==="*";function nK(e,t){let r=e.split("/"),i=r.length;return r.some(uT)&&(i+=rK),t&&(i+=Jq),r.filter(o=>!uT(o)).reduce((o,a)=>o+(Qq.test(a)?Xq:a===""?eK:tK),i)}function iK(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function oK(e,t){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{if(d==="*"){let v=l[p]||"";s=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}return c[d]=uK(l[p]||"",d),c},{}),pathname:a,pathnameBase:s,pattern:e}}function sK(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),GC(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(i.push(l),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function lK(e){try{return decodeURI(e)}catch(t){return GC(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function uK(e,t){try{return decodeURIComponent(e)}catch(r){return GC(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function yU(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function GC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cK(e,t){t===void 0&&(t="/");let{pathname:r,search:i="",hash:o=""}=typeof e=="string"?rg(e):e;return{pathname:r?r.startsWith("/")?r:dK(r,t):t,search:gK(i),hash:mK(o)}}function dK(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function $_(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function fK(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function pK(e,t,r,i){i===void 0&&(i=!1);let o;typeof e=="string"?o=rg(e):(o=G1({},e),Ua(!o.pathname||!o.pathname.includes("?"),$_("?","pathname","search",o)),Ua(!o.pathname||!o.pathname.includes("#"),$_("#","pathname","hash",o)),Ua(!o.search||!o.search.includes("#"),$_("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,l;if(i||s==null)l=r;else{let p=t.length-1;if(s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),p-=1;o.pathname=v.join("/")}l=p>=0?t[p]:"/"}let u=cK(o,l),c=s&&s!=="/"&&s.endsWith("/"),d=(a||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Sf=e=>e.join("/").replace(/\/\/+/g,"/"),hK=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gK=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mK=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class yK{constructor(t,r,i,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function vK(e){return e instanceof yK}const bK=["post","put","patch","delete"];[...bK];/** + * React Router v6.6.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.value=i,o.getSnapshot=t,F_(o)&&a({inst:o})},[e,i,t]),SK(()=>(F_(o)&&a({inst:o}),e(()=>{F_(o)&&a({inst:o})})),[e]),kK(i),i}function F_(e){const t=e.getSnapshot,r=e.value;try{const i=t();return!xK(r,i)}catch{return!0}}function AK(e,t,r){return t()}const TK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IK=!TK,RK=IK?AK:EK;"useSyncExternalStore"in If&&(e=>e.useSyncExternalStore)(If);const vU=X.exports.createContext(null),bU=X.exports.createContext(null),YC=X.exports.createContext(null),gw=X.exports.createContext(null),ng=X.exports.createContext({outlet:null,matches:[]}),wU=X.exports.createContext(null);function mw(){return X.exports.useContext(gw)!=null}function py(){return mw()||Ua(!1),X.exports.useContext(gw).location}function ZC(){mw()||Ua(!1);let{basename:e,navigator:t}=X.exports.useContext(YC),{matches:r}=X.exports.useContext(ng),{pathname:i}=py(),o=JSON.stringify(fK(r).map(l=>l.pathnameBase)),a=X.exports.useRef(!1);return X.exports.useEffect(()=>{a.current=!0}),X.exports.useCallback(function(l,u){if(u===void 0&&(u={}),!a.current)return;if(typeof l=="number"){t.go(l);return}let c=pK(l,JSON.parse(o),i,u.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Sf([e,c.pathname])),(u.replace?t.replace:t.push)(c,u.state,u)},[e,t,o,i])}function xU(){let{matches:e}=X.exports.useContext(ng),t=e[e.length-1];return t?t.params:{}}function PK(e,t){mw()||Ua(!1);let{navigator:r}=X.exports.useContext(YC),i=X.exports.useContext(bU),{matches:o}=X.exports.useContext(ng),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=py(),c;if(t){var d;let y=typeof t=="string"?rg(t):t;l==="/"||((d=y.pathname)==null?void 0:d.startsWith(l))||Ua(!1),c=y}else c=u;let p=c.pathname||"/",v=l==="/"?p:p.slice(l.length)||"/",x=Yq(e,{pathname:v}),b=UK(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Sf([l,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Sf([l,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,i||void 0);return t&&b?L(gw.Provider,{value:{location:bS({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Jc.Pop},children:b}):b}function MK(){let e=jK(),t=vK(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i};return Ut(ta,{children:[L("h2",{children:"Unhandled Thrown Error!"}),L("h3",{style:{fontStyle:"italic"},children:t}),r?L("pre",{style:o,children:r}):null,L("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),Ut("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",L("code",{style:a,children:"errorElement"})," props on\xA0",L("code",{style:a,children:""})]})]})}class OK extends X.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?L(ng.Provider,{value:this.props.routeContext,children:L(wU.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function BK(e){let{routeContext:t,match:r,children:i}=e,o=X.exports.useContext(vU);return o&&o.static&&o.staticContext&&r.route.errorElement&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),L(ng.Provider,{value:t,children:i})}function UK(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let i=e,o=r?.errors;if(o!=null){let a=i.findIndex(s=>s.route.id&&o?.[s.route.id]);a>=0||Ua(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,s,l)=>{let u=s.route.id?o?.[s.route.id]:null,c=r?s.route.errorElement||L(MK,{}):null,d=t.concat(i.slice(0,l+1)),p=()=>L(BK,{match:s,routeContext:{outlet:a,matches:d},children:u?c:s.route.element!==void 0?s.route.element:a});return r&&(s.route.errorElement||l===0)?L(OK,{location:r.location,component:c,error:u,children:p(),routeContext:{outlet:null,matches:d}}):p()},null)}var cT;(function(e){e.UseRevalidator="useRevalidator"})(cT||(cT={}));var Y1;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Y1||(Y1={}));function DK(e){let t=X.exports.useContext(bU);return t||Ua(!1),t}function LK(e){let t=X.exports.useContext(ng);return t||Ua(!1),t}function NK(e){let t=LK(),r=t.matches[t.matches.length-1];return r.route.id||Ua(!1),r.route.id}function jK(){var e;let t=X.exports.useContext(wU),r=DK(Y1.UseRouteError),i=NK(Y1.UseRouteError);return t||((e=r.errors)==null?void 0:e[i])}function Hp(e){Ua(!1)}function $K(e){let{basename:t="/",children:r=null,location:i,navigationType:o=Jc.Pop,navigator:a,static:s=!1}=e;mw()&&Ua(!1);let l=t.replace(/^\/*/,"/"),u=X.exports.useMemo(()=>({basename:l,navigator:a,static:s}),[l,a,s]);typeof i=="string"&&(i=rg(i));let{pathname:c="/",search:d="",hash:p="",state:v=null,key:x="default"}=i,b=X.exports.useMemo(()=>{let y=yU(c,l);return y==null?null:{pathname:y,search:d,hash:p,state:v,key:x}},[l,c,d,p,v,x]);return b==null?null:L(YC.Provider,{value:u,children:L(gw.Provider,{children:r,value:{location:b,navigationType:o}})})}function FK(e){let{children:t,location:r}=e,i=X.exports.useContext(vU),o=i&&!t?i.router.routes:wS(t);return PK(o,r)}var dT;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(dT||(dT={}));new Promise(()=>{});function wS(e,t){t===void 0&&(t=[]);let r=[];return X.exports.Children.forEach(e,(i,o)=>{if(!X.exports.isValidElement(i))return;if(i.type===X.exports.Fragment){r.push.apply(r,wS(i.props.children,t));return}i.type!==Hp&&Ua(!1),!i.props.index||!i.props.children||Ua(!1);let a=[...t,o],s={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,hasErrorBoundary:i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle};i.props.children&&(s.children=wS(i.props.children,a)),r.push(s)}),r}/** + * React Router DOM v6.6.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function xS(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function zK(e,t){let r=xS(e);for(let i of t.keys())r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)});return r}function HK(e){let{basename:t,children:r,window:i}=e,o=X.exports.useRef();o.current==null&&(o.current=Vq({window:i,v5Compat:!0}));let a=o.current,[s,l]=X.exports.useState({action:a.action,location:a.location});return X.exports.useLayoutEffect(()=>a.listen(l),[a]),L($K,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}var fT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(fT||(fT={}));var pT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pT||(pT={}));function yw(e){let t=X.exports.useRef(xS(e)),r=py(),i=X.exports.useMemo(()=>zK(r.search,t.current),[r.search]),o=ZC(),a=X.exports.useCallback((s,l)=>{const u=xS(typeof s=="function"?s(i):s);o("?"+u,l)},[o,i]);return[i,a]}const vw="/assets/icon.136020fa.svg",QC="/assets/github-dark.aac0d47c.svg";function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=_U(e[r])}),t}function Is(e,t,r={clone:!0}){const i=r.clone?De({},e):e;return cf(e)&&cf(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(cf(t[o])&&o in e&&cf(e[o])?i[o]=Is(e[o],t[o],r):r.clone?i[o]=cf(t[o])?_U(t[o]):t[o]:i[o]=t[o])}),i}var Co={exports:{}},WK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",VK=WK,qK=VK;function SU(){}function CU(){}CU.resetWarningCache=SU;var KK=function(){function e(i,o,a,s,l,u){if(u!==qK){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:CU,resetWarningCache:SU};return r.PropTypes=r,r};Co.exports=KK();function kd(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rr==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function Uf(e,t=166){let r;function i(...o){const a=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(a,t)}return i.clear=()=>{clearTimeout(r)},i}function QK(e,t){return()=>null}function a1(e,t){return X.exports.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function ya(e){return e&&e.ownerDocument||document}function El(e){return ya(e).defaultView||window}function XK(e,t){return()=>null}function Z1(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const JK=typeof window<"u"?X.exports.useLayoutEffect:X.exports.useEffect,Yl=JK;let hT=0;function eG(e){const[t,r]=X.exports.useState(e),i=e||t;return X.exports.useEffect(()=>{t==null&&(hT+=1,r(`mui-${hT}`))},[t]),i}const gT=If["useId"];function Iw(e){if(gT!==void 0){const t=gT();return e??t}return eG(e)}function tG(e,t,r,i,o){return null}function R0({controlled:e,default:t,name:r,state:i="value"}){const{current:o}=X.exports.useRef(e!==void 0),[a,s]=X.exports.useState(t),l=o?e:a,u=X.exports.useCallback(c=>{o||s(c)},[]);return[l,u]}function bl(e){const t=X.exports.useRef(e);return Yl(()=>{t.current=e}),X.exports.useCallback((...r)=>(0,t.current)(...r),[])}function Vo(...e){return X.exports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Z1(r,t)})},e)}let Rw=!0,SS=!1,mT;const rG={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function nG(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&rG[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function iG(e){e.metaKey||e.altKey||e.ctrlKey||(Rw=!0)}function z_(){Rw=!1}function oG(){this.visibilityState==="hidden"&&SS&&(Rw=!0)}function aG(e){e.addEventListener("keydown",iG,!0),e.addEventListener("mousedown",z_,!0),e.addEventListener("pointerdown",z_,!0),e.addEventListener("touchstart",z_,!0),e.addEventListener("visibilitychange",oG,!0)}function sG(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Rw||nG(t)}function Pw(){const e=X.exports.useCallback(o=>{o!=null&&aG(o.ownerDocument)},[]),t=X.exports.useRef(!1);function r(){return t.current?(SS=!0,window.clearTimeout(mT),mT=window.setTimeout(()=>{SS=!1},100),t.current=!1,!0):!1}function i(o){return sG(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:i,onBlur:r,ref:e}}function EU(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Tp;function AU(){if(Tp)return Tp;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Tp="reverse",e.scrollLeft>0?Tp="default":(e.scrollLeft=1,e.scrollLeft===0&&(Tp="negative")),document.body.removeChild(e),Tp}function yT(e,t){const r=e.scrollLeft;if(t!=="rtl")return r;switch(AU()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function e6(e,t){const r=De({},t);return Object.keys(e).forEach(i=>{if(i.toString().match(/^(components|slots)$/))r[i]=De({},e[i],r[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const o=e[i]||{},a=t[i];r[i]={},!a||!Object.keys(a)?r[i]=o:!o||!Object.keys(o)?r[i]=a:(r[i]=De({},a),Object.keys(o).forEach(s=>{r[i][s]=e6(o[s],a[s])}))}else r[i]===void 0&&(r[i]=e[i])}),r}function hi(e,t,r){const i={};return Object.keys(e).forEach(o=>{i[o]=e[o].reduce((a,s)=>(s&&(a.push(t(s)),r&&r[s]&&a.push(r[s])),a),[]).join(" ")}),i}const vT=e=>e,lG=()=>{let e=vT;return{configure(t){e=t},generate(t){return e(t)},reset(){e=vT}}},uG=lG(),t6=uG,cG={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function di(e,t,r="Mui"){const i=cG[t];return i?`${r}-${i}`:`${t6.generate(e)}-${t}`}function ri(e,t,r="Mui"){const i={};return t.forEach(o=>{i[o]=di(e,o,r)}),i}function bn(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}function TU(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var dG=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fG=TU(function(e){return dG.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function pG(e){if(e.sheet)return e.sheet;for(var t=0;t0?ja(ig,--Ms):0,Ph--,ga===10&&(Ph=1,Ow--),ga}function Zs(){return ga=Ms2||M0(ga)>3?"":" "}function kG(e,t){for(;--t&&Zs()&&!(ga<48||ga>102||ga>57&&ga<65||ga>70&&ga<97););return hy(e,s1()+(t<6&&_u()==32&&Zs()==32))}function kS(e){for(;Zs();)switch(ga){case e:return Ms;case 34:case 39:e!==34&&e!==39&&kS(ga);break;case 40:e===41&&kS(e);break;case 92:Zs();break}return Ms}function EG(e,t){for(;Zs()&&e+ga!==47+10;)if(e+ga===42+42&&_u()===47)break;return"/*"+hy(t,Ms-1)+"*"+Mw(e===47?e:Zs())}function AG(e){for(;!M0(_u());)Zs();return hy(e,Ms)}function TG(e){return BU(u1("",null,null,null,[""],e=OU(e),0,[0],e))}function u1(e,t,r,i,o,a,s,l,u){for(var c=0,d=0,p=s,v=0,x=0,b=0,y=1,_=1,k=1,E=0,O="",U=o,D=a,j=i,F=O;_;)switch(b=E,E=Zs()){case 40:if(b!=108&&ja(F,p-1)==58){CS(F+=co(l1(E),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:F+=l1(E);break;case 9:case 10:case 13:case 32:F+=CG(b);break;case 92:F+=kG(s1()-1,7);continue;case 47:switch(_u()){case 42:case 47:bv(IG(EG(Zs(),s1()),t,r),u);break;default:F+="/"}break;case 123*y:l[c++]=cu(F)*k;case 125*y:case 59:case 0:switch(E){case 0:case 125:_=0;case 59+d:x>0&&cu(F)-p&&bv(x>32?wT(F+";",i,r,p-1):wT(co(F," ","")+";",i,r,p-2),u);break;case 59:F+=";";default:if(bv(j=bT(F,t,r,c,d,o,l,O,U=[],D=[],p),a),E===123)if(d===0)u1(F,t,j,j,U,a,p,l,D);else switch(v===99&&ja(F,3)===110?100:v){case 100:case 109:case 115:u1(e,j,j,i&&bv(bT(e,j,j,0,0,o,l,O,o,U=[],p),D),o,D,p,l,i?U:D);break;default:u1(F,j,j,j,[""],D,0,l,D)}}c=d=x=0,y=k=1,O=F="",p=s;break;case 58:p=1+cu(F),x=b;default:if(y<1){if(E==123)--y;else if(E==125&&y++==0&&SG()==125)continue}switch(F+=Mw(E),E*y){case 38:k=d>0?1:(F+="\f",-1);break;case 44:l[c++]=(cu(F)-1)*k,k=1;break;case 64:_u()===45&&(F+=l1(Zs())),v=_u(),d=p=cu(O=F+=AG(s1())),E++;break;case 45:b===45&&cu(F)==2&&(y=0)}}return a}function bT(e,t,r,i,o,a,s,l,u,c,d){for(var p=o-1,v=o===0?a:[""],x=i6(v),b=0,y=0,_=0;b0?v[k]+" "+E:co(E,/&\f/g,v[k])))&&(u[_++]=O);return Bw(e,t,r,o===0?r6:l,u,c,d)}function IG(e,t,r){return Bw(e,t,r,IU,Mw(_G()),P0(e,2,-2),0)}function wT(e,t,r,i){return Bw(e,t,r,n6,P0(e,0,i),P0(e,i+1,-1),i)}function yh(e,t){for(var r="",i=i6(e),o=0;o6)switch(ja(e,t+1)){case 109:if(ja(e,t+4)!==45)break;case 102:return co(e,/(.+:)(.+)-([^]+)/,"$1"+oo+"$2-$3$1"+Q1+(ja(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~CS(e,"stretch")?UU(co(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ja(e,t+1)!==115)break;case 6444:switch(ja(e,cu(e)-3-(~CS(e,"!important")&&10))){case 107:return co(e,":",":"+oo)+e;case 101:return co(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+oo+(ja(e,14)===45?"inline-":"")+"box$3$1"+oo+"$2$3$1"+Qa+"$2box$3")+e}break;case 5936:switch(ja(e,t+11)){case 114:return oo+e+Qa+co(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return oo+e+Qa+co(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return oo+e+Qa+co(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return oo+e+Qa+e+e}return e}var NG=function(t,r,i,o){if(t.length>-1&&!t.return)switch(t.type){case n6:t.return=UU(t.value,t.length);break;case RU:return yh([Gg(t,{value:co(t.value,"@","@"+oo)})],o);case r6:if(t.length)return xG(t.props,function(a){switch(wG(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yh([Gg(t,{props:[co(a,/:(read-\w+)/,":"+Q1+"$1")]})],o);case"::placeholder":return yh([Gg(t,{props:[co(a,/:(plac\w+)/,":"+oo+"input-$1")]}),Gg(t,{props:[co(a,/:(plac\w+)/,":"+Q1+"$1")]}),Gg(t,{props:[co(a,/:(plac\w+)/,Qa+"input-$1")]})],o)}return""})}},jG=[NG],$G=function(t){var r=t.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(y){var _=y.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||jG,a={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var _=y.getAttribute("data-emotion").split(" "),k=1;k<_.length;k++)a[_[k]]=!0;l.push(y)});var u,c=[DG,LG];{var d,p=[RG,MG(function(y){d.insert(y)})],v=PG(c.concat(o,p)),x=function(_){return yh(TG(_),v)};u=function(_,k,E,O){d=E,x(_?_+"{"+k.styles+"}":k.styles),O&&(b.inserted[k.name]=!0)}}var b={key:r,sheet:new gG({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return b.sheet.hydrate(l),b},DU={exports:{}},vo={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Da=typeof Symbol=="function"&&Symbol.for,o6=Da?Symbol.for("react.element"):60103,a6=Da?Symbol.for("react.portal"):60106,Uw=Da?Symbol.for("react.fragment"):60107,Dw=Da?Symbol.for("react.strict_mode"):60108,Lw=Da?Symbol.for("react.profiler"):60114,Nw=Da?Symbol.for("react.provider"):60109,jw=Da?Symbol.for("react.context"):60110,s6=Da?Symbol.for("react.async_mode"):60111,$w=Da?Symbol.for("react.concurrent_mode"):60111,Fw=Da?Symbol.for("react.forward_ref"):60112,zw=Da?Symbol.for("react.suspense"):60113,FG=Da?Symbol.for("react.suspense_list"):60120,Hw=Da?Symbol.for("react.memo"):60115,Ww=Da?Symbol.for("react.lazy"):60116,zG=Da?Symbol.for("react.block"):60121,HG=Da?Symbol.for("react.fundamental"):60117,WG=Da?Symbol.for("react.responder"):60118,VG=Da?Symbol.for("react.scope"):60119;function il(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case o6:switch(e=e.type,e){case s6:case $w:case Uw:case Lw:case Dw:case zw:return e;default:switch(e=e&&e.$$typeof,e){case jw:case Fw:case Ww:case Hw:case Nw:return e;default:return t}}case a6:return t}}}function LU(e){return il(e)===$w}vo.AsyncMode=s6;vo.ConcurrentMode=$w;vo.ContextConsumer=jw;vo.ContextProvider=Nw;vo.Element=o6;vo.ForwardRef=Fw;vo.Fragment=Uw;vo.Lazy=Ww;vo.Memo=Hw;vo.Portal=a6;vo.Profiler=Lw;vo.StrictMode=Dw;vo.Suspense=zw;vo.isAsyncMode=function(e){return LU(e)||il(e)===s6};vo.isConcurrentMode=LU;vo.isContextConsumer=function(e){return il(e)===jw};vo.isContextProvider=function(e){return il(e)===Nw};vo.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===o6};vo.isForwardRef=function(e){return il(e)===Fw};vo.isFragment=function(e){return il(e)===Uw};vo.isLazy=function(e){return il(e)===Ww};vo.isMemo=function(e){return il(e)===Hw};vo.isPortal=function(e){return il(e)===a6};vo.isProfiler=function(e){return il(e)===Lw};vo.isStrictMode=function(e){return il(e)===Dw};vo.isSuspense=function(e){return il(e)===zw};vo.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Uw||e===$w||e===Lw||e===Dw||e===zw||e===FG||typeof e=="object"&&e!==null&&(e.$$typeof===Ww||e.$$typeof===Hw||e.$$typeof===Nw||e.$$typeof===jw||e.$$typeof===Fw||e.$$typeof===HG||e.$$typeof===WG||e.$$typeof===VG||e.$$typeof===zG)};vo.typeOf=il;(function(e){e.exports=vo})(DU);var NU=DU.exports,qG={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},KG={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},jU={};jU[NU.ForwardRef]=qG;jU[NU.Memo]=KG;var GG=!0;function YG(e,t,r){var i="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):i+=o+" "}),i}var $U=function(t,r,i){var o=t.key+"-"+r.name;(i===!1||GG===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},FU=function(t,r,i){$U(t,r,i);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function ZG(e){for(var t=0,r,i=0,o=e.length;o>=4;++i,o-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var QG={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},XG=/[A-Z]|^ms/g,JG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zU=function(t){return t.charCodeAt(1)===45},_T=function(t){return t!=null&&typeof t!="boolean"},H_=TU(function(e){return zU(e)?e:e.replace(XG,"-$&").toLowerCase()}),ST=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(JG,function(i,o,a){return du={name:o,styles:a,next:du},o})}return QG[t]!==1&&!zU(t)&&typeof r=="number"&&r!==0?r+"px":r};function O0(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return du={name:r.name,styles:r.styles,next:du},r.name;if(r.styles!==void 0){var i=r.next;if(i!==void 0)for(;i!==void 0;)du={name:i.name,styles:i.styles,next:du},i=i.next;var o=r.styles+";";return o}return eY(e,t,r)}case"function":{if(e!==void 0){var a=du,s=r(e);return du=a,O0(e,t,s)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function eY(e,t,r){var i="";if(Array.isArray(r))for(var o=0;o96?iY:oY},AT=function(t,r,i){var o;if(r){var a=r.shouldForwardProp;o=t.__emotion_forwardProp&&a?function(s){return t.__emotion_forwardProp(s)&&a(s)}:a}return typeof o!="function"&&i&&(o=t.__emotion_forwardProp),o},aY=function(t){var r=t.cache,i=t.serialized,o=t.isStringTag;return $U(r,i,o),rY(function(){return FU(r,i,o)}),null},sY=function e(t,r){var i=t.__emotion_real===t,o=i&&t.__emotion_base||t,a,s;r!==void 0&&(a=r.label,s=r.target);var l=AT(t,r,i),u=l||ET(o),c=!u("as");return function(){var d=arguments,p=i&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),d[0]==null||d[0].raw===void 0)p.push.apply(p,d);else{p.push(d[0][0]);for(var v=d.length,x=1;xt(cY(o)?r:o):t})}/** + * @mui/styled-engine v5.11.11 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function qU(e,t){return uY(e,t)}const fY=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Qm(e,t){return t?Is(e,t,{clone:!1}):e}const c6={xs:0,sm:600,md:900,lg:1200,xl:1536},TT={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${c6[e]}px)`};function Os(e,t,r){const i=e.theme||{};if(Array.isArray(t)){const a=i.breakpoints||TT;return t.reduce((s,l,u)=>(s[a.up(a.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const a=i.breakpoints||TT;return Object.keys(t).reduce((s,l)=>{if(Object.keys(a.values||c6).indexOf(l)!==-1){const u=a.up(l);s[u]=r(t[l],l)}else{const u=l;s[u]=t[u]}return s},{})}return r(t)}function KU(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((i,o)=>{const a=e.up(o);return i[a]={},i},{}))||{}}function GU(e,t){return e.reduce((r,i)=>{const o=r[i];return(!o||Object.keys(o).length===0)&&delete r[i],r},t)}function pY(e,...t){const r=KU(e),i=[r,...t].reduce((o,a)=>Is(o,a),{});return GU(Object.keys(r),i)}function hY(e,t){if(typeof e!="object")return{};const r={},i=Object.keys(t);return Array.isArray(e)?i.forEach((o,a)=>{a{e[o]!=null&&(r[o]=!0)}),r}function Cf({values:e,breakpoints:t,base:r}){const i=r||hY(e,t),o=Object.keys(i);if(o.length===0)return e;let a;return o.reduce((s,l,u)=>(Array.isArray(e)?(s[l]=e[u]!=null?e[u]:e[a],a=u):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[a],a=l):s[l]=e,s),{})}function Mh(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const i=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(i!=null)return i}return t.split(".").reduce((i,o)=>i&&i[o]!=null?i[o]:null,e)}function X1(e,t,r,i=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||i:o=Mh(e,r)||i,t&&(o=t(o,i,e)),o}function ho(e){const{prop:t,cssProperty:r=e.prop,themeKey:i,transform:o}=e,a=s=>{if(s[t]==null)return null;const l=s[t],u=s.theme,c=Mh(u,i)||{};return Os(s,l,p=>{let v=X1(c,o,p);return p===v&&typeof p=="string"&&(v=X1(c,o,`${t}${p==="default"?"":Zr(p)}`,p)),r===!1?v:{[r]:v}})};return a.propTypes={},a.filterProps=[t],a}function Vw(...e){const t=e.reduce((i,o)=>(o.filterProps.forEach(a=>{i[a]=o}),i),{}),r=i=>Object.keys(i).reduce((o,a)=>t[a]?Qm(o,t[a](i)):o,{});return r.propTypes={},r.filterProps=e.reduce((i,o)=>i.concat(o.filterProps),[]),r}function gY(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const mY={m:"margin",p:"padding"},yY={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},IT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vY=gY(e=>{if(e.length>2)if(IT[e])e=IT[e];else return[e];const[t,r]=e.split(""),i=mY[t],o=yY[r]||"";return Array.isArray(o)?o.map(a=>i+a):[i+o]}),d6=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f6=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...d6,...f6];function gy(e,t,r,i){var o;const a=(o=Mh(e,t,!1))!=null?o:r;return typeof a=="number"?s=>typeof s=="string"?s:a*s:Array.isArray(a)?s=>typeof s=="string"?s:a[s]:typeof a=="function"?a:()=>{}}function p6(e){return gy(e,"spacing",8)}function og(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),i=e(r);return t>=0?i:typeof i=="number"?-i:`-${i}`}function bY(e,t){return r=>e.reduce((i,o)=>(i[o]=og(t,r),i),{})}function wY(e,t,r,i){if(t.indexOf(r)===-1)return null;const o=vY(r),a=bY(o,i),s=e[r];return Os(e,s,a)}function YU(e,t){const r=p6(e.theme);return Object.keys(e).map(i=>wY(e,t,i,r)).reduce(Qm,{})}function ra(e){return YU(e,d6)}ra.propTypes={};ra.filterProps=d6;function na(e){return YU(e,f6)}na.propTypes={};na.filterProps=f6;function gu(e){return typeof e!="number"?e:`${e}px solid`}const xY=ho({prop:"border",themeKey:"borders",transform:gu}),_Y=ho({prop:"borderTop",themeKey:"borders",transform:gu}),SY=ho({prop:"borderRight",themeKey:"borders",transform:gu}),CY=ho({prop:"borderBottom",themeKey:"borders",transform:gu}),kY=ho({prop:"borderLeft",themeKey:"borders",transform:gu}),EY=ho({prop:"borderColor",themeKey:"palette"}),AY=ho({prop:"borderTopColor",themeKey:"palette"}),TY=ho({prop:"borderRightColor",themeKey:"palette"}),IY=ho({prop:"borderBottomColor",themeKey:"palette"}),RY=ho({prop:"borderLeftColor",themeKey:"palette"}),qw=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gy(e.theme,"shape.borderRadius",4),r=i=>({borderRadius:og(t,i)});return Os(e,e.borderRadius,r)}return null};qw.propTypes={};qw.filterProps=["borderRadius"];Vw(xY,_Y,SY,CY,kY,EY,AY,TY,IY,RY,qw);const Kw=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gy(e.theme,"spacing",8),r=i=>({gap:og(t,i)});return Os(e,e.gap,r)}return null};Kw.propTypes={};Kw.filterProps=["gap"];const Gw=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({columnGap:og(t,i)});return Os(e,e.columnGap,r)}return null};Gw.propTypes={};Gw.filterProps=["columnGap"];const Yw=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({rowGap:og(t,i)});return Os(e,e.rowGap,r)}return null};Yw.propTypes={};Yw.filterProps=["rowGap"];const PY=ho({prop:"gridColumn"}),MY=ho({prop:"gridRow"}),OY=ho({prop:"gridAutoFlow"}),BY=ho({prop:"gridAutoColumns"}),UY=ho({prop:"gridAutoRows"}),DY=ho({prop:"gridTemplateColumns"}),LY=ho({prop:"gridTemplateRows"}),NY=ho({prop:"gridTemplateAreas"}),jY=ho({prop:"gridArea"});Vw(Kw,Gw,Yw,PY,MY,OY,BY,UY,DY,LY,NY,jY);function vh(e,t){return t==="grey"?t:e}const $Y=ho({prop:"color",themeKey:"palette",transform:vh}),FY=ho({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:vh}),zY=ho({prop:"backgroundColor",themeKey:"palette",transform:vh});Vw($Y,FY,zY);function qs(e){return e<=1&&e!==0?`${e*100}%`:e}const HY=ho({prop:"width",transform:qs}),h6=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,o,a;return{maxWidth:((i=e.theme)==null||(o=i.breakpoints)==null||(a=o.values)==null?void 0:a[r])||c6[r]||qs(r)}};return Os(e,e.maxWidth,t)}return null};h6.filterProps=["maxWidth"];const WY=ho({prop:"minWidth",transform:qs}),VY=ho({prop:"height",transform:qs}),qY=ho({prop:"maxHeight",transform:qs}),KY=ho({prop:"minHeight",transform:qs});ho({prop:"size",cssProperty:"width",transform:qs});ho({prop:"size",cssProperty:"height",transform:qs});const GY=ho({prop:"boxSizing"});Vw(HY,h6,WY,VY,qY,KY,GY);const YY={border:{themeKey:"borders",transform:gu},borderTop:{themeKey:"borders",transform:gu},borderRight:{themeKey:"borders",transform:gu},borderBottom:{themeKey:"borders",transform:gu},borderLeft:{themeKey:"borders",transform:gu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:qw},color:{themeKey:"palette",transform:vh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:vh},backgroundColor:{themeKey:"palette",transform:vh},p:{style:na},pt:{style:na},pr:{style:na},pb:{style:na},pl:{style:na},px:{style:na},py:{style:na},padding:{style:na},paddingTop:{style:na},paddingRight:{style:na},paddingBottom:{style:na},paddingLeft:{style:na},paddingX:{style:na},paddingY:{style:na},paddingInline:{style:na},paddingInlineStart:{style:na},paddingInlineEnd:{style:na},paddingBlock:{style:na},paddingBlockStart:{style:na},paddingBlockEnd:{style:na},m:{style:ra},mt:{style:ra},mr:{style:ra},mb:{style:ra},ml:{style:ra},mx:{style:ra},my:{style:ra},margin:{style:ra},marginTop:{style:ra},marginRight:{style:ra},marginBottom:{style:ra},marginLeft:{style:ra},marginX:{style:ra},marginY:{style:ra},marginInline:{style:ra},marginInlineStart:{style:ra},marginInlineEnd:{style:ra},marginBlock:{style:ra},marginBlockStart:{style:ra},marginBlockEnd:{style:ra},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Kw},rowGap:{style:Yw},columnGap:{style:Gw},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qs},maxWidth:{style:h6},minWidth:{transform:qs},height:{transform:qs},maxHeight:{transform:qs},minHeight:{transform:qs},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Zw=YY;function ZY(...e){const t=e.reduce((i,o)=>i.concat(Object.keys(o)),[]),r=new Set(t);return e.every(i=>r.size===Object.keys(i).length)}function QY(e,t){return typeof e=="function"?e(t):e}function XY(){function e(r,i,o,a){const s={[r]:i,theme:o},l=a[r];if(!l)return{[r]:i};const{cssProperty:u=r,themeKey:c,transform:d,style:p}=l;if(i==null)return null;const v=Mh(o,c)||{};return p?p(s):Os(s,i,b=>{let y=X1(v,d,b);return b===y&&typeof b=="string"&&(y=X1(v,d,`${r}${b==="default"?"":Zr(b)}`,b)),u===!1?y:{[u]:y}})}function t(r){var i;const{sx:o,theme:a={}}=r||{};if(!o)return null;const s=(i=a.unstable_sxConfig)!=null?i:Zw;function l(u){let c=u;if(typeof u=="function")c=u(a);else if(typeof u!="object")return u;if(!c)return null;const d=KU(a.breakpoints),p=Object.keys(d);let v=d;return Object.keys(c).forEach(x=>{const b=QY(c[x],a);if(b!=null)if(typeof b=="object")if(s[x])v=Qm(v,e(x,b,a,s));else{const y=Os({theme:a},b,_=>({[x]:_}));ZY(y,b)?v[x]=t({sx:b,theme:a}):v=Qm(v,y)}else v=Qm(v,e(x,b,a,s))}),GU(p,v)}return Array.isArray(o)?o.map(l):l(o)}return t}const ZU=XY();ZU.filterProps=["sx"];const Qw=ZU,JY=["sx"],eZ=e=>{var t,r;const i={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Zw;return Object.keys(e).forEach(a=>{o[a]?i.systemProps[a]=e[a]:i.otherProps[a]=e[a]}),i};function Xw(e){const{sx:t}=e,r=bn(e,JY),{systemProps:i,otherProps:o}=eZ(r);let a;return Array.isArray(t)?a=[i,...t]:typeof t=="function"?a=(...s)=>{const l=t(...s);return cf(l)?De({},i,l):i}:a=De({},i,t),De({},o,{sx:a})}function QU(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,i)=>r.val-i.val),t.reduce((r,i)=>De({},r,{[i.key]:i.val}),{})};function nZ(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,o=bn(e,tZ),a=rZ(t),s=Object.keys(a);function l(v){return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r})`}function u(v){return`@media (max-width:${(typeof t[v]=="number"?t[v]:v)-i/100}${r})`}function c(v,x){const b=s.indexOf(x);return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:x)-i/100}${r})`}function d(v){return s.indexOf(v)+1(i.length===0?[1]:i).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}const sZ=["breakpoints","palette","spacing","shape"];function g6(e={},...t){const{breakpoints:r={},palette:i={},spacing:o,shape:a={}}=e,s=bn(e,sZ),l=nZ(r),u=aZ(o);let c=Is({breakpoints:l,direction:"ltr",components:{},palette:De({mode:"light"},i),spacing:u,shape:De({},oZ,a)},s);return c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Zw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Qw({sx:p,theme:this})},c}const lZ=X.exports.createContext(null),XU=lZ;function JU(){return X.exports.useContext(XU)}const uZ=typeof Symbol=="function"&&Symbol.for,cZ=uZ?Symbol.for("mui.nested"):"__THEME_NESTED__";function dZ(e,t){return typeof t=="function"?t(e):De({},e,t)}function fZ(e){const{children:t,theme:r}=e,i=JU(),o=X.exports.useMemo(()=>{const a=i===null?r:dZ(i,r);return a!=null&&(a[cZ]=i!==null),a},[r,i]);return L(XU.Provider,{value:o,children:t})}function pZ(e){return Object.keys(e).length===0}function m6(e=null){const t=JU();return!t||pZ(t)?e:t}const hZ=g6();function Jw(e=hZ){return m6(e)}const gZ=["className","component"];function e7(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=qU("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(Qw);return X.exports.forwardRef(function(l,u){const c=Jw(t),d=Xw(l),{className:p,component:v="div"}=d,x=bn(d,gZ);return L(o,De({as:v,ref:u,className:pn(p,i?i(r):r),theme:c},x))})}const mZ=e7(),da=mZ,yZ=["variant"];function RT(e){return e.length===0}function t7(e){const{variant:t}=e,r=bn(e,yZ);let i=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?i+=RT(i)?e[o]:Zr(e[o]):i+=`${RT(i)?o:Zr(o)}${Zr(e[o].toString())}`}),i}const vZ=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],bZ=["theme"],wZ=["theme"];function Yg(e){return Object.keys(e).length===0}function xZ(e){return typeof e=="string"&&e.charCodeAt(0)>96}const _Z=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,SZ=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const i={};return r.forEach(o=>{const a=t7(o.props);i[a]=o.style}),i},CZ=(e,t,r,i)=>{var o,a;const{ownerState:s={}}=e,l=[],u=r==null||(o=r.components)==null||(a=o[i])==null?void 0:a.variants;return u&&u.forEach(c=>{let d=!0;Object.keys(c.props).forEach(p=>{s[p]!==c.props[p]&&e[p]!==c.props[p]&&(d=!1)}),d&&l.push(t[t7(c.props)])}),l};function Xm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const kZ=g6();function r7(e={}){const{defaultTheme:t=kZ,rootShouldForwardProp:r=Xm,slotShouldForwardProp:i=Xm}=e,o=a=>{const s=Yg(a.theme)?t:a.theme;return Qw(De({},a,{theme:s}))};return o.__mui_systemSx=!0,(a,s={})=>{fY(a,O=>O.filter(U=>!(U!=null&&U.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:p}=s,v=bn(s,vZ),x=c!==void 0?c:u&&u!=="Root"||!1,b=d||!1;let y,_=Xm;u==="Root"?_=r:u?_=i:xZ(a)&&(_=void 0);const k=qU(a,De({shouldForwardProp:_,label:y},v)),E=(O,...U)=>{const D=U?U.map(W=>typeof W=="function"&&W.__emotion_real!==W?G=>{let{theme:ae}=G,V=bn(G,bZ);return W(De({theme:Yg(ae)?t:ae},V))}:W):[];let j=O;l&&p&&D.push(W=>{const G=Yg(W.theme)?t:W.theme,ae=_Z(l,G);if(ae){const V={};return Object.entries(ae).forEach(([oe,P])=>{V[oe]=typeof P=="function"?P(De({},W,{theme:G})):P}),p(W,V)}return null}),l&&!x&&D.push(W=>{const G=Yg(W.theme)?t:W.theme;return CZ(W,SZ(l,G),G,l)}),b||D.push(o);const F=D.length-U.length;if(Array.isArray(O)&&F>0){const W=new Array(F).fill("");j=[...O,...W],j.raw=[...O.raw,...W]}else typeof O=="function"&&O.__emotion_real!==O&&(j=W=>{let{theme:G}=W,ae=bn(W,wZ);return O(De({theme:Yg(G)?t:G},ae))});return k(j,...D)};return k.withConfig&&(E.withConfig=k.withConfig),E}}const EZ=r7(),Xi=EZ;function n7(e){const{theme:t,name:r,props:i}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?i:e6(t.components[r].defaultProps,i)}function AZ({props:e,name:t,defaultTheme:r}){const i=Jw(r);return n7({theme:i,name:t,props:e})}function y6(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function TZ(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,o)=>o<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Df(e){if(e.type)return e;if(e.charAt(0)==="#")return Df(TZ(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(kd(9,e));let i=e.substring(t+1,e.length-1),o;if(r==="color"){if(i=i.split(" "),o=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(kd(10,o))}else i=i.split(",");return i=i.map(a=>parseFloat(a)),{type:r,values:i,colorSpace:o}}function e2(e){const{type:t,colorSpace:r}=e;let{values:i}=e;return t.indexOf("rgb")!==-1?i=i.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),t.indexOf("color")!==-1?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${t}(${i})`}function IZ(e){e=Df(e);const{values:t}=e,r=t[0],i=t[1]/100,o=t[2]/100,a=i*Math.min(o,1-o),s=(c,d=(c+r/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),e2({type:l,values:u})}function AS(e){e=Df(e);let t=e.type==="hsl"||e.type==="hsla"?Df(IZ(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function RZ(e,t){const r=AS(e),i=AS(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function Qi(e,t){return e=Df(e),t=y6(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,e2(e)}function Oh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return e2(e)}function Bh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return e2(e)}function PZ(e,t=.15){return AS(e)>.5?Oh(e,t):Bh(e,t)}const MZ={};function OZ(e){const t=Jw();return L(u6.Provider,{value:typeof t=="object"?t:MZ,children:e.children})}function BZ(e){const{children:t,theme:r}=e;return L(fZ,{theme:r,children:L(OZ,{children:t})})}function UZ(e,t){return De({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const DZ={black:"#000",white:"#fff"},U0=DZ,LZ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},NZ=LZ,jZ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ip=jZ,$Z={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Rp=$Z,FZ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Zg=FZ,zZ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Pp=zZ,HZ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Mp=HZ,WZ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Op=WZ,VZ=["mode","contrastThreshold","tonalOffset"],PT={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:U0.white,default:U0.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},W_={text:{primary:U0.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:U0.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function MT(e,t,r,i){const o=i.light||i,a=i.dark||i*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Bh(e.main,o):t==="dark"&&(e.dark=Oh(e.main,a)))}function qZ(e="light"){return e==="dark"?{main:Pp[200],light:Pp[50],dark:Pp[400]}:{main:Pp[700],light:Pp[400],dark:Pp[800]}}function KZ(e="light"){return e==="dark"?{main:Ip[200],light:Ip[50],dark:Ip[400]}:{main:Ip[500],light:Ip[300],dark:Ip[700]}}function GZ(e="light"){return e==="dark"?{main:Rp[500],light:Rp[300],dark:Rp[700]}:{main:Rp[700],light:Rp[400],dark:Rp[800]}}function YZ(e="light"){return e==="dark"?{main:Mp[400],light:Mp[300],dark:Mp[700]}:{main:Mp[700],light:Mp[500],dark:Mp[900]}}function ZZ(e="light"){return e==="dark"?{main:Op[400],light:Op[300],dark:Op[700]}:{main:Op[800],light:Op[500],dark:Op[900]}}function QZ(e="light"){return e==="dark"?{main:Zg[400],light:Zg[300],dark:Zg[700]}:{main:"#ed6c02",light:Zg[500],dark:Zg[900]}}function XZ(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:i=.2}=e,o=bn(e,VZ),a=e.primary||qZ(t),s=e.secondary||KZ(t),l=e.error||GZ(t),u=e.info||YZ(t),c=e.success||ZZ(t),d=e.warning||QZ(t);function p(y){return RZ(y,W_.text.primary)>=r?W_.text.primary:PT.text.primary}const v=({color:y,name:_,mainShade:k=500,lightShade:E=300,darkShade:O=700})=>{if(y=De({},y),!y.main&&y[k]&&(y.main=y[k]),!y.hasOwnProperty("main"))throw new Error(kd(11,_?` (${_})`:"",k));if(typeof y.main!="string")throw new Error(kd(12,_?` (${_})`:"",JSON.stringify(y.main)));return MT(y,"light",E,i),MT(y,"dark",O,i),y.contrastText||(y.contrastText=p(y.main)),y},x={dark:W_,light:PT};return Is(De({common:De({},U0),mode:t,primary:v({color:a,name:"primary"}),secondary:v({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:l,name:"error"}),warning:v({color:d,name:"warning"}),info:v({color:u,name:"info"}),success:v({color:c,name:"success"}),grey:NZ,contrastThreshold:r,getContrastText:p,augmentColor:v,tonalOffset:i},x[t]),o)}const JZ=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function eQ(e){return Math.round(e*1e5)/1e5}const OT={textTransform:"uppercase"},BT='"Roboto", "Helvetica", "Arial", sans-serif';function tQ(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:i=BT,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:p}=r,v=bn(r,JZ),x=o/14,b=p||(k=>`${k/c*x}rem`),y=(k,E,O,U,D)=>De({fontFamily:i,fontWeight:k,fontSize:b(E),lineHeight:O},i===BT?{letterSpacing:`${eQ(U/E)}em`}:{},D,d),_={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,OT),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,OT)};return Is(De({htmlFontSize:c,pxToRem:b,fontFamily:i,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:u},_),v,{clone:!1})}const rQ=.2,nQ=.14,iQ=.12;function zo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${rQ})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${nQ})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${iQ})`].join(",")}const oQ=["none",zo(0,2,1,-1,0,1,1,0,0,1,3,0),zo(0,3,1,-2,0,2,2,0,0,1,5,0),zo(0,3,3,-2,0,3,4,0,0,1,8,0),zo(0,2,4,-1,0,4,5,0,0,1,10,0),zo(0,3,5,-1,0,5,8,0,0,1,14,0),zo(0,3,5,-1,0,6,10,0,0,1,18,0),zo(0,4,5,-2,0,7,10,1,0,2,16,1),zo(0,5,5,-3,0,8,10,1,0,3,14,2),zo(0,5,6,-3,0,9,12,1,0,3,16,2),zo(0,6,6,-3,0,10,14,1,0,4,18,3),zo(0,6,7,-4,0,11,15,1,0,4,20,3),zo(0,7,8,-4,0,12,17,2,0,5,22,4),zo(0,7,8,-4,0,13,19,2,0,5,24,4),zo(0,7,9,-4,0,14,21,2,0,5,26,4),zo(0,8,9,-5,0,15,22,2,0,6,28,5),zo(0,8,10,-5,0,16,24,2,0,6,30,5),zo(0,8,11,-5,0,17,26,2,0,6,32,5),zo(0,9,11,-5,0,18,28,2,0,7,34,6),zo(0,9,12,-6,0,19,29,2,0,7,36,6),zo(0,10,13,-6,0,20,31,3,0,8,38,7),zo(0,10,13,-6,0,21,33,3,0,8,40,7),zo(0,10,14,-6,0,22,35,3,0,8,42,7),zo(0,11,14,-7,0,23,36,3,0,9,44,8),zo(0,11,15,-7,0,24,38,3,0,9,46,8)],aQ=oQ,sQ=["duration","easing","delay"],lQ={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},i7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function UT(e){return`${Math.round(e)}ms`}function uQ(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function cQ(e){const t=De({},lQ,e.easing),r=De({},i7,e.duration);return De({getAutoHeightDuration:uQ,create:(o=["all"],a={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:u=0}=a;return bn(a,sQ),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:UT(s)} ${l} ${typeof u=="string"?u:UT(u)}`).join(",")}},e,{easing:t,duration:r})}const dQ={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},fQ=dQ,pQ=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function v6(e={},...t){const{mixins:r={},palette:i={},transitions:o={},typography:a={}}=e,s=bn(e,pQ);if(e.vars)throw new Error(kd(18));const l=XZ(i),u=g6(e);let c=Is(u,{mixins:UZ(u.breakpoints,r),palette:l,shadows:aQ.slice(),typography:tQ(l,a),transitions:cQ(o),zIndex:De({},fQ)});return c=Is(c,s),c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Zw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Qw({sx:p,theme:this})},c}function hQ(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function gQ(e){return parseFloat(e)}const mQ=v6(),t2=mQ;function la(){return Jw(t2)}function gi({props:e,name:t}){return AZ({props:e,name:t,defaultTheme:t2})}const tu=e=>Xm(e)&&e!=="classes",yQ=Xm,vQ=r7({defaultTheme:t2,rootShouldForwardProp:tu}),sr=vQ,bQ=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},DT=bQ,wQ="/assets/search.7f4d94b1.svg",b6="/assets/close.3e490fed.svg";function J1(e){return typeof e=="string"}function Um(e,t,r){return e===void 0||J1(e)?t:De({},t,{ownerState:De({},t.ownerState,r)})}function xQ(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{r[i]=e[i]}),r}function TS(e,t){return typeof e=="function"?e(t):e}function LT(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function _Q(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:o,className:a}=e;if(!t){const x=pn(o?.className,i?.className,a,r?.className),b=De({},r?.style,o?.style,i?.style),y=De({},r,o,i);return x.length>0&&(y.className=x),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=xQ(De({},o,i)),l=LT(i),u=LT(o),c=t(s),d=pn(c?.className,r?.className,a,o?.className,i?.className),p=De({},c?.style,r?.style,o?.style,i?.style),v=De({},c,r,u,l);return d.length>0&&(v.className=d),Object.keys(p).length>0&&(v.style=p),{props:v,internalRef:c.ref}}const SQ=["elementType","externalSlotProps","ownerState"];function IS(e){var t;const{elementType:r,externalSlotProps:i,ownerState:o}=e,a=bn(e,SQ),s=TS(i,o),{props:l,internalRef:u}=_Q(De({},a,{externalSlotProps:s})),c=Vo(u,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return Um(r,De({},l,{ref:c}),o)}function NT(e){return e.substring(2).toLowerCase()}function CQ(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=Vo(t.ref,l),p=bl(b=>{const y=c.current;c.current=!1;const _=ya(l.current);if(!u.current||!l.current||"clientX"in b&&CQ(b,_))return;if(s.current){s.current=!1;return}let k;b.composedPath?k=b.composedPath().indexOf(l.current)>-1:k=!_.documentElement.contains(b.target)||l.current.contains(b.target),!k&&(r||!y)&&o(b)}),v=b=>y=>{c.current=!0;const _=t.props[b];_&&_(y)},x={ref:d};return a!==!1&&(x[a]=v(a)),X.exports.useEffect(()=>{if(a!==!1){const b=NT(a),y=ya(l.current),_=()=>{s.current=!0};return y.addEventListener(b,p),y.addEventListener("touchmove",_),()=>{y.removeEventListener(b,p),y.removeEventListener("touchmove",_)}}},[p,a]),i!==!1&&(x[i]=v(i)),X.exports.useEffect(()=>{if(i!==!1){const b=NT(i),y=ya(l.current);return y.addEventListener(b,p),()=>{y.removeEventListener(b,p)}}},[p,i]),L(X.exports.Fragment,{children:X.exports.cloneElement(t,x)})}const kQ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function EQ(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function AQ(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function TQ(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||AQ(e))}function IQ(e){const t=[],r=[];return Array.from(e.querySelectorAll(kQ)).forEach((i,o)=>{const a=EQ(i);a===-1||!TQ(i)||(a===0?t.push(i):r.push({documentOrder:o,tabIndex:a,node:i}))}),r.sort((i,o)=>i.tabIndex===o.tabIndex?i.documentOrder-o.documentOrder:i.tabIndex-o.tabIndex).map(i=>i.node).concat(t)}function RQ(){return!0}function PQ(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=IQ,isEnabled:s=RQ,open:l}=e,u=X.exports.useRef(!1),c=X.exports.useRef(null),d=X.exports.useRef(null),p=X.exports.useRef(null),v=X.exports.useRef(null),x=X.exports.useRef(!1),b=X.exports.useRef(null),y=Vo(t.ref,b),_=X.exports.useRef(null);X.exports.useEffect(()=>{!l||!b.current||(x.current=!r)},[r,l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const O=ya(b.current);return b.current.contains(O.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),x.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const O=ya(b.current),U=F=>{const{current:H}=b;if(H!==null){if(!O.hasFocus()||i||!s()||u.current){u.current=!1;return}if(!H.contains(O.activeElement)){if(F&&v.current!==F.target||O.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!x.current)return;let ae=[];if((O.activeElement===c.current||O.activeElement===d.current)&&(ae=a(b.current)),ae.length>0){var W,G;const V=Boolean(((W=_.current)==null?void 0:W.shiftKey)&&((G=_.current)==null?void 0:G.key)==="Tab"),oe=ae[0],P=ae[ae.length-1];typeof oe!="string"&&typeof P!="string"&&(V?P.focus():oe.focus())}else H.focus()}}},D=F=>{_.current=F,!(i||!s()||F.key!=="Tab")&&O.activeElement===b.current&&F.shiftKey&&(u.current=!0,d.current&&d.current.focus())};O.addEventListener("focusin",U),O.addEventListener("keydown",D,!0);const j=setInterval(()=>{O.activeElement&&O.activeElement.tagName==="BODY"&&U(null)},50);return()=>{clearInterval(j),O.removeEventListener("focusin",U),O.removeEventListener("keydown",D,!0)}},[r,i,o,s,l,a]);const k=O=>{p.current===null&&(p.current=O.relatedTarget),x.current=!0,v.current=O.target;const U=t.props.onFocus;U&&U(O)},E=O=>{p.current===null&&(p.current=O.relatedTarget),x.current=!0};return Ut(X.exports.Fragment,{children:[L("div",{tabIndex:l?0:-1,onFocus:E,ref:c,"data-testid":"sentinelStart"}),X.exports.cloneElement(t,{ref:y,onFocus:k}),L("div",{tabIndex:l?0:-1,onFocus:E,ref:d,"data-testid":"sentinelEnd"})]})}var Rs="top",Al="bottom",Tl="right",Ps="left",x6="auto",my=[Rs,Al,Tl,Ps],Uh="start",D0="end",MQ="clippingParents",o7="viewport",Qg="popper",OQ="reference",jT=my.reduce(function(e,t){return e.concat([t+"-"+Uh,t+"-"+D0])},[]),a7=[].concat(my,[x6]).reduce(function(e,t){return e.concat([t,t+"-"+Uh,t+"-"+D0])},[]),BQ="beforeRead",UQ="read",DQ="afterRead",LQ="beforeMain",NQ="main",jQ="afterMain",$Q="beforeWrite",FQ="write",zQ="afterWrite",HQ=[BQ,UQ,DQ,LQ,NQ,jQ,$Q,FQ,zQ];function Mu(e){return e?(e.nodeName||"").toLowerCase():null}function Rl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lf(e){var t=Rl(e).Element;return e instanceof t||e instanceof Element}function xl(e){var t=Rl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _6(e){if(typeof ShadowRoot>"u")return!1;var t=Rl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function WQ(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!xl(a)||!Mu(a)||(Object.assign(a.style,i),Object.keys(o).forEach(function(s){var l=o[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function VQ(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),l=s.reduce(function(u,c){return u[c]="",u},{});!xl(o)||!Mu(o)||(Object.assign(o.style,l),Object.keys(a).forEach(function(u){o.removeAttribute(u)}))})}}const qQ={name:"applyStyles",enabled:!0,phase:"write",fn:WQ,effect:VQ,requires:["computeStyles"]};function Su(e){return e.split("-")[0]}var kf=Math.max,eb=Math.min,Dh=Math.round;function RS(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function s7(){return!/^((?!chrome|android).)*safari/i.test(RS())}function Lh(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&xl(e)&&(o=e.offsetWidth>0&&Dh(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Dh(i.height)/e.offsetHeight||1);var s=Lf(e)?Rl(e):window,l=s.visualViewport,u=!s7()&&r,c=(i.left+(u&&l?l.offsetLeft:0))/o,d=(i.top+(u&&l?l.offsetTop:0))/a,p=i.width/o,v=i.height/a;return{width:p,height:v,top:d,right:c+p,bottom:d+v,left:c,x:c,y:d}}function S6(e){var t=Lh(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function l7(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&_6(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wc(e){return Rl(e).getComputedStyle(e)}function KQ(e){return["table","td","th"].indexOf(Mu(e))>=0}function $d(e){return((Lf(e)?e.ownerDocument:e.document)||window.document).documentElement}function r2(e){return Mu(e)==="html"?e:e.assignedSlot||e.parentNode||(_6(e)?e.host:null)||$d(e)}function $T(e){return!xl(e)||wc(e).position==="fixed"?null:e.offsetParent}function GQ(e){var t=/firefox/i.test(RS()),r=/Trident/i.test(RS());if(r&&xl(e)){var i=wc(e);if(i.position==="fixed")return null}var o=r2(e);for(_6(o)&&(o=o.host);xl(o)&&["html","body"].indexOf(Mu(o))<0;){var a=wc(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function yy(e){for(var t=Rl(e),r=$T(e);r&&KQ(r)&&wc(r).position==="static";)r=$T(r);return r&&(Mu(r)==="html"||Mu(r)==="body"&&wc(r).position==="static")?t:r||GQ(e)||t}function C6(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jm(e,t,r){return kf(e,eb(t,r))}function YQ(e,t,r){var i=Jm(e,t,r);return i>r?r:i}function u7(){return{top:0,right:0,bottom:0,left:0}}function c7(e){return Object.assign({},u7(),e)}function d7(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var ZQ=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,c7(typeof t!="number"?t:d7(t,my))};function QQ(e){var t,r=e.state,i=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,l=Su(r.placement),u=C6(l),c=[Ps,Tl].indexOf(l)>=0,d=c?"height":"width";if(!(!a||!s)){var p=ZQ(o.padding,r),v=S6(a),x=u==="y"?Rs:Ps,b=u==="y"?Al:Tl,y=r.rects.reference[d]+r.rects.reference[u]-s[u]-r.rects.popper[d],_=s[u]-r.rects.reference[u],k=yy(a),E=k?u==="y"?k.clientHeight||0:k.clientWidth||0:0,O=y/2-_/2,U=p[x],D=E-v[d]-p[b],j=E/2-v[d]/2+O,F=Jm(U,j,D),H=u;r.modifiersData[i]=(t={},t[H]=F,t.centerOffset=F-j,t)}}function XQ(e){var t=e.state,r=e.options,i=r.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||!l7(t.elements.popper,o)||(t.elements.arrow=o))}const JQ={name:"arrow",enabled:!0,phase:"main",fn:QQ,effect:XQ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nh(e){return e.split("-")[1]}var eX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tX(e){var t=e.x,r=e.y,i=window,o=i.devicePixelRatio||1;return{x:Dh(t*o)/o||0,y:Dh(r*o)/o||0}}function FT(e){var t,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,v=s.x,x=v===void 0?0:v,b=s.y,y=b===void 0?0:b,_=typeof d=="function"?d({x,y}):{x,y};x=_.x,y=_.y;var k=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),O=Ps,U=Rs,D=window;if(c){var j=yy(r),F="clientHeight",H="clientWidth";if(j===Rl(r)&&(j=$d(r),wc(j).position!=="static"&&l==="absolute"&&(F="scrollHeight",H="scrollWidth")),j=j,o===Rs||(o===Ps||o===Tl)&&a===D0){U=Al;var W=p&&j===D&&D.visualViewport?D.visualViewport.height:j[F];y-=W-i.height,y*=u?1:-1}if(o===Ps||(o===Rs||o===Al)&&a===D0){O=Tl;var G=p&&j===D&&D.visualViewport?D.visualViewport.width:j[H];x-=G-i.width,x*=u?1:-1}}var ae=Object.assign({position:l},c&&eX),V=d===!0?tX({x,y}):{x,y};if(x=V.x,y=V.y,u){var oe;return Object.assign({},ae,(oe={},oe[U]=E?"0":"",oe[O]=k?"0":"",oe.transform=(D.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",oe))}return Object.assign({},ae,(t={},t[U]=E?y+"px":"",t[O]=k?x+"px":"",t.transform="",t))}function rX(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=i===void 0?!0:i,a=r.adaptive,s=a===void 0?!0:a,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:Su(t.placement),variation:Nh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,FT(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,FT(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rX,data:{}};var wv={passive:!0};function iX(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,a=o===void 0?!0:o,s=i.resize,l=s===void 0?!0:s,u=Rl(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",r.update,wv)}),l&&u.addEventListener("resize",r.update,wv),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",r.update,wv)}),l&&u.removeEventListener("resize",r.update,wv)}}const oX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iX,data:{}};var aX={left:"right",right:"left",bottom:"top",top:"bottom"};function c1(e){return e.replace(/left|right|bottom|top/g,function(t){return aX[t]})}var sX={start:"end",end:"start"};function zT(e){return e.replace(/start|end/g,function(t){return sX[t]})}function k6(e){var t=Rl(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function E6(e){return Lh($d(e)).left+k6(e).scrollLeft}function lX(e,t){var r=Rl(e),i=$d(e),o=r.visualViewport,a=i.clientWidth,s=i.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;var c=s7();(c||!c&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l+E6(e),y:u}}function uX(e){var t,r=$d(e),i=k6(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=kf(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=kf(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+E6(e),u=-i.scrollTop;return wc(o||r).direction==="rtl"&&(l+=kf(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:l,y:u}}function A6(e){var t=wc(e),r=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+i)}function f7(e){return["html","body","#document"].indexOf(Mu(e))>=0?e.ownerDocument.body:xl(e)&&A6(e)?e:f7(r2(e))}function e0(e,t){var r;t===void 0&&(t=[]);var i=f7(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Rl(i),s=o?[a].concat(a.visualViewport||[],A6(i)?i:[]):i,l=t.concat(s);return o?l:l.concat(e0(r2(s)))}function PS(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cX(e,t){var r=Lh(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function HT(e,t,r){return t===o7?PS(lX(e,r)):Lf(t)?cX(t,r):PS(uX($d(e)))}function dX(e){var t=e0(r2(e)),r=["absolute","fixed"].indexOf(wc(e).position)>=0,i=r&&xl(e)?yy(e):e;return Lf(i)?t.filter(function(o){return Lf(o)&&l7(o,i)&&Mu(o)!=="body"}):[]}function fX(e,t,r,i){var o=t==="clippingParents"?dX(e):[].concat(t),a=[].concat(o,[r]),s=a[0],l=a.reduce(function(u,c){var d=HT(e,c,i);return u.top=kf(d.top,u.top),u.right=eb(d.right,u.right),u.bottom=eb(d.bottom,u.bottom),u.left=kf(d.left,u.left),u},HT(e,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function p7(e){var t=e.reference,r=e.element,i=e.placement,o=i?Su(i):null,a=i?Nh(i):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(o){case Rs:u={x:s,y:t.y-r.height};break;case Al:u={x:s,y:t.y+t.height};break;case Tl:u={x:t.x+t.width,y:l};break;case Ps:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=o?C6(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case Uh:u[c]=u[c]-(t[d]/2-r[d]/2);break;case D0:u[c]=u[c]+(t[d]/2-r[d]/2);break}}return u}function L0(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=i===void 0?e.placement:i,a=r.strategy,s=a===void 0?e.strategy:a,l=r.boundary,u=l===void 0?MQ:l,c=r.rootBoundary,d=c===void 0?o7:c,p=r.elementContext,v=p===void 0?Qg:p,x=r.altBoundary,b=x===void 0?!1:x,y=r.padding,_=y===void 0?0:y,k=c7(typeof _!="number"?_:d7(_,my)),E=v===Qg?OQ:Qg,O=e.rects.popper,U=e.elements[b?E:v],D=fX(Lf(U)?U:U.contextElement||$d(e.elements.popper),u,d,s),j=Lh(e.elements.reference),F=p7({reference:j,element:O,strategy:"absolute",placement:o}),H=PS(Object.assign({},O,F)),W=v===Qg?H:j,G={top:D.top-W.top+k.top,bottom:W.bottom-D.bottom+k.bottom,left:D.left-W.left+k.left,right:W.right-D.right+k.right},ae=e.modifiersData.offset;if(v===Qg&&ae){var V=ae[o];Object.keys(G).forEach(function(oe){var P=[Tl,Al].indexOf(oe)>=0?1:-1,ee=[Rs,Al].indexOf(oe)>=0?"y":"x";G[oe]+=V[ee]*P})}return G}function pX(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=r.boundary,a=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?a7:u,d=Nh(i),p=d?l?jT:jT.filter(function(b){return Nh(b)===d}):my,v=p.filter(function(b){return c.indexOf(b)>=0});v.length===0&&(v=p);var x=v.reduce(function(b,y){return b[y]=L0(e,{placement:y,boundary:o,rootBoundary:a,padding:s})[Su(y)],b},{});return Object.keys(x).sort(function(b,y){return x[b]-x[y]})}function hX(e){if(Su(e)===x6)return[];var t=c1(e);return[zT(e),t,zT(t)]}function gX(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,d=r.boundary,p=r.rootBoundary,v=r.altBoundary,x=r.flipVariations,b=x===void 0?!0:x,y=r.allowedAutoPlacements,_=t.options.placement,k=Su(_),E=k===_,O=u||(E||!b?[c1(_)]:hX(_)),U=[_].concat(O).reduce(function(Bt,Rt){return Bt.concat(Su(Rt)===x6?pX(t,{placement:Rt,boundary:d,rootBoundary:p,padding:c,flipVariations:b,allowedAutoPlacements:y}):Rt)},[]),D=t.rects.reference,j=t.rects.popper,F=new Map,H=!0,W=U[0],G=0;G=0,ee=P?"width":"height",le=L0(t,{placement:ae,boundary:d,rootBoundary:p,altBoundary:v,padding:c}),pe=P?oe?Tl:Ps:oe?Al:Rs;D[ee]>j[ee]&&(pe=c1(pe));var xe=c1(pe),J=[];if(a&&J.push(le[V]<=0),l&&J.push(le[pe]<=0,le[xe]<=0),J.every(function(Bt){return Bt})){W=ae,H=!1;break}F.set(ae,J)}if(H)for(var ft=b?3:1,Le=function(Rt){var Jt=U.find(function(vr){var At=F.get(vr);if(At)return At.slice(0,Rt).every(function(kt){return kt})});if(Jt)return W=Jt,"break"},He=ft;He>0;He--){var nr=Le(He);if(nr==="break")break}t.placement!==W&&(t.modifiersData[i]._skip=!0,t.placement=W,t.reset=!0)}}const mX={name:"flip",enabled:!0,phase:"main",fn:gX,requiresIfExists:["offset"],data:{_skip:!1}};function WT(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function VT(e){return[Rs,Tl,Al,Ps].some(function(t){return e[t]>=0})}function yX(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=L0(t,{elementContext:"reference"}),l=L0(t,{altBoundary:!0}),u=WT(s,i),c=WT(l,o,a),d=VT(u),p=VT(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const vX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yX};function bX(e,t,r){var i=Su(e),o=[Ps,Rs].indexOf(i)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],l=a[1];return s=s||0,l=(l||0)*o,[Ps,Tl].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function wX(e){var t=e.state,r=e.options,i=e.name,o=r.offset,a=o===void 0?[0,0]:o,s=a7.reduce(function(d,p){return d[p]=bX(p,t.rects,a),d},{}),l=s[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}const xX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wX};function _X(e){var t=e.state,r=e.name;t.modifiersData[r]=p7({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const SX={name:"popperOffsets",enabled:!0,phase:"read",fn:_X,data:{}};function CX(e){return e==="x"?"y":"x"}function kX(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,p=r.padding,v=r.tether,x=v===void 0?!0:v,b=r.tetherOffset,y=b===void 0?0:b,_=L0(t,{boundary:u,rootBoundary:c,padding:p,altBoundary:d}),k=Su(t.placement),E=Nh(t.placement),O=!E,U=C6(k),D=CX(U),j=t.modifiersData.popperOffsets,F=t.rects.reference,H=t.rects.popper,W=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,G=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),ae=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(!!j){if(a){var oe,P=U==="y"?Rs:Ps,ee=U==="y"?Al:Tl,le=U==="y"?"height":"width",pe=j[U],xe=pe+_[P],J=pe-_[ee],ft=x?-H[le]/2:0,Le=E===Uh?F[le]:H[le],He=E===Uh?-H[le]:-F[le],nr=t.elements.arrow,Bt=x&&nr?S6(nr):{width:0,height:0},Rt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u7(),Jt=Rt[P],vr=Rt[ee],At=Jm(0,F[le],Bt[le]),kt=O?F[le]/2-ft-At-Jt-G.mainAxis:Le-At-Jt-G.mainAxis,Ct=O?-F[le]/2+ft+At+vr+G.mainAxis:He+At+vr+G.mainAxis,Lt=t.elements.arrow&&yy(t.elements.arrow),Kt=Lt?U==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,yr=(oe=ae?.[U])!=null?oe:0,ne=pe+kt-yr-Kt,Mt=pe+Ct-yr,Nt=Jm(x?eb(xe,ne):xe,pe,x?kf(J,Mt):J);j[U]=Nt,V[U]=Nt-pe}if(l){var Ie,Ae=U==="x"?Rs:Ps,fe=U==="x"?Al:Tl,Be=j[D],rt=D==="y"?"height":"width",lt=Be+_[Ae],jt=Be-_[fe],ce=[Rs,Ps].indexOf(k)!==-1,ie=(Ie=ae?.[D])!=null?Ie:0,de=ce?lt:Be-F[rt]-H[rt]-ie+G.altAxis,$=ce?Be+F[rt]+H[rt]-ie-G.altAxis:jt,C=x&&ce?YQ(de,Be,$):Jm(x?de:lt,Be,x?$:jt);j[D]=C,V[D]=C-Be}t.modifiersData[i]=V}}const EX={name:"preventOverflow",enabled:!0,phase:"main",fn:kX,requiresIfExists:["offset"]};function AX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function TX(e){return e===Rl(e)||!xl(e)?k6(e):AX(e)}function IX(e){var t=e.getBoundingClientRect(),r=Dh(t.width)/e.offsetWidth||1,i=Dh(t.height)/e.offsetHeight||1;return r!==1||i!==1}function RX(e,t,r){r===void 0&&(r=!1);var i=xl(t),o=xl(t)&&IX(t),a=$d(t),s=Lh(e,o,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&((Mu(t)!=="body"||A6(a))&&(l=TX(t)),xl(t)?(u=Lh(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=E6(a))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function PX(e){var t=new Map,r=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function o(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&o(u)}}),i.push(a)}return e.forEach(function(a){r.has(a.name)||o(a)}),i}function MX(e){var t=PX(e);return HQ.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}function OX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function BX(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var qT={placement:"bottom",modifiers:[],strategy:"absolute"};function KT(){for(var e=arguments.length,t=new Array(e),r=0;r{a||l(NX(o)||document.body)},[o,a]),Yl(()=>{if(s&&!a)return Z1(r,s),()=>{Z1(r,null)}},[r,s,a]),a){if(X.exports.isValidElement(i)){const c={ref:u};return X.exports.cloneElement(i,c)}return L(X.exports.Fragment,{children:i})}return L(X.exports.Fragment,{children:s&&ml.exports.createPortal(i,s)})}),h7=jX;function $X(e){return di("MuiPopperUnstyled",e)}ri("MuiPopperUnstyled",["root"]);const FX=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],zX=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function HX(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function MS(e){return typeof e=="function"?e():e}function WX(e){return e.nodeType!==void 0}const VX=()=>hi({root:["root"]},$X,{}),qX={},KX=X.exports.forwardRef(function(t,r){var i;const{anchorEl:o,children:a,component:s,direction:l,disablePortal:u,modifiers:c,open:d,ownerState:p,placement:v,popperOptions:x,popperRef:b,slotProps:y={},slots:_={},TransitionProps:k}=t,E=bn(t,FX),O=X.exports.useRef(null),U=Vo(O,r),D=X.exports.useRef(null),j=Vo(D,b),F=X.exports.useRef(j);Yl(()=>{F.current=j},[j]),X.exports.useImperativeHandle(b,()=>D.current,[]);const H=HX(v,l),[W,G]=X.exports.useState(H),[ae,V]=X.exports.useState(MS(o));X.exports.useEffect(()=>{D.current&&D.current.forceUpdate()}),X.exports.useEffect(()=>{o&&V(MS(o))},[o]),Yl(()=>{if(!ae||!d)return;const pe=ft=>{G(ft.placement)};let xe=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:ft})=>{pe(ft)}}];c!=null&&(xe=xe.concat(c)),x&&x.modifiers!=null&&(xe=xe.concat(x.modifiers));const J=LX(ae,O.current,De({placement:H},x,{modifiers:xe}));return F.current(J),()=>{J.destroy(),F.current(null)}},[ae,u,c,d,x,H]);const oe={placement:W};k!==null&&(oe.TransitionProps=k);const P=VX(),ee=(i=s??_.root)!=null?i:"div",le=IS({elementType:ee,externalSlotProps:y.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:U},ownerState:De({},t,p),className:P.root});return L(ee,De({},le,{children:typeof a=="function"?a(oe):a}))}),GX=X.exports.forwardRef(function(t,r){const{anchorEl:i,children:o,container:a,direction:s="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:p="bottom",popperOptions:v=qX,popperRef:x,style:b,transition:y=!1,slotProps:_={},slots:k={}}=t,E=bn(t,zX),[O,U]=X.exports.useState(!0),D=()=>{U(!1)},j=()=>{U(!0)};if(!u&&!d&&(!y||O))return null;let F;if(a)F=a;else if(i){const G=MS(i);F=G&&WX(G)?ya(G).body:ya(null).body}const H=!d&&u&&(!y||O)?"none":void 0,W=y?{in:d,onEnter:D,onExited:j}:void 0;return L(h7,{disablePortal:l,container:F,children:L(KX,De({anchorEl:i,direction:s,disablePortal:l,modifiers:c,ref:r,open:y?!O:d,placement:p,popperOptions:v,popperRef:x,slotProps:_,slots:k},E,{style:De({position:"fixed",top:0,left:0,display:H},b),TransitionProps:W,children:o}))})}),YX=GX;function ZX(e){const t=ya(e);return t.body===e?El(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function t0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function GT(e){return parseInt(El(e).getComputedStyle(e).paddingRight,10)||0}function QX(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||i}function YT(e,t,r,i,o){const a=[t,r,...i];[].forEach.call(e.children,s=>{const l=a.indexOf(s)===-1,u=!QX(s);l&&u&&t0(s,o)})}function V_(e,t){let r=-1;return e.some((i,o)=>t(i)?(r=o,!0):!1),r}function XX(e,t){const r=[],i=e.container;if(!t.disableScrollLock){if(ZX(i)){const s=EU(ya(i));r.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${GT(i)+s}px`;const l=ya(i).querySelectorAll(".mui-fixed");[].forEach.call(l,u=>{r.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${GT(u)+s}px`})}let a;if(i.parentNode instanceof DocumentFragment)a=ya(i).body;else{const s=i.parentElement,l=El(i);a=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:i}r.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{r.forEach(({value:a,el:s,property:l})=>{a?s.style.setProperty(l,a):s.style.removeProperty(l)})}}function JX(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class eJ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&t0(t.modalRef,!1);const o=JX(r);YT(r,t.mount,t.modalRef,o,!0);const a=V_(this.containers,s=>s.container===r);return a!==-1?(this.containers[a].modals.push(t),i):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),i)}mount(t,r){const i=V_(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[i];o.restore||(o.restore=XX(o,r))}remove(t,r=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const o=V_(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(i,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&t0(t.modalRef,r),YT(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&t0(s.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function tJ(e){return di("MuiModal",e)}ri("MuiModal",["root","hidden"]);const rJ=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],nJ=e=>{const{open:t,exited:r,classes:i}=e;return hi({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},tJ,i)};function iJ(e){return typeof e=="function"?e():e}function oJ(e){return e?e.props.hasOwnProperty("in"):!1}const aJ=new eJ,sJ=X.exports.forwardRef(function(t,r){var i,o;const{children:a,classes:s,closeAfterTransition:l=!1,component:u,container:c,disableAutoFocus:d=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:b=!1,disableScrollLock:y=!1,hideBackdrop:_=!1,keepMounted:k=!1,manager:E=aJ,onBackdropClick:O,onClose:U,onKeyDown:D,open:j,onTransitionEnter:F,onTransitionExited:H,slotProps:W={},slots:G={}}=t,ae=bn(t,rJ),[V,oe]=X.exports.useState(!j),P=X.exports.useRef({}),ee=X.exports.useRef(null),le=X.exports.useRef(null),pe=Vo(le,r),xe=oJ(a),J=(i=t["aria-hidden"])!=null?i:!0,ft=()=>ya(ee.current),Le=()=>(P.current.modalRef=le.current,P.current.mountNode=ee.current,P.current),He=()=>{E.mount(Le(),{disableScrollLock:y}),le.current&&(le.current.scrollTop=0)},nr=bl(()=>{const Ae=iJ(c)||ft().body;E.add(Le(),Ae),le.current&&He()}),Bt=X.exports.useCallback(()=>E.isTopModal(Le()),[E]),Rt=bl(Ae=>{ee.current=Ae,!(!Ae||!le.current)&&(j&&Bt()?He():t0(le.current,J))}),Jt=X.exports.useCallback(()=>{E.remove(Le(),J)},[E,J]);X.exports.useEffect(()=>()=>{Jt()},[Jt]),X.exports.useEffect(()=>{j?nr():(!xe||!l)&&Jt()},[j,Jt,xe,l,nr]);const vr=De({},t,{classes:s,closeAfterTransition:l,disableAutoFocus:d,disableEnforceFocus:p,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:b,disableScrollLock:y,exited:V,hideBackdrop:_,keepMounted:k}),At=nJ(vr),kt=()=>{oe(!1),F&&F()},Ct=()=>{oe(!0),H&&H(),l&&Jt()},Lt=Ae=>{Ae.target===Ae.currentTarget&&(O&&O(Ae),U&&U(Ae,"backdropClick"))},Kt=Ae=>{D&&D(Ae),!(Ae.key!=="Escape"||!Bt())&&(v||(Ae.stopPropagation(),U&&U(Ae,"escapeKeyDown")))},yr={};a.props.tabIndex===void 0&&(yr.tabIndex="-1"),xe&&(yr.onEnter=_S(kt,a.props.onEnter),yr.onExited=_S(Ct,a.props.onExited));const ne=(o=u??G.root)!=null?o:"div",Mt=IS({elementType:ne,externalSlotProps:W.root,externalForwardedProps:ae,additionalProps:{ref:pe,role:"presentation",onKeyDown:Kt},className:At.root,ownerState:vr}),Nt=G.backdrop,Ie=IS({elementType:Nt,externalSlotProps:W.backdrop,additionalProps:{"aria-hidden":!0,onClick:Lt,open:j},className:At.backdrop,ownerState:vr});return!k&&!j&&(!xe||V)?null:L(h7,{ref:Rt,container:c,disablePortal:x,children:Ut(ne,De({},Mt,{children:[!_&&Nt?L(Nt,De({},Ie)):null,L(PQ,{disableEnforceFocus:p,disableAutoFocus:d,disableRestoreFocus:b,isEnabled:Bt,open:j,children:X.exports.cloneElement(a,yr)})]}))})}),lJ=sJ,uJ=["onChange","maxRows","minRows","style","value"];function xv(e,t){return parseInt(e[t],10)||0}const cJ={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ZT(e){return e==null||Object.keys(e).length===0}const dJ=X.exports.forwardRef(function(t,r){const{onChange:i,maxRows:o,minRows:a=1,style:s,value:l}=t,u=bn(t,uJ),{current:c}=X.exports.useRef(l!=null),d=X.exports.useRef(null),p=Vo(r,d),v=X.exports.useRef(null),x=X.exports.useRef(0),[b,y]=X.exports.useState({}),_=X.exports.useCallback(()=>{const D=d.current,F=El(D).getComputedStyle(D);if(F.width==="0px")return{};const H=v.current;H.style.width=F.width,H.value=D.value||t.placeholder||"x",H.value.slice(-1)===` +`&&(H.value+=" ");const W=F["box-sizing"],G=xv(F,"padding-bottom")+xv(F,"padding-top"),ae=xv(F,"border-bottom-width")+xv(F,"border-top-width"),V=H.scrollHeight;H.value="x";const oe=H.scrollHeight;let P=V;a&&(P=Math.max(Number(a)*oe,P)),o&&(P=Math.min(Number(o)*oe,P)),P=Math.max(P,oe);const ee=P+(W==="border-box"?G+ae:0),le=Math.abs(P-V)<=1;return{outerHeightStyle:ee,overflow:le}},[o,a,t.placeholder]),k=(D,j)=>{const{outerHeightStyle:F,overflow:H}=j;return x.current<20&&(F>0&&Math.abs((D.outerHeightStyle||0)-F)>1||D.overflow!==H)?(x.current+=1,{overflow:H,outerHeightStyle:F}):D},E=X.exports.useCallback(()=>{const D=_();ZT(D)||y(j=>k(j,D))},[_]),O=()=>{const D=_();ZT(D)||ml.exports.flushSync(()=>{y(j=>k(j,D))})};X.exports.useEffect(()=>{const D=Uf(()=>{x.current=0,d.current&&O()}),j=El(d.current);j.addEventListener("resize",D);let F;return typeof ResizeObserver<"u"&&(F=new ResizeObserver(D),F.observe(d.current)),()=>{D.clear(),j.removeEventListener("resize",D),F&&F.disconnect()}}),Yl(()=>{E()}),X.exports.useEffect(()=>{x.current=0},[l]);const U=D=>{x.current=0,c||E(),i&&i(D)};return Ut(X.exports.Fragment,{children:[L("textarea",De({value:l,onChange:U,ref:p,rows:a,style:De({height:b.outerHeightStyle,overflow:b.overflow?"hidden":null},s)},u)),L("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:v,tabIndex:-1,style:De({},cJ.shadow,s,{padding:0})})]})}),fJ=dJ;function pJ(e){return di("MuiSvgIcon",e)}ri("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const hJ=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],gJ=e=>{const{color:t,fontSize:r,classes:i}=e,o={root:["root",t!=="inherit"&&`color${Zr(t)}`,`fontSize${Zr(r)}`]};return hi(o,pJ,i)},mJ=sr("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Zr(r.color)}`],t[`fontSize${Zr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,i,o,a,s,l,u,c,d,p,v,x,b,y,_,k,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(i=r.create)==null?void 0:i.call(r,"fill",{duration:(o=e.transitions)==null||(a=o.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,24))||"1.5rem",large:((d=e.typography)==null||(p=d.pxToRem)==null?void 0:p.call(d,35))||"2.1875rem"}[t.fontSize],color:(v=(x=(e.vars||e).palette)==null||(b=x[t.color])==null?void 0:b.main)!=null?v:{action:(y=(e.vars||e).palette)==null||(_=y.action)==null?void 0:_.active,disabled:(k=(e.vars||e).palette)==null||(E=k.action)==null?void 0:E.disabled,inherit:void 0}[t.color]}}),g7=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:p,viewBox:v="0 0 24 24"}=i,x=bn(i,hJ),b=De({},i,{color:s,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:v}),y={};d||(y.viewBox=v);const _=gJ(b);return Ut(mJ,De({as:l,className:pn(_.root,a),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r},y,x,{ownerState:b,children:[o,p?L("title",{children:p}):null]}))});g7.muiName="SvgIcon";const jh=g7;function Nu(e,t){function r(i,o){return L(jh,De({"data-testid":`${t}Icon`,ref:o},i,{children:e}))}return r.muiName=jh.muiName,X.exports.memo(X.exports.forwardRef(r))}const yJ={configure:e=>{t6.configure(e)}},vJ=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:yJ,capitalize:Zr,createChainedFunction:_S,createSvgIcon:Nu,debounce:Uf,deprecatedPropType:QK,isMuiElement:a1,ownerDocument:ya,ownerWindow:El,requirePropFactory:XK,setRef:Z1,unstable_useEnhancedEffect:Yl,unstable_useId:Iw,unsupportedProp:tG,useControlled:R0,useEventCallback:bl,useForkRef:Vo,useIsFocusVisible:Pw},Symbol.toStringTag,{value:"Module"}));function OS(e,t){return OS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},OS(e,t)}function m7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,OS(e,t)}const QT={disabled:!1},tb=Gn.createContext(null);var bJ=function(t){return t.scrollTop},Dm="unmounted",sf="exited",lf="entering",Wp="entered",BS="exiting",Ec=function(e){m7(t,e);function t(i,o){var a;a=e.call(this,i,o)||this;var s=o,l=s&&!s.isMounting?i.enter:i.appear,u;return a.appearStatus=null,i.in?l?(u=sf,a.appearStatus=lf):u=Wp:i.unmountOnExit||i.mountOnEnter?u=Dm:u=sf,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var s=o.in;return s&&a.status===Dm?{status:sf}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var a=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==lf&&s!==Wp&&(a=lf):(s===lf||s===Wp)&&(a=BS)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,a,s,l;return a=s=l=o,o!=null&&typeof o!="number"&&(a=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:a,enter:s,appear:l}},r.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===lf){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:vv.findDOMNode(this);s&&bJ(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sf&&this.setState({status:Dm})},r.performEnter=function(o){var a=this,s=this.props.enter,l=this.context?this.context.isMounting:o,u=this.props.nodeRef?[l]:[vv.findDOMNode(this),l],c=u[0],d=u[1],p=this.getTimeouts(),v=l?p.appear:p.enter;if(!o&&!s||QT.disabled){this.safeSetState({status:Wp},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:lf},function(){a.props.onEntering(c,d),a.onTransitionEnd(v,function(){a.safeSetState({status:Wp},function(){a.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,a=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:vv.findDOMNode(this);if(!a||QT.disabled){this.safeSetState({status:sf},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:BS},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:sf},function(){o.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},r.setNextCallback=function(o){var a=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:vv.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Dm)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=bn(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L(tb.Provider,{value:null,children:typeof s=="function"?s(o,l):Gn.cloneElement(Gn.Children.only(s),l)})},t}(Gn.Component);Ec.contextType=tb;Ec.propTypes={};function Bp(){}Ec.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bp,onEntering:Bp,onEntered:Bp,onExit:Bp,onExiting:Bp,onExited:Bp};Ec.UNMOUNTED=Dm;Ec.EXITED=sf;Ec.ENTERING=lf;Ec.ENTERED=Wp;Ec.EXITING=BS;const n2=Ec;function wJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T6(e,t){var r=function(a){return t&&X.exports.isValidElement(a)?t(a):a},i=Object.create(null);return e&&X.exports.Children.map(e,function(o){return o}).forEach(function(o){i[o.key]=r(o)}),i}function xJ(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s,l={};for(var u in t){if(i[u])for(s=0;se.scrollTop;function Ed(e,t){var r,i;const{timeout:o,easing:a,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(i=s.transitionTimingFunction)!=null?i:typeof a=="object"?a[t.mode]:a,delay:s.transitionDelay}}function AJ(e){return di("MuiCollapse",e)}ri("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const TJ=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],IJ=e=>{const{orientation:t,classes:r}=e,i={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return hi(i,AJ,r)},RJ=sr("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.state==="entered"&&t.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>De({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&De({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),PJ=sr("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>De({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),MJ=sr("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>De({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),y7=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiCollapse"}),{addEndListener:o,children:a,className:s,collapsedSize:l="0px",component:u,easing:c,in:d,onEnter:p,onEntered:v,onEntering:x,onExit:b,onExited:y,onExiting:_,orientation:k="vertical",style:E,timeout:O=i7.standard,TransitionComponent:U=n2}=i,D=bn(i,TJ),j=De({},i,{orientation:k,collapsedSize:l}),F=IJ(j),H=la(),W=X.exports.useRef(),G=X.exports.useRef(null),ae=X.exports.useRef(),V=typeof l=="number"?`${l}px`:l,oe=k==="horizontal",P=oe?"width":"height";X.exports.useEffect(()=>()=>{clearTimeout(W.current)},[]);const ee=X.exports.useRef(null),le=Vo(r,ee),pe=Jt=>vr=>{if(Jt){const At=ee.current;vr===void 0?Jt(At):Jt(At,vr)}},xe=()=>G.current?G.current[oe?"clientWidth":"clientHeight"]:0,J=pe((Jt,vr)=>{G.current&&oe&&(G.current.style.position="absolute"),Jt.style[P]=V,p&&p(Jt,vr)}),ft=pe((Jt,vr)=>{const At=xe();G.current&&oe&&(G.current.style.position="");const{duration:kt,easing:Ct}=Ed({style:E,timeout:O,easing:c},{mode:"enter"});if(O==="auto"){const Lt=H.transitions.getAutoHeightDuration(At);Jt.style.transitionDuration=`${Lt}ms`,ae.current=Lt}else Jt.style.transitionDuration=typeof kt=="string"?kt:`${kt}ms`;Jt.style[P]=`${At}px`,Jt.style.transitionTimingFunction=Ct,x&&x(Jt,vr)}),Le=pe((Jt,vr)=>{Jt.style[P]="auto",v&&v(Jt,vr)}),He=pe(Jt=>{Jt.style[P]=`${xe()}px`,b&&b(Jt)}),nr=pe(y),Bt=pe(Jt=>{const vr=xe(),{duration:At,easing:kt}=Ed({style:E,timeout:O,easing:c},{mode:"exit"});if(O==="auto"){const Ct=H.transitions.getAutoHeightDuration(vr);Jt.style.transitionDuration=`${Ct}ms`,ae.current=Ct}else Jt.style.transitionDuration=typeof At=="string"?At:`${At}ms`;Jt.style[P]=V,Jt.style.transitionTimingFunction=kt,_&&_(Jt)});return L(U,De({in:d,onEnter:J,onEntered:Le,onEntering:ft,onExit:He,onExited:nr,onExiting:Bt,addEndListener:Jt=>{O==="auto"&&(W.current=setTimeout(Jt,ae.current||0)),o&&o(ee.current,Jt)},nodeRef:ee,timeout:O==="auto"?null:O},D,{children:(Jt,vr)=>L(RJ,De({as:u,className:pn(F.root,s,{entered:F.entered,exited:!d&&V==="0px"&&F.hidden}[Jt]),style:De({[oe?"minWidth":"minHeight"]:V},E),ownerState:De({},j,{state:Jt}),ref:le},vr,{children:L(PJ,{ownerState:De({},j,{state:Jt}),className:F.wrapper,ref:G,children:L(MJ,{ownerState:De({},j,{state:Jt}),className:F.wrapperInner,children:a})})}))}))});y7.muiSupportAuto=!0;const OJ=y7;function BJ(e){return di("MuiPaper",e)}ri("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const UJ=["className","component","elevation","square","variant"],DJ=e=>{const{square:t,elevation:r,variant:i,classes:o}=e,a={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${r}`]};return hi(a,BJ,o)},LJ=sr("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return De({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&De({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Qi("#fff",DT(t.elevation))}, ${Qi("#fff",DT(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),NJ=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiPaper"}),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:u="elevation"}=i,c=bn(i,UJ),d=De({},i,{component:a,elevation:s,square:l,variant:u}),p=DJ(d);return L(LJ,De({as:a,ownerState:d,className:pn(p.root,o),ref:r},c))}),ag=NJ;function jJ(e){const{className:t,classes:r,pulsate:i=!1,rippleX:o,rippleY:a,rippleSize:s,in:l,onExited:u,timeout:c}=e,[d,p]=X.exports.useState(!1),v=pn(t,r.ripple,r.rippleVisible,i&&r.ripplePulsate),x={width:s,height:s,top:-(s/2)+a,left:-(s/2)+o},b=pn(r.child,d&&r.childLeaving,i&&r.childPulsate);return!l&&!d&&p(!0),X.exports.useEffect(()=>{if(!l&&u!=null){const y=setTimeout(u,c);return()=>{clearTimeout(y)}}},[u,l,c]),L("span",{className:v,style:x,children:L("span",{className:b})})}const $J=ri("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fl=$J,FJ=["center","classes","className"];let i2=e=>e,XT,JT,eI,tI;const US=550,zJ=80,HJ=pp(XT||(XT=i2` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),WJ=pp(JT||(JT=i2` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),VJ=pp(eI||(eI=i2` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),qJ=sr("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),KJ=sr(jJ,{name:"MuiTouchRipple",slot:"Ripple"})(tI||(tI=i2` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),fl.rippleVisible,HJ,US,({theme:e})=>e.transitions.easing.easeInOut,fl.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,fl.child,fl.childLeaving,WJ,US,({theme:e})=>e.transitions.easing.easeInOut,fl.childPulsate,VJ,({theme:e})=>e.transitions.easing.easeInOut),GJ=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:a={},className:s}=i,l=bn(i,FJ),[u,c]=X.exports.useState([]),d=X.exports.useRef(0),p=X.exports.useRef(null);X.exports.useEffect(()=>{p.current&&(p.current(),p.current=null)},[u]);const v=X.exports.useRef(!1),x=X.exports.useRef(null),b=X.exports.useRef(null),y=X.exports.useRef(null);X.exports.useEffect(()=>()=>{clearTimeout(x.current)},[]);const _=X.exports.useCallback(U=>{const{pulsate:D,rippleX:j,rippleY:F,rippleSize:H,cb:W}=U;c(G=>[...G,L(KJ,{classes:{ripple:pn(a.ripple,fl.ripple),rippleVisible:pn(a.rippleVisible,fl.rippleVisible),ripplePulsate:pn(a.ripplePulsate,fl.ripplePulsate),child:pn(a.child,fl.child),childLeaving:pn(a.childLeaving,fl.childLeaving),childPulsate:pn(a.childPulsate,fl.childPulsate)},timeout:US,pulsate:D,rippleX:j,rippleY:F,rippleSize:H},d.current)]),d.current+=1,p.current=W},[a]),k=X.exports.useCallback((U={},D={},j=()=>{})=>{const{pulsate:F=!1,center:H=o||D.pulsate,fakeElement:W=!1}=D;if(U?.type==="mousedown"&&v.current){v.current=!1;return}U?.type==="touchstart"&&(v.current=!0);const G=W?null:y.current,ae=G?G.getBoundingClientRect():{width:0,height:0,left:0,top:0};let V,oe,P;if(H||U===void 0||U.clientX===0&&U.clientY===0||!U.clientX&&!U.touches)V=Math.round(ae.width/2),oe=Math.round(ae.height/2);else{const{clientX:ee,clientY:le}=U.touches&&U.touches.length>0?U.touches[0]:U;V=Math.round(ee-ae.left),oe=Math.round(le-ae.top)}if(H)P=Math.sqrt((2*ae.width**2+ae.height**2)/3),P%2===0&&(P+=1);else{const ee=Math.max(Math.abs((G?G.clientWidth:0)-V),V)*2+2,le=Math.max(Math.abs((G?G.clientHeight:0)-oe),oe)*2+2;P=Math.sqrt(ee**2+le**2)}U!=null&&U.touches?b.current===null&&(b.current=()=>{_({pulsate:F,rippleX:V,rippleY:oe,rippleSize:P,cb:j})},x.current=setTimeout(()=>{b.current&&(b.current(),b.current=null)},zJ)):_({pulsate:F,rippleX:V,rippleY:oe,rippleSize:P,cb:j})},[o,_]),E=X.exports.useCallback(()=>{k({},{pulsate:!0})},[k]),O=X.exports.useCallback((U,D)=>{if(clearTimeout(x.current),U?.type==="touchend"&&b.current){b.current(),b.current=null,x.current=setTimeout(()=>{O(U,D)});return}b.current=null,c(j=>j.length>0?j.slice(1):j),p.current=D},[]);return X.exports.useImperativeHandle(r,()=>({pulsate:E,start:k,stop:O}),[E,k,O]),L(qJ,De({className:pn(fl.root,a.root,s),ref:y},l,{children:L(EJ,{component:null,exit:!0,children:u})}))}),YJ=GJ;function ZJ(e){return di("MuiButtonBase",e)}const QJ=ri("MuiButtonBase",["root","disabled","focusVisible"]),XJ=QJ,JJ=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],eee=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:i,classes:o}=e,s=hi({root:["root",t&&"disabled",r&&"focusVisible"]},ZJ,o);return r&&i&&(s.root+=` ${i}`),s},tee=sr("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${XJ.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ree=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:a=!1,children:s,className:l,component:u="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:p=!1,focusRipple:v=!1,LinkComponent:x="a",onBlur:b,onClick:y,onContextMenu:_,onDragLeave:k,onFocus:E,onFocusVisible:O,onKeyDown:U,onKeyUp:D,onMouseDown:j,onMouseLeave:F,onMouseUp:H,onTouchEnd:W,onTouchMove:G,onTouchStart:ae,tabIndex:V=0,TouchRippleProps:oe,touchRippleRef:P,type:ee}=i,le=bn(i,JJ),pe=X.exports.useRef(null),xe=X.exports.useRef(null),J=Vo(xe,P),{isFocusVisibleRef:ft,onFocus:Le,onBlur:He,ref:nr}=Pw(),[Bt,Rt]=X.exports.useState(!1);c&&Bt&&Rt(!1),X.exports.useImperativeHandle(o,()=>({focusVisible:()=>{Rt(!0),pe.current.focus()}}),[]);const[Jt,vr]=X.exports.useState(!1);X.exports.useEffect(()=>{vr(!0)},[]);const At=Jt&&!d&&!c;X.exports.useEffect(()=>{Bt&&v&&!d&&Jt&&xe.current.pulsate()},[d,v,Bt,Jt]);function kt(T,Z,ve=p){return bl(je=>(Z&&Z(je),!ve&&xe.current&&xe.current[T](je),!0))}const Ct=kt("start",j),Lt=kt("stop",_),Kt=kt("stop",k),yr=kt("stop",H),ne=kt("stop",T=>{Bt&&T.preventDefault(),F&&F(T)}),Mt=kt("start",ae),Nt=kt("stop",W),Ie=kt("stop",G),Ae=kt("stop",T=>{He(T),ft.current===!1&&Rt(!1),b&&b(T)},!1),fe=bl(T=>{pe.current||(pe.current=T.currentTarget),Le(T),ft.current===!0&&(Rt(!0),O&&O(T)),E&&E(T)}),Be=()=>{const T=pe.current;return u&&u!=="button"&&!(T.tagName==="A"&&T.href)},rt=X.exports.useRef(!1),lt=bl(T=>{v&&!rt.current&&Bt&&xe.current&&T.key===" "&&(rt.current=!0,xe.current.stop(T,()=>{xe.current.start(T)})),T.target===T.currentTarget&&Be()&&T.key===" "&&T.preventDefault(),U&&U(T),T.target===T.currentTarget&&Be()&&T.key==="Enter"&&!c&&(T.preventDefault(),y&&y(T))}),jt=bl(T=>{v&&T.key===" "&&xe.current&&Bt&&!T.defaultPrevented&&(rt.current=!1,xe.current.stop(T,()=>{xe.current.pulsate(T)})),D&&D(T),y&&T.target===T.currentTarget&&Be()&&T.key===" "&&!T.defaultPrevented&&y(T)});let ce=u;ce==="button"&&(le.href||le.to)&&(ce=x);const ie={};ce==="button"?(ie.type=ee===void 0?"button":ee,ie.disabled=c):(!le.href&&!le.to&&(ie.role="button"),c&&(ie["aria-disabled"]=c));const de=Vo(r,nr,pe),$=De({},i,{centerRipple:a,component:u,disabled:c,disableRipple:d,disableTouchRipple:p,focusRipple:v,tabIndex:V,focusVisible:Bt}),C=eee($);return Ut(tee,De({as:ce,className:pn(C.root,l),ownerState:$,onBlur:Ae,onClick:y,onContextMenu:Lt,onFocus:fe,onKeyDown:lt,onKeyUp:jt,onMouseDown:Ct,onMouseLeave:ne,onMouseUp:yr,onDragLeave:Kt,onTouchEnd:Nt,onTouchMove:Ie,onTouchStart:Mt,ref:de,tabIndex:c?-1:V,type:ee},ie,le,{children:[s,At?L(YJ,De({ref:J,center:a},oe)):null]}))}),Ad=ree;function nee(e){return di("MuiAlert",e)}const iee=ri("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),rI=iee;function oee(e){return di("MuiIconButton",e)}const aee=ri("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),see=aee,lee=["edge","children","className","color","disabled","disableFocusRipple","size"],uee=e=>{const{classes:t,disabled:r,color:i,edge:o,size:a}=e,s={root:["root",r&&"disabled",i!=="default"&&`color${Zr(i)}`,o&&`edge${Zr(o)}`,`size${Zr(a)}`]};return hi(s,oee,t)},cee=sr(Ad,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${Zr(r.color)}`],r.edge&&t[`edge${Zr(r.edge)}`],t[`size${Zr(r.size)}`]]}})(({theme:e,ownerState:t})=>De({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const i=(r=(e.vars||e).palette)==null?void 0:r[t.color];return De({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&De({color:i?.main},!t.disableRipple&&{"&:hover":De({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${see.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),dee=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiIconButton"}),{edge:o=!1,children:a,className:s,color:l="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium"}=i,p=bn(i,lee),v=De({},i,{edge:o,color:l,disabled:u,disableFocusRipple:c,size:d}),x=uee(v);return L(cee,De({className:pn(x.root,s),centerRipple:!0,focusRipple:!c,disabled:u,ref:r,ownerState:v},p,{children:a}))}),Bs=dee,fee=Nu(L("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),pee=Nu(L("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),hee=Nu(L("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),gee=Nu(L("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),mee=Nu(L("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),yee=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],vee=e=>{const{variant:t,color:r,severity:i,classes:o}=e,a={root:["root",`${t}${Zr(r||i)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return hi(a,nee,o)},bee=sr(ag,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Zr(r.color||r.severity)}`]]}})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?Oh:Bh,i=e.palette.mode==="light"?Bh:Oh,o=t.color||t.severity;return De({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},o&&t.variant==="standard"&&{color:e.vars?e.vars.palette.Alert[`${o}Color`]:r(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${o}StandardBg`]:i(e.palette[o].light,.9),[`& .${rI.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}},o&&t.variant==="outlined"&&{color:e.vars?e.vars.palette.Alert[`${o}Color`]:r(e.palette[o].light,.6),border:`1px solid ${(e.vars||e).palette[o].light}`,[`& .${rI.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}},o&&t.variant==="filled"&&De({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${o}FilledColor`],backgroundColor:e.vars.palette.Alert[`${o}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[o].dark:e.palette[o].main,color:e.palette.getContrastText(e.palette[o].main)}))}),wee=sr("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),xee=sr("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),nI=sr("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),iI={success:L(fee,{fontSize:"inherit"}),warning:L(pee,{fontSize:"inherit"}),error:L(hee,{fontSize:"inherit"}),info:L(gee,{fontSize:"inherit"})},_ee=X.exports.forwardRef(function(t,r){var i,o,a,s,l,u;const c=gi({props:t,name:"MuiAlert"}),{action:d,children:p,className:v,closeText:x="Close",color:b,components:y={},componentsProps:_={},icon:k,iconMapping:E=iI,onClose:O,role:U="alert",severity:D="success",slotProps:j={},slots:F={},variant:H="standard"}=c,W=bn(c,yee),G=De({},c,{color:b,severity:D,variant:H}),ae=vee(G),V=(i=(o=F.closeButton)!=null?o:y.CloseButton)!=null?i:Bs,oe=(a=(s=F.closeIcon)!=null?s:y.CloseIcon)!=null?a:mee,P=(l=j.closeButton)!=null?l:_.closeButton,ee=(u=j.closeIcon)!=null?u:_.closeIcon;return Ut(bee,De({role:U,elevation:0,ownerState:G,className:pn(ae.root,v),ref:r},W,{children:[k!==!1?L(wee,{ownerState:G,className:ae.icon,children:k||E[D]||iI[D]}):null,L(xee,{ownerState:G,className:ae.message,children:p}),d!=null?L(nI,{ownerState:G,className:ae.action,children:d}):null,d==null&&O?L(nI,{ownerState:G,className:ae.action,children:L(V,De({size:"small","aria-label":x,title:x,color:"inherit",onClick:O},P,{children:L(oe,De({fontSize:"small"},ee))}))}):null]}))}),d1=_ee;function See(e){return di("MuiTypography",e)}ri("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Cee=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],kee=e=>{const{align:t,gutterBottom:r,noWrap:i,paragraph:o,variant:a,classes:s}=e,l={root:["root",a,e.align!=="inherit"&&`align${Zr(t)}`,r&&"gutterBottom",i&&"noWrap",o&&"paragraph"]};return hi(l,See,s)},Eee=sr("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Zr(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>De({margin:0},t.variant&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),oI={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Aee={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Tee=e=>Aee[e]||e,Iee=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTypography"}),o=Tee(i.color),a=Xw(De({},i,{color:o})),{align:s="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:d=!1,paragraph:p=!1,variant:v="body1",variantMapping:x=oI}=a,b=bn(a,Cee),y=De({},a,{align:s,color:o,className:l,component:u,gutterBottom:c,noWrap:d,paragraph:p,variant:v,variantMapping:x}),_=u||(p?"p":x[v]||oI[v])||"span",k=kee(y);return L(Eee,De({as:_,ref:r,ownerState:y,className:pn(k.root,l)},b))}),jo=Iee,Ree=["components","componentsProps","slots","slotProps"],Pee=sr(YX,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Mee=X.exports.forwardRef(function(t,r){var i;const o=m6(),a=gi({props:t,name:"MuiPopper"}),{components:s,componentsProps:l,slots:u,slotProps:c}=a,d=bn(a,Ree),p=(i=u?.root)!=null?i:s?.Root;return L(Pee,De({direction:o?.direction,slots:{root:p},slotProps:c??l},d,{ref:r}))}),v7=Mee,Oee=Nu(L("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Bee(e){return di("MuiChip",e)}const Uee=ri("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Zi=Uee,Dee=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Lee=e=>{const{classes:t,disabled:r,size:i,color:o,iconColor:a,onDelete:s,clickable:l,variant:u}=e,c={root:["root",u,r&&"disabled",`size${Zr(i)}`,`color${Zr(o)}`,l&&"clickable",l&&`clickableColor${Zr(o)}`,s&&"deletable",s&&`deletableColor${Zr(o)}`,`${u}${Zr(o)}`],label:["label",`label${Zr(i)}`],avatar:["avatar",`avatar${Zr(i)}`,`avatarColor${Zr(o)}`],icon:["icon",`icon${Zr(i)}`,`iconColor${Zr(a)}`],deleteIcon:["deleteIcon",`deleteIcon${Zr(i)}`,`deleteIconColor${Zr(o)}`,`deleteIcon${Zr(u)}Color${Zr(o)}`]};return hi(c,Bee,t)},Nee=sr("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:i,iconColor:o,clickable:a,onDelete:s,size:l,variant:u}=r;return[{[`& .${Zi.avatar}`]:t.avatar},{[`& .${Zi.avatar}`]:t[`avatar${Zr(l)}`]},{[`& .${Zi.avatar}`]:t[`avatarColor${Zr(i)}`]},{[`& .${Zi.icon}`]:t.icon},{[`& .${Zi.icon}`]:t[`icon${Zr(l)}`]},{[`& .${Zi.icon}`]:t[`iconColor${Zr(o)}`]},{[`& .${Zi.deleteIcon}`]:t.deleteIcon},{[`& .${Zi.deleteIcon}`]:t[`deleteIcon${Zr(l)}`]},{[`& .${Zi.deleteIcon}`]:t[`deleteIconColor${Zr(i)}`]},{[`& .${Zi.deleteIcon}`]:t[`deleteIcon${Zr(u)}Color${Zr(i)}`]},t.root,t[`size${Zr(l)}`],t[`color${Zr(i)}`],a&&t.clickable,a&&i!=="default"&&t[`clickableColor${Zr(i)})`],s&&t.deletable,s&&i!=="default"&&t[`deletableColor${Zr(i)}`],t[u],t[`${u}${Zr(i)}`]]}})(({theme:e,ownerState:t})=>{const r=Qi(e.palette.text.primary,.26),i=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return De({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Zi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Zi.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:i,fontSize:e.typography.pxToRem(12)},[`& .${Zi.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Zi.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Zi.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Zi.icon}`]:De({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&De({color:e.vars?e.vars.palette.Chip.defaultIconColor:i},t.color!=="default"&&{color:"inherit"})),[`& .${Zi.deleteIcon}`]:De({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:r,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Qi(r,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Qi(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Zi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Qi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Zi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>De({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Qi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Zi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Qi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Zi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>De({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Zi.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Zi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Zi.avatar}`]:{marginLeft:4},[`& .${Zi.avatarSmall}`]:{marginLeft:2},[`& .${Zi.icon}`]:{marginLeft:4},[`& .${Zi.iconSmall}`]:{marginLeft:2},[`& .${Zi.deleteIcon}`]:{marginRight:5},[`& .${Zi.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Qi(e.palette[t.color].main,.7)}`,[`&.${Zi.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Zi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Qi(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Zi.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Qi(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),jee=sr("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:i}=r;return[t.label,t[`label${Zr(i)}`]]}})(({ownerState:e})=>De({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.size==="small"&&{paddingLeft:8,paddingRight:8}));function aI(e){return e.key==="Backspace"||e.key==="Delete"}const $ee=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiChip"}),{avatar:o,className:a,clickable:s,color:l="default",component:u,deleteIcon:c,disabled:d=!1,icon:p,label:v,onClick:x,onDelete:b,onKeyDown:y,onKeyUp:_,size:k="medium",variant:E="filled",tabIndex:O,skipFocusWhenDisabled:U=!1}=i,D=bn(i,Dee),j=X.exports.useRef(null),F=Vo(j,r),H=J=>{J.stopPropagation(),b&&b(J)},W=J=>{J.currentTarget===J.target&&aI(J)&&J.preventDefault(),y&&y(J)},G=J=>{J.currentTarget===J.target&&(b&&aI(J)?b(J):J.key==="Escape"&&j.current&&j.current.blur()),_&&_(J)},ae=s!==!1&&x?!0:s,V=ae||b?Ad:u||"div",oe=De({},i,{component:V,disabled:d,size:k,color:l,iconColor:X.exports.isValidElement(p)&&p.props.color||l,onDelete:!!b,clickable:ae,variant:E}),P=Lee(oe),ee=V===Ad?De({component:u||"div",focusVisibleClassName:P.focusVisible},b&&{disableRipple:!0}):{};let le=null;b&&(le=c&&X.exports.isValidElement(c)?X.exports.cloneElement(c,{className:pn(c.props.className,P.deleteIcon),onClick:H}):L(Oee,{className:pn(P.deleteIcon),onClick:H}));let pe=null;o&&X.exports.isValidElement(o)&&(pe=X.exports.cloneElement(o,{className:pn(P.avatar,o.props.className)}));let xe=null;return p&&X.exports.isValidElement(p)&&(xe=X.exports.cloneElement(p,{className:pn(P.icon,p.props.className)})),Ut(Nee,De({as:V,className:pn(P.root,a),disabled:ae&&d?!0:void 0,onClick:x,onKeyDown:W,onKeyUp:G,ref:F,tabIndex:U&&d?-1:O,ownerState:oe},ee,D,{children:[pe||xe,L(jee,{className:pn(P.label),ownerState:oe,children:v}),le]}))}),Fee=$ee;function sg({props:e,states:t,muiFormControl:r}){return t.reduce((i,o)=>(i[o]=e[o],r&&typeof e[o]>"u"&&(i[o]=r[o]),i),{})}const zee=X.exports.createContext(void 0),P6=zee;function hp(){return X.exports.useContext(P6)}function Hee(e){return L(dY,De({},e,{defaultTheme:t2}))}function sI(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function M6(e,t=!1){return e&&(sI(e.value)&&e.value!==""||t&&sI(e.defaultValue)&&e.defaultValue!=="")}function Wee(e){return e.startAdornment}function Vee(e){return di("MuiInputBase",e)}const qee=ri("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),$h=qee,Kee=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],o2=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${Zr(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},a2=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},Gee=e=>{const{classes:t,color:r,disabled:i,error:o,endAdornment:a,focused:s,formControl:l,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:p,size:v,startAdornment:x,type:b}=e,y={root:["root",`color${Zr(r)}`,i&&"disabled",o&&"error",u&&"fullWidth",s&&"focused",l&&"formControl",v==="small"&&"sizeSmall",d&&"multiline",x&&"adornedStart",a&&"adornedEnd",c&&"hiddenLabel",p&&"readOnly"],input:["input",i&&"disabled",b==="search"&&"inputTypeSearch",d&&"inputMultiline",v==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",x&&"inputAdornedStart",a&&"inputAdornedEnd",p&&"readOnly"]};return hi(y,Vee,t)},s2=sr("div",{name:"MuiInputBase",slot:"Root",overridesResolver:o2})(({theme:e,ownerState:t})=>De({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${$h.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&De({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),l2=sr("input",{name:"MuiInputBase",slot:"Input",overridesResolver:a2})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",i=De({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return De({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${$h.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${$h.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),Yee=L(Hee,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Zee=X.exports.forwardRef(function(t,r){var i;const o=gi({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:s,autoFocus:l,className:u,components:c={},componentsProps:d={},defaultValue:p,disabled:v,disableInjectingGlobalStyles:x,endAdornment:b,fullWidth:y=!1,id:_,inputComponent:k="input",inputProps:E={},inputRef:O,maxRows:U,minRows:D,multiline:j=!1,name:F,onBlur:H,onChange:W,onClick:G,onFocus:ae,onKeyDown:V,onKeyUp:oe,placeholder:P,readOnly:ee,renderSuffix:le,rows:pe,slotProps:xe={},slots:J={},startAdornment:ft,type:Le="text",value:He}=o,nr=bn(o,Kee),Bt=E.value!=null?E.value:He,{current:Rt}=X.exports.useRef(Bt!=null),Jt=X.exports.useRef(),vr=X.exports.useCallback(C=>{},[]),At=Vo(Jt,O,E.ref,vr),[kt,Ct]=X.exports.useState(!1),Lt=hp(),Kt=sg({props:o,muiFormControl:Lt,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Kt.focused=Lt?Lt.focused:kt,X.exports.useEffect(()=>{!Lt&&v&&kt&&(Ct(!1),H&&H())},[Lt,v,kt,H]);const yr=Lt&&Lt.onFilled,ne=Lt&&Lt.onEmpty,Mt=X.exports.useCallback(C=>{M6(C)?yr&&yr():ne&&ne()},[yr,ne]);Yl(()=>{Rt&&Mt({value:Bt})},[Bt,Mt,Rt]);const Nt=C=>{if(Kt.disabled){C.stopPropagation();return}ae&&ae(C),E.onFocus&&E.onFocus(C),Lt&&Lt.onFocus?Lt.onFocus(C):Ct(!0)},Ie=C=>{H&&H(C),E.onBlur&&E.onBlur(C),Lt&&Lt.onBlur?Lt.onBlur(C):Ct(!1)},Ae=(C,...T)=>{if(!Rt){const Z=C.target||Jt.current;if(Z==null)throw new Error(kd(1));Mt({value:Z.value})}E.onChange&&E.onChange(C,...T),W&&W(C,...T)};X.exports.useEffect(()=>{Mt(Jt.current)},[]);const fe=C=>{Jt.current&&C.currentTarget===C.target&&Jt.current.focus(),G&&G(C)};let Be=k,rt=E;j&&Be==="input"&&(pe?rt=De({type:void 0,minRows:pe,maxRows:pe},rt):rt=De({type:void 0,maxRows:U,minRows:D},rt),Be=fJ);const lt=C=>{Mt(C.animationName==="mui-auto-fill-cancel"?Jt.current:{value:"x"})};X.exports.useEffect(()=>{Lt&&Lt.setAdornedStart(Boolean(ft))},[Lt,ft]);const jt=De({},o,{color:Kt.color||"primary",disabled:Kt.disabled,endAdornment:b,error:Kt.error,focused:Kt.focused,formControl:Lt,fullWidth:y,hiddenLabel:Kt.hiddenLabel,multiline:j,size:Kt.size,startAdornment:ft,type:Le}),ce=Gee(jt),ie=J.root||c.Root||s2,de=xe.root||d.root||{},$=J.input||c.Input||l2;return rt=De({},rt,(i=xe.input)!=null?i:d.input),Ut(X.exports.Fragment,{children:[!x&&Yee,Ut(ie,De({},de,!J1(ie)&&{ownerState:De({},jt,de.ownerState)},{ref:r,onClick:fe},nr,{className:pn(ce.root,de.className,u),children:[ft,L(P6.Provider,{value:null,children:L($,De({ownerState:jt,"aria-invalid":Kt.error,"aria-describedby":a,autoComplete:s,autoFocus:l,defaultValue:p,disabled:Kt.disabled,id:_,onAnimationStart:lt,name:F,placeholder:P,readOnly:ee,required:Kt.required,rows:pe,value:Bt,onKeyDown:V,onKeyUp:oe,type:Le},rt,!J1($)&&{as:Be,ownerState:De({},jt,rt.ownerState)},{ref:At,className:pn(ce.input,rt.className),onBlur:Ie,onChange:Ae,onFocus:Nt}))}),b,le?le(De({},Kt,{startAdornment:ft})):null]}))]})}),O6=Zee;function Qee(e){return di("MuiInput",e)}const Xee=De({},$h,ri("MuiInput",["root","underline","input"])),Xg=Xee;function Jee(e){return di("MuiOutlinedInput",e)}const ete=De({},$h,ri("MuiOutlinedInput",["root","notchedOutline","input"])),jc=ete;function tte(e){return di("MuiFilledInput",e)}const rte=De({},$h,ri("MuiFilledInput",["root","underline","input"])),Zd=rte,nte=Nu(L("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ite=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ote={entering:{opacity:1},entered:{opacity:1}},ate=X.exports.forwardRef(function(t,r){const i=la(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,easing:u,in:c,onEnter:d,onEntered:p,onEntering:v,onExit:x,onExited:b,onExiting:y,style:_,timeout:k=o,TransitionComponent:E=n2}=t,O=bn(t,ite),U=X.exports.useRef(null),D=Vo(U,l.ref,r),j=P=>ee=>{if(P){const le=U.current;ee===void 0?P(le):P(le,ee)}},F=j(v),H=j((P,ee)=>{R6(P);const le=Ed({style:_,timeout:k,easing:u},{mode:"enter"});P.style.webkitTransition=i.transitions.create("opacity",le),P.style.transition=i.transitions.create("opacity",le),d&&d(P,ee)}),W=j(p),G=j(y),ae=j(P=>{const ee=Ed({style:_,timeout:k,easing:u},{mode:"exit"});P.style.webkitTransition=i.transitions.create("opacity",ee),P.style.transition=i.transitions.create("opacity",ee),x&&x(P)}),V=j(b);return L(E,De({appear:s,in:c,nodeRef:U,onEnter:H,onEntered:W,onEntering:F,onExit:ae,onExited:V,onExiting:G,addEndListener:P=>{a&&a(U.current,P)},timeout:k},O,{children:(P,ee)=>X.exports.cloneElement(l,De({style:De({opacity:0,visibility:P==="exited"&&!c?"hidden":void 0},ote[P],_,l.props.style),ref:D},ee))}))}),vy=ate;function ste(e){return di("MuiBackdrop",e)}ri("MuiBackdrop",["root","invisible"]);const lte=["children","component","components","componentsProps","className","invisible","open","slotProps","slots","transitionDuration","TransitionComponent"],ute=e=>{const{classes:t,invisible:r}=e;return hi({root:["root",r&&"invisible"]},ste,t)},cte=sr("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>De({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),dte=X.exports.forwardRef(function(t,r){var i,o,a;const s=gi({props:t,name:"MuiBackdrop"}),{children:l,component:u="div",components:c={},componentsProps:d={},className:p,invisible:v=!1,open:x,slotProps:b={},slots:y={},transitionDuration:_,TransitionComponent:k=vy}=s,E=bn(s,lte),O=De({},s,{component:u,invisible:v}),U=ute(O),D=(i=b.root)!=null?i:d.root;return L(k,De({in:x,timeout:_},E,{children:L(cte,De({"aria-hidden":!0},D,{as:(o=(a=y.root)!=null?a:c.Root)!=null?o:u,className:pn(U.root,p,D?.className),ownerState:De({},O,D?.ownerState),classes:U,ref:r,children:l}))}))}),u2=dte,fte=v6(),pte=e7({defaultTheme:fte,defaultClassName:"MuiBox-root",generateClassName:t6.generate}),kn=pte;function hte(e){return di("MuiButton",e)}const gte=ri("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),_v=gte,mte=X.exports.createContext({}),yte=mte,vte=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],bte=e=>{const{color:t,disableElevation:r,fullWidth:i,size:o,variant:a,classes:s}=e,l={root:["root",a,`${a}${Zr(t)}`,`size${Zr(o)}`,`${a}Size${Zr(o)}`,t==="inherit"&&"colorInherit",r&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Zr(o)}`],endIcon:["endIcon",`iconSize${Zr(o)}`]},u=hi(l,hte,s);return De({},s,u)},b7=e=>De({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),wte=sr(Ad,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Zr(r.color)}`],t[`size${Zr(r.size)}`],t[`${r.variant}Size${Zr(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var r,i;return De({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":De({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":De({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${_v.focusVisible}`]:De({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${_v.disabled}`]:De({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="outlined"&&t.color==="secondary"&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Qi(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(i=e.palette).getContrastText)==null?void 0:r.call(i,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_v.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_v.disabled}`]:{boxShadow:"none"}}),xte=sr("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${Zr(r.size)}`]]}})(({ownerState:e})=>De({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},b7(e))),_te=sr("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${Zr(r.size)}`]]}})(({ownerState:e})=>De({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},b7(e))),Ste=X.exports.forwardRef(function(t,r){const i=X.exports.useContext(yte),o=e6(i,t),a=gi({props:o,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:c,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:v=!1,endIcon:x,focusVisibleClassName:b,fullWidth:y=!1,size:_="medium",startIcon:k,type:E,variant:O="text"}=a,U=bn(a,vte),D=De({},a,{color:l,component:u,disabled:d,disableElevation:p,disableFocusRipple:v,fullWidth:y,size:_,type:E,variant:O}),j=bte(D),F=k&&L(xte,{className:j.startIcon,ownerState:D,children:k}),H=x&&L(_te,{className:j.endIcon,ownerState:D,children:x});return Ut(wte,De({ownerState:D,className:pn(i.className,j.root,c),component:u,disabled:d,focusRipple:!v,focusVisibleClassName:pn(j.focusVisible,b),ref:r,type:E},U,{classes:j,children:[F,s,H]}))}),c2=Ste;function Cte(e){return di("PrivateSwitchBase",e)}ri("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const kte=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ete=e=>{const{classes:t,checked:r,disabled:i,edge:o}=e,a={root:["root",r&&"checked",i&&"disabled",o&&`edge${Zr(o)}`],input:["input"]};return hi(a,Cte,t)},Ate=sr(Ad)(({ownerState:e})=>De({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Tte=sr("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Ite=X.exports.forwardRef(function(t,r){const{autoFocus:i,checked:o,checkedIcon:a,className:s,defaultChecked:l,disabled:u,disableFocusRipple:c=!1,edge:d=!1,icon:p,id:v,inputProps:x,inputRef:b,name:y,onBlur:_,onChange:k,onFocus:E,readOnly:O,required:U,tabIndex:D,type:j,value:F}=t,H=bn(t,kte),[W,G]=R0({controlled:o,default:Boolean(l),name:"SwitchBase",state:"checked"}),ae=hp(),V=J=>{E&&E(J),ae&&ae.onFocus&&ae.onFocus(J)},oe=J=>{_&&_(J),ae&&ae.onBlur&&ae.onBlur(J)},P=J=>{if(J.nativeEvent.defaultPrevented)return;const ft=J.target.checked;G(ft),k&&k(J,ft)};let ee=u;ae&&typeof ee>"u"&&(ee=ae.disabled);const le=j==="checkbox"||j==="radio",pe=De({},t,{checked:W,disabled:ee,disableFocusRipple:c,edge:d}),xe=Ete(pe);return Ut(Ate,De({component:"span",className:pn(xe.root,s),centerRipple:!0,focusRipple:!c,disabled:ee,tabIndex:null,role:void 0,onFocus:V,onBlur:oe,ownerState:pe,ref:r},H,{children:[L(Tte,De({autoFocus:i,checked:o,defaultChecked:l,className:xe.input,disabled:ee,id:le&&v,name:y,onChange:P,readOnly:O,ref:b,required:U,ownerState:pe,tabIndex:D,type:j},j==="checkbox"&&F===void 0?{}:{value:F},x)),W?a:p]}))}),Rte=Ite;function Pte(e){return di("MuiCircularProgress",e)}ri("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Mte=["className","color","disableShrink","size","style","thickness","value","variant"];let d2=e=>e,lI,uI,cI,dI;const $c=44,Ote=pp(lI||(lI=d2` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`)),Bte=pp(uI||(uI=d2` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`)),Ute=e=>{const{classes:t,variant:r,color:i,disableShrink:o}=e,a={root:["root",r,`color${Zr(i)}`],svg:["svg"],circle:["circle",`circle${Zr(r)}`,o&&"circleDisableShrink"]};return hi(a,Pte,t)},Dte=sr("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${Zr(r.color)}`]]}})(({ownerState:e,theme:t})=>De({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&B0(cI||(cI=d2` + animation: ${0} 1.4s linear infinite; + `),Ote)),Lte=sr("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Nte=sr("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${Zr(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>De({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&B0(dI||(dI=d2` + animation: ${0} 1.4s ease-in-out infinite; + `),Bte)),jte=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:s=!1,size:l=40,style:u,thickness:c=3.6,value:d=0,variant:p="indeterminate"}=i,v=bn(i,Mte),x=De({},i,{color:a,disableShrink:s,size:l,thickness:c,value:d,variant:p}),b=Ute(x),y={},_={},k={};if(p==="determinate"){const E=2*Math.PI*(($c-c)/2);y.strokeDasharray=E.toFixed(3),k["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*E).toFixed(3)}px`,_.transform="rotate(-90deg)"}return L(Dte,De({className:pn(b.root,o),style:De({width:l,height:l},_,u),ownerState:x,ref:r,role:"progressbar"},k,v,{children:L(Lte,{className:b.svg,ownerState:x,viewBox:`${$c/2} ${$c/2} ${$c} ${$c}`,children:L(Nte,{className:b.circle,style:y,ownerState:x,cx:$c,cy:$c,r:($c-c)/2,fill:"none",strokeWidth:c})})}))}),lg=jte,$te=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],Fte=e=>e.classes,zte=sr("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>De({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Hte=sr(u2,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Wte=X.exports.forwardRef(function(t,r){var i,o,a,s,l,u;const c=gi({name:"MuiModal",props:t}),{BackdropComponent:d=Hte,BackdropProps:p,closeAfterTransition:v=!1,children:x,component:b,components:y={},componentsProps:_={},disableAutoFocus:k=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:O=!1,disablePortal:U=!1,disableRestoreFocus:D=!1,disableScrollLock:j=!1,hideBackdrop:F=!1,keepMounted:H=!1,slotProps:W,slots:G,theme:ae}=c,V=bn(c,$te),[oe,P]=X.exports.useState(!0),ee={closeAfterTransition:v,disableAutoFocus:k,disableEnforceFocus:E,disableEscapeKeyDown:O,disablePortal:U,disableRestoreFocus:D,disableScrollLock:j,hideBackdrop:F,keepMounted:H},le=De({},c,ee,{exited:oe}),pe=Fte(le),xe=(i=(o=G?.root)!=null?o:y.Root)!=null?i:zte,J=(a=(s=G?.backdrop)!=null?s:y.Backdrop)!=null?a:d,ft=(l=W?.root)!=null?l:_.root,Le=(u=W?.backdrop)!=null?u:_.backdrop;return L(lJ,De({slots:{root:xe,backdrop:J},slotProps:{root:()=>De({},TS(ft,le),!J1(xe)&&{as:b,theme:ae}),backdrop:()=>De({},p,TS(Le,le))},onTransitionEnter:()=>P(!1),onTransitionExited:()=>P(!0),ref:r},V,{classes:pe},ee,{children:x}))}),B6=Wte;function Vte(e){return di("MuiDialog",e)}const qte=ri("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),q_=qte,Kte=X.exports.createContext({}),Gte=Kte,Yte=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Zte=sr(u2,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Qte=e=>{const{classes:t,scroll:r,maxWidth:i,fullWidth:o,fullScreen:a}=e,s={root:["root"],container:["container",`scroll${Zr(r)}`],paper:["paper",`paperScroll${Zr(r)}`,`paperWidth${Zr(String(i))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return hi(s,Vte,t)},Xte=sr(B6,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Jte=sr("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${Zr(r.scroll)}`]]}})(({ownerState:e})=>De({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),ere=sr(ag,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${Zr(r.scroll)}`],t[`paperWidth${Zr(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>De({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${q_.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${q_.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${q_.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),tre=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiDialog"}),o=la(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:u,BackdropProps:c,children:d,className:p,disableEscapeKeyDown:v=!1,fullScreen:x=!1,fullWidth:b=!1,maxWidth:y="sm",onBackdropClick:_,onClose:k,open:E,PaperComponent:O=ag,PaperProps:U={},scroll:D="paper",TransitionComponent:j=vy,transitionDuration:F=a,TransitionProps:H}=i,W=bn(i,Yte),G=De({},i,{disableEscapeKeyDown:v,fullScreen:x,fullWidth:b,maxWidth:y,scroll:D}),ae=Qte(G),V=X.exports.useRef(),oe=pe=>{V.current=pe.target===pe.currentTarget},P=pe=>{!V.current||(V.current=null,_&&_(pe),k&&k(pe,"backdropClick"))},ee=Iw(l),le=X.exports.useMemo(()=>({titleId:ee}),[ee]);return L(Xte,De({className:pn(ae.root,p),closeAfterTransition:!0,components:{Backdrop:Zte},componentsProps:{backdrop:De({transitionDuration:F,as:u},c)},disableEscapeKeyDown:v,onClose:k,open:E,ref:r,onClick:P,ownerState:G},W,{children:L(j,De({appear:!0,in:E,timeout:F,role:"presentation"},H,{children:L(Jte,{className:pn(ae.container),onMouseDown:oe,ownerState:G,children:L(ere,De({as:O,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":ee},U,{className:pn(ae.paper,U.className),ownerState:G,children:L(Gte.Provider,{value:le,children:d})}))})}))}))}),rre=tre,nre=ri("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),fI=nre,ire=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function ore(e,t,r){const i=t.getBoundingClientRect(),o=r&&r.getBoundingClientRect(),a=El(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=a.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let l=0,u=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");l=parseInt(c[4],10),u=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+l-i.left}px)`:`translateX(${a.innerWidth+l-i.left}px)`:e==="right"?o?`translateX(-${i.right-o.left-l}px)`:`translateX(-${i.left+i.width-l}px)`:e==="up"?o?`translateY(${o.bottom+u-i.top}px)`:`translateY(${a.innerHeight+u-i.top}px)`:o?`translateY(-${i.top-o.top+i.height-u}px)`:`translateY(-${i.top+i.height-u}px)`}function are(e){return typeof e=="function"?e():e}function Sv(e,t,r){const i=are(r),o=ore(e,t,i);o&&(t.style.webkitTransform=o,t.style.transform=o)}const sre=X.exports.forwardRef(function(t,r){const i=la(),o={enter:i.transitions.easing.easeOut,exit:i.transitions.easing.sharp},a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,container:c,direction:d="down",easing:p=o,in:v,onEnter:x,onEntered:b,onEntering:y,onExit:_,onExited:k,onExiting:E,style:O,timeout:U=a,TransitionComponent:D=n2}=t,j=bn(t,ire),F=X.exports.useRef(null),H=Vo(u.ref,F,r),W=xe=>J=>{xe&&(J===void 0?xe(F.current):xe(F.current,J))},G=W((xe,J)=>{Sv(d,xe,c),R6(xe),x&&x(xe,J)}),ae=W((xe,J)=>{const ft=Ed({timeout:U,style:O,easing:p},{mode:"enter"});xe.style.webkitTransition=i.transitions.create("-webkit-transform",De({},ft)),xe.style.transition=i.transitions.create("transform",De({},ft)),xe.style.webkitTransform="none",xe.style.transform="none",y&&y(xe,J)}),V=W(b),oe=W(E),P=W(xe=>{const J=Ed({timeout:U,style:O,easing:p},{mode:"exit"});xe.style.webkitTransition=i.transitions.create("-webkit-transform",J),xe.style.transition=i.transitions.create("transform",J),Sv(d,xe,c),_&&_(xe)}),ee=W(xe=>{xe.style.webkitTransition="",xe.style.transition="",k&&k(xe)}),le=xe=>{s&&s(F.current,xe)},pe=X.exports.useCallback(()=>{F.current&&Sv(d,F.current,c)},[d,c]);return X.exports.useEffect(()=>{if(v||d==="down"||d==="right")return;const xe=Uf(()=>{F.current&&Sv(d,F.current,c)}),J=El(F.current);return J.addEventListener("resize",xe),()=>{xe.clear(),J.removeEventListener("resize",xe)}},[d,v,c]),X.exports.useEffect(()=>{v||pe()},[v,pe]),L(D,De({nodeRef:F,onEnter:G,onEntered:V,onEntering:ae,onExit:P,onExited:ee,onExiting:oe,addEndListener:le,appear:l,in:v,timeout:U},j,{children:(xe,J)=>X.exports.cloneElement(u,De({ref:H,style:De({visibility:xe==="exited"&&!v?"hidden":void 0},O,u.props.style)},J))}))}),w7=sre;function lre(e){return di("MuiDrawer",e)}ri("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ure=["BackdropProps"],cre=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],x7=(e,t)=>{const{ownerState:r}=e;return[t.root,(r.variant==="permanent"||r.variant==="persistent")&&t.docked,t.modal]},dre=e=>{const{classes:t,anchor:r,variant:i}=e,o={root:["root"],docked:[(i==="permanent"||i==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Zr(r)}`,i!=="temporary"&&`paperAnchorDocked${Zr(r)}`]};return hi(o,lre,t)},fre=sr(B6,{name:"MuiDrawer",slot:"Root",overridesResolver:x7})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),pI=sr("div",{shouldForwardProp:tu,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:x7})({flex:"0 0 auto"}),pre=sr(ag,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${Zr(r.anchor)}`],r.variant!=="temporary"&&t[`paperAnchorDocked${Zr(r.anchor)}`]]}})(({theme:e,ownerState:t})=>De({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),_7={left:"right",right:"left",top:"down",bottom:"up"};function hre(e){return["left","right"].indexOf(e)!==-1}function gre(e,t){return e.direction==="rtl"&&hre(t)?_7[t]:t}const mre=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiDrawer"}),o=la(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:u,className:c,elevation:d=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:v}={},onClose:x,open:b=!1,PaperProps:y={},SlideProps:_,TransitionComponent:k=w7,transitionDuration:E=a,variant:O="temporary"}=i,U=bn(i.ModalProps,ure),D=bn(i,cre),j=X.exports.useRef(!1);X.exports.useEffect(()=>{j.current=!0},[]);const F=gre(o,s),W=De({},i,{anchor:s,elevation:d,open:b,variant:O},D),G=dre(W),ae=L(pre,De({elevation:O==="temporary"?d:0,square:!0},y,{className:pn(G.paper,y.className),ownerState:W,children:u}));if(O==="permanent")return L(pI,De({className:pn(G.root,G.docked,c),ownerState:W,ref:r},D,{children:ae}));const V=L(k,De({in:b,direction:_7[F],timeout:E,appear:j.current},_,{children:ae}));return O==="persistent"?L(pI,De({className:pn(G.root,G.docked,c),ownerState:W,ref:r},D,{children:V})):L(fre,De({BackdropProps:De({},l,v,{transitionDuration:E}),className:pn(G.root,G.modal,c),open:b,ownerState:W,onClose:x,hideBackdrop:p,ref:r},D,U,{children:V}))}),yre=mre,vre=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],bre=e=>{const{classes:t,disableUnderline:r}=e,o=hi({root:["root",!r&&"underline"],input:["input"]},tte,t);return De({},t,o)},wre=sr(s2,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...o2(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var r;const i=e.palette.mode==="light",o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return De({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${Zd.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${Zd.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(r=(e.vars||e).palette[t.color||"primary"])==null?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Zd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Zd.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Zd.disabled}, .${Zd.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Zd.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&De({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),xre=sr(l2,{name:"MuiFilledInput",slot:"Input",overridesResolver:a2})(({theme:e,ownerState:t})=>De({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9})),S7=X.exports.forwardRef(function(t,r){var i,o,a,s;const l=gi({props:t,name:"MuiFilledInput"}),{components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:p="input",multiline:v=!1,slotProps:x,slots:b={},type:y="text"}=l,_=bn(l,vre),k=De({},l,{fullWidth:d,inputComponent:p,multiline:v,type:y}),E=bre(l),O={root:{ownerState:k},input:{ownerState:k}},U=x??c?Is(x??c,O):O,D=(i=(o=b.root)!=null?o:u.Root)!=null?i:wre,j=(a=(s=b.input)!=null?s:u.Input)!=null?a:xre;return L(O6,De({slots:{root:D,input:j},componentsProps:U,fullWidth:d,inputComponent:p,multiline:v,ref:r,type:y},_,{classes:E}))});S7.muiName="Input";const C7=S7;function _re(e){return di("MuiFormControl",e)}ri("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Sre=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Cre=e=>{const{classes:t,margin:r,fullWidth:i}=e,o={root:["root",r!=="none"&&`margin${Zr(r)}`,i&&"fullWidth"]};return hi(o,_re,t)},kre=sr("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>De({},t.root,t[`margin${Zr(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>De({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Ere=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiFormControl"}),{children:o,className:a,color:s="primary",component:l="div",disabled:u=!1,error:c=!1,focused:d,fullWidth:p=!1,hiddenLabel:v=!1,margin:x="none",required:b=!1,size:y="medium",variant:_="outlined"}=i,k=bn(i,Sre),E=De({},i,{color:s,component:l,disabled:u,error:c,fullWidth:p,hiddenLabel:v,margin:x,required:b,size:y,variant:_}),O=Cre(E),[U,D]=X.exports.useState(()=>{let oe=!1;return o&&X.exports.Children.forEach(o,P=>{if(!a1(P,["Input","Select"]))return;const ee=a1(P,["Select"])?P.props.input:P;ee&&Wee(ee.props)&&(oe=!0)}),oe}),[j,F]=X.exports.useState(()=>{let oe=!1;return o&&X.exports.Children.forEach(o,P=>{!a1(P,["Input","Select"])||M6(P.props,!0)&&(oe=!0)}),oe}),[H,W]=X.exports.useState(!1);u&&H&&W(!1);const G=d!==void 0&&!u?d:H;let ae;const V=X.exports.useMemo(()=>({adornedStart:U,setAdornedStart:D,color:s,disabled:u,error:c,filled:j,focused:G,fullWidth:p,hiddenLabel:v,size:y,onBlur:()=>{W(!1)},onEmpty:()=>{F(!1)},onFilled:()=>{F(!0)},onFocus:()=>{W(!0)},registerEffect:ae,required:b,variant:_}),[U,s,u,c,j,G,p,v,ae,b,y,_]);return L(P6.Provider,{value:V,children:L(kre,De({as:l,ownerState:E,className:pn(O.root,a),ref:r},k,{children:o}))})}),k7=Ere;function Are(e){return di("MuiFormHelperText",e)}const Tre=ri("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),hI=Tre;var gI;const Ire=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Rre=e=>{const{classes:t,contained:r,size:i,disabled:o,error:a,filled:s,focused:l,required:u}=e,c={root:["root",o&&"disabled",a&&"error",i&&`size${Zr(i)}`,r&&"contained",l&&"focused",s&&"filled",u&&"required"]};return hi(c,Are,t)},Pre=sr("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${Zr(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(({theme:e,ownerState:t})=>De({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${hI.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${hI.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Mre=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiFormHelperText"}),{children:o,className:a,component:s="p"}=i,l=bn(i,Ire),u=hp(),c=sg({props:i,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),d=De({},i,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=Rre(d);return L(Pre,De({as:s,ownerState:d,className:pn(p.root,a),ref:r},l,{children:o===" "?gI||(gI=L("span",{className:"notranslate",children:"\u200B"})):o}))}),Ore=Mre;function Bre(e){return di("MuiFormLabel",e)}const Ure=ri("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),r0=Ure,Dre=["children","className","color","component","disabled","error","filled","focused","required"],Lre=e=>{const{classes:t,color:r,focused:i,disabled:o,error:a,filled:s,required:l}=e,u={root:["root",`color${Zr(r)}`,o&&"disabled",a&&"error",s&&"filled",i&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return hi(u,Bre,t)},Nre=sr("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>De({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>De({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${r0.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${r0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${r0.error}`]:{color:(e.vars||e).palette.error.main}})),jre=sr("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${r0.error}`]:{color:(e.vars||e).palette.error.main}})),$re=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiFormLabel"}),{children:o,className:a,component:s="label"}=i,l=bn(i,Dre),u=hp(),c=sg({props:i,muiFormControl:u,states:["color","required","focused","disabled","error","filled"]}),d=De({},i,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),p=Lre(d);return Ut(Nre,De({as:s,ownerState:d,className:pn(p.root,a),ref:r},l,{children:[o,c.required&&Ut(jre,{ownerState:d,"aria-hidden":!0,className:p.asterisk,children:["\u2009","*"]})]}))}),E7=$re,Fre=X.exports.createContext(),mI=Fre;function zre(e){return di("MuiGrid",e)}const Hre=[0,1,2,3,4,5,6,7,8,9,10],Wre=["column-reverse","column","row-reverse","row"],Vre=["nowrap","wrap-reverse","wrap"],Jg=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],qre=ri("MuiGrid",["root","container","item","zeroMinWidth",...Hre.map(e=>`spacing-xs-${e}`),...Wre.map(e=>`direction-xs-${e}`),...Vre.map(e=>`wrap-xs-${e}`),...Jg.map(e=>`grid-xs-${e}`),...Jg.map(e=>`grid-sm-${e}`),...Jg.map(e=>`grid-md-${e}`),...Jg.map(e=>`grid-lg-${e}`),...Jg.map(e=>`grid-xl-${e}`)]),N0=qre,Kre=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function bh(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function Gre({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce((i,o)=>{let a={};if(t[o]&&(r=t[o]),!r)return i;if(r===!0)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(r==="auto")a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=Cf({values:t.columns,breakpoints:e.breakpoints.values}),l=typeof s=="object"?s[o]:s;if(l==null)return i;const u=`${Math.round(r/l*1e8)/1e6}%`;let c={};if(t.container&&t.item&&t.columnSpacing!==0){const d=e.spacing(t.columnSpacing);if(d!=="0px"){const p=`calc(${u} + ${bh(d)})`;c={flexBasis:p,maxWidth:p}}}a=De({flexBasis:u,flexGrow:0,maxWidth:u},c)}return e.breakpoints.values[o]===0?Object.assign(i,a):i[e.breakpoints.up(o)]=a,i},{})}function Yre({theme:e,ownerState:t}){const r=Cf({values:t.direction,breakpoints:e.breakpoints.values});return Os({theme:e},r,i=>{const o={flexDirection:i};return i.indexOf("column")===0&&(o[`& > .${N0.item}`]={maxWidth:"none"}),o})}function A7({breakpoints:e,values:t}){let r="";Object.keys(t).forEach(o=>{r===""&&t[o]!==0&&(r=o)});const i=Object.keys(e).sort((o,a)=>e[o]-e[a]);return i.slice(0,i.indexOf(r))}function Zre({theme:e,ownerState:t}){const{container:r,rowSpacing:i}=t;let o={};if(r&&i!==0){const a=Cf({values:i,breakpoints:e.breakpoints.values});let s;typeof a=="object"&&(s=A7({breakpoints:e.breakpoints.values,values:a})),o=Os({theme:e},a,(l,u)=>{var c;const d=e.spacing(l);return d!=="0px"?{marginTop:`-${bh(d)}`,[`& > .${N0.item}`]:{paddingTop:bh(d)}}:(c=s)!=null&&c.includes(u)?{}:{marginTop:0,[`& > .${N0.item}`]:{paddingTop:0}}})}return o}function Qre({theme:e,ownerState:t}){const{container:r,columnSpacing:i}=t;let o={};if(r&&i!==0){const a=Cf({values:i,breakpoints:e.breakpoints.values});let s;typeof a=="object"&&(s=A7({breakpoints:e.breakpoints.values,values:a})),o=Os({theme:e},a,(l,u)=>{var c;const d=e.spacing(l);return d!=="0px"?{width:`calc(100% + ${bh(d)})`,marginLeft:`-${bh(d)}`,[`& > .${N0.item}`]:{paddingLeft:bh(d)}}:(c=s)!=null&&c.includes(u)?{}:{width:"100%",marginLeft:0,[`& > .${N0.item}`]:{paddingLeft:0}}})}return o}function Xre(e,t,r={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[r[`spacing-xs-${String(e)}`]];const i=[];return t.forEach(o=>{const a=e[o];Number(a)>0&&i.push(r[`spacing-${o}-${String(a)}`])}),i}const Jre=sr("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{container:i,direction:o,item:a,spacing:s,wrap:l,zeroMinWidth:u,breakpoints:c}=r;let d=[];i&&(d=Xre(s,c,t));const p=[];return c.forEach(v=>{const x=r[v];x&&p.push(t[`grid-${v}-${String(x)}`])}),[t.root,i&&t.container,a&&t.item,u&&t.zeroMinWidth,...d,o!=="row"&&t[`direction-xs-${String(o)}`],l!=="wrap"&&t[`wrap-xs-${String(l)}`],...p]}})(({ownerState:e})=>De({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),Yre,Zre,Qre,Gre);function ene(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const r=[];return t.forEach(i=>{const o=e[i];if(Number(o)>0){const a=`spacing-${i}-${String(o)}`;r.push(a)}}),r}const tne=e=>{const{classes:t,container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=e;let c=[];r&&(c=ene(a,u));const d=[];u.forEach(v=>{const x=e[v];x&&d.push(`grid-${v}-${String(x)}`)});const p={root:["root",r&&"container",o&&"item",l&&"zeroMinWidth",...c,i!=="row"&&`direction-xs-${String(i)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return hi(p,zre,t)},rne=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiGrid"}),{breakpoints:o}=la(),a=Xw(i),{className:s,columns:l,columnSpacing:u,component:c="div",container:d=!1,direction:p="row",item:v=!1,rowSpacing:x,spacing:b=0,wrap:y="wrap",zeroMinWidth:_=!1}=a,k=bn(a,Kre),E=x||b,O=u||b,U=X.exports.useContext(mI),D=d?l||12:U,j={},F=De({},k);o.keys.forEach(G=>{k[G]!=null&&(j[G]=k[G],delete F[G])});const H=De({},a,{columns:D,container:d,direction:p,item:v,rowSpacing:E,columnSpacing:O,wrap:y,zeroMinWidth:_,spacing:b},j,{breakpoints:o.keys}),W=tne(H);return L(mI.Provider,{value:D,children:L(Jre,De({ownerState:H,className:pn(W.root,s),as:c,ref:r},F))})}),Cv=rne,nne=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function DS(e){return`scale(${e}, ${e**2})`}const ine={entering:{opacity:1,transform:DS(1)},entered:{opacity:1,transform:"none"}},K_=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),T7=X.exports.forwardRef(function(t,r){const{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:u,onEntered:c,onEntering:d,onExit:p,onExited:v,onExiting:x,style:b,timeout:y="auto",TransitionComponent:_=n2}=t,k=bn(t,nne),E=X.exports.useRef(),O=X.exports.useRef(),U=la(),D=X.exports.useRef(null),j=Vo(D,a.ref,r),F=ee=>le=>{if(ee){const pe=D.current;le===void 0?ee(pe):ee(pe,le)}},H=F(d),W=F((ee,le)=>{R6(ee);const{duration:pe,delay:xe,easing:J}=Ed({style:b,timeout:y,easing:s},{mode:"enter"});let ft;y==="auto"?(ft=U.transitions.getAutoHeightDuration(ee.clientHeight),O.current=ft):ft=pe,ee.style.transition=[U.transitions.create("opacity",{duration:ft,delay:xe}),U.transitions.create("transform",{duration:K_?ft:ft*.666,delay:xe,easing:J})].join(","),u&&u(ee,le)}),G=F(c),ae=F(x),V=F(ee=>{const{duration:le,delay:pe,easing:xe}=Ed({style:b,timeout:y,easing:s},{mode:"exit"});let J;y==="auto"?(J=U.transitions.getAutoHeightDuration(ee.clientHeight),O.current=J):J=le,ee.style.transition=[U.transitions.create("opacity",{duration:J,delay:pe}),U.transitions.create("transform",{duration:K_?J:J*.666,delay:K_?pe:pe||J*.333,easing:xe})].join(","),ee.style.opacity=0,ee.style.transform=DS(.75),p&&p(ee)}),oe=F(v),P=ee=>{y==="auto"&&(E.current=setTimeout(ee,O.current||0)),i&&i(D.current,ee)};return X.exports.useEffect(()=>()=>{clearTimeout(E.current)},[]),L(_,De({appear:o,in:l,nodeRef:D,onEnter:W,onEntered:G,onEntering:H,onExit:V,onExited:oe,onExiting:ae,addEndListener:P,timeout:y==="auto"?null:y},k,{children:(ee,le)=>X.exports.cloneElement(a,De({style:De({opacity:0,transform:DS(.75),visibility:ee==="exited"&&!l?"hidden":void 0},ine[ee],b,a.props.style),ref:j},le))}))});T7.muiSupportAuto=!0;const LS=T7;function one(e,t,r,i,o){const a=typeof window<"u"&&typeof window.matchMedia<"u",[s,l]=X.exports.useState(()=>o&&a?r(e).matches:i?i(e).matches:t);return Yl(()=>{let u=!0;if(!a)return;const c=r(e),d=()=>{u&&l(c.matches)};return d(),c.addListener(d),()=>{u=!1,c.removeListener(d)}},[e,r,a]),s}const I7=If["useSyncExternalStore"];function ane(e,t,r,i){const o=X.exports.useCallback(()=>t,[t]),a=X.exports.useMemo(()=>{if(i!==null){const{matches:c}=i(e);return()=>c}return o},[o,e,i]),[s,l]=X.exports.useMemo(()=>{if(r===null)return[o,()=>()=>{}];const c=r(e);return[()=>c.matches,d=>(c.addListener(d),()=>{c.removeListener(d)})]},[o,r,e]);return I7(l,s,a)}function aa(e,t={}){const r=m6(),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:a=i?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l}=n7({name:"MuiUseMediaQuery",props:t,theme:r});let u=typeof e=="function"?e(r):e;return u=u.replace(/^@media( ?)/m,""),(I7!==void 0?ane:one)(u,o,a,s,l)}const sne=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],lne=e=>{const{classes:t,disableUnderline:r}=e,o=hi({root:["root",!r&&"underline"],input:["input"]},Qee,t);return De({},t,o)},une=sr(s2,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...o2(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let i=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(i=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),De({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Xg.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xg.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Xg.disabled}, .${Xg.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${i}`}},[`&.${Xg.disabled}:before`]:{borderBottomStyle:"dotted"}})}),cne=sr(l2,{name:"MuiInput",slot:"Input",overridesResolver:a2})({}),R7=X.exports.forwardRef(function(t,r){var i,o,a,s;const l=gi({props:t,name:"MuiInput"}),{disableUnderline:u,components:c={},componentsProps:d,fullWidth:p=!1,inputComponent:v="input",multiline:x=!1,slotProps:b,slots:y={},type:_="text"}=l,k=bn(l,sne),E=lne(l),U={root:{ownerState:{disableUnderline:u}}},D=b??d?Is(b??d,U):U,j=(i=(o=y.root)!=null?o:c.Root)!=null?i:une,F=(a=(s=y.input)!=null?s:c.Input)!=null?a:cne;return L(O6,De({slots:{root:j,input:F},slotProps:D,fullWidth:p,inputComponent:v,multiline:x,ref:r,type:_},k,{classes:E}))});R7.muiName="Input";const P7=R7;function dne(e){return di("MuiInputLabel",e)}ri("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const fne=["disableAnimation","margin","shrink","variant","className"],pne=e=>{const{classes:t,formControl:r,size:i,shrink:o,disableAnimation:a,variant:s,required:l}=e,c=hi({root:["root",r&&"formControl",!a&&"animated",o&&"shrink",i==="small"&&"sizeSmall",s],asterisk:[l&&"asterisk"]},dne,t);return De({},t,c)},hne=sr(E7,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${r0.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,t[r.variant]]}})(({theme:e,ownerState:t})=>De({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&De({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&De({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&De({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))),gne=X.exports.forwardRef(function(t,r){const i=gi({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:a,className:s}=i,l=bn(i,fne),u=hp();let c=a;typeof c>"u"&&u&&(c=u.filled||u.focused||u.adornedStart);const d=sg({props:i,muiFormControl:u,states:["size","variant","required"]}),p=De({},i,{disableAnimation:o,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required}),v=pne(p);return L(hne,De({"data-shrink":c,ownerState:p,ref:r,className:pn(v.root,s)},l,{classes:v}))}),mne=gne;function yne(e){return di("MuiLink",e)}const vne=ri("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),bne=vne,M7={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},wne=e=>M7[e]||e,xne=({theme:e,ownerState:t})=>{const r=wne(t.color),i=Mh(e,`palette.${r}`,!1)||t.color,o=Mh(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Qi(i,.4)},_ne=xne,Sne=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Cne=e=>{const{classes:t,component:r,focusVisible:i,underline:o}=e,a={root:["root",`underline${Zr(o)}`,r==="button"&&"button",i&&"focusVisible"]};return hi(a,yne,t)},kne=sr(jo,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${Zr(r.underline)}`],r.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>De({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&De({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:_ne({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${bne.focusVisible}`]:{outline:"auto"}})),Ene=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiLink"}),{className:o,color:a="primary",component:s="a",onBlur:l,onFocus:u,TypographyClasses:c,underline:d="always",variant:p="inherit",sx:v}=i,x=bn(i,Sne),{isFocusVisibleRef:b,onBlur:y,onFocus:_,ref:k}=Pw(),[E,O]=X.exports.useState(!1),U=Vo(r,k),D=W=>{y(W),b.current===!1&&O(!1),l&&l(W)},j=W=>{_(W),b.current===!0&&O(!0),u&&u(W)},F=De({},i,{color:a,component:s,focusVisible:E,underline:d,variant:p}),H=Cne(F);return L(kne,De({color:a,className:pn(H.root,o),classes:c,component:s,onBlur:D,onFocus:j,ref:U,ownerState:F,variant:p,sx:[...Object.keys(M7).includes(a)?[]:[{color:a}],...Array.isArray(v)?v:[v]]},x))}),uc=Ene,Ane=X.exports.createContext({}),NS=Ane;function Tne(e){return di("MuiList",e)}ri("MuiList",["root","padding","dense","subheader"]);const Ine=["children","className","component","dense","disablePadding","subheader"],Rne=e=>{const{classes:t,disablePadding:r,dense:i,subheader:o}=e;return hi({root:["root",!r&&"padding",i&&"dense",o&&"subheader"]},Tne,t)},Pne=sr("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>De({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Mne=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiList"}),{children:o,className:a,component:s="ul",dense:l=!1,disablePadding:u=!1,subheader:c}=i,d=bn(i,Ine),p=X.exports.useMemo(()=>({dense:l}),[l]),v=De({},i,{component:s,dense:l,disablePadding:u}),x=Rne(v);return L(NS.Provider,{value:p,children:Ut(Pne,De({as:s,className:pn(x.root,a),ref:r,ownerState:v},d,{children:[c,o]}))})}),One=Mne,Bne=ri("MuiListItemIcon",["root","alignItemsFlexStart"]),yI=Bne,Une=ri("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),vI=Une,Dne=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function G_(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function bI(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function O7(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function em(e,t,r,i,o,a){let s=!1,l=o(e,t,t?r:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const u=i?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!O7(l,a)||u)l=o(e,l,r);else return l.focus(),!0}return!1}const Lne=X.exports.forwardRef(function(t,r){const{actions:i,autoFocus:o=!1,autoFocusItem:a=!1,children:s,className:l,disabledItemsFocusable:u=!1,disableListWrap:c=!1,onKeyDown:d,variant:p="selectedMenu"}=t,v=bn(t,Dne),x=X.exports.useRef(null),b=X.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Yl(()=>{o&&x.current.focus()},[o]),X.exports.useImperativeHandle(i,()=>({adjustStyleForScrollbar:(O,U)=>{const D=!x.current.style.width;if(O.clientHeight{const U=x.current,D=O.key,j=ya(U).activeElement;if(D==="ArrowDown")O.preventDefault(),em(U,j,c,u,G_);else if(D==="ArrowUp")O.preventDefault(),em(U,j,c,u,bI);else if(D==="Home")O.preventDefault(),em(U,null,c,u,G_);else if(D==="End")O.preventDefault(),em(U,null,c,u,bI);else if(D.length===1){const F=b.current,H=D.toLowerCase(),W=performance.now();F.keys.length>0&&(W-F.lastTime>500?(F.keys=[],F.repeating=!0,F.previousKeyMatched=!0):F.repeating&&H!==F.keys[0]&&(F.repeating=!1)),F.lastTime=W,F.keys.push(H);const G=j&&!F.repeating&&O7(j,F);F.previousKeyMatched&&(G||em(U,j,!1,u,G_,F))?O.preventDefault():F.previousKeyMatched=!1}d&&d(O)},_=Vo(x,r);let k=-1;X.exports.Children.forEach(s,(O,U)=>{!X.exports.isValidElement(O)||O.props.disabled||(p==="selectedMenu"&&O.props.selected||k===-1)&&(k=U)});const E=X.exports.Children.map(s,(O,U)=>{if(U===k){const D={};return a&&(D.autoFocus=!0),O.props.tabIndex===void 0&&p==="selectedMenu"&&(D.tabIndex=0),X.exports.cloneElement(O,D)}return O});return L(One,De({role:"menu",ref:_,className:l,onKeyDown:y,tabIndex:o?0:-1},v,{children:E}))}),Nne=Lne;function jne(e){return di("MuiPopover",e)}ri("MuiPopover",["root","paper"]);const $ne=["onEntering"],Fne=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function wI(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function xI(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function _I(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Y_(e){return typeof e=="function"?e():e}const zne=e=>{const{classes:t}=e;return hi({root:["root"],paper:["paper"]},jne,t)},Hne=sr(B6,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wne=sr(ag,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Vne=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiPopover"}),{action:o,anchorEl:a,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:u="anchorEl",children:c,className:d,container:p,elevation:v=8,marginThreshold:x=16,open:b,PaperProps:y={},transformOrigin:_={vertical:"top",horizontal:"left"},TransitionComponent:k=LS,transitionDuration:E="auto",TransitionProps:{onEntering:O}={}}=i,U=bn(i.TransitionProps,$ne),D=bn(i,Fne),j=X.exports.useRef(),F=Vo(j,y.ref),H=De({},i,{anchorOrigin:s,anchorReference:u,elevation:v,marginThreshold:x,PaperProps:y,transformOrigin:_,TransitionComponent:k,transitionDuration:E,TransitionProps:U}),W=zne(H),G=X.exports.useCallback(()=>{if(u==="anchorPosition")return l;const ft=Y_(a),He=(ft&&ft.nodeType===1?ft:ya(j.current).body).getBoundingClientRect();return{top:He.top+wI(He,s.vertical),left:He.left+xI(He,s.horizontal)}},[a,s.horizontal,s.vertical,l,u]),ae=X.exports.useCallback(ft=>({vertical:wI(ft,_.vertical),horizontal:xI(ft,_.horizontal)}),[_.horizontal,_.vertical]),V=X.exports.useCallback(ft=>{const Le={width:ft.offsetWidth,height:ft.offsetHeight},He=ae(Le);if(u==="none")return{top:null,left:null,transformOrigin:_I(He)};const nr=G();let Bt=nr.top-He.vertical,Rt=nr.left-He.horizontal;const Jt=Bt+Le.height,vr=Rt+Le.width,At=El(Y_(a)),kt=At.innerHeight-x,Ct=At.innerWidth-x;if(Btkt){const Lt=Jt-kt;Bt-=Lt,He.vertical+=Lt}if(RtCt){const Lt=vr-Ct;Rt-=Lt,He.horizontal+=Lt}return{top:`${Math.round(Bt)}px`,left:`${Math.round(Rt)}px`,transformOrigin:_I(He)}},[a,u,G,ae,x]),[oe,P]=X.exports.useState(b),ee=X.exports.useCallback(()=>{const ft=j.current;if(!ft)return;const Le=V(ft);Le.top!==null&&(ft.style.top=Le.top),Le.left!==null&&(ft.style.left=Le.left),ft.style.transformOrigin=Le.transformOrigin,P(!0)},[V]),le=(ft,Le)=>{O&&O(ft,Le),ee()},pe=()=>{P(!1)};X.exports.useEffect(()=>{b&&ee()}),X.exports.useImperativeHandle(o,()=>b?{updatePosition:()=>{ee()}}:null,[b,ee]),X.exports.useEffect(()=>{if(!b)return;const ft=Uf(()=>{ee()}),Le=El(a);return Le.addEventListener("resize",ft),()=>{ft.clear(),Le.removeEventListener("resize",ft)}},[a,b,ee]);let xe=E;E==="auto"&&!k.muiSupportAuto&&(xe=void 0);const J=p||(a?ya(Y_(a)).body:void 0);return L(Hne,De({BackdropProps:{invisible:!0},className:pn(W.root,d),container:J,open:b,ref:r,ownerState:H},D,{children:L(k,De({appear:!0,in:b,onEntering:le,onExited:pe,timeout:xe},U,{children:L(Wne,De({elevation:v},y,{ref:F,className:pn(W.paper,y.className)},oe?void 0:{style:De({},y.style,{opacity:0})},{ownerState:H,children:c}))}))}))}),qne=Vne;function Kne(e){return di("MuiMenu",e)}ri("MuiMenu",["root","paper","list"]);const Gne=["onEntering"],Yne=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],Zne={vertical:"top",horizontal:"right"},Qne={vertical:"top",horizontal:"left"},Xne=e=>{const{classes:t}=e;return hi({root:["root"],paper:["paper"],list:["list"]},Kne,t)},Jne=sr(qne,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eie=sr(ag,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),tie=sr(Nne,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),rie=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:v="auto",TransitionProps:{onEntering:x}={},variant:b="selectedMenu"}=i,y=bn(i.TransitionProps,Gne),_=bn(i,Yne),k=la(),E=k.direction==="rtl",O=De({},i,{autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:x,PaperProps:d,transitionDuration:v,TransitionProps:y,variant:b}),U=Xne(O),D=o&&!s&&c,j=X.exports.useRef(null),F=(G,ae)=>{j.current&&j.current.adjustStyleForScrollbar(G,k),x&&x(G,ae)},H=G=>{G.key==="Tab"&&(G.preventDefault(),u&&u(G,"tabKeyDown"))};let W=-1;return X.exports.Children.map(a,(G,ae)=>{!X.exports.isValidElement(G)||G.props.disabled||(b==="selectedMenu"&&G.props.selected||W===-1)&&(W=ae)}),L(Jne,De({onClose:u,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?Zne:Qne,PaperProps:De({component:eie},d,{classes:De({},d.classes,{root:U.paper})}),className:U.root,open:c,ref:r,transitionDuration:v,TransitionProps:De({onEntering:F},y),ownerState:O},_,{classes:p,children:L(tie,De({onKeyDown:H,actions:j,autoFocus:o&&(W===-1||s),autoFocusItem:D,variant:b},l,{className:pn(U.list,l.className),children:a}))}))}),nie=rie;function iie(e){return di("MuiMenuItem",e)}const oie=ri("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),tm=oie,aie=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],sie=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},lie=e=>{const{disabled:t,dense:r,divider:i,disableGutters:o,selected:a,classes:s}=e,u=hi({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",i&&"divider",a&&"selected"]},iie,s);return De({},s,u)},uie=sr(Ad,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:sie})(({theme:e,ownerState:t})=>De({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${tm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${tm.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${tm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${tm.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${tm.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${fI.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${fI.inset}`]:{marginLeft:52},[`& .${vI.root}`]:{marginTop:0,marginBottom:0},[`& .${vI.inset}`]:{paddingLeft:36},[`& .${yI.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&De({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${yI.root} svg`]:{fontSize:"1.25rem"}}))),cie=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:a="li",dense:s=!1,divider:l=!1,disableGutters:u=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:p,className:v}=i,x=bn(i,aie),b=X.exports.useContext(NS),y=X.exports.useMemo(()=>({dense:s||b.dense||!1,disableGutters:u}),[b.dense,s,u]),_=X.exports.useRef(null);Yl(()=>{o&&_.current&&_.current.focus()},[o]);const k=De({},i,{dense:y.dense,divider:l,disableGutters:u}),E=lie(i),O=Vo(_,r);let U;return i.disabled||(U=p!==void 0?p:-1),L(NS.Provider,{value:y,children:L(uie,De({ref:O,role:d,tabIndex:U,component:a,focusVisibleClassName:pn(E.focusVisible,c),className:pn(E.root,v)},x,{ownerState:k,classes:E}))})}),rm=cie;function die(e){return di("MuiNativeSelect",e)}const fie=ri("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),U6=fie,pie=["className","disabled","IconComponent","inputRef","variant"],hie=e=>{const{classes:t,variant:r,disabled:i,multiple:o,open:a}=e,s={select:["select",r,i&&"disabled",o&&"multiple"],icon:["icon",`icon${Zr(r)}`,a&&"iconOpen",i&&"disabled"]};return hi(s,die,t)},B7=({ownerState:e,theme:t})=>De({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":De({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${U6.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),gie=sr("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:tu,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],{[`&.${U6.multiple}`]:t.multiple}]}})(B7),U7=({ownerState:e,theme:t})=>De({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${U6.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),mie=sr("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Zr(r.variant)}`],r.open&&t.iconOpen]}})(U7),yie=X.exports.forwardRef(function(t,r){const{className:i,disabled:o,IconComponent:a,inputRef:s,variant:l="standard"}=t,u=bn(t,pie),c=De({},t,{disabled:o,variant:l}),d=hie(c);return Ut(X.exports.Fragment,{children:[L(gie,De({ownerState:c,className:pn(d.select,i),disabled:o,ref:s||r},u)),t.multiple?null:L(mie,{as:a,ownerState:c,className:d.icon})]})}),vie=yie;var SI;const bie=["children","classes","className","label","notched"],wie=sr("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),xie=sr("legend")(({ownerState:e,theme:t})=>De({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&De({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function _ie(e){const{className:t,label:r,notched:i}=e,o=bn(e,bie),a=r!=null&&r!=="",s=De({},e,{notched:i,withLabel:a});return L(wie,De({"aria-hidden":!0,className:t,ownerState:s},o,{children:L(xie,{ownerState:s,children:a?L("span",{children:r}):SI||(SI=L("span",{className:"notranslate",children:"\u200B"}))})}))}const Sie=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Cie=e=>{const{classes:t}=e,i=hi({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Jee,t);return De({},t,i)},kie=sr(s2,{shouldForwardProp:e=>tu(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:o2})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return De({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${jc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${jc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${jc.focused} .${jc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${jc.error} .${jc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${jc.disabled} .${jc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&De({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),Eie=sr(_ie,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Aie=sr(l2,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:a2})(({theme:e,ownerState:t})=>De({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),D7=X.exports.forwardRef(function(t,r){var i,o,a,s,l;const u=gi({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:d=!1,inputComponent:p="input",label:v,multiline:x=!1,notched:b,slots:y={},type:_="text"}=u,k=bn(u,Sie),E=Cie(u),O=hp(),U=sg({props:u,muiFormControl:O,states:["required"]}),D=De({},u,{color:U.color||"primary",disabled:U.disabled,error:U.error,focused:U.focused,formControl:O,fullWidth:d,hiddenLabel:U.hiddenLabel,multiline:x,size:U.size,type:_}),j=(i=(o=y.root)!=null?o:c.Root)!=null?i:kie,F=(a=(s=y.input)!=null?s:c.Input)!=null?a:Aie;return L(O6,De({slots:{root:j,input:F},renderSuffix:H=>L(Eie,{ownerState:D,className:E.notchedOutline,label:v!=null&&v!==""&&U.required?l||(l=Ut(X.exports.Fragment,{children:[v,"\xA0","*"]})):v,notched:typeof b<"u"?b:Boolean(H.startAdornment||H.filled||H.focused)}),fullWidth:d,inputComponent:p,multiline:x,ref:r,type:_},k,{classes:De({},E,{notchedOutline:null})}))});D7.muiName="Input";const L7=D7;function Tie(e){return di("MuiSelect",e)}const Iie=ri("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),kv=Iie;var CI;const Rie=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Pie=sr("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${kv.select}`]:t.select},{[`&.${kv.select}`]:t[r.variant]},{[`&.${kv.multiple}`]:t.multiple}]}})(B7,{[`&.${kv.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Mie=sr("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Zr(r.variant)}`],r.open&&t.iconOpen]}})(U7),Oie=sr("input",{shouldForwardProp:e=>yQ(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function kI(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Bie(e){return e==null||typeof e=="string"&&!e.trim()}const Uie=e=>{const{classes:t,variant:r,disabled:i,multiple:o,open:a}=e,s={select:["select",r,i&&"disabled",o&&"multiple"],icon:["icon",`icon${Zr(r)}`,a&&"iconOpen",i&&"disabled"],nativeInput:["nativeInput"]};return hi(s,Tie,t)},Die=X.exports.forwardRef(function(t,r){const{"aria-describedby":i,"aria-label":o,autoFocus:a,autoWidth:s,children:l,className:u,defaultOpen:c,defaultValue:d,disabled:p,displayEmpty:v,IconComponent:x,inputRef:b,labelId:y,MenuProps:_={},multiple:k,name:E,onBlur:O,onChange:U,onClose:D,onFocus:j,onOpen:F,open:H,readOnly:W,renderValue:G,SelectDisplayProps:ae={},tabIndex:V,value:oe,variant:P="standard"}=t,ee=bn(t,Rie),[le,pe]=R0({controlled:oe,default:d,name:"Select"}),[xe,J]=R0({controlled:H,default:c,name:"Select"}),ft=X.exports.useRef(null),Le=X.exports.useRef(null),[He,nr]=X.exports.useState(null),{current:Bt}=X.exports.useRef(H!=null),[Rt,Jt]=X.exports.useState(),vr=Vo(r,b),At=X.exports.useCallback(T=>{Le.current=T,T&&nr(T)},[]),kt=He?.parentNode;X.exports.useImperativeHandle(vr,()=>({focus:()=>{Le.current.focus()},node:ft.current,value:le}),[le]),X.exports.useEffect(()=>{c&&xe&&He&&!Bt&&(Jt(s?null:kt.clientWidth),Le.current.focus())},[He,s]),X.exports.useEffect(()=>{a&&Le.current.focus()},[a]),X.exports.useEffect(()=>{if(!y)return;const T=ya(Le.current).getElementById(y);if(T){const Z=()=>{getSelection().isCollapsed&&Le.current.focus()};return T.addEventListener("click",Z),()=>{T.removeEventListener("click",Z)}}},[y]);const Ct=(T,Z)=>{T?F&&F(Z):D&&D(Z),Bt||(Jt(s?null:kt.clientWidth),J(T))},Lt=T=>{T.button===0&&(T.preventDefault(),Le.current.focus(),Ct(!0,T))},Kt=T=>{Ct(!1,T)},yr=X.exports.Children.toArray(l),ne=T=>{const Z=yr.map(je=>je.props.value).indexOf(T.target.value);if(Z===-1)return;const ve=yr[Z];pe(ve.props.value),U&&U(T,ve)},Mt=T=>Z=>{let ve;if(!!Z.currentTarget.hasAttribute("tabindex")){if(k){ve=Array.isArray(le)?le.slice():[];const je=le.indexOf(T.props.value);je===-1?ve.push(T.props.value):ve.splice(je,1)}else ve=T.props.value;if(T.props.onClick&&T.props.onClick(Z),le!==ve&&(pe(ve),U)){const je=Z.nativeEvent||Z,ct=new je.constructor(je.type,je);Object.defineProperty(ct,"target",{writable:!0,value:{value:ve,name:E}}),U(ct,T)}k||Ct(!1,Z)}},Nt=T=>{W||[" ","ArrowUp","ArrowDown","Enter"].indexOf(T.key)!==-1&&(T.preventDefault(),Ct(!0,T))},Ie=He!==null&&xe,Ae=T=>{!Ie&&O&&(Object.defineProperty(T,"target",{writable:!0,value:{value:le,name:E}}),O(T))};delete ee["aria-invalid"];let fe,Be;const rt=[];let lt=!1;(M6({value:le})||v)&&(G?fe=G(le):lt=!0);const jt=yr.map((T,Z,ve)=>{var je,ct,ur,Dr;if(!X.exports.isValidElement(T))return null;let hr;if(k){if(!Array.isArray(le))throw new Error(kd(2));hr=le.some(Gr=>kI(Gr,T.props.value)),hr&<&&rt.push(T.props.children)}else hr=kI(le,T.props.value),hr&<&&(Be=T.props.children);if(T.props.value===void 0)return X.exports.cloneElement(T,{"aria-readonly":!0,role:"option"});const Rr=()=>{if(le)return hr;const Gr=ve.find(Nr=>{var Kn;return(Nr==null||(Kn=Nr.props)==null?void 0:Kn.value)!==void 0&&Nr.props.disabled!==!0});return T===Gr?!0:hr};return X.exports.cloneElement(T,{"aria-selected":hr?"true":"false",onClick:Mt(T),onKeyUp:Gr=>{Gr.key===" "&&Gr.preventDefault(),T.props.onKeyUp&&T.props.onKeyUp(Gr)},role:"option",selected:((je=ve[0])==null||(ct=je.props)==null?void 0:ct.value)===void 0||((ur=ve[0])==null||(Dr=ur.props)==null?void 0:Dr.disabled)===!0?Rr():hr,value:void 0,"data-value":T.props.value})});lt&&(k?rt.length===0?fe=null:fe=rt.reduce((T,Z,ve)=>(T.push(Z),ve{const{classes:t}=e;return t},D6={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>tu(e)&&e!=="variant",slot:"Root"},$ie=sr(P7,D6)(""),Fie=sr(L7,D6)(""),zie=sr(C7,D6)(""),N7=X.exports.forwardRef(function(t,r){const i=gi({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:a,classes:s={},className:l,defaultOpen:u=!1,displayEmpty:c=!1,IconComponent:d=nte,id:p,input:v,inputProps:x,label:b,labelId:y,MenuProps:_,multiple:k=!1,native:E=!1,onClose:O,onOpen:U,open:D,renderValue:j,SelectDisplayProps:F,variant:H="outlined"}=i,W=bn(i,Nie),G=E?vie:Lie,ae=hp(),oe=sg({props:i,muiFormControl:ae,states:["variant"]}).variant||H,P=v||{standard:EI||(EI=L($ie,{})),outlined:L(Fie,{label:b}),filled:AI||(AI=L(zie,{}))}[oe],ee=De({},i,{variant:oe,classes:s}),le=jie(ee),pe=Vo(r,P.ref);return L(X.exports.Fragment,{children:X.exports.cloneElement(P,De({inputComponent:G,inputProps:De({children:a,IconComponent:d,variant:oe,type:void 0,multiple:k},E?{id:p}:{autoWidth:o,defaultOpen:u,displayEmpty:c,labelId:y,MenuProps:_,onClose:O,onOpen:U,open:D,renderValue:j,SelectDisplayProps:De({id:p},F)},x,{classes:x?Is(le,x.classes):le},v?v.props.inputProps:{})},k&&E&&oe==="outlined"?{notched:!0}:{},{ref:pe,className:pn(P.props.className,l)},!v&&{variant:oe},W))})});N7.muiName="Select";const j7=N7;function Hie(e){return di("MuiSkeleton",e)}ri("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Wie=["animation","className","component","height","style","variant","width"];let rb=e=>e,TI,II,RI,PI;const Vie=e=>{const{classes:t,variant:r,animation:i,hasChildren:o,width:a,height:s}=e;return hi({root:["root",r,i,o&&"withChildren",o&&!a&&"fitContent",o&&!s&&"heightAuto"]},Hie,t)},qie=pp(TI||(TI=rb` + 0% { + opacity: 1; + } + + 50% { + opacity: 0.4; + } + + 100% { + opacity: 1; + } +`)),Kie=pp(II||(II=rb` + 0% { + transform: translateX(-100%); + } + + 50% { + /* +0.5s of delay between each loop */ + transform: translateX(100%); + } + + 100% { + transform: translateX(100%); + } +`)),Gie=sr("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.animation!==!1&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const r=hQ(e.shape.borderRadius)||"px",i=gQ(e.shape.borderRadius);return De({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Qi(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${i}${r}/${Math.round(i/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&B0(RI||(RI=rb` + animation: ${0} 1.5s ease-in-out 0.5s infinite; + `),qie),({ownerState:e,theme:t})=>e.animation==="wave"&&B0(PI||(PI=rb` + position: relative; + overflow: hidden; + + /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ + -webkit-mask-image: -webkit-radial-gradient(white, black); + + &::after { + animation: ${0} 1.6s linear 0.5s infinite; + background: linear-gradient( + 90deg, + transparent, + ${0}, + transparent + ); + content: ''; + position: absolute; + transform: translateX(-100%); /* Avoid flash during server-side hydration */ + bottom: 0; + left: 0; + right: 0; + top: 0; + } + `),Kie,(t.vars||t).palette.action.hover)),Yie=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d}=i,p=bn(i,Wie),v=De({},i,{animation:o,component:s,variant:c,hasChildren:Boolean(p.children)}),x=Vie(v);return L(Gie,De({as:s,ref:r,className:pn(x.root,a),ownerState:v},p,{style:De({width:d,height:l},u)}))}),Xa=Yie;function Zie(e){return di("MuiTooltip",e)}const Qie=ri("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),ed=Qie,Xie=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Jie(e){return Math.round(e*1e5)/1e5}const eoe=e=>{const{classes:t,disableInteractive:r,arrow:i,touch:o,placement:a}=e,s={popper:["popper",!r&&"popperInteractive",i&&"popperArrow"],tooltip:["tooltip",i&&"tooltipArrow",o&&"touch",`tooltipPlacement${Zr(a.split("-")[0])}`],arrow:["arrow"]};return hi(s,Zie,t)},toe=sr(v7,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>De({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${ed.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ed.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ed.arrow}`]:De({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${ed.arrow}`]:De({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),roe=sr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Zr(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>De({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Qi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Jie(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${ed.popper}[data-popper-placement*="left"] &`]:De({transformOrigin:"right center"},t.isRtl?De({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):De({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${ed.popper}[data-popper-placement*="right"] &`]:De({transformOrigin:"left center"},t.isRtl?De({marginRight:"14px"},t.touch&&{marginRight:"24px"}):De({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${ed.popper}[data-popper-placement*="top"] &`]:De({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${ed.popper}[data-popper-placement*="bottom"] &`]:De({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),noe=sr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Qi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Ev=!1,Z_=null;function Av(e,t){return r=>{t&&t(r),e(r)}}const ioe=X.exports.forwardRef(function(t,r){var i,o,a,s,l,u,c,d,p,v,x,b,y,_,k,E,O,U,D;const j=gi({props:t,name:"MuiTooltip"}),{arrow:F=!1,children:H,components:W={},componentsProps:G={},describeChild:ae=!1,disableFocusListener:V=!1,disableHoverListener:oe=!1,disableInteractive:P=!1,disableTouchListener:ee=!1,enterDelay:le=100,enterNextDelay:pe=0,enterTouchDelay:xe=700,followCursor:J=!1,id:ft,leaveDelay:Le=0,leaveTouchDelay:He=1500,onClose:nr,onOpen:Bt,open:Rt,placement:Jt="bottom",PopperComponent:vr,PopperProps:At={},slotProps:kt={},slots:Ct={},title:Lt,TransitionComponent:Kt=LS,TransitionProps:yr}=j,ne=bn(j,Xie),Mt=la(),Nt=Mt.direction==="rtl",[Ie,Ae]=X.exports.useState(),[fe,Be]=X.exports.useState(null),rt=X.exports.useRef(!1),lt=P||J,jt=X.exports.useRef(),ce=X.exports.useRef(),ie=X.exports.useRef(),de=X.exports.useRef(),[$,C]=R0({controlled:Rt,default:!1,name:"Tooltip",state:"open"});let T=$;const Z=Iw(ft),ve=X.exports.useRef(),je=X.exports.useCallback(()=>{ve.current!==void 0&&(document.body.style.WebkitUserSelect=ve.current,ve.current=void 0),clearTimeout(de.current)},[]);X.exports.useEffect(()=>()=>{clearTimeout(jt.current),clearTimeout(ce.current),clearTimeout(ie.current),je()},[je]);const ct=it=>{clearTimeout(Z_),Ev=!0,C(!0),Bt&&!T&&Bt(it)},ur=bl(it=>{clearTimeout(Z_),Z_=setTimeout(()=>{Ev=!1},800+Le),C(!1),nr&&T&&nr(it),clearTimeout(jt.current),jt.current=setTimeout(()=>{rt.current=!1},Mt.transitions.duration.shortest)}),Dr=it=>{rt.current&&it.type!=="touchstart"||(Ie&&Ie.removeAttribute("title"),clearTimeout(ce.current),clearTimeout(ie.current),le||Ev&&pe?ce.current=setTimeout(()=>{ct(it)},Ev?pe:le):ct(it))},hr=it=>{clearTimeout(ce.current),clearTimeout(ie.current),ie.current=setTimeout(()=>{ur(it)},Le)},{isFocusVisibleRef:Rr,onBlur:Gr,onFocus:Nr,ref:Kn}=Pw(),[,Tn]=X.exports.useState(!1),In=it=>{Gr(it),Rr.current===!1&&(Tn(!1),hr(it))},yt=it=>{Ie||Ae(it.currentTarget),Nr(it),Rr.current===!0&&(Tn(!0),Dr(it))},Ei=it=>{rt.current=!0;const dt=H.props;dt.onTouchStart&&dt.onTouchStart(it)},Yn=Dr,Pi=hr,Ji=it=>{Ei(it),clearTimeout(ie.current),clearTimeout(jt.current),je(),ve.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.current=setTimeout(()=>{document.body.style.WebkitUserSelect=ve.current,Dr(it)},xe)},qo=it=>{H.props.onTouchEnd&&H.props.onTouchEnd(it),je(),clearTimeout(ie.current),ie.current=setTimeout(()=>{ur(it)},He)};X.exports.useEffect(()=>{if(!T)return;function it(dt){(dt.key==="Escape"||dt.key==="Esc")&&ur(dt)}return document.addEventListener("keydown",it),()=>{document.removeEventListener("keydown",it)}},[ur,T]);const eo=Vo(H.ref,Kn,Ae,r);!Lt&&Lt!==0&&(T=!1);const Mo=X.exports.useRef({x:0,y:0}),Wi=X.exports.useRef(),pa=it=>{const dt=H.props;dt.onMouseMove&&dt.onMouseMove(it),Mo.current={x:it.clientX,y:it.clientY},Wi.current&&Wi.current.update()},ue={},Re=typeof Lt=="string";ae?(ue.title=!T&&Re&&!oe?Lt:null,ue["aria-describedby"]=T?Z:null):(ue["aria-label"]=Re?Lt:null,ue["aria-labelledby"]=T&&!Re?Z:null);const Ee=De({},ue,ne,H.props,{className:pn(ne.className,H.props.className),onTouchStart:Ei,ref:eo},J?{onMouseMove:pa}:{}),q={};ee||(Ee.onTouchStart=Ji,Ee.onTouchEnd=qo),oe||(Ee.onMouseOver=Av(Yn,Ee.onMouseOver),Ee.onMouseLeave=Av(Pi,Ee.onMouseLeave),lt||(q.onMouseOver=Yn,q.onMouseLeave=Pi)),V||(Ee.onFocus=Av(yt,Ee.onFocus),Ee.onBlur=Av(In,Ee.onBlur),lt||(q.onFocus=yt,q.onBlur=In));const Fe=X.exports.useMemo(()=>{var it;let dt=[{name:"arrow",enabled:Boolean(fe),options:{element:fe,padding:4}}];return(it=At.popperOptions)!=null&&it.modifiers&&(dt=dt.concat(At.popperOptions.modifiers)),De({},At.popperOptions,{modifiers:dt})},[fe,At]),Xt=De({},j,{isRtl:Nt,arrow:F,disableInteractive:lt,placement:Jt,PopperComponentProp:vr,touch:rt.current}),ar=eoe(Xt),Br=(i=(o=Ct.popper)!=null?o:W.Popper)!=null?i:toe,Hr=(a=(s=(l=Ct.transition)!=null?l:W.Transition)!=null?s:Kt)!=null?a:LS,An=(u=(c=Ct.tooltip)!=null?c:W.Tooltip)!=null?u:roe,un=(d=(p=Ct.arrow)!=null?p:W.Arrow)!=null?d:noe,vt=Um(Br,De({},At,(v=kt.popper)!=null?v:G.popper,{className:pn(ar.popper,At?.className,(x=(b=kt.popper)!=null?b:G.popper)==null?void 0:x.className)}),Xt),K=Um(Hr,De({},yr,(y=kt.transition)!=null?y:G.transition),Xt),ye=Um(An,De({},(_=kt.tooltip)!=null?_:G.tooltip,{className:pn(ar.tooltip,(k=(E=kt.tooltip)!=null?E:G.tooltip)==null?void 0:k.className)}),Xt),Me=Um(un,De({},(O=kt.arrow)!=null?O:G.arrow,{className:pn(ar.arrow,(U=(D=kt.arrow)!=null?D:G.arrow)==null?void 0:U.className)}),Xt);return Ut(X.exports.Fragment,{children:[X.exports.cloneElement(H,Ee),L(Br,De({as:vr??v7,placement:Jt,anchorEl:J?{getBoundingClientRect:()=>({top:Mo.current.y,left:Mo.current.x,right:Mo.current.x,bottom:Mo.current.y,width:0,height:0})}:Ie,popperRef:Wi,open:Ie?T:!1,id:Z,transition:!0},q,vt,{popperOptions:Fe,children:({TransitionProps:it})=>L(Hr,De({timeout:Mt.transitions.duration.shorter},it,K,{children:Ut(An,De({},ye,{children:[Lt,F?L(un,De({},Me,{ref:Be})):null]}))}))}))]})}),$7=ioe,ooe=["component","direction","spacing","divider","children"];function aoe(e,t){const r=X.exports.Children.toArray(e).filter(Boolean);return r.reduce((i,o,a)=>(i.push(o),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],loe=({ownerState:e,theme:t})=>{let r=De({display:"flex",flexDirection:"column"},Os({theme:t},Cf({values:e.direction,breakpoints:t.breakpoints.values}),i=>({flexDirection:i})));if(e.spacing){const i=p6(t),o=Object.keys(t.breakpoints.values).reduce((u,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(u[c]=!0),u),{}),a=Cf({values:e.direction,base:o}),s=Cf({values:e.spacing,base:o});typeof a=="object"&&Object.keys(a).forEach((u,c,d)=>{if(!a[u]){const v=c>0?a[d[c-1]]:"column";a[u]=v}}),r=Is(r,Os({theme:t},s,(u,c)=>({"& > :not(style) + :not(style)":{margin:0,[`margin${soe(c?a[c]:e.direction)}`]:og(i,u)}})))}return r=pY(t.breakpoints,r),r},uoe=sr("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>[t.root]})(loe),coe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiStack"}),o=Xw(i),{component:a="div",direction:s="column",spacing:l=0,divider:u,children:c}=o,d=bn(o,ooe);return L(uoe,De({as:a,ownerState:{direction:s,spacing:l},ref:r},d,{children:u?aoe(c,u):c}))}),xs=coe;function doe(e){return di("MuiSwitch",e)}const foe=ri("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),ls=foe,poe=["className","color","edge","size","sx"],hoe=e=>{const{classes:t,edge:r,size:i,color:o,checked:a,disabled:s}=e,l={root:["root",r&&`edge${Zr(r)}`,`size${Zr(i)}`],switchBase:["switchBase",`color${Zr(o)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=hi(l,doe,t);return De({},t,u)},goe=sr("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${Zr(r.edge)}`],t[`size${Zr(r.size)}`]]}})(({ownerState:e})=>De({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${ls.thumb}`]:{width:16,height:16},[`& .${ls.switchBase}`]:{padding:4,[`&.${ls.checked}`]:{transform:"translateX(16px)"}}})),moe=sr(Rte,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${ls.input}`]:t.input},r.color!=="default"&&t[`color${Zr(r.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ls.checked}`]:{transform:"translateX(20px)"},[`&.${ls.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ls.checked} + .${ls.track}`]:{opacity:.5},[`&.${ls.disabled} + .${ls.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${ls.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>De({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${ls.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Qi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ls.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Bh(e.palette[t.color].main,.62):Oh(e.palette[t.color].main,.55)}`}},[`&.${ls.checked} + .${ls.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),yoe=sr("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),voe=sr("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),boe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSwitch"}),{className:o,color:a="primary",edge:s=!1,size:l="medium",sx:u}=i,c=bn(i,poe),d=De({},i,{color:a,edge:s,size:l}),p=hoe(d),v=L(voe,{className:p.thumb,ownerState:d});return Ut(goe,{className:pn(p.root,o),sx:u,ownerState:d,children:[L(moe,De({type:"checkbox",icon:v,checkedIcon:v,ref:r,ownerState:d},c,{classes:De({},p,{root:p.switchBase})})),L(yoe,{className:p.track,ownerState:d})]})}),woe=boe;function xoe(e){return di("MuiTab",e)}const _oe=ri("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Qd=_oe,Soe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Coe=e=>{const{classes:t,textColor:r,fullWidth:i,wrapped:o,icon:a,label:s,selected:l,disabled:u}=e,c={root:["root",a&&s&&"labelIcon",`textColor${Zr(r)}`,i&&"fullWidth",o&&"wrapped",l&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return hi(c,xoe,t)},koe=sr(Ad,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${Zr(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>De({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Qd.iconWrapper}`]:De({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Qd.selected}`]:{opacity:1},[`&.${Qd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Qd.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Qd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Qd.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Qd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),Eoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTab"}),{className:o,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:l,icon:u,iconPosition:c="top",indicator:d,label:p,onChange:v,onClick:x,onFocus:b,selected:y,selectionFollowsFocus:_,textColor:k="inherit",value:E,wrapped:O=!1}=i,U=bn(i,Soe),D=De({},i,{disabled:a,disableFocusRipple:s,selected:y,icon:!!u,iconPosition:c,label:!!p,fullWidth:l,textColor:k,wrapped:O}),j=Coe(D),F=u&&p&&X.exports.isValidElement(u)?X.exports.cloneElement(u,{className:pn(j.iconWrapper,u.props.className)}):u,H=G=>{!y&&v&&v(G,E),x&&x(G)},W=G=>{_&&!y&&v&&v(G,E),b&&b(G)};return Ut(koe,De({focusRipple:!s,className:pn(j.root,o),ref:r,role:"tab","aria-selected":y,disabled:a,onClick:H,onFocus:W,ownerState:D,tabIndex:y?0:-1},U,{children:[c==="top"||c==="start"?Ut(X.exports.Fragment,{children:[F,p]}):Ut(X.exports.Fragment,{children:[p,F]}),d]}))}),Q_=Eoe,Aoe=X.exports.createContext(),F7=Aoe;function Toe(e){return di("MuiTable",e)}ri("MuiTable",["root","stickyHeader"]);const Ioe=["className","component","padding","size","stickyHeader"],Roe=e=>{const{classes:t,stickyHeader:r}=e;return hi({root:["root",r&&"stickyHeader"]},Toe,t)},Poe=sr("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>De({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":De({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),MI="table",Moe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTable"}),{className:o,component:a=MI,padding:s="normal",size:l="medium",stickyHeader:u=!1}=i,c=bn(i,Ioe),d=De({},i,{component:a,padding:s,size:l,stickyHeader:u}),p=Roe(d),v=X.exports.useMemo(()=>({padding:s,size:l,stickyHeader:u}),[s,l,u]);return L(F7.Provider,{value:v,children:L(Poe,De({as:a,role:a===MI?null:"table",ref:r,className:pn(p.root,o),ownerState:d},c))})}),L6=Moe,Ooe=X.exports.createContext(),f2=Ooe;function Boe(e){return di("MuiTableBody",e)}ri("MuiTableBody",["root"]);const Uoe=["className","component"],Doe=e=>{const{classes:t}=e;return hi({root:["root"]},Boe,t)},Loe=sr("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),Noe={variant:"body"},OI="tbody",joe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableBody"}),{className:o,component:a=OI}=i,s=bn(i,Uoe),l=De({},i,{component:a}),u=Doe(l);return L(f2.Provider,{value:Noe,children:L(Loe,De({className:pn(u.root,o),as:a,ref:r,role:a===OI?null:"rowgroup",ownerState:l},s))})}),N6=joe;function $oe(e){return di("MuiTableCell",e)}const Foe=ri("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),zoe=Foe,Hoe=["align","className","component","padding","scope","size","sortDirection","variant"],Woe=e=>{const{classes:t,variant:r,align:i,padding:o,size:a,stickyHeader:s}=e,l={root:["root",r,s&&"stickyHeader",i!=="inherit"&&`align${Zr(i)}`,o!=="normal"&&`padding${Zr(o)}`,`size${Zr(a)}`]};return hi(l,$oe,t)},Voe=sr("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${Zr(r.size)}`],r.padding!=="normal"&&t[`padding${Zr(r.padding)}`],r.align!=="inherit"&&t[`align${Zr(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>De({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode==="light"?Bh(Qi(e.palette.divider,1),.88):Oh(Qi(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${zoe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),qoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:l,scope:u,size:c,sortDirection:d,variant:p}=i,v=bn(i,Hoe),x=X.exports.useContext(F7),b=X.exports.useContext(f2),y=b&&b.variant==="head";let _;s?_=s:_=y?"th":"td";let k=u;_==="td"?k=void 0:!k&&y&&(k="col");const E=p||b&&b.variant,O=De({},i,{align:o,component:_,padding:l||(x&&x.padding?x.padding:"normal"),size:c||(x&&x.size?x.size:"medium"),sortDirection:d,stickyHeader:E==="head"&&x&&x.stickyHeader,variant:E}),U=Woe(O);let D=null;return d&&(D=d==="asc"?"ascending":"descending"),L(Voe,De({as:_,ref:r,className:pn(U.root,a),"aria-sort":D,scope:k,ownerState:O},v))}),j6=qoe;function Koe(e){return di("MuiTableContainer",e)}ri("MuiTableContainer",["root"]);const Goe=["className","component"],Yoe=e=>{const{classes:t}=e;return hi({root:["root"]},Koe,t)},Zoe=sr("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Qoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableContainer"}),{className:o,component:a="div"}=i,s=bn(i,Goe),l=De({},i,{component:a}),u=Yoe(l);return L(Zoe,De({ref:r,as:a,className:pn(u.root,o),ownerState:l},s))}),Xoe=Qoe;function Joe(e){return di("MuiTableHead",e)}ri("MuiTableHead",["root"]);const eae=["className","component"],tae=e=>{const{classes:t}=e;return hi({root:["root"]},Joe,t)},rae=sr("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),nae={variant:"head"},BI="thead",iae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableHead"}),{className:o,component:a=BI}=i,s=bn(i,eae),l=De({},i,{component:a}),u=tae(l);return L(f2.Provider,{value:nae,children:L(rae,De({as:a,className:pn(u.root,o),ref:r,role:a===BI?null:"rowgroup",ownerState:l},s))})}),z7=iae,oae=Nu(L("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),aae=Nu(L("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function sae(e){return di("MuiTableRow",e)}const lae=ri("MuiTableRow",["root","selected","hover","head","footer"]),UI=lae,uae=["className","component","hover","selected"],cae=e=>{const{classes:t,selected:r,hover:i,head:o,footer:a}=e;return hi({root:["root",r&&"selected",i&&"hover",o&&"head",a&&"footer"]},sae,t)},dae=sr("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${UI.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${UI.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Qi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),DI="tr",fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableRow"}),{className:o,component:a=DI,hover:s=!1,selected:l=!1}=i,u=bn(i,uae),c=X.exports.useContext(f2),d=De({},i,{component:a,hover:s,selected:l,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),p=cae(d);return L(dae,De({as:a,ref:r,className:pn(p.root,o),role:a===DI?null:"row",ownerState:d},u))}),xc=fae;function pae(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function hae(e,t,r,i={},o=()=>{}){const{ease:a=pae,duration:s=300}=i;let l=null;const u=t[e];let c=!1;const d=()=>{c=!0},p=v=>{if(c){o(new Error("Animation cancelled"));return}l===null&&(l=v);const x=Math.min(1,(v-l)/s);if(t[e]=a(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(p)};return u===r?(o(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const gae=["onChange"],mae={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function yae(e){const{onChange:t}=e,r=bn(e,gae),i=X.exports.useRef(),o=X.exports.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return X.exports.useEffect(()=>{const s=Uf(()=>{const u=i.current;a(),u!==i.current&&t(i.current)}),l=El(o.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),X.exports.useEffect(()=>{a(),t(i.current)},[t]),L("div",De({style:mae,ref:o},r))}function vae(e){return di("MuiTabScrollButton",e)}const bae=ri("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),wae=bae;var LI,NI;const xae=["className","direction","orientation","disabled"],_ae=e=>{const{classes:t,orientation:r,disabled:i}=e;return hi({root:["root",r,i&&"disabled"]},vae,t)},Sae=sr(Ad,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>De({width:40,flexShrink:0,opacity:.8,[`&.${wae.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Cae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabScrollButton"}),{className:o,direction:a}=i,s=bn(i,xae),u=la().direction==="rtl",c=De({isRtl:u},i),d=_ae(c);return L(Sae,De({component:"div",className:pn(d.root,o),ref:r,role:null,ownerState:c,tabIndex:null},s,{children:a==="left"?LI||(LI=L(oae,{fontSize:"small"})):NI||(NI=L(aae,{fontSize:"small"}))}))}),kae=Cae;function Eae(e){return di("MuiTabs",e)}const Aae=ri("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),X_=Aae,Tae=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],jI=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$I=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Tv=(e,t,r)=>{let i=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(i)return;i=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=r(e,o);else{o.focus();return}}},Iae=e=>{const{vertical:t,fixed:r,hideScrollbar:i,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e;return hi({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",i&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},Eae,u)},Rae=sr("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${X_.scrollButtons}`]:t.scrollButtons},{[`& .${X_.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>De({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${X_.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Pae=sr("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>De({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Mae=sr("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>De({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Oae=sr("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>De({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Bae=sr(yae,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),FI={},Uae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabs"}),o=la(),a=o.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:u,centered:c=!1,children:d,className:p,component:v="div",allowScrollButtonsMobile:x=!1,indicatorColor:b="primary",onChange:y,orientation:_="horizontal",ScrollButtonComponent:k=kae,scrollButtons:E="auto",selectionFollowsFocus:O,TabIndicatorProps:U={},TabScrollButtonProps:D={},textColor:j="primary",value:F,variant:H="standard",visibleScrollbar:W=!1}=i,G=bn(i,Tae),ae=H==="scrollable",V=_==="vertical",oe=V?"scrollTop":"scrollLeft",P=V?"top":"left",ee=V?"bottom":"right",le=V?"clientHeight":"clientWidth",pe=V?"height":"width",xe=De({},i,{component:v,allowScrollButtonsMobile:x,indicatorColor:b,orientation:_,vertical:V,scrollButtons:E,textColor:j,variant:H,visibleScrollbar:W,fixed:!ae,hideScrollbar:ae&&!W,scrollableX:ae&&!V,scrollableY:ae&&V,centered:c&&!ae,scrollButtonsHideMobile:!x}),J=Iae(xe),[ft,Le]=X.exports.useState(!1),[He,nr]=X.exports.useState(FI),[Bt,Rt]=X.exports.useState({start:!1,end:!1}),[Jt,vr]=X.exports.useState({overflow:"hidden",scrollbarWidth:0}),At=new Map,kt=X.exports.useRef(null),Ct=X.exports.useRef(null),Lt=()=>{const C=kt.current;let T;if(C){const ve=C.getBoundingClientRect();T={clientWidth:C.clientWidth,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop,scrollLeftNormalized:yT(C,o.direction),scrollWidth:C.scrollWidth,top:ve.top,bottom:ve.bottom,left:ve.left,right:ve.right}}let Z;if(C&&F!==!1){const ve=Ct.current.children;if(ve.length>0){const je=ve[At.get(F)];Z=je?je.getBoundingClientRect():null}}return{tabsMeta:T,tabMeta:Z}},Kt=bl(()=>{const{tabsMeta:C,tabMeta:T}=Lt();let Z=0,ve;if(V)ve="top",T&&C&&(Z=T.top-C.top+C.scrollTop);else if(ve=a?"right":"left",T&&C){const ct=a?C.scrollLeftNormalized+C.clientWidth-C.scrollWidth:C.scrollLeft;Z=(a?-1:1)*(T[ve]-C[ve]+ct)}const je={[ve]:Z,[pe]:T?T[pe]:0};if(isNaN(He[ve])||isNaN(He[pe]))nr(je);else{const ct=Math.abs(He[ve]-je[ve]),ur=Math.abs(He[pe]-je[pe]);(ct>=1||ur>=1)&&nr(je)}}),yr=(C,{animation:T=!0}={})=>{T?hae(oe,kt.current,C,{duration:o.transitions.duration.standard}):kt.current[oe]=C},ne=C=>{let T=kt.current[oe];V?T+=C:(T+=C*(a?-1:1),T*=a&&AU()==="reverse"?-1:1),yr(T)},Mt=()=>{const C=kt.current[le];let T=0;const Z=Array.from(Ct.current.children);for(let ve=0;veC){ve===0&&(T=C);break}T+=je[le]}return T},Nt=()=>{ne(-1*Mt())},Ie=()=>{ne(Mt())},Ae=X.exports.useCallback(C=>{vr({overflow:null,scrollbarWidth:C})},[]),fe=()=>{const C={};C.scrollbarSizeListener=ae?L(Bae,{onChange:Ae,className:pn(J.scrollableX,J.hideScrollbar)}):null;const T=Bt.start||Bt.end,Z=ae&&(E==="auto"&&T||E===!0);return C.scrollButtonStart=Z?L(k,De({orientation:_,direction:a?"right":"left",onClick:Nt,disabled:!Bt.start},D,{className:pn(J.scrollButtons,D.className)})):null,C.scrollButtonEnd=Z?L(k,De({orientation:_,direction:a?"left":"right",onClick:Ie,disabled:!Bt.end},D,{className:pn(J.scrollButtons,D.className)})):null,C},Be=bl(C=>{const{tabsMeta:T,tabMeta:Z}=Lt();if(!(!Z||!T)){if(Z[P]T[ee]){const ve=T[oe]+(Z[ee]-T[ee]);yr(ve,{animation:C})}}}),rt=bl(()=>{if(ae&&E!==!1){const{scrollTop:C,scrollHeight:T,clientHeight:Z,scrollWidth:ve,clientWidth:je}=kt.current;let ct,ur;if(V)ct=C>1,ur=C1,ur=a?Dr>1:Dr{const C=Uf(()=>{kt.current&&(Kt(),rt())}),T=El(kt.current);T.addEventListener("resize",C);let Z;return typeof ResizeObserver<"u"&&(Z=new ResizeObserver(C),Array.from(Ct.current.children).forEach(ve=>{Z.observe(ve)})),()=>{C.clear(),T.removeEventListener("resize",C),Z&&Z.disconnect()}},[Kt,rt]);const lt=X.exports.useMemo(()=>Uf(()=>{rt()}),[rt]);X.exports.useEffect(()=>()=>{lt.clear()},[lt]),X.exports.useEffect(()=>{Le(!0)},[]),X.exports.useEffect(()=>{Kt(),rt()}),X.exports.useEffect(()=>{Be(FI!==He)},[Be,He]),X.exports.useImperativeHandle(u,()=>({updateIndicator:Kt,updateScrollButtons:rt}),[Kt,rt]);const jt=L(Oae,De({},U,{className:pn(J.indicator,U.className),ownerState:xe,style:De({},He,U.style)}));let ce=0;const ie=X.exports.Children.map(d,C=>{if(!X.exports.isValidElement(C))return null;const T=C.props.value===void 0?ce:C.props.value;At.set(T,ce);const Z=T===F;return ce+=1,X.exports.cloneElement(C,De({fullWidth:H==="fullWidth",indicator:Z&&!ft&&jt,selected:Z,selectionFollowsFocus:O,onChange:y,textColor:j,value:T},ce===1&&F===!1&&!C.props.tabIndex?{tabIndex:0}:{}))}),de=C=>{const T=Ct.current,Z=ya(T).activeElement;if(Z.getAttribute("role")!=="tab")return;let je=_==="horizontal"?"ArrowLeft":"ArrowUp",ct=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&a&&(je="ArrowRight",ct="ArrowLeft"),C.key){case je:C.preventDefault(),Tv(T,Z,$I);break;case ct:C.preventDefault(),Tv(T,Z,jI);break;case"Home":C.preventDefault(),Tv(T,null,jI);break;case"End":C.preventDefault(),Tv(T,null,$I);break}},$=fe();return Ut(Rae,De({className:pn(J.root,p),ownerState:xe,ref:r,as:v},G,{children:[$.scrollButtonStart,$.scrollbarSizeListener,Ut(Pae,{className:J.scroller,ownerState:xe,style:{overflow:Jt.overflow,[V?`margin${a?"Left":"Right"}`:"marginBottom"]:W?void 0:-Jt.scrollbarWidth},ref:kt,onScroll:lt,children:[L(Mae,{"aria-label":s,"aria-labelledby":l,"aria-orientation":_==="vertical"?"vertical":null,className:J.flexContainer,ownerState:xe,onKeyDown:de,ref:Ct,role:"tablist",children:ie}),ft&&jt]}),$.scrollButtonEnd]}))}),H7=Uae;function Dae(e){return di("MuiTextField",e)}ri("MuiTextField",["root"]);const Lae=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Nae={standard:P7,filled:C7,outlined:L7},jae=e=>{const{classes:t}=e;return hi({root:["root"]},Dae,t)},$ae=sr(k7,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:l,color:u="primary",defaultValue:c,disabled:d=!1,error:p=!1,FormHelperTextProps:v,fullWidth:x=!1,helperText:b,id:y,InputLabelProps:_,inputProps:k,InputProps:E,inputRef:O,label:U,maxRows:D,minRows:j,multiline:F=!1,name:H,onBlur:W,onChange:G,onFocus:ae,placeholder:V,required:oe=!1,rows:P,select:ee=!1,SelectProps:le,type:pe,value:xe,variant:J="outlined"}=i,ft=bn(i,Lae),Le=De({},i,{autoFocus:a,color:u,disabled:d,error:p,fullWidth:x,multiline:F,required:oe,select:ee,variant:J}),He=jae(Le),nr={};J==="outlined"&&(_&&typeof _.shrink<"u"&&(nr.notched=_.shrink),nr.label=U),ee&&((!le||!le.native)&&(nr.id=void 0),nr["aria-describedby"]=void 0);const Bt=Iw(y),Rt=b&&Bt?`${Bt}-helper-text`:void 0,Jt=U&&Bt?`${Bt}-label`:void 0,vr=Nae[J],At=L(vr,De({"aria-describedby":Rt,autoComplete:o,autoFocus:a,defaultValue:c,fullWidth:x,multiline:F,name:H,rows:P,maxRows:D,minRows:j,type:pe,value:xe,id:Bt,inputRef:O,onBlur:W,onChange:G,onFocus:ae,placeholder:V,inputProps:k},nr,E));return Ut($ae,De({className:pn(He.root,l),disabled:d,error:p,fullWidth:x,ref:r,required:oe,color:u,variant:J,ownerState:Le},ft,{children:[U!=null&&U!==""&&L(mne,De({htmlFor:Bt,id:Jt},_,{children:U})),ee?L(j7,De({"aria-describedby":Rt,id:Bt,labelId:Jt,value:xe,input:At},le,{children:s})):At,b&&L(Ore,De({id:Rt},v,{children:b}))]}))}),wh=Fae,W7=1160,zae=250,$6="https://github.com/orbs-network/ton-contract-verifier",Hae=sr(c2)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"0px 16px",margin:"auto",maxWidth:160,width:e.width||"100%",height:e.height||"100%",fontSize:e.fontSize||14,fontWeight:e.fontWeight||400,boxShadow:"none",borderRadius:40,border:e.transparent?"1px solid #50A7EA":"",background:e.background||"inherit",whiteSpace:"nowrap",textTransform:"none",color:e.textColor||"#000","&:hover":{background:e.hoverBackground||"inherit"},"& img":{maxWidth:22},"&:disabled":{background:"#D9D9D9"},[t.breakpoints.down(900)]:{padding:0,minWidth:25}})),Ha=({children:e,disabled:t,onClick:r,type:i="button",fontSize:o=14,fontWeight:a,transparent:s,background:l,hoverBackground:u,width:c,height:d,textColor:p})=>L(Hae,{width:c,height:d,fontSize:o,fontWeight:a,transparent:s,background:l,textColor:p,hoverBackground:u,className:"base-button",type:i,onClick:r||(()=>{}),variant:s?"outlined":"contained",disabled:t,disableElevation:!0,children:e}),Wae="/assets/recent-search.82384f57.svg",$n=sr(kn)(()=>({display:"flex",alignItems:"center"})),ug=sr(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,color:"#000",border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}),p2=sr($n)({padding:"30px 24px 0 24px"}),cg=sr($n)({marginRight:8}),Fd=sr(jo)({fontSize:20,color:"#161C28",fontWeight:800}),Vae=Xi(da)(({theme:e})=>({position:"absolute",top:"calc(100% + 10px)",left:0,padding:`${e.spacing(1)}, ${e.spacing(2)}`,zIndex:99,background:"rgba(232,233,235)",border:"0.5px solid rgba(114, 138, 150, 0.16)",borderRadius:16,width:"100%",maxHeight:450,overflowY:"auto",[e.breakpoints.down("md")]:{display:"none"}})),qae=Xi(da)({display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",fontSize:20,color:"#000",fontWeight:500,height:30,padding:"20px 21px",transitionDuration:".15s","&:hover":{cursor:"pointer",background:"rgb(225,227,230)"}}),Kae=({searchResults:e,onItemClick:t,onItemDelete:r,onHistoryClear:i})=>Ut(Vae,{children:[e.map(o=>Ut(qae,{onClick:()=>t(o),children:[Ut($n,{children:[L($n,{mr:1.5,children:L("img",{width:18,height:18,src:Wae,alt:"Search Icon"})}),L(jo,{children:o})]}),L(Bs,{onClick:a=>r(a,o),children:L("img",{src:b6,alt:"Close Icon",width:16,height:16})})]})),L($n,{mt:2,mb:1,ml:1,sx:{width:"fit-content"},children:L(Ha,{onClick:i,height:34,transparent:!0,children:"Clear History"})})]});function Ac(){const e=py(),t=ZC();return(r,i)=>{t(typeof r=="string"?{pathname:r,search:e.search,hash:e.hash}:r,i)}}function Gae(e,t,r){const i=document.createElement("a"),o=new Blob([e],{type:r});i.href=URL.createObjectURL(o),i.download=t,i.click()}const V7=[{category:"Wallets - FIFT",contracts:[["wallet v1r1","EQAAQ-CfIZkUjmZ6ES9D_keK2yHz10U1ba49K0S86Whva74Z"],["wallet v1r2","EQAAVd4c_2pMb4Bp8BxumyV8jutdwJ9R-q0dBqQj7tj_W8SX"],["wallet v1r3","EQAAEgdraul87g9zvm5Lxtd9FNoebifojeyT90uG6zrWBvRh"],["wallet v2r1","EQAAC2tOLQxG4KuFcS_pb2Rta1MDdgx8wAtZnGf5bIEIMLft"],["wallet v2r2","EQAAnU-irJsuuljRAWBRUhdvFB-rvGRHbdQSWXPSQYND6MVb"],["wallet v3r1","EQAY_2_A88HD43S96hbVGbCLB21e6_k1nbaqICwS3ZCrMBaZ"],["wallet v3r2","EQALgHQ-KpmkwftbsdeZdA4DvVDCYkKvria9llb7_RMeZj_8"]]},{category:"DNS",contracts:[["dns-root","Ef_lZ1T4NCb2mwkme9h2rJfESCE0W34ma9lWp7-_uY3zXDvq"],["dns-collection","EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz"],["dns-item","EQAGSjhQajnMSne9c9hGnKdMKmohX2-MkZuOkk7TmwQKwFOU"]]},{category:"Jettons",contracts:[["jetton-minter-discoverable","EQD-LkpmPTHhPW68cNfc7B83NcfE9JyGegXzAT8LetpQSRSm"],["jetton-minter","EQBb4JNqn4Z6U6-nf0cSLnOJo2dxj1QRuGoq-y6Hod72jPbl"],["jetton-wallet","EQAhuLHxOcrBwwMHKDnCUMYefuHwJ2iTOFKHWYQlDD-dgb__"],["jetton-wallet-fwd-fee","EQDt0qeoHwip8CtuUeNsaKjK-g0rwL7zUunKAnv0NCTZDSs3"],["kotecoin-minter","EQBlU_tKISgpepeMFT9t3xTDeiVmo25dW_4vUOl6jId_BNIj"]]},{category:"Wallets",contracts:[["wallet-v4","EQDerEPTIh0O8lBdjWc6aLaJs5HYqlfBN2Ruj1lJQH_6vcaZ"],["wallet-subscription-plugin","EQAteJqywxP0g6-6e6LX7VRKKDmZDoQv1Mhx0hdslJvAUGEy"],["highload-wallet-v2","EQBPrDVWoh-AMOk3fhgPPEDs6XkN5OC6kKP9N4-7hdAkFSmO"],["highload-wallet","EQBSXD33ezTpFxVVIB7SA5vuagUa2E8LO9ujIEGnpbyMXYHT"],["lockup-wallet-universal","0QBy4wyHHuR0jOyz7uM2BH8r5aSix7251ySvQt4OZRX9veAD"]]},{category:"Source Verifier",contracts:[["sources-registry","EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"],["source-item","EQAXUJjoC9RUnBgTJdpp_XXebYUbq-sibaYnZ1C6Rojesz8w"]]},{category:"Validators/Staking",contracts:[["single-nominator","Ef_BLbagjGnqZEkpURP96guu7M9aICAYe5hKB_P5Ng5Gju5Y"],["nominator-pool","Ef8iu8EiNOP2MczVvHseFi-CrGO1C4v6MkSSOgVZcESNGfT7"]]},{category:"NFTs",contracts:[["telemint-item","EQAwC64h_7B6YrmGlsto39tBcFWjjakGzSvV7QaMwXiMKy20"],["telemint-collection","EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi"],["nft-item-v1","EQCZLzCnJuXCBktkb5IiqANbgThvqo2hYXjpupdTe5yHV6oY"],["sbt-item","EQC7JOIVycOY_cQnNRVtEBk8DpEFClZM8S3TlqfuD72jvU59"],["nft-single","EQBPIJPKd1G8eJ8vIWUnkpRf-5rpRp_oqiOepv3Tf571LKbq"],["nft-marketplace-v2","EQBYTuYbLf8INxFtD8tQeNk5ZLy-nAX9ahQbG_yl1qQ-GEMS"],["nft-item-editable","EQC2VNMbjQ8BY8b4iXTEop7dxNgYEXPAlr6ph1I-h42LrdED"],["nft-offer","EQA6rqhL9hxd8c3c1JVYQPohQVicy8PEZibTgF60iQCSEk1c"],["nft-fixprice-sale-v2","EQBeaUJdPdO66uL-P_D7-oHClw6uYIAPxoo9CX-TE6psn6lk"],["nft-fixprice-sale-v3","EQCljxPgw_0Z0uELYyt7AoGsmtGP7ORB-A4jk-gyuNJIjsRW"],["nft-collection-editable","EQCHmW1OkT6_-_vO6zoSFW9Z2T62dhffNZkkKRpdaPTFLPdT"],["nft-auction","EQC1yTmHvpD5z4Dk_l-YnEhZclc06utSisqhthfzBGz-w0Ae"],["nft-auction-v2","EQCnTg1uvsqc1ZCSgEOl5Yk5LItktG6OOYrSQ8SnJP4FFa58"]]},{category:"DEX",contracts:[["amm-minter","EQBIzHiopIkaXdXdSZ6Sm57kZV0y_5tZjnGO4fTUsMT0lOUz"]]},{category:"Core",contracts:[["elector","Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"],["config","Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn","latest code in github does not match onchain, func0.2.0 with smart contract from commit 9bff928"]]},{category:"Bridge",contracts:[["eth-bridge","Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr"],["eth-bridge-multisig-gov-v2","Ef87m7_QrVM4uXAPCDM4DuF9Rj5Rwa5nHubwiQG96JmyAjQY"],["eth-bridge-multisig-gov-v1","kf8rV4RD7BD-j_C-Xsu8FBO9BOOOwISjNPbBC8tcq688Gcmk"],["eth-bridge-votes-collector","EQCuzvIOXLjH2tv35gY4tzhIvXCqZWDuK9kUhFGXKLImgxT5"],["bsc-bridge-multisig-gov-v1","kf8_gV8rpqtPl1vmYDrMzwxlGQDJ63SIKO8vDhNZHT5wwVhd"],["bsc-bridge-multisig-gov-v2","kf8OvX_5ynDgbp4iqJIvWudSEanWo0qAlOjhWHtga9u2Yo7j"],["bsc-bridge-votes-collector","EQAHI1vGuw7d4WG-CtfDrWqEPNtmUuKjKFEFeJmZaqqfWTvW"],["bsc-bridge","Ef9NXAIQs12t2qIZ-sRZ26D977H65Ol6DQeXc5_gUNaUys5r"]]},{category:"Other",contracts:[["counter","EQC-QTihJV_B4f8M2nynateMLynaRT_uwNYnnuyy87kam-G7"],["tact-example","EQA7c2RpiXxH1X52lvOxLFrVj4MukLeuCENcM86rHYcQdbha"]]},{category:"Unverified",contracts:[["system","Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU"]]}];function Yae(){const e=([r,i,o])=>`[https://verifier.ton.org/${i}] // ${r} ${o??""}`,t=["# Verified Examples"];V7.forEach(({category:r,contracts:i})=>{t.push(`## ${r}`),t.push(i.map(e).join(` + +`))}),Gae(t.join(` + +`),"examples.md","text/markdown")}function Zae(){const e=Ac();return Ut("div",{style:{position:"absolute",padding:20,background:"#000000",borderRadius:20,height:300,top:60,overflow:"auto"},children:[L("div",{style:{display:"flex",alignItems:"center",gap:20},children:L(c2,{variant:"contained",onClick:()=>{Yae()},children:"Download examples.md"})}),L("br",{}),L("div",{children:V7.map(({category:t,contracts:r})=>Ut(ta,{children:[L("h2",{children:t}),L("div",{style:{gap:20,display:"flex",textAlign:"center",flexWrap:"wrap"},children:r.sort((i,o)=>i[0].localeCompare(o[0])).map(([i,o])=>L("div",{style:{color:"#50a7ea",cursor:"pointer",border:"1px solid #50a7ea",padding:"10px 20px",borderRadius:10},onClick:a=>{e(`/${o}`)},children:i},i))})]}))})]})}var Vn={},fo={},Xs={};const Qae=Symbol.for("nodejs.util.inspect.custom");var dg=Qae,fg={};Object.defineProperty(fg,"__esModule",{value:!0});fg.crc16=void 0;function Xae(e){let r=0;const i=Buffer.alloc(e.length+2);i.set(e);for(let o of i){let a=128;for(;a>0;)r<<=1,o&a&&(r+=1),a>>=1,r>65535&&(r&=65535,r^=4129)}return Buffer.from([Math.floor(r/256),r%256])}fg.crc16=Xae;var Jae=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},q7;Object.defineProperty(Xs,"__esModule",{value:!0});Xs.address=Xs.Address=void 0;const ese=Jae(dg),K7=fg,jS=17,G7=81,$S=128;function zI(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e,"base64");if(t.length!==36)throw new Error("Unknown address type: byte length is not equal to 36");const r=t.subarray(0,34),i=t.subarray(34,36),o=(0,K7.crc16)(r);if(!(o[0]===i[0]&&o[1]===i[1]))throw new Error("Invalid checksum: "+e);let a=r[0],s=!1,l=!1;if(a&$S&&(s=!0,a=a^$S),a!==jS&&a!==G7)throw"Unknown address tag";l=a===jS;let u=null;r[1]===255?u=-1:u=r[1];const c=r.subarray(2,34);return{isTestOnly:s,isBounceable:l,workchain:u,hashPart:c}}class tc{static isAddress(t){return t instanceof tc}static isFriendly(t){return t.indexOf(":")<0}static normalize(t){return typeof t=="string"?tc.parse(t).toString():t.toString()}static parse(t){return tc.isFriendly(t)?this.parseFriendly(t).address:this.parseRaw(t)}static parseRaw(t){let r=parseInt(t.split(":")[0]),i=Buffer.from(t.split(":")[1],"hex");return new tc(r,i)}static parseFriendly(t){if(Buffer.isBuffer(t)){let r=zI(t);return{isBounceable:r.isBounceable,isTestOnly:r.isTestOnly,address:new tc(r.workchain,r.hashPart)}}else{let r=t.replace(/\-/g,"+").replace(/_/g,"/"),i=zI(r);return{isBounceable:i.isBounceable,isTestOnly:i.isTestOnly,address:new tc(i.workchain,i.hashPart)}}}constructor(t,r){this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{const i=Buffer.alloc(36);return i.set(this.hash),i.set([this.workChain,this.workChain,this.workChain,this.workChain],32),i},this.toStringBuffer=i=>{let o=i&&i.testOnly!==void 0?i.testOnly:!1,s=(i&&i.bounceable!==void 0?i.bounceable:!0)?jS:G7;o&&(s|=$S);const l=Buffer.alloc(34);l[0]=s,l[1]=this.workChain,l.set(this.hash,2);const u=Buffer.alloc(36);return u.set(l),u.set((0,K7.crc16)(l),34),u},this.toString=i=>{let o=i&&i.urlSafe!==void 0?i.urlSafe:!0,a=this.toStringBuffer(i);return o?a.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):a.toString("base64")},this[q7]=()=>this.toString(),this.workChain=t,this.hash=r,Object.freeze(this)}equals(t){return t.workChain!==this.workChain?!1:t.hash.equals(this.hash)}}Xs.Address=tc;q7=ese.default;function tse(e){return tc.parse(e)}Xs.address=tse;var pg={},rse=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Y7;Object.defineProperty(pg,"__esModule",{value:!0});pg.ExternalAddress=void 0;const nse=rse(dg);class F6{static isAddress(t){return t instanceof F6}constructor(t,r){this[Y7]=()=>this.toString(),this.value=t,this.bits=r}toString(){return`External<${this.bits}:${this.value}>`}}pg.ExternalAddress=F6;Y7=nse.default;var h2={},Nf={};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.base32Decode=Nf.base32Encode=void 0;const zS="abcdefghijklmnopqrstuvwxyz234567";function ise(e){const t=e.byteLength;let r=0,i=0,o="";for(let a=0;a=5;)o+=zS[i>>>r-5&31],r-=5;return r>0&&(o+=zS[i<<5-r&31]),o}Nf.base32Encode=ise;function ose(e,t){const r=e.indexOf(t);if(r===-1)throw new Error("Invalid character found: "+t);return r}function ase(e){let t;t=e.toLowerCase();const{length:r}=t;let i=0,o=0,a=0;const s=Buffer.alloc(r*5/8|0);for(let l=0;l=8&&(s[a++]=o>>>i-8&255,i-=8);return s}Nf.base32Decode=ase;var sse=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Z7;Object.defineProperty(h2,"__esModule",{value:!0});h2.ADNLAddress=void 0;const lse=sse(dg),HI=Nf,WI=fg;class nb{static parseFriendly(t){if(t.length!==55)throw Error("Invalid address");t="f"+t;let r=(0,HI.base32Decode)(t);if(r[0]!==45)throw Error("Invalid address");let i=r.slice(33);if(!(0,WI.crc16)(r.slice(0,33)).equals(i))throw Error("Invalid address");return new nb(r.slice(1,33))}static parseRaw(t){const r=Buffer.from(t,"base64");return new nb(r)}constructor(t){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let r=Buffer.concat([Buffer.from([45]),this.address]),i=(0,WI.crc16)(r);return r=Buffer.concat([r,i]),(0,HI.base32Encode)(r).slice(1)},this[Z7]=()=>this.toString(),t.length!==32)throw Error("Invalid address");this.address=t}equals(t){return this.address.equals(t.address)}}h2.ADNLAddress=nb;Z7=lse.default;var g2={},Xd={},nm={},im={},om={},VI;function z6(){if(VI)return om;VI=1,Object.defineProperty(om,"__esModule",{value:!0}),om.bitsToPaddedBuffer=void 0;const e=m2();function t(r){let i=new e.BitBuilder(Math.ceil(r.length/8)*8);i.writeBits(r);let o=Math.ceil(r.length/8)*8-r.length;for(let a=0;athis.toString(),u<0)throw new Error(`Length ${u} is out of bounds`);this._length=u,this._data=s,this._offset=l}get length(){return this._length}at(s){if(s>=this._length)throw new Error(`Index ${s} > ${this._length} is out of bounds`);if(s<0)throw new Error(`Index ${s} < 0 is out of bounds`);let l=this._offset+s>>3,u=7-(this._offset+s)%8;return(this._data[l]&1<=this._length)throw new Error(`Offset(${s}) > ${this._length} is out of bounds`);if(s<0)throw new Error(`Offset(${s}) < 0 is out of bounds`);if(l===0)return o.EMPTY;if(s+l>this._length)throw new Error(`Offset ${s} + Length ${l} > ${this._length} is out of bounds`);return new o(this._data,this._offset+s,l)}subbuffer(s,l){if(s>=this._length)throw new Error(`Offset ${s} is out of bounds`);if(s<0)throw new Error(`Offset ${s} is out of bounds`);if(s+l>this._length)throw new Error(`Offset + Lenght = ${s+l} is out of bounds`);if(l%8!==0||(this._offset+s)%8!==0)return null;let u=this._offset+s>>3,c=u+(l>>3);return this._data.subarray(u,c)}equals(s){if(this._length!==s._length)return!1;for(let l=0;lthis._buffer.length*8)throw new Error("BitBuilder overflow");(a===!0||a>0)&&(this._buffer[s/8|0]|=1<<7-s%8),this._length++}writeBits(a){for(let s=0;sthis._buffer.length*8)throw new Error("BitBuilder overflow");a.copy(this._buffer,this._length/8),this._length+=a.length*8}else for(let s=0;s255||!Number.isSafeInteger(d))throw Error(`value is out of range for ${s} bits. Got ${a}`);this._buffer[this._length/8]=Number(a),this._length+=8;return}if(s===16&&this._length%8===0){let d=Number(a);if(d<0||d>65536||!Number.isSafeInteger(d))throw Error(`value is out of range for ${s} bits. Got ${a}`);this._buffer[this._length/8]=d>>8,this._buffer[this._length/8+1]=d&255,this._length+=16;return}let l=BigInt(a);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(s===0){if(a!==0n)throw Error(`value is not zero for ${s} bits. Got ${a}`);return}let u=1n<=u)throw Error(`bitLength is too small for a value ${a}. Got ${s}`);let c=[];for(;l>0;)c.push(l%2n===1n),l/=2n;for(let d=0;d=u)throw Error(`value is out of range for ${s} bits. Got ${a}`);l<0?(this.writeBit(!0),l=u+l):this.writeBit(!1),this.writeUint(l,s-1)}writeVarUint(a,s){let l=BigInt(a);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(l<0)throw Error(`value is negative. Got ${a}`);if(l===0n){this.writeUint(0,s);return}const u=Math.ceil(l.toString(2).length/8),c=u*8;this.writeUint(u,s),this.writeUint(l,c)}writeVarInt(a,s){let l=BigInt(a);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(l===0n){this.writeUint(0,s);return}let u=l>0?l:-l;const c=1+Math.ceil(u.toString(2).length/8),d=c*8;this.writeUint(c,s),this.writeInt(l,d)}writeCoins(a){this.writeVarUint(a,4)}writeAddress(a){if(a==null){this.writeUint(0,2);return}if(e.Address.isAddress(a)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(a.workChain,8),this.writeBuffer(a.hash);return}if(t.ExternalAddress.isAddress(a)){this.writeUint(1,2),this.writeUint(a.bits,9),this.writeUint(a.value,a.bits);return}throw Error(`Invalid address. Got ${a}`)}build(){return new r.BitString(this._buffer,0,this._length)}buffer(){if(this._length%8!==0)throw new Error("BitBuilder buffer is not byte aligned");return this._buffer.subarray(0,this._length/8)}}return nm.BitBuilder=i,nm}var am={},hg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CellType=void 0,function(t){t[t.Ordinary=-1]="Ordinary",t[t.PrunedBranch=1]="PrunedBranch",t[t.Library=2]="Library",t[t.MerkleProof=3]="MerkleProof",t[t.MerkleUpdate=4]="MerkleUpdate"}(e.CellType||(e.CellType={}))})(hg);var sm={},lm={},y2={};Object.defineProperty(y2,"__esModule",{value:!0});y2.parseDict=void 0;function use(e){let t=0;for(;e.loadBit();)t++;return t}function HS(e,t,r,i,o){let a=t.loadBit()?1:0,s=0,l=e;if(a===0){s=use(t);for(let u=0;u(0,a.deserializeInternalKey)(W))}values(){return Array.from(this._map.values())}store(W,G,ae){if(this._map.size===0)W.storeBit(0);else{let V=this._key;G!=null&&(V=G);let oe=this._value;if(ae!=null&&(oe=ae),!V)throw Error("Key serializer is not defined");if(!oe)throw Error("Value serializer is not defined");let P=new Map;for(const[le,pe]of this._map)P.set(V.serialize((0,a.deserializeInternalKey)(le)),pe);W.storeBit(1);let ee=(0,t.beginCell)();(0,o.serializeDict)(P,V.bits,oe.serialize,ee),W.storeRef(ee.endCell())}}storeDirect(W,G,ae){if(this._map.size===0)throw Error("Cannot store empty dictionary directly");let V=this._key;G!=null&&(V=G);let oe=this._value;if(ae!=null&&(oe=ae),!V)throw Error("Key serializer is not defined");if(!oe)throw Error("Value serializer is not defined");let P=new Map;for(const[ee,le]of this._map)P.set(V.serialize((0,a.deserializeInternalKey)(ee)),le);(0,o.serializeDict)(P,V.bits,oe.serialize,W)}}lm.Dictionary=s,s.Keys={Address:()=>l(),BigInt:H=>u(H),Int:H=>c(H),BigUint:H=>d(H),Uint:H=>p(H),Buffer:H=>v(H)},s.Values={BigInt:H=>b(H),Int:H=>x(H),BigVarInt:H=>y(H),BigUint:H=>E(H),Uint:H=>k(H),BigVarUint:H=>_(H),Bool:()=>O(),Address:()=>U(),Cell:()=>D(),Buffer:H=>F(H),Dictionary:(H,W)=>j(H,W)};function l(){return{bits:267,serialize:H=>{if(!e.Address.isAddress(H))throw Error("Key is not an address");return(0,t.beginCell)().storeAddress(H).endCell().beginParse().preloadUintBig(267)},parse:H=>(0,t.beginCell)().storeUint(H,267).endCell().beginParse().loadAddress()}}function u(H){return{bits:H,serialize:W=>{if(typeof W!="bigint")throw Error("Key is not a bigint");return(0,t.beginCell)().storeInt(W,H).endCell().beginParse().loadUintBig(H)},parse:W=>(0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadIntBig(H)}}function c(H){return{bits:H,serialize:W=>{if(typeof W!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(W))throw Error("Key is not a safe integer: "+W);return(0,t.beginCell)().storeInt(W,H).endCell().beginParse().loadUintBig(H)},parse:W=>(0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadInt(H)}}function d(H){return{bits:H,serialize:W=>{if(typeof W!="bigint")throw Error("Key is not a bigint");if(W<0)throw Error("Key is negative: "+W);return(0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadUintBig(H)},parse:W=>(0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadUintBig(H)}}function p(H){return{bits:H,serialize:W=>{if(typeof W!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(W))throw Error("Key is not a safe integer: "+W);if(W<0)throw Error("Key is negative: "+W);return(0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadUintBig(H)},parse:W=>Number((0,t.beginCell)().storeUint(W,H).endCell().beginParse().loadUint(H))}}function v(H){return{bits:H*8,serialize:W=>{if(!Buffer.isBuffer(W))throw Error("Key is not a buffer");return(0,t.beginCell)().storeBuffer(W).endCell().beginParse().loadUintBig(H*8)},parse:W=>(0,t.beginCell)().storeUint(W,H*8).endCell().beginParse().loadBuffer(H)}}function x(H){return{serialize:(W,G)=>{G.storeInt(W,H)},parse:W=>W.loadInt(H)}}function b(H){return{serialize:(W,G)=>{G.storeInt(W,H)},parse:W=>W.loadIntBig(H)}}function y(H){return{serialize:(W,G)=>{G.storeVarInt(W,H)},parse:W=>W.loadVarIntBig(H)}}function _(H){return{serialize:(W,G)=>{G.storeVarUint(W,H)},parse:W=>W.loadVarUintBig(H)}}function k(H){return{serialize:(W,G)=>{G.storeUint(W,H)},parse:W=>W.loadUint(H)}}function E(H){return{serialize:(W,G)=>{G.storeUint(W,H)},parse:W=>W.loadUintBig(H)}}function O(){return{serialize:(H,W)=>{W.storeBit(H)},parse:H=>H.loadBit()}}function U(){return{serialize:(H,W)=>{W.storeAddress(H)},parse:H=>H.loadAddress()}}function D(){return{serialize:(H,W)=>{W.storeRef(H)},parse:H=>H.loadRef()}}function j(H,W){return{serialize:(G,ae)=>{G.store(ae)},parse:G=>s.load(H,W,G)}}function F(H){return{serialize:(W,G)=>{if(W.length!==H)throw Error("Invalid buffer size");G.storeBuffer(W)},parse:W=>W.loadBuffer(H)}}return lm}var Ku={},ZI;function X7(){if(ZI)return Ku;ZI=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.writeString=Ku.stringToCell=Ku.readString=void 0;const e=as();function t(s){if(s.remainingBits%8!==0)throw new Error(`Invalid string length: ${s.remainingBits}`);if(s.remainingRefs!==0&&s.remainingRefs!==1)throw new Error(`invalid number of refs: ${s.remainingRefs}`);if(s.remainingRefs===1&&1023-s.remainingBits>7)throw new Error(`invalid string length: ${s.remainingBits/8}`);let l;return s.remainingBits===0?l=Buffer.alloc(0):l=s.loadBuffer(s.remainingBits/8),s.remainingRefs===1&&(l=Buffer.concat([l,t(s.loadRef().beginParse())])),l}function r(s){return t(s).toString()}Ku.readString=r;function i(s,l){if(s.length>0){let u=Math.floor(l.availableBits/8);if(s.length>u){let c=s.subarray(0,u),d=s.subarray(u);l=l.storeBuffer(c);let p=(0,e.beginCell)();i(d,p),l=l.storeRef(p.endCell())}else l=l.storeBuffer(s)}}function o(s){let l=(0,e.beginCell)();return i(Buffer.from(s),l),l.endCell()}Ku.stringToCell=o;function a(s,l){i(Buffer.from(s),l)}return Ku.writeString=a,Ku}var QI;function H6(){if(QI)return sm;QI=1;var e=_n&&_n.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t;Object.defineProperty(sm,"__esModule",{value:!0}),sm.Slice=void 0;const r=e(dg),i=gp(),o=as(),a=X7();class s{constructor(u,c){this[t]=()=>this.toString(),this._reader=u.clone(),this._refs=[...c],this._refsOffset=0}get remainingBits(){return this._reader.remaining}get offsetBits(){return this._reader.offset}get remainingRefs(){return this._refs.length-this._refsOffset}get offsetRefs(){return this._refsOffset}skip(u){return this._reader.skip(u),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(u){return this._reader.loadBits(u)}preloadBits(u){return this._reader.preloadBits(u)}loadUint(u){return this._reader.loadUint(u)}loadUintBig(u){return this._reader.loadUintBig(u)}preloadUint(u){return this._reader.preloadUint(u)}preloadUintBig(u){return this._reader.preloadUintBig(u)}loadMaybeUint(u){return this.loadBit()?this.loadUint(u):null}loadMaybeUintBig(u){return this.loadBit()?this.loadUintBig(u):null}loadInt(u){return this._reader.loadInt(u)}loadIntBig(u){return this._reader.loadIntBig(u)}preloadInt(u){return this._reader.preloadInt(u)}preloadIntBig(u){return this._reader.preloadIntBig(u)}loadMaybeInt(u){return this.loadBit()?this.loadInt(u):null}loadMaybeIntBig(u){return this.loadBit()?this.loadIntBig(u):null}loadVarUint(u){return this._reader.loadVarUint(u)}loadVarUintBig(u){return this._reader.loadVarUintBig(u)}preloadVarUint(u){return this._reader.preloadVarUint(u)}preloadVarUintBig(u){return this._reader.preloadVarUintBig(u)}loadVarInt(u){return this._reader.loadVarInt(u)}loadVarIntBig(u){return this._reader.loadVarIntBig(u)}preloadVarInt(u){return this._reader.preloadVarInt(u)}preloadVarIntBig(u){return this._reader.preloadVarIntBig(u)}loadCoins(){return this._reader.loadCoins()}preloadCoins(){return this._reader.preloadCoins()}loadMaybeCoins(){return this._reader.loadBit()?this._reader.loadCoins():null}loadAddress(){return this._reader.loadAddress()}loadMaybeAddress(){return this._reader.loadMaybeAddress()}loadExternalAddress(){return this._reader.loadExternalAddress()}loadMaybeExternalAddress(){return this._reader.loadMaybeExternalAddress()}loadAddressAny(){return this._reader.loadAddressAny()}loadRef(){if(this._refsOffset>=this._refs.length)throw new Error("No more references");return this._refs[this._refsOffset++]}preloadRef(){if(this._refsOffset>=this._refs.length)throw new Error("No more references");return this._refs[this._refsOffset]}loadMaybeRef(){return this.loadBit()?this.loadRef():null}preloadMaybeRef(){return this.preloadBit()?this.preloadRef():null}loadBuffer(u){return this._reader.loadBuffer(u)}preloadBuffer(u){return this._reader.preloadBuffer(u)}loadStringTail(){return(0,a.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,a.readString)(this):null}loadStringRefTail(){return(0,a.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){const u=this.loadMaybeRef();return u?(0,a.readString)(u.beginParse()):null}loadDict(u,c){return i.Dictionary.load(u,c,this)}loadDictDirect(u,c){return i.Dictionary.loadDirect(u,c,this)}endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw new Error("Slice is not empty")}asCell(){return(0,o.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,o.beginCell)().storeSlice(this)}clone(u=!1){if(u){let c=this._reader.clone();return c.reset(),new s(c,this._refs)}else{let c=new s(this._reader,this._refs);return c._refsOffset=this._refsOffset,c}}toString(){return this.asCell().toString()}}return sm.Slice=s,t=r.default,sm}var b2={},ru={};Object.defineProperty(ru,"__esModule",{value:!0});ru.BitReader=void 0;const gse=Xs,mse=pg;class W6{constructor(t,r=0){this._checkpoints=[],this._bits=t,this._offset=r}get offset(){return this._offset}get remaining(){return this._bits.length-this._offset}skip(t){if(t<0||this._offset+t>this._bits.length)throw new Error(`Index ${this._offset+t} is out of bounds`);this._offset+=t}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let t=this._bits.at(this._offset);return this._offset++,t}preloadBit(){return this._bits.at(this._offset)}loadBits(t){let r=this._bits.substring(this._offset,t);return this._offset+=t,r}preloadBits(t){return this._bits.substring(this._offset,t)}loadBuffer(t){let r=this._preloadBuffer(t,this._offset);return this._offset+=t*8,r}preloadBuffer(t){return this._preloadBuffer(t,this._offset)}loadUint(t){return Number(this.loadUintBig(t))}loadUintBig(t){let r=this.preloadUintBig(t);return this._offset+=t,r}preloadUint(t){return Number(this._preloadUint(t,this._offset))}preloadUintBig(t){return this._preloadUint(t,this._offset)}loadInt(t){let r=this._preloadInt(t,this._offset);return this._offset+=t,Number(r)}loadIntBig(t){let r=this._preloadInt(t,this._offset);return this._offset+=t,r}preloadInt(t){return Number(this._preloadInt(t,this._offset))}preloadIntBig(t){return this._preloadInt(t,this._offset)}loadVarUint(t){let r=Number(this.loadUint(t));return Number(this.loadUintBig(r*8))}loadVarUintBig(t){let r=Number(this.loadUint(t));return this.loadUintBig(r*8)}preloadVarUint(t){let r=Number(this._preloadUint(t,this._offset));return Number(this._preloadUint(r*8,this._offset+t))}preloadVarUintBig(t){let r=Number(this._preloadUint(t,this._offset));return this._preloadUint(r*8,this._offset+t)}loadVarInt(t){let r=Number(this.loadUint(t));return Number(this.loadIntBig(r*8))}loadVarIntBig(t){let r=Number(this.loadUint(t));return this.loadIntBig(r*8)}preloadVarInt(t){let r=Number(this._preloadUint(t,this._offset));return Number(this._preloadInt(r*8,this._offset+t))}preloadVarIntBig(t){let r=Number(this._preloadUint(t,this._offset));return this._preloadInt(r*8,this._offset+t)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===2)return this._loadInternalAddress();throw new Error("Invalid address: "+t)}loadMaybeAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===2)return this._loadInternalAddress();throw new Error("Invalid address")}loadExternalAddress(){if(Number(this._preloadUint(2,this._offset))===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadMaybeExternalAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadAddressAny(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===2)return this._loadInternalAddress();if(t===1)return this._loadExternalAddress();throw Error(t===3?"Unsupported":"Unreachable")}loadPaddedBits(t){if(t%8!==0)throw new Error("Invalid number of bits");let r=t;for(;;)if(this._bits.at(this._offset+r-1)){r--;break}else r--;let i=this._bits.substring(this._offset,r);return this._offset+=t,i}clone(){return new W6(this._bits,this._offset)}_preloadInt(t,r){if(t==0)return 0n;let i=this._bits.at(r),o=0n;for(let a=0;a>t-1)%2!==0}}vg.LevelMask=V6;function Sse(e){return e=e-(e>>1&1431655765),e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}Object.defineProperty(yg,"__esModule",{value:!0});yg.exoticPruned=void 0;const Cse=ru,XI=vg;function kse(e,t){let r=new Cse.BitReader(e),i=r.loadUint(8);if(i!==1)throw new Error(`Pruned branch cell must have type 1, got "${i}"`);if(t.length!==0)throw new Error(`Pruned Branch cell can't has refs, got "${t.length}"`);let o;if(e.length===280)o=new XI.LevelMask(1);else{if(o=new XI.LevelMask(r.loadUint(8)),o.level<1||o.level>3)throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${o.level}/${o.value}"`);const u=8+8+o.apply(o.level-1).hashCount*(256+16);if(e.length!==u)throw new Error(`Pruned branch cell must have exactly ${u} bits, got "${e.length}"`)}let a=[],s=[],l=[];for(let u=0;u>1);return{type:w2.CellType.MerkleProof,depths:r,hashes:i,mask:o}}function Bse(e,t){(0,Ise.exoticMerkleUpdate)(e,t);let r=[],i=[],o=new x2.LevelMask((t[0].level()|t[1].level())>>1);return{type:w2.CellType.MerkleUpdate,depths:r,hashes:i,mask:o}}function Use(e,t){let i=new Ese.BitReader(e).preloadUint(8);if(i===1)return Pse(e,t);if(i===2)return Mse(e,t);if(i===3)return Ose(e,t);if(i===4)return Bse(e,t);throw Error("Invalid exotic cell type: "+i)}b2.resolveExotic=Use;var _2={},cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.getRepr=cc.getBitsDescriptor=cc.getRefsDescriptor=void 0;const Lm=hg,Dse=z6();function J7(e,t,r){return e.length+(r!==Lm.CellType.Ordinary?1:0)*8+t*32}cc.getRefsDescriptor=J7;function eD(e){let t=e.length;return Math.ceil(t/8)+Math.floor(t/8)}cc.getBitsDescriptor=eD;function Lse(e,t,r,i,o){const a=Math.ceil(t.length/8),s=Buffer.alloc(2+a+(2+32)*r.length);let l=0;s[l++]=J7(r,i,o),s[l++]=eD(e),(0,Dse.bitsToPaddedBuffer)(t).copy(s,l),l+=a;for(const u of r){let c;o==Lm.CellType.MerkleProof||o==Lm.CellType.MerkleUpdate?c=u.depth(i+1):c=u.depth(i),s[l++]=Math.floor(c/256),s[l++]=c%256}for(const u of r){let c;o==Lm.CellType.MerkleProof||o==Lm.CellType.MerkleUpdate?c=u.hash(i+1):c=u.hash(i),c.copy(s,l),l+=32}return s}cc.getRepr=Lse;var J_={},hd={},S2={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(_n,function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function i(ie,de,$,C){var T,Z,ve,je=de||[0],ct=($=$||0)>>>3,ur=C===-1?3:0;for(T=0;T>>2,je.length<=Z&&je.push(0),je[Z]|=ie[T]<<8*(ur+C*(ve%4));return{value:je,binLen:8*ie.length+$}}function o(ie,de,$){switch(de){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(ie){case"HEX":return function(C,T,Z){return function(ve,je,ct,ur){var Dr,hr,Rr,Gr;if(ve.length%2!=0)throw new Error("String of HEX type must be in byte increments");var Nr=je||[0],Kn=(ct=ct||0)>>>3,Tn=ur===-1?3:0;for(Dr=0;Dr>>1)+Kn)>>>2;Nr.length<=Rr;)Nr.push(0);Nr[Rr]|=hr<<8*(Tn+ur*(Gr%4))}return{value:Nr,binLen:4*ve.length+ct}}(C,T,Z,$)};case"TEXT":return function(C,T,Z){return function(ve,je,ct,ur,Dr){var hr,Rr,Gr,Nr,Kn,Tn,In,yt,Ei=0,Yn=ct||[0],Pi=(ur=ur||0)>>>3;if(je==="UTF8")for(In=Dr===-1?3:0,Gr=0;Gr(hr=ve.charCodeAt(Gr))?Rr.push(hr):2048>hr?(Rr.push(192|hr>>>6),Rr.push(128|63&hr)):55296>hr||57344<=hr?Rr.push(224|hr>>>12,128|hr>>>6&63,128|63&hr):(Gr+=1,hr=65536+((1023&hr)<<10|1023&ve.charCodeAt(Gr)),Rr.push(240|hr>>>18,128|hr>>>12&63,128|hr>>>6&63,128|63&hr)),Nr=0;Nr>>2;Yn.length<=Kn;)Yn.push(0);Yn[Kn]|=Rr[Nr]<<8*(In+Dr*(Tn%4)),Ei+=1}else for(In=Dr===-1?2:0,yt=je==="UTF16LE"&&Dr!==1||je!=="UTF16LE"&&Dr===1,Gr=0;Gr>>8),Kn=(Tn=Ei+Pi)>>>2;Yn.length<=Kn;)Yn.push(0);Yn[Kn]|=hr<<8*(In+Dr*(Tn%4)),Ei+=2}return{value:Yn,binLen:8*Ei+ur}}(C,de,T,Z,$)};case"B64":return function(C,T,Z){return function(ve,je,ct,ur){var Dr,hr,Rr,Gr,Nr,Kn,Tn=0,In=je||[0],yt=(ct=ct||0)>>>3,Ei=ur===-1?3:0,Yn=ve.indexOf("=");if(ve.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(ve=ve.replace(/=/g,""),Yn!==-1&&Yn>24&255,ue[Re+1]=Ee>>16&255,ue[Re+2]=Ee>>8&255,ue[Re+3]=Ee&255,ue[Re+4]=q>>24&255,ue[Re+5]=q>>16&255,ue[Re+6]=q>>8&255,ue[Re+7]=q&255}function y(ue,Re,Ee,q,Fe){var Xt,ar=0;for(Xt=0;Xt>>8)-1}function _(ue,Re,Ee,q){return y(ue,Re,Ee,q,16)}function k(ue,Re,Ee,q){return y(ue,Re,Ee,q,32)}function E(ue,Re,Ee,q){for(var Fe=q[0]&255|(q[1]&255)<<8|(q[2]&255)<<16|(q[3]&255)<<24,Xt=Ee[0]&255|(Ee[1]&255)<<8|(Ee[2]&255)<<16|(Ee[3]&255)<<24,ar=Ee[4]&255|(Ee[5]&255)<<8|(Ee[6]&255)<<16|(Ee[7]&255)<<24,Br=Ee[8]&255|(Ee[9]&255)<<8|(Ee[10]&255)<<16|(Ee[11]&255)<<24,Hr=Ee[12]&255|(Ee[13]&255)<<8|(Ee[14]&255)<<16|(Ee[15]&255)<<24,An=q[4]&255|(q[5]&255)<<8|(q[6]&255)<<16|(q[7]&255)<<24,un=Re[0]&255|(Re[1]&255)<<8|(Re[2]&255)<<16|(Re[3]&255)<<24,vt=Re[4]&255|(Re[5]&255)<<8|(Re[6]&255)<<16|(Re[7]&255)<<24,K=Re[8]&255|(Re[9]&255)<<8|(Re[10]&255)<<16|(Re[11]&255)<<24,ye=Re[12]&255|(Re[13]&255)<<8|(Re[14]&255)<<16|(Re[15]&255)<<24,Me=q[8]&255|(q[9]&255)<<8|(q[10]&255)<<16|(q[11]&255)<<24,it=Ee[16]&255|(Ee[17]&255)<<8|(Ee[18]&255)<<16|(Ee[19]&255)<<24,dt=Ee[20]&255|(Ee[21]&255)<<8|(Ee[22]&255)<<16|(Ee[23]&255)<<24,br=Ee[24]&255|(Ee[25]&255)<<8|(Ee[26]&255)<<16|(Ee[27]&255)<<24,cr=Ee[28]&255|(Ee[29]&255)<<8|(Ee[30]&255)<<16|(Ee[31]&255)<<24,Or=q[12]&255|(q[13]&255)<<8|(q[14]&255)<<16|(q[15]&255)<<24,Sr=Fe,Kr=Xt,on=ar,Sn=Br,Rn=Hr,ir=An,gr=un,Gt=vt,jr=K,Pr=ye,Lr=Me,Wr=it,Fn=dt,Jn=br,fi=cr,si=Or,Et,pi=0;pi<20;pi+=2)Et=Sr+Fn|0,Rn^=Et<<7|Et>>>32-7,Et=Rn+Sr|0,jr^=Et<<9|Et>>>32-9,Et=jr+Rn|0,Fn^=Et<<13|Et>>>32-13,Et=Fn+jr|0,Sr^=Et<<18|Et>>>32-18,Et=ir+Kr|0,Pr^=Et<<7|Et>>>32-7,Et=Pr+ir|0,Jn^=Et<<9|Et>>>32-9,Et=Jn+Pr|0,Kr^=Et<<13|Et>>>32-13,Et=Kr+Jn|0,ir^=Et<<18|Et>>>32-18,Et=Lr+gr|0,fi^=Et<<7|Et>>>32-7,Et=fi+Lr|0,on^=Et<<9|Et>>>32-9,Et=on+fi|0,gr^=Et<<13|Et>>>32-13,Et=gr+on|0,Lr^=Et<<18|Et>>>32-18,Et=si+Wr|0,Sn^=Et<<7|Et>>>32-7,Et=Sn+si|0,Gt^=Et<<9|Et>>>32-9,Et=Gt+Sn|0,Wr^=Et<<13|Et>>>32-13,Et=Wr+Gt|0,si^=Et<<18|Et>>>32-18,Et=Sr+Sn|0,Kr^=Et<<7|Et>>>32-7,Et=Kr+Sr|0,on^=Et<<9|Et>>>32-9,Et=on+Kr|0,Sn^=Et<<13|Et>>>32-13,Et=Sn+on|0,Sr^=Et<<18|Et>>>32-18,Et=ir+Rn|0,gr^=Et<<7|Et>>>32-7,Et=gr+ir|0,Gt^=Et<<9|Et>>>32-9,Et=Gt+gr|0,Rn^=Et<<13|Et>>>32-13,Et=Rn+Gt|0,ir^=Et<<18|Et>>>32-18,Et=Lr+Pr|0,Wr^=Et<<7|Et>>>32-7,Et=Wr+Lr|0,jr^=Et<<9|Et>>>32-9,Et=jr+Wr|0,Pr^=Et<<13|Et>>>32-13,Et=Pr+jr|0,Lr^=Et<<18|Et>>>32-18,Et=si+fi|0,Fn^=Et<<7|Et>>>32-7,Et=Fn+si|0,Jn^=Et<<9|Et>>>32-9,Et=Jn+Fn|0,fi^=Et<<13|Et>>>32-13,Et=fi+Jn|0,si^=Et<<18|Et>>>32-18;Sr=Sr+Fe|0,Kr=Kr+Xt|0,on=on+ar|0,Sn=Sn+Br|0,Rn=Rn+Hr|0,ir=ir+An|0,gr=gr+un|0,Gt=Gt+vt|0,jr=jr+K|0,Pr=Pr+ye|0,Lr=Lr+Me|0,Wr=Wr+it|0,Fn=Fn+dt|0,Jn=Jn+br|0,fi=fi+cr|0,si=si+Or|0,ue[0]=Sr>>>0&255,ue[1]=Sr>>>8&255,ue[2]=Sr>>>16&255,ue[3]=Sr>>>24&255,ue[4]=Kr>>>0&255,ue[5]=Kr>>>8&255,ue[6]=Kr>>>16&255,ue[7]=Kr>>>24&255,ue[8]=on>>>0&255,ue[9]=on>>>8&255,ue[10]=on>>>16&255,ue[11]=on>>>24&255,ue[12]=Sn>>>0&255,ue[13]=Sn>>>8&255,ue[14]=Sn>>>16&255,ue[15]=Sn>>>24&255,ue[16]=Rn>>>0&255,ue[17]=Rn>>>8&255,ue[18]=Rn>>>16&255,ue[19]=Rn>>>24&255,ue[20]=ir>>>0&255,ue[21]=ir>>>8&255,ue[22]=ir>>>16&255,ue[23]=ir>>>24&255,ue[24]=gr>>>0&255,ue[25]=gr>>>8&255,ue[26]=gr>>>16&255,ue[27]=gr>>>24&255,ue[28]=Gt>>>0&255,ue[29]=Gt>>>8&255,ue[30]=Gt>>>16&255,ue[31]=Gt>>>24&255,ue[32]=jr>>>0&255,ue[33]=jr>>>8&255,ue[34]=jr>>>16&255,ue[35]=jr>>>24&255,ue[36]=Pr>>>0&255,ue[37]=Pr>>>8&255,ue[38]=Pr>>>16&255,ue[39]=Pr>>>24&255,ue[40]=Lr>>>0&255,ue[41]=Lr>>>8&255,ue[42]=Lr>>>16&255,ue[43]=Lr>>>24&255,ue[44]=Wr>>>0&255,ue[45]=Wr>>>8&255,ue[46]=Wr>>>16&255,ue[47]=Wr>>>24&255,ue[48]=Fn>>>0&255,ue[49]=Fn>>>8&255,ue[50]=Fn>>>16&255,ue[51]=Fn>>>24&255,ue[52]=Jn>>>0&255,ue[53]=Jn>>>8&255,ue[54]=Jn>>>16&255,ue[55]=Jn>>>24&255,ue[56]=fi>>>0&255,ue[57]=fi>>>8&255,ue[58]=fi>>>16&255,ue[59]=fi>>>24&255,ue[60]=si>>>0&255,ue[61]=si>>>8&255,ue[62]=si>>>16&255,ue[63]=si>>>24&255}function O(ue,Re,Ee,q){for(var Fe=q[0]&255|(q[1]&255)<<8|(q[2]&255)<<16|(q[3]&255)<<24,Xt=Ee[0]&255|(Ee[1]&255)<<8|(Ee[2]&255)<<16|(Ee[3]&255)<<24,ar=Ee[4]&255|(Ee[5]&255)<<8|(Ee[6]&255)<<16|(Ee[7]&255)<<24,Br=Ee[8]&255|(Ee[9]&255)<<8|(Ee[10]&255)<<16|(Ee[11]&255)<<24,Hr=Ee[12]&255|(Ee[13]&255)<<8|(Ee[14]&255)<<16|(Ee[15]&255)<<24,An=q[4]&255|(q[5]&255)<<8|(q[6]&255)<<16|(q[7]&255)<<24,un=Re[0]&255|(Re[1]&255)<<8|(Re[2]&255)<<16|(Re[3]&255)<<24,vt=Re[4]&255|(Re[5]&255)<<8|(Re[6]&255)<<16|(Re[7]&255)<<24,K=Re[8]&255|(Re[9]&255)<<8|(Re[10]&255)<<16|(Re[11]&255)<<24,ye=Re[12]&255|(Re[13]&255)<<8|(Re[14]&255)<<16|(Re[15]&255)<<24,Me=q[8]&255|(q[9]&255)<<8|(q[10]&255)<<16|(q[11]&255)<<24,it=Ee[16]&255|(Ee[17]&255)<<8|(Ee[18]&255)<<16|(Ee[19]&255)<<24,dt=Ee[20]&255|(Ee[21]&255)<<8|(Ee[22]&255)<<16|(Ee[23]&255)<<24,br=Ee[24]&255|(Ee[25]&255)<<8|(Ee[26]&255)<<16|(Ee[27]&255)<<24,cr=Ee[28]&255|(Ee[29]&255)<<8|(Ee[30]&255)<<16|(Ee[31]&255)<<24,Or=q[12]&255|(q[13]&255)<<8|(q[14]&255)<<16|(q[15]&255)<<24,Sr=Fe,Kr=Xt,on=ar,Sn=Br,Rn=Hr,ir=An,gr=un,Gt=vt,jr=K,Pr=ye,Lr=Me,Wr=it,Fn=dt,Jn=br,fi=cr,si=Or,Et,pi=0;pi<20;pi+=2)Et=Sr+Fn|0,Rn^=Et<<7|Et>>>32-7,Et=Rn+Sr|0,jr^=Et<<9|Et>>>32-9,Et=jr+Rn|0,Fn^=Et<<13|Et>>>32-13,Et=Fn+jr|0,Sr^=Et<<18|Et>>>32-18,Et=ir+Kr|0,Pr^=Et<<7|Et>>>32-7,Et=Pr+ir|0,Jn^=Et<<9|Et>>>32-9,Et=Jn+Pr|0,Kr^=Et<<13|Et>>>32-13,Et=Kr+Jn|0,ir^=Et<<18|Et>>>32-18,Et=Lr+gr|0,fi^=Et<<7|Et>>>32-7,Et=fi+Lr|0,on^=Et<<9|Et>>>32-9,Et=on+fi|0,gr^=Et<<13|Et>>>32-13,Et=gr+on|0,Lr^=Et<<18|Et>>>32-18,Et=si+Wr|0,Sn^=Et<<7|Et>>>32-7,Et=Sn+si|0,Gt^=Et<<9|Et>>>32-9,Et=Gt+Sn|0,Wr^=Et<<13|Et>>>32-13,Et=Wr+Gt|0,si^=Et<<18|Et>>>32-18,Et=Sr+Sn|0,Kr^=Et<<7|Et>>>32-7,Et=Kr+Sr|0,on^=Et<<9|Et>>>32-9,Et=on+Kr|0,Sn^=Et<<13|Et>>>32-13,Et=Sn+on|0,Sr^=Et<<18|Et>>>32-18,Et=ir+Rn|0,gr^=Et<<7|Et>>>32-7,Et=gr+ir|0,Gt^=Et<<9|Et>>>32-9,Et=Gt+gr|0,Rn^=Et<<13|Et>>>32-13,Et=Rn+Gt|0,ir^=Et<<18|Et>>>32-18,Et=Lr+Pr|0,Wr^=Et<<7|Et>>>32-7,Et=Wr+Lr|0,jr^=Et<<9|Et>>>32-9,Et=jr+Wr|0,Pr^=Et<<13|Et>>>32-13,Et=Pr+jr|0,Lr^=Et<<18|Et>>>32-18,Et=si+fi|0,Fn^=Et<<7|Et>>>32-7,Et=Fn+si|0,Jn^=Et<<9|Et>>>32-9,Et=Jn+Fn|0,fi^=Et<<13|Et>>>32-13,Et=fi+Jn|0,si^=Et<<18|Et>>>32-18;ue[0]=Sr>>>0&255,ue[1]=Sr>>>8&255,ue[2]=Sr>>>16&255,ue[3]=Sr>>>24&255,ue[4]=ir>>>0&255,ue[5]=ir>>>8&255,ue[6]=ir>>>16&255,ue[7]=ir>>>24&255,ue[8]=Lr>>>0&255,ue[9]=Lr>>>8&255,ue[10]=Lr>>>16&255,ue[11]=Lr>>>24&255,ue[12]=si>>>0&255,ue[13]=si>>>8&255,ue[14]=si>>>16&255,ue[15]=si>>>24&255,ue[16]=gr>>>0&255,ue[17]=gr>>>8&255,ue[18]=gr>>>16&255,ue[19]=gr>>>24&255,ue[20]=Gt>>>0&255,ue[21]=Gt>>>8&255,ue[22]=Gt>>>16&255,ue[23]=Gt>>>24&255,ue[24]=jr>>>0&255,ue[25]=jr>>>8&255,ue[26]=jr>>>16&255,ue[27]=jr>>>24&255,ue[28]=Pr>>>0&255,ue[29]=Pr>>>8&255,ue[30]=Pr>>>16&255,ue[31]=Pr>>>24&255}function U(ue,Re,Ee,q){E(ue,Re,Ee,q)}function D(ue,Re,Ee,q){O(ue,Re,Ee,q)}var j=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function F(ue,Re,Ee,q,Fe,Xt,ar){var Br=new Uint8Array(16),Hr=new Uint8Array(64),An,un;for(un=0;un<16;un++)Br[un]=0;for(un=0;un<8;un++)Br[un]=Xt[un];for(;Fe>=64;){for(U(Hr,Br,ar,j),un=0;un<64;un++)ue[Re+un]=Ee[q+un]^Hr[un];for(An=1,un=8;un<16;un++)An=An+(Br[un]&255)|0,Br[un]=An&255,An>>>=8;Fe-=64,Re+=64,q+=64}if(Fe>0)for(U(Hr,Br,ar,j),un=0;un=64;){for(U(ar,Xt,Fe,j),Hr=0;Hr<64;Hr++)ue[Re+Hr]=ar[Hr];for(Br=1,Hr=8;Hr<16;Hr++)Br=Br+(Xt[Hr]&255)|0,Xt[Hr]=Br&255,Br>>>=8;Ee-=64,Re+=64}if(Ee>0)for(U(ar,Xt,Fe,j),Hr=0;Hr>>13|Ee<<3)&8191,q=ue[4]&255|(ue[5]&255)<<8,this.r[2]=(Ee>>>10|q<<6)&7939,Fe=ue[6]&255|(ue[7]&255)<<8,this.r[3]=(q>>>7|Fe<<9)&8191,Xt=ue[8]&255|(ue[9]&255)<<8,this.r[4]=(Fe>>>4|Xt<<12)&255,this.r[5]=Xt>>>1&8190,ar=ue[10]&255|(ue[11]&255)<<8,this.r[6]=(Xt>>>14|ar<<2)&8191,Br=ue[12]&255|(ue[13]&255)<<8,this.r[7]=(ar>>>11|Br<<5)&8065,Hr=ue[14]&255|(ue[15]&255)<<8,this.r[8]=(Br>>>8|Hr<<8)&8191,this.r[9]=Hr>>>5&127,this.pad[0]=ue[16]&255|(ue[17]&255)<<8,this.pad[1]=ue[18]&255|(ue[19]&255)<<8,this.pad[2]=ue[20]&255|(ue[21]&255)<<8,this.pad[3]=ue[22]&255|(ue[23]&255)<<8,this.pad[4]=ue[24]&255|(ue[25]&255)<<8,this.pad[5]=ue[26]&255|(ue[27]&255)<<8,this.pad[6]=ue[28]&255|(ue[29]&255)<<8,this.pad[7]=ue[30]&255|(ue[31]&255)<<8};ae.prototype.blocks=function(ue,Re,Ee){for(var q=this.fin?0:2048,Fe,Xt,ar,Br,Hr,An,un,vt,K,ye,Me,it,dt,br,cr,Or,Sr,Kr,on,Sn=this.h[0],Rn=this.h[1],ir=this.h[2],gr=this.h[3],Gt=this.h[4],jr=this.h[5],Pr=this.h[6],Lr=this.h[7],Wr=this.h[8],Fn=this.h[9],Jn=this.r[0],fi=this.r[1],si=this.r[2],Et=this.r[3],pi=this.r[4],cn=this.r[5],mi=this.r[6],Qn=this.r[7],Ai=this.r[8],wt=this.r[9];Ee>=16;)Fe=ue[Re+0]&255|(ue[Re+1]&255)<<8,Sn+=Fe&8191,Xt=ue[Re+2]&255|(ue[Re+3]&255)<<8,Rn+=(Fe>>>13|Xt<<3)&8191,ar=ue[Re+4]&255|(ue[Re+5]&255)<<8,ir+=(Xt>>>10|ar<<6)&8191,Br=ue[Re+6]&255|(ue[Re+7]&255)<<8,gr+=(ar>>>7|Br<<9)&8191,Hr=ue[Re+8]&255|(ue[Re+9]&255)<<8,Gt+=(Br>>>4|Hr<<12)&8191,jr+=Hr>>>1&8191,An=ue[Re+10]&255|(ue[Re+11]&255)<<8,Pr+=(Hr>>>14|An<<2)&8191,un=ue[Re+12]&255|(ue[Re+13]&255)<<8,Lr+=(An>>>11|un<<5)&8191,vt=ue[Re+14]&255|(ue[Re+15]&255)<<8,Wr+=(un>>>8|vt<<8)&8191,Fn+=vt>>>5|q,K=0,ye=K,ye+=Sn*Jn,ye+=Rn*(5*wt),ye+=ir*(5*Ai),ye+=gr*(5*Qn),ye+=Gt*(5*mi),K=ye>>>13,ye&=8191,ye+=jr*(5*cn),ye+=Pr*(5*pi),ye+=Lr*(5*Et),ye+=Wr*(5*si),ye+=Fn*(5*fi),K+=ye>>>13,ye&=8191,Me=K,Me+=Sn*fi,Me+=Rn*Jn,Me+=ir*(5*wt),Me+=gr*(5*Ai),Me+=Gt*(5*Qn),K=Me>>>13,Me&=8191,Me+=jr*(5*mi),Me+=Pr*(5*cn),Me+=Lr*(5*pi),Me+=Wr*(5*Et),Me+=Fn*(5*si),K+=Me>>>13,Me&=8191,it=K,it+=Sn*si,it+=Rn*fi,it+=ir*Jn,it+=gr*(5*wt),it+=Gt*(5*Ai),K=it>>>13,it&=8191,it+=jr*(5*Qn),it+=Pr*(5*mi),it+=Lr*(5*cn),it+=Wr*(5*pi),it+=Fn*(5*Et),K+=it>>>13,it&=8191,dt=K,dt+=Sn*Et,dt+=Rn*si,dt+=ir*fi,dt+=gr*Jn,dt+=Gt*(5*wt),K=dt>>>13,dt&=8191,dt+=jr*(5*Ai),dt+=Pr*(5*Qn),dt+=Lr*(5*mi),dt+=Wr*(5*cn),dt+=Fn*(5*pi),K+=dt>>>13,dt&=8191,br=K,br+=Sn*pi,br+=Rn*Et,br+=ir*si,br+=gr*fi,br+=Gt*Jn,K=br>>>13,br&=8191,br+=jr*(5*wt),br+=Pr*(5*Ai),br+=Lr*(5*Qn),br+=Wr*(5*mi),br+=Fn*(5*cn),K+=br>>>13,br&=8191,cr=K,cr+=Sn*cn,cr+=Rn*pi,cr+=ir*Et,cr+=gr*si,cr+=Gt*fi,K=cr>>>13,cr&=8191,cr+=jr*Jn,cr+=Pr*(5*wt),cr+=Lr*(5*Ai),cr+=Wr*(5*Qn),cr+=Fn*(5*mi),K+=cr>>>13,cr&=8191,Or=K,Or+=Sn*mi,Or+=Rn*cn,Or+=ir*pi,Or+=gr*Et,Or+=Gt*si,K=Or>>>13,Or&=8191,Or+=jr*fi,Or+=Pr*Jn,Or+=Lr*(5*wt),Or+=Wr*(5*Ai),Or+=Fn*(5*Qn),K+=Or>>>13,Or&=8191,Sr=K,Sr+=Sn*Qn,Sr+=Rn*mi,Sr+=ir*cn,Sr+=gr*pi,Sr+=Gt*Et,K=Sr>>>13,Sr&=8191,Sr+=jr*si,Sr+=Pr*fi,Sr+=Lr*Jn,Sr+=Wr*(5*wt),Sr+=Fn*(5*Ai),K+=Sr>>>13,Sr&=8191,Kr=K,Kr+=Sn*Ai,Kr+=Rn*Qn,Kr+=ir*mi,Kr+=gr*cn,Kr+=Gt*pi,K=Kr>>>13,Kr&=8191,Kr+=jr*Et,Kr+=Pr*si,Kr+=Lr*fi,Kr+=Wr*Jn,Kr+=Fn*(5*wt),K+=Kr>>>13,Kr&=8191,on=K,on+=Sn*wt,on+=Rn*Ai,on+=ir*Qn,on+=gr*mi,on+=Gt*cn,K=on>>>13,on&=8191,on+=jr*pi,on+=Pr*Et,on+=Lr*si,on+=Wr*fi,on+=Fn*Jn,K+=on>>>13,on&=8191,K=(K<<2)+K|0,K=K+ye|0,ye=K&8191,K=K>>>13,Me+=K,Sn=ye,Rn=Me,ir=it,gr=dt,Gt=br,jr=cr,Pr=Or,Lr=Sr,Wr=Kr,Fn=on,Re+=16,Ee-=16;this.h[0]=Sn,this.h[1]=Rn,this.h[2]=ir,this.h[3]=gr,this.h[4]=Gt,this.h[5]=jr,this.h[6]=Pr,this.h[7]=Lr,this.h[8]=Wr,this.h[9]=Fn},ae.prototype.finish=function(ue,Re){var Ee=new Uint16Array(10),q,Fe,Xt,ar;if(this.leftover){for(ar=this.leftover,this.buffer[ar++]=1;ar<16;ar++)this.buffer[ar]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(q=this.h[1]>>>13,this.h[1]&=8191,ar=2;ar<10;ar++)this.h[ar]+=q,q=this.h[ar]>>>13,this.h[ar]&=8191;for(this.h[0]+=q*5,q=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=q,q=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=q,Ee[0]=this.h[0]+5,q=Ee[0]>>>13,Ee[0]&=8191,ar=1;ar<10;ar++)Ee[ar]=this.h[ar]+q,q=Ee[ar]>>>13,Ee[ar]&=8191;for(Ee[9]-=1<<13,Fe=(q^1)-1,ar=0;ar<10;ar++)Ee[ar]&=Fe;for(Fe=~Fe,ar=0;ar<10;ar++)this.h[ar]=this.h[ar]&Fe|Ee[ar];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Xt=this.h[0]+this.pad[0],this.h[0]=Xt&65535,ar=1;ar<8;ar++)Xt=(this.h[ar]+this.pad[ar]|0)+(Xt>>>16)|0,this.h[ar]=Xt&65535;ue[Re+0]=this.h[0]>>>0&255,ue[Re+1]=this.h[0]>>>8&255,ue[Re+2]=this.h[1]>>>0&255,ue[Re+3]=this.h[1]>>>8&255,ue[Re+4]=this.h[2]>>>0&255,ue[Re+5]=this.h[2]>>>8&255,ue[Re+6]=this.h[3]>>>0&255,ue[Re+7]=this.h[3]>>>8&255,ue[Re+8]=this.h[4]>>>0&255,ue[Re+9]=this.h[4]>>>8&255,ue[Re+10]=this.h[5]>>>0&255,ue[Re+11]=this.h[5]>>>8&255,ue[Re+12]=this.h[6]>>>0&255,ue[Re+13]=this.h[6]>>>8&255,ue[Re+14]=this.h[7]>>>0&255,ue[Re+15]=this.h[7]>>>8&255},ae.prototype.update=function(ue,Re,Ee){var q,Fe;if(this.leftover){for(Fe=16-this.leftover,Fe>Ee&&(Fe=Ee),q=0;q=16&&(Fe=Ee-Ee%16,this.blocks(ue,Re,Fe),Re+=Fe,Ee-=Fe),Ee){for(q=0;q>16&1),Xt[Ee-1]&=65535;Xt[15]=ar[15]-32767-(Xt[14]>>16&1),Fe=Xt[15]>>16&1,Xt[14]&=65535,xe(ar,Xt,1-Fe)}for(Ee=0;Ee<16;Ee++)ue[2*Ee]=ar[Ee]&255,ue[2*Ee+1]=ar[Ee]>>8}function ft(ue,Re){var Ee=new Uint8Array(32),q=new Uint8Array(32);return J(Ee,ue),J(q,Re),k(Ee,0,q,0)}function Le(ue){var Re=new Uint8Array(32);return J(Re,ue),Re[0]&1}function He(ue,Re){var Ee;for(Ee=0;Ee<16;Ee++)ue[Ee]=Re[2*Ee]+(Re[2*Ee+1]<<8);ue[15]&=32767}function nr(ue,Re,Ee){for(var q=0;q<16;q++)ue[q]=Re[q]+Ee[q]}function Bt(ue,Re,Ee){for(var q=0;q<16;q++)ue[q]=Re[q]-Ee[q]}function Rt(ue,Re,Ee){var q,Fe,Xt=0,ar=0,Br=0,Hr=0,An=0,un=0,vt=0,K=0,ye=0,Me=0,it=0,dt=0,br=0,cr=0,Or=0,Sr=0,Kr=0,on=0,Sn=0,Rn=0,ir=0,gr=0,Gt=0,jr=0,Pr=0,Lr=0,Wr=0,Fn=0,Jn=0,fi=0,si=0,Et=Ee[0],pi=Ee[1],cn=Ee[2],mi=Ee[3],Qn=Ee[4],Ai=Ee[5],wt=Ee[6],ao=Ee[7],ji=Ee[8],Li=Ee[9],bo=Ee[10],wo=Ee[11],$o=Ee[12],To=Ee[13],ko=Ee[14],Zn=Ee[15];q=Re[0],Xt+=q*Et,ar+=q*pi,Br+=q*cn,Hr+=q*mi,An+=q*Qn,un+=q*Ai,vt+=q*wt,K+=q*ao,ye+=q*ji,Me+=q*Li,it+=q*bo,dt+=q*wo,br+=q*$o,cr+=q*To,Or+=q*ko,Sr+=q*Zn,q=Re[1],ar+=q*Et,Br+=q*pi,Hr+=q*cn,An+=q*mi,un+=q*Qn,vt+=q*Ai,K+=q*wt,ye+=q*ao,Me+=q*ji,it+=q*Li,dt+=q*bo,br+=q*wo,cr+=q*$o,Or+=q*To,Sr+=q*ko,Kr+=q*Zn,q=Re[2],Br+=q*Et,Hr+=q*pi,An+=q*cn,un+=q*mi,vt+=q*Qn,K+=q*Ai,ye+=q*wt,Me+=q*ao,it+=q*ji,dt+=q*Li,br+=q*bo,cr+=q*wo,Or+=q*$o,Sr+=q*To,Kr+=q*ko,on+=q*Zn,q=Re[3],Hr+=q*Et,An+=q*pi,un+=q*cn,vt+=q*mi,K+=q*Qn,ye+=q*Ai,Me+=q*wt,it+=q*ao,dt+=q*ji,br+=q*Li,cr+=q*bo,Or+=q*wo,Sr+=q*$o,Kr+=q*To,on+=q*ko,Sn+=q*Zn,q=Re[4],An+=q*Et,un+=q*pi,vt+=q*cn,K+=q*mi,ye+=q*Qn,Me+=q*Ai,it+=q*wt,dt+=q*ao,br+=q*ji,cr+=q*Li,Or+=q*bo,Sr+=q*wo,Kr+=q*$o,on+=q*To,Sn+=q*ko,Rn+=q*Zn,q=Re[5],un+=q*Et,vt+=q*pi,K+=q*cn,ye+=q*mi,Me+=q*Qn,it+=q*Ai,dt+=q*wt,br+=q*ao,cr+=q*ji,Or+=q*Li,Sr+=q*bo,Kr+=q*wo,on+=q*$o,Sn+=q*To,Rn+=q*ko,ir+=q*Zn,q=Re[6],vt+=q*Et,K+=q*pi,ye+=q*cn,Me+=q*mi,it+=q*Qn,dt+=q*Ai,br+=q*wt,cr+=q*ao,Or+=q*ji,Sr+=q*Li,Kr+=q*bo,on+=q*wo,Sn+=q*$o,Rn+=q*To,ir+=q*ko,gr+=q*Zn,q=Re[7],K+=q*Et,ye+=q*pi,Me+=q*cn,it+=q*mi,dt+=q*Qn,br+=q*Ai,cr+=q*wt,Or+=q*ao,Sr+=q*ji,Kr+=q*Li,on+=q*bo,Sn+=q*wo,Rn+=q*$o,ir+=q*To,gr+=q*ko,Gt+=q*Zn,q=Re[8],ye+=q*Et,Me+=q*pi,it+=q*cn,dt+=q*mi,br+=q*Qn,cr+=q*Ai,Or+=q*wt,Sr+=q*ao,Kr+=q*ji,on+=q*Li,Sn+=q*bo,Rn+=q*wo,ir+=q*$o,gr+=q*To,Gt+=q*ko,jr+=q*Zn,q=Re[9],Me+=q*Et,it+=q*pi,dt+=q*cn,br+=q*mi,cr+=q*Qn,Or+=q*Ai,Sr+=q*wt,Kr+=q*ao,on+=q*ji,Sn+=q*Li,Rn+=q*bo,ir+=q*wo,gr+=q*$o,Gt+=q*To,jr+=q*ko,Pr+=q*Zn,q=Re[10],it+=q*Et,dt+=q*pi,br+=q*cn,cr+=q*mi,Or+=q*Qn,Sr+=q*Ai,Kr+=q*wt,on+=q*ao,Sn+=q*ji,Rn+=q*Li,ir+=q*bo,gr+=q*wo,Gt+=q*$o,jr+=q*To,Pr+=q*ko,Lr+=q*Zn,q=Re[11],dt+=q*Et,br+=q*pi,cr+=q*cn,Or+=q*mi,Sr+=q*Qn,Kr+=q*Ai,on+=q*wt,Sn+=q*ao,Rn+=q*ji,ir+=q*Li,gr+=q*bo,Gt+=q*wo,jr+=q*$o,Pr+=q*To,Lr+=q*ko,Wr+=q*Zn,q=Re[12],br+=q*Et,cr+=q*pi,Or+=q*cn,Sr+=q*mi,Kr+=q*Qn,on+=q*Ai,Sn+=q*wt,Rn+=q*ao,ir+=q*ji,gr+=q*Li,Gt+=q*bo,jr+=q*wo,Pr+=q*$o,Lr+=q*To,Wr+=q*ko,Fn+=q*Zn,q=Re[13],cr+=q*Et,Or+=q*pi,Sr+=q*cn,Kr+=q*mi,on+=q*Qn,Sn+=q*Ai,Rn+=q*wt,ir+=q*ao,gr+=q*ji,Gt+=q*Li,jr+=q*bo,Pr+=q*wo,Lr+=q*$o,Wr+=q*To,Fn+=q*ko,Jn+=q*Zn,q=Re[14],Or+=q*Et,Sr+=q*pi,Kr+=q*cn,on+=q*mi,Sn+=q*Qn,Rn+=q*Ai,ir+=q*wt,gr+=q*ao,Gt+=q*ji,jr+=q*Li,Pr+=q*bo,Lr+=q*wo,Wr+=q*$o,Fn+=q*To,Jn+=q*ko,fi+=q*Zn,q=Re[15],Sr+=q*Et,Kr+=q*pi,on+=q*cn,Sn+=q*mi,Rn+=q*Qn,ir+=q*Ai,gr+=q*wt,Gt+=q*ao,jr+=q*ji,Pr+=q*Li,Lr+=q*bo,Wr+=q*wo,Fn+=q*$o,Jn+=q*To,fi+=q*ko,si+=q*Zn,Xt+=38*Kr,ar+=38*on,Br+=38*Sn,Hr+=38*Rn,An+=38*ir,un+=38*gr,vt+=38*Gt,K+=38*jr,ye+=38*Pr,Me+=38*Lr,it+=38*Wr,dt+=38*Fn,br+=38*Jn,cr+=38*fi,Or+=38*si,Fe=1,q=Xt+Fe+65535,Fe=Math.floor(q/65536),Xt=q-Fe*65536,q=ar+Fe+65535,Fe=Math.floor(q/65536),ar=q-Fe*65536,q=Br+Fe+65535,Fe=Math.floor(q/65536),Br=q-Fe*65536,q=Hr+Fe+65535,Fe=Math.floor(q/65536),Hr=q-Fe*65536,q=An+Fe+65535,Fe=Math.floor(q/65536),An=q-Fe*65536,q=un+Fe+65535,Fe=Math.floor(q/65536),un=q-Fe*65536,q=vt+Fe+65535,Fe=Math.floor(q/65536),vt=q-Fe*65536,q=K+Fe+65535,Fe=Math.floor(q/65536),K=q-Fe*65536,q=ye+Fe+65535,Fe=Math.floor(q/65536),ye=q-Fe*65536,q=Me+Fe+65535,Fe=Math.floor(q/65536),Me=q-Fe*65536,q=it+Fe+65535,Fe=Math.floor(q/65536),it=q-Fe*65536,q=dt+Fe+65535,Fe=Math.floor(q/65536),dt=q-Fe*65536,q=br+Fe+65535,Fe=Math.floor(q/65536),br=q-Fe*65536,q=cr+Fe+65535,Fe=Math.floor(q/65536),cr=q-Fe*65536,q=Or+Fe+65535,Fe=Math.floor(q/65536),Or=q-Fe*65536,q=Sr+Fe+65535,Fe=Math.floor(q/65536),Sr=q-Fe*65536,Xt+=Fe-1+37*(Fe-1),Fe=1,q=Xt+Fe+65535,Fe=Math.floor(q/65536),Xt=q-Fe*65536,q=ar+Fe+65535,Fe=Math.floor(q/65536),ar=q-Fe*65536,q=Br+Fe+65535,Fe=Math.floor(q/65536),Br=q-Fe*65536,q=Hr+Fe+65535,Fe=Math.floor(q/65536),Hr=q-Fe*65536,q=An+Fe+65535,Fe=Math.floor(q/65536),An=q-Fe*65536,q=un+Fe+65535,Fe=Math.floor(q/65536),un=q-Fe*65536,q=vt+Fe+65535,Fe=Math.floor(q/65536),vt=q-Fe*65536,q=K+Fe+65535,Fe=Math.floor(q/65536),K=q-Fe*65536,q=ye+Fe+65535,Fe=Math.floor(q/65536),ye=q-Fe*65536,q=Me+Fe+65535,Fe=Math.floor(q/65536),Me=q-Fe*65536,q=it+Fe+65535,Fe=Math.floor(q/65536),it=q-Fe*65536,q=dt+Fe+65535,Fe=Math.floor(q/65536),dt=q-Fe*65536,q=br+Fe+65535,Fe=Math.floor(q/65536),br=q-Fe*65536,q=cr+Fe+65535,Fe=Math.floor(q/65536),cr=q-Fe*65536,q=Or+Fe+65535,Fe=Math.floor(q/65536),Or=q-Fe*65536,q=Sr+Fe+65535,Fe=Math.floor(q/65536),Sr=q-Fe*65536,Xt+=Fe-1+37*(Fe-1),ue[0]=Xt,ue[1]=ar,ue[2]=Br,ue[3]=Hr,ue[4]=An,ue[5]=un,ue[6]=vt,ue[7]=K,ue[8]=ye,ue[9]=Me,ue[10]=it,ue[11]=dt,ue[12]=br,ue[13]=cr,ue[14]=Or,ue[15]=Sr}function Jt(ue,Re){Rt(ue,Re,Re)}function vr(ue,Re){var Ee=r(),q;for(q=0;q<16;q++)Ee[q]=Re[q];for(q=253;q>=0;q--)Jt(Ee,Ee),q!==2&&q!==4&&Rt(Ee,Ee,Re);for(q=0;q<16;q++)ue[q]=Ee[q]}function At(ue,Re){var Ee=r(),q;for(q=0;q<16;q++)Ee[q]=Re[q];for(q=250;q>=0;q--)Jt(Ee,Ee),q!==1&&Rt(Ee,Ee,Re);for(q=0;q<16;q++)ue[q]=Ee[q]}function kt(ue,Re,Ee){var q=new Uint8Array(32),Fe=new Float64Array(80),Xt,ar,Br=r(),Hr=r(),An=r(),un=r(),vt=r(),K=r();for(ar=0;ar<31;ar++)q[ar]=Re[ar];for(q[31]=Re[31]&127|64,q[0]&=248,He(Fe,Ee),ar=0;ar<16;ar++)Hr[ar]=Fe[ar],un[ar]=Br[ar]=An[ar]=0;for(Br[0]=un[0]=1,ar=254;ar>=0;--ar)Xt=q[ar>>>3]>>>(ar&7)&1,xe(Br,Hr,Xt),xe(An,un,Xt),nr(vt,Br,An),Bt(Br,Br,An),nr(An,Hr,un),Bt(Hr,Hr,un),Jt(un,vt),Jt(K,Br),Rt(Br,An,Br),Rt(An,Hr,vt),nr(vt,Br,An),Bt(Br,Br,An),Jt(Hr,Br),Bt(An,un,K),Rt(Br,An,u),nr(Br,Br,un),Rt(An,An,Br),Rt(Br,un,K),Rt(un,Hr,Fe),Jt(Hr,vt),xe(Br,Hr,Xt),xe(An,un,Xt);for(ar=0;ar<16;ar++)Fe[ar+16]=Br[ar],Fe[ar+32]=An[ar],Fe[ar+48]=Hr[ar],Fe[ar+64]=un[ar];var ye=Fe.subarray(32),Me=Fe.subarray(16);return vr(ye,ye),Rt(Me,Me,ye),J(ue,Me),0}function Ct(ue,Re){return kt(ue,Re,a)}function Lt(ue,Re){return i(Re,32),Ct(ue,Re)}function Kt(ue,Re,Ee){var q=new Uint8Array(32);return kt(q,Ee,Re),D(ue,o,q,j)}var yr=P,ne=ee;function Mt(ue,Re,Ee,q,Fe,Xt){var ar=new Uint8Array(32);return Kt(ar,Fe,Xt),yr(ue,Re,Ee,q,ar)}function Nt(ue,Re,Ee,q,Fe,Xt){var ar=new Uint8Array(32);return Kt(ar,Fe,Xt),ne(ue,Re,Ee,q,ar)}var Ie=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Ae(ue,Re,Ee,q){for(var Fe=new Int32Array(16),Xt=new Int32Array(16),ar,Br,Hr,An,un,vt,K,ye,Me,it,dt,br,cr,Or,Sr,Kr,on,Sn,Rn,ir,gr,Gt,jr,Pr,Lr,Wr,Fn=ue[0],Jn=ue[1],fi=ue[2],si=ue[3],Et=ue[4],pi=ue[5],cn=ue[6],mi=ue[7],Qn=Re[0],Ai=Re[1],wt=Re[2],ao=Re[3],ji=Re[4],Li=Re[5],bo=Re[6],wo=Re[7],$o=0;q>=128;){for(Rn=0;Rn<16;Rn++)ir=8*Rn+$o,Fe[Rn]=Ee[ir+0]<<24|Ee[ir+1]<<16|Ee[ir+2]<<8|Ee[ir+3],Xt[Rn]=Ee[ir+4]<<24|Ee[ir+5]<<16|Ee[ir+6]<<8|Ee[ir+7];for(Rn=0;Rn<80;Rn++)if(ar=Fn,Br=Jn,Hr=fi,An=si,un=Et,vt=pi,K=cn,ye=mi,Me=Qn,it=Ai,dt=wt,br=ao,cr=ji,Or=Li,Sr=bo,Kr=wo,gr=mi,Gt=wo,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=(Et>>>14|ji<<32-14)^(Et>>>18|ji<<32-18)^(ji>>>41-32|Et<<32-(41-32)),Gt=(ji>>>14|Et<<32-14)^(ji>>>18|Et<<32-18)^(Et>>>41-32|ji<<32-(41-32)),jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,gr=Et&pi^~Et&cn,Gt=ji&Li^~ji&bo,jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,gr=Ie[Rn*2],Gt=Ie[Rn*2+1],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,gr=Fe[Rn%16],Gt=Xt[Rn%16],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,on=Lr&65535|Wr<<16,Sn=jr&65535|Pr<<16,gr=on,Gt=Sn,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=(Fn>>>28|Qn<<32-28)^(Qn>>>34-32|Fn<<32-(34-32))^(Qn>>>39-32|Fn<<32-(39-32)),Gt=(Qn>>>28|Fn<<32-28)^(Fn>>>34-32|Qn<<32-(34-32))^(Fn>>>39-32|Qn<<32-(39-32)),jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,gr=Fn&Jn^Fn&fi^Jn&fi,Gt=Qn&Ai^Qn&wt^Ai&wt,jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ye=Lr&65535|Wr<<16,Kr=jr&65535|Pr<<16,gr=An,Gt=br,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=on,Gt=Sn,jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,An=Lr&65535|Wr<<16,br=jr&65535|Pr<<16,Jn=ar,fi=Br,si=Hr,Et=An,pi=un,cn=vt,mi=K,Fn=ye,Ai=Me,wt=it,ao=dt,ji=br,Li=cr,bo=Or,wo=Sr,Qn=Kr,Rn%16===15)for(ir=0;ir<16;ir++)gr=Fe[ir],Gt=Xt[ir],jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=Fe[(ir+9)%16],Gt=Xt[(ir+9)%16],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,on=Fe[(ir+1)%16],Sn=Xt[(ir+1)%16],gr=(on>>>1|Sn<<32-1)^(on>>>8|Sn<<32-8)^on>>>7,Gt=(Sn>>>1|on<<32-1)^(Sn>>>8|on<<32-8)^(Sn>>>7|on<<32-7),jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,on=Fe[(ir+14)%16],Sn=Xt[(ir+14)%16],gr=(on>>>19|Sn<<32-19)^(Sn>>>61-32|on<<32-(61-32))^on>>>6,Gt=(Sn>>>19|on<<32-19)^(on>>>61-32|Sn<<32-(61-32))^(Sn>>>6|on<<32-6),jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,Fe[ir]=Lr&65535|Wr<<16,Xt[ir]=jr&65535|Pr<<16;gr=Fn,Gt=Qn,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[0],Gt=Re[0],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[0]=Fn=Lr&65535|Wr<<16,Re[0]=Qn=jr&65535|Pr<<16,gr=Jn,Gt=Ai,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[1],Gt=Re[1],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[1]=Jn=Lr&65535|Wr<<16,Re[1]=Ai=jr&65535|Pr<<16,gr=fi,Gt=wt,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[2],Gt=Re[2],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[2]=fi=Lr&65535|Wr<<16,Re[2]=wt=jr&65535|Pr<<16,gr=si,Gt=ao,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[3],Gt=Re[3],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[3]=si=Lr&65535|Wr<<16,Re[3]=ao=jr&65535|Pr<<16,gr=Et,Gt=ji,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[4],Gt=Re[4],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[4]=Et=Lr&65535|Wr<<16,Re[4]=ji=jr&65535|Pr<<16,gr=pi,Gt=Li,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[5],Gt=Re[5],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[5]=pi=Lr&65535|Wr<<16,Re[5]=Li=jr&65535|Pr<<16,gr=cn,Gt=bo,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[6],Gt=Re[6],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[6]=cn=Lr&65535|Wr<<16,Re[6]=bo=jr&65535|Pr<<16,gr=mi,Gt=wo,jr=Gt&65535,Pr=Gt>>>16,Lr=gr&65535,Wr=gr>>>16,gr=ue[7],Gt=Re[7],jr+=Gt&65535,Pr+=Gt>>>16,Lr+=gr&65535,Wr+=gr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ue[7]=mi=Lr&65535|Wr<<16,Re[7]=wo=jr&65535|Pr<<16,$o+=128,q-=128}return q}function fe(ue,Re,Ee){var q=new Int32Array(8),Fe=new Int32Array(8),Xt=new Uint8Array(256),ar,Br=Ee;for(q[0]=1779033703,q[1]=3144134277,q[2]=1013904242,q[3]=2773480762,q[4]=1359893119,q[5]=2600822924,q[6]=528734635,q[7]=1541459225,Fe[0]=4089235720,Fe[1]=2227873595,Fe[2]=4271175723,Fe[3]=1595750129,Fe[4]=2917565137,Fe[5]=725511199,Fe[6]=4215389547,Fe[7]=327033209,Ae(q,Fe,Re,Ee),Ee%=128,ar=0;ar=0;--Fe)q=Ee[Fe/8|0]>>(Fe&7)&1,rt(ue,Re,q),Be(Re,ue),Be(ue,ue),rt(ue,Re,q)}function ce(ue,Re){var Ee=[r(),r(),r(),r()];le(Ee[0],p),le(Ee[1],v),le(Ee[2],l),Rt(Ee[3],p,v),jt(ue,Ee,Re)}function ie(ue,Re,Ee){var q=new Uint8Array(64),Fe=[r(),r(),r(),r()],Xt;for(Ee||i(Re,32),fe(q,Re,32),q[0]&=248,q[31]&=127,q[31]|=64,ce(Fe,q),lt(ue,Fe),Xt=0;Xt<32;Xt++)Re[Xt+32]=ue[Xt];return 0}var de=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function $(ue,Re){var Ee,q,Fe,Xt;for(q=63;q>=32;--q){for(Ee=0,Fe=q-32,Xt=q-12;Fe>4)*de[Fe],Ee=Re[Fe]>>8,Re[Fe]&=255;for(Fe=0;Fe<32;Fe++)Re[Fe]-=Ee*de[Fe];for(q=0;q<32;q++)Re[q+1]+=Re[q]>>8,ue[q]=Re[q]&255}function C(ue){var Re=new Float64Array(64),Ee;for(Ee=0;Ee<64;Ee++)Re[Ee]=ue[Ee];for(Ee=0;Ee<64;Ee++)ue[Ee]=0;$(ue,Re)}function T(ue,Re,Ee,q){var Fe=new Uint8Array(64),Xt=new Uint8Array(64),ar=new Uint8Array(64),Br,Hr,An=new Float64Array(64),un=[r(),r(),r(),r()];fe(Fe,q,32),Fe[0]&=248,Fe[31]&=127,Fe[31]|=64;var vt=Ee+64;for(Br=0;Br>7&&Bt(ue[0],s,ue[0]),Rt(ue[3],ue[0],ue[1]),0)}function ve(ue,Re,Ee,q){var Fe,Xt=new Uint8Array(32),ar=new Uint8Array(64),Br=[r(),r(),r(),r()],Hr=[r(),r(),r(),r()];if(Ee<64||Z(Hr,q))return-1;for(Fe=0;Fe=0},t.sign.keyPair=function(){var ue=new Uint8Array(Yn),Re=new Uint8Array(Pi);return ie(ue,Re),{publicKey:ue,secretKey:Re}},t.sign.keyPair.fromSecretKey=function(ue){if(Wi(ue),ue.length!==Pi)throw new Error("bad secret key size");for(var Re=new Uint8Array(Yn),Ee=0;Ee0;)t.push(parseInt(e.slice(0,8),2)),e=e.slice(8);return Buffer.from(t)}md.bitsToBytes=gle;var _y={};Object.defineProperty(_y,"__esModule",{value:!0});_y.wordlist=void 0;const mle=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];_y.wordlist=mle;var yle=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Do,"__esModule",{value:!0});Do.mnemonicFromRandomSeed=Do.mnemonicIndexesToBytes=Do.bytesToMnemonics=Do.bytesToMnemonicIndexes=Do.mnemonicNew=Do.mnemonicValidate=Do.mnemonicToHDSeed=Do.mnemonicToWalletKey=Do.mnemonicToPrivateKey=Do.mnemonicToSeed=Do.mnemonicToEntropy=void 0;const aD=yle(R2.exports),vle=Cu,ble=Ou,P2=xy,WS=md,ib=_y,q6=1e5;async function sD(e){const t=await Sy(e);return await wle(t)&&!await G6(t)}function K6(e){return e.map(t=>t.toLowerCase().trim())}async function G6(e){return(await(0,P2.pbkdf2_sha512)(e,"TON seed version",Math.max(1,Math.floor(q6/256)),64))[0]==0}async function wle(e){return(await(0,P2.pbkdf2_sha512)(e,"TON fast seed version",1,64))[0]==1}async function Sy(e,t){return await(0,ble.hmac_sha512)(e.join(" "),t&&t.length>0?t:"")}Do.mnemonicToEntropy=Sy;async function Y6(e,t,r){const i=await Sy(e,r);return await(0,P2.pbkdf2_sha512)(i,t,q6,64)}Do.mnemonicToSeed=Y6;async function lD(e,t){e=K6(e);const r=await Y6(e,"TON default seed",t);let i=aD.default.sign.keyPair.fromSeed(r.slice(0,32));return{publicKey:Buffer.from(i.publicKey),secretKey:Buffer.from(i.secretKey)}}Do.mnemonicToPrivateKey=lD;async function xle(e,t){let i=(await lD(e,t)).secretKey.slice(0,32);const o=aD.default.sign.keyPair.fromSeed(i);return{publicKey:Buffer.from(o.publicKey),secretKey:Buffer.from(o.secretKey)}}Do.mnemonicToWalletKey=xle;async function _le(e,t){return e=K6(e),await Y6(e,"TON HD Keys seed",t)}Do.mnemonicToHDSeed=_le;async function uD(e,t){e=K6(e);for(let r of e)if(ib.wordlist.indexOf(r)<0)return!1;return t&&t.length>0&&!await sD(e)?!1:await G6(await Sy(e,t))}Do.mnemonicValidate=uD;async function Sle(e=24,t){let r=[];for(;;){r=[];for(let i=0;i0&&!await sD(r))&&!!await G6(await Sy(r,t)))break}return r}Do.mnemonicNew=Sle;function cD(e,t){let r=(0,WS.bytesToBits)(e),i=[];for(let o=0;o=2028)throw Error("Invalid input");t+=(0,WS.lpad)(r.toString(2),"0",11)}for(;t.length%8!==0;)t=t+"0";return(0,WS.bitsToBytes)(t)}Do.mnemonicIndexesToBytes=Cle;async function kle(e,t=24,r){const i=Math.ceil(t*11/8);let o=e;for(;;){let a=await(0,P2.pbkdf2_sha512)(o,"TON mnemonic seed",Math.max(1,Math.floor(q6/256)),i),s=dD(a,t);if(await uD(s,r))return s;o=a}}Do.mnemonicFromRandomSeed=kle;var fs={},Ele=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fs,"__esModule",{value:!0});fs.openBox=fs.sealBox=fs.signVerify=fs.sign=fs.keyPairFromSeed=fs.keyPairFromSecretKey=void 0;const wg=Ele(R2.exports);function Ale(e){let t=wg.default.sign.keyPair.fromSecretKey(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}fs.keyPairFromSecretKey=Ale;function Tle(e){let t=wg.default.sign.keyPair.fromSeed(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}fs.keyPairFromSeed=Tle;function Ile(e,t){return Buffer.from(wg.default.sign.detached(new Uint8Array(e),new Uint8Array(t)))}fs.sign=Ile;function Rle(e,t,r){return wg.default.sign.detached.verify(new Uint8Array(e),new Uint8Array(t),new Uint8Array(r))}fs.signVerify=Rle;function Ple(e,t,r){return Buffer.from(wg.default.secretbox(e,t,r))}fs.sealBox=Ple;function Mle(e,t,r){let i=wg.default.secretbox.open(e,t,r);return i?Buffer.from(i):null}fs.openBox=Mle;var yd={};Object.defineProperty(yd,"__esModule",{value:!0});yd.deriveEd25519Path=yd.deriveED25519HardenedKey=yd.getED25519MasterKeyFromSeed=void 0;const fD=Ou,Ole="ed25519 seed",tR=2147483648;async function pD(e){const t=await(0,fD.hmac_sha512)(Ole,e),r=t.slice(0,32),i=t.slice(32);return{key:r,chainCode:i}}yd.getED25519MasterKeyFromSeed=pD;async function hD(e,t){if(t>=tR)throw Error("Key index must be less than offset");const r=Buffer.alloc(4);r.writeUInt32BE(t+tR,0);const i=Buffer.concat([Buffer.alloc(1,0),e.key,r]),o=await(0,fD.hmac_sha512)(e.chainCode,i),a=o.slice(0,32),s=o.slice(32);return{key:a,chainCode:s}}yd.deriveED25519HardenedKey=hD;async function Ble(e,t){let r=await pD(e),i=[...t];for(;i.length>0;){let o=i[0];i=i.slice(1),r=await hD(r,o)}return r.key}yd.deriveEd25519Path=Ble;var vd={};Object.defineProperty(vd,"__esModule",{value:!0});vd.deriveSymmetricPath=vd.deriveSymmetricHardenedKey=vd.getSymmetricMasterKeyFromSeed=void 0;const gD=Ou,Ule="Symmetric key seed";async function mD(e){const t=await(0,gD.hmac_sha512)(Ule,e),r=t.slice(32),i=t.slice(0,32);return{key:r,chainCode:i}}vd.getSymmetricMasterKeyFromSeed=mD;async function yD(e,t){const r=Buffer.concat([Buffer.alloc(1,0),Buffer.from(t)]),i=await(0,gD.hmac_sha512)(e.chainCode,r),o=i.slice(32),a=i.slice(0,32);return{key:o,chainCode:a}}vd.deriveSymmetricHardenedKey=yD;async function Dle(e,t){let r=await mD(e),i=[...t];for(;i.length>0;){let o=i[0];i=i.slice(1),r=await yD(r,o)}return r.key}vd.deriveSymmetricPath=Dle;var bd={};Object.defineProperty(bd,"__esModule",{value:!0});bd.deriveMnemonicsPath=bd.deriveMnemonicHardenedKey=bd.getMnemonicsMasterKeyFromSeed=void 0;const Lle=Do,vD=Ou,rR=2147483648,Nle="TON Mnemonics HD seed";async function bD(e){const t=await(0,vD.hmac_sha512)(Nle,e),r=t.slice(0,32),i=t.slice(32);return{key:r,chainCode:i}}bd.getMnemonicsMasterKeyFromSeed=bD;async function wD(e,t){if(t>=rR)throw Error("Key index must be less than offset");const r=Buffer.alloc(4);r.writeUInt32BE(t+rR,0);const i=Buffer.concat([Buffer.alloc(1,0),e.key,r]),o=await(0,vD.hmac_sha512)(e.chainCode,i),a=o.slice(0,32),s=o.slice(32);return{key:a,chainCode:s}}bd.deriveMnemonicHardenedKey=wD;async function jle(e,t,r=24,i){let o=await bD(e),a=[...t];for(;a.length>0;){let s=a[0];a=a.slice(1),o=await wD(o,s)}return await(0,Lle.mnemonicFromRandomSeed)(o.key,r,i)}bd.deriveMnemonicsPath=jle;var nR;function xg(){return nR||(nR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMnemonicsMasterKeyFromSeed=e.deriveMnemonicHardenedKey=e.deriveMnemonicsPath=e.deriveSymmetricPath=e.deriveSymmetricHardenedKey=e.getSymmetricMasterKeyFromSeed=e.deriveEd25519Path=e.deriveED25519HardenedKey=e.getED25519MasterKeyFromSeed=e.signVerify=e.sign=e.keyPairFromSecretKey=e.keyPairFromSeed=e.openBox=e.sealBox=e.mnemonicWordList=e.mnemonicToHDSeed=e.mnemonicToSeed=e.mnemonicToWalletKey=e.mnemonicToPrivateKey=e.mnemonicValidate=e.mnemonicNew=e.newSecurePassphrase=e.newSecureWords=e.getSecureRandomNumber=e.getSecureRandomWords=e.getSecureRandomBytes=e.hmac_sha512=e.pbkdf2_sha512=e.sha512_sync=e.sha512=e.sha256_sync=e.sha256=void 0;var t=hd;Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return t.sha256}}),Object.defineProperty(e,"sha256_sync",{enumerable:!0,get:function(){return t.sha256_sync}});var r=gd;Object.defineProperty(e,"sha512",{enumerable:!0,get:function(){return r.sha512}}),Object.defineProperty(e,"sha512_sync",{enumerable:!0,get:function(){return r.sha512_sync}});var i=xy;Object.defineProperty(e,"pbkdf2_sha512",{enumerable:!0,get:function(){return i.pbkdf2_sha512}});var o=Ou;Object.defineProperty(e,"hmac_sha512",{enumerable:!0,get:function(){return o.hmac_sha512}});var a=Cu;Object.defineProperty(e,"getSecureRandomBytes",{enumerable:!0,get:function(){return a.getSecureRandomBytes}}),Object.defineProperty(e,"getSecureRandomWords",{enumerable:!0,get:function(){return a.getSecureRandomWords}}),Object.defineProperty(e,"getSecureRandomNumber",{enumerable:!0,get:function(){return a.getSecureRandomNumber}});var s=T2;Object.defineProperty(e,"newSecureWords",{enumerable:!0,get:function(){return s.newSecureWords}});var l=dle();Object.defineProperty(e,"newSecurePassphrase",{enumerable:!0,get:function(){return l.newSecurePassphrase}});var u=Do;Object.defineProperty(e,"mnemonicNew",{enumerable:!0,get:function(){return u.mnemonicNew}}),Object.defineProperty(e,"mnemonicValidate",{enumerable:!0,get:function(){return u.mnemonicValidate}}),Object.defineProperty(e,"mnemonicToPrivateKey",{enumerable:!0,get:function(){return u.mnemonicToPrivateKey}}),Object.defineProperty(e,"mnemonicToWalletKey",{enumerable:!0,get:function(){return u.mnemonicToWalletKey}}),Object.defineProperty(e,"mnemonicToSeed",{enumerable:!0,get:function(){return u.mnemonicToSeed}}),Object.defineProperty(e,"mnemonicToHDSeed",{enumerable:!0,get:function(){return u.mnemonicToHDSeed}});var c=_y;Object.defineProperty(e,"mnemonicWordList",{enumerable:!0,get:function(){return c.wordlist}});var d=fs;Object.defineProperty(e,"sealBox",{enumerable:!0,get:function(){return d.sealBox}}),Object.defineProperty(e,"openBox",{enumerable:!0,get:function(){return d.openBox}});var p=fs;Object.defineProperty(e,"keyPairFromSeed",{enumerable:!0,get:function(){return p.keyPairFromSeed}}),Object.defineProperty(e,"keyPairFromSecretKey",{enumerable:!0,get:function(){return p.keyPairFromSecretKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return p.sign}}),Object.defineProperty(e,"signVerify",{enumerable:!0,get:function(){return p.signVerify}});var v=yd;Object.defineProperty(e,"getED25519MasterKeyFromSeed",{enumerable:!0,get:function(){return v.getED25519MasterKeyFromSeed}}),Object.defineProperty(e,"deriveED25519HardenedKey",{enumerable:!0,get:function(){return v.deriveED25519HardenedKey}}),Object.defineProperty(e,"deriveEd25519Path",{enumerable:!0,get:function(){return v.deriveEd25519Path}});var x=vd;Object.defineProperty(e,"getSymmetricMasterKeyFromSeed",{enumerable:!0,get:function(){return x.getSymmetricMasterKeyFromSeed}}),Object.defineProperty(e,"deriveSymmetricHardenedKey",{enumerable:!0,get:function(){return x.deriveSymmetricHardenedKey}}),Object.defineProperty(e,"deriveSymmetricPath",{enumerable:!0,get:function(){return x.deriveSymmetricPath}});var b=bd;Object.defineProperty(e,"deriveMnemonicsPath",{enumerable:!0,get:function(){return b.deriveMnemonicsPath}}),Object.defineProperty(e,"deriveMnemonicHardenedKey",{enumerable:!0,get:function(){return b.deriveMnemonicHardenedKey}}),Object.defineProperty(e,"getMnemonicsMasterKeyFromSeed",{enumerable:!0,get:function(){return b.getMnemonicsMasterKeyFromSeed}})}(J_)),J_}Object.defineProperty(_2,"__esModule",{value:!0});_2.wonderCalculator=void 0;const $le=by(),au=hg,cm=vg,Fle=yg,zle=gg,Hle=cc,Wle=xg(),Vle=mg,qle=wy;function Kle(e,t,r){let i,o=null;if(e===au.CellType.Ordinary){let v=0;for(let x of r)v=v|x.mask.value;i=new cm.LevelMask(v)}else if(e===au.CellType.PrunedBranch)o=(0,Fle.exoticPruned)(t,r),i=new cm.LevelMask(o.mask);else if(e===au.CellType.MerkleProof)(0,zle.exoticMerkleProof)(t,r),i=new cm.LevelMask(r[0].mask.value>>1);else if(e===au.CellType.MerkleUpdate)(0,Vle.exoticMerkleUpdate)(t,r),i=new cm.LevelMask((r[0].mask.value|r[1].mask.value)>>1);else if(e===au.CellType.Library)(0,qle.exoticLibrary)(t,r),i=new cm.LevelMask;else throw new Error("Unsupported exotic type");let a=[],s=[],l=e===au.CellType.PrunedBranch?1:i.hashCount,c=i.hashCount-l;for(let v=0,x=0;v<=i.level;v++){if(!i.isSignificant(v))continue;if(x0&&y++;let _=(0,Hle.getRepr)(t,b,r,v,e),k=(0,Wle.sha256_sync)(_),E=x-c;a[E]=y,s[E]=k,x++}let d=[],p=[];if(o)for(let v=0;v<4;v++){const{hashIndex:x}=i.apply(v),{hashIndex:b}=i;x!==b?(d.push(o.pruned[x].hash),p.push(o.pruned[x].depth)):(d.push(s[0]),p.push(a[0]))}else for(let v=0;v<4;v++)d.push(s[i.apply(v).hashIndex]),p.push(a[i.apply(v).hashIndex]);return{mask:i,hashes:d,depths:p}}_2.wonderCalculator=Kle;var Gu={},M2={};Object.defineProperty(M2,"__esModule",{value:!0});M2.topologicalSort=void 0;function Gle(e){let t=[e],r=new Map,i=new Set,o=[];for(;t.length>0;){const c=[...t];t=[];for(let d of c){const p=d.hash().toString("hex");if(!r.has(p)){i.add(p),r.set(p,{cell:d,refs:d.refs.map(v=>v.hash().toString("hex"))});for(let v of d.refs)t.push(v)}}}let a=new Set;function s(c){if(!!i.has(c)){if(a.has(c))throw Error("Not a DAG");a.add(c);for(let d of r.get(c).refs)s(d);o.unshift(c),a.delete(c),i.delete(c)}}for(;i.size>0;){const c=Array.from(i)[0];s(c)}let l=new Map;for(let c=0;cl.get(p))})}return u}M2.topologicalSort=Gle;var O2={};Object.defineProperty(O2,"__esModule",{value:!0});O2.bitsForNumber=void 0;function Yle(e,t){let r=BigInt(e);if(t==="int")return r===0n||r===-1n?1:(r>0?r:-r).toString(2).length+1;if(t==="uint"){if(r<0)throw Error(`value is negative. Got ${e}`);return r.toString(2).length}else throw Error(`invalid mode. Got ${t}`)}O2.bitsForNumber=Yle;var Cy={};Object.defineProperty(Cy,"__esModule",{value:!0});Cy.crc32c=void 0;const Fc=2197175160;function Zle(e){let t=-1;for(let i=0;i>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1,t=t&1?t>>>1^Fc:t>>>1;t=t^4294967295;let r=Buffer.alloc(4);return r.writeInt32LE(t),r}Cy.crc32c=Zle;var iR;function Qle(){if(iR)return Gu;iR=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.serializeBoc=Gu.deserializeBoc=Gu.parseBoc=void 0;const e=ru,t=by(),r=mp(),i=M2,o=O2,a=m2(),s=cc,l=z6(),u=Cy;function c(k){return d(k&7)}function d(k){let E=0;for(let O=0;O<3;O++)E+=k&1,k=k>>1;return E+1}function p(k,E){const O=k.loadUint(8),U=O%8,D=!!(O&8),j=k.loadUint(8),F=Math.ceil(j/2),H=!!(j%2),W=O>>5,G=(O&16)!=0,ae=32,V=G?c(W)*ae:0,oe=G?c(W)*2:0;k.skip(V*8),k.skip(oe*8);let P=t.BitString.EMPTY;F>0&&(H?P=k.loadPaddedBits(F*8):P=k.loadBits(F*8));let ee=[];for(let le=0;le=0;j--){if(U[j].result)throw Error("Impossible");let F=[];for(let H of U[j].refs){if(!U[H].result)throw Error("Invalid BOC file");F.push(U[H].result)}U[j].result=new r.Cell({bits:U[j].bits,refs:F,exotic:U[j].exotic})}let D=[];for(let j=0;j{if(this.isExotic&&!U)throw new Error("Exotic cells cannot be parsed");return new a.Slice(new c.BitReader(this.bits),this.refs)},this.hash=(U=3)=>this._hashes[Math.min(this._hashes.length-1,U)],this.depth=(U=3)=>this._depths[Math.min(this._depths.length-1,U)],this.level=()=>this.mask.level,this.equals=U=>this.hash().equals(U.hash()),this[t]=()=>this.toString();let b=i.BitString.EMPTY;x&&x.bits&&(b=x.bits);let y=[];x&&x.refs&&(y=[...x.refs]);let _,k,E,O=o.CellType.Ordinary;if(x&&x.exotic){let U=(0,s.resolveExotic)(b,y),D=(0,l.wonderCalculator)(U.type,b,y);E=D.mask,k=D.depths,_=D.hashes,O=U.type}else{if(y.length>4)throw new Error("Invalid number of references");if(b.length>1023)throw new Error(`Bits overflow: ${b.length} > 1023`);let U=(0,l.wonderCalculator)(o.CellType.Ordinary,b,y);E=U.mask,k=U.depths,_=U.hashes,O=o.CellType.Ordinary}this.type=O,this.bits=b,this.refs=y,this.mask=E,this._depths=k,this._hashes=_,Object.freeze(this),Object.freeze(this.refs),Object.freeze(this.bits),Object.freeze(this.mask),Object.freeze(this._depths),Object.freeze(this._hashes)}get isExotic(){return this.type!==o.CellType.Ordinary}toBoc(x){let b=x&&x.idx!==null&&x.idx!==void 0?x.idx:!1,y=x&&x.crc32!==null&&x.crc32!==void 0?x.crc32:!0;return(0,u.serializeBoc)(this,{idx:b,crc32:y})}toString(x){let b=x||"",y="x";this.isExotic&&(this.type===o.CellType.MerkleProof?y="p":this.type===o.CellType.MerkleUpdate?y="u":this.type===o.CellType.PrunedBranch&&(y="p"));let _=b+(this.isExotic?y:"x")+"{"+this.bits.toString()+"}";for(let k in this.refs){const E=this.refs[k];_+=` +`+E.toString(b+" ")}return _}asSlice(){return this.beginParse()}asBuilder(){return(0,d.beginCell)().storeSlice(this.asSlice())}}return am.Cell=p,t=r.default,p.EMPTY=new p,am}var aR;function as(){if(aR)return Xd;aR=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.Builder=Xd.beginCell=void 0;const e=m2(),t=mp(),r=X7();function i(){return new o}Xd.beginCell=i;class o{constructor(){this._bits=new e.BitBuilder,this._refs=[]}get bits(){return this._bits.length}get refs(){return this._refs.length}get availableBits(){return 1023-this.bits}get availableRefs(){return 4-this.refs}storeBit(s){return this._bits.writeBit(s),this}storeBits(s){return this._bits.writeBits(s),this}storeBuffer(s,l){if(l!=null&&s.length!==l)throw Error(`Buffer length ${s.length} is not equal to ${l}`);return this._bits.writeBuffer(s),this}storeMaybeBuffer(s,l){return s!==null?(this.storeBit(1),this.storeBuffer(s,l)):this.storeBit(0),this}storeUint(s,l){return this._bits.writeUint(s,l),this}storeMaybeUint(s,l){return s!=null?(this.storeBit(1),this.storeUint(s,l)):this.storeBit(0),this}storeInt(s,l){return this._bits.writeInt(s,l),this}storeMaybeInt(s,l){return s!=null?(this.storeBit(1),this.storeInt(s,l)):this.storeBit(0),this}storeVarUint(s,l){return this._bits.writeVarUint(s,l),this}storeMaybeVarUint(s,l){return s!=null?(this.storeBit(1),this.storeVarUint(s,l)):this.storeBit(0),this}storeVarInt(s,l){return this._bits.writeVarInt(s,l),this}storeMaybeVarInt(s,l){return s!=null?(this.storeBit(1),this.storeVarInt(s,l)):this.storeBit(0),this}storeCoins(s){return this._bits.writeCoins(s),this}storeMaybeCoins(s){return s!=null?(this.storeBit(1),this.storeCoins(s)):this.storeBit(0),this}storeAddress(s){return this._bits.writeAddress(s),this}storeRef(s){if(this._refs.length>=4)throw new Error("Too many references");if(s instanceof t.Cell)this._refs.push(s);else if(s instanceof o)this._refs.push(s.endCell());else throw new Error("Invalid argument");return this}storeMaybeRef(s){return s?(this.storeBit(1),this.storeRef(s)):this.storeBit(0),this}storeSlice(s){let l=s.clone();for(l.remainingBits>0&&this.storeBits(l.loadBits(l.remainingBits));l.remainingRefs>0;)this.storeRef(l.loadRef());return this}storeMaybeSlice(s){return s?(this.storeBit(1),this.storeSlice(s)):this.storeBit(0),this}storeBuilder(s){return this.storeSlice(s.endCell().beginParse())}storeMaybeBuilder(s){return s?(this.storeBit(1),this.storeBuilder(s)):this.storeBit(0),this}storeWritable(s){return typeof s=="object"?s.writeTo(this):s(this),this}storeMaybeWritable(s){return s?(this.storeBit(1),this.storeWritable(s)):this.storeBit(0),this}store(s){return this.storeWritable(s),this}storeStringTail(s){return(0,r.writeString)(s,this),this}storeMaybeStringTail(s){return s!=null?(this.storeBit(1),(0,r.writeString)(s,this)):this.storeBit(0),this}storeStringRefTail(s){return this.storeRef(i().storeStringTail(s)),this}storeMaybeStringRefTail(s){return s!=null?(this.storeBit(1),this.storeStringRefTail(s)):this.storeBit(0),this}storeDict(s,l,u){return s?s.store(this,l,u):this.storeBit(0),this}storeDictDirect(s,l,u){return s.storeDirect(this,l,u),this}endCell(){return new t.Cell({bits:this._bits.build(),refs:this._refs})}asCell(){return this.endCell()}asSlice(){return this.endCell().beginParse()}}return Xd.Builder=o,Xd}var Bu={},dc={};Object.defineProperty(dc,"__esModule",{value:!0});dc.SimpleLibraryValue=dc.storeSimpleLibrary=dc.loadSimpleLibrary=void 0;function xD(e){return{public:e.loadBit(),root:e.loadRef()}}dc.loadSimpleLibrary=xD;function _D(e){return t=>{t.storeBit(e.public),t.storeRef(e.root)}}dc.storeSimpleLibrary=_D;dc.SimpleLibraryValue={serialize(e,t){_D(e)(t)},parse(e){return xD(e)}};var jf={};Object.defineProperty(jf,"__esModule",{value:!0});jf.storeTickTock=jf.loadTickTock=void 0;function Xle(e){return{tick:e.loadBit(),tock:e.loadBit()}}jf.loadTickTock=Xle;function Jle(e){return t=>{t.storeBit(e.tick),t.storeBit(e.tock)}}jf.storeTickTock=Jle;Object.defineProperty(Bu,"__esModule",{value:!0});Bu.storeStateInit=Bu.loadStateInit=void 0;const eue=gp(),tue=dc,SD=jf;function rue(e){let t;e.loadBit()&&(t=e.loadUint(5));let r;e.loadBit()&&(r=(0,SD.loadTickTock)(e));let i=e.loadMaybeRef(),o=e.loadMaybeRef(),a=e.loadDict(eue.Dictionary.Keys.BigUint(256),tue.SimpleLibraryValue);return a.size===0&&(a=void 0),{splitDepth:t,special:r,code:i,data:o,libraries:a}}Bu.loadStateInit=rue;function nue(e){return t=>{e.splitDepth!==null&&e.splitDepth!==void 0?(t.storeBit(!0),t.storeUint(e.splitDepth,5)):t.storeBit(!1),e.special!==null&&e.special!==void 0?(t.storeBit(!0),t.store((0,SD.storeTickTock)(e.special))):t.storeBit(!1),t.storeMaybeRef(e.code),t.storeMaybeRef(e.data),t.storeDict(e.libraries)}}Bu.storeStateInit=nue;Object.defineProperty(g2,"__esModule",{value:!0});g2.contractAddress=void 0;const iue=as(),oue=Bu,aue=Xs;function sue(e,t){let r=(0,iue.beginCell)().store((0,oue.storeStateInit)(t)).endCell().hash();return new aue.Address(e,r)}g2.contractAddress=sue;var Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});Hh.parseTuple=Hh.serializeTuple=void 0;const j0=as(),lue=BigInt("-9223372036854775808"),uue=BigInt("9223372036854775807");function CD(e,t){if(e.type==="null")t.storeUint(0,8);else if(e.type==="int")e.value<=uue&&e.value>=lue?(t.storeUint(1,8),t.storeInt(e.value,64)):(t.storeUint(256,15),t.storeInt(e.value,257));else if(e.type==="nan")t.storeInt(767,16);else if(e.type==="cell")t.storeUint(3,8),t.storeRef(e.cell);else if(e.type==="slice")t.storeUint(4,8),t.storeUint(0,10),t.storeUint(e.cell.bits.length,10),t.storeUint(0,3),t.storeUint(e.cell.refs.length,3),t.storeRef(e.cell);else if(e.type==="builder")t.storeUint(5,8),t.storeRef(e.cell);else if(e.type==="tuple"){let r=null,i=null;for(let o=0;o1&&(r=(0,j0.beginCell)().storeRef(i).storeRef(r).endCell());let s=(0,j0.beginCell)();CD(e.items[o],s),i=s.endCell()}t.storeUint(7,8),t.storeUint(e.items.length,16),r&&t.storeRef(r),i&&t.storeRef(i)}else throw Error("Invalid value")}function jm(e){let t=e.loadUint(8);if(t===0)return{type:"null"};if(t===1)return{type:"int",value:e.loadIntBig(64)};if(t===2)return e.loadUint(7)===0?{type:"int",value:e.loadIntBig(257)}:(e.loadBit(),{type:"nan"});if(t===3)return{type:"cell",cell:e.loadRef()};if(t===4){let r=e.loadUint(10),i=e.loadUint(10),o=e.loadUint(3),a=e.loadUint(3),s=e.loadRef().beginParse();s.skip(r);let l=s.loadBits(i-r),u=(0,j0.beginCell)().storeBits(l);if(o1){let o=e.loadRef().beginParse(),a=e.loadRef().beginParse();i.unshift(jm(a));for(let s=0;s0){let r=(0,j0.beginCell)();kD(e.slice(0,e.length-1),r),t.storeRef(r.endCell()),CD(e[e.length-1],t)}}function cue(e){let t=(0,j0.beginCell)();t.storeUint(e.length,24);let r=[...e];return kD(r,t),t.endCell()}Hh.serializeTuple=cue;function due(e){let t=[],r=e.beginParse(),i=r.loadUint(24);for(let o=0;o2)throw Error("Invalid number");let i=r[0],o=r[1];if(i||(i="0"),o||(o="0"),o.length>9)throw Error("Invalid number");for(;o.length<9;)o+="0";let a=BigInt(i)*1000000000n+BigInt(o);return t&&(a=-a),a}}$f.toNano=pue;function hue(e){let t=BigInt(e),r=!1;t<0&&(r=!0,t=-t);let o=(t%1000000000n).toString();for(;o.length<9;)o="0"+o;o=o.match(/^([0-9]*[1-9]|0)(0*)/)[1];let l=`${(t/1000000000n).toString()}${o==="0"?"":`.${o}`}`;return r&&(l="-"+l),l}$f.fromNano=hue;Object.defineProperty(wd,"__esModule",{value:!0});wd.comment=wd.external=wd.internal=void 0;const ab=Xs,AD=mp(),TD=as(),gue=$f;function mue(e){let t=!0;e.bounce!==null&&e.bounce!==void 0&&(t=e.bounce);let r;if(typeof e.to=="string")r=ab.Address.parse(e.to);else if(ab.Address.isAddress(e.to))r=e.to;else throw new Error(`Invalid address ${e.to}`);let i;typeof e.value=="string"?i=(0,gue.toNano)(e.value):i=e.value;let o=AD.Cell.EMPTY;return typeof e.body=="string"?o=(0,TD.beginCell)().storeUint(0,32).storeStringTail(e.body).endCell():e.body&&(o=e.body),{info:{type:"internal",dest:r,value:{coins:i},bounce:t,ihrDisabled:!0,bounced:!1,ihrFee:0n,forwardFee:0n,createdAt:0,createdLt:0n},init:e.init?{code:e.init.code,data:e.init.data}:void 0,body:o}}wd.internal=mue;function yue(e){let t;if(typeof e.to=="string")t=ab.Address.parse(e.to);else if(ab.Address.isAddress(e.to))t=e.to;else throw new Error(`Invalid address ${e.to}`);return{info:{type:"external-in",dest:t,importFee:0n},init:e.init?{code:e.init.code,data:e.init.data}:void 0,body:e.body||AD.Cell.EMPTY}}wd.external=yue;function vue(e){return(0,TD.beginCell)().storeUint(0,32).storeStringTail(e).endCell()}wd.comment=vue;var Ff={},zf={},Hf={};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.storeAccountState=Hf.loadAccountState=void 0;const ID=Bu;function bue(e){return e.loadBit()?{type:"active",state:(0,ID.loadStateInit)(e)}:e.loadBit()?{type:"frozen",stateHash:e.loadUintBig(256)}:{type:"uninit"}}Hf.loadAccountState=bue;function wue(e){return t=>{e.type==="active"?(t.storeBit(!0),t.store((0,ID.storeStateInit)(e.state))):e.type==="frozen"?(t.storeBit(!1),t.storeBit(!0),t.storeUint(e.stateHash,256)):e.type==="uninit"&&(t.storeBit(!1),t.storeBit(!1))}}Hf.storeAccountState=wue;var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.storeCurrencyCollection=Js.loadCurrencyCollection=void 0;const sR=gp();function xue(e){const t=e.loadCoins(),r=e.loadDict(sR.Dictionary.Keys.Uint(32),sR.Dictionary.Values.BigVarUint(5));return r.size===0?{coins:t}:{other:r,coins:t}}Js.loadCurrencyCollection=xue;function _ue(e){return t=>{t.storeCoins(e.coins),e.other?t.storeDict(e.other):t.storeBit(0)}}Js.storeCurrencyCollection=_ue;Object.defineProperty(zf,"__esModule",{value:!0});zf.storeAccountStorage=zf.loadAccountStorage=void 0;const RD=Hf,PD=Js;function Sue(e){return{lastTransLt:e.loadUintBig(64),balance:(0,PD.loadCurrencyCollection)(e),state:(0,RD.loadAccountState)(e)}}zf.loadAccountStorage=Sue;function Cue(e){return t=>{t.storeUint(e.lastTransLt,64),t.store((0,PD.storeCurrencyCollection)(e.balance)),t.store((0,RD.storeAccountState)(e.state))}}zf.storeAccountStorage=Cue;var Wf={},Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});Vf.storeStorageUsed=Vf.loadStorageUsed=void 0;function kue(e){return{cells:e.loadVarUintBig(3),bits:e.loadVarUintBig(3),publicCells:e.loadVarUintBig(3)}}Vf.loadStorageUsed=kue;function Eue(e){return t=>{t.storeVarUint(e.cells,3),t.storeVarUint(e.bits,3),t.storeVarUint(e.publicCells,3)}}Vf.storeStorageUsed=Eue;Object.defineProperty(Wf,"__esModule",{value:!0});Wf.storeStorageInfo=Wf.loadStorageInfo=void 0;const MD=Vf;function Aue(e){return{used:(0,MD.loadStorageUsed)(e),lastPaid:e.loadUint(32),duePayment:e.loadMaybeCoins()}}Wf.loadStorageInfo=Aue;function Tue(e){return t=>{t.store((0,MD.storeStorageUsed)(e.used)),t.storeUint(e.lastPaid,32),t.storeMaybeCoins(e.duePayment)}}Wf.storeStorageInfo=Tue;Object.defineProperty(Ff,"__esModule",{value:!0});Ff.storeAccount=Ff.loadAccount=void 0;const OD=zf,BD=Wf;function Iue(e){return{addr:e.loadAddress(),storageStats:(0,BD.loadStorageInfo)(e),storage:(0,OD.loadAccountStorage)(e)}}Ff.loadAccount=Iue;function Rue(e){return t=>{t.storeAddress(e.addr),t.store((0,BD.storeStorageInfo)(e.storageStats)),t.store((0,OD.storeAccountStorage)(e.storage))}}Ff.storeAccount=Rue;var qf={};Object.defineProperty(qf,"__esModule",{value:!0});qf.storeAccountStatus=qf.loadAccountStatus=void 0;function Pue(e){const t=e.loadUint(2);if(t===0)return"uninitialized";if(t===1)return"frozen";if(t===2)return"active";if(t===3)return"non-existing";throw Error("Invalid data")}qf.loadAccountStatus=Pue;function Mue(e){return t=>{if(e==="uninitialized")t.storeUint(0,2);else if(e==="frozen")t.storeUint(1,2);else if(e==="active")t.storeUint(2,2);else if(e==="non-existing")t.storeUint(3,2);else throw Error("Invalid data");return t}}qf.storeAccountStatus=Mue;var Td={};Object.defineProperty(Td,"__esModule",{value:!0});Td.storeAccountStatusChange=Td.loadAccountStatusChange=void 0;function Oue(e){return e.loadBit()?e.loadBit()?"frozen":"deleted":"unchanged"}Td.loadAccountStatusChange=Oue;function Bue(e){return t=>{if(e=="unchanged")t.storeBit(0);else if(e==="frozen")t.storeBit(1),t.storeBit(0);else if(e==="deleted")t.storeBit(1),t.storeBit(1);else throw Error("Invalid account status change")}}Td.storeAccountStatusChange=Bue;var Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});Kf.storeCommonMessageInfo=Kf.loadCommonMessageInfo=void 0;const UD=Js;function Uue(e){if(!e.loadBit()){const a=e.loadBit(),s=e.loadBit(),l=e.loadBit(),u=e.loadAddress(),c=e.loadAddress(),d=(0,UD.loadCurrencyCollection)(e),p=e.loadCoins(),v=e.loadCoins(),x=e.loadUintBig(64),b=e.loadUint(32);return{type:"internal",ihrDisabled:a,bounce:s,bounced:l,src:u,dest:c,value:d,ihrFee:p,forwardFee:v,createdLt:x,createdAt:b}}if(!e.loadBit()){const a=e.loadMaybeExternalAddress(),s=e.loadAddress(),l=e.loadCoins();return{type:"external-in",src:a,dest:s,importFee:l}}const t=e.loadAddress(),r=e.loadMaybeExternalAddress(),i=e.loadUintBig(64),o=e.loadUint(32);return{type:"external-out",src:t,dest:r,createdLt:i,createdAt:o}}Kf.loadCommonMessageInfo=Uue;function Due(e){return t=>{if(e.type==="internal")t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,UD.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if(e.type==="external-in")t.storeBit(1),t.storeBit(0),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeCoins(e.importFee);else if(e.type==="external-out")t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw new Error("Unknown CommonMessageInfo type")}}Kf.storeCommonMessageInfo=Due;var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.storeCommonMessageInfoRelaxed=Gf.loadCommonMessageInfoRelaxed=void 0;const DD=Js;function Lue(e){if(!e.loadBit()){const a=e.loadBit(),s=e.loadBit(),l=e.loadBit(),u=e.loadMaybeAddress(),c=e.loadAddress(),d=(0,DD.loadCurrencyCollection)(e),p=e.loadCoins(),v=e.loadCoins(),x=e.loadUintBig(64),b=e.loadUint(32);return{type:"internal",ihrDisabled:a,bounce:s,bounced:l,src:u,dest:c,value:d,ihrFee:p,forwardFee:v,createdLt:x,createdAt:b}}if(!e.loadBit())throw Error("External In message is not possible for CommonMessageInfoRelaxed");const t=e.loadMaybeAddress(),r=e.loadMaybeExternalAddress(),i=e.loadUintBig(64),o=e.loadUint(32);return{type:"external-out",src:t,dest:r,createdLt:i,createdAt:o}}Gf.loadCommonMessageInfoRelaxed=Lue;function Nue(e){return t=>{if(e.type==="internal")t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,DD.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if(e.type==="external-out")t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw new Error("Unknown CommonMessageInfo type")}}Gf.storeCommonMessageInfoRelaxed=Nue;var Yf={};Object.defineProperty(Yf,"__esModule",{value:!0});Yf.storeComputeSkipReason=Yf.loadComputeSkipReason=void 0;function jue(e){let t=e.loadUint(2);if(t===0)return"no-state";if(t===1)return"bad-state";if(t===2)return"no-gas";throw new Error(`Unknown ComputeSkipReason: ${t}`)}Yf.loadComputeSkipReason=jue;function $ue(e){return t=>{if(e==="no-state")t.storeUint(0,2);else if(e==="bad-state")t.storeUint(1,2);else if(e==="no-gas")t.storeUint(2,2);else throw new Error(`Unknown ComputeSkipReason: ${e}`)}}Yf.storeComputeSkipReason=$ue;var Zf={};Object.defineProperty(Zf,"__esModule",{value:!0});Zf.storeDepthBalanceInfo=Zf.loadDepthBalanceInfo=void 0;const LD=Js;function Fue(e){return{splitDepth:e.loadUint(5),balance:(0,LD.loadCurrencyCollection)(e)}}Zf.loadDepthBalanceInfo=Fue;function zue(e){return t=>{t.storeUint(e.splitDepth,5),t.store((0,LD.storeCurrencyCollection)(e.balance))}}Zf.storeDepthBalanceInfo=zue;var Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.storeHashUpdate=Qf.loadHashUpdate=void 0;function Hue(e){if(e.loadUint(8)!==114)throw Error("Invalid data");const t=e.loadBuffer(32),r=e.loadBuffer(32);return{oldHash:t,newHash:r}}Qf.loadHashUpdate=Hue;function Wue(e){return t=>{t.storeUint(114,8),t.storeBuffer(e.oldHash),t.storeBuffer(e.newHash)}}Qf.storeHashUpdate=Wue;var ky={};Object.defineProperty(ky,"__esModule",{value:!0});ky.loadMasterchainStateExtra=void 0;const n5=gp(),Vue=Js;function que(e){if(e.loadUint(16)!==52262)throw Error("Invalid data");e.loadBit()&&e.loadRef();let t=e.loadUintBig(256),r=n5.Dictionary.load(n5.Dictionary.Keys.Int(32),n5.Dictionary.Values.Cell(),e);const i=(0,Vue.loadCurrencyCollection)(e);return{config:r,configAddress:t,globalBalance:i}}ky.loadMasterchainStateExtra=que;var fc={};Object.defineProperty(fc,"__esModule",{value:!0});fc.MessageValue=fc.storeMessage=fc.loadMessage=void 0;const ND=as(),jD=Kf,VS=Bu;function $D(e){const t=(0,jD.loadCommonMessageInfo)(e);let r=null;e.loadBit()&&(e.loadBit()?r=(0,VS.loadStateInit)(e.loadRef().beginParse()):r=(0,VS.loadStateInit)(e));const i=e.loadBit()?e.loadRef():e.asCell();return{info:t,init:r,body:i}}fc.loadMessage=$D;function FD(e,t){return r=>{if(r.store((0,jD.storeCommonMessageInfo)(e.info)),e.init){r.storeBit(!0);let o=(0,ND.beginCell)().store((0,VS.storeStateInit)(e.init)),a=!1;t&&t.forceRef?a=!0:r.availableBits-2>=o.bits?a=!1:a=!0,a?(r.storeBit(!0),r.storeRef(o)):(r.storeBit(!1),r.storeBuilder(o))}else r.storeBit(!1);let i=!1;t&&t.forceRef?i=!0:r.availableBits-1>=e.body.bits.length&&r.refs+e.body.refs.length<=4?i=!1:i=!0,i?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}fc.storeMessage=FD;fc.MessageValue={serialize(e,t){t.storeRef((0,ND.beginCell)().store(FD(e)))},parse(e){return $D(e.loadRef().beginParse())}};var Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});Wh.storeMessageRelaxed=Wh.loadMessageRelaxed=void 0;const Kue=as(),zD=Gf,qS=Bu;function Gue(e){const t=(0,zD.loadCommonMessageInfoRelaxed)(e);let r=null;e.loadBit()&&(e.loadBit()?r=(0,qS.loadStateInit)(e.loadRef().beginParse()):r=(0,qS.loadStateInit)(e));const i=e.loadBit()?e.loadRef():e.asCell();return{info:t,init:r,body:i}}Wh.loadMessageRelaxed=Gue;function Yue(e,t){return r=>{if(r.store((0,zD.storeCommonMessageInfoRelaxed)(e.info)),e.init){r.storeBit(!0);let o=(0,Kue.beginCell)().store((0,qS.storeStateInit)(e.init)),a=!1;t&&t.forceRef?a=!0:r.availableBits-2>=o.bits?a=!1:a=!0,a?(r.storeBit(!0),r.storeRef(o)):(r.storeBit(!1),r.storeBuilder(o))}else r.storeBit(!1);let i=!1;t&&t.forceRef?i=!0:r.availableBits-1>=e.body.bits.length&&r.refs+e.body.refs.length<=4?i=!1:i=!0,i?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}Wh.storeMessageRelaxed=Yue;var HD={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SendMode=void 0,function(t){t[t.CARRY_ALL_REMAINING_BALANCE=128]="CARRY_ALL_REMAINING_BALANCE",t[t.CARRY_ALL_REMAINING_INCOMING_VALUE=64]="CARRY_ALL_REMAINING_INCOMING_VALUE",t[t.DESTROY_ACCOUNT_IF_ZERO=32]="DESTROY_ACCOUNT_IF_ZERO",t[t.PAY_GAS_SEPARATELY=1]="PAY_GAS_SEPARATELY",t[t.IGNORE_ERRORS=2]="IGNORE_ERRORS",t[t.NONE=0]="NONE"}(e.SendMode||(e.SendMode={}))})(HD);var Xf={};Object.defineProperty(Xf,"__esModule",{value:!0});Xf.storeShardAccount=Xf.loadShardAccount=void 0;const lR=as(),WD=Ff;function Zue(e){let t=e.loadRef(),r;if(!t.isExotic){let i=t.beginParse();i.loadBit()&&(r=(0,WD.loadAccount)(i))}return{account:r,lastTransactionHash:e.loadUintBig(256),lastTransactionLt:e.loadUintBig(64)}}Xf.loadShardAccount=Zue;function Que(e){return t=>{e.account?t.storeRef((0,lR.beginCell)().storeBit(!0).store((0,WD.storeAccount)(e.account))):t.storeRef((0,lR.beginCell)().storeBit(!1)),t.storeUint(e.lastTransactionHash,256),t.storeUint(e.lastTransactionLt,64)}}Xf.storeShardAccount=Que;var Z6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.storeShardAccounts=e.loadShardAccounts=e.ShardAccountRefValue=void 0;const t=gp(),r=Zf,i=Xf;e.ShardAccountRefValue={parse:s=>{let l=(0,r.loadDepthBalanceInfo)(s),u=(0,i.loadShardAccount)(s);return{depthBalanceInfo:l,shardAccount:u}},serialize(s,l){l.store((0,r.storeDepthBalanceInfo)(s.depthBalanceInfo)),l.store((0,i.storeShardAccount)(s.shardAccount))}};function o(s){return t.Dictionary.load(t.Dictionary.Keys.BigUint(256),e.ShardAccountRefValue,s)}e.loadShardAccounts=o;function a(s){return l=>{l.storeDict(s)}}e.storeShardAccounts=a})(Z6);var Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.storeShardIdent=Jf.loadShardIdent=void 0;function Xue(e){if(e.loadUint(2)!==0)throw Error("Invalid data");return{shardPrefixBits:e.loadUint(6),workchainId:e.loadInt(32),shardPrefix:e.loadUintBig(64)}}Jf.loadShardIdent=Xue;function Jue(e){return t=>{t.storeUint(0,2),t.storeUint(e.shardPrefixBits,6),t.storeInt(e.workchainId,32),t.storeUint(e.shardPrefix,64)}}Jf.storeShardIdent=Jue;var D2={};Object.defineProperty(D2,"__esModule",{value:!0});D2.loadShardStateUnsplit=void 0;const ece=ky,tce=Z6,rce=Jf;function nce(e){if(e.loadUint(32)!==2418257890)throw Error("Invalid data");let t=e.loadInt(32),r=(0,rce.loadShardIdent)(e),i=e.loadUint(32),o=e.loadUint(32),a=e.loadUint(32),s=e.loadUintBig(64),l=e.loadUint(32);e.loadRef();let u=e.loadBit(),c=e.loadRef(),d;c.isExotic||(d=(0,tce.loadShardAccounts)(c.beginParse())),e.loadRef();let p=e.loadBit(),v=null;if(p){let x=e.loadRef();x.isExotic||(v=(0,ece.loadMasterchainStateExtra)(x.beginParse()))}return{globalId:t,shardId:r,seqno:i,vertSeqNo:o,genUtime:a,genLt:s,minRefMcSeqno:l,beforeSplit:u,accounts:d,extras:v}}D2.loadShardStateUnsplit=nce;var ep={};Object.defineProperty(ep,"__esModule",{value:!0});ep.storeSplitMergeInfo=ep.loadSplitMergeInfo=void 0;function ice(e){let t=e.loadUint(6),r=e.loadUint(6),i=e.loadUintBig(256),o=e.loadUintBig(256);return{currentShardPrefixLength:t,accountSplitDepth:r,thisAddress:i,siblingAddress:o}}ep.loadSplitMergeInfo=ice;function oce(e){return t=>{t.storeUint(e.currentShardPrefixLength,6),t.storeUint(e.accountSplitDepth,6),t.storeUint(e.thisAddress,256),t.storeUint(e.siblingAddress,256)}}ep.storeSplitMergeInfo=oce;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});Id.storeStorageUsedShort=Id.loadStorageUsedShort=void 0;function ace(e){let t=e.loadVarUintBig(3),r=e.loadVarUintBig(3);return{cells:t,bits:r}}Id.loadStorageUsedShort=ace;function sce(e){return t=>{t.storeVarUint(e.cells,3),t.storeVarUint(e.bits,3)}}Id.storeStorageUsedShort=sce;var Jd={},ef={},tp={};Object.defineProperty(tp,"__esModule",{value:!0});tp.storeTransactionActionPhase=tp.loadTransactionActionPhase=void 0;const VD=Td,qD=Id;function lce(e){let t=e.loadBit(),r=e.loadBit(),i=e.loadBit(),o=(0,VD.loadAccountStatusChange)(e),a=e.loadBit()?e.loadCoins():void 0,s=e.loadBit()?e.loadCoins():void 0,l=e.loadInt(32),u=e.loadBit()?e.loadInt(32):void 0,c=e.loadUint(16),d=e.loadUint(16),p=e.loadUint(16),v=e.loadUint(16),x=e.loadUintBig(256),b=(0,qD.loadStorageUsedShort)(e);return{success:t,valid:r,noFunds:i,statusChange:o,totalFwdFees:a,totalActionFees:s,resultCode:l,resultArg:u,totalActions:c,specActions:d,skippedActions:p,messagesCreated:v,actionListHash:x,totalMessageSize:b}}tp.loadTransactionActionPhase=lce;function uce(e){return t=>{t.storeBit(e.success),t.storeBit(e.valid),t.storeBit(e.noFunds),t.store((0,VD.storeAccountStatusChange)(e.statusChange)),t.storeMaybeCoins(e.totalFwdFees),t.storeMaybeCoins(e.totalActionFees),t.storeInt(e.resultCode,32),t.storeMaybeInt(e.resultArg,32),t.storeUint(e.totalActions,16),t.storeUint(e.specActions,16),t.storeUint(e.skippedActions,16),t.storeUint(e.messagesCreated,16),t.storeUint(e.actionListHash,256),t.store((0,qD.storeStorageUsedShort)(e.totalMessageSize))}}tp.storeTransactionActionPhase=uce;var rp={};Object.defineProperty(rp,"__esModule",{value:!0});rp.storeTransactionBouncePhase=rp.loadTransactionBouncePhase=void 0;const sb=Id;function cce(e){if(e.loadBit()){let t=(0,sb.loadStorageUsedShort)(e),r=e.loadCoins(),i=e.loadCoins();return{type:"ok",messageSize:t,messageFees:r,forwardFees:i}}if(e.loadBit()){let t=(0,sb.loadStorageUsedShort)(e),r=e.loadCoins();return{type:"no-funds",messageSize:t,requiredForwardFees:r}}return{type:"negative-funds"}}rp.loadTransactionBouncePhase=cce;function dce(e){return t=>{if(e.type==="ok")t.storeBit(!0),t.store((0,sb.storeStorageUsedShort)(e.messageSize)),t.storeCoins(e.messageFees),t.storeCoins(e.forwardFees);else if(e.type==="negative-funds")t.storeBit(!1),t.storeBit(!1);else if(e.type==="no-funds")t.storeBit(!1),t.storeBit(!0),t.store((0,sb.storeStorageUsedShort)(e.messageSize)),t.storeCoins(e.requiredForwardFees);else throw new Error("Invalid TransactionBouncePhase type")}}rp.storeTransactionBouncePhase=dce;var np={};Object.defineProperty(np,"__esModule",{value:!0});np.storeTransactionComputePhase=np.loadTransactionComputePhase=void 0;const fce=as(),KD=Yf;function pce(e){if(!e.loadBit())return{type:"skipped",reason:(0,KD.loadComputeSkipReason)(e)};let t=e.loadBit(),r=e.loadBit(),i=e.loadBit(),o=e.loadCoins();const a=e.loadRef().beginParse();let s=a.loadVarUintBig(3),l=a.loadVarUintBig(3),u=a.loadBit()?a.loadVarUintBig(2):void 0,c=a.loadUint(8),d=a.loadUint(32),p=a.loadBit()?a.loadInt(32):void 0,v=a.loadUint(32),x=a.loadUintBig(256),b=a.loadUintBig(256);return{type:"vm",success:t,messageStateUsed:r,accountActivated:i,gasFees:o,gasUsed:s,gasLimit:l,gasCredit:u,mode:c,exitCode:d,exitArg:p,vmSteps:v,vmInitStateHash:x,vmFinalStateHash:b}}np.loadTransactionComputePhase=pce;function hce(e){return t=>{if(e.type==="skipped"){t.storeBit(0),t.store((0,KD.storeComputeSkipReason)(e.reason));return}t.storeBit(1),t.storeBit(e.success),t.storeBit(e.messageStateUsed),t.storeBit(e.accountActivated),t.storeCoins(e.gasFees),t.storeRef((0,fce.beginCell)().storeVarUint(e.gasUsed,3).storeVarUint(e.gasLimit,3).store(r=>e.gasCredit!==void 0&&e.gasCredit!==null?r.storeBit(1).storeVarUint(e.gasCredit,2):r.storeBit(0)).storeUint(e.mode,8).storeUint(e.exitCode,32).store(r=>e.exitArg!==void 0&&e.exitArg!==null?r.storeBit(1).storeInt(e.exitArg,32):r.storeBit(0)).storeUint(e.vmSteps,32).storeUint(e.vmInitStateHash,256).storeUint(e.vmFinalStateHash,256).endCell())}}np.storeTransactionComputePhase=hce;var ip={};Object.defineProperty(ip,"__esModule",{value:!0});ip.storeTransactionCreditPhase=ip.loadTransactionCreditPhase=void 0;const GD=Js;function gce(e){const t=e.loadBit()?e.loadCoins():void 0,r=(0,GD.loadCurrencyCollection)(e);return{dueFeesColelcted:t,credit:r}}ip.loadTransactionCreditPhase=gce;function mce(e){return t=>{e.dueFeesColelcted===null||e.dueFeesColelcted===void 0?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.dueFeesColelcted)),t.store((0,GD.storeCurrencyCollection)(e.credit))}}ip.storeTransactionCreditPhase=mce;var op={};Object.defineProperty(op,"__esModule",{value:!0});op.storeTransactionsStoragePhase=op.loadTransactionStoragePhase=void 0;const YD=Td;function yce(e){const t=e.loadCoins();let r;e.loadBit()&&(r=e.loadCoins());const i=(0,YD.loadAccountStatusChange)(e);return{storageFeesCollected:t,storageFeesDue:r,statusChange:i}}op.loadTransactionStoragePhase=yce;function vce(e){return t=>{t.storeCoins(e.storageFeesCollected),e.storageFeesDue===null||e.storageFeesDue===void 0?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.storageFeesDue)),t.store((0,YD.storeAccountStatusChange)(e.statusChange))}}op.storeTransactionsStoragePhase=vce;var uR;function ZD(){if(uR)return ef;uR=1,Object.defineProperty(ef,"__esModule",{value:!0}),ef.storeTransactionDescription=ef.loadTransactionDescription=void 0;const e=as(),t=ep,r=QD(),i=tp,o=rp,a=np,s=ip,l=op;function u(d){let p=d.loadUint(4);if(p===0){const v=d.loadBit();let x;d.loadBit()&&(x=(0,l.loadTransactionStoragePhase)(d));let b;d.loadBit()&&(b=(0,s.loadTransactionCreditPhase)(d));let y=(0,a.loadTransactionComputePhase)(d),_;d.loadBit()&&(_=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));let k=d.loadBit(),E;d.loadBit()&&(E=(0,o.loadTransactionBouncePhase)(d));const O=d.loadBit();return{type:"generic",creditFirst:v,storagePhase:x,creditPhase:b,computePhase:y,actionPhase:_,bouncePhase:E,aborted:k,destroyed:O}}if(p===1)return{type:"storage",storagePhase:(0,l.loadTransactionStoragePhase)(d)};if(p===2||p===3){const v=p===3;let x=(0,l.loadTransactionStoragePhase)(d),b=(0,a.loadTransactionComputePhase)(d),y;d.loadBit()&&(y=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));const _=d.loadBit(),k=d.loadBit();return{type:"tick-tock",isTock:v,storagePhase:x,computePhase:b,actionPhase:y,aborted:_,destroyed:k}}if(p===4){let v=(0,t.loadSplitMergeInfo)(d),x;d.loadBit()&&(x=(0,l.loadTransactionStoragePhase)(d));let b=(0,a.loadTransactionComputePhase)(d),y;d.loadBit()&&(y=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));const _=d.loadBit(),k=d.loadBit();return{type:"split-prepare",splitInfo:v,storagePhase:x,computePhase:b,actionPhase:y,aborted:_,destroyed:k}}if(p===5){let v=(0,t.loadSplitMergeInfo)(d),x=(0,r.loadTransaction)(d.loadRef().beginParse());const b=d.loadBit();return{type:"split-install",splitInfo:v,prepareTransaction:x,installed:b}}throw Error(`Unsupported transaction description type ${p}`)}ef.loadTransactionDescription=u;function c(d){return p=>{if(d.type==="generic")p.storeUint(0,4),p.storeBit(d.creditFirst),d.storagePhase?(p.storeBit(!0),p.store((0,l.storeTransactionsStoragePhase)(d.storagePhase))):p.storeBit(!1),d.creditPhase?(p.storeBit(!0),p.store((0,s.storeTransactionCreditPhase)(d.creditPhase))):p.storeBit(!1),p.store((0,a.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(p.storeBit(!0),p.storeRef((0,e.beginCell)().store((0,i.storeTransactionActionPhase)(d.actionPhase)))):p.storeBit(!1),p.storeBit(d.aborted),d.bouncePhase?(p.storeBit(!0),p.store((0,o.storeTransactionBouncePhase)(d.bouncePhase))):p.storeBit(!1),p.storeBit(d.destroyed);else if(d.type==="storage")p.storeUint(1,4),p.store((0,l.storeTransactionsStoragePhase)(d.storagePhase));else if(d.type==="tick-tock")p.storeUint(d.isTock?3:2,4),p.store((0,l.storeTransactionsStoragePhase)(d.storagePhase)),p.store((0,a.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(p.storeBit(!0),p.storeRef((0,e.beginCell)().store((0,i.storeTransactionActionPhase)(d.actionPhase)))):p.storeBit(!1),p.storeBit(d.aborted),p.storeBit(d.destroyed);else if(d.type==="split-prepare")p.storeUint(4,4),p.store((0,t.storeSplitMergeInfo)(d.splitInfo)),d.storagePhase?(p.storeBit(!0),p.store((0,l.storeTransactionsStoragePhase)(d.storagePhase))):p.storeBit(!1),p.store((0,a.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(p.storeBit(!0),p.store((0,i.storeTransactionActionPhase)(d.actionPhase))):p.storeBit(!1),p.storeBit(d.aborted),p.storeBit(d.destroyed);else if(d.type==="split-install")p.storeUint(5,4),p.store((0,t.storeSplitMergeInfo)(d.splitInfo)),p.storeRef((0,e.beginCell)().store((0,r.storeTransaction)(d.prepareTransaction))),p.storeBit(d.installed);else throw Error(`Unsupported transaction description type ${d.type}`)}}return ef.storeTransactionDescription=c,ef}var cR;function QD(){if(cR)return Jd;cR=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.storeTransaction=Jd.loadTransaction=void 0;const e=as(),t=gp(),r=qf,i=Js,o=Qf,a=fc,s=ZD();function l(c){if(c.loadUint(4)!==7)throw Error("Invalid data");let d=c.loadUintBig(256),p=c.loadUintBig(64),v=c.loadUintBig(256),x=c.loadUintBig(64),b=c.loadUint(32),y=c.loadUint(15),_=(0,r.loadAccountStatus)(c),k=(0,r.loadAccountStatus)(c),O=c.loadRef().beginParse(),U=O.loadBit()?(0,a.loadMessage)(O.loadRef().beginParse()):void 0,D=O.loadDict(t.Dictionary.Keys.Uint(15),a.MessageValue);O.endParse();let j=(0,i.loadCurrencyCollection)(c),F=(0,o.loadHashUpdate)(c.loadRef().beginParse()),H=(0,s.loadTransactionDescription)(c.loadRef().beginParse());return{address:d,lt:p,prevTransactionHash:v,prevTransactionLt:x,now:b,outMessagesCount:y,oldStatus:_,endStatus:k,inMessage:U,outMessages:D,totalFees:j,stateUpdate:F,description:H}}Jd.loadTransaction=l;function u(c){return d=>{d.storeUint(7,4),d.storeUint(c.address,256),d.storeUint(c.lt,64),d.storeUint(c.prevTransactionHash,256),d.storeUint(c.prevTransactionLt,64),d.storeUint(c.now,32),d.storeUint(c.outMessagesCount,15),d.store((0,r.storeAccountStatus)(c.oldStatus)),d.store((0,r.storeAccountStatus)(c.endStatus));let p=(0,e.beginCell)();c.inMessage?(p.storeBit(!0),p.storeRef((0,e.beginCell)().store((0,a.storeMessage)(c.inMessage)))):p.storeBit(!1),p.storeDict(c.outMessages),d.storeRef(p),d.store((0,i.storeCurrencyCollection)(c.totalFees)),d.storeRef((0,e.beginCell)().store((0,o.storeHashUpdate)(c.stateUpdate))),d.storeRef((0,e.beginCell)().store((0,s.storeTransactionDescription)(c.description)))}}return Jd.storeTransaction=u,Jd}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.loadStorageUsedShort=e.storeStorageUsed=e.loadStorageUsed=e.storeStorageInfo=e.loadStorageInfo=e.storeStateInit=e.loadStateInit=e.storeSplitMergeInfo=e.loadSplitMergeInfo=e.storeSimpleLibrary=e.loadSimpleLibrary=e.loadShardStateUnsplit=e.storeShardIdent=e.loadShardIdent=e.storeShardAccounts=e.loadShardAccounts=e.ShardAccountRefValue=e.storeShardAccount=e.loadShardAccount=e.SendMode=e.storeMessageRelaxed=e.loadMessageRelaxed=e.storeMessage=e.loadMessage=e.loadMasterchainStateExtra=e.storeHashUpdate=e.loadHashUpdate=e.storeDepthBalanceInfo=e.loadDepthBalanceInfo=e.storeCurrencyCollection=e.loadCurrencyCollection=e.storeComputeSkipReason=e.loadComputeSkipReason=e.storeCommonMessageInfoRelaxed=e.loadCommonMessageInfoRelaxed=e.storeCommonMessageInfo=e.loadCommonMessageInfo=e.storeAccountStorage=e.loadAccountStorage=e.storeAccountStatusChange=e.loadAccountStatusChange=e.storeAccountStatus=e.loadAccountStatus=e.storeAccountState=e.loadAccountState=e.storeAccount=e.loadAccount=e.comment=e.external=e.internal=void 0,e.storeTransactionsStoragePhase=e.loadTransactionStoragePhase=e.storeTransactionDescription=e.loadTransactionDescription=e.storeTransactionCreditPhase=e.loadTransactionCreditPhase=e.storeTransactionComputePhase=e.loadTransactionComputePhase=e.storeTransactionBouncePhase=e.loadTransactionBouncePhase=e.storeTransactionActionPhase=e.loadTransactionActionPhase=e.storeTransaction=e.loadTransaction=e.storeTickTock=e.loadTickTock=e.storeStorageUsedShort=void 0;var t=wd;Object.defineProperty(e,"internal",{enumerable:!0,get:function(){return t.internal}}),Object.defineProperty(e,"external",{enumerable:!0,get:function(){return t.external}}),Object.defineProperty(e,"comment",{enumerable:!0,get:function(){return t.comment}});var r=Ff;Object.defineProperty(e,"loadAccount",{enumerable:!0,get:function(){return r.loadAccount}}),Object.defineProperty(e,"storeAccount",{enumerable:!0,get:function(){return r.storeAccount}});var i=Hf;Object.defineProperty(e,"loadAccountState",{enumerable:!0,get:function(){return i.loadAccountState}}),Object.defineProperty(e,"storeAccountState",{enumerable:!0,get:function(){return i.storeAccountState}});var o=qf;Object.defineProperty(e,"loadAccountStatus",{enumerable:!0,get:function(){return o.loadAccountStatus}}),Object.defineProperty(e,"storeAccountStatus",{enumerable:!0,get:function(){return o.storeAccountStatus}});var a=Td;Object.defineProperty(e,"loadAccountStatusChange",{enumerable:!0,get:function(){return a.loadAccountStatusChange}}),Object.defineProperty(e,"storeAccountStatusChange",{enumerable:!0,get:function(){return a.storeAccountStatusChange}});var s=zf;Object.defineProperty(e,"loadAccountStorage",{enumerable:!0,get:function(){return s.loadAccountStorage}}),Object.defineProperty(e,"storeAccountStorage",{enumerable:!0,get:function(){return s.storeAccountStorage}});var l=Kf;Object.defineProperty(e,"loadCommonMessageInfo",{enumerable:!0,get:function(){return l.loadCommonMessageInfo}}),Object.defineProperty(e,"storeCommonMessageInfo",{enumerable:!0,get:function(){return l.storeCommonMessageInfo}});var u=Gf;Object.defineProperty(e,"loadCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return u.loadCommonMessageInfoRelaxed}}),Object.defineProperty(e,"storeCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return u.storeCommonMessageInfoRelaxed}});var c=Yf;Object.defineProperty(e,"loadComputeSkipReason",{enumerable:!0,get:function(){return c.loadComputeSkipReason}}),Object.defineProperty(e,"storeComputeSkipReason",{enumerable:!0,get:function(){return c.storeComputeSkipReason}});var d=Js;Object.defineProperty(e,"loadCurrencyCollection",{enumerable:!0,get:function(){return d.loadCurrencyCollection}}),Object.defineProperty(e,"storeCurrencyCollection",{enumerable:!0,get:function(){return d.storeCurrencyCollection}});var p=Zf;Object.defineProperty(e,"loadDepthBalanceInfo",{enumerable:!0,get:function(){return p.loadDepthBalanceInfo}}),Object.defineProperty(e,"storeDepthBalanceInfo",{enumerable:!0,get:function(){return p.storeDepthBalanceInfo}});var v=Qf;Object.defineProperty(e,"loadHashUpdate",{enumerable:!0,get:function(){return v.loadHashUpdate}}),Object.defineProperty(e,"storeHashUpdate",{enumerable:!0,get:function(){return v.storeHashUpdate}});var x=ky;Object.defineProperty(e,"loadMasterchainStateExtra",{enumerable:!0,get:function(){return x.loadMasterchainStateExtra}});var b=fc;Object.defineProperty(e,"loadMessage",{enumerable:!0,get:function(){return b.loadMessage}}),Object.defineProperty(e,"storeMessage",{enumerable:!0,get:function(){return b.storeMessage}});var y=Wh;Object.defineProperty(e,"loadMessageRelaxed",{enumerable:!0,get:function(){return y.loadMessageRelaxed}}),Object.defineProperty(e,"storeMessageRelaxed",{enumerable:!0,get:function(){return y.storeMessageRelaxed}});var _=HD;Object.defineProperty(e,"SendMode",{enumerable:!0,get:function(){return _.SendMode}});var k=Xf;Object.defineProperty(e,"loadShardAccount",{enumerable:!0,get:function(){return k.loadShardAccount}}),Object.defineProperty(e,"storeShardAccount",{enumerable:!0,get:function(){return k.storeShardAccount}});var E=Z6;Object.defineProperty(e,"ShardAccountRefValue",{enumerable:!0,get:function(){return E.ShardAccountRefValue}}),Object.defineProperty(e,"loadShardAccounts",{enumerable:!0,get:function(){return E.loadShardAccounts}}),Object.defineProperty(e,"storeShardAccounts",{enumerable:!0,get:function(){return E.storeShardAccounts}});var O=Jf;Object.defineProperty(e,"loadShardIdent",{enumerable:!0,get:function(){return O.loadShardIdent}}),Object.defineProperty(e,"storeShardIdent",{enumerable:!0,get:function(){return O.storeShardIdent}});var U=D2;Object.defineProperty(e,"loadShardStateUnsplit",{enumerable:!0,get:function(){return U.loadShardStateUnsplit}});var D=dc;Object.defineProperty(e,"loadSimpleLibrary",{enumerable:!0,get:function(){return D.loadSimpleLibrary}}),Object.defineProperty(e,"storeSimpleLibrary",{enumerable:!0,get:function(){return D.storeSimpleLibrary}});var j=ep;Object.defineProperty(e,"loadSplitMergeInfo",{enumerable:!0,get:function(){return j.loadSplitMergeInfo}}),Object.defineProperty(e,"storeSplitMergeInfo",{enumerable:!0,get:function(){return j.storeSplitMergeInfo}});var F=Bu;Object.defineProperty(e,"loadStateInit",{enumerable:!0,get:function(){return F.loadStateInit}}),Object.defineProperty(e,"storeStateInit",{enumerable:!0,get:function(){return F.storeStateInit}});var H=Wf;Object.defineProperty(e,"loadStorageInfo",{enumerable:!0,get:function(){return H.loadStorageInfo}}),Object.defineProperty(e,"storeStorageInfo",{enumerable:!0,get:function(){return H.storeStorageInfo}});var W=Vf;Object.defineProperty(e,"loadStorageUsed",{enumerable:!0,get:function(){return W.loadStorageUsed}}),Object.defineProperty(e,"storeStorageUsed",{enumerable:!0,get:function(){return W.storeStorageUsed}});var G=Id;Object.defineProperty(e,"loadStorageUsedShort",{enumerable:!0,get:function(){return G.loadStorageUsedShort}}),Object.defineProperty(e,"storeStorageUsedShort",{enumerable:!0,get:function(){return G.storeStorageUsedShort}});var ae=jf;Object.defineProperty(e,"loadTickTock",{enumerable:!0,get:function(){return ae.loadTickTock}}),Object.defineProperty(e,"storeTickTock",{enumerable:!0,get:function(){return ae.storeTickTock}});var V=QD();Object.defineProperty(e,"loadTransaction",{enumerable:!0,get:function(){return V.loadTransaction}}),Object.defineProperty(e,"storeTransaction",{enumerable:!0,get:function(){return V.storeTransaction}});var oe=tp;Object.defineProperty(e,"loadTransactionActionPhase",{enumerable:!0,get:function(){return oe.loadTransactionActionPhase}}),Object.defineProperty(e,"storeTransactionActionPhase",{enumerable:!0,get:function(){return oe.storeTransactionActionPhase}});var P=rp;Object.defineProperty(e,"loadTransactionBouncePhase",{enumerable:!0,get:function(){return P.loadTransactionBouncePhase}}),Object.defineProperty(e,"storeTransactionBouncePhase",{enumerable:!0,get:function(){return P.storeTransactionBouncePhase}});var ee=np;Object.defineProperty(e,"loadTransactionComputePhase",{enumerable:!0,get:function(){return ee.loadTransactionComputePhase}}),Object.defineProperty(e,"storeTransactionComputePhase",{enumerable:!0,get:function(){return ee.storeTransactionComputePhase}});var le=ip;Object.defineProperty(e,"loadTransactionCreditPhase",{enumerable:!0,get:function(){return le.loadTransactionCreditPhase}}),Object.defineProperty(e,"storeTransactionCreditPhase",{enumerable:!0,get:function(){return le.storeTransactionCreditPhase}});var pe=ZD();Object.defineProperty(e,"loadTransactionDescription",{enumerable:!0,get:function(){return pe.loadTransactionDescription}}),Object.defineProperty(e,"storeTransactionDescription",{enumerable:!0,get:function(){return pe.storeTransactionDescription}});var xe=op;Object.defineProperty(e,"loadTransactionStoragePhase",{enumerable:!0,get:function(){return xe.loadTransactionStoragePhase}}),Object.defineProperty(e,"storeTransactionsStoragePhase",{enumerable:!0,get:function(){return xe.storeTransactionsStoragePhase}})})(ED);var L2={};Object.defineProperty(L2,"__esModule",{value:!0});L2.openContract=void 0;const bce=Xs,dR=mp();function wce(e,t){let r,i=null;if(!bce.Address.isAddress(e.address))throw Error("Invalid address");if(r=e.address,e.init){if(!(e.init.code instanceof dR.Cell))throw Error("Invalid init.code");if(!(e.init.data instanceof dR.Cell))throw Error("Invalid init.data");i=e.init}let o=t({address:r,init:i});return new Proxy(e,{get(a,s){const l=a[s];return typeof s=="string"&&(s.startsWith("get")||s.startsWith("send"))&&typeof l=="function"?(...u)=>l.apply(a,[o,...u]):l}})}L2.openContract=wce;var N2={};Object.defineProperty(N2,"__esModule",{value:!0});N2.ComputeError=void 0;class Q6 extends Error{constructor(t,r,i){super(t),this.exitCode=r,this.debugLogs=i&&i.debugLogs?i.debugLogs:null,this.logs=i&&i.logs?i.logs:null,Object.setPrototypeOf(this,Q6.prototype)}}N2.ComputeError=Q6;var j2={};Object.defineProperty(j2,"__esModule",{value:!0});j2.getMethodId=void 0;const xce=new Int16Array([0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920]);function _ce(e){e instanceof Buffer||(e=Buffer.from(e));let t=0;for(let r=0;r>8^i)&255]^t<<8)&65535}return t}function Sce(e){return _ce(e)&65535|65536}j2.getMethodId=Sce;var Vh={};Object.defineProperty(Vh,"__esModule",{value:!0});Vh.safeSignVerify=Vh.safeSign=void 0;const X6=xg(),Cce=8,kce=64;function XD(e,t){let r=Buffer.from(t);if(r.length>kce)throw Error("Seed can be longer than 64 bytes");if(r.length{i!==null?this.cache.set(t+"$$"+r,i):this.cache.delete(t+"$$"+r)},this.get=async(t,r)=>{let i=this.cache.get(t+"$$"+r);return i!==void 0?i:null}}}$2.InMemoryCache=Tce;var Ice=function(){function e(r,i){if(typeof r!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array and returns Promise>, but got: "+r+"."));this._batchLoadFn=r,this._maxBatchSize=Oce(i),this._batchScheduleFn=Bce(i),this._cacheKeyFn=Uce(i),this._cacheMap=Dce(i),this._batch=null}var t=e.prototype;return t.load=function(i){if(i==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(i)+"."));var o=Pce(this),a=this._cacheMap,s=this._cacheKeyFn(i);if(a){var l=a.get(s);if(l){var u=o.cacheHits||(o.cacheHits=[]);return new Promise(function(d){u.push(function(){d(l)})})}}o.keys.push(i);var c=new Promise(function(d,p){o.callbacks.push({resolve:d,reject:p})});return a&&a.set(s,c),c},t.loadMany=function(i){if(!JD(i))throw new TypeError("The loader.loadMany() function must be called with Array "+("but got: "+i+"."));for(var o=[],a=0;a and returns Promise>, but the function did "+("not return a Promise: "+String(r)+".")));r.then(function(i){if(!JD(i))throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did "+("not return a Promise of an Array: "+String(i)+"."));if(i.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(` + +Keys: +`+String(t.keys))+(` + +Values: +`+String(i)));KS(t);for(var o=0;o0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var Lce=Ice,J6={exports:{}},ek={exports:{}},eL=function(t,r){return function(){for(var o=new Array(arguments.length),a=0;a"u"}function jce(e){return e!==null&&!GS(e)&&e.constructor!==null&&!GS(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function tL(e){return zd.call(e)==="[object ArrayBuffer]"}function $ce(e){return zd.call(e)==="[object FormData]"}function Fce(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tL(e.buffer),t}function zce(e){return typeof e=="string"}function Hce(e){return typeof e=="number"}function rL(e){return e!==null&&typeof e=="object"}function f1(e){if(zd.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Wce(e){return zd.call(e)==="[object Date]"}function Vce(e){return zd.call(e)==="[object File]"}function qce(e){return zd.call(e)==="[object Blob]"}function nL(e){return zd.call(e)==="[object Function]"}function Kce(e){return rL(e)&&nL(e.pipe)}function Gce(e){return zd.call(e)==="[object URLSearchParams]"}function Yce(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Zce(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function rk(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),tk(e))for(var r=0,i=e.length;r"u"||(Up.isArray(u)?c=c+"[]":u=[u],Up.forEach(u,function(p){Up.isDate(p)?p=p.toISOString():Up.isObject(p)&&(p=JSON.stringify(p)),a.push(pR(c)+"="+pR(p))}))}),o=a.join("&")}if(o){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t},Jce=Us;function F2(){this.handlers=[]}F2.prototype.use=function(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};F2.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};F2.prototype.forEach=function(t){Jce.forEach(this.handlers,function(i){i!==null&&t(i)})};var ede=F2,tde=Us,rde=function(t,r){tde.forEach(t,function(o,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(t[r]=o,delete t[a])})},oL=function(t,r,i,o,a){return t.config=r,i&&(t.code=i),t.request=o,t.response=a,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},o5,hR;function aL(){if(hR)return o5;hR=1;var e=oL;return o5=function(r,i,o,a,s){var l=new Error(r);return e(l,i,o,a,s)},o5}var a5,gR;function nde(){if(gR)return a5;gR=1;var e=aL();return a5=function(r,i,o){var a=o.config.validateStatus;!o.status||!a||a(o.status)?r(o):i(e("Request failed with status code "+o.status,o.config,null,o.request,o))},a5}var s5,mR;function ide(){if(mR)return s5;mR=1;var e=Us;return s5=e.isStandardBrowserEnv()?function(){return{write:function(i,o,a,s,l,u){var c=[];c.push(i+"="+encodeURIComponent(o)),e.isNumber(a)&&c.push("expires="+new Date(a).toGMTString()),e.isString(s)&&c.push("path="+s),e.isString(l)&&c.push("domain="+l),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(i){var o=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(i){this.write(i,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),s5}var l5,yR;function ode(){return yR||(yR=1,l5=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),l5}var u5,vR;function ade(){return vR||(vR=1,u5=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),u5}var c5,bR;function sde(){if(bR)return c5;bR=1;var e=ode(),t=ade();return c5=function(i,o){return i&&!e(o)?t(i,o):o},c5}var d5,wR;function lde(){if(wR)return d5;wR=1;var e=Us,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return d5=function(i){var o={},a,s,l;return i&&e.forEach(i.split(` +`),function(c){if(l=c.indexOf(":"),a=e.trim(c.substr(0,l)).toLowerCase(),s=e.trim(c.substr(l+1)),a){if(o[a]&&t.indexOf(a)>=0)return;a==="set-cookie"?o[a]=(o[a]?o[a]:[]).concat([s]):o[a]=o[a]?o[a]+", "+s:s}}),o},d5}var f5,xR;function ude(){if(xR)return f5;xR=1;var e=Us;return f5=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),o;function a(s){var l=s;return r&&(i.setAttribute("href",l),l=i.href),i.setAttribute("href",l),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return o=a(window.location.href),function(l){var u=e.isString(l)?a(l):l;return u.protocol===o.protocol&&u.host===o.host}}():function(){return function(){return!0}}(),f5}var p5,_R;function z2(){if(_R)return p5;_R=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,p5=e,p5}var h5,SR;function CR(){if(SR)return h5;SR=1;var e=Us,t=nde(),r=ide(),i=iL,o=sde(),a=lde(),s=ude(),l=aL(),u=H2(),c=z2();return h5=function(p){return new Promise(function(x,b){var y=p.data,_=p.headers,k=p.responseType,E;function O(){p.cancelToken&&p.cancelToken.unsubscribe(E),p.signal&&p.signal.removeEventListener("abort",E)}e.isFormData(y)&&delete _["Content-Type"];var U=new XMLHttpRequest;if(p.auth){var D=p.auth.username||"",j=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";_.Authorization="Basic "+btoa(D+":"+j)}var F=o(p.baseURL,p.url);U.open(p.method.toUpperCase(),i(F,p.params,p.paramsSerializer),!0),U.timeout=p.timeout;function H(){if(!!U){var G="getAllResponseHeaders"in U?a(U.getAllResponseHeaders()):null,ae=!k||k==="text"||k==="json"?U.responseText:U.response,V={data:ae,status:U.status,statusText:U.statusText,headers:G,config:p,request:U};t(function(P){x(P),O()},function(P){b(P),O()},V),U=null}}if("onloadend"in U?U.onloadend=H:U.onreadystatechange=function(){!U||U.readyState!==4||U.status===0&&!(U.responseURL&&U.responseURL.indexOf("file:")===0)||setTimeout(H)},U.onabort=function(){!U||(b(l("Request aborted",p,"ECONNABORTED",U)),U=null)},U.onerror=function(){b(l("Network Error",p,null,U)),U=null},U.ontimeout=function(){var ae=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded",V=p.transitional||u.transitional;p.timeoutErrorMessage&&(ae=p.timeoutErrorMessage),b(l(ae,p,V.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U)),U=null},e.isStandardBrowserEnv()){var W=(p.withCredentials||s(F))&&p.xsrfCookieName?r.read(p.xsrfCookieName):void 0;W&&(_[p.xsrfHeaderName]=W)}"setRequestHeader"in U&&e.forEach(_,function(ae,V){typeof y>"u"&&V.toLowerCase()==="content-type"?delete _[V]:U.setRequestHeader(V,ae)}),e.isUndefined(p.withCredentials)||(U.withCredentials=!!p.withCredentials),k&&k!=="json"&&(U.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&U.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&U.upload&&U.upload.addEventListener("progress",p.onUploadProgress),(p.cancelToken||p.signal)&&(E=function(G){!U||(b(!G||G&&G.type?new c("canceled"):G),U.abort(),U=null)},p.cancelToken&&p.cancelToken.subscribe(E),p.signal&&(p.signal.aborted?E():p.signal.addEventListener("abort",E))),y||(y=null),U.send(y)})},h5}var g5,kR;function H2(){if(kR)return g5;kR=1;var e=Us,t=rde,r=oL,i={"Content-Type":"application/x-www-form-urlencoded"};function o(u,c){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=c)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=CR()),u}function s(u,c,d){if(e.isString(u))try{return(c||JSON.parse)(u),e.trim(u)}catch(p){if(p.name!=="SyntaxError")throw p}return(d||JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(c,d){return t(d,"Accept"),t(d,"Content-Type"),e.isFormData(c)||e.isArrayBuffer(c)||e.isBuffer(c)||e.isStream(c)||e.isFile(c)||e.isBlob(c)?c:e.isArrayBufferView(c)?c.buffer:e.isURLSearchParams(c)?(o(d,"application/x-www-form-urlencoded;charset=utf-8"),c.toString()):e.isObject(c)||d&&d["Content-Type"]==="application/json"?(o(d,"application/json"),s(c)):c}],transformResponse:[function(c){var d=this.transitional||l.transitional,p=d&&d.silentJSONParsing,v=d&&d.forcedJSONParsing,x=!p&&this.responseType==="json";if(x||v&&e.isString(c)&&c.length)try{return JSON.parse(c)}catch(b){if(x)throw b.name==="SyntaxError"?r(b,this,"E_JSON_PARSE"):b}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(c){l.headers[c]={}}),e.forEach(["post","put","patch"],function(c){l.headers[c]=e.merge(i)}),g5=l,g5}var cde=Us,dde=H2(),fde=function(t,r,i){var o=this||dde;return cde.forEach(i,function(s){t=s.call(o,t,r)}),t},m5,ER;function sL(){return ER||(ER=1,m5=function(t){return!!(t&&t.__CANCEL__)}),m5}var AR=Us,y5=fde,pde=sL(),hde=H2(),gde=z2();function v5(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gde("canceled")}var mde=function(t){v5(t),t.headers=t.headers||{},t.data=y5.call(t,t.data,t.headers,t.transformRequest),t.headers=AR.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),AR.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var r=t.adapter||hde.adapter;return r(t).then(function(o){return v5(t),o.data=y5.call(t,o.data,o.headers,t.transformResponse),o},function(o){return pde(o)||(v5(t),o&&o.response&&(o.response.data=y5.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},Ls=Us,lL=function(t,r){r=r||{};var i={};function o(d,p){return Ls.isPlainObject(d)&&Ls.isPlainObject(p)?Ls.merge(d,p):Ls.isPlainObject(p)?Ls.merge({},p):Ls.isArray(p)?p.slice():p}function a(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(t[d],r[d])}function s(d){if(!Ls.isUndefined(r[d]))return o(void 0,r[d])}function l(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(void 0,r[d])}function u(d){if(d in r)return o(t[d],r[d]);if(d in t)return o(void 0,t[d])}var c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u};return Ls.forEach(Object.keys(t).concat(Object.keys(r)),function(p){var v=c[p]||a,x=v(p);Ls.isUndefined(x)&&v!==u||(i[p]=x)}),i},b5,TR;function uL(){return TR||(TR=1,b5={version:"0.25.0"}),b5}var yde=uL().version,nk={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){nk[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var IR={};nk.transitional=function(t,r,i){function o(a,s){return"[Axios v"+yde+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return function(a,s,l){if(t===!1)throw new Error(o(s," has been removed"+(r?" in "+r:"")));return r&&!IR[s]&&(IR[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,l):!0}};function vde(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var i=Object.keys(e),o=i.length;o-- >0;){var a=i[o],s=t[a];if(s){var l=e[a],u=l===void 0||s(l,a,e);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var bde={assertOptions:vde,validators:nk},cL=Us,wde=iL,RR=ede,PR=mde,W2=lL,dL=bde,Dp=dL.validators;function Ay(e){this.defaults=e,this.interceptors={request:new RR,response:new RR}}Ay.prototype.request=function(t,r){if(typeof t=="string"?(r=r||{},r.url=t):r=t||{},!r.url)throw new Error("Provided config url is not valid");r=W2(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&dL.assertOptions(i,{silentJSONParsing:Dp.transitional(Dp.boolean),forcedJSONParsing:Dp.transitional(Dp.boolean),clarifyTimeoutError:Dp.transitional(Dp.boolean)},!1);var o=[],a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(a=a&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});var s=[];this.interceptors.response.forEach(function(x){s.push(x.fulfilled,x.rejected)});var l;if(!a){var u=[PR,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),l=Promise.resolve(r);u.length;)l=l.then(u.shift(),u.shift());return l}for(var c=r;o.length;){var d=o.shift(),p=o.shift();try{c=d(c)}catch(v){p(v);break}}try{l=PR(c)}catch(v){return Promise.reject(v)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};Ay.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=W2(this.defaults,t),wde(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};cL.forEach(["delete","get","head","options"],function(t){Ay.prototype[t]=function(r,i){return this.request(W2(i||{},{method:t,url:r,data:(i||{}).data}))}});cL.forEach(["post","put","patch"],function(t){Ay.prototype[t]=function(r,i,o){return this.request(W2(o||{},{method:t,url:r,data:i}))}});var xde=Ay,w5,MR;function _de(){if(MR)return w5;MR=1;var e=z2();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var i;this.promise=new Promise(function(s){i=s});var o=this;this.promise.then(function(a){if(!!o._listeners){var s,l=o._listeners.length;for(s=0;sl;function o(l){}i.assertIs=o;function a(l){throw new Error}i.assertNever=a,i.arrayToEnum=l=>{const u={};for(const c of l)u[c]=c;return u},i.getValidEnumValues=l=>{const u=i.objectKeys(l).filter(d=>typeof l[l[d]]!="number"),c={};for(const d of u)c[d]=l[d];return i.objectValues(c)},i.objectValues=l=>i.objectKeys(l).map(function(u){return l[u]}),i.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const u=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);return u},i.find=(l,u)=>{for(const c of l)if(u(c))return c},i.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&isFinite(l)&&Math.floor(l)===l;function s(l,u=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}i.joinValues=s,i.jsonStringifyReplacer=(l,u)=>typeof u=="bigint"?u.toString():u})(t=e.util||(e.util={})),function(i){i.mergeShapes=(o,a)=>({...o,...a})}(e.objectUtil||(e.objectUtil={})),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=i=>{switch(typeof i){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(i)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(i)?e.ZodParsedType.array:i===null?e.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?e.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?e.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?e.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}};e.getParsedType=r})(Ty);var Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.ZodError=Eu.quotelessJson=Eu.ZodIssueCode=void 0;const pL=Ty;Eu.ZodIssueCode=pL.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const Tde=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");Eu.quotelessJson=Tde;class QS extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},i={_errors:[]},o=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)i._errors.push(r(s));else{let l=i,u=0;for(;ur.message){const r={},i=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}Eu.ZodError=QS;QS.create=e=>new QS(e);Object.defineProperty(V2,"__esModule",{value:!0});const tf=Ty,Za=Eu,Ide=(e,t)=>{let r;switch(e.code){case Za.ZodIssueCode.invalid_type:e.received===tf.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Za.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,tf.util.jsonStringifyReplacer)}`;break;case Za.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${tf.util.joinValues(e.keys,", ")}`;break;case Za.ZodIssueCode.invalid_union:r="Invalid input";break;case Za.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${tf.util.joinValues(e.options)}`;break;case Za.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${tf.util.joinValues(e.options)}, received '${e.received}'`;break;case Za.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Za.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Za.ZodIssueCode.invalid_date:r="Invalid date";break;case Za.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:tf.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Za.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Za.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Za.ZodIssueCode.custom:r="Invalid input";break;case Za.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Za.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Za.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,tf.util.assertNever(e)}return{message:r}};V2.default=Ide;var Rde=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ku,"__esModule",{value:!0});ku.getErrorMap=ku.setErrorMap=ku.defaultErrorMap=void 0;const hL=Rde(V2);ku.defaultErrorMap=hL.default;let gL=hL.default;function Pde(e){gL=e}ku.setErrorMap=Pde;function Mde(){return gL}ku.getErrorMap=Mde;var ok={};(function(e){var t=_n&&_n.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.addIssueToContext=e.EMPTY_PATH=e.makeIssue=void 0;const r=ku,i=t(V2),o=x=>{const{data:b,path:y,errorMaps:_,issueData:k}=x,E=[...y,...k.path||[]],O={...k,path:E};let U="";const D=_.filter(j=>!!j).slice().reverse();for(const j of D)U=j(O,{data:b,defaultError:U}).message;return{...k,path:E,message:k.message||U}};e.makeIssue=o,e.EMPTY_PATH=[];function a(x,b){const y=(0,e.makeIssue)({issueData:b,data:x.data,path:x.path,errorMaps:[x.common.contextualErrorMap,x.schemaErrorMap,(0,r.getErrorMap)(),i.default].filter(_=>!!_)});x.common.issues.push(y)}e.addIssueToContext=a;class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(b,y){const _=[];for(const k of y){if(k.status==="aborted")return e.INVALID;k.status==="dirty"&&b.dirty(),_.push(k.value)}return{status:b.value,value:_}}static async mergeObjectAsync(b,y){const _=[];for(const k of y)_.push({key:await k.key,value:await k.value});return s.mergeObjectSync(b,_)}static mergeObjectSync(b,y){const _={};for(const k of y){const{key:E,value:O}=k;if(E.status==="aborted"||O.status==="aborted")return e.INVALID;E.status==="dirty"&&b.dirty(),O.status==="dirty"&&b.dirty(),(typeof O.value<"u"||k.alwaysSet)&&(_[E.value]=O.value)}return{status:b.value,value:_}}}e.ParseStatus=s,e.INVALID=Object.freeze({status:"aborted"});const l=x=>({status:"dirty",value:x});e.DIRTY=l;const u=x=>({status:"valid",value:x});e.OK=u;const c=x=>x.status==="aborted";e.isAborted=c;const d=x=>x.status==="dirty";e.isDirty=d;const p=x=>x.status==="valid";e.isValid=p;const v=x=>typeof Promise<"u"&&x instanceof Promise;e.isAsync=v})(ok);var mL={};Object.defineProperty(mL,"__esModule",{value:!0});var yL={},vL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message}(e.errorUtil||(e.errorUtil={}))})(vL);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=ku,r=vL,i=ok,o=Ty,a=Eu;class s{constructor(K,ye,Me,it){this._cachedPath=[],this.parent=K,this.data=ye,this._path=Me,this._key=it}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l=(vt,K)=>{if((0,i.isValid)(K))return{success:!0,data:K.value};if(!vt.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const ye=new a.ZodError(vt.common.issues);return this._error=ye,this._error}}};function u(vt){if(!vt)return{};const{errorMap:K,invalid_type_error:ye,required_error:Me,description:it}=vt;if(K&&(ye||Me))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return K?{errorMap:K,description:it}:{errorMap:(br,cr)=>br.code!=="invalid_type"?{message:cr.defaultError}:typeof cr.data>"u"?{message:Me??cr.defaultError}:{message:ye??cr.defaultError},description:it}}class c{constructor(K){this.spa=this.safeParseAsync,this._def=K,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(K){return(0,o.getParsedType)(K.data)}_getOrReturnCtx(K,ye){return ye||{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}_processInputParams(K){return{status:new i.ParseStatus,ctx:{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}}_parseSync(K){const ye=this._parse(K);if((0,i.isAsync)(ye))throw new Error("Synchronous parse encountered promise.");return ye}_parseAsync(K){const ye=this._parse(K);return Promise.resolve(ye)}parse(K,ye){const Me=this.safeParse(K,ye);if(Me.success)return Me.data;throw Me.error}safeParse(K,ye){var Me;const it={common:{issues:[],async:(Me=ye?.async)!==null&&Me!==void 0?Me:!1,contextualErrorMap:ye?.errorMap},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},dt=this._parseSync({data:K,path:it.path,parent:it});return l(it,dt)}async parseAsync(K,ye){const Me=await this.safeParseAsync(K,ye);if(Me.success)return Me.data;throw Me.error}async safeParseAsync(K,ye){const Me={common:{issues:[],contextualErrorMap:ye?.errorMap,async:!0},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},it=this._parse({data:K,path:Me.path,parent:Me}),dt=await((0,i.isAsync)(it)?it:Promise.resolve(it));return l(Me,dt)}refine(K,ye){const Me=it=>typeof ye=="string"||typeof ye>"u"?{message:ye}:typeof ye=="function"?ye(it):ye;return this._refinement((it,dt)=>{const br=K(it),cr=()=>dt.addIssue({code:a.ZodIssueCode.custom,...Me(it)});return typeof Promise<"u"&&br instanceof Promise?br.then(Or=>Or?!0:(cr(),!1)):br?!0:(cr(),!1)})}refinement(K,ye){return this._refinement((Me,it)=>K(Me)?!0:(it.addIssue(typeof ye=="function"?ye(Me,it):ye),!1))}_refinement(K){return new Nt({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:K}})}superRefine(K){return this._refinement(K)}optional(){return Ie.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this,this._def)}promise(){return Mt.create(this,this._def)}or(K){return ft.create([this,K],this._def)}and(K){return Bt.create(this,K,this._def)}transform(K){return new Nt({...u(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:K}})}default(K){const ye=typeof K=="function"?K:()=>K;return new fe({...u(this._def),innerType:this,defaultValue:ye,typeName:ie.ZodDefault})}brand(){return new lt({typeName:ie.ZodBranded,type:this,...u(this._def)})}catch(K){const ye=typeof K=="function"?K:()=>K;return new Be({...u(this._def),innerType:this,catchValue:ye,typeName:ie.ZodCatch})}describe(K){const ye=this.constructor;return new ye({...this._def,description:K})}pipe(K){return jt.create(this,K)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=c,e.Schema=c,e.ZodSchema=c;const d=/^c[^\s-]{8,}$/i,p=/^[a-z][a-z0-9]*$/,v=/[0-9A-HJKMNP-TV-Z]{26}/,x=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,b=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,y=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,_=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,k=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,E=vt=>vt.precision?vt.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}Z$`):vt.precision===0?vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function O(vt,K){return!!((K==="v4"||!K)&&_.test(vt)||(K==="v6"||!K)&&k.test(vt))}class U extends c{constructor(){super(...arguments),this._regex=(K,ye,Me)=>this.refinement(it=>K.test(it),{validation:ye,code:a.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(Me)}),this.nonempty=K=>this.min(1,r.errorUtil.errToObj(K)),this.trim=()=>new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(K){if(this._def.coerce&&(K.data=String(K.data)),this._getType(K)!==o.ZodParsedType.string){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.string,received:dt.parsedType}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)if(dt.kind==="min")K.data.lengthdt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"string",inclusive:!0,exact:!1,message:dt.message}),Me.dirty());else if(dt.kind==="length"){const br=K.data.length>dt.value,cr=K.data.length"u"?null:K?.precision,offset:(ye=K?.offset)!==null&&ye!==void 0?ye:!1,...r.errorUtil.errToObj(K?.message)})}regex(K,ye){return this._addCheck({kind:"regex",regex:K,...r.errorUtil.errToObj(ye)})}includes(K,ye){return this._addCheck({kind:"includes",value:K,position:ye?.position,...r.errorUtil.errToObj(ye?.message)})}startsWith(K,ye){return this._addCheck({kind:"startsWith",value:K,...r.errorUtil.errToObj(ye)})}endsWith(K,ye){return this._addCheck({kind:"endsWith",value:K,...r.errorUtil.errToObj(ye)})}min(K,ye){return this._addCheck({kind:"min",value:K,...r.errorUtil.errToObj(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K,...r.errorUtil.errToObj(ye)})}length(K,ye){return this._addCheck({kind:"length",value:K,...r.errorUtil.errToObj(ye)})}get isDatetime(){return!!this._def.checks.find(K=>K.kind==="datetime")}get isEmail(){return!!this._def.checks.find(K=>K.kind==="email")}get isURL(){return!!this._def.checks.find(K=>K.kind==="url")}get isEmoji(){return!!this._def.checks.find(K=>K.kind==="emoji")}get isUUID(){return!!this._def.checks.find(K=>K.kind==="uuid")}get isCUID(){return!!this._def.checks.find(K=>K.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(K=>K.kind==="cuid2")}get isULID(){return!!this._def.checks.find(K=>K.kind==="ulid")}get isIP(){return!!this._def.checks.find(K=>K.kind==="ip")}get minLength(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxLength(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new U({checks:[],typeName:ie.ZodString,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};function D(vt,K){const ye=(vt.toString().split(".")[1]||"").length,Me=(K.toString().split(".")[1]||"").length,it=ye>Me?ye:Me,dt=parseInt(vt.toFixed(it).replace(".","")),br=parseInt(K.toFixed(it).replace(".",""));return dt%br/Math.pow(10,it)}class j extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(K){if(this._def.coerce&&(K.data=Number(K.data)),this._getType(K)!==o.ZodParsedType.number){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.number,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="int"?o.util.isInteger(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:dt.message}),it.dirty()):dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"number",inclusive:dt.inclusive,exact:!1,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?D(K.data,dt.value)!==0&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):dt.kind==="finite"?Number.isFinite(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_finite,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new j({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new j({...this._def,checks:[...this._def.checks,K]})}int(K){return this._addCheck({kind:"int",message:r.errorUtil.toString(K)})}positive(K){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}finite(K){return this._addCheck({kind:"finite",message:r.errorUtil.toString(K)})}safe(K){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.errorUtil.toString(K)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.errorUtil.toString(K)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valueK.kind==="int"||K.kind==="multipleOf"&&o.util.isInteger(K.value))}get isFinite(){let K=null,ye=null;for(const Me of this._def.checks){if(Me.kind==="finite"||Me.kind==="int"||Me.kind==="multipleOf")return!0;Me.kind==="min"?(ye===null||Me.value>ye)&&(ye=Me.value):Me.kind==="max"&&(K===null||Me.valuenew j({checks:[],typeName:ie.ZodNumber,coerce:vt?.coerce||!1,...u(vt)});class F extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(K){if(this._def.coerce&&(K.data=BigInt(K.data)),this._getType(K)!==o.ZodParsedType.bigint){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.bigint,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:dt.value,inclusive:dt.inclusive,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?K.data%dt.value!==BigInt(0)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new F({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new F({...this._def,checks:[...this._def.checks,K]})}positive(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new F({checks:[],typeName:ie.ZodBigInt,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};class H extends c{_parse(K){if(this._def.coerce&&(K.data=Boolean(K.data)),this._getType(K)!==o.ZodParsedType.boolean){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.boolean,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodBoolean=H,H.create=vt=>new H({typeName:ie.ZodBoolean,coerce:vt?.coerce||!1,...u(vt)});class W extends c{_parse(K){if(this._def.coerce&&(K.data=new Date(K.data)),this._getType(K)!==o.ZodParsedType.date){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.date,received:dt.parsedType}),i.INVALID}if(isNaN(K.data.getTime())){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_date}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)dt.kind==="min"?K.data.getTime()dt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,message:dt.message,inclusive:!0,exact:!1,maximum:dt.value,type:"date"}),Me.dirty()):o.util.assertNever(dt);return{status:Me.value,value:new Date(K.data.getTime())}}_addCheck(K){return new W({...this._def,checks:[...this._def.checks,K]})}min(K,ye){return this._addCheck({kind:"min",value:K.getTime(),message:r.errorUtil.toString(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K.getTime(),message:r.errorUtil.toString(ye)})}get minDate(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K!=null?new Date(K):null}get maxDate(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valuenew W({checks:[],coerce:vt?.coerce||!1,typeName:ie.ZodDate,...u(vt)});class G extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.symbol){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.symbol,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodSymbol=G,G.create=vt=>new G({typeName:ie.ZodSymbol,...u(vt)});class ae extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.undefined,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodUndefined=ae,ae.create=vt=>new ae({typeName:ie.ZodUndefined,...u(vt)});class V extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.null){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.null,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodNull=V,V.create=vt=>new V({typeName:ie.ZodNull,...u(vt)});class oe extends c{constructor(){super(...arguments),this._any=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodAny=oe,oe.create=vt=>new oe({typeName:ie.ZodAny,...u(vt)});class P extends c{constructor(){super(...arguments),this._unknown=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodUnknown=P,P.create=vt=>new P({typeName:ie.ZodUnknown,...u(vt)});class ee extends c{_parse(K){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.never,received:ye.parsedType}),i.INVALID}}e.ZodNever=ee,ee.create=vt=>new ee({typeName:ie.ZodNever,...u(vt)});class le extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.void,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodVoid=le,le.create=vt=>new le({typeName:ie.ZodVoid,...u(vt)});class pe extends c{_parse(K){const{ctx:ye,status:Me}=this._processInputParams(K),it=this._def;if(ye.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:ye.parsedType}),i.INVALID;if(it.exactLength!==null){const br=ye.data.length>it.exactLength.value,cr=ye.data.lengthit.maxLength.value&&((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.too_big,maximum:it.maxLength.value,type:"array",inclusive:!0,exact:!1,message:it.maxLength.message}),Me.dirty()),ye.common.async)return Promise.all([...ye.data].map((br,cr)=>it.type._parseAsync(new s(ye,br,ye.path,cr)))).then(br=>i.ParseStatus.mergeArray(Me,br));const dt=[...ye.data].map((br,cr)=>it.type._parseSync(new s(ye,br,ye.path,cr)));return i.ParseStatus.mergeArray(Me,dt)}get element(){return this._def.type}min(K,ye){return new pe({...this._def,minLength:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new pe({...this._def,maxLength:{value:K,message:r.errorUtil.toString(ye)}})}length(K,ye){return new pe({...this._def,exactLength:{value:K,message:r.errorUtil.toString(ye)}})}nonempty(K){return this.min(1,K)}}e.ZodArray=pe,pe.create=(vt,K)=>new pe({type:vt,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...u(K)});function xe(vt){if(vt instanceof J){const K={};for(const ye in vt.shape){const Me=vt.shape[ye];K[ye]=Ie.create(xe(Me))}return new J({...vt._def,shape:()=>K})}else return vt instanceof pe?new pe({...vt._def,type:xe(vt.element)}):vt instanceof Ie?Ie.create(xe(vt.unwrap())):vt instanceof Ae?Ae.create(xe(vt.unwrap())):vt instanceof Rt?Rt.create(vt.items.map(K=>xe(K))):vt}class J extends c{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const K=this._def.shape(),ye=o.util.objectKeys(K);return this._cached={shape:K,keys:ye}}_parse(K){if(this._getType(K)!==o.ZodParsedType.object){const Sr=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Sr,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Sr.parsedType}),i.INVALID}const{status:Me,ctx:it}=this._processInputParams(K),{shape:dt,keys:br}=this._getCached(),cr=[];if(!(this._def.catchall instanceof ee&&this._def.unknownKeys==="strip"))for(const Sr in it.data)br.includes(Sr)||cr.push(Sr);const Or=[];for(const Sr of br){const Kr=dt[Sr],on=it.data[Sr];Or.push({key:{status:"valid",value:Sr},value:Kr._parse(new s(it,on,it.path,Sr)),alwaysSet:Sr in it.data})}if(this._def.catchall instanceof ee){const Sr=this._def.unknownKeys;if(Sr==="passthrough")for(const Kr of cr)Or.push({key:{status:"valid",value:Kr},value:{status:"valid",value:it.data[Kr]}});else if(Sr==="strict")cr.length>0&&((0,i.addIssueToContext)(it,{code:a.ZodIssueCode.unrecognized_keys,keys:cr}),Me.dirty());else if(Sr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Sr=this._def.catchall;for(const Kr of cr){const on=it.data[Kr];Or.push({key:{status:"valid",value:Kr},value:Sr._parse(new s(it,on,it.path,Kr)),alwaysSet:Kr in it.data})}}return it.common.async?Promise.resolve().then(async()=>{const Sr=[];for(const Kr of Or){const on=await Kr.key;Sr.push({key:on,value:await Kr.value,alwaysSet:Kr.alwaysSet})}return Sr}).then(Sr=>i.ParseStatus.mergeObjectSync(Me,Sr)):i.ParseStatus.mergeObjectSync(Me,Or)}get shape(){return this._def.shape()}strict(K){return r.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...K!==void 0?{errorMap:(ye,Me)=>{var it,dt,br,cr;const Or=(br=(dt=(it=this._def).errorMap)===null||dt===void 0?void 0:dt.call(it,ye,Me).message)!==null&&br!==void 0?br:Me.defaultError;return ye.code==="unrecognized_keys"?{message:(cr=r.errorUtil.errToObj(K).message)!==null&&cr!==void 0?cr:Or}:{message:Or}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(K){return new J({...this._def,shape:()=>({...this._def.shape(),...K})})}merge(K){return new J({unknownKeys:K._def.unknownKeys,catchall:K._def.catchall,shape:()=>({...this._def.shape(),...K._def.shape()}),typeName:ie.ZodObject})}setKey(K,ye){return this.augment({[K]:ye})}catchall(K){return new J({...this._def,catchall:K})}pick(K){const ye={};return o.util.objectKeys(K).forEach(Me=>{K[Me]&&this.shape[Me]&&(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}omit(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{K[Me]||(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}deepPartial(){return xe(this)}partial(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{const it=this.shape[Me];K&&!K[Me]?ye[Me]=it:ye[Me]=it.optional()}),new J({...this._def,shape:()=>ye})}required(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{if(K&&!K[Me])ye[Me]=this.shape[Me];else{let dt=this.shape[Me];for(;dt instanceof Ie;)dt=dt._def.innerType;ye[Me]=dt}}),new J({...this._def,shape:()=>ye})}keyof(){return Kt(o.util.objectKeys(this.shape))}}e.ZodObject=J,J.create=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.strictCreate=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strict",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.lazycreate=(vt,K)=>new J({shape:vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)});class ft extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=this._def.options;function it(dt){for(const cr of dt)if(cr.result.status==="valid")return cr.result;for(const cr of dt)if(cr.result.status==="dirty")return ye.common.issues.push(...cr.ctx.common.issues),cr.result;const br=dt.map(cr=>new a.ZodError(cr.ctx.common.issues));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:br}),i.INVALID}if(ye.common.async)return Promise.all(Me.map(async dt=>{const br={...ye,common:{...ye.common,issues:[]},parent:null};return{result:await dt._parseAsync({data:ye.data,path:ye.path,parent:br}),ctx:br}})).then(it);{let dt;const br=[];for(const Or of Me){const Sr={...ye,common:{...ye.common,issues:[]},parent:null},Kr=Or._parseSync({data:ye.data,path:ye.path,parent:Sr});if(Kr.status==="valid")return Kr;Kr.status==="dirty"&&!dt&&(dt={result:Kr,ctx:Sr}),Sr.common.issues.length&&br.push(Sr.common.issues)}if(dt)return ye.common.issues.push(...dt.ctx.common.issues),dt.result;const cr=br.map(Or=>new a.ZodError(Or));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:cr}),i.INVALID}}get options(){return this._def.options}}e.ZodUnion=ft,ft.create=(vt,K)=>new ft({options:vt,typeName:ie.ZodUnion,...u(K)});const Le=vt=>vt instanceof Ct?Le(vt.schema):vt instanceof Nt?Le(vt.innerType()):vt instanceof Lt?[vt.value]:vt instanceof yr?vt.options:vt instanceof ne?Object.keys(vt.enum):vt instanceof fe?Le(vt._def.innerType):vt instanceof ae?[void 0]:vt instanceof V?[null]:null;class He extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:ye.parsedType}),i.INVALID;const Me=this.discriminator,it=ye.data[Me],dt=this.optionsMap.get(it);return dt?ye.common.async?dt._parseAsync({data:ye.data,path:ye.path,parent:ye}):dt._parseSync({data:ye.data,path:ye.path,parent:ye}):((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Me]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(K,ye,Me){const it=new Map;for(const dt of ye){const br=Le(dt.shape[K]);if(!br)throw new Error(`A discriminator value for key \`${K}\` could not be extracted from all schema options`);for(const cr of br){if(it.has(cr))throw new Error(`Discriminator property ${String(K)} has duplicate value ${String(cr)}`);it.set(cr,dt)}}return new He({typeName:ie.ZodDiscriminatedUnion,discriminator:K,options:ye,optionsMap:it,...u(Me)})}}e.ZodDiscriminatedUnion=He;function nr(vt,K){const ye=(0,o.getParsedType)(vt),Me=(0,o.getParsedType)(K);if(vt===K)return{valid:!0,data:vt};if(ye===o.ZodParsedType.object&&Me===o.ZodParsedType.object){const it=o.util.objectKeys(K),dt=o.util.objectKeys(vt).filter(cr=>it.indexOf(cr)!==-1),br={...vt,...K};for(const cr of dt){const Or=nr(vt[cr],K[cr]);if(!Or.valid)return{valid:!1};br[cr]=Or.data}return{valid:!0,data:br}}else if(ye===o.ZodParsedType.array&&Me===o.ZodParsedType.array){if(vt.length!==K.length)return{valid:!1};const it=[];for(let dt=0;dt{if((0,i.isAborted)(dt)||(0,i.isAborted)(br))return i.INVALID;const cr=nr(dt.value,br.value);return cr.valid?(((0,i.isDirty)(dt)||(0,i.isDirty)(br))&&ye.dirty(),{status:ye.value,value:cr.data}):((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return Me.common.async?Promise.all([this._def.left._parseAsync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseAsync({data:Me.data,path:Me.path,parent:Me})]).then(([dt,br])=>it(dt,br)):it(this._def.left._parseSync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseSync({data:Me.data,path:Me.path,parent:Me}))}}e.ZodIntersection=Bt,Bt.create=(vt,K,ye)=>new Bt({left:vt,right:K,typeName:ie.ZodIntersection,...u(ye)});class Rt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:Me.parsedType}),i.INVALID;if(Me.data.lengththis._def.items.length&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye.dirty());const dt=[...Me.data].map((br,cr)=>{const Or=this._def.items[cr]||this._def.rest;return Or?Or._parse(new s(Me,br,Me.path,cr)):null}).filter(br=>!!br);return Me.common.async?Promise.all(dt).then(br=>i.ParseStatus.mergeArray(ye,br)):i.ParseStatus.mergeArray(ye,dt)}get items(){return this._def.items}rest(K){return new Rt({...this._def,rest:K})}}e.ZodTuple=Rt,Rt.create=(vt,K)=>{if(!Array.isArray(vt))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rt({items:vt,typeName:ie.ZodTuple,rest:null,...u(K)})};class Jt extends c{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Me.parsedType}),i.INVALID;const it=[],dt=this._def.keyType,br=this._def.valueType;for(const cr in Me.data)it.push({key:dt._parse(new s(Me,cr,Me.path,cr)),value:br._parse(new s(Me,Me.data[cr],Me.path,cr))});return Me.common.async?i.ParseStatus.mergeObjectAsync(ye,it):i.ParseStatus.mergeObjectSync(ye,it)}get element(){return this._def.valueType}static create(K,ye,Me){return ye instanceof c?new Jt({keyType:K,valueType:ye,typeName:ie.ZodRecord,...u(Me)}):new Jt({keyType:U.create(),valueType:K,typeName:ie.ZodRecord,...u(ye)})}}e.ZodRecord=Jt;class vr extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.map)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.map,received:Me.parsedType}),i.INVALID;const it=this._def.keyType,dt=this._def.valueType,br=[...Me.data.entries()].map(([cr,Or],Sr)=>({key:it._parse(new s(Me,cr,Me.path,[Sr,"key"])),value:dt._parse(new s(Me,Or,Me.path,[Sr,"value"]))}));if(Me.common.async){const cr=new Map;return Promise.resolve().then(async()=>{for(const Or of br){const Sr=await Or.key,Kr=await Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}})}else{const cr=new Map;for(const Or of br){const Sr=Or.key,Kr=Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}}}}e.ZodMap=vr,vr.create=(vt,K,ye)=>new vr({valueType:K,keyType:vt,typeName:ie.ZodMap,...u(ye)});class At extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.set)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.set,received:Me.parsedType}),i.INVALID;const it=this._def;it.minSize!==null&&Me.data.sizeit.maxSize.value&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:it.maxSize.value,type:"set",inclusive:!0,exact:!1,message:it.maxSize.message}),ye.dirty());const dt=this._def.valueType;function br(Or){const Sr=new Set;for(const Kr of Or){if(Kr.status==="aborted")return i.INVALID;Kr.status==="dirty"&&ye.dirty(),Sr.add(Kr.value)}return{status:ye.value,value:Sr}}const cr=[...Me.data.values()].map((Or,Sr)=>dt._parse(new s(Me,Or,Me.path,Sr)));return Me.common.async?Promise.all(cr).then(Or=>br(Or)):br(cr)}min(K,ye){return new At({...this._def,minSize:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new At({...this._def,maxSize:{value:K,message:r.errorUtil.toString(ye)}})}size(K,ye){return this.min(K,ye).max(K,ye)}nonempty(K){return this.min(1,K)}}e.ZodSet=At,At.create=(vt,K)=>new At({valueType:vt,minSize:null,maxSize:null,typeName:ie.ZodSet,...u(K)});class kt extends c{constructor(){super(...arguments),this.validate=this.implement}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.function)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.function,received:ye.parsedType}),i.INVALID;function Me(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:Or}})}function it(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:Or}})}const dt={errorMap:ye.common.contextualErrorMap},br=ye.data;return this._def.returns instanceof Mt?(0,i.OK)(async(...cr)=>{const Or=new a.ZodError([]),Sr=await this._def.args.parseAsync(cr,dt).catch(Sn=>{throw Or.addIssue(Me(cr,Sn)),Or}),Kr=await br(...Sr);return await this._def.returns._def.type.parseAsync(Kr,dt).catch(Sn=>{throw Or.addIssue(it(Kr,Sn)),Or})}):(0,i.OK)((...cr)=>{const Or=this._def.args.safeParse(cr,dt);if(!Or.success)throw new a.ZodError([Me(cr,Or.error)]);const Sr=br(...Or.data),Kr=this._def.returns.safeParse(Sr,dt);if(!Kr.success)throw new a.ZodError([it(Sr,Kr.error)]);return Kr.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...K){return new kt({...this._def,args:Rt.create(K).rest(P.create())})}returns(K){return new kt({...this._def,returns:K})}implement(K){return this.parse(K)}strictImplement(K){return this.parse(K)}static create(K,ye,Me){return new kt({args:K||Rt.create([]).rest(P.create()),returns:ye||P.create(),typeName:ie.ZodFunction,...u(Me)})}}e.ZodFunction=kt;class Ct extends c{get schema(){return this._def.getter()}_parse(K){const{ctx:ye}=this._processInputParams(K);return this._def.getter()._parse({data:ye.data,path:ye.path,parent:ye})}}e.ZodLazy=Ct,Ct.create=(vt,K)=>new Ct({getter:vt,typeName:ie.ZodLazy,...u(K)});class Lt extends c{_parse(K){if(K.data!==this._def.value){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:K.data}}get value(){return this._def.value}}e.ZodLiteral=Lt,Lt.create=(vt,K)=>new Lt({value:vt,typeName:ie.ZodLiteral,...u(K)});function Kt(vt,K){return new yr({values:vt,typeName:ie.ZodEnum,...u(K)})}class yr extends c{_parse(K){if(typeof K.data!="string"){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{expected:o.util.joinValues(Me),received:ye.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(K.data)===-1){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_enum_value,options:Me}),i.INVALID}return(0,i.OK)(K.data)}get options(){return this._def.values}get enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Values(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}extract(K){return yr.create(K)}exclude(K){return yr.create(this.options.filter(ye=>!K.includes(ye)))}}e.ZodEnum=yr,yr.create=Kt;class ne extends c{_parse(K){const ye=o.util.getValidEnumValues(this._def.values),Me=this._getOrReturnCtx(K);if(Me.parsedType!==o.ZodParsedType.string&&Me.parsedType!==o.ZodParsedType.number){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{expected:o.util.joinValues(it),received:Me.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(ye.indexOf(K.data)===-1){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{received:Me.data,code:a.ZodIssueCode.invalid_enum_value,options:it}),i.INVALID}return(0,i.OK)(K.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ne,ne.create=(vt,K)=>new ne({values:vt,typeName:ie.ZodNativeEnum,...u(K)});class Mt extends c{unwrap(){return this._def.type}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.promise&&ye.common.async===!1)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.promise,received:ye.parsedType}),i.INVALID;const Me=ye.parsedType===o.ZodParsedType.promise?ye.data:Promise.resolve(ye.data);return(0,i.OK)(Me.then(it=>this._def.type.parseAsync(it,{path:ye.path,errorMap:ye.common.contextualErrorMap})))}}e.ZodPromise=Mt,Mt.create=(vt,K)=>new Mt({type:vt,typeName:ie.ZodPromise,...u(K)});class Nt extends c{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K),it=this._def.effect||null;if(it.type==="preprocess"){const br=it.transform(Me.data);return Me.common.async?Promise.resolve(br).then(cr=>this._def.schema._parseAsync({data:cr,path:Me.path,parent:Me})):this._def.schema._parseSync({data:br,path:Me.path,parent:Me})}const dt={addIssue:br=>{(0,i.addIssueToContext)(Me,br),br.fatal?ye.abort():ye.dirty()},get path(){return Me.path}};if(dt.addIssue=dt.addIssue.bind(dt),it.type==="refinement"){const br=cr=>{const Or=it.refinement(cr,dt);if(Me.common.async)return Promise.resolve(Or);if(Or instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return cr};if(Me.common.async===!1){const cr=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});return cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value),{status:ye.value,value:cr.value})}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(cr=>cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value).then(()=>({status:ye.value,value:cr.value}))))}if(it.type==="transform")if(Me.common.async===!1){const br=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});if(!(0,i.isValid)(br))return br;const cr=it.transform(br.value,dt);if(cr instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:ye.value,value:cr}}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(br=>(0,i.isValid)(br)?Promise.resolve(it.transform(br.value,dt)).then(cr=>({status:ye.value,value:cr})):br);o.util.assertNever(it)}}e.ZodEffects=Nt,e.ZodTransformer=Nt,Nt.create=(vt,K,ye)=>new Nt({schema:vt,typeName:ie.ZodEffects,effect:K,...u(ye)}),Nt.createWithPreprocess=(vt,K,ye)=>new Nt({schema:K,effect:{type:"preprocess",transform:vt},typeName:ie.ZodEffects,...u(ye)});class Ie extends c{_parse(K){return this._getType(K)===o.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodOptional=Ie,Ie.create=(vt,K)=>new Ie({innerType:vt,typeName:ie.ZodOptional,...u(K)});class Ae extends c{_parse(K){return this._getType(K)===o.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodNullable=Ae,Ae.create=(vt,K)=>new Ae({innerType:vt,typeName:ie.ZodNullable,...u(K)});class fe extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);let Me=ye.data;return ye.parsedType===o.ZodParsedType.undefined&&(Me=this._def.defaultValue()),this._def.innerType._parse({data:Me,path:ye.path,parent:ye})}removeDefault(){return this._def.innerType}}e.ZodDefault=fe,fe.create=(vt,K)=>new fe({innerType:vt,typeName:ie.ZodDefault,defaultValue:typeof K.default=="function"?K.default:()=>K.default,...u(K)});class Be extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me={...ye,common:{...ye.common,issues:[]}},it=this._def.innerType._parse({data:Me.data,path:Me.path,parent:{...Me}});return(0,i.isAsync)(it)?it.then(dt=>({status:"valid",value:dt.status==="valid"?dt.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})})):{status:"valid",value:it.status==="valid"?it.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=Be,Be.create=(vt,K)=>new Be({innerType:vt,typeName:ie.ZodCatch,catchValue:typeof K.catch=="function"?K.catch:()=>K.catch,...u(K)});class rt extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.nan){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.nan,received:Me.parsedType}),i.INVALID}return{status:"valid",value:K.data}}}e.ZodNaN=rt,rt.create=vt=>new rt({typeName:ie.ZodNaN,...u(vt)}),e.BRAND=Symbol("zod_brand");class lt extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=ye.data;return this._def.type._parse({data:Me,path:ye.path,parent:ye})}unwrap(){return this._def.type}}e.ZodBranded=lt;class jt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.common.async)return(async()=>{const dt=await this._def.in._parseAsync({data:Me.data,path:Me.path,parent:Me});return dt.status==="aborted"?i.INVALID:dt.status==="dirty"?(ye.dirty(),(0,i.DIRTY)(dt.value)):this._def.out._parseAsync({data:dt.value,path:Me.path,parent:Me})})();{const it=this._def.in._parseSync({data:Me.data,path:Me.path,parent:Me});return it.status==="aborted"?i.INVALID:it.status==="dirty"?(ye.dirty(),{status:"dirty",value:it.value}):this._def.out._parseSync({data:it.value,path:Me.path,parent:Me})}}static create(K,ye){return new jt({in:K,out:ye,typeName:ie.ZodPipeline})}}e.ZodPipeline=jt;const ce=(vt,K={},ye)=>vt?oe.create().superRefine((Me,it)=>{var dt,br;if(!vt(Me)){const cr=typeof K=="function"?K(Me):typeof K=="string"?{message:K}:K,Or=(br=(dt=cr.fatal)!==null&&dt!==void 0?dt:ye)!==null&&br!==void 0?br:!0,Sr=typeof cr=="string"?{message:cr}:cr;it.addIssue({code:"custom",...Sr,fatal:Or})}}):oe.create();e.custom=ce,e.late={object:J.lazycreate};var ie;(function(vt){vt.ZodString="ZodString",vt.ZodNumber="ZodNumber",vt.ZodNaN="ZodNaN",vt.ZodBigInt="ZodBigInt",vt.ZodBoolean="ZodBoolean",vt.ZodDate="ZodDate",vt.ZodSymbol="ZodSymbol",vt.ZodUndefined="ZodUndefined",vt.ZodNull="ZodNull",vt.ZodAny="ZodAny",vt.ZodUnknown="ZodUnknown",vt.ZodNever="ZodNever",vt.ZodVoid="ZodVoid",vt.ZodArray="ZodArray",vt.ZodObject="ZodObject",vt.ZodUnion="ZodUnion",vt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",vt.ZodIntersection="ZodIntersection",vt.ZodTuple="ZodTuple",vt.ZodRecord="ZodRecord",vt.ZodMap="ZodMap",vt.ZodSet="ZodSet",vt.ZodFunction="ZodFunction",vt.ZodLazy="ZodLazy",vt.ZodLiteral="ZodLiteral",vt.ZodEnum="ZodEnum",vt.ZodEffects="ZodEffects",vt.ZodNativeEnum="ZodNativeEnum",vt.ZodOptional="ZodOptional",vt.ZodNullable="ZodNullable",vt.ZodDefault="ZodDefault",vt.ZodCatch="ZodCatch",vt.ZodPromise="ZodPromise",vt.ZodBranded="ZodBranded",vt.ZodPipeline="ZodPipeline"})(ie=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));const de=(vt,K={message:`Input not instance of ${vt.name}`})=>(0,e.custom)(ye=>ye instanceof vt,K);e.instanceof=de;const $=U.create;e.string=$;const C=j.create;e.number=C;const T=rt.create;e.nan=T;const Z=F.create;e.bigint=Z;const ve=H.create;e.boolean=ve;const je=W.create;e.date=je;const ct=G.create;e.symbol=ct;const ur=ae.create;e.undefined=ur;const Dr=V.create;e.null=Dr;const hr=oe.create;e.any=hr;const Rr=P.create;e.unknown=Rr;const Gr=ee.create;e.never=Gr;const Nr=le.create;e.void=Nr;const Kn=pe.create;e.array=Kn;const Tn=J.create;e.object=Tn;const In=J.strictCreate;e.strictObject=In;const yt=ft.create;e.union=yt;const Ei=He.create;e.discriminatedUnion=Ei;const Yn=Bt.create;e.intersection=Yn;const Pi=Rt.create;e.tuple=Pi;const Ji=Jt.create;e.record=Ji;const qo=vr.create;e.map=qo;const eo=At.create;e.set=eo;const Mo=kt.create;e.function=Mo;const Wi=Ct.create;e.lazy=Wi;const pa=Lt.create;e.literal=pa;const ue=yr.create;e.enum=ue;const Re=ne.create;e.nativeEnum=Re;const Ee=Mt.create;e.promise=Ee;const q=Nt.create;e.effect=q,e.transformer=q;const Fe=Ie.create;e.optional=Fe;const Xt=Ae.create;e.nullable=Xt;const ar=Nt.createWithPreprocess;e.preprocess=ar;const Br=jt.create;e.pipeline=Br;const Hr=()=>$().optional();e.ostring=Hr;const An=()=>C().optional();e.onumber=An;const un=()=>ve().optional();e.oboolean=un,e.coerce={string:vt=>U.create({...vt,coerce:!0}),number:vt=>j.create({...vt,coerce:!0}),boolean:vt=>H.create({...vt,coerce:!0}),bigint:vt=>F.create({...vt,coerce:!0}),date:vt=>W.create({...vt,coerce:!0})},e.NEVER=i.INVALID})(yL);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(i,o,a,s){s===void 0&&(s=a),Object.defineProperty(i,s,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,s){s===void 0&&(s=a),i[s]=o[a]}),r=_n&&_n.__exportStar||function(i,o){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,i,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(ku,e),r(ok,e),r(mL,e),r(Ty,e),r(yL,e),r(Eu,e)})(ZS);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(s,l,u,c){c===void 0&&(c=u),Object.defineProperty(s,c,{enumerable:!0,get:function(){return l[u]}})}:function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]}),r=_n&&_n.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),i=_n&&_n.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(l,s,u);return r(l,s),l},o=_n&&_n.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const a=i(ZS);e.z=a,o(ZS,e),e.default=a})(ik);const Ode="ton",Bde="13.5.0",Ude="https://github.com/ton-core/ton.git",Dde="Whales Corp. ",Lde="MIT",Nde="dist/index.js",jde=["dist"],$de={docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},Fde={"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},zde={axios:"^0.25.0",dataloader:"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0",zod:"^3.21.4"},Hde={"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},Wde={access:"public",registry:"https://registry.npmjs.org/"},Vde="yarn@3.4.1",qde={name:Ode,version:Bde,repository:Ude,author:Dde,license:Lde,main:Nde,files:jde,scripts:$de,devDependencies:Fde,dependencies:zde,peerDependencies:Hde,publishConfig:Wde,"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:Vde};var bL=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.HttpApi=void 0;const Kde=$2,DR=bL(Lce),Gde=bL(J6.exports),sn=ik,Yde=qde.version,qh=sn.z.object({"@type":sn.z.literal("ton.blockIdExt"),workchain:sn.z.number(),shard:sn.z.string(),seqno:sn.z.number(),root_hash:sn.z.string(),file_hash:sn.z.string()}),Zde=sn.z.object({balance:sn.z.union([sn.z.number(),sn.z.string()]),state:sn.z.union([sn.z.literal("active"),sn.z.literal("uninitialized"),sn.z.literal("frozen")]),data:sn.z.string(),code:sn.z.string(),last_transaction_id:sn.z.object({"@type":sn.z.literal("internal.transactionId"),lt:sn.z.string(),hash:sn.z.string()}),block_id:qh,sync_utime:sn.z.number()}),Qde=sn.z.object({"@type":sn.z.literal("ok")}),Xde=sn.z.object({"@type":sn.z.literal("query.fees"),source_fees:sn.z.object({"@type":sn.z.literal("fees"),in_fwd_fee:sn.z.number(),storage_fee:sn.z.number(),gas_fee:sn.z.number(),fwd_fee:sn.z.number()})}),Jde=sn.z.object({gas_used:sn.z.number(),exit_code:sn.z.number(),stack:sn.z.array(sn.z.unknown())}),efe=sn.z.union([sn.z.object({"@type":sn.z.literal("msg.dataRaw"),body:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataDecryptedText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataEncryptedText"),text:sn.z.string()})]),LR=sn.z.object({source:sn.z.string(),destination:sn.z.string(),value:sn.z.string(),fwd_fee:sn.z.string(),ihr_fee:sn.z.string(),created_lt:sn.z.string(),body_hash:sn.z.string(),msg_data:efe}),tfe=sn.z.object({data:sn.z.string(),utime:sn.z.number(),transaction_id:sn.z.object({lt:sn.z.string(),hash:sn.z.string()}),fee:sn.z.string(),storage_fee:sn.z.string(),other_fee:sn.z.string(),in_msg:sn.z.union([sn.z.undefined(),LR]),out_msgs:sn.z.array(LR)}),NR=sn.z.array(tfe),rfe=sn.z.object({state_root_hash:sn.z.string(),last:qh,init:qh}),nfe=sn.z.object({shards:sn.z.array(qh)}),ife=sn.z.object({"@type":sn.z.literal("blocks.shortTxId"),mode:sn.z.number(),account:sn.z.string(),lt:sn.z.string(),hash:sn.z.string()}),jR=sn.z.object({id:qh,req_count:sn.z.number(),incomplete:sn.z.boolean(),transactions:sn.z.array(ife)});class $R{constructor(t,r,i,o){this.namespace=t,this.cache=r,this.codec=i,this.keyEncoder=o}async get(t){let r=await this.cache.get(this.namespace,this.keyEncoder(t));if(r){let i=this.codec.safeParse(JSON.parse(r));if(i.success)return i.data}return null}async set(t,r){r!==null?await this.cache.set(this.namespace,this.keyEncoder(t),JSON.stringify(r)):await this.cache.set(this.namespace,this.keyEncoder(t),null)}}class ofe{constructor(t,r){this.endpoint=t,this.cache=new Kde.InMemoryCache,this.parameters={timeout:r?.timeout||3e4,apiKey:r?.apiKey},this.shardCache=new $R("ton-shard",this.cache,sn.z.array(qh),i=>i+""),this.shardLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardCache.get(o);if(a)return a;let s=(await this.doCall("shards",{seqno:o},nfe)).shards;return await this.shardCache.set(o,s),s}))),this.shardTransactionsCache=new $R("ton-shard-tx",this.cache,jR,i=>i.workchain+":"+i.shard+":"+i.seqno),this.shardTransactionsLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardTransactionsCache.get(o);if(a)return a;let s=await this.doCall("getBlockTransactions",{workchain:o.workchain,seqno:o.seqno,shard:o.shard},jR);return await this.shardTransactionsCache.set(o,s),s})),{cacheKeyFn:i=>i.workchain+":"+i.shard+":"+i.seqno})}getAddressInformation(t){return this.doCall("getAddressInformation",{address:t.toString()},Zde)}async getTransactions(t,r){const i=r.inclusive;delete r.inclusive;let o;r.hash&&(o=Buffer.from(r.hash,"base64").toString("hex"));let a=r.limit;r.hash&&r.lt&&i!==!0&&a++;let s=await this.doCall("getTransactions",{address:t.toString(),...r,limit:a,hash:o},NR);return s.length>a&&(s=s.slice(0,a)),r.hash&&r.lt&&i!==!0&&s.shift(),s}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},rfe)}async getShards(t){return await this.shardLoader.load(t)}async getBlockTransactions(t,r,i){return await this.shardTransactionsLoader.load({workchain:t,seqno:r,shard:i})}async getTransaction(t,r,i){let o=Buffer.from(i,"base64").toString("hex"),s=(await this.doCall("getTransactions",{address:t.toString(),lt:r,hash:o,limit:1},NR)).find(l=>l.transaction_id.lt===r&&l.transaction_id.hash===i);return s||null}async callGetMethod(t,r,i){return await this.doCall("runGetMethod",{address:t.toString(),method:r,stack:afe(i)},Jde)}async sendBoc(t){await this.doCall("sendBoc",{boc:t.toString("base64")},Qde)}async estimateFee(t,r){return await this.doCall("estimateFee",{address:t.toString(),body:r.body.toBoc().toString("base64"),init_data:r.initData?r.initData.toBoc().toString("base64"):"",init_code:r.initCode?r.initCode.toBoc().toString("base64"):"",ignore_chksig:r.ignoreSignature},Xde)}async doCall(t,r,i){let o={"Content-Type":"application/json","X-Ton-Client-Version":Yde};this.parameters.apiKey&&(o["X-API-Key"]=this.parameters.apiKey);let a=await Gde.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:t,params:r}),{headers:o,timeout:this.parameters.timeout});if(a.status!==200||!a.data.ok)throw Error("Received error: "+JSON.stringify(a.data));let s=i.safeParse(a.data.result);if(s.success)return s.data;throw Error("Malformed response: "+s.error.format()._errors.join(", "))}}Ey.HttpApi=ofe;function afe(e){let t=[];for(let r of e)if(r.type==="int")t.push(["num",r.value.toString()]);else if(r.type==="cell")t.push(["tvm.Cell",r.cell.toBoc().toString("base64")]);else if(r.type==="slice")t.push(["tvm.Slice",r.cell.toBoc().toString("base64")]);else if(r.type==="builder")t.push(["tvm.Builder",r.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+r.type);return t}var q2={},sfe=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},Ul=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},vs;Object.defineProperty(q2,"__esModule",{value:!0});q2.TonClient=void 0;const lfe=Ey,va=fo;class ufe{constructor(t){vs.set(this,void 0),this.parameters={endpoint:t.endpoint},sfe(this,vs,new lfe.HttpApi(this.parameters.endpoint,{timeout:t.timeout,apiKey:t.apiKey,adapter:t.httpAdapter}),"f")}async getBalance(t){return(await this.getContractState(t)).balance}async runMethod(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);if(o.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+o.exit_code);return{gas_used:o.gas_used,stack:FR(o.stack)}}async callGetMethod(t,r,i=[]){return this.runMethod(t,r,i)}async runMethodWithError(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);return{gas_used:o.gas_used,stack:FR(o.stack),exit_code:o.exit_code}}async callGetMethodWithError(t,r,i=[]){return this.runMethodWithError(t,r,i)}async getTransactions(t,r){let i=await Ul(this,vs,"f").getTransactions(t,r),o=[];for(let a of i)o.push((0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(a.data,"base64"))[0].beginParse()));return o}async getTransaction(t,r,i){let o=await Ul(this,vs,"f").getTransaction(t,r,i);return o?(0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(o.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let t=await Ul(this,vs,"f").getMasterchainInfo();return{workchain:t.init.workchain,shard:t.last.shard,initSeqno:t.init.seqno,latestSeqno:t.last.seqno}}async getWorkchainShards(t){return(await Ul(this,vs,"f").getShards(t)).map(i=>({workchain:i.workchain,shard:i.shard,seqno:i.seqno}))}async getShardTransactions(t,r,i){let o=await Ul(this,vs,"f").getBlockTransactions(t,r,i);if(o.incomplete)throw Error("Unsupported");return o.transactions.map(a=>({account:va.Address.parseRaw(a.account),lt:a.lt,hash:a.hash}))}async sendMessage(t){const r=(0,va.beginCell)().store((0,va.storeMessage)(t)).endCell().toBoc();await Ul(this,vs,"f").sendBoc(r)}async sendFile(t){await Ul(this,vs,"f").sendBoc(t)}async estimateExternalMessageFee(t,r){return await Ul(this,vs,"f").estimateFee(t,{body:r.body,initCode:r.initCode,initData:r.initData,ignoreSignature:r.ignoreSignature})}async sendExternalMessage(t,r){if(await this.isContractDeployed(t.address)||!t.init){const i=(0,va.external)({to:t.address,body:r});await this.sendMessage(i)}else{const i=(0,va.external)({to:t.address,init:{code:t.init.code,data:t.init.data},body:r});await this.sendMessage(i)}}async isContractDeployed(t){return(await this.getContractState(t)).state==="active"}async getContractState(t){let r=await Ul(this,vs,"f").getAddressInformation(t),i=BigInt(r.balance),o=r.state;return{balance:i,state:o,code:r.code!==""?Buffer.from(r.code,"base64"):null,data:r.data!==""?Buffer.from(r.data,"base64"):null,lastTransaction:r.last_transaction_id.lt!=="0"?{lt:r.last_transaction_id.lt,hash:r.last_transaction_id.hash}:null,blockId:{workchain:r.block_id.workchain,shard:r.block_id.shard,seqno:r.block_id.seqno},timestampt:r.sync_utime}}open(t){return(0,va.openContract)(t,r=>zR(this,r.address,r.init))}provider(t,r){return zR(this,t,r)}}q2.TonClient=ufe;vs=new WeakMap;function FR(e){let t=[];for(let r of e)if(r[0]==="num"){let i=r[1];i.startsWith("-")?t.push({type:"int",value:-BigInt(i.slice(1))}):t.push({type:"int",value:BigInt(i)})}else if(r[0]==="null")t.push({type:"null"});else if(r[0]==="cell")t.push({type:"cell",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="slice")t.push({type:"slice",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="builder")t.push({type:"builder",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+r[0]);return new va.TupleReader(t)}function zR(e,t,r){return{async getState(){let i=await e.getContractState(t),o=i.balance,a=i.lastTransaction?{lt:BigInt(i.lastTransaction.lt),hash:Buffer.from(i.lastTransaction.hash,"base64")}:null,s;if(i.state==="active")s={type:"active",code:i.code?i.code:null,data:i.data?i.data:null};else if(i.state==="uninitialized")s={type:"uninit"};else if(i.state==="frozen")s={type:"frozen",stateHash:Buffer.alloc(0)};else throw Error("Unsupported state");return{balance:o,last:a,state:s}},async get(i,o){return{stack:(await e.callGetMethod(t,i,o)).stack}},async external(i){let o=null;r&&!await e.isContractDeployed(t)&&(o=r);const a=(0,va.external)({to:t,init:o?{code:o.code,data:o.data}:null,body:i});let s=(0,va.beginCell)().store((0,va.storeMessage)(a)).endCell().toBoc();await e.sendFile(s)},async internal(i,o){let a=null;r&&!await e.isContractDeployed(t)&&(a=r);let s=!0;o.bounce!==null&&o.bounce!==void 0&&(s=o.bounce);let l;typeof o.value=="string"?l=(0,va.toNano)(o.value):l=o.value;let u=null;typeof o.body=="string"?u=(0,va.comment)(o.body):o.body&&(u=o.body),await i.send({to:t,value:l,bounce:s,sendMode:o.sendMode,init:a,body:u})}}}var K2={},G2={};Object.defineProperty(G2,"__esModule",{value:!0});G2.toUrlSafe=void 0;function cfe(e){for(;e.indexOf("/")>=0;)e=e.replace("/","_");for(;e.indexOf("+")>=0;)e=e.replace("+","-");for(;e.indexOf("=")>=0;)e=e.replace("=","");return e}G2.toUrlSafe=cfe;var S5=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},uo=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},dfe=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$s,Fs,zs;Object.defineProperty(K2,"__esModule",{value:!0});K2.TonClient4=void 0;const su=dfe(J6.exports),ws=fo,HR=G2,Ir=ik;class ffe{constructor(t){$s.set(this,void 0),Fs.set(this,void 0),zs.set(this,void 0),S5(this,$s,t.endpoint,"f"),S5(this,Fs,t.timeout||5e3,"f"),S5(this,zs,t.httpAdapter,"f")}async getLastBlock(){let t=await su.default.get(uo(this,$s,"f")+"/block/latest",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),r=pfe.safeParse(t.data);if(!r.success)throw Error("Mailformed response: "+r.error.format()._errors.join(", "));return r.data}async getBlock(t){let r=await su.default.get(uo(this,$s,"f")+"/block/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getBlockByUtime(t){let r=await su.default.get(uo(this,$s,"f")+"/block/utime/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getAccount(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0}),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=hfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async getAccountLite(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/lite",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=gfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async isContractDeployed(t,r){return(await this.getAccountLite(t,r)).account.state.type==="active"}async isAccountChanged(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/changed/"+i.toString(10),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=mfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async getAccountTransactions(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/account/"+t.toString({urlSafe:!0})+"/tx/"+r.toString(10)+"/"+(0,HR.toUrlSafe)(i.toString("base64")),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=wfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");let s=a.data,l=[],u=ws.Cell.fromBoc(Buffer.from(s.boc,"base64"));for(let c=0;c0&&(i="/"+[...r].sort().join(","));let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/config"+i,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=vfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async runMethod(t,r,i,o){let a=o&&o.length>0?"/"+(0,HR.toUrlSafe)((0,ws.serializeTuple)(o).toBoc({idx:!1,crc32:!1}).toString("base64")):"",s=uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/run/"+i+a,l=await su.default.get(s,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),u=yfe.safeParse(l.data);if(!u.success)throw Error("Mailformed response");let c=u.data.resultRaw?(0,ws.parseTuple)(ws.Cell.fromBoc(Buffer.from(u.data.resultRaw,"base64"))[0]):[];return{exitCode:u.data.exitCode,result:c,resultRaw:u.data.resultRaw,block:u.data.block,shardBlock:u.data.shardBlock,reader:new ws.TupleReader(c)}}async sendMessage(t){let r=await su.default.post(uo(this,$s,"f")+"/send",{boc:t.toString("base64")},{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")});if(!bfe.safeParse(r.data).success)throw Error("Mailformed response");return{status:r.data.status}}open(t){return(0,ws.openContract)(t,r=>Rv(this,null,r.address,r.init))}openAt(t,r){return(0,ws.openContract)(r,i=>Rv(this,t,i.address,i.init))}provider(t,r){return Rv(this,null,t,r||null)}providerAt(t,r,i){return Rv(this,t,r,i||null)}}K2.TonClient4=ffe;$s=new WeakMap,Fs=new WeakMap,zs=new WeakMap;function Rv(e,t,r,i){return{async getState(){let o=t;o===null&&(o=(await e.getLastBlock()).last.seqno);let a=await e.getAccount(o,r),s=a.account.last?{lt:BigInt(a.account.last.lt),hash:Buffer.from(a.account.last.hash,"base64")}:null,l;if(a.account.state.type==="active")l={type:"active",code:a.account.state.code?Buffer.from(a.account.state.code,"base64"):null,data:a.account.state.data?Buffer.from(a.account.state.data,"base64"):null};else if(a.account.state.type==="uninit")l={type:"uninit"};else if(a.account.state.type==="frozen")l={type:"frozen",stateHash:Buffer.from(a.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(a.account.balance.coins),last:s,state:l}},async get(o,a){let s=t;s===null&&(s=(await e.getLastBlock()).last.seqno);let l=await e.runMethod(s,r,o,a);if(l.exitCode!==0&&l.exitCode!==1)throw Error("Exit code: "+l.exitCode);return{stack:new ws.TupleReader(l.result)}},async external(o){let a=await e.getLastBlock(),s=null;i&&(await e.getAccountLite(a.last.seqno,r)).account.state.type!=="active"&&(s=i);const l=(0,ws.external)({to:r,init:s?{code:s.code,data:s.data}:null,body:o});let u=(0,ws.beginCell)().store((0,ws.storeMessage)(l)).endCell().toBoc();await e.sendMessage(u)},async internal(o,a){let s=await e.getLastBlock(),l=null;i&&(await e.getAccountLite(s.last.seqno,r)).account.state.type!=="active"&&(l=i);let u=!0;a.bounce!==null&&a.bounce!==void 0&&(u=a.bounce);let c;typeof a.value=="string"?c=(0,ws.toNano)(a.value):c=a.value;let d=null;typeof a.body=="string"?d=(0,ws.comment)(a.body):a.body&&(d=a.body),await o.send({to:r,value:c,bounce:u,sendMode:a.sendMode,init:l,body:d})}}}const pfe=Ir.z.object({last:Ir.z.object({seqno:Ir.z.number(),shard:Ir.z.string(),workchain:Ir.z.number(),fileHash:Ir.z.string(),rootHash:Ir.z.string()}),init:Ir.z.object({fileHash:Ir.z.string(),rootHash:Ir.z.string()}),stateRootHash:Ir.z.string(),now:Ir.z.number()}),WR=Ir.z.union([Ir.z.object({exist:Ir.z.literal(!1)}),Ir.z.object({exist:Ir.z.literal(!0),block:Ir.z.object({shards:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string(),transactions:Ir.z.array(Ir.z.object({account:Ir.z.string(),hash:Ir.z.string(),lt:Ir.z.string()}))}))})})]),wL=Ir.z.object({lastPaid:Ir.z.number(),duePayment:Ir.z.union([Ir.z.null(),Ir.z.string()]),used:Ir.z.object({bits:Ir.z.number(),cells:Ir.z.number(),publicCells:Ir.z.number()})}),hfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),code:Ir.z.union([Ir.z.string(),Ir.z.null()]),data:Ir.z.union([Ir.z.string(),Ir.z.null()])}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])}),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),gfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),codeHash:Ir.z.string(),dataHash:Ir.z.string()}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])})}),mfe=Ir.z.object({changed:Ir.z.boolean(),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),yfe=Ir.z.object({exitCode:Ir.z.number(),resultRaw:Ir.z.union([Ir.z.string(),Ir.z.null()]),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()}),shardBlock:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),vfe=Ir.z.object({config:Ir.z.object({cell:Ir.z.string(),address:Ir.z.string(),globalBalance:Ir.z.object({coins:Ir.z.string()})})}),bfe=Ir.z.object({status:Ir.z.number()}),wfe=Ir.z.object({blocks:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})),boc:Ir.z.string()});var Y2={},Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.createWalletTransferV4=Fa.createWalletTransferV3=Fa.createWalletTransferV2=Fa.createWalletTransferV1=void 0;const ns=fo,Z2=xg();function xfe(e){let t=(0,ns.beginCell)().storeUint(e.seqno,32);e.message&&(t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(e.message))));let r=(0,Z2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV1=xfe;function _fe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.seqno,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Z2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV2=_fe;function Sfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Z2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV3=Sfe;function Cfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32),t.storeUint(0,8);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Z2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV4=Cfe;Object.defineProperty(Y2,"__esModule",{value:!0});Y2.WalletContractV1R1=void 0;const Lp=fo,kfe=Fa;class ak{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Lp.Cell.fromBoc(Buffer.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],o=(0,Lp.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,Lp.contractAddress)(t,{code:i,data:o})}static create(t){return new ak(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){let r=await t.getState();return r.state.type==="active"?Lp.Cell.fromBoc(r.state.data)[0].beginParse().loadUint(32):0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Lp.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,kfe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,Lp.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Y2.WalletContractV1R1=ak;var Q2={};Object.defineProperty(Q2,"__esModule",{value:!0});Q2.WalletContractV1R2=void 0;const dm=fo,Efe=Fa;class sk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=dm.Cell.fromBoc(Buffer.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],o=(0,dm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,dm.contractAddress)(t,{code:i,data:o})}static create(t){return new sk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=dm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Efe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,dm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Q2.WalletContractV1R2=sk;var X2={};Object.defineProperty(X2,"__esModule",{value:!0});X2.WalletContractV1R3=void 0;const fm=fo,Afe=Fa;class lk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=fm.Cell.fromBoc(Buffer.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],o=(0,fm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,fm.contractAddress)(t,{code:i,data:o})}static create(t){return new lk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=fm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Afe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,fm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}X2.WalletContractV1R3=lk;var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.WalletContractV2R1=void 0;const pm=fo,Tfe=Fa;class uk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=pm.Cell.fromBoc(Buffer.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],o=(0,pm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,pm.contractAddress)(t,{code:i,data:o})}static create(t){return new uk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=pm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Tfe.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,pm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}J2.WalletContractV2R1=uk;var ex={};Object.defineProperty(ex,"__esModule",{value:!0});ex.WalletContractV2R2=void 0;const hm=fo,Ife=Fa;class ck{constructor(t,r){this.workchain=t,this.publicKey=r;let i=hm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],o=(0,hm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,hm.contractAddress)(t,{code:i,data:o})}static create(t){return new ck(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=hm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Ife.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,hm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}ex.WalletContractV2R2=ck;var tx={};Object.defineProperty(tx,"__esModule",{value:!0});tx.WalletContractV3R1=void 0;const gm=fo,Rfe=Fa;class dk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=gm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],a=(0,gm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,gm.contractAddress)(t,{code:o,data:a})}static create(t){return new dk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=gm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Rfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,gm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}tx.WalletContractV3R1=dk;var rx={};Object.defineProperty(rx,"__esModule",{value:!0});rx.WalletContractV3R2=void 0;const mm=fo,Pfe=Fa;class fk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=mm.Cell.fromBoc(Buffer.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],a=(0,mm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,mm.contractAddress)(t,{code:o,data:a})}static create(t){return new fk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=mm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Pfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,mm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}rx.WalletContractV3R2=fk;var nx={};Object.defineProperty(nx,"__esModule",{value:!0});nx.WalletContractV4=void 0;const ym=fo,Mfe=Fa;class pk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=ym.Cell.fromBoc(Buffer.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],a=(0,ym.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:o,data:a},this.address=(0,ym.contractAddress)(t,{code:o,data:a})}static create(t){return new pk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=ym.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Mfe.createWalletTransferV4)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,ym.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}nx.WalletContractV4=pk;var ix={};Object.defineProperty(ix,"__esModule",{value:!0});ix.JettonMaster=void 0;const Ofe=fo;class hk{constructor(t){this.address=t}static create(t){return new hk(t)}async getWalletAddress(t,r){return(await t.get("get_wallet_address",[{type:"slice",cell:(0,Ofe.beginCell)().storeAddress(r).endCell()}])).stack.readAddress()}async getJettonData(t){let r=await t.get("get_jetton_data",[]),i=r.stack.readBigNumber(),o=r.stack.readBoolean(),a=r.stack.readAddress(),s=r.stack.readCell(),l=r.stack.readCell();return{totalSupply:i,mintable:o,adminAddress:a,content:s,walletCode:l}}}ix.JettonMaster=hk;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});ox.JettonWallet=void 0;class gk{constructor(t){this.address=t}static create(t){return new gk(t)}async getBalance(t){return(await t.getState()).state.type!=="active"?0n:(await t.get("get_wallet_data",[])).stack.readBigNumber()}}ox.JettonWallet=gk;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.MultisigOrder=void 0;const VR=xg(),Pv=fo;class lb{constructor(t){this.signatures={},this.payload=t}static fromCell(t){let r=t.beginParse(),i=r.loadMaybeRef()?.beginParse();const o=r.asCell();let a=new lb(o);if(i){for(;i.remainingBits>0;){const s=i.loadBuffer(64),l=i.loadUint(8);a.signatures[l]=s,i.remainingRefs>0?i=i.loadRef().asSlice():i.skip(1)}i.endParse()}return a}static fromPayload(t){return new lb(t)}addSignature(t,r,i){const o=this.payload.hash();if(!(0,VR.signVerify)(o,r,i.owners.get(t).slice(0,-1)))throw Error("invalid signature");this.signatures[t]=r}sign(t,r){const i=this.payload.hash();return this.signatures[t]=(0,VR.sign)(i,r),i}unionSignatures(t){this.signatures=Object.assign({},this.signatures,t.signatures)}clearSignatures(){this.signatures={}}toCell(t){let r=(0,Pv.beginCell)().storeBit(0);for(const i in this.signatures){const o=this.signatures[i];r=(0,Pv.beginCell)().storeBit(1).storeRef((0,Pv.beginCell)().storeBuffer(o).storeUint(parseInt(i),8).storeBuilder(r).endCell())}return(0,Pv.beginCell)().storeUint(t,8).storeBuilder(r).storeBuilder(this.payload.asBuilder()).endCell()}}Iy.MultisigOrder=lb;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.MultisigOrderBuilder=void 0;const vm=fo,Bfe=Iy;class Ufe{constructor(t,r){this.messages=(0,vm.beginCell)(),this.queryId=0n,this.walletId=t,this.queryOffset=r||7200}addMessage(t,r){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(r,8),this.messages.storeRef((0,vm.beginCell)().store((0,vm.storeMessageRelaxed)(t)).endCell())}clearMessages(){this.messages=(0,vm.beginCell)()}build(){return Bfe.MultisigOrder.fromPayload((0,vm.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){const t=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=t<<32n}}ax.MultisigOrderBuilder=Ufe;var sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.MultisigWallet=void 0;const qR=xg(),sl=fo,Dfe=sl.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ==");class mk{constructor(t,r,i,o,a){this.provider=null,this.owners=sl.Dictionary.empty(),this.workchain=r,this.walletId=i,this.k=o;for(let s=0;s{t&&i&&o!==t&&e(`/${o}`,{replace:!0})},[t]),{contractAddress:o,contractAddressHex:a,isAddressEmpty:!t}}function xL(e){let t=!0;try{Vn.Address.parse(e??"")}catch{t=!1}return t}function KR(e,t){for(var r=0;r=0)&&(r[o]=e[o]);return r}function GR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _L=Gn.createContext(),jfe={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},Yu={view:{default:20,dense:4},snackbar:{default:6,dense:2}},bf={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:w7,transitionDuration:{enter:225,exit:195}},n0=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},$fe=function(t){return""+n0(t.vertical)+n0(t.horizontal)},Ffe=function(t){return Object.keys(t).filter(function(r){return!jfe.container[r]}).reduce(function(r,i){var o;return Uo({},r,(o={},o[i]=t[i],o))},{})},Zc={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},h1={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var r=t.vertical,i=t.horizontal;return"anchorOrigin"+n0(r)+n0(i)},toVariant:function(t){return"variant"+n0(t)}},Mv=function(t){return!!t||t===0},YR=function(t){return typeof t=="number"||t===null},zfe=function(t,r,i){return function(o){return o==="autoHideDuration"?YR(t.autoHideDuration)?t.autoHideDuration:YR(r.autoHideDuration)?r.autoHideDuration:bf.autoHideDuration:t[o]||r[o]||i[o]}};function C5(e,t,r){return e===void 0&&(e={}),t===void 0&&(t={}),r===void 0&&(r={}),Uo({},r,{},t,{},e)}var Hfe="SnackbarContent",SL={root:Hfe+"-root"},Wfe=sr("div")(function(e){var t,r,i=e.theme;return r={},r["&."+SL.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[i.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),r}),Vfe=X.exports.forwardRef(function(e,t){var r=e.className,i=xd(e,["className"]);return L(Wfe,{...Object.assign({ref:t,className:pn(SL.root,r)},i)})}),ZR={right:"left",left:"right",bottom:"up",top:"down"},qfe=function(t){return t.horizontal!=="center"?ZR[t.horizontal]:ZR[t.vertical]},Kfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})},Gfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})},Yfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})},Zfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})},Ov={fontSize:20,marginInlineEnd:8},Qfe={default:void 0,success:L(Kfe,{style:Ov}),warning:L(Gfe,{style:Ov}),error:L(Yfe,{style:Ov}),info:L(Zfe,{style:Ov})};function i0(e,t){return e.reduce(function(r,i){return i==null?r:function(){for(var a=arguments.length,s=new Array(a),l=0;l .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},E5=16,rf="SnackbarContainer",Nl={root:rf+"-root",rootDense:rf+"-rootDense",top:rf+"-top",bottom:rf+"-bottom",left:rf+"-left",right:rf+"-right",center:rf+"-center"},rpe=sr("div")(function(e){var t,r,i,o,a,s,l=e.theme;return s={},s["&."+Nl.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:l.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[k5.container]={pointerEvents:"all"},t[k5.wrapper]={padding:Yu.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+Yu.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+E5*2+"px)"},t),s["&."+Nl.rootDense]=(r={},r[k5.wrapper]={padding:Yu.snackbar.dense+"px 0px"},r),s["&."+Nl.top]={top:Yu.view.default-Yu.snackbar.default,flexDirection:"column"},s["&."+Nl.bottom]={bottom:Yu.view.default-Yu.snackbar.default,flexDirection:"column-reverse"},s["&."+Nl.left]=(i={left:Yu.view.default},i[l.breakpoints.up("sm")]={alignItems:"flex-start"},i[l.breakpoints.down("sm")]={left:E5+"px"},i),s["&."+Nl.right]=(o={right:Yu.view.default},o[l.breakpoints.up("sm")]={alignItems:"flex-end"},o[l.breakpoints.down("sm")]={right:E5+"px"},o),s["&."+Nl.center]=(a={left:"50%",transform:"translateX(-50%)"},a[l.breakpoints.up("sm")]={alignItems:"center"},a),s}),npe=function(t){var r=t.className,i=t.anchorOrigin,o=t.dense,a=xd(t,["className","anchorOrigin","dense"]),s=pn(Nl[i.vertical],Nl[i.horizontal],Nl.root,r,o&&Nl.rootDense);return L(rpe,{...Object.assign({className:s},a)})},ipe=Gn.memo(npe),ope=function(e){Nfe(t,e);function t(i){var o;return o=e.call(this,i)||this,o.enqueueSnackbar=function(a,s){s===void 0&&(s={});var l=s,u=l.key,c=l.preventDuplicate,d=xd(l,["key","preventDuplicate"]),p=Mv(u),v=p?u:new Date().getTime()+Math.random(),x=zfe(d,o.props,bf),b=Uo({key:v},d,{message:a,open:!0,entered:!1,requestClose:!1,variant:x("variant"),anchorOrigin:x("anchorOrigin"),autoHideDuration:x("autoHideDuration")});return d.persist&&(b.autoHideDuration=void 0),o.setState(function(y){if(c===void 0&&o.props.preventDuplicate||c){var _=function(U){return p?U.key===u:U.message===a},k=y.queue.findIndex(_)>-1,E=y.snacks.findIndex(_)>-1;if(k||E)return y}return o.handleDisplaySnack(Uo({},y,{queue:[].concat(y.queue,[b])}))}),v},o.handleDisplaySnack=function(a){var s=a.snacks;return s.length>=o.maxSnack?o.handleDismissOldest(a):o.processQueue(a)},o.processQueue=function(a){var s=a.queue,l=a.snacks;return s.length>0?Uo({},a,{snacks:[].concat(l,[s[0]]),queue:s.slice(1,s.length)}):a},o.handleDismissOldest=function(a){if(a.snacks.some(function(d){return!d.open||d.requestClose}))return a;var s=!1,l=!1,u=a.snacks.reduce(function(d,p){return d+(p.open&&p.persist?1:0)},0);u===o.maxSnack&&(l=!0);var c=a.snacks.map(function(d){return!s&&(!d.persist||l)?(s=!0,d.entered?(d.onClose&&d.onClose(null,Zc.MAXSNACK,d.key),o.props.onClose&&o.props.onClose(null,Zc.MAXSNACK,d.key),Uo({},d,{open:!1})):Uo({},d,{requestClose:!0})):Uo({},d)});return Uo({},a,{snacks:c})},o.handleEnteredSnack=function(a,s,l){if(!Mv(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");o.setState(function(u){var c=u.snacks;return{snacks:c.map(function(d){return d.key===l?Uo({},d,{entered:!0}):Uo({},d)})}})},o.handleCloseSnack=function(a,s,l){if(o.props.onClose&&o.props.onClose(a,s,l),s!==Zc.CLICKAWAY){var u=l===void 0;o.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(v){return!u&&v.key!==l?Uo({},v):v.entered?Uo({},v,{open:!1}):Uo({},v,{requestClose:!0})}),queue:p.filter(function(v){return v.key!==l})}})}},o.closeSnackbar=function(a){var s=o.state.snacks.find(function(l){return l.key===a});Mv(a)&&s&&s.onClose&&s.onClose(null,Zc.INSTRUCTED,a),o.handleCloseSnack(null,Zc.INSTRUCTED,a)},o.handleExitedSnack=function(a,s,l){var u=s||l;if(!Mv(u))throw new Error("handleExitedSnack Cannot be called with undefined key");o.setState(function(c){var d=o.processQueue(Uo({},c,{snacks:c.snacks.filter(function(p){return p.key!==u})}));return d.queue.length===0?d:o.handleDismissOldest(d)})},o.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:o.enqueueSnackbar.bind(GR(o)),closeSnackbar:o.closeSnackbar.bind(GR(o))}},o}var r=t.prototype;return r.render=function(){var o=this,a=this.state.contextValue,s=this.props,l=s.iconVariant,u=s.dense,c=u===void 0?bf.dense:u,d=s.hideIconVariant,p=d===void 0?bf.hideIconVariant:d,v=s.domRoot,x=s.children,b=s.classes,y=b===void 0?{}:b,_=xd(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),k=this.state.snacks.reduce(function(O,U){var D,j=$fe(U.anchorOrigin),F=O[j]||[];return Uo({},O,(D={},D[j]=[].concat(F,[U]),D))},{}),E=Object.keys(k).map(function(O){var U=k[O];return L(ipe,{dense:c,anchorOrigin:U[0].anchorOrigin,className:pn(y.containerRoot,y[h1.toContainerAnchorOrigin(O)]),children:U.map(function(D){return L(tpe,{...Object.assign({},_,{key:D.key,snack:D,dense:c,iconVariant:l,hideIconVariant:p,classes:Ffe(y),onClose:o.handleCloseSnack,onExited:i0([o.handleExitedSnack,o.props.onExited]),onEntered:i0([o.handleEnteredSnack,o.props.onEntered])})})})},O)});return Ut(_L.Provider,{value:a,children:[x,v?ml.exports.createPortal(E,v):E]})},Lfe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||bf.maxSnack}}]),t}(X.exports.Component),ape=function(){return X.exports.useContext(_L)},yk={},lx={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(lx);var A5={};const spe=Gb(vJ);var XR;function vk(){return XR||(XR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=spe}(A5)),A5}const bk=Gb(Iq);var lpe=lx.exports;Object.defineProperty(yk,"__esModule",{value:!0});var CL=yk.default=void 0,upe=lpe(vk()),cpe=bk,dpe=(0,upe.default)((0,cpe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");CL=yk.default=dpe;const fpe=sr(da)({"& &":{color:"white"},"& a":{color:"white"}});function Ry(){const{enqueueSnackbar:e,closeSnackbar:t}=ape();return{showNotification:X.exports.useCallback((i,o,a,s)=>{const l=e(L(fpe,{children:i}),{variant:o,autoHideDuration:s||5e3,onClose:a,onClick:()=>t(l),action:()=>L(Bs,{children:L(CL,{sx:{color:"#fff",stroke:"#fff",width:20,height:20}})})})},[t,e])}}const JR=e=>{let t;const r=new Set,i=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=c??typeof d!="object"?d:Object.assign({},t,d),r.forEach(v=>v(t,p))}},o=()=>t,l={setState:i,getState:o,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return t=e(i,o,l),l},ppe=e=>e?JR(e):JR;var kL={exports:{}},EL={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ux=X.exports,hpe=VC.exports;function gpe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mpe=typeof Object.is=="function"?Object.is:gpe,ype=hpe.useSyncExternalStore,vpe=ux.useRef,bpe=ux.useEffect,wpe=ux.useMemo,xpe=ux.useDebugValue;EL.useSyncExternalStoreWithSelector=function(e,t,r,i,o){var a=vpe(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=wpe(function(){function u(x){if(!c){if(c=!0,d=x,x=i(x),o!==void 0&&s.hasValue){var b=s.value;if(o(b,x))return p=b}return p=x}if(b=p,mpe(d,x))return b;var y=i(x);return o!==void 0&&o(b,y)?b:(d=x,p=y)}var c=!1,d,p,v=r===void 0?null:r;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,r,i,o]);var l=ype(e,a[0],a[1]);return bpe(function(){s.hasValue=!0,s.value=l},[l]),xpe(l),l};(function(e){e.exports=EL})(kL);const _pe=Kb(kL.exports),{useSyncExternalStoreWithSelector:Spe}=_pe;function Cpe(e,t=e.getState,r){const i=Spe(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return X.exports.useDebugValue(i),i}const eP=e=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof e!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const t=typeof e=="function"?ppe(e):e,r=(i,o)=>Cpe(t,i,o);return Object.assign(r,t),r},_g=e=>e?eP(e):eP;var Py=e=>(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] default export is deprecated, instead import { create } from'zustand'"),_g(e));const kpe=Py(e=>({value:"",active:!1,setValue:t=>e({value:t}),setActive:t=>e({active:t})}));function wk(){const{showNotification:e}=Ry(),t=Ac(),{value:r,setValue:i,active:o,setActive:a}=kpe(u=>u),s=X.exports.useCallback(()=>{i("")},[]);return{onSubmit:()=>{if(!xL(r)){e("Invalid address","error");return}i(""),a(!1),t(`/${r}`)},onClear:s,setActive:a,setValue:i,active:o,value:r}}function Epe(e){let t;try{t=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l),s=(o=t.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>t.setItem(i,JSON.stringify(o)),removeItem:i=>t.removeItem(i)}}const $0=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return $0(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return $0(i)(r)}}}},Ape=(e,t)=>(r,i,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,k)=>({...k,..._}),...t},s=!1;const l=new Set,u=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(..._)},i,o);const d=$0(a.serialize),p=()=>{const _=a.partialize({...i()});let k;const E=d({state:_,version:a.version}).then(O=>c.setItem(a.name,O)).catch(O=>{k=O});if(k)throw k;return E},v=o.setState;o.setState=(_,k)=>{v(_,k),p()};const x=e((..._)=>{r(..._),p()},i,o);let b;const y=()=>{var _;if(!c)return;s=!1,l.forEach(E=>E(i()));const k=((_=a.onRehydrateStorage)==null?void 0:_.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(E=>{if(E)return a.deserialize(E)}).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==a.version){if(a.migrate)return a.migrate(E.state,E.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return E.state}).then(E=>{var O;return b=a.merge(E,(O=i())!=null?O:x),r(b,!0),p()}).then(()=>{k?.(b,void 0),s=!0,u.forEach(E=>E(b))}).catch(E=>{k?.(void 0,E)})};return o.persist={setOptions:_=>{a={...a,..._},_.getStorage&&(c=_.getStorage())},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:_=>(l.add(_),()=>{l.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},y(),b||x},Tpe=(e,t)=>(r,i,o)=>{let a={storage:Epe(()=>localStorage),partialize:y=>y,version:0,merge:(y,_)=>({..._,...y}),...t},s=!1;const l=new Set,u=new Set;let c=a.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...y)},i,o);const d=()=>{const y=a.partialize({...i()});return c.setItem(a.name,{state:y,version:a.version})},p=o.setState;o.setState=(y,_)=>{p(y,_),d()};const v=e((...y)=>{r(...y),d()},i,o);let x;const b=()=>{var y;if(!c)return;s=!1,l.forEach(k=>k(i()));const _=((y=a.onRehydrateStorage)==null?void 0:y.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==a.version){if(a.migrate)return a.migrate(k.state,k.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return k.state}).then(k=>{var E;return x=a.merge(k,(E=i())!=null?E:v),r(x,!0),d()}).then(()=>{_?.(x,void 0),s=!0,u.forEach(k=>k(x))}).catch(k=>{_?.(void 0,k)})};return o.persist={setOptions:y=>{a={...a,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},b(),x||v},Ipe=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),Ape(e,t)):Tpe(e,t),Rpe=Ipe,Ppe=Py()(Rpe((e,t)=>({addresses:[],addAddress:r=>e({addresses:[r,...t().addresses.filter(i=>i!==r)].slice(0,20)}),clear:()=>e({addresses:[]}),removeItem:r=>{const{addresses:i}=t(),o=i.filter(a=>a!==r);e({addresses:o})}}),{name:"addressHistory",getStorage:()=>localStorage}));function AL(){const e=Ac(),{setValue:t,setActive:r}=wk(),{addresses:i,addAddress:o,clear:a,removeItem:s}=Ppe(),{contractAddress:l}=$u(),u=X.exports.useCallback(()=>{a()},[a]),c=X.exports.useCallback(p=>{t(""),r(!1),e(`/${p}`)},[]),d=X.exports.useCallback((p,v)=>{p.stopPropagation(),s(v)},[s]);return X.exports.useEffect(()=>{l&&o(l)},[l]),{onHistoryClear:u,onItemClick:c,onItemDelete:d,addressHistory:i,addAddress:o}}const Mpe=sr(kn)({display:"flex",alignItems:"center",height:48,background:"#F7F9FB",borderRadius:40,border:"0.5px solid rgba(114, 138, 150, 0.16)",padding:"0 10px 0 20px",zIndex:9}),Ope=sr("input")(({theme:e})=>({flex:1,marginLeft:10,width:"100%",height:48,fontSize:16,fontWeight:500,outline:"unset",fontFamily:"Mulish",color:"#000",border:"none",background:"transparent",caretColor:"#728A96","&::placeholder":{color:"#728A96",fontWeight:500},[e.breakpoints.down("sm")]:{fontSize:16}}));function Bpe(){const{onSubmit:e,onClear:t,setActive:r,setValue:i,active:o,value:a}=wk(),{onItemDelete:s,onItemClick:l,onHistoryClear:u,addressHistory:c}=AL(),[d]=yw(),p=d.get("devExamples")!==null;return L(w6,{onClickAway:()=>r(!1),children:Ut(ta,{children:[Ut(kn,{sx:{position:"relative",maxWidth:1160,width:"100%",zIndex:3},children:[Ut(Mpe,{children:[L("img",{width:24,height:24,src:wQ,alt:"Search icon"}),L(Ope,{onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),e())},placeholder:"Contract address",value:a,onChange:v=>i(v.target.value),onSubmit:e,onFocus:()=>r(!0),spellCheck:!1}),L(vy,{in:!!a,timeout:zae,children:Ut($n,{children:[L(Bs,{onClick:t,children:L("img",{src:b6,width:16,height:16,alt:"Close icon"})}),L(Ha,{height:34,width:40,textColor:"#fff",background:"rgb(0, 136, 204)",hoverBackground:"rgb(0, 95, 142)",fontWeight:600,onClick:e,children:"Go"})]})})]}),o&&!!c?.length&&L(Kae,{searchResults:c,onItemClick:l,onItemDelete:s,onHistoryClear:u}),(p||!1)&&o&&L(Zae,{})]}),L(u2,{sx:{color:"#fff",zIndex:1,overflow:"hidden"},invisible:!c?.length,open:o,onClick:()=>r(!1)})]})})}const Upe=250,tP=188,Dpe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",minHeight:t.isMobile?80:tP,height:t.showExpanded&&!t.isMobile?Upe:t.isMobile?80:tP,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"})),TL=sr($n)(()=>({gap:10})),ap=sr(uc)(()=>({display:"flex",alignItems:"center",gap:10,color:"#000",textDecoration:"none",cursor:"pointer"})),IL=sr($n)(({theme:e})=>({margin:"auto",maxWidth:W7,height:100,width:"100%",justifyContent:"space-between",gap:10})),cx=sr("h4")(({theme:e})=>({color:"#000",fontSize:20,fontWeight:800,[e.breakpoints.down("sm")]:{fontSize:16}})),xk=sr("h5")(()=>({color:"#000",fontWeight:700,fontSize:18})),Lpe=sr("h3")(({theme:e})=>({color:"#000",fontSize:26,marginTop:0,textAlign:"center",fontWeight:800})),Npe=sr($n)({margin:"auto",maxWidth:W7,width:"100%"});var _k={},jpe=lx.exports;Object.defineProperty(_k,"__esModule",{value:!0});var RL=_k.default=void 0,$pe=jpe(vk()),Fpe=bk,zpe=(0,$pe.default)((0,Fpe.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"}),"MenuRounded");RL=_k.default=zpe;var Sk={},Hpe=lx.exports;Object.defineProperty(Sk,"__esModule",{value:!0});var Ck=Sk.default=void 0,Wpe=Hpe(vk()),Vpe=bk,qpe=(0,Wpe.default)((0,Vpe.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");Ck=Sk.default=qpe;var PL={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())})(_n,function(){var t={};function r(i){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(i))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(i){if(typeof i!="string")throw new TypeError("expected string");var o,a=unescape(encodeURIComponent(i)),s=new Uint8Array(a.length);for(o=0;o"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(i){return Buffer.from(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(Buffer.from(i,"base64"),0))}):(t.encodeBase64=function(i){return new Buffer(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(new Buffer(i,"base64"),0))}):(t.encodeBase64=function(i){var o,a=[],s=i.length;for(o=0;o=e.length)throw new Error("Index is out of buffer");const r=e.slice(0,t),i=e.slice(t);return[r,i]}function T5(e){let t="";return e.forEach(r=>{t+=("0"+(r&255).toString(16)).slice(-2)}),t}function ub(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let r=0;r{this.eventSource.onerror=o,this.eventSource.onopen=()=>{this.eventSource.onerror=this.errorsHandler.bind(this),this.eventSource.onmessage=this.messagesHandler.bind(this),i()}})})}send(t,r,i,o){return Ii(this,void 0,void 0,function*(){const a=new URL(sP(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",r),a.searchParams.append("ttl",(o||this.defaultTtl).toString()),a.searchParams.append("topic",i),yield fetch(a,{method:"post",body:kk.encode(t)})})}pause(){var t;(t=this.eventSource)===null||t===void 0||t.close()}unPause(){return this.registerSession()}close(){var t;this.isClosed=!0,(t=this.eventSource)===null||t===void 0||t.close()}setListener(t){this.listener=t}setErrorsListener(t){this.errorsListener=t}errorsHandler(t){var r,i;if(!this.isClosed){if(((r=this.eventSource)===null||r===void 0?void 0:r.readyState)===EventSource.CLOSED){this.eventSource.close(),this.registerSession();return}if(((i=this.eventSource)===null||i===void 0?void 0:i.readyState)===EventSource.CONNECTING){console.debug("[TON_CONNET_SDK_ERROR]: Bridge error",JSON.stringify(t));return}this.errorsListener(t)}}messagesHandler(t){return Ii(this,void 0,void 0,function*(){if(t.data!==this.heartbeatMessage&&(yield this.bridgeGatewayStorage.storeLastEventId(t.lastEventId),!this.isClosed)){let r;try{r=JSON.parse(t.data)}catch(i){throw new po(`Bridge message parse failed, message ${i.data}`)}this.listener(r)}})}}class H0{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return Ii(this,void 0,void 0,function*(){if(t.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(t));const r={sessionKeyPair:t.session.sessionCrypto.stringifyKeypair(),walletPublicKey:t.session.walletPublicKey,bridgeUrl:t.session.bridgeUrl},i={type:"http",connectEvent:t.connectEvent,session:r,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(i))})}removeConnection(){return Ii(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return Ii(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);if(!t)return null;const r=JSON.parse(t);if(r.type==="injected")return r;const i=new ML(r.session.sessionKeyPair);return{type:"http",connectEvent:r.connectEvent,lastWalletEventId:r.lastWalletEventId,nextRpcRequestId:r.nextRpcRequestId,session:{sessionCrypto:i,bridgeUrl:r.session.bridgeUrl,walletPublicKey:r.session.walletPublicKey}}})}getHttpConnection(){return Ii(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new po("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new po("Trying to read HTTP connection source while injected connection is stored");return t})}getInjectedConnection(){return Ii(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new po("Trying to read Injected bridge connection source while nothing is stored");if(t?.type==="http")throw new po("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return Ii(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return Ii(this,void 0,void 0,function*(){const r=yield this.getConnection();if(r&&r.type==="http")return r.lastWalletEventId=t,this.storeConnection(r)})}getLastWalletEventId(){return Ii(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return Ii(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t){const r=t.nextRpcRequestId||0;return t.nextRpcRequestId=r+1,this.storeConnection(t)}})}getNextRpcRequestId(){return Ii(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&t.nextRpcRequestId||0})}}const OL=2;function ul(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch{}}function g1(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch{}}function she(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch{}}class fb{constructor(t,r){this.storage=t,this.walletConnectionSource=r,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.connectionStorage=new H0(t)}static fromStorage(t){return Ii(this,void 0,void 0,function*(){const i=yield new H0(t).getHttpConnection();return new fb(t,{bridgeUrl:i.session.bridgeUrl})})}connect(t){this.closeGateways();const r=new ML;let i="",o=this.standardUniversalLink;return Array.isArray(this.walletConnectionSource)?(this.pendingGateways=this.walletConnectionSource.map(a=>{const s=new I5(this.storage,a.bridgeUrl,r.sessionId,()=>{},l=>{console.error(l)});return s.setListener(l=>this.pendingGatewaysListener(s,a.bridgeUrl,l)),s}),this.pendingGateways.forEach(a=>a.registerSession())):(i=this.walletConnectionSource.bridgeUrl,this.walletConnectionSource.universalLink&&(o=this.walletConnectionSource.universalLink),this.gateway=new I5(this.storage,this.walletConnectionSource.bridgeUrl,r.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),this.gateway.registerSession()),this.session={sessionCrypto:r,bridgeUrl:i},this.generateUniversalLink(o,t)}restoreConnection(){return Ii(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource))throw new po("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");this.closeGateways();const t=yield this.connectionStorage.getHttpConnection();!t||(this.session=t.session,this.gateway=new I5(this.storage,this.walletConnectionSource.bridgeUrl,t.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession(),this.listeners.forEach(r=>r(t.connectEvent)))})}sendRequest(t,r){return new Promise((i,o)=>Ii(this,void 0,void 0,function*(){if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new po("Trying to send bridge request without session");const a=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ul("Send http-bridge request:",Object.assign(Object.assign({},t),{id:a}));const s=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{id:a})),ub(this.session.walletPublicKey));this.gateway.send(s,this.session.walletPublicKey,t.method).catch(o),this.pendingRequests.set(a.toString(),i),r?.()}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(){return Ii(this,void 0,void 0,function*(){return new Promise(t=>Ii(this,void 0,void 0,function*(){let r=!1;const i=()=>{r=!0,this.removeBridgeAndSession().then(t)};try{yield this.sendRequest({method:"disconnect",params:[]},i)}catch(o){console.debug(o),r||this.removeBridgeAndSession().then(t)}}))})}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(r=>r!==t)}pause(){var t;(t=this.gateway)===null||t===void 0||t.pause(),this.pendingGateways.forEach(r=>r.pause())}unPause(){return Ii(this,void 0,void 0,function*(){const t=this.pendingGateways.map(r=>r.unPause());this.gateway&&t.push(this.gateway.unPause()),yield Promise.all(t)})}pendingGatewaysListener(t,r,i){return Ii(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(t)){t.close();return}return this.closeGateways({except:t}),this.session.bridgeUrl=r,this.gateway=t,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(i)})}gatewayListener(t){return Ii(this,void 0,void 0,function*(){const r=JSON.parse(this.session.sessionCrypto.decrypt(kk.decode(t.message).toUint8Array(),ub(t.from)));if(ul("Wallet message received:",r),!("event"in r)){const o=r.id.toString(),a=this.pendingRequests.get(o);if(!a){ul(`Response id ${o} doesn't match any request's id`);return}a(r),this.pendingRequests.delete(o);return}if(r.id!==void 0){const o=yield this.connectionStorage.getLastWalletEventId();if(o!==void 0&&r.id<=o){g1(`Received event id (=${r.id}) must be greater than stored last wallet event id (=${o}) `);return}r.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(r.id))}const i=this.listeners;r.event==="connect"&&(yield this.updateSession(r,t.from)),r.event==="disconnect"&&(yield this.removeBridgeAndSession()),i.forEach(o=>o(r))})}gatewayErrorsListener(t){return Ii(this,void 0,void 0,function*(){throw new po(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,r){return Ii(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:r});const i=t.payload.items.find(a=>a.name==="ton_addr"),o=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[i]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:o,nextRpcRequestId:0})})}removeBridgeAndSession(){return Ii(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,r){const i=new URL(t);return i.searchParams.append("v",OL.toString()),i.searchParams.append("id",this.session.sessionCrypto.sessionId),i.searchParams.append("r",JSON.stringify(r)),i.toString()}closeGateways(t){var r;(r=this.gateway)===null||r===void 0||r.close(),this.pendingGateways.filter(i=>i!==t?.except).forEach(i=>i.close()),this.pendingGateways=[]}}function lP(e,t){return BL(e,[t])}function BL(e,t){return!e||typeof e!="object"?!1:t.every(r=>r in e)}function lhe(e){try{return!lP(e,"tonconnect")||!lP(e.tonconnect,"walletInfo")?!1:BL(e.tonconnect.walletInfo,["name","image","about_url"])}catch{return!1}}function Pk(){if(!(typeof window>"u"))return window}function uhe(){if(!(typeof document>"u"))return document}function che(){var e;const t=(e=Pk())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}class Ss{constructor(t,r){this.injectedWalletKey=r,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const i=Ss.window;if(!Ss.isWindowContainsWallet(i,r))throw new Tk;this.connectionStorage=new H0(t),this.injectedWallet=i[r].tonconnect}static fromStorage(t){return Ii(this,void 0,void 0,function*(){const i=yield new H0(t).getInjectedConnection();return new Ss(t,i.jsBridgeKey)})}static isWalletInjected(t){return Ss.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return Ss.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Object.entries(this.window).filter(([r,i])=>lhe(i)).map(([r,i])=>({name:i.tonconnect.walletInfo.name,aboutUrl:i.tonconnect.walletInfo.about_url,imageUrl:i.tonconnect.walletInfo.image,tondns:i.tonconnect.walletInfo.tondns,jsBridgeKey:r,injected:!0,embedded:i.tonconnect.isWalletBrowser})):[]}static isWindowContainsWallet(t,r){return!!t&&r in t&&typeof t[r]=="object"&&"tonconnect"in t[r]}connect(t){this._connect(OL,t)}restoreConnection(){return Ii(this,void 0,void 0,function*(){try{ul("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();ul("Injected Provider restoring connection response",t),t.event==="connect"?(this.makeSubscriptions(),this.listeners.forEach(r=>r(t))):yield this.connectionStorage.removeConnection()}catch(t){yield this.connectionStorage.removeConnection(),console.error(t)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return Ii(this,void 0,void 0,function*(){return new Promise(t=>{const r=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(t)};try{this.injectedWallet.disconnect(),r()}catch(i){ul(i),this.sendRequest({method:"disconnect",params:[]},r)}})})}closeAllListeners(){var t;this.listenSubscriptions=!1,this.listeners=[],(t=this.unsubscribeCallback)===null||t===void 0||t.call(this)}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(r=>r!==t)}sendRequest(t,r){return Ii(this,void 0,void 0,function*(){const i=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),ul("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:i}));const o=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:i}));return o.then(a=>ul("Wallet message received:",a)),r?.(),o})}_connect(t,r){return Ii(this,void 0,void 0,function*(){try{ul(`Injected Provider connect request: protocolVersion: ${t}, message:`,r);const i=yield this.injectedWallet.connect(t,r);ul("Injected Provider connect response:",i),i.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(o=>o(i))}catch(i){ul(i);const o={event:"connect_error",payload:{code:0,message:i?.toString()}};this.listeners.forEach(a=>a(o))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{ul("Wallet message received:",t),this.listenSubscriptions&&this.listeners.forEach(r=>r(t)),t.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}Ss.window=Pk();class dhe{constructor(){const t=Pk();if(!t?.localStorage)throw new Ik;this.window=t}getItem(t){return Ii(this,void 0,void 0,function*(){return Promise.resolve(this.window.localStorage.getItem(t))})}removeItem(t){return Ii(this,void 0,void 0,function*(){return this.window.localStorage.removeItem(t),Promise.resolve()})}setItem(t,r){return this.window.localStorage.setItem(t,r),Promise.resolve()}}function mx(e){return fhe(e)&&e.injected}function UL(e){return mx(e)&&e.embedded}function fhe(e){return"jsBridgeKey"in e}function Mk(e){return"bridgeUrl"in e}const phe=[{name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}]},{name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}]},{name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",bridge:[{type:"js",key:"mytonwallet"}]}];class XS{constructor(t){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets.json",t?.walletsListSource&&(this.walletsListSource=t.walletsListSource),t?.cacheTTLMs&&(this.cacheTTLMs=t.cacheTTLMs)}getWallets(){return Ii(this,void 0,void 0,function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then(()=>{this.walletsListCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null})),this.walletsListCache})}getEmbeddedWallet(){return Ii(this,void 0,void 0,function*(){const r=(yield this.getWallets()).filter(UL);return r.length!==1?null:r[0]})}fetchWalletsList(){return Ii(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new Rk("Wrong wallets list format, wallets list must be an array.");const o=t.filter(a=>!this.isCorrectWalletConfigDTO(a));o.length&&(g1(`Wallet(s) ${o.map(a=>a.name).join(", ")} config format is wrong. They were removed from the wallets list.`),t=t.filter(a=>this.isCorrectWalletConfigDTO(a)))}catch(i){g1(i),t=phe}let r=[];try{r=Ss.getCurrentlyInjectedWallets()}catch(i){g1(i)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),r)})}walletConfigDTOListToWalletConfigList(t){return t.map(r=>{const i={name:r.name,imageUrl:r.image,aboutUrl:r.about_url,tondns:r.tondns};return r.bridge.forEach(o=>{if(o.type==="sse"&&(i.bridgeUrl=o.url,i.universalLink=r.universal_url,i.deepLink=r.deepLink),o.type==="js"){const a=o.key;i.jsBridgeKey=a,i.injected=Ss.isWalletInjected(a),i.embedded=Ss.isInsideWalletBrowser(a)}}),i})}mergeWalletsLists(t,r){return[...new Set(t.concat(r).map(o=>o.name)).values()].map(o=>{const a=t.find(l=>l.name===o),s=r.find(l=>l.name===o);return Object.assign(Object.assign({},a&&Object.assign({},a)),s&&Object.assign({},s))})}isCorrectWalletConfigDTO(t){if(!t||typeof t!="object")return!1;const r="name"in t,i="image"in t,o="about_url"in t;if(!r||!i||!o||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const a=t.bridge;if(a.some(u=>!u||typeof u!="object"||!("type"in u)))return!1;const s=a.find(u=>u.type==="sse");if(s&&(!("url"in s)||!s.url||!t.universal_url))return!1;const l=a.find(u=>u.type==="js");return!(l&&(!("key"in l)||!l.key))}}class pb extends po{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,pb.prototype)}}function hhe(e,t){const r=e.includes("SendTransaction"),i=e.find(o=>o&&typeof o=="object"&&o.name==="SendTransaction");if(!r&&!i)throw new pb("Wallet doesn't support SendTransaction feature.");if(i&&i.maxMessages!==void 0){if(i.maxMessagesr(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(t,r){return this.statusChangeSubscriptions.push(t),r&&this.statusChangeErrorSubscriptions.push(r),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(i=>i!==t),r&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(i=>i!==r))}}connect(t,r){var i;if(this.connected)throw new Ak;return(i=this.provider)===null||i===void 0||i.closeConnection(),this.provider=this.createProvider(t),this.provider.connect(this.createConnectRequest(r))}restoreConnection(){return Ii(this,void 0,void 0,function*(){const[t,r]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);try{switch(t){case"http":this.provider=yield fb.fromStorage(this.dappSettings.storage);break;case"injected":this.provider=yield Ss.fromStorage(this.dappSettings.storage);break;default:if(r)this.provider=yield this.createProvider(r);else return}}catch{yield this.bridgeConnectionStorage.removeConnection(),this.provider=null;return}return this.provider.listen(this.walletEventsListener.bind(this)),this.provider.restoreConnection()})}sendTransaction(t){return Ii(this,void 0,void 0,function*(){this.checkConnection(),hhe(this.wallet.device.features,{requiredMessagesNumber:t.messages.length});const{validUntil:r}=t,i=Jpe(t,["validUntil"]),o=t.from||this.account.address,a=t.network||this.account.chain,s=yield this.provider.sendRequest(Bv.convertToRpcRequest(Object.assign(Object.assign({},i),{valid_until:r,from:o,network:a})));return Bv.isError(s)?Bv.parseAndThrowError(s):Bv.convertFromRpcResponse(s)})}disconnect(){return Ii(this,void 0,void 0,function*(){if(!this.connected)throw new cb;yield this.provider.disconnect(),this.onWalletDisconnected()})}pauseConnection(){var t;((t=this.provider)===null||t===void 0?void 0:t.type)==="http"&&this.provider.pause()}unPauseConnection(){var t;return((t=this.provider)===null||t===void 0?void 0:t.type)!=="http"?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const t=uhe();if(!!t)try{t.addEventListener("visibilitychange",()=>{t.hidden?this.pauseConnection():this.unPauseConnection()})}catch(r){console.error("Cannot subscribe to the document.visibilitychange: ",r)}}createProvider(t){let r;return!Array.isArray(t)&&ehe(t)?r=new Ss(this.dappSettings.storage,t.jsBridgeKey):r=new fb(this.dappSettings.storage,t),r.listen(this.walletEventsListener.bind(this)),r}walletEventsListener(t){switch(t.event){case"connect":this.onWalletConnected(t.payload);break;case"connect_error":this.onWalletConnectError(t.payload);break;case"disconnect":this.onWalletDisconnected()}}onWalletConnected(t){const r=t.items.find(a=>a.name==="ton_addr"),i=t.items.find(a=>a.name==="ton_proof");if(!r)throw new po("ton_addr connection item was not found");const o={device:t.device,provider:this.provider.type,account:{address:r.address,chain:r.network,walletStateInit:r.walletStateInit,publicKey:r.publicKey}};i&&(o.connectItems={tonProof:i}),this.wallet=o}onWalletConnectError(t){const r=rhe.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(i=>i(r)),console.debug(r),r instanceof fx||r instanceof dx)throw console.error(r),r}onWalletDisconnected(){this.wallet=null}checkConnection(){if(!this.connected)throw new cb}createConnectRequest(t){const r=[{name:"ton_addr"}];return t?.tonProof&&r.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:r}}}sp.walletsList=new XS;sp.isWalletInjected=e=>Ss.isWalletInjected(e);sp.isInsideWalletBrowser=e=>Ss.isInsideWalletBrowser(e);const ghe=17,mhe=128;function Ok(e,t=!1){const{wc:r,hex:i}=yhe(e);let o=ghe;t&&(o|=mhe);const a=new Int8Array(34);a[0]=o,a[1]=r,a.set(i,2);const s=new Uint8Array(36);return s.set(a),s.set(vhe(a),34),kk.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}function yhe(e){if(!e.includes(":"))throw new ah(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new ah(`Wrong address ${e}. Address must include ":" only once.`);const r=parseInt(t[0]);if(r!==0&&r!==-1)throw new ah(`Wrong address ${e}. WC must be eq 0 or -1, but ${r} received.`);const i=t[1];if(i?.length!==64)throw new ah(`Wrong address ${e}. Hex part must be 64bytes length, but ${i?.length} received.`);return{wc:r,hex:bhe(i)}}function vhe(e){let r=0;const i=new Uint8Array(e.length+2);i.set(e);for(let o of i){let a=128;for(;a>0;)r<<=1,o&a&&(r+=1),a>>=1,r>65535&&(r&=65535,r^=4129)}return new Uint8Array([Math.floor(r/256),r%256])}const JS={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),JS[t]=e}function bhe(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new db("Hex string must have length a multiple of 2: "+e);const r=t/2,i=new Uint8Array(r);for(let o=0;ot in e?Bhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yo=(e,t)=>{for(var r in t||(t={}))Lhe.call(t,r)&&t4(e,r,t[r]);if(cP)for(var r of cP(t))Nhe.call(t,r)&&t4(e,r,t[r]);return e},Pd=(e,t)=>Uhe(e,Dhe(t)),Hs=(e,t,r)=>(t4(e,typeof t!="symbol"?t+"":t,r),r),cl=(e,t,r)=>new Promise((i,o)=>{var a=u=>{try{l(r.next(u))}catch(c){o(c)}},s=u=>{try{l(r.throw(u))}catch(c){o(c)}},l=u=>u.done?i(u.value):Promise.resolve(u.value).then(a,s);l((r=r.apply(e,t)).next())});const Wo={};function jhe(e){Wo.context=e}const $he=(e,t)=>e===t,Zl=Symbol("solid-proxy"),r4=Symbol("solid-track"),hb={equals:$he};let NL=WL;const Tc=1,gb=2,jL={owned:null,cleanups:null,context:null,owner:null},R5={};var _a=null;let Ef=null,Zo=null,is=null,pc=null,Bk=0;function o0(e,t){const r=Zo,i=_a,o=e.length===0,a=o?jL:{owned:null,cleanups:null,context:null,owner:t===void 0?i:t},s=o?e:()=>e(()=>Va(()=>wx(a)));_a=a,Zo=null;try{return Md(s,!0)}finally{Zo=r,_a=i}}function Hi(e,t){t=t?Object.assign({},hb,t):hb;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=o=>(typeof o=="function"&&(o=o(r.value)),HL(r,o));return[zL.bind(r),i]}function mb(e,t,r){const i=bx(e,t,!0,Tc);Sg(i)}function sa(e,t,r){const i=bx(e,t,!1,Tc);Sg(i)}function _l(e,t,r){NL=Ghe;const i=bx(e,t,!1,Tc);i.user=!0,pc?pc.push(i):Sg(i)}function Ri(e,t,r){r=r?Object.assign({},hb,r):hb;const i=bx(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=r.equals||void 0,Sg(i),zL.bind(i)}function Fhe(e,t,r){let i,o,a;arguments.length===2&&typeof t=="object"||arguments.length===1?(i=!0,o=e,a=t||{}):(i=e,o=t,a=r||{});let s=null,l=R5,u=null,c=!1,d="initialValue"in a,p=typeof i=="function"&&Ri(i);const v=new Set,[x,b]=(a.storage||Hi)(a.initialValue),[y,_]=Hi(void 0),[k,E]=Hi(void 0,{equals:!1}),[O,U]=Hi(d?"ready":"unresolved");if(Wo.context){u=`${Wo.context.id}${Wo.context.count++}`;let W;a.ssrLoadFrom==="initial"?l=a.initialValue:Wo.load&&(W=Wo.load(u))&&(l=W[0])}function D(W,G,ae,V){return s===W&&(s=null,d=!0,(W===l||G===l)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(V,{value:G})),l=R5,j(G,ae)),G}function j(W,G){Md(()=>{G===void 0&&b(()=>W),U(G!==void 0?"errored":"ready"),_(G);for(const ae of v.keys())ae.decrement();v.clear()},!1)}function F(){const W=Vhe,G=x(),ae=y();if(ae!==void 0&&!s)throw ae;return Zo&&!Zo.user&&W&&mb(()=>{k(),s&&(W.resolved||v.has(W)||(W.increment(),v.add(W)))}),G}function H(W=!0){if(W!==!1&&c)return;c=!1;const G=p?p():i;if(G==null||G===!1){D(s,Va(x));return}const ae=l!==R5?l:Va(()=>o(G,{value:x(),refetching:W}));return typeof ae!="object"||!(ae&&"then"in ae)?(D(s,ae,void 0,G),ae):(s=ae,c=!0,queueMicrotask(()=>c=!1),Md(()=>{U(d?"refreshing":"pending"),E()},!1),ae.then(V=>D(ae,V,void 0,G),V=>D(ae,void 0,qL(V),G)))}return Object.defineProperties(F,{state:{get:()=>O()},error:{get:()=>y()},loading:{get(){const W=O();return W==="pending"||W==="refreshing"}},latest:{get(){if(!d)return F();const W=y();if(W&&!s)throw W;return x()}}}),p?mb(()=>H(!1)):H(!1),[F,{refetch:H,mutate:b}]}function $L(e){return Md(e,!1)}function Va(e){if(Zo===null)return e();const t=Zo;Zo=null;try{return e()}finally{Zo=t}}function zhe(e,t,r){const i=Array.isArray(e);let o,a=r&&r.defer;return s=>{let l;if(i){l=Array(e.length);for(let c=0;ct(l,o,s));return o=l,u}}function Hhe(e){_l(()=>Va(e))}function _c(e){return _a===null||(_a.cleanups===null?_a.cleanups=[e]:_a.cleanups.push(e)),e}function FL(){return Zo}function Whe(){return _a}function yx(e,t){const r=Symbol("context");return{id:r,Provider:Yhe(r),defaultValue:e}}function Ql(e){let t;return(t=GL(_a,e.id))!==void 0?t:e.defaultValue}function vx(e){const t=Ri(e),r=Ri(()=>n4(t()));return r.toArray=()=>{const i=r();return Array.isArray(i)?i:i!=null?[i]:[]},r}let Vhe;function zL(){const e=Ef;if(this.sources&&(this.state||e))if(this.state===Tc||e)Sg(this);else{const t=is;is=null,Md(()=>vb(this),!1),is=t}if(Zo){const t=this.observers?this.observers.length:0;Zo.sources?(Zo.sources.push(this),Zo.sourceSlots.push(t)):(Zo.sources=[this],Zo.sourceSlots=[t]),this.observers?(this.observers.push(Zo),this.observerSlots.push(Zo.sources.length-1)):(this.observers=[Zo],this.observerSlots=[Zo.sources.length-1])}return this.value}function HL(e,t,r){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&Md(()=>{for(let o=0;o1e6)throw is=[],new Error},!1)),t}function Sg(e){if(!e.fn)return;wx(e);const t=_a,r=Zo,i=Bk;Zo=_a=e,qhe(e,e.value,i),Zo=r,_a=t}function qhe(e,t,r){let i;try{i=e.fn(t)}catch(o){e.pure&&(e.state=Tc,e.owned&&e.owned.forEach(wx),e.owned=null),KL(o)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?HL(e,i):e.value=i,e.updatedAt=r)}function bx(e,t,r,i=Tc,o){const a={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:_a,context:null,pure:r};return _a===null||_a!==jL&&(_a.owned?_a.owned.push(a):_a.owned=[a]),a}function yb(e){const t=Ef;if(e.state===0||t)return;if(e.state===gb||t)return vb(e);if(e.suspense&&Va(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;i--)if(e=r[i],e.state===Tc||t)Sg(e);else if(e.state===gb||t){const o=is;is=null,Md(()=>vb(e,r[0]),!1),is=o}}function Md(e,t){if(is)return e();let r=!1;t||(is=[]),pc?r=!0:pc=[],Bk++;try{const i=e();return Khe(r),i}catch(i){r||(pc=null),is=null,KL(i)}}function Khe(e){if(is&&(WL(is),is=null),e)return;const t=pc;pc=null,t.length&&Md(()=>NL(t),!1)}function WL(e){for(let t=0;to=Va(()=>(_a.context={[e]:i.value},vx(()=>i.children))),void 0),o}}const Zhe=Symbol("fallback");function dP(e){for(let t=0;t1?[]:null;return _c(()=>dP(a)),()=>{let u=e()||[],c,d;return u[r4],Va(()=>{let v=u.length,x,b,y,_,k,E,O,U,D;if(v===0)s!==0&&(dP(a),a=[],i=[],o=[],s=0,l&&(l=[])),r.fallback&&(i=[Zhe],o[0]=o0(j=>(a[0]=j,r.fallback())),s=1);else if(s===0){for(o=new Array(v),d=0;d=E&&U>=E&&i[O]===u[U];O--,U--)y[U]=o[O],_[U]=a[O],l&&(k[U]=l[O]);for(x=new Map,b=new Array(U+1),d=U;d>=E;d--)D=u[d],c=x.get(D),b[d]=c===void 0?-1:c,x.set(D,d);for(c=E;c<=O;c++)D=i[c],d=x.get(D),d!==void 0&&d!==-1?(y[d]=o[c],_[d]=a[c],l&&(k[d]=l[c]),d=b[d],x.set(D,d)):a[c]();for(d=E;de(t||{}))}function Uv(){return!0}const i4={get(e,t,r){return t===Zl?r:e.get(t)},has(e,t){return t===Zl?!0:e.has(t)},set:Uv,deleteProperty:Uv,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Uv,deleteProperty:Uv}},ownKeys(e){return e.keys()}};function P5(e){return(e=typeof e=="function"?e():e)?e:{}}function Au(...e){let t=!1;for(let i=0;i=0;o--){const a=P5(e[o])[i];if(a!==void 0)return a}},has(i){for(let o=e.length-1;o>=0;o--)if(i in P5(e[o]))return!0;return!1},keys(){const i=[];for(let o=0;o=0;i--)if(e[i]){const o=Object.getOwnPropertyDescriptors(e[i]);for(const a in o)a in r||Object.defineProperty(r,a,{enumerable:!0,get(){for(let s=e.length-1;s>=0;s--){const l=(e[s]||{})[a];if(l!==void 0)return l}}})}return r}function Uk(e,...t){const r=new Set(t.flat());if(Zl in e){const o=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},i4));return o.push(new Proxy({get(a){return r.has(a)?void 0:e[a]},has(a){return r.has(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!r.has(a))}},i4)),o}const i=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(i).filter(o=>!r.has(o))),t.map(o=>{const a={};for(let s=0;se.fallback};return Ri(Qhe(()=>e.each,e.children,t||void 0))}function go(e){let t=!1;const r=e.keyed,i=Ri(()=>e.when,void 0,{equals:(o,a)=>t?o===a:!o==!a});return Ri(()=>{const o=i();if(o){const a=e.children,s=typeof a=="function"&&a.length>0;return t=r||s,s?Va(()=>a(o)):a}return e.fallback},void 0,void 0)}function _x(e){let t=!1,r=!1;const i=(s,l)=>s[0]===l[0]&&(t?s[1]===l[1]:!s[1]==!l[1])&&s[2]===l[2],o=vx(()=>e.children),a=Ri(()=>{let s=o();Array.isArray(s)||(s=[s]);for(let l=0;l{const[s,l,u]=a();if(s<0)return e.fallback;const c=u.children,d=typeof c=="function"&&c.length>0;return t=r||d,d?Va(()=>c(l)):c},void 0,void 0)}function Tu(e){return e}const Xhe=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Jhe=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Xhe]),ege=new Set(["innerHTML","textContent","innerText","children"]),tge=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),fP=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),rge=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),nge=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),ige={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function oge(e,t,r){let i=r.length,o=t.length,a=i,s=0,l=0,u=t[o-1].nextSibling,c=null;for(;sd-l){const b=t[s];for(;l{o=a,t===document?e():Oa(t,e(),t.firstChild?null:void 0,r)},i.owner),()=>{o(),t.textContent=""}}function fa(e,t,r){if(typeof window>"u")return null;const i=document.createElement("template");i.innerHTML=e;let o=i.content.firstChild;return r&&(o=o.firstChild),o}function sge(e,t=window.document){const r=t[pP]||(t[pP]=new Set);for(let i=0,o=e.length;io.call(e,r[1],a))}else e.addEventListener(t,r)}function cge(e,t,r={}){const i=Object.keys(t||{}),o=Object.keys(r);let a,s;for(a=0,s=o.length;ao.children=Gh(e,t.children,o.children)),sa(()=>t.ref&&t.ref(e)),sa(()=>fge(e,t,r,!0,o,!0)),o}function bb(e,t,r){return Va(()=>e(t,r))}function Oa(e,t,r,i){if(r!==void 0&&!i&&(i=[]),typeof t!="function")return Gh(e,t,i,r);sa(o=>Gh(e,t(),o,r),i)}function fge(e,t,r,i,o={},a=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=gP(e,s,null,o[s],r,a)}for(const s in t){if(s==="children"){i||Gh(e,t.children);continue}const l=t[s];o[s]=gP(e,s,l,o[s],r,a)}}function pge(e){let t,r;return!Wo.context||!(t=Wo.registry.get(r=mge()))?e.cloneNode(!0):(Wo.completed&&Wo.completed.add(t),Wo.registry.delete(r),t)}function hge(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function hP(e,t,r){const i=t.trim().split(/\s+/);for(let o=0,a=i.length;o-1&&ige[t.split(":")[0]];c?lge(e,c,t,r):Lo(e,tge[t]||t,r)}return r}function gge(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),Wo.registry&&!Wo.done&&(Wo.done=!0,document.querySelectorAll("[id^=pl-]").forEach(i=>{for(;i&&i.nodeType!==8&&i.nodeValue!=="pl-"+e;){let o=i.nextSibling;i.remove(),i=o}i&&i.remove()}));r;){const i=r[t];if(i&&!r.disabled){const o=r[`${t}Data`];if(o!==void 0?i.call(r,o,e):i.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function Gh(e,t,r,i,o){for(Wo.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const a=typeof t,s=i!==void 0;if(e=s&&r[0]&&r[0].parentNode||e,a==="string"||a==="number"){if(Wo.context)return r;if(a==="number"&&(t=t.toString()),s){let l=r[0];l&&l.nodeType===3?l.data=t:l=document.createTextNode(t),r=Np(e,r,i,l)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||a==="boolean"){if(Wo.context)return r;r=Np(e,r,i)}else{if(a==="function")return sa(()=>{let l=t();for(;typeof l=="function";)l=l();r=Gh(e,l,r,i)}),()=>r;if(Array.isArray(t)){const l=[],u=r&&Array.isArray(r);if(o4(l,t,r,o))return sa(()=>r=Gh(e,l,r,i,!0)),()=>r;if(Wo.context){if(!l.length)return r;for(let c=0;c=0;s--){const l=t[s];if(o!==l){const u=l.parentNode===e;!a&&!s?u?e.replaceChild(o,l):e.insertBefore(o,r):u&&l.remove()}else a=!0}}else e.insertBefore(o,r);return[o]}function mge(){const e=Wo.context;return`${e.id}${e.count++}`}const yge="http://www.w3.org/2000/svg";function ZL(e,t=!1){return t?document.createElementNS(yge,e):document.createElement(e)}function QL(e){const{useShadow:t}=e,r=document.createTextNode(""),i=e.mount||document.body;function o(){if(Wo.context){const[a,s]=Hi(!1);return queueMicrotask(()=>s(!0)),()=>a()&&e.children}else return()=>e.children}if(i instanceof HTMLHeadElement){const[a,s]=Hi(!1),l=()=>s(!0);o0(u=>Oa(i,()=>a()?u():o()(),null)),_c(()=>{Wo.context?queueMicrotask(l):l()})}else{const a=ZL(e.isSVG?"g":"div",e.isSVG),s=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return r.parentNode},configurable:!0}),Oa(s,o()),i.appendChild(a),e.ref&&e.ref(a),_c(()=>i.removeChild(a))}return r}function Lk(e){const[t,r]=Uk(e,["component"]),i=Ri(()=>t.component);return Ri(()=>{const o=i();switch(typeof o){case"function":return Va(()=>o(r));case"string":const a=nge.has(o),s=Wo.context?pge():ZL(o,a);return YL(s,r,a),s}})}const[vge,a4]=Hi(!1),[bge,Wl]=Hi(null),[Vp,sh]=Hi(null);let wge={data:""},xge=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||wge,_ge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Sge=/\/\*[^]*?\*\/| +/g,yP=/\n+/g,df=(e,t)=>{let r="",i="",o="";for(let a in e){let s=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+s+";":i+=a[1]=="f"?df(s,a):a+"{"+df(s,a[1]=="k"?"":t)+"}":typeof s=="object"?i+=df(s,t?t.replace(/([^,])+/g,l=>a.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,l):l?l+" "+u:u)):a):s!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=df.p?df.p(a,s):a+":"+s+";")}return r+(t&&o?t+"{"+o+"}":o)+i},Qu={},XL=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+XL(e[r]);return t}return e},Cge=(e,t,r,i,o)=>{let a=XL(e),s=Qu[a]||(Qu[a]=(u=>{let c=0,d=11;for(;c>>0;return"go"+d})(a));if(!Qu[s]){let u=a!==e?e:(c=>{let d,p,v=[{}];for(;d=_ge.exec(c.replace(Sge,""));)d[4]?v.shift():d[3]?(p=d[3].replace(yP," ").trim(),v.unshift(v[0][p]=v[0][p]||{})):v[0][d[1]]=d[2].replace(yP," ").trim();return v[0]})(e);Qu[s]=df(o?{["@keyframes "+s]:u}:u,r?"":"."+s)}let l=r&&Qu.g?Qu.g:null;return r&&(Qu.g=Qu[s]),((u,c,d,p)=>{p?c.data=c.data.replace(p,u):c.data.indexOf(u)===-1&&(c.data=d?u+c.data:c.data+u)})(Qu[s],t,i,l),s},kge=(e,t,r)=>e.reduce((i,o,a)=>{let s=t[a];if(s&&s.call){let l=s(r),u=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=u?"."+u:l&&typeof l=="object"?l.props?"":df(l,""):l===!1?"":l}return i+o+(s??"")},"");function Sc(e){let t=this||{},r=e.call?e(t.p):e;return Cge(r.unshift?r.raw?kge(r,[].slice.call(arguments,1),t.p):r.reduce((i,o)=>Object.assign(i,o&&o.call?o(t.p):o),{}):r,xge(t.target),t.g,t.o,t.k)}Sc.bind({g:1});let Ege=Sc.bind({k:1});const Nk=yx();function Age(e){return zt(Nk.Provider,{value:e.theme,get children(){return e.children}})}function ol(){return Ql(Nk)}function JL(e){let t=this||{};return(...r)=>{const i=o=>{const a=Ql(Nk),s=Au(o,{theme:a}),l=Au(s,{get class(){const x=s.class,b="class"in s&&/^go[0-9]+/.test(x);let y=Sc.apply({target:t.target,o:b,p:s,g:t.g},r);return[x,y].filter(Boolean).join(" ")}}),[u,c]=Uk(l,["as","theme"]),d=c,p=u.as||e;let v;return typeof p=="function"?v=p(d):t.g==1?(v=document.createElement(p),YL(v,d)):v=Lk(Au({component:p},d)),v};return i.class=o=>Va(()=>Sc.apply({target:t.target,p:o,g:t.g},r)),i}}const wn=new Proxy(JL,{get(e,t){return e(t)}});function Tge(){const e=JL.call({g:1},"div").apply(null,arguments);return function(r){return e(r),null}}const Ige={close:"Close",get:"GET",learnMore:"Learn more",openExtension:"Open Extension",copyLink:"Copy Link",copied:"Copied!",yourWallet:"your wallet"},Rge={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},Pge={confirm:{header:"Open {{ name }} to\xA0confirm the\xA0transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction\xA0will be\xA0processed in\xA0a\xA0few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},Mge={loading:"Loading wallets",qrCode:"QR Code",wallets:"Wallets",universalQRModal:{scanQR:"Scan the\xA0code below with a camera in your TON wallet.",openWallet:"Open Wallet",openInstalledWallet:"Open Wallet",dontHave:"Explore TON wallets"},desktopSelectWalletModal:{selectWallet:"Select a\xA0wallet to\xA0connect."},mobileSelectWalletModal:{connectWallet:"Connect a\xA0Wallet",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Installed Wallet"},qrCodeModal:{connectWith:"Connect with\xA0{{ name }}",scan:"Scan the\xA0code below.",openWallet:"Open {{ name }}",openExtension:"Open Extension",dontHave:"Don't have {{ name }}?"}},Oge={confirmTransaction:{header:"Confirm the\xA0transaction in\xA0{{ name }}",text:"It will only take a\xA0moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},Bge={common:Ige,button:Rge,notifications:Pge,walletModal:Mge,actionModal:Oge},Uge={close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",get:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",learnMore:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435",openExtension:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435",copyLink:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443",copied:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!",yourWallet:"\u0432\u0430\u0448\u0435\u043C \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0435"},Dge={connectWallet:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",dropdown:{copy:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0430\u0434\u0440\u0435\u0441",copied:"\u0410\u0434\u0440\u0435\u0441 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D!",disconnect:"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A"}},Lge={confirm:{header:"\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 {{ name }}, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044E."},transactionSent:{header:"\u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430",text:"\u0412\u0430\u0448\u0430 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F\xA0\u0431\u0443\u0434\u0435\u0442 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u0430 \u0447\u0435\u0440\u0435\u0437\xA0\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434."},transactionCanceled:{header:"\u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430",text:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043E \u0441\u0447\u0451\u0442\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F."}},Nge={loading:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u043E\u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F",qrCode:"QR-\u043A\u043E\u0434",wallets:"\u041A\u043E\u0448\u0435\u043B\u044C\u043A\u0438",universalQRModal:{scanQR:"\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u043A\u043E\u0434 \u043D\u0438\u0436\u0435 \u0441\xA0\u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u0430\u043C\u0435\u0440\u044B \u0432 \u0432\u0430\u0448\u0435\u043C TON-\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0435.",openWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",openInstalledWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",dontHave:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u043E\xA0TON\xA0\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430\u0445"},desktopSelectWalletModal:{selectWallet:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0434\u043B\u044F\xA0\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F."},mobileSelectWalletModal:{connectWallet:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043A\u043E\u0448\u0435\u043B\u0451\u043A",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A"},qrCodeModal:{connectWith:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F \u0447\u0435\u0440\u0435\u0437\xA0{{ name }}",scan:"\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u043A\u043E\u0434 \u043D\u0438\u0436\u0435.",openWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C {{ name }}",openExtension:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435",dontHave:"\u0423 \u0432\u0430\u0441 \u043D\u0435\u0442 {{ name }}?"}},jge={confirmTransaction:{header:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\xA0{{ name }}",text:"\u042D\u0442\u043E \u0437\u0430\u0439\u043C\u0435\u0442 \u043F\u0430\u0440\u0443 \u0441\u0435\u043A\u0443\u043D\u0434."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},$ge={common:Uge,button:Dge,notifications:Lge,walletModal:Nge,actionModal:jge},Fge={en:vP(Bge),ru:vP($ge)};function vP(e){const t="$",r=i=>{Object.entries(i).forEach(([o,a])=>{if(typeof a=="object"&&a)return r(a);if(typeof a=="string"){if(a[0]===t){const s=a.slice(1).split(".");let l=e;s.forEach(u=>{if(u in l)l=l[u];else throw new Error(`Cannot parse translations: there is no property ${u} in translation`)}),i[o]=l}a.slice(0,2)===`\\${t}`&&(i[o]=a.slice(1))}})};return r(e),e}const Sx=yx(),s4=Symbol("store-raw"),V0=Symbol("store-node"),zge=Symbol("store-name");function eN(e,t){let r=e[Zl];if(!r&&(Object.defineProperty(e,Zl,{value:r=new Proxy(e,Vge)}),!Array.isArray(e))){const i=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let a=0,s=i.length;ae[Zl][t]),r}function tN(e){if(FL()){const t=jk(e);(t._||(t._=rN()))()}}function Wge(e){return tN(e),Reflect.ownKeys(e)}function rN(e){const[t,r]=Hi(e,{equals:!1,internal:!0});return t.$=r,t}const Vge={get(e,t,r){if(t===s4)return e;if(t===Zl)return r;if(t===r4)return tN(e),r;const i=jk(e),o=i.hasOwnProperty(t);let a=o?i[t]():e[t];if(t===V0||t==="__proto__")return a;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);FL()&&(typeof a!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(a=l4(i,t,a)())}return wb(a)?eN(a):a},has(e,t){return t===s4||t===Zl||t===r4||t===V0||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Wge,getOwnPropertyDescriptor:Hge};function xb(e,t,r,i=!1){if(!i&&e[t]===r)return;const o=e[t],a=e.length;r===void 0?delete e[t]:e[t]=r;let s=jk(e),l;(l=l4(s,t,o))&&l.$(()=>r),Array.isArray(e)&&e.length!==a&&(l=l4(s,"length",a))&&l.$(e.length),(l=s._)&&l.$()}function nN(e,t){const r=Object.keys(t);for(let i=0;i1){i=t.shift();const s=typeof i,l=Array.isArray(e);if(Array.isArray(i)){for(let u=0;u1){$m(e[i],t,[i].concat(r));return}o=e[i],r=[i].concat(r)}let a=t[0];typeof a=="function"&&(a=a(o,r),a===o)||i===void 0&&a==null||(a=Yh(a),i===void 0||wb(o)&&wb(a)&&!Array.isArray(a)?nN(o,a):xb(e,i,a))}function $k(...[e,t]){const r=Yh(e||{}),i=Array.isArray(r),o=eN(r);function a(...s){$L(()=>{i&&s.length===1?qge(r,s[0]):$m(r,s)})}return[o,a]}var oa=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(oa||{});const iN={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#31A6F5",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},Kge={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#E5E5EA",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function bP(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gge(e){var t,r;return bP(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(bP(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function _d(e,t){return e?Ohe(t,e,{arrayMerge:(i,o,a)=>o,isMergeableObject:Gge}):t}const[Yge,Fk]=$k({theme:oa.LIGHT,colors:iN,borderRadius:"m"}),oN={[oa.LIGHT]:iN,[oa.DARK]:Kge},mu={[oa.LIGHT]:void 0,[oa.DARK]:void 0};function M5(e,t){t&&(mu[oa.DARK]=_d(t[oa.DARK],mu[oa.DARK]),mu[oa.LIGHT]=_d(t[oa.LIGHT],mu[oa.LIGHT])),Fk({theme:e,colors:_d(mu[e],oN[e])})}function Zge(e){Fk({borderRadius:e})}function Qge(e){mu[oa.DARK]=_d(e[oa.DARK],mu[oa.DARK]),mu[oa.LIGHT]=_d(e[oa.LIGHT],mu[oa.LIGHT]),Fk(t=>({colors:_d(mu[t.theme],oN[t.theme])}))}const rc="tc-root",zk="tc-disable-scroll",O5="tc-using-mouse",Xge=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(O5)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(O5)});const e=Tge` + ${rc} * { + margin: 0; + padding: 0; + box-sizing: border-box; + + font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + } + + ${rc} img { + -webkit-user-select: none; + -webkit-touch-callout: none; + } + + ${rc} *:focus { + outline: #08f auto 2px; + } + + ${rc} li { + list-style: none; + } + + ${rc} button { + outline: none; + } + + body.${zk} { + position: fixed; + overflow-y: scroll; + right: 0; + left: 0; + } + + body.${O5} ${rc} *:focus { + outline: none; + } +`;return zt(e,{})},Jge=wn.div` + background-color: ${e=>e.theme.colors.background.secondary}; +`,Hk=e=>{let t;const[r,i]=Hi(null);return _l(()=>{const o=new window.Image;return o.src=e.src,o.alt=e.alt||"",o.setAttribute("draggable","false"),e.class&&o.classList.add(e.class),o.complete?i(o):(o.addEventListener("load",()=>i(o)),()=>o.removeEventListener("load",()=>i(o)))}),[zt(go,{get when(){return r()},get children(){return r()}}),zt(go,{get when(){return!r()},get children(){return zt(Jge,{get class(){return e.class},ref(o){const a=t;typeof a=="function"?a(o):t=o}})}})]};function eme(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),r=t>>16&255,i=t>>8&255,o=t&255;return[r,i,o].join(",")}function Cx(e,t){return e[0]==="#"&&(e=eme(e)),`rgba(${e}, ${t})`}function Iu(e){return e.toString()+"px"}class fu extends po{constructor(...t){super(...t),Object.setPrototypeOf(this,fu.prototype)}}function q0(e,t="_self"){return window.open(e,t,"noreferrer noopener")}function Wk(e){q0(e,"_blank")}function tme(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?oa.LIGHT:oa.DARK}function rme(e){const t=r=>e(r.matches?oa.DARK:oa.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function nme(e,t,r){const i=new URL(e);return i.searchParams.append(t,r),i.toString()}function K0(e,t){return nme(e,"ret",t)}function ime(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Iu(-document.documentElement.scrollTop),document.body.classList.add(zk))}function ome(){document.body.classList.remove(zk),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function ame(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function sme(){customElements.define(rc,class extends HTMLDivElement{},{extends:"div"})}function lme(e){e.forEach(t=>{const r=new window.Image;r.src=t})}function aN(){if(typeof localStorage>"u")throw new fu("window.localStorage is undefined. localStorage is required for TonConnectUI")}function sN(){if(typeof window<"u")return window}function ume(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}const td={mobile:440,tablet:1020};function lh(e){const t=sN();if(!t)return e==="desktop";const r=t.innerWidth;switch(e){case"desktop":return r>td.tablet;case"tablet":return r>td.mobile;default:case"mobile":return r<=td.mobile}}function Ic(e){switch(e){case"mobile":return`@media (max-width: ${td.mobile}px)`;case"tablet":return`@media (max-width: ${td.tablet}px) (min-width: ${td.mobile}px)`;default:case"desktop":return`@media (min-width: ${td.tablet}px)`}}const kx="@media (hover: none)",Ex="@media not all and (hover: none)",cme={m:"100vh",s:"8px",none:"0"},B5={s:.02,m:.04},dme=wn.button` + background-color: ${e=>e.appearance==="flat"?"transparent":Cx(e.theme.colors.accent,.12)}; + color: ${e=>e.theme.colors.accent}; + + padding: ${e=>e.appearance==="flat"?"0":"9px 16px"}; + border: none; + border-radius: ${e=>cme[e.theme.borderRadius]}; + cursor: ${e=>e.disabled?"not-allowed":"pointer"}; + + font-size: 14px; + font-weight: 590; + line-height: 18px; + + transition: transform 0.125s ease-in-out; + + ${Ex} { + &:hover { + transform: ${e=>e.disabled?"unset":`scale(${1+B5[e.scale]})`}; + } + } + + &:active { + transform: ${e=>e.disabled?"unset":`scale(${1-B5[e.scale]})`}; + } + + ${kx} { + &:active { + transform: ${e=>e.disabled?"unset":`scale(${1-B5[e.scale]*2})`}; + } + } +`;function My(e){const t=Va(()=>Object.keys(e).filter(i=>i.startsWith("data-"))),[r]=Uk(e,t);return r}const Fu=e=>{const t=My(e);return zt(dme,Au({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:r=>{var i;return(i=e.onClick)==null?void 0:i.call(e,r)},onMouseEnter:r=>{var i;return(i=e.onMouseEnter)==null?void 0:i.call(e,r)},onMouseLeave:r=>{var i;return(i=e.onMouseLeave)==null?void 0:i.call(e,r)},ref(r){const i=e.ref;typeof i=="function"?i(r):e.ref=r},get disabled(){return e.disabled},get scale(){return e.scale||"m"},"data-tc-button":"true"},t,{get children(){return e.children}}))};function _b(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const Ax=e=>{let t,r=!0;const[i,o]=Hi(),[a,s]=Hi(),l=vx(()=>e.children),{onBeforeEnter:u,onEnter:c,onAfterEnter:d,onBeforeExit:p,onExit:v,onAfterExit:x}=e,b=Ri(()=>{const k=e.name||"s";return{enterActiveClass:e.enterActiveClass||k+"-enter-active",enterClass:e.enterClass||k+"-enter",enterToClass:e.enterToClass||k+"-enter-to",exitActiveClass:e.exitActiveClass||k+"-exit-active",exitClass:e.exitClass||k+"-exit",exitToClass:e.exitToClass||k+"-exit-to"}});function y(k,E){if(!r||e.appear){let O=function(F){k&&(!F||F.target===k)&&(k.removeEventListener("transitionend",O),k.removeEventListener("animationend",O),k.classList.remove(...D),k.classList.remove(...j),$L(()=>{i()!==k&&o(k),a()===k&&s(void 0)}),d&&d(k),e.mode==="inout"&&_(k,E))};const U=b().enterClass.split(" "),D=b().enterActiveClass.split(" "),j=b().enterToClass.split(" ");u&&u(k),k.classList.add(...U),k.classList.add(...D),_b(()=>{k.classList.remove(...U),k.classList.add(...j),c&&c(k,()=>O()),(!c||c.length<2)&&(k.addEventListener("transitionend",O),k.addEventListener("animationend",O))})}E&&!e.mode?s(k):o(k)}function _(k,E){const O=b().exitClass.split(" "),U=b().exitActiveClass.split(" "),D=b().exitToClass.split(" ");if(!E.parentNode)return j();p&&p(E),E.classList.add(...O),E.classList.add(...U),_b(()=>{E.classList.remove(...O),E.classList.add(...D)}),v&&v(E,()=>j()),(!v||v.length<2)&&(E.addEventListener("transitionend",j),E.addEventListener("animationend",j));function j(F){(!F||F.target===E)&&(E.removeEventListener("transitionend",j),E.removeEventListener("animationend",j),E.classList.remove(...U),E.classList.remove(...D),i()===E&&o(void 0),x&&x(E),e.mode==="outin"&&y(k,E))}}return mb(k=>{for(t=l();typeof t=="function";)t=t();return Va(()=>(t&&t!==k&&(e.mode!=="outin"?y(t,k):r&&o(t)),k&&k!==t&&e.mode!=="inout"&&_(t,k),r=!1,t))}),[i,a]};function Dv(e){const{top:t,bottom:r,left:i,right:o,width:a,height:s}=e.getBoundingClientRect(),l=e.parentNode.getBoundingClientRect();return{top:t-l.top,bottom:r,left:i-l.left,right:o,width:a,height:s}}const fme=e=>{const t=vx(()=>e.children),r=Ri(()=>{const x=e.name||"s";return{enterActiveClass:e.enterActiveClass||x+"-enter-active",enterClass:e.enterClass||x+"-enter",enterToClass:e.enterToClass||x+"-enter-to",exitActiveClass:e.exitActiveClass||x+"-exit-active",exitClass:e.exitClass||x+"-exit",exitToClass:e.exitToClass||x+"-exit-to",moveClass:e.moveClass||x+"-move"}}),{onBeforeEnter:i,onEnter:o,onAfterEnter:a,onBeforeExit:s,onExit:l,onAfterExit:u}=e,[c,d]=Hi();let p=[],v=!0;return mb(()=>{const x=t(),b=[...x],y=new Set(x),_=new Set(p),k=r().enterClass.split(" "),E=r().enterActiveClass.split(" "),O=r().enterToClass.split(" "),U=r().exitClass.split(" "),D=r().exitActiveClass.split(" "),j=r().exitToClass.split(" ");for(let F=0;F{H.classList.remove(...k),H.classList.add(...O),o&&o(H,()=>W()),(!o||o.length<2)&&(H.addEventListener("transitionend",W),H.addEventListener("animationend",W))})}}for(let F=0;Fae!==H),d(p))};b.splice(F,0,H),s&&s(H),H.classList.add(...U),H.classList.add(...D),_b(()=>{H.classList.remove(...U),H.classList.add(...j)}),l&&l(H,()=>W()),(!l||l.length<2)&&(H.addEventListener("transitionend",W),H.addEventListener("animationend",W))}}p=b,d(b)}),_l(x=>{const b=c();return b.forEach(y=>{let _;(_=x.get(y))?_.new&&(_.new=!1,_.newPos=Dv(y)):x.set(y,_={pos:Dv(y),new:!v}),_.new&&y.addEventListener("transitionend",()=>{_.new=!1,y.parentNode&&(_.newPos=Dv(y))},{once:!0}),_.newPos&&(_.pos=_.newPos),_.newPos=Dv(y)}),v?(v=!1,x):(b.forEach(y=>{const _=x.get(y),k=_.pos,E=_.newPos,O=k.left-E.left,U=k.top-E.top;if(O||U){_.moved=!0;const D=y.style;D.transform=`translate(${O}px,${U}px)`,D.transitionDuration="0s"}}),document.body.offsetHeight,b.forEach(y=>{const _=x.get(y);if(_.moved){let k=function(U){U&&U.target!==y||!y.parentNode||(!U||/transform$/.test(U.propertyName))&&(y.removeEventListener("transitionend",k),y.classList.remove(...O))};_.moved=!1;const E=y.style,O=r().moveClass.split(" ");y.classList.add(...O),E.transform=E.transitionDuration="",y.addEventListener("transitionend",k)}}),x)},new Map),c};function pme(e,t){const r=i=>{var o;return!e.contains(i.target)&&((o=t())==null?void 0:o())};document.body.addEventListener("click",r),_c(()=>document.body.removeEventListener("click",r))}function hme(e,t){const r=i=>{var o,a;i.key==="Escape"&&((o=document.activeElement)==null||o.blur(),(a=t())==null||a())};document.body.addEventListener("keydown",r),_c(()=>document.body.removeEventListener("keydown",r))}const gme=fa('',4,!0),mme={left:0,top:90,right:180,bottom:270},lN=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.secondary,i=()=>e.direction||"left",o=wn("svg")` + transform: rotate(${a=>mme[a.svgDirection]}deg); + transition: transform 0.1s ease-in-out; + `;return zt(o,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",get svgDirection(){return i()},get children(){const a=gme.cloneNode(!0);return sa(()=>Lo(a,"stroke",r())),a}})},yme=fa(''),vme=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const i=yme.cloneNode(!0),o=i.firstChild;return sa(()=>Lo(o,"stroke",r())),i})()},bme=wn.button` + padding: 0; + display: flex; + justify-content: center; + align-items: center; + width: 32px; + height: 32px; + border-radius: 50%; + background-color: ${e=>e.theme.colors.background.secondary}; + border: none; + cursor: pointer; + + transition: transform 0.125s ease-in-out; + + ${Ex} { + &:hover { + transform: scale(1.04); + } + } + + &:active { + transform: scale(0.96); + } + + ${kx} { + &:active { + transform: scale(0.92); + } + } +`,uN=e=>{const t=My(e),r=()=>e.icon||"close";return zt(bme,Au({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[zt(go,{get when(){return!!e.children},get children(){return e.children}}),zt(go,{get when(){return!e.children},get children(){return zt(_x,{get children(){return[zt(Tu,{get when(){return r()==="close"},get children(){return zt(vme,{get fill(){return e.fill}})}}),zt(Tu,{get when(){return r()==="arrow"},get children(){return zt(lN,{get fill(){return e.fill}})}})]}})}})]}}))},wme=wn.div` + display: flex; + align-items: center; + justify-content: center; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.4); + + ${Ic("mobile")} { + align-items: flex-end; + } + + @media (min-width: ${td.mobile.toString()}px) and (max-height: 600px) { + padding: 48px 0; + align-items: flex-start; + overflow: scroll; + } +`,xme=Sc` + position: relative; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16); + min-height: 100px; + width: 440px; + padding: 44px 56px 24px; + + ${Ic("mobile")} { + width: 100%; + } +`,_me=wn(uN)` + position: absolute; + right: 16px; + top: 16px; +`,Sme=fa("
"),Cme=pme,kme=hme,U5={m:"24px",s:"16px",none:"0"},cN=e=>{const t=ol(),r=My(e);return _l(()=>{e.opened?ime():ome()}),zt(Ax,{onBeforeEnter:i=>{const o=lh("mobile")?200:100;i.animate([{opacity:0},{opacity:1}],{duration:o}),lh("mobile")&&i.firstElementChild.animate([{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:o})},onExit:(i,o)=>{const a=lh("mobile")?200:100,s=i.animate([{opacity:1},{opacity:0}],{duration:a});if(lh("mobile")){const l=i.firstElementChild.animate([{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:a});Promise.all([s.finished,l.finished]).then(o)}else s.finished.then(o)},get children(){return zt(go,{get when(){return e.opened},get children(){return zt(wme,Au({"data-tc-modal":"true"},r,{get children(){const i=Sme.cloneNode(!0);return bb(kme,i,()=>()=>e.onClose()),bb(Cme,i,()=>()=>e.onClose()),Oa(i,zt(_me,{icon:"close",onClick:()=>e.onClose()}),null),Oa(i,()=>e.children,null),sa(()=>Dk(i,e4(xme,e.class,Sc` + background-color: ${t.colors.background.primary}; + border-radius: ${U5[t.borderRadius]}; + + ${Ic("mobile")} { + border-radius: ${U5[t.borderRadius]} + ${U5[t.borderRadius]} 0 0; + } + `))),i}}))}})}})},Eme={m:"22px",s:"12px",none:"0"},Ame={m:"18px",s:"8px",none:"0"},Tme=wn.div` + display: grid; + grid-template: 1fr / 1fr 1fr; + width: fit-content; + justify-items: center; + gap: 4px; + + position: relative; + padding: 4px; + border-radius: ${e=>Eme[e.theme.borderRadius]}; + + background-color: ${e=>e.theme.colors.background.secondary}; +`,Ime=wn.div` + position: absolute; + top: 4px; + left: 4px; + + height: calc(100% - 8px); + width: calc(50% - 4px); + + border-radius: ${e=>Ame[e.theme.borderRadius]}; + background-color: ${e=>e.theme.colors.background.segment}; + + transform: ${e=>e.right?"translateX(100%)":"translateX(0)"}; + + transition: transform 0.13s ease-in-out; +`,wP=wn.input` + display: none; +`,xP=wn.label` + padding: 9px 12px; + z-index: 1; + + cursor: ${e=>e.isActive?"default":"pointer"}; + + transition: transform 0.13s ease-in-out; + + &:hover { + transform: ${e=>e.isActive?"none":"scale(1.025)"}; + } + + > * { + ${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`} + } +`,Rme=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return zt(Tme,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[zt(Ime,{get right(){return e.selectedTabIndex===1}}),zt(xP,{get isActive(){return e.selectedTabIndex===0},get children(){return[zt(wP,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,0)}}),Ri(()=>e.tab1)]}}),zt(xP,{get isActive(){return e.selectedTabIndex===1},get children(){return[zt(wP,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,1)}}),Ri(()=>e.tab2)]}})]}})},Pme={m:"16px",s:"8px",none:"0"},dN=256,u4=60,_P=48,SP=24,Mme=wn.div` + display: flex; + align-items: center; + position: relative; + background-color: ${e=>e.theme.colors.background.secondary}; + border-radius: ${e=>Pme[e.theme.borderRadius]}; + padding: ${Iu(SP)} 0; + height: ${Iu(dN+SP*2)}; + width: 100%; + + overflow: hidden; +`,Ome=wn.div` + position: relative; + + width: fit-content; + margin: 0 auto; + + > div:first-child { + display: flex; + align-items: center; + justify-content: center; + } + + rect { + fill: transparent; + } + + path { + fill: ${e=>e.theme.colors.text.primary}; + } +`,Bme=wn.div` + position: absolute; + width: ${Iu(u4)}; + height: ${Iu(u4)}; + background: ${e=>e.theme.colors.background.secondary}; + + display: flex; + align-items: center; + justify-content: center; +`,Ume=wn(Hk)` + width: ${e=>Iu(e.size)}; + height: ${e=>Iu(e.size)}; + border-radius: 12px; +`,Dme=wn(Fu)` + filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); + position: absolute; + bottom: 14px; + left: 50%; + + transform: translate(-50%, 0); + + background-color: ${e=>e.theme.colors.background.segment}; + color: ${e=>e.theme.colors.text.primary}; + + &:hover { + transform: translate(-50%, 0) scale(1.04); + } + + &:active { + transform: translate(-50%, 0) scale(0.96); + } +`;var fN={exports:{}};(function(e,t){var r=function(){var i=function(D,j){var F=236,H=17,W=D,G=a[j],ae=null,V=0,oe=null,P=[],ee={},le=function(At,kt){V=W*4+17,ae=function(Ct){for(var Lt=new Array(Ct),Kt=0;Kt=7&&Le(At),oe==null&&(oe=Rt(W,G,P)),nr(oe,kt)},pe=function(At,kt){for(var Ct=-1;Ct<=7;Ct+=1)if(!(At+Ct<=-1||V<=At+Ct))for(var Lt=-1;Lt<=7;Lt+=1)kt+Lt<=-1||V<=kt+Lt||(0<=Ct&&Ct<=6&&(Lt==0||Lt==6)||0<=Lt&&Lt<=6&&(Ct==0||Ct==6)||2<=Ct&&Ct<=4&&2<=Lt&&Lt<=4?ae[At+Ct][kt+Lt]=!0:ae[At+Ct][kt+Lt]=!1)},xe=function(){for(var At=0,kt=0,Ct=0;Ct<8;Ct+=1){le(!0,Ct);var Lt=l.getLostPoint(ee);(Ct==0||At>Lt)&&(At=Lt,kt=Ct)}return kt},J=function(){for(var At=8;At>Ct&1)==1;ae[Math.floor(Ct/3)][Ct%3+V-8-3]=Lt}for(var Ct=0;Ct<18;Ct+=1){var Lt=!At&&(kt>>Ct&1)==1;ae[Ct%3+V-8-3][Math.floor(Ct/3)]=Lt}},He=function(At,kt){for(var Ct=G<<3|kt,Lt=l.getBCHTypeInfo(Ct),Kt=0;Kt<15;Kt+=1){var yr=!At&&(Lt>>Kt&1)==1;Kt<6?ae[Kt][8]=yr:Kt<8?ae[Kt+1][8]=yr:ae[V-15+Kt][8]=yr}for(var Kt=0;Kt<15;Kt+=1){var yr=!At&&(Lt>>Kt&1)==1;Kt<8?ae[8][V-Kt-1]=yr:Kt<9?ae[8][15-Kt-1+1]=yr:ae[8][15-Kt-1]=yr}ae[V-8][8]=!At},nr=function(At,kt){for(var Ct=-1,Lt=V-1,Kt=7,yr=0,ne=l.getMaskFunction(kt),Mt=V-1;Mt>0;Mt-=2)for(Mt==6&&(Mt-=1);;){for(var Nt=0;Nt<2;Nt+=1)if(ae[Lt][Mt-Nt]==null){var Ie=!1;yr>>Kt&1)==1);var Ae=ne(Lt,Mt-Nt);Ae&&(Ie=!Ie),ae[Lt][Mt-Nt]=Ie,Kt-=1,Kt==-1&&(yr+=1,Kt=7)}if(Lt+=Ct,Lt<0||V<=Lt){Lt-=Ct,Ct=-Ct;break}}},Bt=function(At,kt){for(var Ct=0,Lt=0,Kt=0,yr=new Array(kt.length),ne=new Array(kt.length),Mt=0;Mt=0?rt.getAt(lt):0}}for(var jt=0,Ae=0;AeMt*8)throw"code length overflow. ("+Kt.getLengthInBits()+">"+Mt*8+")";for(Kt.getLengthInBits()+4<=Mt*8&&Kt.put(0,4);Kt.getLengthInBits()%8!=0;)Kt.putBit(!1);for(;!(Kt.getLengthInBits()>=Mt*8||(Kt.put(F,8),Kt.getLengthInBits()>=Mt*8));)Kt.put(H,8);return Bt(Kt,Lt)};ee.addData=function(At,kt){kt=kt||"Byte";var Ct=null;switch(kt){case"Numeric":Ct=v(At);break;case"Alphanumeric":Ct=x(At);break;case"Byte":Ct=b(At);break;case"Kanji":Ct=y(At);break;default:throw"mode:"+kt}P.push(Ct),oe=null},ee.isDark=function(At,kt){if(At<0||V<=At||kt<0||V<=kt)throw At+","+kt;return ae[At][kt]},ee.getModuleCount=function(){return V},ee.make=function(){if(W<1){for(var At=1;At<40;At++){for(var kt=d.getRSBlocks(At,G),Ct=p(),Lt=0;Lt"u"?At*4:kt;var Ct="";Ct+='";for(var Kt=0;Kt';Ct+=""}return Ct+="",Ct+="
",Ct},ee.createSvgTag=function(At,kt,Ct,Lt){var Kt={};typeof arguments[0]=="object"&&(Kt=arguments[0],At=Kt.cellSize,kt=Kt.margin,Ct=Kt.alt,Lt=Kt.title),At=At||2,kt=typeof kt>"u"?At*4:kt,Ct=typeof Ct=="string"?{text:Ct}:Ct||{},Ct.text=Ct.text||null,Ct.id=Ct.text?Ct.id||"qrcode-description":null,Lt=typeof Lt=="string"?{text:Lt}:Lt||{},Lt.text=Lt.text||null,Lt.id=Lt.text?Lt.id||"qrcode-title":null;var yr=ee.getModuleCount()*At+kt*2,ne,Mt,Nt,Ie,Ae="",fe;for(fe="l"+At+",0 0,"+At+" -"+At+",0 0,-"+At+"z ",Ae+=''+Jt(Lt.text)+"":"",Ae+=Ct.text?''+Jt(Ct.text)+"":"",Ae+='',Ae+='"u"?At*4:kt;var Ct=ee.getModuleCount()*At+kt*2,Lt=kt,Kt=Ct-kt;return U(Ct,Ct,function(yr,ne){if(Lt<=yr&&yr"u"?At*4:kt;var Lt=ee.getModuleCount()*At+kt*2,Kt="";return Kt+="",Kt};var Jt=function(At){for(var kt="",Ct=0;Ct":kt+=">";break;case"&":kt+="&";break;case'"':kt+=""";break;default:kt+=Lt;break}}return kt},vr=function(At){var kt=1;At=typeof At>"u"?kt*2:At;var Ct=ee.getModuleCount()*kt+At*2,Lt=At,Kt=Ct-At,yr,ne,Mt,Nt,Ie,Ae={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},fe={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},Be="";for(yr=0;yr=Kt?fe[Ie]:Ae[Ie];Be+=` +`}return Ct%2&&At>0?Be.substring(0,Be.length-Ct-1)+Array(Ct+1).join("\u2580"):Be.substring(0,Be.length-1)};return ee.createASCII=function(At,kt){if(At=At||1,At<2)return vr(kt);At-=1,kt=typeof kt>"u"?At*2:kt;var Ct=ee.getModuleCount()*At+kt*2,Lt=kt,Kt=Ct-kt,yr,ne,Mt,Nt,Ie=Array(At+1).join("\u2588\u2588"),Ae=Array(At+1).join(" "),fe="",Be="";for(yr=0;yr>>8),G.push(oe&255)):G.push(H)}}return G}};var o={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},a={L:1,M:0,Q:3,H:2},s={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},l=function(){var D=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],j=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,F=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,H=1<<14|1<<12|1<<10|1<<4|1<<1,W={},G=function(ae){for(var V=0;ae!=0;)V+=1,ae>>>=1;return V};return W.getBCHTypeInfo=function(ae){for(var V=ae<<10;G(V)-G(j)>=0;)V^=j<=0;)V^=F<5&&(oe+=3+le-5)}for(var P=0;P=256;)W-=255;return D[W]},H}();function c(D,j){if(typeof D.length>"u")throw D.length+"/"+j;var F=function(){for(var W=0;W"u")throw"bad rs block @ typeNumber:"+W+"/errorCorrectionLevel:"+G;for(var V=ae.length/3,oe=[],P=0;P>>7-H%8&1)==1},F.put=function(H,W){for(var G=0;G>>W-G-1&1)==1)},F.getLengthInBits=function(){return j},F.putBit=function(H){var W=Math.floor(j/8);D.length<=W&&D.push(0),H&&(D[W]|=128>>>j%8),j+=1},F},v=function(D){var j=o.MODE_NUMBER,F=D,H={};H.getMode=function(){return j},H.getLength=function(ae){return F.length},H.write=function(ae){for(var V=F,oe=0;oe+2>>8&255)*192+(oe&255),G.put(oe,13),V+=2}if(V>>8)},j.writeBytes=function(F,H,W){H=H||0,W=W||F.length;for(var G=0;G0&&(F+=","),F+=D[H];return F+="]",F},j},k=function(){var D=0,j=0,F=0,H="",W={},G=function(V){H+=String.fromCharCode(ae(V&63))},ae=function(V){if(!(V<0)){if(V<26)return 65+V;if(V<52)return 97+(V-26);if(V<62)return 48+(V-52);if(V==62)return 43;if(V==63)return 47}throw"n:"+V};return W.writeByte=function(V){for(D=D<<8|V&255,j+=8,F+=1;j>=6;)G(D>>>j-6),j-=6},W.flush=function(){if(j>0&&(G(D<<6-j),D=0,j=0),F%3!=0)for(var V=3-F%3,oe=0;oe=j.length){if(W==0)return-1;throw"unexpected end of file./"+W}var V=j.charAt(F);if(F+=1,V=="=")return W=0,-1;if(V.match(/^\s$/))continue;H=H<<6|ae(V.charCodeAt(0)),W+=6}var oe=H>>>W-8&255;return W-=8,oe};var ae=function(V){if(65<=V&&V<=90)return V-65;if(97<=V&&V<=122)return V-97+26;if(48<=V&&V<=57)return V-48+52;if(V==43)return 62;if(V==47)return 63;throw"c:"+V};return G},O=function(D,j){var F=D,H=j,W=new Array(D*j),G={};G.setPixel=function(P,ee,le){W[ee*F+P]=le},G.write=function(P){P.writeString("GIF87a"),P.writeShort(F),P.writeShort(H),P.writeByte(128),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(255),P.writeByte(255),P.writeByte(255),P.writeString(","),P.writeShort(0),P.writeShort(0),P.writeShort(F),P.writeShort(H),P.writeByte(0);var ee=2,le=V(ee);P.writeByte(ee);for(var pe=0;le.length-pe>255;)P.writeByte(255),P.writeBytes(le,pe,255),pe+=255;P.writeByte(le.length-pe),P.writeBytes(le,pe,le.length-pe),P.writeByte(0),P.writeString(";")};var ae=function(P){var ee=P,le=0,pe=0,xe={};return xe.write=function(J,ft){if(J>>>ft!=0)throw"length over";for(;le+ft>=8;)ee.writeByte(255&(J<>>=8-le,pe=0,le=0;pe=J<0&&ee.writeByte(pe)},xe},V=function(P){for(var ee=1<>6,128|u&63):u<55296||u>=57344?s.push(224|u>>12,128|u>>6&63,128|u&63):(l++,u=65536+((u&1023)<<10|a.charCodeAt(l)&1023),s.push(240|u>>18,128|u>>12&63,128|u>>6&63,128|u&63))}return s}return o(i)}})(),function(i){e.exports=i()}(function(){return r})})(fN);const Lme=fN.exports;function pN(e){return navigator?.clipboard?navigator.clipboard.writeText(e):(Nme(e),Promise.resolve())}function Nme(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}var c4=(e,t,r)=>{const i=t.trim().split(".").reduce((o,a)=>o?o[a]:void 0,e);return i!==void 0?i:r},jme=(e,t,r=/{{(.*?)}}/g)=>e.replace(r,(i,o)=>c4(t,o,"")),$me=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[r,i]=Hi(t),[o,a]=$k(e);return[(u,c,d)=>{const p=c4(o[r()],u,d||"");return typeof p=="function"?p(c):typeof p=="string"?jme(p,c||{}):p},{add(u,c){a(u,d=>Object.assign(d||{},c))},locale:u=>u?i(u):r(),dict:u=>c4(o,u)}]},hN=yx({}),Hd=()=>Ql(hN);const Vl=e=>{const[t]=Hd();return Ri(()=>{var r;return t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString())})},Fme=fa("
"),D5={translationKey:"common.copyLink",text:"Copy Link"},zme={translationKey:"common.copied",text:"Copied!"},gN=e=>{let t,r,i;const[o,a]=Hi(!1),[s,l]=Hi(!1),[u,c]=Hi(!1),[d,p]=Hi(D5),[v,x]=Hi(_P);_l(()=>a(s()||u())),_l(()=>!o()&&p(D5)),_l(()=>{const E=Lme(0,"L");E.addData(e.sourceUrl),E.make(),t.innerHTML=E.createSvgTag(4,0);const O=t.firstElementChild.clientWidth,U=Math.round(dN/O*1e5)/1e5;if(i){const D=Math.ceil(u4/(U*4))*4,j=Iu(Math.ceil((O-D)/(2*4))*4);i.style.top=j,i.style.left=j,i.style.height=Iu(D),i.style.width=Iu(D),x(Math.round(_P/U))}r.style.transform=`scale(${U})`});let b=null;const y=()=>{pN(e.sourceUrl),p(zme),b!=null&&clearTimeout(b),b=setTimeout(()=>p(D5),3e3)};return zt(Mme,{get class(){return e.class},get children(){return[zt(Ome,{ref(_){const k=r;typeof k=="function"?k(_):r=_},onMouseEnter:()=>c(!0),onMouseLeave:()=>setTimeout(()=>c(!1)),get children(){return[(()=>{const _=Fme.cloneNode(!0),k=t;return typeof k=="function"?bb(k,_):t=_,_})(),zt(go,{get when(){return e.imageUrl},get children(){return zt(Bme,{ref(_){const k=i;typeof k=="function"?k(_):i=_},get children(){return zt(Ume,{get src(){return e.imageUrl},alt:"",get size(){return v()}})}})}})]}}),zt(Ax,{onBeforeEnter:_=>{_.animate([{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:200})},onExit:(_,k)=>{_.animate([{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:200}).finished.then(()=>{k()})},get children(){return zt(go,{get when(){return o()&&!e.disableCopy},get children(){return zt(Dme,{onClick:y,onMouseEnter:()=>o()&&l(!0),onMouseLeave:()=>setTimeout(()=>l(!1)),get children(){return zt(Vl,{get translationKey(){return d().translationKey},get children(){return d().text}})}})}})}})]}})},Hme=wn.div` + font-style: normal; + font-weight: ${e=>e.fontWeight}; + font-size: ${e=>e.fontSize}; + line-height: ${e=>e.lineHeight}; + + color: ${e=>e.color}; +`,Xl=e=>{const t=ol(),[r]=Hd();let i;const o=()=>e.color||t.colors.text.primary,a=Au({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return _l(()=>{!i||a.cursor!=="unset"&&getComputedStyle(i).cursor!=="pointer"&&(i.style.cursor="default")}),zt(Hme,{get fontSize(){return a.fontSize},get fontWeight(){return a.fontWeight},get lineHeight(){return a.lineHeight},get color(){return o()},get class(){return a.class},ref(s){const l=i;typeof l=="function"?l(s):i=s},"data-tc-text":"true",get children(){var s;return Ri(()=>!!a.translationKey)()?r(a.translationKey,a.translationValues,(s=a.children)==null?void 0:s.toString()):a.children}})},Wme=wn.button` + cursor: pointer; + border: none; + background-color: unset; + padding: 12px 8px 8px; + height: 94px; + width: 92px; + display: flex; + flex-direction: column; + align-items: center; + + transition: transform 0.125s ease-in-out; + + ${Ex} { + &:hover { + transform: scale(1.04); + } + } + + &:active { + transform: scale(0.96); + } + + ${Ic("mobile")} { + padding: 8px 4px; + height: 124px; + width: 82px; + } + + ${kx} { + &:active { + transform: scale(0.92); + } + } +`,Vme=wn(Hk)` + width: 48px; + height: 48px; + border-radius: 12px; + + margin-bottom: 8px; + + ${Ic("mobile")} { + width: 64px; + height: 64px; + border-radius: 16px; + } +`,qme=wn(Xl)` + font-weight: 590; + max-width: 76px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +`,mN=e=>zt(Wme,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[zt(Vme,{get src(){return e.iconUrl},alt:""}),zt(qme,{get children(){return e.name}})]}}),Kme=wn.h1` + font-style: normal; + font-weight: 700; + font-size: 24px; + line-height: 30px; + + text-align: center; + + color: ${e=>e.theme.colors.text.primary}; + + margin-top: 0; + margin-bottom: 6px; + + cursor: default; +`,Tx=e=>{const[t]=Hd();return zt(Kme,{get class(){return e.class},"data-tc-h1":"true",get children(){var r;return Ri(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},Gme=wn.h2` + font-style: normal; + font-weight: 510; + font-size: 16px; + line-height: 20px; + + text-align: center; + + color: ${e=>e.theme.colors.text.secondary}; + + margin-top: 0; + margin-bottom: 32px; + + cursor: default; +`,Ix=e=>{const[t]=Hd();return zt(Gme,{get class(){return e.class},"data-tc-h2":"true",get children(){var r;return Ri(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},Yme=wn.h3` + font-style: normal; + font-weight: 590; + font-size: 15px; + line-height: 20px; + + color: ${e=>e.theme.colors.text.primary}; + + margin-top: 0; + margin-bottom: 0; + + cursor: default; +`,Zme=e=>{const[t]=Hd();return zt(Yme,{"data-tc-h3":"true",get children(){var r;return Ri(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},Qme=fa(''),Xme=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const i=Qme.cloneNode(!0),o=i.firstChild;return sa(()=>Lo(o,"stroke",r())),i})()},Jme=fa(''),e0e=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=Jme.cloneNode(!0),o=i.firstChild;return sa(()=>Lo(o,"fill",r())),i})()},t0e=fa(''),r0e=fa(''),yN=e=>{const t=ol(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.success;return Ri((()=>{const o=Ri(()=>r()==="s");return()=>o()?(()=>{const a=t0e.cloneNode(!0),s=a.firstChild,l=s.nextSibling;return sa(u=>{const c=e.class,d=i(),p=t.colors.constant.white;return c!==u._v$&&Lo(a,"class",u._v$=c),d!==u._v$2&&Lo(s,"fill",u._v$2=d),p!==u._v$3&&Lo(l,"fill",u._v$3=p),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),a})():(()=>{const a=r0e.cloneNode(!0),s=a.firstChild,l=s.nextSibling;return sa(u=>{const c=e.class,d=i(),p=t.colors.constant.white;return c!==u._v$4&&Lo(a,"class",u._v$4=c),d!==u._v$5&&Lo(s,"fill",u._v$5=d),p!==u._v$6&&Lo(l,"fill",u._v$6=p),u},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),a})()})())},n0e=fa(''),i0e=fa(''),vN=e=>{const t=ol(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.error;return Ri((()=>{const o=Ri(()=>r()==="s");return()=>o()?(()=>{const a=n0e.cloneNode(!0),s=a.firstChild,l=s.nextSibling;return sa(u=>{const c=e.class,d=i(),p=t.colors.constant.white;return c!==u._v$&&Lo(a,"class",u._v$=c),d!==u._v$2&&Lo(s,"fill",u._v$2=d),p!==u._v$3&&Lo(l,"fill",u._v$3=p),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),a})():(()=>{const a=i0e.cloneNode(!0),s=a.firstChild,l=s.nextSibling;return sa(u=>{const c=e.class,d=i(),p=t.colors.constant.white;return c!==u._v$4&&Lo(a,"class",u._v$4=c),d!==u._v$5&&Lo(s,"fill",u._v$5=d),p!==u._v$6&&Lo(l,"fill",u._v$6=p),u},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),a})()})())},o0e=fa(''),a0e=fa(''),Rx=e=>{const t=ol(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.tertiary,o=Ege` + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + `,a=Sc` + animation: ${o} 1s linear infinite; + `;return Ri((()=>{const s=Ri(()=>r()==="s");return()=>s()?(()=>{const l=o0e.cloneNode(!0),u=l.firstChild;return sa(c=>{const d=e4(a,e.class),p=i();return d!==c._v$&&Lo(l,"class",c._v$=d),p!==c._v$2&&Lo(u,"fill",c._v$2=p),c},{_v$:void 0,_v$2:void 0}),l})():(()=>{const l=a0e.cloneNode(!0),u=l.firstChild;return sa(c=>{const d=e4(a,e.class),p=i();return d!==c._v$3&&Lo(l,"class",c._v$3=d),p!==c._v$4&&Lo(u,"stroke",c._v$4=p),c},{_v$3:void 0,_v$4:void 0}),l})()})())},Cg=yx(),s0e=fa(''),l0e=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=s0e.cloneNode(!0),o=i.firstChild;return sa(()=>Lo(o,"fill",r())),i})()},u0e=fa(''),c0e=e=>{const t=ol(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=u0e.cloneNode(!0),o=i.firstChild,a=o.nextSibling;return sa(s=>{const l=r(),u=r();return l!==s._v$&&Lo(o,"fill",s._v$=l),u!==s._v$2&&Lo(a,"fill",s._v$2=u),s},{_v$:void 0,_v$2:void 0}),i})()},d0e={m:"8px",s:"4px",none:"0"},f0e={m:"16px",s:"8px",none:"0"},p0e=wn.div` + width: 256px; + box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); + border-radius: ${e=>f0e[e.theme.borderRadius]}; + + background-color: ${e=>e.theme.colors.background.primary} + + color: ${e=>e.theme.colors.text.primary} +`,h0e=wn.ul` + background-color: ${e=>e.theme.colors.background.primary}; + padding: 8px; +`,CP=wn.button` + display: flex; + align-items: center; + gap: 8px; + height: 40px; + padding-left: 8px; + width: 100%; + + background-color: ${e=>e.theme.colors.background.primary}; + border: none; + border-radius: ${e=>d0e[e.theme.borderRadius]}; + cursor: pointer; + + transition: background-color, transform 0.1s ease-in-out; + + &:hover { + background-color: ${e=>e.theme.colors.background.secondary}; + } + + &:active { + transform: scale(0.96); + } +`,kP=fa("
  • "),L5=e=>zt(Xl,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),g0e=e=>{const t=Ql(Cg),[r,i]=Hi(!1),o=()=>cl(void 0,null,function*(){const s=Ok(t.account.address,t.account.chain===z0.TESTNET);yield pN(s),i(!0),setTimeout(()=>i(!1),1e3)}),a=()=>{t.disconnect(),e.onClose()};return zt(p0e,{ref(s){const l=e.ref;typeof l=="function"?l(s):e.ref=s},get class(){return e.class},"data-tc-dropdown":"true",get children(){return zt(h0e,{get children(){return[(()=>{const s=kP.cloneNode(!0);return Oa(s,zt(CP,{onClick:()=>o(),get children(){return[zt(l0e,{}),zt(go,{get when(){return!r()},get children(){return zt(L5,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),zt(go,{get when(){return r()},get children(){return zt(L5,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),s})(),(()=>{const s=kP.cloneNode(!0);return Oa(s,zt(CP,{onClick:()=>a(),get children(){return[zt(c0e,{}),zt(L5,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),s})()]}})}})},m0e={m:"16px",s:"8px",none:"0"},y0e=wn.div` + width: 256px; + padding: 12px 16px; + display: flex; + gap: 9px; + + background-color: ${e=>e.theme.colors.background.primary}; + box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); + border-radius: ${e=>m0e[e.theme.borderRadius]}; +`,v0e=wn.div` + width: 192px; +`,b0e=wn(Xl)` + margin-top: 4px; + color: ${e=>e.theme.colors.text.secondary}; +`,Vk=e=>{const t=My(e);return zt(y0e,Au({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[zt(v0e,{get children(){return[zt(Zme,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),zt(go,{get when(){return e.text},get children(){return zt(b0e,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),Ri(()=>e.icon)]}}))},w0e=wn(Rx)` + align-self: center; +`,x0e=e=>{var t;const r=Ql(Cg),[i]=Hd(),o=((t=r.wallet)==null?void 0:t.name)||i("common.yourWallet",{},"your wallet");return zt(Vk,{header:{translationKey:"notifications.confirm.header",translationValues:{name:o}},get class(){return e.class},get icon(){return zt(w0e,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},_0e=wn(vN)` + margin-top: 2px; +`,S0e=e=>zt(Vk,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return zt(_0e,{})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),C0e=wn(yN)` + margin-top: 2px; +`,k0e=e=>zt(Vk,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return zt(C0e,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),N5=Sc` + transform: translateY(-8px); + margin-bottom: 12px; +`,E0e=fa('
    '),A0e=e=>{const t=[],[r,i]=Hi([]);let o=-1;const a=4500;return _l(zhe(Vp,s=>{if(s&&s.showNotification){o++;const l=o;i(u=>u.filter(c=>c.action!=="confirm-transaction").concat({id:l,action:s.name})),t.push(setTimeout(()=>i(u=>u.filter(c=>c.id!==l)),a))}})),_c(()=>{t.forEach(clearTimeout)}),(()=>{const s=E0e.cloneNode(!0);return Oa(s,zt(fme,{onBeforeEnter:l=>{l.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(l,u)=>{l.animate([{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(u)},get children(){return zt(xx,{get each(){return r()},children:l=>zt(_x,{get children(){return[zt(Tu,{get when(){return l.action==="transaction-sent"},get children(){return zt(k0e,{class:N5})}}),zt(Tu,{get when(){return l.action==="transaction-canceled"},get children(){return zt(S0e,{class:N5})}}),zt(Tu,{get when(){return l.action==="confirm-transaction"},get children(){return zt(x0e,{class:N5})}})]}})})}})),sa(()=>Dk(s,e.class)),s})()},bN=wn(Fu)` + background-color: ${e=>e.theme.colors.connectButton.background}; + color: ${e=>e.theme.colors.connectButton.foreground}; + box-shadow: ${e=>`0 4px 24px ${Cx(e.theme.colors.constant.black,.16)}`}; + padding: 8px 16px 8px 12px; + + display: flex; + align-items: center; + gap: 4px; + height: 40px; +`,T0e=wn(bN)` + padding: 12px 16px; + min-width: 148px; + justify-content: center; + background-color: ${e=>e.theme.colors.background.primary}; +`,I0e=wn(Fu)` + min-width: 148px; + height: 40px; + + background-color: ${e=>e.theme.colors.background.primary}; + color: ${e=>e.theme.colors.connectButton.foreground}; + box-shadow: ${e=>`0 4px 24px ${Cx(e.theme.colors.constant.black,.16)}`}; + + display: flex; + align-items: center; + justify-content: center; +`,R0e=wn(Rx)` + height: 18px; + width: 18px; +`,P0e=wn.div` + width: fit-content; + display: flex; + flex-direction: column; + align-items: flex-end; +`,M0e=wn(g0e)` + box-sizing: border-box; + overflow: hidden; + margin-top: 12px; +`,O0e=wn(A0e)` + > div:first-child { + margin-top: 20px; + } +`;function wN(e){return e.split("-")[0]}function B0e(e){return e.split("-")[1]}function U0e(e){return["top","bottom"].includes(wN(e))?"x":"y"}function D0e(e){return e==="y"?"height":"width"}function EP(e,t,r){let{reference:i,floating:o}=e;const a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=U0e(t),u=D0e(l),c=i[u]/2-o[u]/2,d=wN(t),p=l==="x";let v;switch(d){case"top":v={x:a,y:i.y-o.height};break;case"bottom":v={x:a,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:s};break;case"left":v={x:i.x-o.width,y:s};break;default:v={x:i.x,y:i.y}}switch(B0e(t)){case"start":v[l]-=c*(r&&p?-1:1);break;case"end":v[l]+=c*(r&&p?-1:1);break}return v}const L0e=(e,t,r)=>cl(void 0,null,function*(){const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),u=yield s.isRTL==null?void 0:s.isRTL(t);if({}.NODE_ENV!=="production"){if(s==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),l.filter(y=>{let{name:_}=y;return _==="autoPlacement"||_==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));(!e||!t)&&console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=EP(c,i,u),v=i,x={},b=0;for(let y=0;y50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),D&&b<=50){b++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(c=D.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:d,y:p}=EP(c,v,u)),y=-1;continue}}return{x:d,y:p,placement:v,strategy:o,middlewareData:x}});function AP(e){return Pd(Yo({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Rc(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Uu(e){return Rc(e).getComputedStyle(e)}function Od(e){return _N(e)?(e.nodeName||"").toLowerCase():""}let Lv;function xN(){if(Lv)return Lv;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Lv=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Lv):navigator.userAgent}function Du(e){return e instanceof Rc(e).HTMLElement}function Sl(e){return e instanceof Rc(e).Element}function _N(e){return e instanceof Rc(e).Node}function TP(e){if(typeof ShadowRoot>"u")return!1;const t=Rc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Px(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=Uu(e);return/auto|scroll|overlay|hidden/.test(t+i+r)&&!["inline","contents"].includes(o)}function N0e(e){return["table","td","th"].includes(Od(e))}function qk(e){const t=/firefox/i.test(xN()),r=Uu(e),i=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||(i?i!=="none":!1)||t&&r.willChange==="filter"||t&&(r.filter?r.filter!=="none":!1)||["transform","perspective"].some(o=>r.willChange.includes(o))||["paint","layout","strict","content"].some(o=>{const a=r.contain;return a!=null?a.includes(o):!1})}function SN(){return!/^((?!chrome|android).)*safari/i.test(xN())}function Kk(e){return["html","body","#document"].includes(Od(e))}const IP=Math.min,a0=Math.max,RP=Math.round,d4={x:1,y:1};function G0(e){const t=!Sl(e)&&e.contextElement?e.contextElement:Sl(e)?e:null;if(!t)return d4;const r=t.getBoundingClientRect(),i=Uu(t);if(i.boxSizing!=="border-box")return Du(t)?{x:t.offsetWidth>0&&RP(r.width)/t.offsetWidth||1,y:t.offsetHeight>0&&RP(r.height)/t.offsetHeight||1}:d4;let o=r.width/parseFloat(i.width),a=r.height/parseFloat(i.height);return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}function Bd(e,t,r,i){var o,a,s,l;t===void 0&&(t=!1),r===void 0&&(r=!1);const u=e.getBoundingClientRect();let c=d4;t&&(i?Sl(i)&&(c=G0(i)):c=G0(e));const d=Sl(e)?Rc(e):window,p=!SN()&&r,v=(u.left+(p&&(o=(a=d.visualViewport)==null?void 0:a.offsetLeft)!=null?o:0))/c.x,x=(u.top+(p&&(s=(l=d.visualViewport)==null?void 0:l.offsetTop)!=null?s:0))/c.y,b=u.width/c.x,y=u.height/c.y;return{width:b,height:y,top:x,right:v+b,bottom:x+y,left:v,x:v,y:x}}function Wd(e){return((_N(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mx(e){return Sl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function CN(e){return Bd(Wd(e)).left+Mx(e).scrollLeft}function j0e(e,t,r){const i=Du(t),o=Wd(t),a=Bd(e,!0,r==="fixed",t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(i||!i&&r!=="fixed")if((Od(t)!=="body"||Px(o))&&(s=Mx(t)),Du(t)){const u=Bd(t,!0);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=CN(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Y0(e){if(Od(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(TP(e)?e.host:null)||Wd(e);return TP(t)?t.host:t}function PP(e){return!Du(e)||Uu(e).position==="fixed"?null:e.offsetParent}function $0e(e){let t=Y0(e);for(;Du(t)&&!Kk(t);){if(qk(t))return t;t=Y0(t)}return null}function MP(e){const t=Rc(e);let r=PP(e);for(;r&&N0e(r)&&Uu(r).position==="static";)r=PP(r);return r&&(Od(r)==="html"||Od(r)==="body"&&Uu(r).position==="static"&&!qk(r))?t:r||$0e(e)||t}function F0e(e){if(Du(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Bd(e);return{width:t.width,height:t.height}}function z0e(e){let{rect:t,offsetParent:r,strategy:i}=e;const o=Du(r),a=Wd(r);if(r===a)return t;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((o||!o&&i!=="fixed")&&((Od(r)!=="body"||Px(a))&&(s=Mx(r)),Du(r))){const c=Bd(r);l=G0(r),u.x=c.x+r.clientLeft,u.y=c.y+r.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-s.scrollLeft*l.x+u.x,y:t.y*l.y-s.scrollTop*l.y+u.y}}function H0e(e,t){const r=Rc(e),i=Wd(e),o=r.visualViewport;let a=i.clientWidth,s=i.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;const c=SN();(c||!c&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l,y:u}}function W0e(e){var t;const r=Wd(e),i=Mx(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=a0(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=a0(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-i.scrollLeft+CN(e);const u=-i.scrollTop;return Uu(o||r).direction==="rtl"&&(l+=a0(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:l,y:u}}function kN(e){const t=Y0(e);return Kk(t)?e.ownerDocument.body:Du(t)&&Px(t)?t:kN(t)}function s0(e,t){var r;t===void 0&&(t=[]);const i=kN(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Rc(i);return o?t.concat(a,a.visualViewport||[],Px(i)?i:[]):t.concat(i,s0(i))}function V0e(e,t){const r=Bd(e,!0,t==="fixed"),i=r.top+e.clientTop,o=r.left+e.clientLeft,a=Du(e)?G0(e):{x:1,y:1},s=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,c=i*a.y;return{top:c,left:u,right:u+s,bottom:c+l,x:u,y:c,width:s,height:l}}function OP(e,t,r){return t==="viewport"?AP(H0e(e,r)):Sl(t)?V0e(t,r):AP(W0e(Wd(e)))}function q0e(e,t){const r=t.get(e);if(r)return r;let i=s0(e).filter(l=>Sl(l)&&Od(l)!=="body"),o=null;const a=Uu(e).position==="fixed";let s=a?Y0(e):e;for(;Sl(s)&&!Kk(s);){const l=Uu(s),u=qk(s);(a?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position))?i=i.filter(d=>d!==s):o=l,s=Y0(s)}return t.set(e,i),i}function K0e(e){let{element:t,boundary:r,rootBoundary:i,strategy:o}=e;const s=[...r==="clippingAncestors"?q0e(t,this._c):[].concat(r),i],l=s[0],u=s.reduce((c,d)=>{const p=OP(t,d,o);return c.top=a0(p.top,c.top),c.right=IP(p.right,c.right),c.bottom=IP(p.bottom,c.bottom),c.left=a0(p.left,c.left),c},OP(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const G0e={getClippingRect:K0e,convertOffsetParentRelativeRectToViewportRelativeRect:z0e,isElement:Sl,getDimensions:F0e,getOffsetParent:MP,getDocumentElement:Wd,getScale:G0,getElementRects(e){return cl(this,null,function*(){let{reference:t,floating:r,strategy:i}=e;const o=this.getOffsetParent||MP,a=this.getDimensions;return{reference:j0e(t,yield o(r),i),floating:Yo({x:0,y:0},yield a(r))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Uu(e).direction==="rtl"};function Y0e(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=!0,animationFrame:l=!1}=i,u=o&&!l,c=u||a?[...Sl(e)?s0(e):e.contextElement?s0(e.contextElement):[],...s0(t)]:[];c.forEach(b=>{u&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});let d=null;if(s){let b=!0;d=new ResizeObserver(()=>{b||r(),b=!1}),Sl(e)&&!l&&d.observe(e),!Sl(e)&&e.contextElement&&!l&&d.observe(e.contextElement),d.observe(t)}let p,v=l?Bd(e):null;l&&x();function x(){const b=Bd(e);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&r(),v=b,p=requestAnimationFrame(x)}return r(),()=>{var b;c.forEach(y=>{u&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),(b=d)==null||b.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const Z0e=(e,t,r)=>{const i=new Map,o=Yo({platform:G0e},r),a=Pd(Yo({},o.platform),{_c:i});return L0e(e,t,Pd(Yo({},o),{platform:a}))};function Q0e(e,t,r){let i=()=>{var p;return(p=r?.placement)!=null?p:"bottom"},o=()=>{var p;return(p=r?.strategy)!=null?p:"absolute"},[a,s]=Hi({x:null,y:null,placement:i(),strategy:o(),middlewareData:{}}),[l,u]=Hi();_l(()=>{let p=l();if(p)throw p.value});let c=Ri(()=>(e(),t(),{}));function d(){let p=e(),v=t();if(p&&v){let x=c();Z0e(p,v,{middleware:r?.middleware,placement:i(),strategy:o()}).then(b=>{x===c()&&s(b)},b=>{u(b)})}}return _l(()=>{let p=e(),v=t();if(r?.middleware,i(),o(),p&&v)if(r!=null&&r.whileElementsMounted){let x=r.whileElementsMounted(p,v,d);x&&_c(x)}else d()}),{get x(){return a().x},get y(){return a().y},get placement(){return a().placement},get strategy(){return a().strategy},get middlewareData(){return a().middlewareData},update:d}}const X0e=fa(''),J0e=()=>{const e=ol(),t=Ql(Sx),r=Ql(Cg),[i,o]=Hi(!1),[a,s]=Hi(t.account),[l,u]=Hi(!0);let c;const[d,p]=Hi(),[v,x]=Hi(),b=Q0e(v,d,{whileElementsMounted:Y0e,placement:"bottom-end"}),y=()=>{const E=a();if(E){const O=Ok(E.address,E.chain===z0.TESTNET);return O.slice(0,4)+"\u2026"+O.slice(-4)}return""};r.connectionRestored.then(()=>u(!1));const _=t.onStatusChange(E=>{if(!E){o(!1),s(null);return}s(E.account)}),k=E=>{if(!a()||!i())return;const O=v().contains(E.target),U=c.contains(E.target);!O&&!U&&o(!1)};return Hhe(()=>{document.body.addEventListener("click",k)}),_c(()=>{document.body.removeEventListener("click",k),_()}),zt(Lk,{component:rc,get children(){return[zt(go,{get when(){return l()},get children(){return zt(I0e,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return zt(R0e,{})}})}}),zt(go,{get when(){return!l()},get children(){return[zt(go,{get when(){return!a()},get children(){return zt(bN,{onClick:()=>r.connectWallet(),"data-tc-connect-button":"true",get children(){return[zt(e0e,{get fill(){return e.colors.connectButton.foreground}}),zt(Xl,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),zt(go,{get when(){return a()},get children(){return zt(P0e,{get children(){return[zt(T0e,{onClick:()=>o(E=>!E),ref:x,"data-tc-dropdown-button":"true",get children(){return[zt(Xl,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return y()}}),zt(lN,{direction:"bottom"})]}}),zt(QL,{get children(){const E=Va(()=>document.importNode(X0e,!0));return bb(p,E),E.style.setProperty("z-index","999"),E._$owner=Whe(),Oa(E,zt(Ax,{onBeforeEnter:O=>{O.animate([{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(O,U)=>{O.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(U)},get children(){return zt(go,{get when(){return i()},get children(){return zt(M0e,{get hidden(){return!i()},onClose:()=>o(!1),ref(O){const U=c;typeof U=="function"?U(O):c=O}})}})}}),null),Oa(E,zt(O0e,{}),null),sa(O=>{var U,D;const j=b.strategy,F=`${(U=b.y)!=null?U:0}px`,H=`${(D=b.x)!=null?D:0}px`;return j!==O._v$&&E.style.setProperty("position",O._v$=j),F!==O._v$2&&E.style.setProperty("top",O._v$2=F),H!==O._v$3&&E.style.setProperty("left",O._v$3=H),O},{_v$:void 0,_v$2:void 0,_v$3:void 0}),E}})]}})}})]}})]}})},eye={m:"16px",s:"8px",none:"0"},tye=wn.div` + ${Ic("mobile")} { + padding: 10px 16px 0 16px; + } +`,rye=wn(Tx)` + max-width: 320px; + margin: 0 auto 6px; +`,nye=wn(uN)` + position: absolute; + top: 16px; + left: 16px; +`,iye=wn(gN)` + margin-bottom: 16px; +`,oye=wn.div` + display: flex; + gap: 16px; + height: 56px; + margin-bottom: 24px; +`,BP=wn(Fu)` + padding: 0 16px; + height: 56px; + font-size: 16px; + line-height: 20px; + width: 100%; + border-radius: ${e=>eye[e.theme.borderRadius]}; +`,aye=wn.div` + display: flex; + justify-content: space-between; + align-items: center; +`,sye=wn(Xl)` + padding-left: 8px; + color: ${e=>e.theme.colors.text.secondary}; + font-size: 16px; +`,[$a,Nv]=$k({buttonRootId:null,language:"en",returnStrategy:"back",walletsListConfiguration:{}}),lye=wn.a` + display: block; + text-decoration: unset; +`,Ox=e=>zt(lye,Au({get href(){return e.href},get target(){return e.blank?"_blank":"_self"}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),uye=e=>{const t=Ql(Sx),r=Ri(()=>t.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest));return zt(tye,{"data-tc-wallet-qr-modal-desktop":"true",get children(){return[zt(nye,{icon:"arrow",onClick:()=>e.onBackClick()}),zt(rye,{translationKey:"walletModal.qrCodeModal.connectWith",get translationValues(){return{name:e.wallet.name}},get children(){return["Connect with ",Ri(()=>e.wallet.name)]}}),zt(Ix,{translationKey:"walletModal.qrCodeModal.scan",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan QR code with your phone\u2019s or ",Ri(()=>e.wallet.name),"\u2019s camera."]}}),zt(iye,{disableCopy:!1,get sourceUrl(){return r()},get imageUrl(){return e.wallet.imageUrl}}),zt(oye,{get children(){return[zt(BP,{scale:"s",onClick:()=>{Wl(Pd(Yo({},e.wallet),{openMethod:"universal-link"})),Wk(K0(r(),$a.returnStrategy))},get children(){return zt(Vl,{translationKey:"walletModal.qrCodeModal.openWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Open ",Ri(()=>e.wallet.name)]}})}}),zt(go,{get when(){return mx(e.wallet)},get children(){return zt(BP,{scale:"s",onClick:()=>{Wl(e.wallet),t.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest)},get children(){return zt(Vl,{translationKey:"common.openExtension",children:"Open Extension"})}})}})]}}),zt(aye,{get children(){return[zt(sye,{translationKey:"walletModal.qrCodeModal.dontHave",get translationValues(){return{name:e.wallet.name}},get children(){return["Don't have ",Ri(()=>e.wallet.name),"?"]}}),zt(Ox,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return zt(Fu,{get children(){return zt(Vl,{translationKey:"common.get",children:"GET"})}})}})]}})]}})},cye=wn(cN)` + padding-left: 24px; + padding-right: 24px; + + ${Ic("mobile")} { + padding-left: 0; + padding-right: 0; + + min-height: 364px; + } +`,dye=wn(Tx)` + margin-top: 12px; + + ${Ic("mobile")} { + padding: 0 10px; + } +`,fye=wn.div` + margin: 30px 0; + width: 100%; + display: flex; + justify-content: center; + + ${Ic("mobile")} { + height: 160px; + align-items: center; + } +`,UP=wn(Xl)` + min-width: 84px; + text-align: center; + font-weight: 590; +`,pye=wn(Rme)` + margin: 0 auto 22px; +`;function hye(e){return[...new Set(e)]}function gye(e,t,r){return t.map(i=>{const o=r.find(a=>a[e]===i[e]);return r=r.filter(a=>a[e]!==i[e]),o===void 0?i:o}).concat(r)}function mye(e){return"jsBridgeKey"in e?Pd(Yo({},e),{injected:sp.isWalletInjected(e.jsBridgeKey),embedded:sp.isInsideWalletBrowser(e.jsBridgeKey)}):e}function EN(e,t){var r;return t&&(r=t.includeWallets)!=null&&r.length&&(e=gye("name",e,t.includeWallets.map(mye))),e}const[DP,yye]=Hi(lh("mobile"));sN()&&window.addEventListener("resize",()=>yye(lh("mobile")));const vye=wn.ul` + display: flex; + margin: 0 auto 24px; + width: fit-content; + min-height: 124px; + max-width: 100%; + overflow-x: auto; + overflow-y: hidden; + padding: 0 24px; + + &&::-webkit-scrollbar { + display: none; + } + + -ms-overflow-style: none; + scrollbar-width: none; +`,bye=wn.li` + width: 82px; + min-width: 82px; + height: 124px; + display: flex; + flex-direction: column; + align-items: center; + padding: 8px 4px; + + text-align: center; + cursor: pointer; + + transition: transform 0.1s ease-in-out; + + ${Ex} { + &:hover { + transform: scale(1.04); + } + } + + &:active { + transform: scale(0.96); + } + + ${kx} { + &:active { + transform: scale(0.92); + } + } +`,wye=wn.div` + width: 1px; + margin: 0 10px; + height: 24px; + position: relative; + top: 30px; + + background-color: ${e=>e.theme.colors.icon.tertiary}; +`,xye=wn.div` + width: 64px; + height: 64px; + border-radius: 16px; + display: flex; + align-items: center; + justify-content: center; + + background-color: ${e=>Cx(e.theme.colors.accent,.12)}; + color: ${e=>e.theme.colors.accent}; + + margin-bottom: 8px; +`,_ye=wn(Ix)` + margin-bottom: 24px; + padding: 0 24px; + min-height: 44px; +`,Sye=wn(Fu)` + display: block; + margin: 0 auto; +`,Gk={LEARN_MORE:"https://ton.org/wallets"},Cye=fa('
    '),kye=fa("
  • "),Eye=e=>{const t=$a.connector,r=ol(),i=a=>{if(!ume())return e.onSelect(a);if("universalLink"in a){Wl(Pd(Yo({},a),{openMethod:"universal-link"}));const s=t.connect({universalLink:a.universalLink,bridgeUrl:a.bridgeUrl},e.additionalRequest);q0(K0(s,$a.returnStrategy));return}Wk(a.aboutUrl)},o=()=>{const a=t.connect(e.walletsList.filter(Mk).map(s=>({bridgeUrl:s.bridgeUrl,universalLink:s.universalLink})),e.additionalRequest);Wl({openMethod:"universal-link"}),q0(K0(a,$a.returnStrategy))};return(()=>{const a=Cye.cloneNode(!0);return Oa(a,zt(Tx,{translationKey:"walletModal.mobileSelectWalletModal.connectWallet",children:"Connect a wallet"}),null),Oa(a,zt(_ye,{translationKey:"walletModal.mobileSelectWalletModal.selectWallet",children:"Select your wallet from the options to get started."}),null),Oa(a,zt(vye,{get children(){return[zt(bye,{onClick:o,get children(){return[zt(xye,{get children(){return zt(Xme,{get fill(){return r.colors.accent}})}}),zt(Xl,{fontWeight:590,translationKey:"walletModal.mobileSelectWalletModal.installedWallet",children:"Installed wallet"})]}}),zt(wye,{children:"\xA0"}),zt(xx,{get each(){return e.walletsList.filter(s=>"bridgeUrl"in s)},children:s=>(()=>{const l=kye.cloneNode(!0);return Oa(l,zt(mN,{get iconUrl(){return s.imageUrl},get name(){return s.name},onClick:()=>i(s)})),l})()})]}}),null),Oa(a,zt(Ox,{get href(){return Gk.LEARN_MORE},blank:!0,get children(){return zt(Sye,{get children(){return zt(Vl,{translationKey:"common.learnMore",children:"Learn more"})}})}}),null),a})()},AN={m:"16px",s:"8px",none:"0"},Aye={m:"8px",s:"4px",none:"0"},Tye=wn.div` + display: flex; + flex-direction: column; + align-items: center; +`,Iye=wn(Ix)` + max-width: 320px; + margin-bottom: 24px; +`,Rye=wn(gN)` + margin-bottom: 16px; +`,Pye=wn.div` + display: flex; + gap: 16px; + width: 100%; +`,LP=wn(Fu)` + position: relative; + font-size: 16px; + line-height: 20px; + width: 100%; + padding: 0 16px; + height: 56px; + border-radius: ${e=>AN[e.theme.borderRadius]}; + + &:hover { + ${e=>e.disableEventsAnimation?"transform: unset;":""} + } + + &:active { + ${e=>e.disableEventsAnimation?"transform: unset;":""} + } +`,Mye=wn.ul` + position: absolute; + bottom: 100%; + left: 0; + margin: 0; + padding: 8px; + width: 188px; + transform: translateY(-16px); + + background-color: ${e=>e.theme.colors.background.primary}; + border-radius: ${e=>AN[e.theme.borderRadius]}; + box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); +`,Oye=wn.li` + padding: 8px; + + display: flex; + align-items: center; + gap: 8px; + + cursor: pointer; + border-radius: ${e=>Aye[e.theme.borderRadius]}; + + transition: background-color, transform 0.1s ease-in-out; + + &:hover { + background-color: ${e=>e.theme.colors.background.secondary}; + } + + &:active { + transform: scale(0.96); + } +`,Bye=wn(Hk)` + width: 24px; + height: 24px; + + border-radius: 6px; +`,Uye=wn.div` + margin-top: 23px; + margin-bottom: 1px; + width: 100%; + display: flex; + justify-content: center; + align-items: center; +`;wn(Xl)` + color: ${e=>e.theme.colors.text.secondary}; + font-size: 16px; +`;const Dye=e=>{const[t,r]=Hi(!1),i=$a.connector,o=e.walletsList.filter(Mk).map(d=>({bridgeUrl:d.bridgeUrl,universalLink:d.universalLink})),a=e.walletsList.filter(mx);Wl({openMethod:"qrcode"});const s=Ri(()=>i.connect(o,e.additionalRequest)),l=()=>{let d=!1;function p(){d=!0,Wl({openMethod:"universal-link"}),window.removeEventListener("blur",p)}window.addEventListener("blur",p),q0(K0(s(),$a.returnStrategy)),setTimeout(()=>{d||e.openWalletFallback(),window.removeEventListener("blur",p)},200)},u=d=>{if(d.stopPropagation(),a.length===1){const p=a[0];Wl(p),i.connect({jsBridgeKey:p.jsBridgeKey},e.additionalRequest);return}r(p=>!p)},c=d=>{Wl(d),i.connect({jsBridgeKey:d.jsBridgeKey},e.additionalRequest)};return zt(Tye,{onClick:()=>r(!1),"data-tc-universal-qr-desktop":"true",get children(){return[zt(Iye,{translationKey:"walletModal.universalQRModal.scanQR",children:"Scan QR code with a TON Connect compatible wallet."}),zt(Rye,{get sourceUrl(){return s()},get disableCopy(){return t()}}),zt(Pye,{get children(){return[zt(LP,{onClick:l,scale:"s",get children(){return[zt(go,{get when(){return a.length},get children(){return zt(Vl,{translationKey:"walletModal.universalQRModal.openWallet",children:"Open Wallet"})}}),zt(go,{get when(){return!a.length},get children(){return zt(Vl,{translationKey:"walletModal.universalQRModal.openInstalledWallet",children:"Open Installed Wallet"})}})]}}),zt(go,{get when(){return a.length},get children(){return zt(LP,{onClick:u,get disableEventsAnimation(){return t()},scale:"s",get children(){return[zt(Ax,{onBeforeEnter:d=>{d.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-16px)"}],{duration:150})},onExit:(d,p)=>{d.animate([{opacity:1,transform:"translateY(-16px)"},{opacity:0,transform:"translateY(0)"}],{duration:150}).finished.then(p)},get children(){return zt(go,{get when(){return t()},get children(){return zt(Mye,{get children(){return zt(xx,{each:a,children:d=>zt(Oye,{onClick:()=>c(d),get children(){return[zt(Bye,{get src(){return d.imageUrl},alt:""}),zt(Xl,{fontWeight:590,get children(){return d.name}})]}})})}})}})}}),zt(Vl,{translationKey:"common.openExtension",children:"Open Extension"})]}})}})]}}),zt(go,{get when(){return!a.length},get children(){return zt(Uye,{get children(){return zt(Ox,{get href(){return Gk.LEARN_MORE},blank:!0,get children(){return zt(Fu,{appearance:"flat",class:Sc` + font-size: 15px; + `,get children(){return zt(Vl,{translationKey:"common.learnMore",children:"Learn more"})}})}})}})}})]}})},Lye=wn.div` + display: flex; + flex-direction: column; + align-items: center; +`,Nye=wn(Ix)` + margin-bottom: 26px; +`,jye=wn.ul` + display: grid; + grid-template-columns: repeat(auto-fit, 92px); + justify-content: center; + row-gap: 8px; + overflow-y: auto; + max-height: 410px; + width: calc(100% + 12px); + margin-bottom: 30px; + padding: 10px 0; + align-self: flex-start; + + &&::-webkit-scrollbar { + width: 8px; + } + + &&::-webkit-scrollbar-track { + background: transparent; + } + + &&::-webkit-scrollbar-thumb { + background: #cacaca; + border-radius: 12px; + } +`,$ye=wn(Fu)` + display: block; + margin: 0 auto 1px; + font-size: 15px; +`,Fye=fa("
  • "),zye=e=>zt(Lye,{"data-tc-select-wallet-desktop":"true",get children(){return[zt(Nye,{translationKey:"walletModal.desktopSelectWalletModal.selectWallet",children:"Choose your preferred wallet from the options to get started."}),zt(jye,{get children(){return zt(xx,{get each(){return e.walletsList},children:t=>(()=>{const r=Fye.cloneNode(!0);return Oa(r,zt(mN,{get iconUrl(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),r})()})}}),zt(Ox,{get href(){return Gk.LEARN_MORE},blank:!0,get children(){return zt($ye,{appearance:"flat",get children(){return zt(Vl,{translationKey:"common.learnMore",children:"Learn more"})}})}})]}}),Hye=fa('
    '),Wye=()=>{const{locale:e}=Hd()[1];_l(()=>e($a.language));const t=Ql(Sx),r=Ql(Cg),[i]=Fhe(()=>r.getWallets()),[o,a]=Hi(null),[s,l]=Hi(0),u=Ri(()=>{if(i.state!=="ready")return null;let b=EN(i(),$a.walletsListConfiguration);const y=$a.preferredWalletName,_=b.find(E=>E.name===y),k=b.filter(E=>E.name===y).length>=2;return y&&_&&!k&&(b=[_].concat(b.filter(E=>E.name!==y))),b}),c=()=>{var b;return((b=$a.connectRequestParameters)==null?void 0:b.state)==="loading"},d=Ri(()=>{var b;if(!c())return(b=$a.connectRequestParameters)==null?void 0:b.value}),p=()=>{a4(!1),a(null)},v=b=>{if(mx(b)){Wl(b),t.connect({jsBridgeKey:b.jsBridgeKey},d());return}if(Mk(b)){Wl(Pd(Yo({},b),{openMethod:"qrcode"})),a(b);return}Wk(b.aboutUrl)},x=t.onStatusChange(b=>{b&&p()});return _c(x),zt(cye,{get opened(){return vge()},onClose:p,"data-tc-wallets-modal-container":"true",get children(){return[zt(go,{get when(){return c()||!u()},get children(){return[zt(dye,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),zt(fye,{get children(){return zt(Rx,{size:"m"})}})]}}),zt(go,{get when(){return Ri(()=>!c())()&&u()},get children(){return[zt(go,{get when(){return Ri(()=>!!DP())()&&!o()},get children(){return zt(Eye,{onSelect:v,get walletsList(){return u()},get additionalRequest(){return d()}})}}),zt(go,{get when(){return!DP()},get children(){return zt(go,{get when(){return!o()},get children(){const b=Hye.cloneNode(!0);return Oa(b,zt(pye,{get tab1(){return zt(UP,{translationKey:"walletModal.qrCode",cursor:"unset",children:"QR Code"})},get tab2(){return zt(UP,{translationKey:"walletModal.wallets",cursor:"unset",children:"Wallets"})},get selectedTabIndex(){return s()},onSelectedTabIndexChange:l}),null),Oa(b,zt(_x,{get children(){return[zt(Tu,{get when(){return s()===0},get children(){return zt(Dye,{get walletsList(){return u()},get additionalRequest(){return d()},openWalletFallback:()=>l(1)})}}),zt(Tu,{get when(){return s()===1},get children(){return zt(zye,{get walletsList(){return u()},onSelect:v})}})]}}),null),b}})}}),zt(go,{get when(){return o()},get children(){return zt(uye,{get additionalRequest(){return d()},get wallet(){return o()},onBackClick:()=>a(null)})}})]}})]}})},Vye=wn.div` + display: flex; + flex-direction: column; + align-items: center; + padding-bottom: 8px; +`,qye=wn(Tx)` + margin-top: 16px; +`,Kye=wn(Xl)` + font-weight: 510; + font-size: 16px; + line-height: 20px; + text-align: center; + max-width: 250px; + + color: ${e=>e.theme.colors.text.secondary}; +`,Gye=wn(Fu)` + margin-top: 32px; +`,Yk=e=>{const t=My(e);return zt(Vye,Au(t,{get children(){return[Ri(()=>e.icon),zt(qye,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),zt(Kye,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),zt(go,{get when(){return e.showButton!==!1},get children(){return zt(Gye,{onClick:()=>e.onClose(),get children(){return zt(Vl,{translationKey:"common.close",children:"Close"})}})}})]}}))},Yye=e=>{var t;const r=Ql(Cg),[i]=Hd(),o=((t=r.wallet)==null?void 0:t.name)||i("common.yourWallet",{},"your wallet");return zt(Yk,{headerTranslationKey:"actionModal.confirmTransaction.header",headerTranslationValues:{name:o},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return zt(Rx,{size:"m"})},onClose:()=>e.onClose(),showButton:!1,"data-tc-confirm-modal":"true"})},Zye=e=>zt(Yk,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return zt(vN,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),Qye=e=>zt(Yk,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return zt(yN,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),Xye=()=>zt(cN,{get opened(){var e;return Ri(()=>Vp()!==null)()&&((e=Vp())==null?void 0:e.openModal)===!0},onClose:()=>sh(null),"data-tc-actions-modal-container":"true",get children(){return zt(_x,{get children(){return[zt(Tu,{get when(){return Vp().name==="transaction-sent"},get children(){return zt(Qye,{onClose:()=>sh(null)})}}),zt(Tu,{get when(){return Vp().name==="transaction-canceled"},get children(){return zt(Zye,{onClose:()=>sh(null)})}}),zt(Tu,{get when(){return Vp().name==="confirm-transaction"},get children(){return zt(Yye,{onClose:()=>sh(null)})}})]}})}}),Jye=e=>{const t=$me(Fge,$a.language);return sme(),ame(),zt(hN.Provider,{value:t,get children(){return zt(Cg.Provider,{get value(){return e.tonConnectUI},get children(){return zt(Sx.Provider,{get value(){return $a.connector},get children(){return[zt(Xge,{}),zt(Age,{theme:Yge,get children(){return[zt(go,{get when(){return $a.buttonRootId},get children(){return zt(QL,{get mount(){return document.getElementById($a.buttonRootId)},get children(){return zt(J0e,{})}})}}),zt(Lk,{component:rc,get children(){return[zt(Wye,{}),zt(Xye,{})]}})]}})]}})}})}})},nf={openWalletsModal:()=>void setTimeout(()=>a4(!0)),closeWalletsModal:()=>void setTimeout(()=>a4(!1)),setAction:e=>void setTimeout(()=>sh(e)),clearAction:()=>void setTimeout(()=>sh(null)),getSelectedWalletInfo:()=>bge(),renderApp:(e,t)=>age(()=>zt(Jye,{tonConnectUI:t}),document.getElementById(e))};class eve{constructor(){Hs(this,"localStorage"),Hs(this,"storageKey","ton-connect-ui_wallet-info"),aN(),this.localStorage=localStorage}setWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class tve{constructor(){Hs(this,"localStorage"),Hs(this,"storageKey","ton-connect-ui_preferred-wallet"),aN(),this.localStorage=localStorage}setPreferredWalletName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletName(){return this.localStorage.getItem(this.storageKey)||void 0}}class rve{constructor(t){if(Hs(this,"walletInfoStorage",new eve),Hs(this,"preferredWalletStorage",new tve),Hs(this,"connector"),Hs(this,"walletInfo",null),Hs(this,"systemThemeChangeUnsubscribe",null),Hs(this,"actionsConfiguration"),Hs(this,"walletsList"),Hs(this,"connectRequestParametersCallback"),Hs(this,"connectionRestored",Promise.resolve(!1)),t&&"connector"in t&&t.connector)this.connector=t.connector;else if(t&&"manifestUrl"in t&&t.manifestUrl)this.connector=new sp({manifestUrl:t.manifestUrl});else throw new fu("You have to specify a `manifestUrl` or a `connector` in the options.");this.walletsList=this.getWallets(),this.walletsList.then(o=>lme(hye(o.map(a=>a.imageUrl))));const r=this.normalizeWidgetRoot(t?.widgetRootId);this.subscribeToWalletChange(),t?.restoreConnection!==!1&&(this.connectionRestored=new Promise(o=>cl(this,null,function*(){yield this.connector.restoreConnection(),this.connector.connected||this.walletInfoStorage.removeWalletInfo(),o(this.connector.connected)}))),this.uiOptions=_d(t,{uiPreferences:{theme:"SYSTEM"}});const i=this.preferredWalletStorage.getPreferredWalletName();Nv({connector:this.connector,preferredWalletName:i}),nf.renderApp(r,this)}static getWallets(){return sp.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return!this.connector.wallet||!this.walletInfo?null:Yo(Yo({},this.connector.wallet),this.walletInfo)}set uiOptions(t){var r,i,o,a,s;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(r=t.uiPreferences)!=null&&r.theme?((i=t.uiPreferences)==null?void 0:i.theme)!=="SYSTEM"?((o=this.systemThemeChangeUnsubscribe)==null||o.call(this),M5(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(M5(tme(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=rme(M5))):(a=t.uiPreferences)!=null&&a.colorsSet&&Qge(t.uiPreferences.colorsSet),(s=t.uiPreferences)!=null&&s.borderRadius&&Zge(t.uiPreferences.borderRadius),Nv(l=>{var u;const c=_d(Yo(Yo(Yo({},t.language&&{language:t.language}),!!((u=t.actionsConfiguration)!=null&&u.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),Yh(l));return t.buttonRootId!==void 0&&(c.buttonRootId=t.buttonRootId),c})}setConnectRequestParameters(t){var r;Nv({connectRequestParameters:t}),(t?.state==="ready"||!t)&&((r=this.connectRequestParametersCallback)==null||r.call(this,t?.value))}getWallets(){return cl(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,r){return this.connector.onStatusChange(i=>cl(this,null,function*(){if(i){const o=yield this.getSelectedWalletInfo(i);t(Yo(Yo({},i),o||this.walletInfoStorage.getWalletInfo()))}else t(i)}),r)}connectWallet(){return cl(this,null,function*(){const r=(yield this.getWallets()).find(UL);if(r){const i=a=>{Wl(r),this.connector.connect({jsBridgeKey:r.jsBridgeKey},a)},o=$a.connectRequestParameters;o?.state==="loading"?this.connectRequestParametersCallback=i:i(o?.value)}else nf.openWalletsModal();return new Promise((i,o)=>{const a=this.connector.onStatusChange(s=>cl(this,null,function*(){if(a(),s){const l=yield this.getSelectedWalletInfo(s);i(Yo(Yo({},s),l||this.walletInfoStorage.getWalletInfo()))}else o(new fu("Wallet was not connected"))}),o)})})}disconnect(){return nf.clearAction(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,r){return cl(this,null,function*(){if(!this.connected||!this.walletInfo)throw new fu("Connect wallet to send a transaction.");const{notifications:i,modals:o,returnStrategy:a}=this.getModalsAndNotificationsConfiguration(r);"universalLink"in this.walletInfo&&this.walletInfo.openMethod==="universal-link"&&q0(K0(this.walletInfo.universalLink,a)),nf.setAction({name:"confirm-transaction",showNotification:i.includes("before"),openModal:o.includes("before")});try{const s=yield this.connector.sendTransaction(t);return nf.setAction({name:"transaction-sent",showNotification:i.includes("success"),openModal:o.includes("success")}),s}catch(s){throw nf.setAction({name:"transaction-canceled",showNotification:i.includes("error"),openModal:o.includes("error")}),s instanceof po?s:(console.error(s),new fu("Unhandled error:"+s))}})}subscribeToWalletChange(){this.connector.onStatusChange(t=>cl(this,null,function*(){var r;t?(yield this.updateWalletInfo(t),this.setPreferredWalletName(((r=this.walletInfo)==null?void 0:r.name)||t.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletName(t){this.preferredWalletStorage.setPreferredWalletName(t),Nv({preferredWalletName:t})}getSelectedWalletInfo(t){return cl(this,null,function*(){let r=nf.getSelectedWalletInfo();if(!r)return null;let i;if("name"in r)i=r;else{const a=EN(yield this.walletsList,$a.walletsListConfiguration).find(s=>s.name.toLowerCase()===t.device.appName.toLowerCase());if(!a)throw new fu(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);i=Yo(Yo({},a),r)}return i})}updateWalletInfo(t){return cl(this,null,function*(){const r=yield this.getSelectedWalletInfo(t);r?(this.walletInfo=r,this.walletInfoStorage.setWalletInfo(r)):this.walletInfo=this.walletInfoStorage.getWalletInfo()})}normalizeWidgetRoot(t){if(!t||!document.getElementById(t)){t="tc-widget-root";const r=document.createElement("div");r.id=t,document.body.appendChild(r)}return t}checkButtonRootExist(t){if(t!=null&&!document.getElementById(t))throw new fu(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var r,i,o;const a=["before","success","error"];let s=a;((r=this.actionsConfiguration)==null?void 0:r.notifications)&&((i=this.actionsConfiguration)==null?void 0:i.notifications)!=="all"&&(s=this.actionsConfiguration.notifications),t?.notifications&&(t.notifications==="all"?s=a:s=t.notifications);let l=["before"];return(o=this.actionsConfiguration)!=null&&o.modals&&(this.actionsConfiguration.modals==="all"?l=a:l=this.actionsConfiguration.modals),t?.modals&&(t.modals==="all"?l=a:l=t.modals),{notifications:s,modals:l,returnStrategy:t?.returnStrategy||"back"}}}var nve=Object.defineProperty,Sb=Object.getOwnPropertySymbols,TN=Object.prototype.hasOwnProperty,IN=Object.prototype.propertyIsEnumerable,NP=(e,t,r)=>t in e?nve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ive=(e,t)=>{for(var r in t||(t={}))TN.call(t,r)&&NP(e,r,t[r]);if(Sb)for(var r of Sb(t))IN.call(t,r)&&NP(e,r,t[r]);return e},ove=(e,t)=>{var r={};for(var i in e)TN.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&Sb)for(var i of Sb(e))t.indexOf(i)<0&&IN.call(e,i)&&(r[i]=e[i]);return r},RN={exports:{}},bm={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var jP;function ave(){if(jP)return bm;jP=1;var e=Gn,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(l,u,c){var d,p={},v=null,x=null;c!==void 0&&(v=""+c),u.key!==void 0&&(v=""+u.key),u.ref!==void 0&&(x=u.ref);for(d in u)i.call(u,d)&&!a.hasOwnProperty(d)&&(p[d]=u[d]);if(l&&l.defaultProps)for(d in u=l.defaultProps,u)p[d]===void 0&&(p[d]=u[d]);return{$$typeof:t,type:l,key:v,ref:x,props:p,_owner:o.current}}return bm.Fragment=r,bm.jsx=s,bm.jsxs=s,bm}(function(e){e.exports=ave()})(RN);const PN=RN.exports.jsx;function MN(){return typeof window<"u"}function sve(){return!MN()}const ON=X.exports.createContext(null);let j5=null;const lve=e=>{var t=e,{children:r}=t,i=ove(t,["children"]);return MN()&&!j5&&(j5=new rve(i)),PN(ON.Provider,{value:j5,children:r})},uve=X.exports.memo(lve);class Zk extends fu{constructor(...t){super(...t),Object.setPrototypeOf(this,Zk.prototype)}}class Qk extends Zk{constructor(...t){super(...t),Object.setPrototypeOf(this,Qk.prototype)}}function cve(e){if(!e)throw new Qk("You should add on the top of the app to use TonConnect");return!0}function kg(){const e=X.exports.useContext(ON),t=X.exports.useCallback(r=>{e&&(e.uiOptions=r)},[e]);return sve()?[null,()=>{}]:(cve(e),[e,t])}const $P="ton-connect-button",dve=({className:e,style:t})=>{const[r,i]=kg();return X.exports.useEffect(()=>(i({buttonRootId:$P}),()=>i({buttonRootId:null})),[i]),PN("div",{id:$P,className:e,style:ive({width:"fit-content"},t)})},fve=X.exports.memo(dve);function pve(){const[e]=kg(),[t,r]=X.exports.useState(e?.wallet||null);return X.exports.useEffect(()=>{if(e)return e.onStatusChange(i=>{r(i)})},[e]),t}function Bx(e=!0){const t=pve();return t?e?Ok(t.account.address,t.account.chain===z0.TESTNET):t.account.address:""}const Ux=sr(fve)(({theme:e})=>({button:{background:e.palette.primary.main,"*":{color:"white"},svg:{"*":{stroke:"white"}}}}));function hve({closeMenu:e,showMenu:t}){const r=Ac(),i=Bx();return L(yre,{anchor:"left",open:t,onClose:e,children:Ut(da,{p:2,sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"250px",height:"100%"},children:[L(Bs,{sx:{alignSelf:"end",padding:.3},onClick:e,children:L(Ck,{style:{width:25,height:25}})}),Ut(da,{pt:2,sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center"},children:[L("div",{style:{maxWidth:"250px"},onClick:i?()=>{}:e,children:L(Ux,{})}),Ut(ap,{href:$6,target:"_blank",children:[L("img",{src:QC,alt:"Github icon",width:20,height:20}),L(xk,{children:"GitHub"})]})]}),Ut(ap,{onClick:()=>r("/"),children:[L("img",{src:vw,width:30,height:30,alt:"App icon"}),L(cx,{children:"TON VERIFIER"})]})]})})}function gve(){const{pathname:e}=py(),t=la(),r=Ac(),i=aa(t.breakpoints.down("lg")),o=aa(t.breakpoints.down("md")),[a,s]=X.exports.useState(e.length===1),[l,u]=X.exports.useState(!1);return X.exports.useEffect(()=>{s(e.length===1)},[e]),Ut(Dpe,{px:i?2.4:0,isMobile:o,showExpanded:a,children:[o&&L(Bs,{sx:{width:35,height:35,marginRight:2.4},onClick:()=>u(!0),children:L(RL,{sx:{width:35,height:35}})}),!o&&Ut(IL,{mb:5,children:[Ut(ap,{onClick:()=>r("/"),children:[L("img",{src:vw,width:30,height:30,alt:"App icon"}),L(cx,{children:"TON VERIFIER"})]}),Ut(TL,{children:[L($n,{mr:2,children:L(Ux,{})}),Ut(ap,{href:$6,target:"_blank",children:[L("img",{src:QC,alt:"Github icon",width:20,height:20}),L(xk,{children:"GitHub"})]})]})]}),e.length<2&&!o&&L(Lpe,{children:"Smart Contract Verifier"}),L(Npe,{children:L(Bpe,{})}),L(hve,{closeMenu:()=>u(!1),showMenu:l})]})}var Xk={},Jk={exports:{}};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */(function(e){var t,r,i,o,a,s,l,u,c,d,p,v,x,b,y,_,k,E,O,U,D,j,F;(function(H){var W=typeof _n=="object"?_n:typeof self=="object"?self:typeof this=="object"?this:{};H(G(W,G(e.exports)));function G(ae,V){return ae!==W&&(typeof Object.create=="function"?Object.defineProperty(ae,"__esModule",{value:!0}):ae.__esModule=!0),function(oe,P){return ae[oe]=V?V(oe,P):P}}})(function(H){var W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,ae){G.__proto__=ae}||function(G,ae){for(var V in ae)ae.hasOwnProperty(V)&&(G[V]=ae[V])};t=function(G,ae){W(G,ae);function V(){this.constructor=G}G.prototype=ae===null?Object.create(ae):(V.prototype=ae.prototype,new V)},r=Object.assign||function(G){for(var ae,V=1,oe=arguments.length;V=0;pe--)(le=G[pe])&&(ee=(P<3?le(ee):P>3?le(ae,V,ee):le(ae,V))||ee);return P>3&&ee&&Object.defineProperty(ae,V,ee),ee},a=function(G,ae){return function(V,oe){ae(V,oe,G)}},s=function(G,ae){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(G,ae)},l=function(G,ae,V,oe){function P(ee){return ee instanceof V?ee:new V(function(le){le(ee)})}return new(V||(V=Promise))(function(ee,le){function pe(ft){try{J(oe.next(ft))}catch(Le){le(Le)}}function xe(ft){try{J(oe.throw(ft))}catch(Le){le(Le)}}function J(ft){ft.done?ee(ft.value):P(ft.value).then(pe,xe)}J((oe=oe.apply(G,ae||[])).next())})},u=function(G,ae){var V={label:0,sent:function(){if(ee[0]&1)throw ee[1];return ee[1]},trys:[],ops:[]},oe,P,ee,le;return le={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function pe(J){return function(ft){return xe([J,ft])}}function xe(J){if(oe)throw new TypeError("Generator is already executing.");for(;V;)try{if(oe=1,P&&(ee=J[0]&2?P.return:J[0]?P.throw||((ee=P.return)&&ee.call(P),0):P.next)&&!(ee=ee.call(P,J[1])).done)return ee;switch(P=0,ee&&(J=[J[0]&2,ee.value]),J[0]){case 0:case 1:ee=J;break;case 4:return V.label++,{value:J[1],done:!1};case 5:V.label++,P=J[1],J=[0];continue;case 7:J=V.ops.pop(),V.trys.pop();continue;default:if(ee=V.trys,!(ee=ee.length>0&&ee[ee.length-1])&&(J[0]===6||J[0]===2)){V=0;continue}if(J[0]===3&&(!ee||J[1]>ee[0]&&J[1]=G.length&&(G=void 0),{value:G&&G[oe++],done:!G}}};throw new TypeError(ae?"Object is not iterable.":"Symbol.iterator is not defined.")},p=function(G,ae){var V=typeof Symbol=="function"&&G[Symbol.iterator];if(!V)return G;var oe=V.call(G),P,ee=[],le;try{for(;(ae===void 0||ae-- >0)&&!(P=oe.next()).done;)ee.push(P.value)}catch(pe){le={error:pe}}finally{try{P&&!P.done&&(V=oe.return)&&V.call(oe)}finally{if(le)throw le.error}}return ee},v=function(){for(var G=[],ae=0;ae1||pe(He,nr)})})}function pe(He,nr){try{xe(oe[He](nr))}catch(Bt){Le(ee[0][3],Bt)}}function xe(He){He.value instanceof b?Promise.resolve(He.value.v).then(J,ft):Le(ee[0][2],He)}function J(He){pe("next",He)}function ft(He){pe("throw",He)}function Le(He,nr){He(nr),ee.shift(),ee.length&&pe(ee[0][0],ee[0][1])}},_=function(G){var ae,V;return ae={},oe("next"),oe("throw",function(P){throw P}),oe("return"),ae[Symbol.iterator]=function(){return this},ae;function oe(P,ee){ae[P]=G[P]?function(le){return(V=!V)?{value:b(G[P](le)),done:P==="return"}:ee?ee(le):le}:ee}},k=function(G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ae=G[Symbol.asyncIterator],V;return ae?ae.call(G):(G=typeof d=="function"?d(G):G[Symbol.iterator](),V={},oe("next"),oe("throw"),oe("return"),V[Symbol.asyncIterator]=function(){return this},V);function oe(ee){V[ee]=G[ee]&&function(le){return new Promise(function(pe,xe){le=G[ee](le),P(pe,xe,le.done,le.value)})}}function P(ee,le,pe,xe){Promise.resolve(xe).then(function(J){ee({value:J,done:pe})},le)}},E=function(G,ae){return Object.defineProperty?Object.defineProperty(G,"raw",{value:ae}):G.raw=ae,G},O=function(G){if(G&&G.__esModule)return G;var ae={};if(G!=null)for(var V in G)Object.hasOwnProperty.call(G,V)&&(ae[V]=G[V]);return ae.default=G,ae},U=function(G){return G&&G.__esModule?G:{default:G}},D=function(G,ae){if(!ae.has(G))throw new TypeError("attempted to get private field on non-instance");return ae.get(G)},j=function(G,ae,V){if(!ae.has(G))throw new TypeError("attempted to set private field on non-instance");return ae.set(G,V),V},H("__extends",t),H("__assign",r),H("__rest",i),H("__decorate",o),H("__param",a),H("__metadata",s),H("__awaiter",l),H("__generator",u),H("__exportStar",c),H("__createBinding",F),H("__values",d),H("__read",p),H("__spread",v),H("__spreadArrays",x),H("__await",b),H("__asyncGenerator",y),H("__asyncDelegator",_),H("__asyncValues",k),H("__makeTemplateObject",E),H("__importStar",O),H("__importDefault",U),H("__classPrivateFieldGet",D),H("__classPrivateFieldSet",j)})})(Jk);var wm={},Ns={},FP;function BN(){return FP||(FP=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.MAX_HASHABLE_LENGTH=Ns.INIT=Ns.KEY=Ns.DIGEST_LENGTH=Ns.BLOCK_SIZE=void 0,Ns.BLOCK_SIZE=64,Ns.DIGEST_LENGTH=32,Ns.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ns.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Ns.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),Ns}var xm={},zP;function mve(){if(zP)return xm;zP=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.RawSha256=void 0;var e=BN(),t=function(){function r(){this.state=Int32Array.from(e.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(i){if(this.finished)throw new Error("Attempted to update an already finished hash.");var o=0,a=i.byteLength;if(this.bytesHashed+=a,this.bytesHashed*8>e.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;a>0;)this.buffer[this.bufferLength++]=i[o++],a--,this.bufferLength===e.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var i=this.bytesHashed*8,o=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),a=this.bufferLength;if(o.setUint8(this.bufferLength++,128),a%e.BLOCK_SIZE>=e.BLOCK_SIZE-8){for(var s=this.bufferLength;s>>24&255,l[s*4+1]=this.state[s]>>>16&255,l[s*4+2]=this.state[s]>>>8&255,l[s*4+3]=this.state[s]>>>0&255;return l},r.prototype.hashBuffer=function(){for(var i=this,o=i.buffer,a=i.state,s=a[0],l=a[1],u=a[2],c=a[3],d=a[4],p=a[5],v=a[6],x=a[7],b=0;b>>17|y<<15)^(y>>>19|y<<13)^y>>>10;y=this.temp[b-15];var k=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;this.temp[b]=(_+this.temp[b-7]|0)+(k+this.temp[b-16]|0)}var E=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&p^~d&v)|0)+(x+(e.KEY[b]+this.temp[b]|0)|0)|0,O=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&l^s&u^l&u)|0;x=v,v=p,p=d,d=c+E|0,c=u,u=l,l=s,s=E+O|0}a[0]+=s,a[1]+=l,a[2]+=u,a[3]+=c,a[4]+=d,a[5]+=p,a[6]+=v,a[7]+=x},r}();return xm.RawSha256=t,xm}var $5={},_m={};const yve=e=>{const t=[];for(let r=0,i=e.length;r>6|192,o&63|128);else if(r+1>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else t.push(o>>12|224,o>>6&63|128,o&63|128)}return Uint8Array.from(t)},vve=e=>{let t="";for(let r=0,i=e.length;rl.toString(16)).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((o&15)<<12|(e[++r]&63)<<6|e[++r]&63)}return t};function bve(e){return new TextEncoder().encode(e)}function wve(e){return new TextDecoder("utf-8").decode(e)}const xve=e=>typeof TextEncoder=="function"?bve(e):yve(e),_ve=e=>typeof TextDecoder=="function"?wve(e):vve(e),Sve=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:xve,toUtf8:_ve},Symbol.toStringTag,{value:"Module"})),Cve=Gb(Sve);var HP;function kve(){if(HP)return _m;HP=1,Object.defineProperty(_m,"__esModule",{value:!0}),_m.convertToBuffer=void 0;var e=Cve,t=typeof Buffer<"u"&&Buffer.from?function(i){return Buffer.from(i,"utf8")}:e.fromUtf8;function r(i){return i instanceof Uint8Array?i:typeof i=="string"?t(i):ArrayBuffer.isView(i)?new Uint8Array(i.buffer,i.byteOffset,i.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(i)}return _m.convertToBuffer=r,_m}var Sm={},WP;function Eve(){if(WP)return Sm;WP=1,Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.isEmptyData=void 0;function e(t){return typeof t=="string"?t.length===0:t.byteLength===0}return Sm.isEmptyData=e,Sm}var Cm={},VP;function Ave(){if(VP)return Cm;VP=1,Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.numToUint8=void 0;function e(t){return new Uint8Array([(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255])}return Cm.numToUint8=e,Cm}var km={},qP;function Tve(){if(qP)return km;qP=1,Object.defineProperty(km,"__esModule",{value:!0}),km.uint32ArrayFrom=void 0;function e(t){if(!Uint32Array.from){for(var r=new Uint32Array(t.length),i=0;it.BLOCK_SIZE){var u=new r.RawSha256;u.update(l),l=u.digest()}var c=new Uint8Array(t.BLOCK_SIZE);return c.set(l),c}return wm}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Jk.exports;t.__exportStar(Rve(),e)})(Xk);var UN={},js={},Em={},Dx={},Lx={};Object.defineProperty(Lx,"__esModule",{value:!0});Lx.Trie=void 0;class YP{constructor(t,r){this.key=t,this.value=r,this.parent=null,this.children={},this.end=!1}getWord(){for(var t=[],r=this;r!==null;)t.unshift(r.key),r=r.parent;return t.join("")}}function DN(e,t,r=-1){if(e.end&&t.unshift(e.getWord()),!(r!==-1&&t.length>=r))for(var i in e.children)DN(e.children[i],t,r)}class Pve{constructor(){this.root=new YP(null,null)}insert(t,r){for(var i=this.root,o=0;o0)throw console.log(i.getWord(),this.find(i.getWord())),new Error("Word cannot start with already used prefix");i.end=!0,i.value=r}}}contains(t){for(var r=this.root,i=0;i({}).DEBUG&&{}.DEBUG.includes("tvm-disassembler");Oy._isDebug=Bve;var ZP;function Uve(){if(ZP)return Em;ZP=1,Object.defineProperty(Em,"__esModule",{value:!0}),Em.CP0Auto=void 0;const e=fo,t=LN(),r=Dx,i=Oy;function o(s,l,u){let c=(0,e.beginCell)();for(let d=0;d{let l=s.loadUint(4);return l==0?"NOP":`s0 s${l} XCHG`}),a.insertHex("1",4,s=>{let l=s.loadUint(4);if(l===0){let u=s.loadUint(4),c=s.loadUint(4);return`s${u} s${c} XCHG`}return l===1?`s0 s${s.loadUint(8)} XCHG`:`s1 s${l} XCHG`}),a.insertHex("2",4,s=>`s${s.loadUint(4)} PUSH`),a.insertHex("3",4,s=>`s${s.loadUint(4)} POP`),a.insertHex("4",4,s=>{let l=s.loadUint(4),u=s.loadUint(4),c=s.loadUint(4);return`s${l} s${u} s${c} XCHG3`}),a.insertHex("50",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u} XCHG2`}),a.insertHex("51",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u} XCPU`}),a.insertHex("52",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u-1} PUXC`}),a.insertHex("53",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`s${u} s${c} PUSH2`}),a.insertHex("540",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`s${u} s${c} s${d} XCHG3`}),a.insertHex("541",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} XC2PU`}),a.insertHex("542",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d-1} XCPUXC`}),a.insertHex("543",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} XCPU2`}),a.insertHex("544",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-1} PUXC2`}),a.insertHex("545",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-1} PUXCPU`}),a.insertHex("546",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-2} PU2XC`}),a.insertHex("547",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} PUSH3`}),a.insertHex("55",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`${u+1} ${c+1} BLKSWAP`}),a.insertHex("56",8,s=>`s${s.loadUint(8)} PUSH`),a.insertHex("57",8,s=>`s${s.loadUint(8)} POP`),a.insertHex("58",8,"ROT"),a.insertHex("59",8,"ROTREV"),a.insertHex("5a",8,"2SWAP"),a.insertHex("5b",8,"2DROP"),a.insertHex("5c",8,"2DUP"),a.insertHex("5d",8,"2OVER"),a.insertHex("5e",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`${u+2} ${c} REVERSE`}),a.insertHex("5f",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return l===0?`${u} BLKDROP`:`${l} ${u} BLKPUSH`}),a.insertHex("60",8,"PICK"),a.insertHex("61",8,"ROLL"),a.insertHex("62",8,"ROLLREV"),a.insertHex("63",8,"BLKSWX"),a.insertHex("64",8,"REVX"),a.insertHex("65",8,"DROPX"),a.insertHex("66",8,"TUCK"),a.insertHex("67",8,"XCHGX"),a.insertHex("68",8,"DEPTH"),a.insertHex("69",8,"CHKDEPTH"),a.insertHex("6a",8,"ONLYTOPX"),a.insertHex("6b",8,"ONLYX"),a.insertHex("6c",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} BLKDROP2`}),a.insertHex("6d",8,"PUSHNULL"),a.insertHex("6e",8,"ISNULL"),a.insertHex("6f0",12,s=>{let l=s.loadUint(4);return l===0?"NIL":l===1?"SINGLE":l===2?"PAIR":l===3?"TRIPLE":`${l} TUPLE`}),a.insertHex("6f1",12,s=>`${s.loadUint(4)} INDEX`),a.insertHex("6f2",12,s=>`${s.loadUint(4)} UNTUPLE`),a.insertHex("6f3",12,s=>{let l=s.loadUint(4);return l===0?"CHKTUPLE":`${l} UNPACKFIRST`}),a.insertHex("6f4",12,s=>`${s.loadUint(4)} EXPLODE`),a.insertHex("6f5",12,s=>`${s.loadUint(4)} SETINDEX`),a.insertHex("6f6",12,s=>`${s.loadUint(4)} INDEXQ`),a.insertHex("6f7",12,s=>`${s.loadUint(4)} SETINDEXQ`),a.insertHex("6f80",16,"TUPLEVAR"),a.insertHex("6f81",16,"INDEXVAR"),a.insertHex("6f82",16,"UNTUPLEVAR"),a.insertHex("6f83",16,"UNPACKFIRSTVAR"),a.insertHex("6f84",16,"EXPLODEVAR"),a.insertHex("6f85",16,"SETINDEXVAR"),a.insertHex("6f86",16,"INDEXVARQ"),a.insertHex("6f87",16,"SETINDEXVARQ"),a.insertHex("6f88",16,"TLEN"),a.insertHex("6f89",16,"QTLEN"),a.insertHex("6f8a",16,"ISTUPLE"),a.insertHex("6f8b",16,"LAST"),a.insertHex("6f8c",16,"TPUSH"),a.insertHex("6f8d",16,"TPOP"),a.insertHex("6fa0",16,"NULLSWAPIF"),a.insertHex("6fa1",16,"NULLSWAPIFNOT"),a.insertHex("6fa2",16,"NULLROTRIF"),a.insertHex("6fa3",16,"NULLROTRIFNOT"),a.insertHex("6fa4",16,"NULLSWAPIF2"),a.insertHex("6fa5",16,"NULLSWAPIFNOT2"),a.insertHex("6fa6",16,"NULLROTRIF2"),a.insertHex("6fa7",16,"NULLROTRIFNOT2"),a.insertHex("6fb",12,s=>{let l=s.loadUint(2),u=s.loadUint(2);return`${l} ${u} INDEX2`}),a.insertHex("7",4,s=>`${s.loadInt(4)} PUSHINT`),a.insertHex("80",8,s=>`${s.loadInt(8)} PUSHINT`),a.insertHex("81",8,s=>`${s.loadInt(16)} PUSHINT`),a.insertHex("82",8,s=>{let u=8*s.loadUint(5)+19;return`${s.loadIntBig(u).toString(10)} PUSHINT`}),a.insertHex("83",8,s=>`${s.loadUint(8)+1} PUSHPOW2`),a.insertHex("84",8,s=>`${s.loadUint(8)+1} PUSHPOW2DEC`),a.insertHex("850000",8,s=>`${s.loadUint(8)+1} PUSHNEGPOW2`),a.insertHex("88",8,"PUSHREF"),a.insertHex("89",8,"PUSHREFSLICE"),a.insertHex("8a",8,"PUSHREFCONT"),a.insertHex("8b",8,s=>{let u=8*s.loadUint(4)+4;return o(s,u),"PUSHSLICE"}),a.insertHex("8c0000",8,s=>{let l=s.loadUint(2)+1,u=s.loadUint(5);return o(s,8*u+1,l),"PUSHSLICE"}),a.insertHex("8d",8,s=>{let l=s.loadUint(3),u=s.loadUint(7);return o(s,8*u+6,l),"PUSHSLICE"}),a.insertHex("8E",7,(s,l)=>{let u=s.loadUint(9),c=u>>7&3,d=(u&127)*8,p=o(s,d,c);return`<{ +${(0,t.decompile)(p,l+2)}${new Array(l).fill(" ").join("")}}> PUSHCONT`}),a.insertHex("9",4,(s,l)=>{let u=s.loadUint(4)*8,c=o(s,u);return`<{ +${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> PUSHCONT`}),a.insertHex("a00000",8,"ADD"),a.insertHex("a10000",8,"SUB"),a.insertHex("a20000",8,"SUBR"),a.insertHex("a30000",8,"NEGATE"),a.insertHex("a40000",8,"INC"),a.insertHex("a50000",8,"DEC"),a.insertHex("a60000",8,s=>`${s.loadInt(8)} ADDCONST`),a.insertHex("a70000",8,s=>`${s.loadInt(8)} MULCONST`),a.insertHex("a80000",8,"MUL"),a.insertHex("A9",8,s=>{let l=s.loadBit(),u=s.loadUint(2),c=s.loadBit(),d=s.loadUint(2),p=s.loadUint(2),v="";if(l&&(v+="MUL"),u==0)v+="DIV";else if(u==1?v="RSHIFT":v="LSHIFT",!c)v+=" s0";else{let x=s.loadUint(8)+1;v+=` ${x}`}return d===1?v+=" QOUT":d===2?v+=" REM":d===3&&(v+=" BOTH"),p===1?v+=" R":p==2&&(v+=" C"),v}),a.insertHex("aa",8,s=>`${s.loadUint(8)+1} LSHIFT`),a.insertHex("ab",8,s=>`${s.loadUint(8)+1} RSHIFT`),a.insertHex("ac",8,"LSHIFT"),a.insertHex("ad",8,"RSHIFT"),a.insertHex("ae",8,"POW2"),a.insertHex("b0",8,"AND"),a.insertHex("b1",8,"OR"),a.insertHex("b2",8,"XOR"),a.insertHex("b3",8,"NOT"),a.insertHex("b4",8,s=>`${s.loadUint(8)+1} FITS`),a.insertHex("b5",8,s=>`${s.loadUint(8)+1} UFITS`),a.insertHex("b600",16,"FITSX"),a.insertHex("b601",16,"UFITSX"),a.insertHex("b602",16,"BITSIZE"),a.insertHex("b603",16,"UBITSIZE"),a.insertHex("b608",16,"MIN"),a.insertHex("b609",16,"MAX"),a.insertHex("b60a",16,"MINMAX"),a.insertHex("b60b",16,"ABS"),a.insertHex("b7a0",16,"QADD"),a.insertHex("b7a1",16,"QSUB"),a.insertHex("b7a2",16,"QSUBR"),a.insertHex("b7a3",16,"QNEGATE"),a.insertHex("b7a4",16,"QINC"),a.insertHex("b7a5",16,"QDEC"),a.insertHex("b7a6",16,s=>`${s.loadInt(8)} QADDCONST`),a.insertHex("b7a7",16,s=>`${s.loadInt(8)} QMULCONST`),a.insertHex("b7a8",16,"QMUL"),a.insertHex("b7a9",16,s=>{let l=s.loadBit(),u=s.loadUint(2),c=s.loadBit(),d=s.loadUint(2),p=s.loadUint(2),v="Q";if(l&&(v+="MUL"),u==0)v+="DIV";else if(u==1?v="RSHIFT":v="LSHIFT",!c)v+=" s0";else{let x=s.loadUint(8)+1;v+=` ${x}`}return d===1?v+=" QOUT":d===2?v+=" REM":d===3&&(v+=" BOTH"),p===1?v+=" R":p==2&&(v+=" C"),v}),a.insertHex("b7aa",16,s=>`${s.loadUint(8)+1} QLSHIFT`),a.insertHex("b7ab",16,s=>`${s.loadUint(8)+1} QLSHIFT`),a.insertHex("b7ac",16,"QLSHIFT"),a.insertHex("b7ad",16,"QRSHIFT"),a.insertHex("b7ae",16,"QPOW2"),a.insertHex("b7b0",16,"QAND"),a.insertHex("b7b1",16,"QOR"),a.insertHex("b7b2",16,"QXOR"),a.insertHex("b7b3",16,"QNOT"),a.insertHex("b7b4",16,s=>`${s.loadUint(8)+1} QFITS`),a.insertHex("b7b5",16,s=>`${s.loadUint(8)+1} QUFITS`),a.insertHex("b7b600",24,"QFITSX"),a.insertHex("b7b601",24,"QUFITSX"),a.insertHex("b7b602",24,"QBITSIZE"),a.insertHex("b7b603",24,"QUBITSIZE"),a.insertHex("b7b608",24,"QMIN"),a.insertHex("b7b609",24,"QMAX"),a.insertHex("b7b60a",24,"QMINMAX"),a.insertHex("b7b60b",24,"QABS"),a.insertHex("b7b8",16,"QSGN"),a.insertHex("b7b9",16,"QLESS"),a.insertHex("b7ba",16,"QEQUAL"),a.insertHex("b7bb",16,"QLEQ"),a.insertHex("b7bc",16,"QGREATER"),a.insertHex("b7bd",16,"QNEQ"),a.insertHex("b7be",16,"QGEQ"),a.insertHex("b7bf",16,"QCMP"),a.insertHex("b7c0",16,s=>`${s.loadInt(8)} QEQINT`),a.insertHex("b7c1",16,s=>`${s.loadInt(8)} QLESSINT`),a.insertHex("b7c2",16,s=>`${s.loadInt(8)} QGTINT`),a.insertHex("b7c3",16,s=>`${s.loadInt(8)} QNEQINT`),a.insertHex("b8",8,"SGN"),a.insertHex("b9",8,"LESS"),a.insertHex("ba",8,"EQUAL"),a.insertHex("bb",8,"LEQ"),a.insertHex("bc",8,"GREATER"),a.insertHex("bd",8,"NEQ"),a.insertHex("be",8,"GEQ"),a.insertHex("bf",8,"CMP"),a.insertHex("c0",8,s=>`${s.loadInt(8)} EQINT`),a.insertHex("c1",8,s=>`${s.loadInt(8)} LESSINT`),a.insertHex("c2",8,s=>`${s.loadInt(8)} GTINT`),a.insertHex("c3",8,s=>`${s.loadInt(8)} NEQINT`),a.insertHex("c4",8,"ISNAN"),a.insertHex("c5",8,"CHKNAN"),a.insertHex("c700",16,"SEMPTY"),a.insertHex("c701",16,"SDEMPTY"),a.insertHex("c702",16,"SREMPTY"),a.insertHex("c703",16,"SDFIRST"),a.insertHex("c704",16,"SDLEXCMP"),a.insertHex("c705",16,"SDEQ"),a.insertHex("c708",16,"SDPFX"),a.insertHex("c709",16,"SDPFXREV"),a.insertHex("c70a",16,"SDPPFX"),a.insertHex("c70b",16,"SDPPFXREV"),a.insertHex("c70c",16,"SDSFX"),a.insertHex("c70d",16,"SDSFXREV"),a.insertHex("c70e",16,"SDPSFX"),a.insertHex("c70f",16,"SDPSFXREV"),a.insertHex("c710",16,"SDCNTLEAD0"),a.insertHex("c711",16,"SDCNTLEAD1"),a.insertHex("c712",16,"SDCNTTRAIL0"),a.insertHex("c713",16,"SDCNTTRAIL1"),a.insertHex("c8",8,"NEWC"),a.insertHex("c9",8,"ENDC"),a.insertHex("ca",8,s=>`${s.loadUint(8)+1} STI`),a.insertHex("cb",8,s=>`${s.loadUint(8)+1} STU`),a.insertHex("cc",8,"STREF"),a.insertHex("cd",8,"ENDCST"),a.insertHex("ce",8,"STSLICE"),a.insertHex("cf00",13,s=>{let l=s.loadUint(3),u=!(l&1),c="ST";return c+=u?"I":"U",c+="X",l&2&&(c+="R"),l&4&&(c+="Q"),c}),a.insertHex("cf08",13,s=>{let l=s.loadUint(11),u=(l&255)+1,c=!(l&256),d="ST";return d+=c?"I":"U",l&512&&(d+="R"),l&1024&&(d+="Q"),`${u} ${d}`}),a.insertHex("cf10",16,"STREF"),a.insertHex("cf11",16,"STBREF"),a.insertHex("cf12",16,"STSLICE"),a.insertHex("cf13",16,"STB"),a.insertHex("cf14",16,"STREFR"),a.insertHex("cf15",16,"STBREFR"),a.insertHex("cf16",16,"STSLICER"),a.insertHex("cf17",16,"STBR"),a.insertHex("cf18",16,"STREFQ"),a.insertHex("cf19",16,"STBREFQ"),a.insertHex("cf1a",16,"STSLICEQ"),a.insertHex("cf1b",16,"STBQ"),a.insertHex("cf1c",16,"STREFRQ"),a.insertHex("cf1d",16,"STBREFRQ"),a.insertHex("cf1e",16,"STSLICERQ"),a.insertHex("cf1f",16,"STBRQ"),a.insertHex("cf20",15,s=>s.loadUint(1)===0?"STREFCONST":"STREF2CONST"),a.insertHex("cf23",16,"ENDXC"),a.insertHex("cf28",14,s=>{let l=s.loadUint(2);return`ST${!(l&1)?"I":"U"}LE${l&2?"8":"4"}`}),a.insertHex("cf30",16,"BDEPTH"),a.insertHex("cf31",16,"BBITS"),a.insertHex("cf32",16,"BREFS"),a.insertHex("cf33",16,"BBITREFS"),a.insertHex("cf35",16,"BREMBITS"),a.insertHex("cf36",16,"BREMREFS"),a.insertHex("cf37",16,"BREMBITREFS"),a.insertHex("cf38",16,s=>`${s.loadUint(8)+1} BCHKBITS`),a.insertHex("cf39",16,"BCHKBITS"),a.insertHex("cf3a",16,"BCHKREFS"),a.insertHex("cf3b",16,"BCHKBITREFS"),a.insertHex("cf3c",16,s=>`${s.loadUint(8)+1} BCHKBITSQ`),a.insertHex("cf3d",16,"BCHKBITSQ"),a.insertHex("cf3e",16,"BCHKREFSQ"),a.insertHex("cf3f",16,"BCHKBITREFSQ"),a.insertHex("cf40",16,"STZEROES"),a.insertHex("cf41",16,"STONES"),a.insertHex("cf42",16,"STSAME"),a.insertHex("cf8",9,s=>{let l=s.loadUint(2),u=s.loadUint(3)*8+1;return o(s,u,l),"STSLICECONST"}),a.insertHex("d0",8,"CTOS"),a.insertHex("d1",8,"ENDS"),a.insertHex("d2",8,s=>`${s.loadUint(8)+1} LDI`),a.insertHex("d3",8,s=>`${s.loadUint(8)+1} LDU`),a.insertHex("d4",8,"LDREF"),a.insertHex("d5",8,"LDREFRTOS"),a.insertHex("d6",8,s=>`${s.loadUint(8)+1} LDSLICE`),a.insertHex("d70",12,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit();return`${l?s.loadUint(8)+1+" ":""}${c?"PLD":"LD"}${d?"U":"I"}${u?"Q":""}`}),a.insertHex("d710",13,s=>`${32*(s.loadUint(3)+1+1)} PLDUZ`),a.insertHex("d718",14,s=>{let l=s.loadBit();return`${s.loadBit()?"PLD":"LD"}SLICEX${l?"Q":""}`}),a.insertHex("d71c",14,s=>{let l=s.loadBit(),u=s.loadBit();return`${s.loadUint(8)+1} ${u?"PLD":"LD"}SLICEX${l?"Q":""}`}),a.insertHex("d720",16,"SDCUTFIRST"),a.insertHex("d721",16,"SDSKIPFIRST"),a.insertHex("d722",16,"SDCUTLAST"),a.insertHex("d723",16,"SDSKIPLAST"),a.insertHex("d724",16,"SDSUBSTR"),a.insertHex("d726",16,"SDBEGINSX"),a.insertHex("d727",16,"SDBEGINSXQ"),a.insertHex("d728",13,s=>(s.loadUint(8),"SDBEGINS")),a.insertHex("d730",16,"SCUTFIRST"),a.insertHex("d731",16,"SSKIPFIRST"),a.insertHex("d732",16,"SCUTLAST"),a.insertHex("d733",16,"SSKIPLAST"),a.insertHex("d734",16,"SUBSLICE"),a.insertHex("d736",16,"SPLIT"),a.insertHex("d737",16,"SPLITQ"),a.insertHex("d739",16,"XCTOS"),a.insertHex("d73a",16,"XLOAD"),a.insertHex("d73b",16,"XLOADQ"),a.insertHex("d741",16,"SCHKBITS"),a.insertHex("d742",16,"SCHKREFS"),a.insertHex("d743",16,"SCHKBITREFS"),a.insertHex("d745",16,"SCHKBITSQ"),a.insertHex("d746",16,"SCHKREFSQ"),a.insertHex("d747",16,"SCHKBITREFSQ"),a.insertHex("d748",16,"PLDREFVAR"),a.insertHex("d749",16,"SBITS"),a.insertHex("d74a",16,"SREFS"),a.insertHex("d74b",16,"SBITREFS"),a.insertHex("d74c",14,s=>`${s.loadUint(2)} PLDREFIDX`),a.insertHex("d750",12,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit();return`${u?"PLD":"LD"}${d?"U":"I"}LE${c?"8":"4"}${l?"Q":""}`}),a.insertHex("d760",16,"LDZEROES"),a.insertHex("d761",16,"LDONES"),a.insertHex("d762",16,"LDSAME"),a.insertHex("d764",16,"SDEPTH"),a.insertHex("d765",16,"CDEPTH"),a.insertHex("d8",8,"EXECUTE"),a.insertHex("d9",8,"JMPX"),a.insertHex("da",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} CALLXARGS`}),a.insertHex("db0",12,s=>`${s.loadUint(4)} CALLXARGS`),a.insertHex("db1",12,s=>`${s.loadUint(4)} JMPXARGS`),a.insertHex("db2",12,s=>`${s.loadUint(4)} RETARGS`),a.insertHex("db30",16,"RET"),a.insertHex("db31",16,"RETALT"),a.insertHex("db32",16,"RETBOOL"),a.insertHex("db34",16,"CALLCC"),a.insertHex("db35",16,"JMPXDATA"),a.insertHex("db36",16,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} CALLCCARGS`}),a.insertHex("db38",16,"CALLXVARARGS"),a.insertHex("db39",16,"RETVARARGS"),a.insertHex("db3a",16,"JMPXVARARGS"),a.insertHex("db3b",16,"CALLCCVARARGS"),a.insertHex("db3c",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> CALLREF`}),a.insertHex("db3d",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> JMPREF`}),a.insertHex("db3e",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> JMPREFDATA`}),a.insertHex("db3f",16,"RETDATA"),a.insertHex("dc",8,"IFRET"),a.insertHex("dd",8,"IFNOTRET"),a.insertHex("de",8,"IF"),a.insertHex("df",8,"IFNOT"),a.insertHex("e0",8,"IFJMP"),a.insertHex("e1",8,"IFNOTJMP"),a.insertHex("e2",8,"IFELSE"),a.insertHex("e300",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREF`}),a.insertHex("e301",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFNOTREF`}),a.insertHex("e302",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFJMPREF`}),a.insertHex("e303",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFNOTJMPREF`}),a.insertHex("e304",16,"CONDSEL"),a.insertHex("e305",16,"CONDSELCHK"),a.insertHex("e308",16,"IFRETALT"),a.insertHex("e309",16,"IFNOTRETALT"),a.insertHex("e30d",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREFELSE`}),a.insertHex("e30e",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFELSEREF`}),a.insertHex("e30f",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ +${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREFELSEREF`}),a.insertHex("e314",16,"REPEATBRK"),a.insertHex("e315",16,"REPEATENDBRK"),a.insertHex("e316",16,"UNTILBRK"),a.insertHex("e317",16,"UNTILENDBRK"),a.insertHex("e318",16,"WHILEBRK"),a.insertHex("e319",16,"WHILEENDBRK"),a.insertHex("e31a",16,"AGAINBRK"),a.insertHex("e31b",16,"AGAINENDBRK"),a.insertHex("e38",10,s=>(s.loadUint(6),"(FIXED 879)")),a.insertHex("e3c",10,s=>(s.loadUint(6),"(EXT)")),a.insertHex("e4",8,"REPEAT"),a.insertHex("e5",8,"REPEATEND"),a.insertHex("e6",8,"UNTIL"),a.insertHex("e7",8,"UNTILEND"),a.insertHex("e8",8,"WHILE"),a.insertHex("e9",8,"WHILEEND"),a.insertHex("ea",8,"AGAIN"),a.insertHex("eb",8,"AGAINEND"),a.insertHex("ec",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l}, ${u} SETCONTARGS`}),a.insertHex("ed0",12,s=>`${s.loadUint(4)} RETURNARGS`),a.insertHex("ed10",16,"RETURNVARARGS"),a.insertHex("ed11",16,"SETCONTVARARGS"),a.insertHex("ed12",16,"SETNUMVARARGS"),a.insertHex("ed1e",16,"BLESS"),a.insertHex("ed1f",16,"BLESSVARARGS"),a.insertHex("ed4",12,s=>`c${s.loadUint(4)} PUSH`),a.insertHex("ed5",12,s=>`c${s.loadUint(4)} POP`),a.insertHex("ed6",12,s=>`c${s.loadUint(4)} SETCONT`),a.insertHex("ed7",12,s=>`c${s.loadUint(4)} SETRETCTR`),a.insertHex("ed8",12,s=>`c${s.loadUint(4)} SETALTCTR`),a.insertHex("ed9",12,s=>`c${s.loadUint(4)} POPSAVE`),a.insertHex("eda",12,s=>`c${s.loadUint(4)} SAVE`),a.insertHex("edb",12,s=>`c${s.loadUint(4)} SAVEALT`),a.insertHex("edc",12,s=>`c${s.loadUint(4)} SAVEBOTH`),a.insertHex("ede0",16,"PUSHCTRX"),a.insertHex("ede1",16,"POPCTRX"),a.insertHex("ede2",16,"SETCONTCTRX"),a.insertHex("edf0",16,"BOOLAND"),a.insertHex("edf1",16,"BOOLOR"),a.insertHex("edf2",16,"COMPOSBOTH"),a.insertHex("edf3",16,"ATEXIT"),a.insertHex("edf4",16,"ATEXITALT"),a.insertHex("edf5",16,"SETEXITALT"),a.insertHex("edf6",16,"THENRET"),a.insertHex("edf7",16,"THENRETALT"),a.insertHex("edf8",16,"INVERT"),a.insertHex("edf9",16,"BOOLEVAL"),a.insertHex("edfa",16,"SAMEALT"),a.insertHex("edfb",16,"SAMEALTSAVE"),a.insertHex("ee",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l},${u} BLESSARGS`}),a.insertHex("f0",8,s=>`${s.loadUint(8)} CALLDICT`),a.insertHex("f10",10,s=>`${s.loadUint(14)} CALL`),a.insertHex("f14",10,s=>`${s.loadUint(14)} JMP`),a.insertHex("f18",10,s=>`${s.loadUint(14)} PREPARE`),a.insertHex("f20",10,s=>`${s.loadUint(6)} THROW`),a.insertHex("F24",10,s=>`${s.loadUintBig(6)} THROWIF`),a.insertHex("F28",10,s=>`${s.loadUintBig(6)} THROWIFNOT`),a.insertHex("f2c0",13,s=>`${s.loadUint(11)} THROW`),a.insertHex("f2c8",13,s=>`${s.loadUint(11)} THROWARG`),a.insertHex("f2d0",13,s=>`${s.loadUint(11)} THROWIF`),a.insertHex("f2e0",13,s=>`${s.loadUint(11)} THROWIFNOT`),a.insertHex("f2f0",13,s=>{let l=s.loadBit(),u=s.loadBit();return`THROW${s.loadBit()?"ARG":""}ANY${u||l?"IF":""}${l?"NOT":""}`}),a.insertHex("f2ff",16,"TRY"),a.insertHex("f3",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l},${u} TRYARGS`}),a.insertHex("f400",16,"STDICT"),a.insertHex("f401",16,"SKIPDICT"),a.insertHex("f402",16,"LDDICTS"),a.insertHex("f403",16,"PLDDICTS"),a.insertHex("f404",16,"LDDICT"),a.insertHex("f405",16,"PLDDICT"),a.insertHex("f406",16,"LDDICTQ"),a.insertHex("f407",16,"PLDDICTQ"),a.insertHex("f40a",16,"DICTGET"),a.insertHex("f40b",16,"DICTGETREF"),a.insertHex("f40c",16,"DICTIGET"),a.insertHex("f40d",16,"DICTIGETREF"),a.insertHex("f40e",16,"DICTUGET"),a.insertHex("f40f",16,"DICTUGETREF"),a.insertHex("f412",16,"DICTSET"),a.insertHex("f413",16,"DICTSETREF"),a.insertHex("f414",16,"DICTISET"),a.insertHex("f415",16,"DICTISETREF"),a.insertHex("f416",16,"DICTUSET"),a.insertHex("f417",16,"DICTUSETREF"),a.insertHex("f41a",16,"DICTSETGET"),a.insertHex("F41B",16,"DICTSETGETREF"),a.insertHex("F41C",16,"DICTISETGET"),a.insertHex("F41D",16,"DICTISETGETREF"),a.insertHex("F41E",16,"DICTUSETGET"),a.insertHex("F41F",16,"DICTUSETGETREF"),a.insertHex("f420",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}REPLACE${c?"REF":""}`}),a.insertHex("f42a",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}REPLACEGET${c?"REF":""}`}),a.insertHex("f432",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}ADD${c?"REF":""}`}),a.insertHex("f43a",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}ADDGET${c?"REF":""}`}),a.insertHex("f441",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}SETB`}),a.insertHex("f445",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}SETGETB`}),a.insertHex("f449",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}REPLACEB`}),a.insertHex("f44d",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}REPLACEGETB`}),a.insertHex("f451",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}ADDB`}),a.insertHex("f455",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}ADDGETB`}),a.insertHex("f459",16,"DICTDEL"),a.insertHex("f45A",16,"DICTIDEL"),a.insertHex("f45B",16,"DICTUDEL"),a.insertHex("f462",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}DELGET${c?"REF":""}`}),a.insertHex("f469",16,"DICTGETOPTREF"),a.insertHex("f46A",16,"DICTIGETOPTREF"),a.insertHex("f46B",16,"DICTUGETOPTREF"),a.insertHex("f46d",16,"DICTSETGETOPTREF"),a.insertHex("f46e",16,"DICTISETGETOPTREF"),a.insertHex("f46f",16,"DICTUSETGETOPTREF"),a.insertHex("f47",12,s=>{let l=s.loadUint(4);return l===0?"PFXDICTSET":l===1?"PFXDICTREPLACE":l===2?"PFXDICTADD":l===3?"PFXDICTDEL":`DICT${l&4?"U":"I"}GET${l&2?"PREV":"NEXT"}${l&1?"EQ":""}`}),a.insertHex("f48",11,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit(),p=s.loadBit(),v="";return c&&!d?v="I":c&&d&&(v="U"),`DICT${v}${l?"REM":""}${u?"MAX":"MIN"}${p?"REF":""}`}),a.insertHex("f4a0",13,(s,l)=>{if(s.loadBit()){let p=o(s,0,1),v=s.loadUint(10),x;try{x=(0,t.decompileMethodsMap)(p.preloadRef().beginParse(),v,l)}catch(b){(0,i._isDebug)()&&console.error(b),x=p.asCell().toString(" ".repeat(l))}return`${x} ${v} DICTPUSHCONST`}let c=s.loadBit();return`DICT${s.loadBit()?"U":"I"}GET${c?"EXEC":"JMP"}`}),a.insertHex("f4a8",16,"PFXDICTGETQ"),a.insertHex("f4a9",16,"PFXDICTGET"),a.insertHex("f4aa",16,"PFXDICTGETJMP"),a.insertHex("f4ab",16,"PFXDICTGETEXEC"),a.insertHex("f4b1",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`SUBDICT${d}GET${c?"REF":""}`}),a.insertHex("f4b5",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`SUBDICT${d}RPGET${c?"REF":""}`}),a.insertHex("f4bc",14,s=>{let l=s.loadBit();return`DICT${s.loadBit()?"U":"I"}GET${l?"EXEC":"JMP"}Z`}),a.insertHex("f800",16,"ACCEPT"),a.insertHex("f801",16,"SETGASLIMIT"),a.insertHex("f80f",16,"COMMIT"),a.insertHex("f810",16,"RANDU256"),a.insertHex("f811",16,"RAND"),a.insertHex("f814",16,"SETRAND"),a.insertHex("f815",16,"ADDRAND"),a.insertHex("f82",12,s=>{let l=s.loadUint(4);return l==3?"NOW":l==4?"BLOCKLT":l==5?"LTIME":l==6?"RANDSEED":l==7?"BALANCE":l==8?"MYADDR":l==9?"CONFIGROOT":`${l} GETPARAM`}),a.insertHex("f830",16,"CONFIGDICT"),a.insertHex("f832",16,"CONFIGPARAM"),a.insertHex("f833",16,"CONFIGOPTPARAM"),a.insertHex("f841",11,s=>`${s.loadUint(5)} GETGLOBVAR`),a.insertHex("f861",11,s=>`${s.loadUint(5)} SETGLOBVAR`),a.insertHex("f900",16,"HASHCU"),a.insertHex("f901",16,"HASHSU"),a.insertHex("f902",16,"SHA256U"),a.insertHex("f910",16,"CHKSIGNU"),a.insertHex("f911",16,"CHKSIGNS"),a.insertHex("f940",16,"CDATASIZEQ"),a.insertHex("f941",16,"CDATASIZE"),a.insertHex("f942",16,"SDATASIZEQ"),a.insertHex("f943",16,"SDATASIZE"),a.insertHex("fa00",16,"LDGRAMS"),a.insertHex("fa01",16,"LDVARINT16"),a.insertHex("fa02",16,"STGRAMS"),a.insertHex("fa03",16,"STVARINT16"),a.insertHex("fa04",16,"LDVARUINT32"),a.insertHex("fa05",16,"LDVARINT32"),a.insertHex("fa06",16,"STVARUINT32"),a.insertHex("fa07",16,"STVARINT32"),a.insertHex("fa40",16,"LDMSGADDR"),a.insertHex("fa41",16,"LDMSGADDRQ"),a.insertHex("fa42",16,"PARSEMSGADDR"),a.insertHex("fa43",16,"PARSEMSGADDRQ"),a.insertHex("fa44",16,"REWRITESTDADDR"),a.insertHex("fa45",16,"REWRITESTDADDRQ"),a.insertHex("fa46",16,"REWRITEVARADDR"),a.insertHex("fa47",16,"REWRITEVARADDRQ"),a.insertHex("fb00",16,"SENDRAWMSG"),a.insertHex("fb02",16,"RAWRESERVE"),a.insertHex("fb03",16,"RAWRESERVEX"),a.insertHex("fb04",16,"SETCODE"),a.insertHex("fb06",16,"SETLIBCODE"),a.insertHex("fb07",16,"CHANGELIB"),a.insertHex("fe",8,s=>{let l=s.loadUint(8);if((l&240)==240){let u=l&15;return`"${s.loadBuffer(u+1).toString("utf-8")}" DEBUGSTR`}return`${l} DEBUG`}),a.insertHex("ff",8,s=>{let l=s.loadUint(8);if((l&240)==240){let u=l&15;if(u==0)return"SETCPX";l=u-16}return`${l} SETCP`}),Em}var Nx={};Object.defineProperty(Nx,"__esModule",{value:!0});Nx.KnownMethods=void 0;Nx.KnownMethods={[0]:"recv_internal",[-1]:"recv_external",[-2]:"run_ticktock",[66763]:"get_full_domain",[68445]:"get_nft_content",[69506]:"get_telemint_token_name",[72748]:"get_sale_data",[76407]:"is_plugin_installed",[78748]:"get_public_key",[80293]:"get_owner",[80697]:"get_auction_info",[81467]:"get_subwallet_id",[82320]:"get_version",[83229]:"owner",[85143]:"seqno",[85719]:"royalty_params",[90228]:"get_editor",[91689]:"get_marketplace_address",[92067]:"get_nft_address_by_index",[93270]:"get_reveal_data",[97026]:"get_wallet_data",[102351]:"get_nft_data",[102491]:"get_collection_data",[103289]:"get_wallet_address",[106029]:"get_jetton_data",[107279]:"get_offer_data",[107653]:"get_plugin_list",[110449]:"get_is_closed",[116695]:"get_reveal_mode",[118054]:"get_username",[122498]:"get_telemint_auction_state",[123660]:"dnsresolve",[128411]:"get_royalty_params",[129619]:"get_telemint_auction_config"};var QP;function LN(){if(QP)return js;QP=1,Object.defineProperty(js,"__esModule",{value:!0}),js.fromBoc=js.fromCode=js.decompileMethodsMap=js.decompile=js.setCodepage=void 0;const e=fo,t=Uve(),r=Nx,i=Oy;let o=t.CP0Auto;function a(p){o=p}js.setCodepage=a;function s(p,v){let x="";const b=_=>{if(_ instanceof e.Cell){x+=_.toString(" ".repeat(v||0));return}if(v)for(let k=0;k0;){let _=p.loadBit();y+=_?"1":"0";let k=o.find(y,2);if(k.length>1||k.length==1&&y.length!==k[0].length)continue;if(k.length==0){let O=(0,e.beginCell)();for(let U of Array.from(y).map(D=>D!="0"))O.storeBit(U);O.storeSlice(p),b(O.asCell());continue}let E=o.getOp(y);if(y="",typeof E=="string")b(E);else if(typeof E=="function"){let O=E(p,v||0);b(O)}p.remainingBits===0&&p.remainingRefs>0&&(p=p.loadRef().beginParse())}return x}js.decompile=s;function l(){return{serialize:(p,v)=>{v.storeSlice(p)},parse:p=>p}}function u(p,v,x){var b;let y=p.loadDictDirect(e.Dictionary.Keys.Int(v),l()),_=new Map;for(let[O,U]of y)try{_.set(O,s(U,(x||0)+4))}catch(D){(0,i._isDebug)()&&console.error(D),_.set(O,U.asCell().toString(" ".repeat((x||0)+4)))}let k="";const E=O=>{if(x)for(let U=0;U-1};function By(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function eE(e){return typeof e!="string"&&(e=String(e)),e}function tE(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return bs.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Ca(e){this.map={},e instanceof Ca?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}Ca.prototype.append=function(e,t){e=By(e),t=eE(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};Ca.prototype.delete=function(e){delete this.map[By(e)]};Ca.prototype.get=function(e){return e=By(e),this.has(e)?this.map[e]:null};Ca.prototype.has=function(e){return this.map.hasOwnProperty(By(e))};Ca.prototype.set=function(e,t){this.map[By(e)]=eE(t)};Ca.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)};Ca.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),tE(e)};Ca.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),tE(e)};Ca.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),tE(e)};bs.iterable&&(Ca.prototype[Symbol.iterator]=Ca.prototype.entries);function F5(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function NN(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function jve(e){var t=new FileReader,r=NN(t);return t.readAsArrayBuffer(e),r}function $ve(e){var t=new FileReader,r=NN(t);return t.readAsText(e),r}function Fve(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i-1?t:e}function lp(e,t){if(!(this instanceof lp))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof lp){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ca(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new Ca(t.headers)),this.method=Hve(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+new Date().getTime());else{var o=/\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}lp.prototype.clone=function(){return new lp(this,{body:this._bodyInit})};function Wve(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var i=r.split("="),o=i.shift().replace(/\+/g," "),a=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(a))}}),t}function Vve(e){var t=new Ca,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(i){return i.indexOf(` +`)===0?i.substr(1,i.length):i}).forEach(function(i){var o=i.split(":"),a=o.shift().trim();if(a){var s=o.join(":").trim();t.append(a,s)}}),t}jN.call(lp.prototype);function Lu(e,t){if(!(this instanceof Lu))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new Ca(t.headers),this.url=t.url||"",this._initBody(e)}jN.call(Lu.prototype);Lu.prototype.clone=function(){return new Lu(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ca(this.headers),url:this.url})};Lu.error=function(){var e=new Lu(null,{status:0,statusText:""});return e.type="error",e};var qve=[301,302,303,307,308];Lu.redirect=function(e,t){if(qve.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Lu(null,{status:t,headers:{location:e}})};var ff=ts.DOMException;try{new ff}catch{ff=function(t,r){this.message=t,this.name=r;var i=Error(t);this.stack=i.stack},ff.prototype=Object.create(Error.prototype),ff.prototype.constructor=ff}function $N(e,t){return new Promise(function(r,i){var o=new lp(e,t);if(o.signal&&o.signal.aborted)return i(new ff("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var u={status:a.status,statusText:a.statusText,headers:Vve(a.getAllResponseHeaders()||"")};u.url="responseURL"in a?a.responseURL:u.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){r(new Lu(c,u))},0)},a.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){i(new ff("Aborted","AbortError"))},0)};function l(u){try{return u===""&&ts.location.href?ts.location.href:u}catch{return u}}a.open(o.method,l(o.url),!0),o.credentials==="include"?a.withCredentials=!0:o.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(bs.blob?a.responseType="blob":bs.arrayBuffer&&o.headers.get("Content-Type")&&o.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof Ca)?Object.getOwnPropertyNames(t.headers).forEach(function(u){a.setRequestHeader(u,eE(t.headers[u]))}):o.headers.forEach(function(u,c){a.setRequestHeader(c,u)}),o.signal&&(o.signal.addEventListener("abort",s),a.onreadystatechange=function(){a.readyState===4&&o.signal.removeEventListener("abort",s)}),a.send(typeof o._bodyInit>"u"?null:o._bodyInit)})}$N.polyfill=!0;ts.fetch||(ts.fetch=$N,ts.Headers=Ca,ts.Request=lp,ts.Response=Lu);self.fetch.bind(self);var Kve=_n&&_n.__awaiter||function(e,t,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(p){s(p)}}function u(d){try{c(i.throw(d))}catch(p){s(p)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(jx,"__esModule",{value:!0});jx.Nodes=void 0;const Gve=2*60*1e3;class Yve{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(t){return Kve(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let r=[];try{r=yield(yield fetch(t)).json()}catch(i){throw new Error(`exception in fetch(${t}): ${i}`)}for(const i of r)i.Healthy==="1"&&this.topology.push(i);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(t){var r;const i=[];for(const o of this.topology)this.initTime-o.Mngr.successTS0&&((r=o.Mngr)===null||r===void 0?void 0:r.health[t])&&i.push(o);return i}}jx.Nodes=Yve;const Zve="@orbs-network/ton-access",Qve="2.3.0",Xve="Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",Jve="lib/index.js",e1e="lib/index.js",t1e="lib/index.d.ts",r1e=["lib/**/*"],n1e={test:"env mocha -r ts-node/register test/**/*.ts","test:v2":"env mocha -r ts-node/register test/ton-v2.ts","test:v4":"env mocha -r ts-node/register test/ton-v4.ts",cleanup:"rimraf ./lib","build:web:reg":"esbuild ./lib/web.js --bundle --sourcemap --target=es2015 --outfile=./dist/index.js","build:web:min":"esbuild ./lib/web.js --bundle --minify --target=es2015 --outfile=./dist/index.min.js","build:web":"rimraf ./dist && npm run build:web:reg && npm run build:web:min",build:"npm run lint && rimraf ./lib && tsc && npm run build:web",format:'prettier --write "src/**/*.ts"',lint:"tslint -p tsconfig.json",prepare:"npm run build",prepublishOnly:"npm test && npm run lint",preversion:"npm run lint",version:"npm run format && git add -A src",postversion:"git push && git push --tags"},i1e={type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},o1e="yuval@orbs.com",a1e="MIT",s1e={url:"https://github.com/orbs-network/ton-access/issues"},l1e="https://github.com/orbs-network/ton-access#readme",u1e={"isomorphic-fetch":"^3.0.0"},c1e={"@types/bn.js":"^5.1.1","@types/chai":"^4.3.4","@types/isomorphic-fetch":"^0.0.36","@types/mocha":"^10.0.0",buffer:"^6.0.3",chai:"^4.3.7",esbuild:"^0.15.14",mocha:"^10.1.0",prettier:"^2.7.1",rimraf:"^3.0.2",ton:"^12.1.3","ton-lite-client":"npm:@truecarry/ton-lite-client@^1.6.1",tonweb:"^0.0.58","ts-node":"^10.9.1",tslib:"^2.4.0",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0"},d1e={name:Zve,version:Qve,description:Xve,source:Jve,main:e1e,types:t1e,files:r1e,scripts:n1e,repository:i1e,author:o1e,license:a1e,bugs:s1e,homepage:l1e,dependencies:u1e,devDependencies:c1e};var Eg=_n&&_n.__awaiter||function(e,t,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(p){s(p)}}function u(d){try{c(i.throw(d))}catch(p){s(p)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(zl,"__esModule",{value:!0});zl.getHttpV4Endpoint=zl.getHttpV4Endpoints=WN=zl.getHttpEndpoint=zl.getHttpEndpoints=zl.Access=void 0;const f1e=jx;class FN{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new f1e.Nodes}init(){return Eg(this,void 0,void 0,function*(){const t=d1e;yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${t.version}`)})}makeProtonet(t,r){let i="";switch(t){case"toncenter-api-v2":i+="v2-";break;case"ton-api-v4":i+="v4-";break}return i+=r,i}weightedRandom(t){let r=0;for(const a of t)r+=a.Weight;const i=Math.floor(Math.random()*r);let o=0;for(const a of t){if(i>=o&&i{if(!e)return null;const o=await yp(),a=Vn.Address.parse(e);let{code:s,data:l}=await o.getContractState(a),u=Vn.Cell.fromBoc(s)[0],c=Vn.Cell.fromBoc(l)[0];const d=await o.getBalance(a);let p;try{p=UN.fromCode(u)}catch(b){p=b?.toString()}const v=u.hash(),x=c.hash();return{codeCellHash:{base64:v.toString("base64"),hex:v.toString("hex")},dataCellHash:{base64:x.toString("base64"),hex:x.toString("hex")},decompiled:p,balance:Vn.fromNano(d)}});return{isLoading:t,error:r,data:i}}(()=>{var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(n=>typeof $l<"u"?$l:typeof Proxy<"u"?new Proxy(n,{get:(h,m)=>(typeof $l<"u"?$l:h)[m]}):n)(function(n){if(typeof $l<"u")return $l.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')}),l=(n,h)=>()=>(n&&(h=n(n=0)),h),u=(n,h)=>()=>(h||n((h={exports:{}}).exports,h),h.exports),c=(n,h)=>{for(var m in h)t(n,m,{get:h[m],enumerable:!0})},d=(n,h,m,S)=>{if(h&&typeof h=="object"||typeof h=="function")for(let f of i(h))!a.call(n,f)&&f!==m&&t(n,f,{get:()=>h[f],enumerable:!(S=r(h,f))||S.enumerable});return n},p=(n,h,m)=>(m=n!=null?e(o(n)):{},d(h||!n||!n.__esModule?t(m,"default",{value:n,enumerable:!0}):m,n)),v=n=>d(t({},"__esModule",{value:!0}),n),x,b=l(()=>{x=globalThis}),y=l(()=>{}),_=l(()=>{}),k={};c(k,{addListener:()=>yr,argv:()=>vr,binding:()=>ae,browser:()=>Rt,chdir:()=>oe,config:()=>Lt,cwd:()=>V,default:()=>lt,emit:()=>Ae,env:()=>Jt,hrtime:()=>ee,nextTick:()=>H,off:()=>Mt,on:()=>Kt,once:()=>ne,platform:()=>Bt,release:()=>Ct,removeAllListeners:()=>Ie,removeListener:()=>Nt,title:()=>nr,umask:()=>P,uptime:()=>le,version:()=>At,versions:()=>kt});function E(){throw new Error("setTimeout has not been defined")}function O(){throw new Error("clearTimeout has not been defined")}function U(n){if(pe===setTimeout)return setTimeout(n,0);if((pe===E||!pe)&&setTimeout)return pe=setTimeout,setTimeout(n,0);try{return pe(n,0)}catch{try{return pe.call(null,n,0)}catch{return pe.call(this,n,0)}}}function D(n){if(xe===clearTimeout)return clearTimeout(n);if((xe===O||!xe)&&clearTimeout)return xe=clearTimeout,clearTimeout(n);try{return xe(n)}catch{try{return xe.call(null,n)}catch{return xe.call(this,n)}}}function j(){!ft||!Le||(ft=!1,Le.length?J=Le.concat(J):He=-1,J.length&&F())}function F(){if(!ft){var n=U(j);ft=!0;for(var h=J.length;h;){for(Le=J,J=[];++He1)for(var m=1;m{b(),y(),_(),wt(),ce(),pe=E,xe=O,typeof x.setTimeout=="function"&&(pe=setTimeout),typeof x.clearTimeout=="function"&&(xe=clearTimeout),J=[],ft=!1,He=-1,W.prototype.run=function(){this.fun.apply(null,this.array)},nr="browser",Bt="browser",Rt=!0,Jt={},vr=[],At="",kt={},Ct={},Lt={},Kt=G,yr=G,ne=G,Mt=G,Nt=G,Ie=G,Ae=G,fe=x.performance||{},Be=fe.now||fe.mozNow||fe.msNow||fe.oNow||fe.webkitNow||function(){return new Date().getTime()},rt=new Date,lt={nextTick:H,title:nr,browser:Rt,env:Jt,argv:vr,version:At,versions:kt,on:Kt,addListener:yr,once:ne,off:Mt,removeListener:Nt,removeAllListeners:Ie,emit:Ae,binding:ae,cwd:V,chdir:oe,umask:P,hrtime:ee,platform:Bt,release:Ct,config:Lt,uptime:le}}),ce=l(()=>{jt()});function ie(){ct=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=n.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");g=n[R-2]==="="?2:n[R-1]==="="?1:0,w=new je(R*3/4-g),S=g>0?R-4:R;var B=0;for(h=0,m=0;h>16&255,w[B++]=f>>8&255,w[B++]=f&255;return g===2?(f=ve[n.charCodeAt(h)]<<2|ve[n.charCodeAt(h+1)]>>4,w[B++]=f&255):g===1&&(f=ve[n.charCodeAt(h)]<<10|ve[n.charCodeAt(h+1)]<<4|ve[n.charCodeAt(h+2)]>>2,w[B++]=f>>8&255,w[B++]=f&255),w}function $(n){return Z[n>>18&63]+Z[n>>12&63]+Z[n>>6&63]+Z[n&63]}function C(n,h,m){for(var S,f=[],g=h;gB?B:R+w));return S===1?(h=n[m-1],f+=Z[h>>2],f+=Z[h<<4&63],f+="=="):S===2&&(h=(n[m-2]<<8)+n[m-1],f+=Z[h>>10],f+=Z[h>>4&63],f+=Z[h<<2&63],f+="="),g.push(f),g.join("")}var Z,ve,je,ct,ur=l(()=>{b(),y(),_(),wt(),ce(),Z=[],ve=[],je=typeof Uint8Array<"u"?Uint8Array:Array,ct=!1});function Dr(n,h,m,S,f){var g,w,R=f*8-S-1,B=(1<>1,N=-7,I=m?f-1:0,te=m?-1:1,_e=n[h+I];for(I+=te,g=_e&(1<<-N)-1,_e>>=-N,N+=R;N>0;g=g*256+n[h+I],I+=te,N-=8);for(w=g&(1<<-N)-1,g>>=-N,N+=S;N>0;w=w*256+n[h+I],I+=te,N-=8);if(g===0)g=1-M;else{if(g===B)return w?NaN:(_e?-1:1)*(1/0);w=w+Math.pow(2,S),g=g-M}return(_e?-1:1)*w*Math.pow(2,g-S)}function hr(n,h,m,S,f,g){var w,R,B,M=g*8-f-1,N=(1<>1,te=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,_e=S?0:g-1,Ce=S?1:-1,Ve=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(R=isNaN(h)?1:0,w=N):(w=Math.floor(Math.log(h)/Math.LN2),h*(B=Math.pow(2,-w))<1&&(w--,B*=2),w+I>=1?h+=te/B:h+=te*Math.pow(2,1-I),h*B>=2&&(w++,B/=2),w+I>=N?(R=0,w=N):w+I>=1?(R=(h*B-1)*Math.pow(2,f),w=w+I):(R=h*Math.pow(2,I-1)*Math.pow(2,f),w=0));f>=8;n[m+_e]=R&255,_e+=Ce,R/=256,f-=8);for(w=w<0;n[m+_e]=w&255,_e+=Ce,w/=256,M-=8);n[m+_e-Ce]|=Ve*128}var Rr=l(()=>{b(),y(),_(),wt(),ce()}),Gr,Nr,Kn=l(()=>{b(),y(),_(),wt(),ce(),Gr={}.toString,Nr=Array.isArray||function(n){return Gr.call(n)=="[object Array]"}});function Tn(){return yt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function In(n,h){if(Tn()=Tn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Tn().toString(16)+" bytes");return n|0}function ue(n){return!!(n!=null&&n._isBuffer)}function Re(n,h){if(ue(n))return n.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var m=n.length;if(m===0)return 0;for(var S=!1;;)switch(h){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":case void 0:return Pr(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return Fn(n).length;default:if(S)return Pr(n).length;h=(""+h).toLowerCase(),S=!0}}function Ee(n,h,m){var S=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,h>>>=0,m<=h))return"";for(n||(n="utf8");;)switch(n){case"hex":return br(this,h,m);case"utf8":case"utf-8":return ye(this,h,m);case"ascii":return it(this,h,m);case"latin1":case"binary":return dt(this,h,m);case"base64":return K(this,h,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cr(this,h,m);default:if(S)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),S=!0}}function q(n,h,m){var S=n[h];n[h]=n[m],n[m]=S}function Fe(n,h,m,S,f){if(n.length===0)return-1;if(typeof m=="string"?(S=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,isNaN(m)&&(m=f?0:n.length-1),m<0&&(m=n.length+m),m>=n.length){if(f)return-1;m=n.length-1}else if(m<0)if(f)m=0;else return-1;if(typeof h=="string"&&(h=yt.from(h,S)),ue(h))return h.length===0?-1:Xt(n,h,m,S,f);if(typeof h=="number")return h=h&255,yt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(n,h,m):Uint8Array.prototype.lastIndexOf.call(n,h,m):Xt(n,[h],m,S,f);throw new TypeError("val must be string, number or Buffer")}function Xt(n,h,m,S,f){var g=1,w=n.length,R=h.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(n.length<2||h.length<2)return-1;g=2,w/=2,R/=2,m/=2}function B(_e,Ce){return g===1?_e[Ce]:_e.readUInt16BE(Ce*g)}var M;if(f){var N=-1;for(M=m;Mw&&(m=w-R),M=m;M>=0;M--){for(var I=!0,te=0;tef&&(S=f)):S=f;var g=h.length;if(g%2!==0)throw new TypeError("Invalid hex string");S>g/2&&(S=g/2);for(var w=0;w239?4:g>223?3:g>191?2:1;if(f+R<=m){var B,M,N,I;switch(R){case 1:g<128&&(w=g);break;case 2:B=n[f+1],(B&192)===128&&(I=(g&31)<<6|B&63,I>127&&(w=I));break;case 3:B=n[f+1],M=n[f+2],(B&192)===128&&(M&192)===128&&(I=(g&15)<<12|(B&63)<<6|M&63,I>2047&&(I<55296||I>57343)&&(w=I));break;case 4:B=n[f+1],M=n[f+2],N=n[f+3],(B&192)===128&&(M&192)===128&&(N&192)===128&&(I=(g&15)<<18|(B&63)<<12|(M&63)<<6|N&63,I>65535&&I<1114112&&(w=I))}}w===null?(w=65533,R=1):w>65535&&(w-=65536,S.push(w>>>10&1023|55296),w=56320|w&1023),S.push(w),f+=R}return Me(S)}function Me(n){var h=n.length;if(h<=mi)return String.fromCharCode.apply(String,n);for(var m="",S=0;SS)&&(m=S);for(var f="",g=h;gm)throw new RangeError("Trying to access beyond buffer length")}function Sr(n,h,m,S,f,g){if(!ue(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>f||hn.length)throw new RangeError("Index out of range")}function Kr(n,h,m,S){h<0&&(h=65535+h+1);for(var f=0,g=Math.min(n.length-m,2);f>>(S?f:1-f)*8}function on(n,h,m,S){h<0&&(h=4294967295+h+1);for(var f=0,g=Math.min(n.length-m,4);f>>(S?f:3-f)*8&255}function Sn(n,h,m,S,f,g){if(m+S>n.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function Rn(n,h,m,S,f){return f||Sn(n,h,m,4),hr(n,h,m,S,23,4),m+4}function ir(n,h,m,S,f){return f||Sn(n,h,m,8),hr(n,h,m,S,52,8),m+8}function gr(n){if(n=Gt(n).replace(Qn,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function Gt(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function jr(n){return n<16?"0"+n.toString(16):n.toString(16)}function Pr(n,h){h=h||1/0;for(var m,S=n.length,f=null,g=[],w=0;w55295&&m<57344){if(!f){if(m>56319){(h-=3)>-1&&g.push(239,191,189);continue}else if(w+1===S){(h-=3)>-1&&g.push(239,191,189);continue}f=m;continue}if(m<56320){(h-=3)>-1&&g.push(239,191,189),f=m;continue}m=(f-55296<<10|m-56320)+65536}else f&&(h-=3)>-1&&g.push(239,191,189);if(f=null,m<128){if((h-=1)<0)break;g.push(m)}else if(m<2048){if((h-=2)<0)break;g.push(m>>6|192,m&63|128)}else if(m<65536){if((h-=3)<0)break;g.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((h-=4)<0)break;g.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return g}function Lr(n){for(var h=[],m=0;m>8,f=m%256,g.push(f),g.push(S);return g}function Fn(n){return de(gr(n))}function Jn(n,h,m,S){for(var f=0;f=h.length||f>=n.length);++f)h[f+m]=n[f];return f}function fi(n){return n!==n}function si(n){return n!=null&&(!!n._isBuffer||Et(n)||pi(n))}function Et(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function pi(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Et(n.slice(0,0))}var cn,mi,Qn,Ai=l(()=>{b(),y(),_(),wt(),ce(),ur(),Rr(),Kn(),cn=50,yt.TYPED_ARRAY_SUPPORT=x.TYPED_ARRAY_SUPPORT!==void 0?x.TYPED_ARRAY_SUPPORT:!0,Tn(),yt.poolSize=8192,yt._augment=function(n){return n.__proto__=yt.prototype,n},yt.from=function(n,h,m){return Ei(null,n,h,m)},yt.TYPED_ARRAY_SUPPORT&&(yt.prototype.__proto__=Uint8Array.prototype,yt.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&yt[Symbol.species]),yt.alloc=function(n,h,m){return Pi(null,n,h,m)},yt.allocUnsafe=function(n){return Ji(null,n)},yt.allocUnsafeSlow=function(n){return Ji(null,n)},yt.isBuffer=si,yt.compare=function(n,h){if(!ue(n)||!ue(h))throw new TypeError("Arguments must be Buffers");if(n===h)return 0;for(var m=n.length,S=h.length,f=0,g=Math.min(m,S);f0&&(n=this.toString("hex",0,h).match(/.{2}/g).join(" "),this.length>h&&(n+=" ... ")),""},yt.prototype.compare=function(n,h,m,S,f){if(!ue(n))throw new TypeError("Argument must be a Buffer");if(h===void 0&&(h=0),m===void 0&&(m=n?n.length:0),S===void 0&&(S=0),f===void 0&&(f=this.length),h<0||m>n.length||S<0||f>this.length)throw new RangeError("out of range index");if(S>=f&&h>=m)return 0;if(S>=f)return-1;if(h>=m)return 1;if(h>>>=0,m>>>=0,S>>>=0,f>>>=0,this===n)return 0;for(var g=f-S,w=m-h,R=Math.min(g,w),B=this.slice(S,f),M=n.slice(h,m),N=0;Nf)&&(m=f),n.length>0&&(m<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var g=!1;;)switch(S){case"hex":return ar(this,n,h,m);case"utf8":case"utf-8":return Br(this,n,h,m);case"ascii":return Hr(this,n,h,m);case"latin1":case"binary":return An(this,n,h,m);case"base64":return un(this,n,h,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,n,h,m);default:if(g)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),g=!0}},yt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},mi=4096,yt.prototype.slice=function(n,h){var m=this.length;n=~~n,h=h===void 0?m:~~h,n<0?(n+=m,n<0&&(n=0)):n>m&&(n=m),h<0?(h+=m,h<0&&(h=0)):h>m&&(h=m),h0&&(f*=256);)S+=this[n+--h]*f;return S},yt.prototype.readUInt8=function(n,h){return h||Or(n,1,this.length),this[n]},yt.prototype.readUInt16LE=function(n,h){return h||Or(n,2,this.length),this[n]|this[n+1]<<8},yt.prototype.readUInt16BE=function(n,h){return h||Or(n,2,this.length),this[n]<<8|this[n+1]},yt.prototype.readUInt32LE=function(n,h){return h||Or(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},yt.prototype.readUInt32BE=function(n,h){return h||Or(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},yt.prototype.readIntLE=function(n,h,m){n=n|0,h=h|0,m||Or(n,h,this.length);for(var S=this[n],f=1,g=0;++g=f&&(S-=Math.pow(2,8*h)),S},yt.prototype.readIntBE=function(n,h,m){n=n|0,h=h|0,m||Or(n,h,this.length);for(var S=h,f=1,g=this[n+--S];S>0&&(f*=256);)g+=this[n+--S]*f;return f*=128,g>=f&&(g-=Math.pow(2,8*h)),g},yt.prototype.readInt8=function(n,h){return h||Or(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},yt.prototype.readInt16LE=function(n,h){h||Or(n,2,this.length);var m=this[n]|this[n+1]<<8;return m&32768?m|4294901760:m},yt.prototype.readInt16BE=function(n,h){h||Or(n,2,this.length);var m=this[n+1]|this[n]<<8;return m&32768?m|4294901760:m},yt.prototype.readInt32LE=function(n,h){return h||Or(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},yt.prototype.readInt32BE=function(n,h){return h||Or(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},yt.prototype.readFloatLE=function(n,h){return h||Or(n,4,this.length),Dr(this,n,!0,23,4)},yt.prototype.readFloatBE=function(n,h){return h||Or(n,4,this.length),Dr(this,n,!1,23,4)},yt.prototype.readDoubleLE=function(n,h){return h||Or(n,8,this.length),Dr(this,n,!0,52,8)},yt.prototype.readDoubleBE=function(n,h){return h||Or(n,8,this.length),Dr(this,n,!1,52,8)},yt.prototype.writeUIntLE=function(n,h,m,S){if(n=+n,h=h|0,m=m|0,!S){var f=Math.pow(2,8*m)-1;Sr(this,n,h,m,f,0)}var g=1,w=0;for(this[h]=n&255;++w=0&&(w*=256);)this[h+g]=n/w&255;return h+m},yt.prototype.writeUInt8=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,1,255,0),yt.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[h]=n&255,h+1},yt.prototype.writeUInt16LE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,2,65535,0),yt.TYPED_ARRAY_SUPPORT?(this[h]=n&255,this[h+1]=n>>>8):Kr(this,n,h,!0),h+2},yt.prototype.writeUInt16BE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,2,65535,0),yt.TYPED_ARRAY_SUPPORT?(this[h]=n>>>8,this[h+1]=n&255):Kr(this,n,h,!1),h+2},yt.prototype.writeUInt32LE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,4,4294967295,0),yt.TYPED_ARRAY_SUPPORT?(this[h+3]=n>>>24,this[h+2]=n>>>16,this[h+1]=n>>>8,this[h]=n&255):on(this,n,h,!0),h+4},yt.prototype.writeUInt32BE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,4,4294967295,0),yt.TYPED_ARRAY_SUPPORT?(this[h]=n>>>24,this[h+1]=n>>>16,this[h+2]=n>>>8,this[h+3]=n&255):on(this,n,h,!1),h+4},yt.prototype.writeIntLE=function(n,h,m,S){if(n=+n,h=h|0,!S){var f=Math.pow(2,8*m-1);Sr(this,n,h,m,f-1,-f)}var g=0,w=1,R=0;for(this[h]=n&255;++g>0)-R&255;return h+m},yt.prototype.writeIntBE=function(n,h,m,S){if(n=+n,h=h|0,!S){var f=Math.pow(2,8*m-1);Sr(this,n,h,m,f-1,-f)}var g=m-1,w=1,R=0;for(this[h+g]=n&255;--g>=0&&(w*=256);)n<0&&R===0&&this[h+g+1]!==0&&(R=1),this[h+g]=(n/w>>0)-R&255;return h+m},yt.prototype.writeInt8=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,1,127,-128),yt.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[h]=n&255,h+1},yt.prototype.writeInt16LE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,2,32767,-32768),yt.TYPED_ARRAY_SUPPORT?(this[h]=n&255,this[h+1]=n>>>8):Kr(this,n,h,!0),h+2},yt.prototype.writeInt16BE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,2,32767,-32768),yt.TYPED_ARRAY_SUPPORT?(this[h]=n>>>8,this[h+1]=n&255):Kr(this,n,h,!1),h+2},yt.prototype.writeInt32LE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,4,2147483647,-2147483648),yt.TYPED_ARRAY_SUPPORT?(this[h]=n&255,this[h+1]=n>>>8,this[h+2]=n>>>16,this[h+3]=n>>>24):on(this,n,h,!0),h+4},yt.prototype.writeInt32BE=function(n,h,m){return n=+n,h=h|0,m||Sr(this,n,h,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),yt.TYPED_ARRAY_SUPPORT?(this[h]=n>>>24,this[h+1]=n>>>16,this[h+2]=n>>>8,this[h+3]=n&255):on(this,n,h,!1),h+4},yt.prototype.writeFloatLE=function(n,h,m){return Rn(this,n,h,!0,m)},yt.prototype.writeFloatBE=function(n,h,m){return Rn(this,n,h,!1,m)},yt.prototype.writeDoubleLE=function(n,h,m){return ir(this,n,h,!0,m)},yt.prototype.writeDoubleBE=function(n,h,m){return ir(this,n,h,!1,m)},yt.prototype.copy=function(n,h,m,S){if(m||(m=0),!S&&S!==0&&(S=this.length),h>=n.length&&(h=n.length),h||(h=0),S>0&&S=this.length)throw new RangeError("sourceStart out of bounds");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),n.length-h=0;--g)n[g+h]=this[g+m];else if(f<1e3||!yt.TYPED_ARRAY_SUPPORT)for(g=0;g>>0,m=m===void 0?this.length:m>>>0,n||(n=0);var g;if(typeof n=="number")for(g=h;g{Ai()}),ao=u((n,h)=>{b(),y(),_(),wt(),ce();var m=Symbol.for("nodejs.util.inspect.custom");h.exports=m}),ji=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.crc16=void 0;function h(m){let S=0,f=yt.alloc(m.length+2);f.set(m);for(let g of f){let w=128;for(;w>0;)S<<=1,g&w&&(S+=1),w>>=1,S>65535&&(S&=65535,S^=4129)}return yt.from([Math.floor(S/256),S%256])}n.crc16=h}),Li=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__importDefault||function(I){return I&&I.__esModule?I:{default:I}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.Address=void 0;var S=h(ao()),f=ji(),g=17,w=81,R=128;function B(I){let te=yt.isBuffer(I)?I:yt.from(I,"base64");if(te.length!==36)throw new Error("Unknown address type: byte length is not equal to 36");let _e=te.subarray(0,34),Ce=te.subarray(34,36),Ve=(0,f.crc16)(_e);if(!(Ve[0]===Ce[0]&&Ve[1]===Ce[1]))throw new Error("Invalid checksum: "+I);let qe=_e[0],Pe=!1,Ze=!1;if(qe&R&&(Pe=!0,qe=qe^R),qe!==g&&qe!==w)throw"Unknown address tag";Ze=qe===g;let et=null;_e[1]===255?et=-1:et=_e[1];let xt=_e.subarray(2,34);return{isTestOnly:Pe,isBounceable:Ze,workchain:et,hashPart:xt}}var M=class{static isAddress(I){return I instanceof M}static isFriendly(I){return I.indexOf(":")<0}static normalize(I){return typeof I=="string"?M.parse(I).toString():I.toString()}static parse(I){return M.isFriendly(I)?this.parseFriendly(I).address:this.parseRaw(I)}static parseRaw(I){let te=parseInt(I.split(":")[0]),_e=yt.from(I.split(":")[1],"hex");return new M(te,_e)}static parseFriendly(I){if(yt.isBuffer(I)){let te=B(I);return{isBounceable:te.isBounceable,isTestOnly:te.isTestOnly,address:new M(te.workchain,te.hashPart)}}else{let te=I.replace(/\-/g,"+").replace(/_/g,"/"),_e=B(te);return{isBounceable:_e.isBounceable,isTestOnly:_e.isTestOnly,address:new M(_e.workchain,_e.hashPart)}}}constructor(I,te){this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{let _e=yt.alloc(36);return _e.set(this.hash),_e.set([this.workChain,this.workChain,this.workChain,this.workChain],32),_e},this.toStringBuffer=_e=>{let Ce=_e&&_e.testOnly!==void 0?_e.testOnly:!1,Ve=!(_e&&_e.bounceable!==void 0)||_e.bounceable?g:w;Ce&&(Ve|=R);let qe=yt.alloc(34);qe[0]=Ve,qe[1]=this.workChain,qe.set(this.hash,2);let Pe=yt.alloc(36);return Pe.set(qe),Pe.set((0,f.crc16)(qe),34),Pe},this.toString=_e=>{let Ce=_e&&_e.urlSafe!==void 0?_e.urlSafe:!0,Ve=this.toStringBuffer(_e);return Ce?Ve.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):Ve.toString("base64")},this[m]=()=>this.toString(),this.workChain=I,this.hash=te,Object.freeze(this)}equals(I){return I.workChain!==this.workChain?!1:I.hash.equals(this.hash)}};n.Address=M,m=S.default;function N(I){return M.parse(I)}n.address=N}),bo=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__importDefault||function(g){return g&&g.__esModule?g:{default:g}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.ExternalAddress=void 0;var S=h(ao()),f=class{static isAddress(g){return g instanceof f}constructor(g,w){this[m]=()=>this.toString(),this.value=g,this.bits=w}toString(){return`External<${this.bits}:${this.value}>`}};n.ExternalAddress=f,m=S.default}),wo=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.base32Decode=n.base32Encode=void 0;var h="abcdefghijklmnopqrstuvwxyz234567";function m(g){let w=g.byteLength,R=0,B=0,M="";for(let N=0;N=5;)M+=h[B>>>R-5&31],R-=5;return R>0&&(M+=h[B<<5-R&31]),M}n.base32Encode=m;function S(g,w){let R=g.indexOf(w);if(R===-1)throw new Error("Invalid character found: "+w);return R}function f(g){let w;w=g.toLowerCase();let{length:R}=w,B=0,M=0,N=0,I=yt.alloc(R*5/8|0);for(let te=0;te=8&&(I[N++]=M>>>B-8&255,B-=8);return I}n.base32Decode=f}),$o=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__importDefault||function(R){return R&&R.__esModule?R:{default:R}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.ADNLAddress=void 0;var S=h(ao()),f=wo(),g=ji(),w=class{static parseFriendly(R){if(R.length!==55)throw Error("Invalid address");R="f"+R;let B=(0,f.base32Decode)(R);if(B[0]!==45)throw Error("Invalid address");let M=B.slice(33);if(!(0,g.crc16)(B.slice(0,33)).equals(M))throw Error("Invalid address");return new w(B.slice(1,33))}static parseRaw(R){let B=yt.from(R,"base64");return new w(B)}constructor(R){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let B=yt.concat([yt.from([45]),this.address]),M=(0,g.crc16)(B);return B=yt.concat([B,M]),(0,f.base32Encode)(B).slice(1)},this[m]=()=>this.toString(),R.length!==32)throw Error("Invalid address");this.address=R}equals(R){return this.address.equals(R.address)}};n.ADNLAddress=w,m=S.default}),To=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.bitsToPaddedBuffer=void 0;var h=Zn();function m(S){let f=new h.BitBuilder(Math.ceil(S.length/8)*8);f.writeBits(S);let g=Math.ceil(S.length/8)*8-S.length;for(let w=0;w{b(),y(),_(),wt(),ce();var h=n&&n.__importDefault||function(w){return w&&w.__esModule?w:{default:w}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.BitString=void 0;var S=To(),f=h(ao()),g=class{constructor(w,R,B){if(this[m]=()=>this.toString(),B<0)throw new Error(`Length ${B} is out of bounds`);this._length=B,this._data=w,this._offset=R}get length(){return this._length}at(w){if(w>=this._length)throw new Error(`Index ${w} > ${this._length} is out of bounds`);if(w<0)throw new Error(`Index ${w} < 0 is out of bounds`);let R=this._offset+w>>3,B=7-(this._offset+w)%8;return(this._data[R]&1<=this._length)throw new Error(`Offset(${w}) > ${this._length} is out of bounds`);if(w<0)throw new Error(`Offset(${w}) < 0 is out of bounds`);if(w+R>this._length)throw new Error(`Offset ${w} + Length ${R} > ${this._length} is out of bounds`);return new g(this._data,this._offset+w,R)}subbuffer(w,R){if(w>=this._length)throw new Error(`Offset ${w} is out of bounds`);if(w<0)throw new Error(`Offset ${w} is out of bounds`);if(w+R>this._length)throw new Error(`Offset + Lenght = ${w+R} is out of bounds`);if(R%8!==0||(this._offset+w)%8!==0)return null;let B=this._offset+w>>3,M=B+(R>>3);return this._data.subarray(B,M)}equals(w){if(this._length!==w._length)return!1;for(let R=0;R{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.BitBuilder=void 0;var h=Li(),m=bo(),S=ko(),f=class{constructor(g=1023){this._buffer=yt.alloc(Math.ceil(g/8)),this._length=0}get length(){return this._length}writeBit(g){let w=this._length;if(w>this._buffer.length*8)throw new Error("BitBuilder overflow");(g===!0||g>0)&&(this._buffer[w/8|0]|=1<<7-w%8),this._length++}writeBits(g){for(let w=0;wthis._buffer.length*8)throw new Error("BitBuilder overflow");g.copy(this._buffer,this._length/8),this._length+=g.length*8}else for(let w=0;w255||!Number.isSafeInteger(N))throw Error(`value is out of range for ${w} bits. Got ${g}`);this._buffer[this._length/8]=Number(g),this._length+=8;return}if(w===16&&this._length%8===0){let N=Number(g);if(N<0||N>65536||!Number.isSafeInteger(N))throw Error(`value is out of range for ${w} bits. Got ${g}`);this._buffer[this._length/8]=N>>8,this._buffer[this._length/8+1]=N&255,this._length+=16;return}let R=BigInt(g);if(w<0||!Number.isSafeInteger(w))throw Error(`invalid bit length. Got ${w}`);if(w===0){if(g!==0n)throw Error(`value is not zero for ${w} bits. Got ${g}`);return}let B=1n<=B)throw Error(`bitLength is too small for a value ${g}. Got ${w}`);let M=[];for(;R>0;)M.push(R%2n===1n),R/=2n;for(let N=0;N=B)throw Error(`value is out of range for ${w} bits. Got ${g}`);R<0?(this.writeBit(!0),R=(1n<0?R:-R,M=1+Math.ceil(B.toString(2).length/8),N=M*8;this.writeUint(M,w),this.writeInt(R,N)}writeCoins(g){this.writeVarUint(g,4)}writeAddress(g){if(g==null){this.writeUint(0,2);return}if(h.Address.isAddress(g)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(g.workChain,8),this.writeBuffer(g.hash);return}if(m.ExternalAddress.isAddress(g)){this.writeUint(1,2),this.writeUint(g.bits,9),this.writeUint(g.value,g.bits);return}throw Error(`Invalid address. Got ${g}`)}build(){return new S.BitString(this._buffer,0,this._length)}buffer(){if(this._length%8!==0)throw new Error("BitBuilder buffer is not byte aligned");return this._buffer.subarray(0,this._length/8)}};n.BitBuilder=f}),Fo=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.CellType=void 0,function(h){h[h.Ordinary=-1]="Ordinary",h[h.PrunedBranch=1]="PrunedBranch",h[h.Library=2]="Library",h[h.MerkleProof=3]="MerkleProof",h[h.MerkleUpdate=4]="MerkleUpdate"}(n.CellType||(n.CellType={}))}),Ea=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.parseDict=void 0;function h(f){let g=0;for(;f.loadBit();)g++;return g}function m(f,g,w,R,B){let M=g.loadBit()?1:0,N=0,I=f;if(M===0){N=h(g);for(let te=0;te{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.findCommonPrefix=void 0;function h(m){if(m.length===0)return"";if(m.length===1)return m[0];let S=[...m].sort(),f=0;for(let g=0;g{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.serializeDict=n.detectLabelType=n.writeLabelSame=n.writeLabelLong=n.writeLabelShort=n.buildTree=void 0;var h=qa(),m=Vd();function S(Ue,We){for(;Ue.length{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.deserializeInternalKey=n.serializeInternalKey=void 0;var h=Li();function m(f){if(typeof f=="number"){if(!Number.isSafeInteger(f))throw Error("Invalid key type: not a safe integer: "+f);return"n:"+f.toString(10)}else{if(typeof f=="bigint")return"b:"+f.toString(10);if(h.Address.isAddress(f))return"a:"+f.toString();if(yt.isBuffer(f))return"f:"+f.toString("hex");throw Error("Invalid key type")}}n.serializeInternalKey=m;function S(f){let g=f.slice(0,2),w=f.slice(2);if(g==="n:")return parseInt(w,10);if(g==="b:")return BigInt(w);if(g==="a:")return h.Address.parse(w);if(g==="f:")return yt.from(w,"hex");throw Error("Invalid key type: "+g)}n.deserializeInternalKey=S}),Wu=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.Dictionary=void 0;var h=Li(),m=qa(),S=Gd(),f=Ea(),g=Pl(),w=qd(),R=class{static empty(Je,Oe){return Je&&Oe?new R(new Map,Je,Oe):new R(new Map,null,null)}static load(Je,Oe,Se){let $e;if(Se instanceof S.Cell){if(Se.isExotic)return R.empty(Je,Oe);$e=Se.beginParse()}else $e=Se;let mt=$e.loadMaybeRef();return mt&&!mt.isExotic?R.loadDirect(Je,Oe,mt.beginParse()):R.empty(Je,Oe)}static loadDirect(Je,Oe,Se){if(!Se)return R.empty(Je,Oe);let $e;Se instanceof S.Cell?$e=Se.beginParse():$e=Se;let mt=(0,f.parseDict)($e,Je.bits,Oe.parse),$t=new Map;for(let[pr,Cr]of mt)$t.set((0,w.serializeInternalKey)(Je.parse(pr)),Cr);return new R($t,Je,Oe)}constructor(Je,Oe,Se){this._key=Oe,this._value=Se,this._map=Je}get size(){return this._map.size}get(Je){return this._map.get((0,w.serializeInternalKey)(Je))}has(Je){return this._map.has((0,w.serializeInternalKey)(Je))}set(Je,Oe){return this._map.set((0,w.serializeInternalKey)(Je),Oe),this}delete(Je){let Oe=(0,w.serializeInternalKey)(Je);return this._map.delete(Oe)}clear(){this._map.clear()}*[Symbol.iterator](){for(let[Je,Oe]of this._map)yield[(0,w.deserializeInternalKey)(Je),Oe]}keys(){return Array.from(this._map.keys()).map(Je=>(0,w.deserializeInternalKey)(Je))}values(){return Array.from(this._map.values())}store(Je,Oe,Se){if(this._map.size===0)Je.storeBit(0);else{let $e=this._key;Oe!=null&&($e=Oe);let mt=this._value;if(Se!=null&&(mt=Se),!$e)throw Error("Key serializer is not defined");if(!mt)throw Error("Value serializer is not defined");let $t=new Map;for(let[Cr,qr]of this._map)$t.set($e.serialize((0,w.deserializeInternalKey)(Cr)),qr);Je.storeBit(1);let pr=(0,m.beginCell)();(0,g.serializeDict)($t,$e.bits,mt.serialize,pr),Je.storeRef(pr.endCell())}}storeDirect(Je,Oe,Se){if(this._map.size===0)throw Error("Cannot store empty dictionary directly");let $e=this._key;Oe!=null&&($e=Oe);let mt=this._value;if(Se!=null&&(mt=Se),!$e)throw Error("Key serializer is not defined");if(!mt)throw Error("Value serializer is not defined");let $t=new Map;for(let[pr,Cr]of this._map)$t.set($e.serialize((0,w.deserializeInternalKey)(pr)),Cr);(0,g.serializeDict)($t,$e.bits,mt.serialize,Je)}};n.Dictionary=R,R.Keys={Address:()=>B(),BigInt:Je=>M(Je),Int:Je=>N(Je),BigUint:Je=>I(Je),Uint:Je=>te(Je),Buffer:Je=>_e(Je)},R.Values={BigInt:Je=>Ve(Je),Int:Je=>Ce(Je),BigVarInt:Je=>qe(Je),BigUint:Je=>et(Je),Uint:Je=>Ze(Je),BigVarUint:Je=>Pe(Je),Bool:()=>xt(),Address:()=>Ue(),Cell:()=>We(),Buffer:Je=>gt(Je),Dictionary:(Je,Oe)=>ht(Je,Oe)};function B(){return{bits:267,serialize:Je=>{if(!h.Address.isAddress(Je))throw Error("Key is not an address");return(0,m.beginCell)().storeAddress(Je).endCell().beginParse().preloadUintBig(267)},parse:Je=>(0,m.beginCell)().storeUint(Je,267).endCell().beginParse().loadAddress()}}function M(Je){return{bits:Je,serialize:Oe=>{if(typeof Oe!="bigint")throw Error("Key is not a bigint");return(0,m.beginCell)().storeInt(Oe,Je).endCell().beginParse().loadUintBig(Je)},parse:Oe=>(0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadIntBig(Je)}}function N(Je){return{bits:Je,serialize:Oe=>{if(typeof Oe!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(Oe))throw Error("Key is not a safe integer: "+Oe);return(0,m.beginCell)().storeInt(Oe,Je).endCell().beginParse().loadUintBig(Je)},parse:Oe=>(0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadInt(Je)}}function I(Je){return{bits:Je,serialize:Oe=>{if(typeof Oe!="bigint")throw Error("Key is not a bigint");if(Oe<0)throw Error("Key is negative: "+Oe);return(0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadUintBig(Je)},parse:Oe=>(0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadUintBig(Je)}}function te(Je){return{bits:Je,serialize:Oe=>{if(typeof Oe!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(Oe))throw Error("Key is not a safe integer: "+Oe);if(Oe<0)throw Error("Key is negative: "+Oe);return(0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadUintBig(Je)},parse:Oe=>Number((0,m.beginCell)().storeUint(Oe,Je).endCell().beginParse().loadUint(Je))}}function _e(Je){return{bits:Je*8,serialize:Oe=>{if(!yt.isBuffer(Oe))throw Error("Key is not a buffer");return(0,m.beginCell)().storeBuffer(Oe).endCell().beginParse().loadUintBig(Je*8)},parse:Oe=>(0,m.beginCell)().storeUint(Oe,Je*8).endCell().beginParse().loadBuffer(Je)}}function Ce(Je){return{serialize:(Oe,Se)=>{Se.storeInt(Oe,Je)},parse:Oe=>Oe.loadInt(Je)}}function Ve(Je){return{serialize:(Oe,Se)=>{Se.storeInt(Oe,Je)},parse:Oe=>Oe.loadIntBig(Je)}}function qe(Je){return{serialize:(Oe,Se)=>{Se.storeVarInt(Oe,Je)},parse:Oe=>Oe.loadVarIntBig(Je)}}function Pe(Je){return{serialize:(Oe,Se)=>{Se.storeVarUint(Oe,Je)},parse:Oe=>Oe.loadVarUintBig(Je)}}function Ze(Je){return{serialize:(Oe,Se)=>{Se.storeUint(Oe,Je)},parse:Oe=>Oe.loadUint(Je)}}function et(Je){return{serialize:(Oe,Se)=>{Se.storeUint(Oe,Je)},parse:Oe=>Oe.loadUintBig(Je)}}function xt(){return{serialize:(Je,Oe)=>{Oe.storeBit(Je)},parse:Je=>Je.loadBit()}}function Ue(){return{serialize:(Je,Oe)=>{Oe.storeAddress(Je)},parse:Je=>Je.loadAddress()}}function We(){return{serialize:(Je,Oe)=>{Oe.storeRef(Je)},parse:Je=>Je.loadRef()}}function ht(Je,Oe){return{serialize:(Se,$e)=>{Se.store($e)},parse:Se=>R.load(Je,Oe,Se)}}function gt(Je){return{serialize:(Oe,Se)=>{if(Oe.length!==Je)throw Error("Invalid buffer size");Se.storeBuffer(Oe)},parse:Oe=>Oe.loadBuffer(Je)}}}),Hy=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.writeString=n.stringToCell=n.readString=void 0;var h=qa();function m(R){if(R.remainingBits%8!==0)throw new Error(`Invalid string length: ${R.remainingBits}`);if(R.remainingRefs!==0&&R.remainingRefs!==1)throw new Error(`invalid number of refs: ${R.remainingRefs}`);if(R.remainingRefs===1&&1023-R.remainingBits>7)throw new Error(`invalid string length: ${R.remainingBits/8}`);let B;return R.remainingBits===0?B=yt.alloc(0):B=R.loadBuffer(R.remainingBits/8),R.remainingRefs===1&&(B=yt.concat([B,m(R.loadRef().beginParse())])),B}function S(R){return m(R).toString()}n.readString=S;function f(R,B){if(R.length>0){let M=Math.floor(B.availableBits/8);if(R.length>M){let N=R.subarray(0,M),I=R.subarray(M);B=B.storeBuffer(N);let te=(0,h.beginCell)();f(I,te),B=B.storeRef(te.endCell())}else B=B.storeBuffer(R)}}function g(R){let B=(0,h.beginCell)();return f(yt.from(R),B),B.endCell()}n.stringToCell=g;function w(R,B){f(yt.from(R),B)}n.writeString=w}),Ge=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__importDefault||function(B){return B&&B.__esModule?B:{default:B}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.Slice=void 0;var S=h(ao()),f=Wu(),g=qa(),w=Hy(),R=class{constructor(B,M){this[m]=()=>this.toString(),this._reader=B.clone(),this._refs=[...M]}get remainingBits(){return this._reader.remaining}get remainingRefs(){return this._refs.length}skip(B){return this._reader.skip(B),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(B){return this._reader.loadBits(B)}preloadBits(B){return this._reader.preloadBits(B)}loadUint(B){return this._reader.loadUint(B)}loadUintBig(B){return this._reader.loadUintBig(B)}preloadUint(B){return this._reader.preloadUint(B)}preloadUintBig(B){return this._reader.preloadUintBig(B)}loadMaybeUint(B){return this.loadBit()?this.loadUint(B):null}loadMaybeUintBig(B){return this.loadBit()?this.loadUintBig(B):null}loadInt(B){return this._reader.loadInt(B)}loadIntBig(B){return this._reader.loadIntBig(B)}preloadInt(B){return this._reader.preloadInt(B)}preloadIntBig(B){return this._reader.preloadIntBig(B)}loadMaybeInt(B){return this.loadBit()?this.loadInt(B):null}loadMaybeIntBig(B){return this.loadBit()?this.loadIntBig(B):null}loadVarUint(B){return this._reader.loadVarUint(B)}loadVarUintBig(B){return this._reader.loadVarUintBig(B)}preloadVarUint(B){return this._reader.preloadVarUint(B)}preloadVarUintBig(B){return this._reader.preloadVarUintBig(B)}loadVarInt(B){return this._reader.loadVarInt(B)}loadVarIntBig(B){return this._reader.loadVarIntBig(B)}preloadVarInt(B){return this._reader.preloadVarInt(B)}preloadVarIntBig(B){return this._reader.preloadVarIntBig(B)}loadCoins(){return this._reader.loadCoins()}preloadCoins(){return this._reader.preloadCoins()}loadMaybeCoins(){return this._reader.loadBit()?this._reader.loadCoins():null}loadAddress(){return this._reader.loadAddress()}loadMaybeAddress(){return this._reader.loadMaybeAddress()}loadExternalAddress(){return this._reader.loadExternalAddress()}loadMaybeExternalAddress(){return this._reader.loadMaybeExternalAddress()}loadAddressAny(){return this._reader.loadAddressAny()}loadRef(){if(this._refs.length===0)throw new Error("No more references");return this._refs.shift()}preloadRef(){if(this._refs.length===0)throw new Error("No more references");return this._refs[0]}loadMaybeRef(){return this.loadBit()?this.loadRef():null}preloadMaybeRef(){return this.preloadBit()?this.preloadRef():null}loadBuffer(B){return this._reader.loadBuffer(B)}preloadBuffer(B){return this._reader.preloadBuffer(B)}loadStringTail(){return(0,w.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,w.readString)(this):null}loadStringRefTail(){return(0,w.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){let B=this.loadMaybeRef();return B?(0,w.readString)(B.beginParse()):null}loadDict(B,M){return f.Dictionary.load(B,M,this)}loadDictDirect(B,M){return f.Dictionary.loadDirect(B,M,this)}endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw new Error("Slice is not empty")}asCell(){return(0,g.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,g.beginCell)().storeSlice(this)}clone(){return new R(this._reader,this._refs)}toString(){return this.asCell().toString()}};n.Slice=R,m=S.default}),ke=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.BitReader=void 0;var h=Li(),m=bo(),S=class{constructor(f,g=0){this._checkpoints=[],this._bits=f,this._offset=g}get remaining(){return this._bits.length-this._offset}skip(f){if(f<0||this._offset+f>this._bits.length)throw new Error(`Index ${this._offset+f} is out of bounds`);this._offset+=f}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let f=this._bits.at(this._offset);return this._offset++,f}preloadBit(){return this._bits.at(this._offset)}loadBits(f){let g=this._bits.substring(this._offset,f);return this._offset+=f,g}preloadBits(f){return this._bits.substring(this._offset,f)}loadBuffer(f){let g=this._preloadBuffer(f,this._offset);return this._offset+=f*8,g}preloadBuffer(f){return this._preloadBuffer(f,this._offset)}loadUint(f){return Number(this.loadUintBig(f))}loadUintBig(f){let g=this.preloadUintBig(f);return this._offset+=f,g}preloadUint(f){return Number(this._preloadUint(f,this._offset))}preloadUintBig(f){return this._preloadUint(f,this._offset)}loadInt(f){let g=this._preloadInt(f,this._offset);return this._offset+=f,Number(g)}loadIntBig(f){let g=this._preloadInt(f,this._offset);return this._offset+=f,g}preloadInt(f){return Number(this._preloadInt(f,this._offset))}preloadIntBig(f){return this._preloadInt(f,this._offset)}loadVarUint(f){let g=Number(this.loadUint(f));return Number(this.loadUintBig(g*8))}loadVarUintBig(f){let g=Number(this.loadUint(f));return this.loadUintBig(g*8)}preloadVarUint(f){let g=Number(this._preloadUint(f,this._offset));return Number(this._preloadUint(g*8,this._offset+f))}preloadVarUintBig(f){let g=Number(this._preloadUint(f,this._offset));return this._preloadUint(g*8,this._offset+f)}loadVarInt(f){let g=Number(this.loadUint(f));return Number(this.loadIntBig(g*8))}loadVarIntBig(f){let g=Number(this.loadUint(f));return this.loadIntBig(g*8)}preloadVarInt(f){let g=Number(this._preloadUint(f,this._offset));return Number(this._preloadInt(g*8,this._offset+f))}preloadVarIntBig(f){let g=Number(this._preloadUint(f,this._offset));return this._preloadInt(g*8,this._offset+f)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===2)return this._loadInternalAddress();throw new Error("Invalid address: "+f)}loadMaybeAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===2)return this._loadInternalAddress();throw new Error("Invalid address")}loadExternalAddress(){if(Number(this._preloadUint(2,this._offset))===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadMaybeExternalAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadAddressAny(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===2)return this._loadInternalAddress();if(f===1)return this._loadExternalAddress();throw Error(f===3?"Unsupported":"Unreachable")}loadPaddedBits(f){if(f%8!==0)throw new Error("Invalid number of bits");let g=f;for(;;)if(this._bits.at(this._offset+g-1)){g--;break}else g--;let w=this._bits.substring(this._offset,g);return this._offset+=f,w}clone(){return new S(this._bits,this._offset)}_preloadInt(f,g){if(f==0)return 0n;let w=this._bits.at(g),R=0n;for(let B=0;B{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticLibrary=void 0;var h=ke();function m(S,f){let g=new h.BitReader(S),w=8+256;if(S.length!==w)throw new Error(`Library cell must have exactly (8 + 256) bits, got "${S.length}"`);let R=g.loadUint(8);if(R!==2)throw new Error(`Library cell must have type 2, got "${R}"`);return{}}n.exoticLibrary=m}),Ht=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticMerkleProof=void 0;var h=ke();function m(S,f){let g=new h.BitReader(S),w=8+256+16;if(S.length!==w)throw new Error(`Merkle Proof cell must have exactly (8 + 256 + 16) bits, got "${S.length}"`);if(f.length!==1)throw new Error(`Merkle Proof cell must have exactly 1 ref, got "${f.length}"`);let R=g.loadUint(8);if(R!==3)throw new Error(`Merkle Proof cell must have type 3, got "${R}"`);let B=g.loadBuffer(32),M=g.loadUint(16),N=f[0].hash(0),I=f[0].depth(0);if(M!==I)throw new Error(`Merkle Proof cell ref depth must be exactly "${M}", got "${I}"`);if(!B.equals(N))throw new Error(`Merkle Proof cell ref hash must be exactly "${B.toString("hex")}", got "${N.toString("hex")}"`);return{proofDepth:M,proofHash:B}}n.exoticMerkleProof=m}),or=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticMerkleUpdate=void 0;var h=ke();function m(S,f){let g=new h.BitReader(S),w=8+2*(256+16);if(S.length!==w)throw new Error(`Merkle Update cell must have exactly (8 + (2 * (256 + 16))) bits, got "${S.length}"`);if(f.length!==2)throw new Error(`Merkle Update cell must have exactly 2 refs, got "${f.length}"`);let R=g.loadUint(8);if(R!==4)throw new Error(`Merkle Update cell type must be exactly 4, got "${R}"`);let B=g.loadBuffer(32),M=g.loadBuffer(32),N=g.loadUint(16),I=g.loadUint(16);if(N!==f[0].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${N}", got "${f[0].depth(0)}"`);if(!B.equals(f[0].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${B.toString("hex")}", got "${f[0].hash(0).toString("hex")}"`);if(I!==f[1].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${I}", got "${f[1].depth(0)}"`);if(!M.equals(f[1].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${M.toString("hex")}", got "${f[1].hash(0).toString("hex")}"`);return{proofDepth1:N,proofDepth2:I,proofHash1:B,proofHash2:M}}n.exoticMerkleUpdate=m}),kr=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.LevelMask=void 0;var h=class{constructor(S=0){this._mask=0,this._mask=S,this._hashIndex=m(this._mask),this._hashCount=this._hashIndex+1}get value(){return this._mask}get level(){return 32-Math.clz32(this._mask)}get hashIndex(){return this._hashIndex}get hashCount(){return this._hashCount}apply(S){return new h(this._mask&(1<>S-1)%2!==0}};n.LevelMask=h;function m(S){return S=S-(S>>1&1431655765),S=(S&858993459)+(S>>2&858993459),(S+(S>>4)&252645135)*16843009>>24}}),$r=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticPruned=void 0;var h=ke(),m=kr();function S(f,g){let w=new h.BitReader(f),R=w.loadUint(8);if(R!==1)throw new Error(`Pruned branch cell must have type 1, got "${R}"`);if(g.length!==0)throw new Error(`Pruned Branch cell can't has refs, got "${g.length}"`);let B;if(f.length===280)B=new m.LevelMask(1);else{if(B=new m.LevelMask(w.loadUint(8)),B.level<1||B.level>3)throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${B.level}/${B.value}"`);let te=8+8+B.apply(B.level-1).hashCount*(256+16);if(f.length!==te)throw new Error(`Pruned branch cell must have exactly ${te} bits, got "${f.length}"`)}let M=[],N=[],I=[];for(let te=0;te{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.resolveExotic=void 0;var h=ke(),m=Fo(),S=Qe(),f=Ht(),g=or(),w=$r(),R=kr();function B(_e,Ce){let Ve=(0,w.exoticPruned)(_e,Ce),qe=[],Pe=[],Ze=new R.LevelMask(Ve.mask);for(let et=0;et>1);return{type:m.CellType.MerkleProof,depths:Ve,hashes:qe,mask:Pe}}function I(_e,Ce){(0,g.exoticMerkleUpdate)(_e,Ce);let Ve=[],qe=[],Pe=new R.LevelMask((Ce[0].level()|Ce[1].level())>>1);return{type:m.CellType.MerkleUpdate,depths:Ve,hashes:qe,mask:Pe}}function te(_e,Ce){let Ve=new h.BitReader(_e).preloadUint(8);if(Ve===1)return B(_e,Ce);if(Ve===2)return M(_e,Ce);if(Ve===3)return N(_e,Ce);if(Ve===4)return I(_e,Ce);throw Error("Invalid exotic cell type: "+Ve)}n.resolveExotic=te}),dn=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.getRepr=n.getBitsDescriptor=n.getRefsDescriptor=void 0;var h=Fo(),m=To();function S(w,R,B){return w.length+(B!==h.CellType.Ordinary?1:0)*8+R*32}n.getRefsDescriptor=S;function f(w){let R=w.length;return Math.ceil(R/8)+Math.floor(R/8)}n.getBitsDescriptor=f;function g(w,R,B,M){let N=Math.ceil(w.length/8),I=yt.alloc(2+N+(2+32)*R.length),te=0;I[te++]=S(R,B,M),I[te++]=f(w),(0,m.bitsToPaddedBuffer)(w).copy(I,te),te+=N;for(let _e of R){let Ce;M==h.CellType.MerkleProof||M==h.CellType.MerkleUpdate?Ce=_e.depth(B+1):Ce=_e.depth(B),I[te++]=Math.floor(Ce/256),I[te++]=Ce%256}for(let _e of R){let Ce;M==h.CellType.MerkleProof||M==h.CellType.MerkleUpdate?Ce=_e.hash(B+1):Ce=_e.hash(B),Ce.copy(I,te),te+=32}return I}n.getRepr=g}),yi=u((n,h)=>{b(),y(),_(),wt(),ce(),function(m,S){typeof n=="object"&&typeof h<"u"?h.exports=S():(m=typeof globalThis<"u"?globalThis:m||self).jsSHA=S()}(n,function(){var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function S(Dt,ze,St,Ot){var Vt,ot,pt,Xe=ze||[0],It=(St=St||0)>>>3,nt=Ot===-1?3:0;for(Vt=0;Vt>>2,Xe.length<=ot&&Xe.push(0),Xe[ot]|=Dt[Vt]<<8*(nt+Ot*(pt%4));return{value:Xe,binLen:8*Dt.length+St}}function f(Dt,ze,St){switch(ze){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(Dt){case"HEX":return function(Ot,Vt,ot){return function(pt,Xe,It,nt){var Qt,lr,wr,zr;if(pt.length%2!=0)throw new Error("String of HEX type must be in byte increments");var bt=Xe||[0],Ft=(It=It||0)>>>3,Er=nt===-1?3:0;for(Qt=0;Qt>>1)+Ft)>>>2;bt.length<=wr;)bt.push(0);bt[wr]|=lr<<8*(Er+nt*(zr%4))}return{value:bt,binLen:4*pt.length+It}}(Ot,Vt,ot,St)};case"TEXT":return function(Ot,Vt,ot){return function(pt,Xe,It,nt,Qt){var lr,wr,zr,bt,Ft,Er,an,Bn,Fi=0,ai=It||[0],ui=(nt=nt||0)>>>3;if(Xe==="UTF8")for(an=Qt===-1?3:0,zr=0;zr(lr=pt.charCodeAt(zr))?wr.push(lr):2048>lr?(wr.push(192|lr>>>6),wr.push(128|63&lr)):55296>lr||57344<=lr?wr.push(224|lr>>>12,128|lr>>>6&63,128|63&lr):(zr+=1,lr=65536+((1023&lr)<<10|1023&pt.charCodeAt(zr)),wr.push(240|lr>>>18,128|lr>>>12&63,128|lr>>>6&63,128|63&lr)),bt=0;bt>>2;ai.length<=Ft;)ai.push(0);ai[Ft]|=wr[bt]<<8*(an+Qt*(Er%4)),Fi+=1}else for(an=Qt===-1?2:0,Bn=Xe==="UTF16LE"&&Qt!==1||Xe!=="UTF16LE"&&Qt===1,zr=0;zr>>8),Ft=(Er=Fi+ui)>>>2;ai.length<=Ft;)ai.push(0);ai[Ft]|=lr<<8*(an+Qt*(Er%4)),Fi+=2}return{value:ai,binLen:8*Fi+nt}}(Ot,ze,Vt,ot,St)};case"B64":return function(Ot,Vt,ot){return function(pt,Xe,It,nt){var Qt,lr,wr,zr,bt,Ft,Er=0,an=Xe||[0],Bn=(It=It||0)>>>3,Fi=nt===-1?3:0,ai=pt.indexOf("=");if(pt.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(pt=pt.replace(/=/g,""),ai!==-1&&ai0;){var I=M[N],te=R[I];if(te){var _e=w[I],Ce=_e===void 0||te(_e,I,w);if(Ce!==!0)throw new TypeError("option "+I+" must be "+Ce);continue}if(B!==!0)throw Error("Unknown option "+I)}}h.exports={assertOptions:g,validators:S}}),HF=u((n,h)=>{b(),y(),_(),wt(),ce();var m=ys(),S=w8(),f=PF(),g=FF(),w=k8(),R=zF(),B=R.validators;function M(N){this.defaults=N,this.interceptors={request:new f,response:new f}}M.prototype.request=function(N,I){if(typeof N=="string"?(I=I||{},I.url=N):I=N||{},!I.url)throw new Error("Provided config url is not valid");I=w(this.defaults,I),I.method?I.method=I.method.toLowerCase():this.defaults.method?I.method=this.defaults.method.toLowerCase():I.method="get";var te=I.transitional;te!==void 0&&R.assertOptions(te,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1);var _e=[],Ce=!0;this.interceptors.request.forEach(function(Ue){typeof Ue.runWhen=="function"&&Ue.runWhen(I)===!1||(Ce=Ce&&Ue.synchronous,_e.unshift(Ue.fulfilled,Ue.rejected))});var Ve=[];this.interceptors.response.forEach(function(Ue){Ve.push(Ue.fulfilled,Ue.rejected)});var qe;if(!Ce){var Pe=[g,void 0];for(Array.prototype.unshift.apply(Pe,_e),Pe=Pe.concat(Ve),qe=Promise.resolve(I);Pe.length;)qe=qe.then(Pe.shift(),Pe.shift());return qe}for(var Ze=I;_e.length;){var et=_e.shift(),xt=_e.shift();try{Ze=et(Ze)}catch(Ue){xt(Ue);break}}try{qe=g(Ze)}catch(Ue){return Promise.reject(Ue)}for(;Ve.length;)qe=qe.then(Ve.shift(),Ve.shift());return qe},M.prototype.getUri=function(N){if(!N.url)throw new Error("Provided config url is not valid");return N=w(this.defaults,N),S(N.url,N.params,N.paramsSerializer).replace(/^\?/,"")},m.forEach(["delete","get","head","options"],function(N){M.prototype[N]=function(I,te){return this.request(w(te||{},{method:N,url:I,data:(te||{}).data}))}}),m.forEach(["post","put","patch"],function(N){M.prototype[N]=function(I,te,_e){return this.request(w(_e||{},{method:N,url:I,data:te}))}}),h.exports=M}),WF=u((n,h)=>{b(),y(),_(),wt(),ce();var m=Zy();function S(f){if(typeof f!="function")throw new TypeError("executor must be a function.");var g;this.promise=new Promise(function(R){g=R});var w=this;this.promise.then(function(R){if(w._listeners){var B,M=w._listeners.length;for(B=0;B{b(),y(),_(),wt(),ce(),h.exports=function(m){return function(S){return m.apply(null,S)}}}),qF=u((n,h)=>{b(),y(),_(),wt(),ce();var m=ys();h.exports=function(S){return m.isObject(S)&&S.isAxiosError===!0}}),KF=u((n,h)=>{b(),y(),_(),wt(),ce();var m=ys(),S=b8(),f=HF(),g=k8(),w=Qy();function R(M){var N=new f(M),I=S(f.prototype.request,N);return m.extend(I,f.prototype,N),m.extend(I,N),I.create=function(te){return R(g(M,te))},I}var B=R(w);B.Axios=f,B.Cancel=Zy(),B.CancelToken=WF(),B.isCancel=C8(),B.VERSION=E8().version,B.all=function(M){return Promise.all(M)},B.spread=VF(),B.isAxiosError=qF(),h.exports=B,h.exports.default=B}),A8=u((n,h)=>{b(),y(),_(),wt(),ce(),h.exports=KF()}),GF=u((n,h)=>{h.exports={name:"ton",version:"13.4.1",repository:"https://github.com/ton-core/ton.git",author:"Whales Corp. ",license:"MIT",main:"dist/index.js",files:["dist"],scripts:{docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},devDependencies:{"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},dependencies:{axios:"^0.25.0",dataloader:"^2.0.0","fp-ts":"^2.11.1","io-ts":"^2.2.16","io-ts-reporters":"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0"},peerDependencies:{"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:"yarn@3.4.1"}}),T8=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__createBinding||(Object.create?function($e,mt,$t,pr){pr===void 0&&(pr=$t),Object.defineProperty($e,pr,{enumerable:!0,get:function(){return mt[$t]}})}:function($e,mt,$t,pr){pr===void 0&&(pr=$t),$e[pr]=mt[$t]}),m=n&&n.__setModuleDefault||(Object.create?function($e,mt){Object.defineProperty($e,"default",{enumerable:!0,value:mt})}:function($e,mt){$e.default=mt}),S=n&&n.__importStar||function($e){if($e&&$e.__esModule)return $e;var mt={};if($e!=null)for(var $t in $e)$t!=="default"&&Object.prototype.hasOwnProperty.call($e,$t)&&h(mt,$e,$t);return m(mt,$e),mt},f=n&&n.__importDefault||function($e){return $e&&$e.__esModule?$e:{default:$e}};Object.defineProperty(n,"__esModule",{value:!0}),n.HttpApi=void 0;var g=S(r_()),w=t_(),R=f(TF()),B=IF(),M=f(RF()),N=f(A8()),I=GF().version,te=g.type({"@type":g.literal("ton.blockIdExt"),workchain:g.number,shard:g.string,seqno:g.number,root_hash:g.string,file_hash:g.string}),_e=g.type({balance:g.union([g.number,g.string]),state:g.union([g.literal("active"),g.literal("uninitialized"),g.literal("frozen")]),data:g.string,code:g.string,last_transaction_id:g.type({"@type":g.literal("internal.transactionId"),lt:g.string,hash:g.string}),block_id:te,sync_utime:g.number}),Ce=g.type({"@type":g.literal("ok")}),Ve=g.type({"@type":g.literal("query.fees"),source_fees:g.type({"@type":g.literal("fees"),in_fwd_fee:g.number,storage_fee:g.number,gas_fee:g.number,fwd_fee:g.number})}),qe=g.type({gas_used:g.number,exit_code:g.number,stack:g.array(g.unknown)}),Pe=g.union([g.type({"@type":g.literal("msg.dataRaw"),body:g.string}),g.type({"@type":g.literal("msg.dataText"),text:g.string}),g.type({"@type":g.literal("msg.dataDecryptedText"),text:g.string}),g.type({"@type":g.literal("msg.dataEncryptedText"),text:g.string})]),Ze=g.type({source:g.string,destination:g.string,value:g.string,fwd_fee:g.string,ihr_fee:g.string,created_lt:g.string,body_hash:g.string,msg_data:Pe}),et=g.type({data:g.string,utime:g.number,transaction_id:g.type({lt:g.string,hash:g.string}),fee:g.string,storage_fee:g.string,other_fee:g.string,in_msg:g.union([g.undefined,Ze]),out_msgs:g.array(Ze)}),xt=g.array(et),Ue=g.type({state_root_hash:g.string,last:te,init:te}),We=g.type({shards:g.array(te)}),ht=g.type({"@type":g.literal("blocks.shortTxId"),mode:g.number,account:g.string,lt:g.string,hash:g.string}),gt=g.type({id:te,req_count:g.number,incomplete:g.boolean,transactions:g.array(ht)}),Je=class{constructor($e,mt,$t,pr){this.namespace=$e,this.cache=mt,this.codec=$t,this.keyEncoder=pr}async get($e){let mt=await this.cache.get(this.namespace,this.keyEncoder($e));if(mt){let $t=this.codec.decode(JSON.parse(mt));if((0,w.isRight)($t))return $t.right}return null}async set($e,mt){mt!==null?await this.cache.set(this.namespace,this.keyEncoder($e),JSON.stringify(mt)):await this.cache.set(this.namespace,this.keyEncoder($e),null)}},Oe=class{constructor($e,mt){this.endpoint=$e,this.cache=new B.InMemoryCache,this.parameters={timeout:mt?.timeout||3e4,apiKey:mt?.apiKey},this.shardCache=new Je("ton-shard",this.cache,g.array(te),$t=>$t+""),this.shardLoader=new M.default(async $t=>await Promise.all($t.map(async pr=>{let Cr=await this.shardCache.get(pr);if(Cr)return Cr;let qr=(await this.doCall("shards",{seqno:pr},We)).shards;return await this.shardCache.set(pr,qr),qr}))),this.shardTransactionsCache=new Je("ton-shard-tx",this.cache,gt,$t=>$t.workchain+":"+$t.shard+":"+$t.seqno),this.shardTransactionsLoader=new M.default(async $t=>await Promise.all($t.map(async pr=>{let Cr=await this.shardTransactionsCache.get(pr);if(Cr)return Cr;let qr=await this.doCall("getBlockTransactions",{workchain:pr.workchain,seqno:pr.seqno,shard:pr.shard},gt);return await this.shardTransactionsCache.set(pr,qr),qr})),{cacheKeyFn:$t=>$t.workchain+":"+$t.shard+":"+$t.seqno})}getAddressInformation($e){return this.doCall("getAddressInformation",{address:$e.toString()},_e)}async getTransactions($e,mt){let $t=mt.inclusive;delete mt.inclusive;let pr;mt.hash&&(pr=yt.from(mt.hash,"base64").toString("hex"));let Cr=mt.limit;mt.hash&&mt.lt&&$t!==!0&&Cr++;let qr=await this.doCall("getTransactions",{address:$e.toString(),...mt,limit:Cr,hash:pr},xt);return qr.length>Cr&&(qr=qr.slice(0,Cr)),mt.hash&&mt.lt&&$t!==!0&&qr.shift(),qr}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},Ue)}async getShards($e){return await this.shardLoader.load($e)}async getBlockTransactions($e,mt,$t){return await this.shardTransactionsLoader.load({workchain:$e,seqno:mt,shard:$t})}async getTransaction($e,mt,$t){let pr=yt.from($t,"base64").toString("hex");return(await this.doCall("getTransactions",{address:$e.toString(),lt:mt,hash:pr,limit:1},xt)).find(qr=>qr.transaction_id.lt===mt&&qr.transaction_id.hash===$t)||null}async callGetMethod($e,mt,$t){return await this.doCall("runGetMethod",{address:$e.toString(),method:mt,stack:Se($t)},qe)}async sendBoc($e){await this.doCall("sendBoc",{boc:$e.toString("base64")},Ce)}async estimateFee($e,mt){return await this.doCall("estimateFee",{address:$e.toString(),body:mt.body.toBoc().toString("base64"),init_data:mt.initData?mt.initData.toBoc().toString("base64"):"",init_code:mt.initCode?mt.initCode.toBoc().toString("base64"):"",ignore_chksig:mt.ignoreSignature},Ve)}async doCall($e,mt,$t){let pr={"Content-Type":"application/json","X-Ton-Client-Version":I};this.parameters.apiKey&&(pr["X-API-Key"]=this.parameters.apiKey);let Cr=await N.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:$e,params:mt}),{headers:pr,timeout:this.parameters.timeout});if(Cr.status!==200||!Cr.data.ok)throw Error("Received error: "+JSON.stringify(Cr.data));let qr=$t.decode(Cr.data.result);if((0,w.isRight)(qr))return qr.right;throw Error("Malformed response: "+R.default.report(qr).join(", "))}};n.HttpApi=Oe;function Se($e){let mt=[];for(let $t of $e)if($t.type==="int")mt.push(["num",$t.value.toString()]);else if($t.type==="cell")mt.push(["tvm.Cell",$t.cell.toBoc().toString("base64")]);else if($t.type==="slice")mt.push(["tvm.Slice",$t.cell.toBoc().toString("base64")]);else if($t.type==="builder")mt.push(["tvm.Builder",$t.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+$t.type);return mt}}),YF=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__classPrivateFieldSet||function(M,N,I,te,_e){if(te==="m")throw new TypeError("Private method is not writable");if(te==="a"&&!_e)throw new TypeError("Private accessor was defined without a setter");if(typeof N=="function"?M!==N||!_e:!N.has(M))throw new TypeError("Cannot write private member to an object whose class did not declare it");return te==="a"?_e.call(M,I):_e?_e.value=I:N.set(M,I),I},m=n&&n.__classPrivateFieldGet||function(M,N,I,te){if(I==="a"&&!te)throw new TypeError("Private accessor was defined without a getter");if(typeof N=="function"?M!==N||!te:!N.has(M))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?te:I==="a"?te.call(M):te?te.value:N.get(M)},S;Object.defineProperty(n,"__esModule",{value:!0}),n.TonClient=void 0;var f=T8(),g=Ka(),w=class{constructor(M){S.set(this,void 0),this.parameters={endpoint:M.endpoint},h(this,S,new f.HttpApi(this.parameters.endpoint,{timeout:M.timeout,apiKey:M.apiKey,adapter:M.httpAdapter}),"f")}async getBalance(M){return(await this.getContractState(M)).balance}async runMethod(M,N,I=[]){let te=await m(this,S,"f").callGetMethod(M,N,I);if(te.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+te.exit_code);return{gas_used:te.gas_used,stack:R(te.stack)}}async callGetMethod(M,N,I=[]){return this.runMethod(M,N,I)}async runMethodWithError(M,N,I=[]){let te=await m(this,S,"f").callGetMethod(M,N,I);return{gas_used:te.gas_used,stack:R(te.stack),exit_code:te.exit_code}}async callGetMethodWithError(M,N,I=[]){return this.runMethodWithError(M,N,I)}async getTransactions(M,N){let I=await m(this,S,"f").getTransactions(M,N),te=[];for(let _e of I)te.push((0,g.loadTransaction)(g.Cell.fromBoc(yt.from(_e.data,"base64"))[0].beginParse()));return te}async getTransaction(M,N,I){let te=await m(this,S,"f").getTransaction(M,N,I);return te?(0,g.loadTransaction)(g.Cell.fromBoc(yt.from(te.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let M=await m(this,S,"f").getMasterchainInfo();return{workchain:M.init.workchain,shard:M.last.shard,initSeqno:M.init.seqno,latestSeqno:M.last.seqno}}async getWorkchainShards(M){return(await m(this,S,"f").getShards(M)).map(N=>({workchain:N.workchain,shard:N.shard,seqno:N.seqno}))}async getShardTransactions(M,N,I){let te=await m(this,S,"f").getBlockTransactions(M,N,I);if(te.incomplete)throw Error("Unsupported");return te.transactions.map(_e=>({account:g.Address.parseRaw(_e.account),lt:_e.lt,hash:_e.hash}))}async sendMessage(M){let N=(0,g.beginCell)().store((0,g.storeMessage)(M)).endCell().toBoc();await m(this,S,"f").sendBoc(N)}async sendFile(M){await m(this,S,"f").sendBoc(M)}async estimateExternalMessageFee(M,N){return await m(this,S,"f").estimateFee(M,{body:N.body,initCode:N.initCode,initData:N.initData,ignoreSignature:N.ignoreSignature})}async sendExternalMessage(M,N){if(await this.isContractDeployed(M.address)||!M.init){let I=(0,g.external)({to:M.address,body:N});await this.sendMessage(I)}else{let I=(0,g.external)({to:M.address,init:{code:M.init.code,data:M.init.data},body:N});await this.sendMessage(I)}}async isContractDeployed(M){return(await this.getContractState(M)).state==="active"}async getContractState(M){let N=await m(this,S,"f").getAddressInformation(M),I=BigInt(N.balance),te=N.state;return{balance:I,state:te,code:N.code!==""?yt.from(N.code,"base64"):null,data:N.data!==""?yt.from(N.data,"base64"):null,lastTransaction:N.last_transaction_id.lt!=="0"?{lt:N.last_transaction_id.lt,hash:N.last_transaction_id.hash}:null,blockId:{workchain:N.block_id.workchain,shard:N.block_id.shard,seqno:N.block_id.seqno},timestampt:N.sync_utime}}open(M){return(0,g.openContract)(M,N=>B(this,N.address,N.init))}provider(M,N){return B(this,M,N)}};n.TonClient=w,S=new WeakMap;function R(M){let N=[];for(let I of M)if(I[0]==="num"){let te=I[1];te.startsWith("-")?N.push({type:"int",value:-BigInt(te.slice(1))}):N.push({type:"int",value:BigInt(te)})}else if(I[0]==="null")N.push({type:"null"});else if(I[0]==="cell")N.push({type:"cell",cell:g.Cell.fromBoc(yt.from(I[1].bytes,"base64"))[0]});else if(I[0]==="slice")N.push({type:"slice",cell:g.Cell.fromBoc(yt.from(I[1].bytes,"base64"))[0]});else if(I[0]==="builder")N.push({type:"builder",cell:g.Cell.fromBoc(yt.from(I[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+I[0]);return new g.TupleReader(N)}function B(M,N,I){return{async getState(){let te=await M.getContractState(N),_e=te.balance,Ce=te.lastTransaction?{lt:BigInt(te.lastTransaction.lt),hash:yt.from(te.lastTransaction.hash,"base64")}:null,Ve;if(te.state==="active")Ve={type:"active",code:te.code?te.code:null,data:te.data?te.data:null};else if(te.state==="uninitialized")Ve={type:"uninit"};else if(te.state==="frozen")Ve={type:"frozen",stateHash:yt.alloc(0)};else throw Error("Unsupported state");return{balance:_e,last:Ce,state:Ve}},async get(te,_e){return{stack:(await M.callGetMethod(N,te,_e)).stack}},async external(te){let _e=null;I&&!await M.isContractDeployed(N)&&(_e=I);let Ce=(0,g.external)({to:N,init:_e?{code:_e.code,data:_e.data}:null,body:te}),Ve=(0,g.beginCell)().store((0,g.storeMessage)(Ce)).endCell().toBoc();await M.sendFile(Ve)},async internal(te,_e){let Ce=null;I&&!await M.isContractDeployed(N)&&(Ce=I);let Ve=!0;_e.bounce!==null&&_e.bounce!==void 0&&(Ve=_e.bounce);let qe;typeof _e.value=="string"?qe=(0,g.toNano)(_e.value):qe=_e.value;let Pe=null;typeof _e.body=="string"?Pe=(0,g.comment)(_e.body):_e.body&&(Pe=_e.body),await te.send({to:N,value:qe,bounce:Ve,sendMode:_e.sendMode,init:Ce,body:Pe})}}}}),ZF=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUrlSafe=void 0;function h(m){for(;m.indexOf("/")>=0;)m=m.replace("/","_");for(;m.indexOf("+")>=0;)m=m.replace("+","-");for(;m.indexOf("=")>=0;)m=m.replace("=","");return m}n.toUrlSafe=h}),QF=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__createBinding||(Object.create?function(Se,$e,mt,$t){$t===void 0&&($t=mt),Object.defineProperty(Se,$t,{enumerable:!0,get:function(){return $e[mt]}})}:function(Se,$e,mt,$t){$t===void 0&&($t=mt),Se[$t]=$e[mt]}),m=n&&n.__setModuleDefault||(Object.create?function(Se,$e){Object.defineProperty(Se,"default",{enumerable:!0,value:$e})}:function(Se,$e){Se.default=$e}),S=n&&n.__importStar||function(Se){if(Se&&Se.__esModule)return Se;var $e={};if(Se!=null)for(var mt in Se)mt!=="default"&&Object.prototype.hasOwnProperty.call(Se,mt)&&h($e,Se,mt);return m($e,Se),$e},f=n&&n.__classPrivateFieldSet||function(Se,$e,mt,$t,pr){if($t==="m")throw new TypeError("Private method is not writable");if($t==="a"&&!pr)throw new TypeError("Private accessor was defined without a setter");if(typeof $e=="function"?Se!==$e||!pr:!$e.has(Se))throw new TypeError("Cannot write private member to an object whose class did not declare it");return $t==="a"?pr.call(Se,mt):pr?pr.value=mt:$e.set(Se,mt),mt},g=n&&n.__classPrivateFieldGet||function(Se,$e,mt,$t){if(mt==="a"&&!$t)throw new TypeError("Private accessor was defined without a getter");if(typeof $e=="function"?Se!==$e||!$t:!$e.has(Se))throw new TypeError("Cannot read private member from an object whose class did not declare it");return mt==="m"?$t:mt==="a"?$t.call(Se):$t?$t.value:$e.get(Se)},w=n&&n.__importDefault||function(Se){return Se&&Se.__esModule?Se:{default:Se}},R,B,M;Object.defineProperty(n,"__esModule",{value:!0}),n.TonClient4=void 0;var N=w(A8()),I=S(r_()),te=Ka(),_e=ZF(),Ce=class{constructor(Se){R.set(this,void 0),B.set(this,void 0),M.set(this,void 0),f(this,R,Se.endpoint,"f"),f(this,B,Se.timeout||5e3,"f"),f(this,M,Se.httpAdapter,"f")}async getLastBlock(){let Se=await N.default.get(g(this,R,"f")+"/block/latest",{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!qe.is(Se.data))throw Error("Mailformed response");return Se.data}async getBlock(Se){let $e=await N.default.get(g(this,R,"f")+"/block/"+Se,{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!Pe.is($e.data))throw Error("Mailformed response");if(!$e.data.exist)throw Error("Block is out of scope");return $e.data.block}async getBlockByUtime(Se){let $e=await N.default.get(g(this,R,"f")+"/block/utime/"+Se,{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!Pe.is($e.data))throw Error("Mailformed response");if(!$e.data.exist)throw Error("Block is out of scope");return $e.data.block}async getAccount(Se,$e){let mt=await N.default.get(g(this,R,"f")+"/block/"+Se+"/"+$e.toString({urlSafe:!0}),{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!et.is(mt.data))throw Error("Mailformed response");return mt.data}async getAccountLite(Se,$e){let mt=await N.default.get(g(this,R,"f")+"/block/"+Se+"/"+$e.toString({urlSafe:!0})+"/lite",{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!xt.is(mt.data))throw Error("Mailformed response");return mt.data}async isContractDeployed(Se,$e){return(await this.getAccountLite(Se,$e)).account.state.type==="active"}async isAccountChanged(Se,$e,mt){let $t=await N.default.get(g(this,R,"f")+"/block/"+Se+"/"+$e.toString({urlSafe:!0})+"/changed/"+mt.toString(10),{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!Ue.is($t.data))throw Error("Mailformed response");return $t.data}async getTransaction(Se,$e,mt){let $t=$e.toString({urlSafe:!0}),pr=`/block/${Se}/${$t}/tx/${mt.toString(10)}`,Cr=await N.default.get(new URL(pr,g(this,R,"f")).href,{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!Oe.is(Cr.data))throw Error("Mailformed response");let qr=te.Cell.fromBoc(yt.from(Cr.data.boc,"base64"))[0];return{tx:(0,te.loadTransaction)(qr.beginParse()),...Cr.data}}async getAccountTransactions(Se,$e,mt){let $t=await N.default.get(g(this,R,"f")+"/account/"+Se.toString({urlSafe:!0})+"/tx/"+$e.toString(10)+"/"+(0,_e.toUrlSafe)(mt.toString("base64")),{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!Je.is($t.data))throw Error("Mailformed response");let pr=$t.data,Cr=[],qr=te.Cell.fromBoc(yt.from(pr.boc,"base64"));for(let jn=0;jn0&&(mt="/"+[...$e].sort().join(","));let $t=await N.default.get(g(this,R,"f")+"/block/"+Se+"/config"+mt,{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!ht.is($t.data))throw Error("Mailformed response");return $t.data}async runMethod(Se,$e,mt,$t){let pr=$t&&$t.length>0?"/"+(0,_e.toUrlSafe)((0,te.serializeTuple)($t).toBoc({idx:!1,crc32:!1}).toString("base64")):"",Cr=g(this,R,"f")+"/block/"+Se+"/"+$e.toString({urlSafe:!0})+"/run/"+mt+pr,qr=await N.default.get(Cr,{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!We.is(qr.data))throw Error("Mailformed response");let jn=qr.data.resultRaw?(0,te.parseTuple)(te.Cell.fromBoc(yt.from(qr.data.resultRaw,"base64"))[0]):[];return{exitCode:qr.data.exitCode,result:jn,resultRaw:qr.data.resultRaw,block:qr.data.block,shardBlock:qr.data.shardBlock,reader:new te.TupleReader(jn)}}async sendMessage(Se){let $e=await N.default.post(g(this,R,"f")+"/send",{boc:Se.toString("base64")},{adapter:g(this,M,"f"),timeout:g(this,B,"f")});if(!gt.is($e.data))throw Error("Mailformed response");return{status:$e.data.status}}open(Se){return(0,te.openContract)(Se,$e=>Ve(this,null,$e.address,$e.init))}openAt(Se,$e){return(0,te.openContract)($e,mt=>Ve(this,Se,mt.address,mt.init))}provider(Se,$e){return Ve(this,null,Se,$e||null)}providerAt(Se,$e,mt){return Ve(this,Se,$e,mt||null)}};n.TonClient4=Ce,R=new WeakMap,B=new WeakMap,M=new WeakMap;function Ve(Se,$e,mt,$t){return{async getState(){let pr=$e;pr===null&&(pr=(await Se.getLastBlock()).last.seqno);let Cr=await Se.getAccount(pr,mt),qr=Cr.account.last?{lt:BigInt(Cr.account.last.lt),hash:yt.from(Cr.account.last.hash,"base64")}:null,jn;if(Cr.account.state.type==="active")jn={type:"active",code:Cr.account.state.code?yt.from(Cr.account.state.code,"base64"):null,data:Cr.account.state.data?yt.from(Cr.account.state.data,"base64"):null};else if(Cr.account.state.type==="uninit")jn={type:"uninit"};else if(Cr.account.state.type==="frozen")jn={type:"frozen",stateHash:yt.from(Cr.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(Cr.account.balance.coins),last:qr,state:jn}},async get(pr,Cr){let qr=$e;qr===null&&(qr=(await Se.getLastBlock()).last.seqno);let jn=await Se.runMethod(qr,mt,pr,Cr);if(jn.exitCode!==0&&jn.exitCode!==1)throw Error("Exit code: "+jn.exitCode);return{stack:new te.TupleReader(jn.result)}},async external(pr){let Cr=await Se.getLastBlock(),qr=null;$t&&(await Se.getAccountLite(Cr.last.seqno,mt)).account.state.type!=="active"&&(qr=$t);let jn=(0,te.external)({to:mt,init:qr?{code:qr.code,data:qr.data}:null,body:pr}),Yt=(0,te.beginCell)().store((0,te.storeMessage)(jn)).endCell().toBoc();await Se.sendMessage(Yt)},async internal(pr,Cr){let qr=await Se.getLastBlock(),jn=null;$t&&(await Se.getAccountLite(qr.last.seqno,mt)).account.state.type!=="active"&&(jn=$t);let Yt=!0;Cr.bounce!==null&&Cr.bounce!==void 0&&(Yt=Cr.bounce);let ei;typeof Cr.value=="string"?ei=(0,te.toNano)(Cr.value):ei=Cr.value;let ni=null;typeof Cr.body=="string"?ni=(0,te.comment)(Cr.body):Cr.body&&(ni=Cr.body),await pr.send({to:mt,value:ei,bounce:Yt,sendMode:Cr.sendMode,init:jn,body:ni})}}}var qe=I.type({last:I.type({seqno:I.number,shard:I.string,workchain:I.number,fileHash:I.string,rootHash:I.string}),init:I.type({fileHash:I.string,rootHash:I.string}),stateRootHash:I.string,now:I.number}),Pe=I.union([I.type({exist:I.literal(!1)}),I.type({exist:I.literal(!0),block:I.type({shards:I.array(I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string,transactions:I.array(I.type({account:I.string,hash:I.string,lt:I.string}))}))})})]),Ze=I.type({lastPaid:I.number,duePayment:I.union([I.null,I.string]),used:I.type({bits:I.number,cells:I.number,publicCells:I.number})}),et=I.type({account:I.type({state:I.union([I.type({type:I.literal("uninit")}),I.type({type:I.literal("active"),code:I.union([I.string,I.null]),data:I.union([I.string,I.null])}),I.type({type:I.literal("frozen"),stateHash:I.string})]),balance:I.type({coins:I.string}),last:I.union([I.null,I.type({lt:I.string,hash:I.string})]),storageStat:I.union([I.null,Ze])}),block:I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string})}),xt=I.type({account:I.type({state:I.union([I.type({type:I.literal("uninit")}),I.type({type:I.literal("active"),codeHash:I.string,dataHash:I.string}),I.type({type:I.literal("frozen"),stateHash:I.string})]),balance:I.type({coins:I.string}),last:I.union([I.null,I.type({lt:I.string,hash:I.string})]),storageStat:I.union([I.null,Ze])})}),Ue=I.type({changed:I.boolean,block:I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string})}),We=I.type({exitCode:I.number,resultRaw:I.union([I.string,I.null]),block:I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string}),shardBlock:I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string})}),ht=I.type({config:I.type({cell:I.string,address:I.string,globalBalance:I.type({coins:I.string})})}),gt=I.type({status:I.number}),Je=I.type({blocks:I.array(I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string,fileHash:I.string})),boc:I.string}),Oe=I.type({block:I.type({workchain:I.number,seqno:I.number,shard:I.string,rootHash:I.string}),boc:I.string,proof:I.string})}),Dc=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.createWalletTransferV4=n.createWalletTransferV3=n.createWalletTransferV2=n.createWalletTransferV1=void 0;var h=Ka(),m=Sp();function S(R){let B=(0,h.beginCell)().storeUint(R.seqno,32);R.message&&(B.storeUint(R.sendMode,8),B.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(R.message))));let M=(0,m.sign)(B.endCell().hash(),R.secretKey);return(0,h.beginCell)().storeBuffer(M).storeBuilder(B).endCell()}n.createWalletTransferV1=S;function f(R){if(R.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let B=(0,h.beginCell)().storeUint(R.seqno,32);if(R.seqno===0)for(let N=0;N<32;N++)B.storeBit(1);else B.storeUint(R.timeout||Math.floor(Date.now()/1e3)+60,32);for(let N of R.messages)B.storeUint(R.sendMode,8),B.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let M=(0,m.sign)(B.endCell().hash(),R.secretKey);return(0,h.beginCell)().storeBuffer(M).storeBuilder(B).endCell()}n.createWalletTransferV2=f;function g(R){if(R.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let B=(0,h.beginCell)().storeUint(R.walletId,32);if(R.seqno===0)for(let N=0;N<32;N++)B.storeBit(1);else B.storeUint(R.timeout||Math.floor(Date.now()/1e3)+60,32);B.storeUint(R.seqno,32);for(let N of R.messages)B.storeUint(R.sendMode,8),B.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let M=(0,m.sign)(B.endCell().hash(),R.secretKey);return(0,h.beginCell)().storeBuffer(M).storeBuilder(B).endCell()}n.createWalletTransferV3=g;function w(R){if(R.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let B=(0,h.beginCell)().storeUint(R.walletId,32);if(R.seqno===0)for(let N=0;N<32;N++)B.storeBit(1);else B.storeUint(R.timeout||Math.floor(Date.now()/1e3)+60,32);B.storeUint(R.seqno,32),B.storeUint(0,8);for(let N of R.messages)B.storeUint(R.sendMode,8),B.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let M=(0,m.sign)(B.endCell().hash(),R.secretKey);return(0,h.beginCell)().storeBuffer(M).storeBuilder(B).endCell()}n.createWalletTransferV4=w}),XF=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R1=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let w=h.Cell.fromBoc(yt.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],R=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:w,data:R},this.address=(0,h.contractAddress)(f,{code:w,data:R})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){let g=await f.getState();return g.state.type==="active"?h.Cell.fromBoc(g.state.data)[0].beginParse().loadUint(32):0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,message:(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})});await this.send(f,B)}}}};n.WalletContractV1R1=S}),JF=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R2=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let w=h.Cell.fromBoc(yt.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],R=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:w,data:R},this.address=(0,h.contractAddress)(f,{code:w,data:R})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,message:(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})});await this.send(f,B)}}}};n.WalletContractV1R2=S}),ez=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R3=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let w=h.Cell.fromBoc(yt.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],R=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:w,data:R},this.address=(0,h.contractAddress)(f,{code:w,data:R})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,message:(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})});await this.send(f,B)}}}};n.WalletContractV1R3=S}),tz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV2R1=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let w=h.Cell.fromBoc(yt.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],R=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:w,data:R},this.address=(0,h.contractAddress)(f,{code:w,data:R})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV2)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,messages:[(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})]});await this.send(f,B)}}}};n.WalletContractV2R1=S}),rz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV2R2=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let w=h.Cell.fromBoc(yt.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],R=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:w,data:R},this.address=(0,h.contractAddress)(f,{code:w,data:R})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV2)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,messages:[(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})]});await this.send(f,B)}}}};n.WalletContractV2R2=S}),nz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV3R1=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g,w){this.workchain=f,this.publicKey=g,w!=null?this.walletId=w:this.walletId=698983191+f;let R=h.Cell.fromBoc(yt.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],B=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(g).endCell();this.init={code:R,data:B},this.address=(0,h.contractAddress)(f,{code:R,data:B})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV3)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,messages:[(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})]});await this.send(f,B)}}}};n.WalletContractV3R1=S}),iz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV3R2=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g,w){this.workchain=f,this.publicKey=g,w!=null?this.walletId=w:this.walletId=698983191+f;let R=h.Cell.fromBoc(yt.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],B=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(g).endCell();this.init={code:R,data:B},this.address=(0,h.contractAddress)(f,{code:R,data:B})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV3)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,messages:[(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})]});await this.send(f,B)}}}};n.WalletContractV3R2=S}),oz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV4=void 0;var h=Ka(),m=Dc(),S=class{constructor(f,g,w){this.workchain=f,this.publicKey=g,w!=null?this.walletId=w:this.walletId=698983191+f;let R=h.Cell.fromBoc(yt.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],B=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:R,data:B},this.address=(0,h.contractAddress)(f,{code:R,data:B})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let w=this.createTransfer(g);await this.send(f,w)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,m.createWalletTransferV4)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async w=>{let R=await this.getSeqno(f),B=this.createTransfer({seqno:R,secretKey:g,sendMode:w.sendMode,messages:[(0,h.internal)({to:w.to,value:w.value,init:w.init,body:w.body,bounce:w.bounce})]});await this.send(f,B)}}}};n.WalletContractV4=S}),az=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.JettonMaster=void 0;var h=Ka(),m=class{constructor(S){this.address=S}static create(S){return new m(S)}async getWalletAddress(S,f){return(await S.get("get_wallet_address",[{type:"slice",cell:(0,h.beginCell)().storeAddress(f).endCell()}])).stack.readAddress()}async getJettonData(S){let f=await S.get("get_jetton_data",[]),g=f.stack.readBigNumber(),w=f.stack.readBoolean(),R=f.stack.readAddress(),B=f.stack.readCell(),M=f.stack.readCell();return{totalSupply:g,mintable:w,adminAddress:R,content:B,walletCode:M}}};n.JettonMaster=m}),sz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.JettonWallet=void 0;var h=class{constructor(m){this.address=m}static create(m){return new h(m)}async getBalance(m){return(await m.getState()).state.type!=="active"?0n:(await m.get("get_wallet_data",[])).stack.readBigNumber()}};n.JettonWallet=h}),I8=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigOrder=void 0;var h=Sp(),m=Ka(),S=class{constructor(f){this.signatures={},this.payload=f}static fromCell(f){let g=f.beginParse(),w=g.loadMaybeRef()?.beginParse(),R=g.asCell(),B=new S(R);if(w){for(;w.remainingBits>0;){let M=w.loadBuffer(64),N=w.loadUint(8);B.signatures[N]=M,w.remainingRefs>0?w=w.loadRef().asSlice():w.skip(1)}w.endParse()}return B}static fromPayload(f){return new S(f)}addSignature(f,g,w){let R=this.payload.hash();if(!(0,h.signVerify)(R,g,w.owners.get(f).slice(0,-1)))throw Error("invalid signature");this.signatures[f]=g}sign(f,g){let w=this.payload.hash();return this.signatures[f]=(0,h.sign)(w,g),w}unionSignatures(f){this.signatures=Object.assign({},this.signatures,f.signatures)}clearSignatures(){this.signatures={}}toCell(f){let g=(0,m.beginCell)().storeBit(0);for(let w in this.signatures){let R=this.signatures[w];g=(0,m.beginCell)().storeBit(1).storeRef((0,m.beginCell)().storeBuffer(R).storeUint(parseInt(w),8).storeBuilder(g).endCell())}return(0,m.beginCell)().storeUint(f,8).storeBuilder(g).storeBuilder(this.payload.asBuilder()).endCell()}};n.MultisigOrder=S}),lz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigOrderBuilder=void 0;var h=Ka(),m=I8(),S=class{constructor(f,g){this.messages=(0,h.beginCell)(),this.queryId=0n,this.walletId=f,this.queryOffset=g||7200}addMessage(f,g){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(g,8),this.messages.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(f)).endCell())}clearMessages(){this.messages=(0,h.beginCell)()}build(){return m.MultisigOrder.fromPayload((0,h.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){let f=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=f<<32n}};n.MultisigOrderBuilder=S}),uz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigWallet=void 0;var h=Sp(),m=Ka(),S=m.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ=="),f=class{constructor(g,w,R,B,M){this.provider=null,this.owners=m.Dictionary.empty(),this.workchain=w,this.walletId=R,this.k=B;for(let N=0;N{b(),y(),_(),wt(),ce();var h=n&&n.__createBinding||(Object.create?function(et,xt,Ue,We){We===void 0&&(We=Ue),Object.defineProperty(et,We,{enumerable:!0,get:function(){return xt[Ue]}})}:function(et,xt,Ue,We){We===void 0&&(We=Ue),et[We]=xt[Ue]}),m=n&&n.__exportStar||function(et,xt){for(var Ue in et)Ue!=="default"&&!Object.prototype.hasOwnProperty.call(xt,Ue)&&h(xt,et,Ue)};Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigWallet=n.MultisigOrderBuilder=n.MultisigOrder=n.JettonWallet=n.JettonMaster=n.WalletContractV4=n.WalletContractV3R2=n.WalletContractV3R1=n.WalletContractV2R2=n.WalletContractV2R1=n.WalletContractV1R3=n.WalletContractV1R2=n.WalletContractV1R1=n.TonClient4=n.TonClient=n.HttpApi=void 0,m(Ka(),n);var S=T8();Object.defineProperty(n,"HttpApi",{enumerable:!0,get:function(){return S.HttpApi}});var f=YF();Object.defineProperty(n,"TonClient",{enumerable:!0,get:function(){return f.TonClient}});var g=QF();Object.defineProperty(n,"TonClient4",{enumerable:!0,get:function(){return g.TonClient4}});var w=XF();Object.defineProperty(n,"WalletContractV1R1",{enumerable:!0,get:function(){return w.WalletContractV1R1}});var R=JF();Object.defineProperty(n,"WalletContractV1R2",{enumerable:!0,get:function(){return R.WalletContractV1R2}});var B=ez();Object.defineProperty(n,"WalletContractV1R3",{enumerable:!0,get:function(){return B.WalletContractV1R3}});var M=tz();Object.defineProperty(n,"WalletContractV2R1",{enumerable:!0,get:function(){return M.WalletContractV2R1}});var N=rz();Object.defineProperty(n,"WalletContractV2R2",{enumerable:!0,get:function(){return N.WalletContractV2R2}});var I=nz();Object.defineProperty(n,"WalletContractV3R1",{enumerable:!0,get:function(){return I.WalletContractV3R1}});var te=iz();Object.defineProperty(n,"WalletContractV3R2",{enumerable:!0,get:function(){return te.WalletContractV3R2}});var _e=oz();Object.defineProperty(n,"WalletContractV4",{enumerable:!0,get:function(){return _e.WalletContractV4}});var Ce=az();Object.defineProperty(n,"JettonMaster",{enumerable:!0,get:function(){return Ce.JettonMaster}});var Ve=sz();Object.defineProperty(n,"JettonWallet",{enumerable:!0,get:function(){return Ve.JettonWallet}});var qe=I8();Object.defineProperty(n,"MultisigOrder",{enumerable:!0,get:function(){return qe.MultisigOrder}});var Pe=lz();Object.defineProperty(n,"MultisigOrderBuilder",{enumerable:!0,get:function(){return Pe.MultisigOrderBuilder}});var Ze=uz();Object.defineProperty(n,"MultisigWallet",{enumerable:!0,get:function(){return Ze.MultisigWallet}})}),dz=u((n,h)=>{b(),y(),_(),wt(),ce(),function(m,S){S(typeof n=="object"&&typeof h<"u"?n:m.WHATWGFetch={})}(n,function(m){var S=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof S<"u"&&S,f={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function g(Se){return Se&&DataView.prototype.isPrototypeOf(Se)}if(f.arrayBuffer)var w=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],R=ArrayBuffer.isView||function(Se){return Se&&w.indexOf(Object.prototype.toString.call(Se))>-1};function B(Se){if(typeof Se!="string"&&(Se=String(Se)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(Se)||Se==="")throw new TypeError('Invalid character in header field name: "'+Se+'"');return Se.toLowerCase()}function M(Se){return typeof Se!="string"&&(Se=String(Se)),Se}function N(Se){var $e={next:function(){var mt=Se.shift();return{done:mt===void 0,value:mt}}};return f.iterable&&($e[Symbol.iterator]=function(){return $e}),$e}function I(Se){this.map={},Se instanceof I?Se.forEach(function($e,mt){this.append(mt,$e)},this):Array.isArray(Se)?Se.forEach(function($e){this.append($e[0],$e[1])},this):Se&&Object.getOwnPropertyNames(Se).forEach(function($e){this.append($e,Se[$e])},this)}I.prototype.append=function(Se,$e){Se=B(Se),$e=M($e);var mt=this.map[Se];this.map[Se]=mt?mt+", "+$e:$e},I.prototype.delete=function(Se){delete this.map[B(Se)]},I.prototype.get=function(Se){return Se=B(Se),this.has(Se)?this.map[Se]:null},I.prototype.has=function(Se){return this.map.hasOwnProperty(B(Se))},I.prototype.set=function(Se,$e){this.map[B(Se)]=M($e)},I.prototype.forEach=function(Se,$e){for(var mt in this.map)this.map.hasOwnProperty(mt)&&Se.call($e,this.map[mt],mt,this)},I.prototype.keys=function(){var Se=[];return this.forEach(function($e,mt){Se.push(mt)}),N(Se)},I.prototype.values=function(){var Se=[];return this.forEach(function($e){Se.push($e)}),N(Se)},I.prototype.entries=function(){var Se=[];return this.forEach(function($e,mt){Se.push([mt,$e])}),N(Se)},f.iterable&&(I.prototype[Symbol.iterator]=I.prototype.entries);function te(Se){if(Se.bodyUsed)return Promise.reject(new TypeError("Already read"));Se.bodyUsed=!0}function _e(Se){return new Promise(function($e,mt){Se.onload=function(){$e(Se.result)},Se.onerror=function(){mt(Se.error)}})}function Ce(Se){var $e=new FileReader,mt=_e($e);return $e.readAsArrayBuffer(Se),mt}function Ve(Se){var $e=new FileReader,mt=_e($e);return $e.readAsText(Se),mt}function qe(Se){for(var $e=new Uint8Array(Se),mt=new Array($e.length),$t=0;$t<$e.length;$t++)mt[$t]=String.fromCharCode($e[$t]);return mt.join("")}function Pe(Se){if(Se.slice)return Se.slice(0);var $e=new Uint8Array(Se.byteLength);return $e.set(new Uint8Array(Se)),$e.buffer}function Ze(){return this.bodyUsed=!1,this._initBody=function(Se){this.bodyUsed=this.bodyUsed,this._bodyInit=Se,Se?typeof Se=="string"?this._bodyText=Se:f.blob&&Blob.prototype.isPrototypeOf(Se)?this._bodyBlob=Se:f.formData&&FormData.prototype.isPrototypeOf(Se)?this._bodyFormData=Se:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(Se)?this._bodyText=Se.toString():f.arrayBuffer&&f.blob&&g(Se)?(this._bodyArrayBuffer=Pe(Se.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Se)||R(Se))?this._bodyArrayBuffer=Pe(Se):this._bodyText=Se=Object.prototype.toString.call(Se):this._bodyText="",this.headers.get("content-type")||(typeof Se=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(Se)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var Se=te(this);if(Se)return Se;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var Se=te(this);return Se||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(Ce)}),this.text=function(){var Se=te(this);if(Se)return Se;if(this._bodyBlob)return Ve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(qe(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(We)}),this.json=function(){return this.text().then(JSON.parse)},this}var et=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function xt(Se){var $e=Se.toUpperCase();return et.indexOf($e)>-1?$e:Se}function Ue(Se,$e){if(!(this instanceof Ue))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$e=$e||{};var mt=$e.body;if(Se instanceof Ue){if(Se.bodyUsed)throw new TypeError("Already read");this.url=Se.url,this.credentials=Se.credentials,$e.headers||(this.headers=new I(Se.headers)),this.method=Se.method,this.mode=Se.mode,this.signal=Se.signal,!mt&&Se._bodyInit!=null&&(mt=Se._bodyInit,Se.bodyUsed=!0)}else this.url=String(Se);if(this.credentials=$e.credentials||this.credentials||"same-origin",($e.headers||!this.headers)&&(this.headers=new I($e.headers)),this.method=xt($e.method||this.method||"GET"),this.mode=$e.mode||this.mode||null,this.signal=$e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&mt)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(mt),(this.method==="GET"||this.method==="HEAD")&&($e.cache==="no-store"||$e.cache==="no-cache")){var $t=/([?&])_=[^&]*/;if($t.test(this.url))this.url=this.url.replace($t,"$1_="+new Date().getTime());else{var pr=/\?/;this.url+=(pr.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Ue.prototype.clone=function(){return new Ue(this,{body:this._bodyInit})};function We(Se){var $e=new FormData;return Se.trim().split("&").forEach(function(mt){if(mt){var $t=mt.split("="),pr=$t.shift().replace(/\+/g," "),Cr=$t.join("=").replace(/\+/g," ");$e.append(decodeURIComponent(pr),decodeURIComponent(Cr))}}),$e}function ht(Se){var $e=new I,mt=Se.replace(/\r?\n[\t ]+/g," ");return mt.split("\r").map(function($t){return $t.indexOf(` +`)===0?$t.substr(1,$t.length):$t}).forEach(function($t){var pr=$t.split(":"),Cr=pr.shift().trim();if(Cr){var qr=pr.join(":").trim();$e.append(Cr,qr)}}),$e}Ze.call(Ue.prototype);function gt(Se,$e){if(!(this instanceof gt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$e||($e={}),this.type="default",this.status=$e.status===void 0?200:$e.status,this.ok=this.status>=200&&this.status<300,this.statusText=$e.statusText===void 0?"":""+$e.statusText,this.headers=new I($e.headers),this.url=$e.url||"",this._initBody(Se)}Ze.call(gt.prototype),gt.prototype.clone=function(){return new gt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new I(this.headers),url:this.url})},gt.error=function(){var Se=new gt(null,{status:0,statusText:""});return Se.type="error",Se};var Je=[301,302,303,307,308];gt.redirect=function(Se,$e){if(Je.indexOf($e)===-1)throw new RangeError("Invalid status code");return new gt(null,{status:$e,headers:{location:Se}})},m.DOMException=S.DOMException;try{new m.DOMException}catch{m.DOMException=function(Se,$e){this.message=Se,this.name=$e;var mt=Error(Se);this.stack=mt.stack},m.DOMException.prototype=Object.create(Error.prototype),m.DOMException.prototype.constructor=m.DOMException}function Oe(Se,$e){return new Promise(function(mt,$t){var pr=new Ue(Se,$e);if(pr.signal&&pr.signal.aborted)return $t(new m.DOMException("Aborted","AbortError"));var Cr=new XMLHttpRequest;function qr(){Cr.abort()}Cr.onload=function(){var Yt={status:Cr.status,statusText:Cr.statusText,headers:ht(Cr.getAllResponseHeaders()||"")};Yt.url="responseURL"in Cr?Cr.responseURL:Yt.headers.get("X-Request-URL");var ei="response"in Cr?Cr.response:Cr.responseText;setTimeout(function(){mt(new gt(ei,Yt))},0)},Cr.onerror=function(){setTimeout(function(){$t(new TypeError("Network request failed"))},0)},Cr.ontimeout=function(){setTimeout(function(){$t(new TypeError("Network request failed"))},0)},Cr.onabort=function(){setTimeout(function(){$t(new m.DOMException("Aborted","AbortError"))},0)};function jn(Yt){try{return Yt===""&&S.location.href?S.location.href:Yt}catch{return Yt}}Cr.open(pr.method,jn(pr.url),!0),pr.credentials==="include"?Cr.withCredentials=!0:pr.credentials==="omit"&&(Cr.withCredentials=!1),"responseType"in Cr&&(f.blob?Cr.responseType="blob":f.arrayBuffer&&pr.headers.get("Content-Type")&&pr.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Cr.responseType="arraybuffer")),$e&&typeof $e.headers=="object"&&!($e.headers instanceof I)?Object.getOwnPropertyNames($e.headers).forEach(function(Yt){Cr.setRequestHeader(Yt,M($e.headers[Yt]))}):pr.headers.forEach(function(Yt,ei){Cr.setRequestHeader(ei,Yt)}),pr.signal&&(pr.signal.addEventListener("abort",qr),Cr.onreadystatechange=function(){Cr.readyState===4&&pr.signal.removeEventListener("abort",qr)}),Cr.send(typeof pr._bodyInit>"u"?null:pr._bodyInit)})}Oe.polyfill=!0,S.fetch||(S.fetch=Oe,S.Headers=I,S.Request=Ue,S.Response=gt),m.Headers=I,m.Request=Ue,m.Response=gt,m.fetch=Oe,Object.defineProperty(m,"__esModule",{value:!0})})}),fz=u((n,h)=>{b(),y(),_(),wt(),ce(),dz(),h.exports=self.fetch.bind(self)}),pz=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__awaiter||function(f,g,w,R){function B(M){return M instanceof w?M:new w(function(N){N(M)})}return new(w||(w=Promise))(function(M,N){function I(Ce){try{_e(R.next(Ce))}catch(Ve){N(Ve)}}function te(Ce){try{_e(R.throw(Ce))}catch(Ve){N(Ve)}}function _e(Ce){Ce.done?M(Ce.value):B(Ce.value).then(I,te)}_e((R=R.apply(f,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Nodes=void 0,fz();var m=2*60*1e3,S=class{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(f){return h(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let g=[];try{g=yield(yield fetch(f)).json()}catch(w){throw new Error(`exception in fetch(${f}): ${w}`)}for(let w of g)w.Healthy==="1"&&this.topology.push(w);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(f){var g;let w=[];for(let R of this.topology)this.initTime-R.Mngr.successTS0&&!((g=R.Mngr)===null||g===void 0)&&g.health[f]&&w.push(R);return w}};n.Nodes=S}),hz=u((n,h)=>{h.exports={name:"@orbs-network/ton-access",version:"2.3.0",description:"Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",source:"lib/index.js",main:"lib/index.js",types:"lib/index.d.ts",files:["lib/**/*"],scripts:{test:"env mocha -r ts-node/register test/**/*.ts","test:v2":"env mocha -r ts-node/register test/ton-v2.ts","test:v4":"env mocha -r ts-node/register test/ton-v4.ts",cleanup:"rimraf ./lib","build:web:reg":"esbuild ./lib/web.js --bundle --sourcemap --target=es2015 --outfile=./dist/index.js","build:web:min":"esbuild ./lib/web.js --bundle --minify --target=es2015 --outfile=./dist/index.min.js","build:web":"rimraf ./dist && npm run build:web:reg && npm run build:web:min",build:"npm run lint && rimraf ./lib && tsc && npm run build:web",format:'prettier --write "src/**/*.ts"',lint:"tslint -p tsconfig.json",prepare:"npm run build",prepublishOnly:"npm test && npm run lint",preversion:"npm run lint",version:"npm run format && git add -A src",postversion:"git push && git push --tags"},repository:{type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},author:"yuval@orbs.com",license:"MIT",bugs:{url:"https://github.com/orbs-network/ton-access/issues"},homepage:"https://github.com/orbs-network/ton-access#readme",dependencies:{"isomorphic-fetch":"^3.0.0"},devDependencies:{"@types/bn.js":"^5.1.1","@types/chai":"^4.3.4","@types/isomorphic-fetch":"^0.0.36","@types/mocha":"^10.0.0",buffer:"^6.0.3",chai:"^4.3.7",esbuild:"^0.15.14",mocha:"^10.1.0",prettier:"^2.7.1",rimraf:"^3.0.2",ton:"^12.1.3","ton-lite-client":"npm:@truecarry/ton-lite-client@^1.6.1",tonweb:"^0.0.58","ts-node":"^10.9.1",tslib:"^2.4.0",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0"}}}),gz=u(n=>{b(),y(),_(),wt(),ce();var h=n&&n.__awaiter||function(M,N,I,te){function _e(Ce){return Ce instanceof I?Ce:new I(function(Ve){Ve(Ce)})}return new(I||(I=Promise))(function(Ce,Ve){function qe(et){try{Ze(te.next(et))}catch(xt){Ve(xt)}}function Pe(et){try{Ze(te.throw(et))}catch(xt){Ve(xt)}}function Ze(et){et.done?Ce(et.value):_e(et.value).then(qe,Pe)}Ze((te=te.apply(M,N||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.getHttpV4Endpoint=n.getHttpV4Endpoints=n.getHttpEndpoint=n.getHttpEndpoints=n.Access=void 0;var m=pz(),S=class{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new m.Nodes}init(){return h(this,void 0,void 0,function*(){let M=hz();yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${M.version}`)})}makeProtonet(M,N){let I="";switch(M){case"toncenter-api-v2":I+="v2-";break;case"ton-api-v4":I+="v4-";break}return I+=N,I}weightedRandom(M){let N=0;for(let _e of M)N+=_e.Weight;let I=Math.floor(Math.random()*N),te=0;for(let _e of M){if(I>=te&&IJy,__asyncDelegator:()=>Tz,__asyncGenerator:()=>Az,__asyncValues:()=>Iz,__await:()=>Lg,__awaiter:()=>xz,__classPrivateFieldGet:()=>Oz,__classPrivateFieldSet:()=>Bz,__createBinding:()=>Sz,__decorate:()=>vz,__exportStar:()=>Cz,__extends:()=>mz,__generator:()=>_z,__importDefault:()=>Mz,__importStar:()=>Pz,__makeTemplateObject:()=>Rz,__metadata:()=>wz,__param:()=>bz,__read:()=>R8,__rest:()=>yz,__spread:()=>kz,__spreadArrays:()=>Ez,__values:()=>s_});function mz(n,h){Xy(n,h);function m(){this.constructor=n}n.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}function yz(n,h){var m={};for(var S in n)Object.prototype.hasOwnProperty.call(n,S)&&h.indexOf(S)<0&&(m[S]=n[S]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,S=Object.getOwnPropertySymbols(n);f=0;R--)(w=n[R])&&(g=(f<3?w(g):f>3?w(h,m,g):w(h,m))||g);return f>3&&g&&Object.defineProperty(h,m,g),g}function bz(n,h){return function(m,S){h(m,S,n)}}function wz(n,h){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,h)}function xz(n,h,m,S){function f(g){return g instanceof m?g:new m(function(w){w(g)})}return new(m||(m=Promise))(function(g,w){function R(N){try{M(S.next(N))}catch(I){w(I)}}function B(N){try{M(S.throw(N))}catch(I){w(I)}}function M(N){N.done?g(N.value):f(N.value).then(R,B)}M((S=S.apply(n,h||[])).next())})}function _z(n,h){var m={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},S,f,g,w;return w={next:R(0),throw:R(1),return:R(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function R(M){return function(N){return B([M,N])}}function B(M){if(S)throw new TypeError("Generator is already executing.");for(;m;)try{if(S=1,f&&(g=M[0]&2?f.return:M[0]?f.throw||((g=f.return)&&g.call(f),0):f.next)&&!(g=g.call(f,M[1])).done)return g;switch(f=0,g&&(M=[M[0]&2,g.value]),M[0]){case 0:case 1:g=M;break;case 4:return m.label++,{value:M[1],done:!1};case 5:m.label++,f=M[1],M=[0];continue;case 7:M=m.ops.pop(),m.trys.pop();continue;default:if(g=m.trys,!(g=g.length>0&&g[g.length-1])&&(M[0]===6||M[0]===2)){m=0;continue}if(M[0]===3&&(!g||M[1]>g[0]&&M[1]=n.length&&(n=void 0),{value:n&&n[S++],done:!n}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")}function R8(n,h){var m=typeof Symbol=="function"&&n[Symbol.iterator];if(!m)return n;var S=m.call(n),f,g=[],w;try{for(;(h===void 0||h-- >0)&&!(f=S.next()).done;)g.push(f.value)}catch(R){w={error:R}}finally{try{f&&!f.done&&(m=S.return)&&m.call(S)}finally{if(w)throw w.error}}return g}function kz(){for(var n=[],h=0;h1||R(te,_e)})})}function R(te,_e){try{B(S[te](_e))}catch(Ce){I(g[0][3],Ce)}}function B(te){te.value instanceof Lg?Promise.resolve(te.value.v).then(M,N):I(g[0][2],te)}function M(te){R("next",te)}function N(te){R("throw",te)}function I(te,_e){te(_e),g.shift(),g.length&&R(g[0][0],g[0][1])}}function Tz(n){var h,m;return h={},S("next"),S("throw",function(f){throw f}),S("return"),h[Symbol.iterator]=function(){return this},h;function S(f,g){h[f]=n[f]?function(w){return(m=!m)?{value:Lg(n[f](w)),done:f==="return"}:g?g(w):w}:g}}function Iz(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var h=n[Symbol.asyncIterator],m;return h?h.call(n):(n=typeof s_=="function"?s_(n):n[Symbol.iterator](),m={},S("next"),S("throw"),S("return"),m[Symbol.asyncIterator]=function(){return this},m);function S(g){m[g]=n[g]&&function(w){return new Promise(function(R,B){w=n[g](w),f(R,B,w.done,w.value)})}}function f(g,w,R,B){Promise.resolve(B).then(function(M){g({value:M,done:R})},w)}}function Rz(n,h){return Object.defineProperty?Object.defineProperty(n,"raw",{value:h}):n.raw=h,n}function Pz(n){if(n&&n.__esModule)return n;var h={};if(n!=null)for(var m in n)Object.hasOwnProperty.call(n,m)&&(h[m]=n[m]);return h.default=n,h}function Mz(n){return n&&n.__esModule?n:{default:n}}function Oz(n,h){if(!h.has(n))throw new TypeError("attempted to get private field on non-instance");return h.get(n)}function Bz(n,h,m){if(!h.has(n))throw new TypeError("attempted to set private field on non-instance");return h.set(n,m),m}var Xy,Jy,P8=l(()=>{b(),y(),_(),wt(),ce(),Xy=function(n,h){return Xy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,S){m.__proto__=S}||function(m,S){for(var f in S)S.hasOwnProperty(f)&&(m[f]=S[f])},Xy(n,h)},Jy=function(){return Jy=Object.assign||function(n){for(var h,m=1,S=arguments.length;m{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_HASHABLE_LENGTH=n.INIT=n.KEY=n.DIGEST_LENGTH=n.BLOCK_SIZE=void 0,n.BLOCK_SIZE=64,n.DIGEST_LENGTH=32,n.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),n.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],n.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1}),Uz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.RawSha256=void 0;var h=M8(),m=function(){function S(){this.state=Int32Array.from(h.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return S.prototype.update=function(f){if(this.finished)throw new Error("Attempted to update an already finished hash.");var g=0,w=f.byteLength;if(this.bytesHashed+=w,this.bytesHashed*8>h.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;w>0;)this.buffer[this.bufferLength++]=f[g++],w--,this.bufferLength===h.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},S.prototype.digest=function(){if(!this.finished){var f=this.bytesHashed*8,g=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),w=this.bufferLength;if(g.setUint8(this.bufferLength++,128),w%h.BLOCK_SIZE>=h.BLOCK_SIZE-8){for(var R=this.bufferLength;R>>24&255,B[R*4+1]=this.state[R]>>>16&255,B[R*4+2]=this.state[R]>>>8&255,B[R*4+3]=this.state[R]>>>0&255;return B},S.prototype.hashBuffer=function(){for(var f=this,g=f.buffer,w=f.state,R=w[0],B=w[1],M=w[2],N=w[3],I=w[4],te=w[5],_e=w[6],Ce=w[7],Ve=0;Ve>>17|qe<<15)^(qe>>>19|qe<<13)^qe>>>10;qe=this.temp[Ve-15];var Ze=(qe>>>7|qe<<25)^(qe>>>18|qe<<14)^qe>>>3;this.temp[Ve]=(Pe+this.temp[Ve-7]|0)+(Ze+this.temp[Ve-16]|0)}var et=(((I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7))+(I&te^~I&_e)|0)+(Ce+(h.KEY[Ve]+this.temp[Ve]|0)|0)|0,xt=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&B^R&M^B&M)|0;Ce=_e,_e=te,te=I,I=N+et|0,N=M,M=B,B=R,R=et+xt|0}w[0]+=R,w[1]+=B,w[2]+=M,w[3]+=N,w[4]+=I,w[5]+=te,w[6]+=_e,w[7]+=Ce},S}();n.RawSha256=m}),Dz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;var h=S=>{let f=[];for(let g=0,w=S.length;g>6|192,R&63|128);else if(g+1>18|240,B>>12&63|128,B>>6&63|128,B&63|128)}else f.push(R>>12|224,R>>6&63|128,R&63|128)}return Uint8Array.from(f)};n.fromUtf8=h;var m=S=>{let f="";for(let g=0,w=S.length;gM.toString(16)).join("%");f+=decodeURIComponent(B)}else f+=String.fromCharCode((R&15)<<12|(S[++g]&63)<<6|S[++g]&63)}return f};n.toUtf8=m}),Lz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;function h(S){return new TextEncoder().encode(S)}n.fromUtf8=h;function m(S){return new TextDecoder("utf-8").decode(S)}n.toUtf8=m}),Nz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;var h=Dz(),m=Lz(),S=g=>typeof TextEncoder=="function"?(0,m.fromUtf8)(g):(0,h.fromUtf8)(g);n.fromUtf8=S;var f=g=>typeof TextDecoder=="function"?(0,m.toUtf8)(g):(0,h.toUtf8)(g);n.toUtf8=f}),jz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.convertToBuffer=void 0;var h=Nz(),m=typeof yt<"u"&&yt.from?function(f){return yt.from(f,"utf8")}:h.fromUtf8;function S(f){return f instanceof Uint8Array?f:typeof f=="string"?m(f):ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(f)}n.convertToBuffer=S}),$z=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.isEmptyData=void 0;function h(m){return typeof m=="string"?m.length===0:m.byteLength===0}n.isEmptyData=h}),Fz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.numToUint8=void 0;function h(m){return new Uint8Array([(m&4278190080)>>24,(m&16711680)>>16,(m&65280)>>8,m&255])}n.numToUint8=h}),zz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.uint32ArrayFrom=void 0;function h(m){if(!Uint32Array.from){for(var S=new Uint32Array(m.length),f=0;f{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.uint32ArrayFrom=n.numToUint8=n.isEmptyData=n.convertToBuffer=void 0;var h=jz();Object.defineProperty(n,"convertToBuffer",{enumerable:!0,get:function(){return h.convertToBuffer}});var m=$z();Object.defineProperty(n,"isEmptyData",{enumerable:!0,get:function(){return m.isEmptyData}});var S=Fz();Object.defineProperty(n,"numToUint8",{enumerable:!0,get:function(){return S.numToUint8}});var f=zz();Object.defineProperty(n,"uint32ArrayFrom",{enumerable:!0,get:function(){return f.uint32ArrayFrom}})}),Wz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0}),n.Sha256=void 0;var h=(P8(),v(a_)),m=M8(),S=Uz(),f=Hz(),g=function(){function R(B){if(this.hash=new S.RawSha256,B){this.outer=new S.RawSha256;var M=w(B),N=new Uint8Array(m.BLOCK_SIZE);N.set(M);for(var I=0;Im.BLOCK_SIZE){var M=new S.RawSha256;M.update(B),B=M.digest()}var N=new Uint8Array(m.BLOCK_SIZE);return N.set(B),N}}),Vz=u(n=>{b(),y(),_(),wt(),ce(),Object.defineProperty(n,"__esModule",{value:!0});var h=(P8(),v(a_));h.__exportStar(Wz(),n)}),qz=u((n,h)=>{b(),y(),_(),wt(),ce();var m={exports:{}};function S(tt){return tt instanceof Map?tt.clear=tt.delete=tt.set=function(){throw new Error("map is read-only")}:tt instanceof Set&&(tt.add=tt.clear=tt.delete=function(){throw new Error("set is read-only")}),Object.freeze(tt),Object.getOwnPropertyNames(tt).forEach(function(Ur){var hn=tt[Ur];typeof hn=="object"&&!Object.isFrozen(hn)&&S(hn)}),tt}m.exports=S,m.exports.default=S;var f=class{constructor(tt){tt.data===void 0&&(tt.data={}),this.data=tt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function g(tt){return tt.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function w(tt,...Ur){let hn=Object.create(null);for(let zn in tt)hn[zn]=tt[zn];return Ur.forEach(function(zn){for(let Tt in zn)hn[Tt]=zn[Tt]}),hn}var R="",B=tt=>!!tt.scope||tt.sublanguage&&tt.language,M=(tt,{prefix:Ur})=>{if(tt.includes(".")){let hn=tt.split(".");return[`${Ur}${hn.shift()}`,...hn.map((zn,Tt)=>`${zn}${"_".repeat(Tt+1)}`)].join(" ")}return`${Ur}${tt}`},N=class{constructor(tt,Ur){this.buffer="",this.classPrefix=Ur.classPrefix,tt.walk(this)}addText(tt){this.buffer+=g(tt)}openNode(tt){if(!B(tt))return;let Ur="";tt.sublanguage?Ur=`language-${tt.language}`:Ur=M(tt.scope,{prefix:this.classPrefix}),this.span(Ur)}closeNode(tt){B(tt)&&(this.buffer+=R)}value(){return this.buffer}span(tt){this.buffer+=``}},I=(tt={})=>{let Ur={children:[]};return Object.assign(Ur,tt),Ur},te=class{constructor(){this.rootNode=I(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(tt){this.top.children.push(tt)}openNode(tt){let Ur=I({scope:tt});this.add(Ur),this.stack.push(Ur)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(tt){return this.constructor._walk(tt,this.rootNode)}static _walk(tt,Ur){return typeof Ur=="string"?tt.addText(Ur):Ur.children&&(tt.openNode(Ur),Ur.children.forEach(hn=>this._walk(tt,hn)),tt.closeNode(Ur)),tt}static _collapse(tt){typeof tt!="string"&&tt.children&&(tt.children.every(Ur=>typeof Ur=="string")?tt.children=[tt.children.join("")]:tt.children.forEach(Ur=>{te._collapse(Ur)}))}},_e=class extends te{constructor(tt){super(),this.options=tt}addKeyword(tt,Ur){tt!==""&&(this.openNode(Ur),this.addText(tt),this.closeNode())}addText(tt){tt!==""&&this.add(tt)}addSublanguage(tt,Ur){let hn=tt.root;hn.sublanguage=!0,hn.language=Ur,this.add(hn)}toHTML(){return new N(this,this.options).value()}finalize(){return!0}};function Ce(tt){return tt?typeof tt=="string"?tt:tt.source:null}function Ve(tt){return Ze("(?=",tt,")")}function qe(tt){return Ze("(?:",tt,")*")}function Pe(tt){return Ze("(?:",tt,")?")}function Ze(...tt){return tt.map(Ur=>Ce(Ur)).join("")}function et(tt){let Ur=tt[tt.length-1];return typeof Ur=="object"&&Ur.constructor===Object?(tt.splice(tt.length-1,1),Ur):{}}function xt(...tt){return"("+(et(tt).capture?"":"?:")+tt.map(Ur=>Ce(Ur)).join("|")+")"}function Ue(tt){return new RegExp(tt.toString()+"|").exec("").length-1}function We(tt,Ur){let hn=tt&&tt.exec(Ur);return hn&&hn.index===0}var ht=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function gt(tt,{joinWith:Ur}){let hn=0;return tt.map(zn=>{hn+=1;let Tt=hn,Pt=Ce(zn),Wt="";for(;Pt.length>0;){let Y=ht.exec(Pt);if(!Y){Wt+=Pt;break}Wt+=Pt.substring(0,Y.index),Pt=Pt.substring(Y.index+Y[0].length),Y[0][0]==="\\"&&Y[1]?Wt+="\\"+String(Number(Y[1])+Tt):(Wt+=Y[0],Y[0]==="("&&hn++)}return Wt}).map(zn=>`(${zn})`).join(Ur)}var Je=/\b\B/,Oe="[a-zA-Z]\\w*",Se="[a-zA-Z_]\\w*",$e="\\b\\d+(\\.\\d+)?",mt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$t="\\b(0b[01]+)",pr="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Cr=(tt={})=>{let Ur=/^#![ ]*\//;return tt.binary&&(tt.begin=Ze(Ur,/.*\b/,tt.binary,/\b.*/)),w({scope:"meta",begin:Ur,end:/$/,relevance:0,"on:begin":(hn,zn)=>{hn.index!==0&&zn.ignoreMatch()}},tt)},qr={begin:"\\\\[\\s\\S]",relevance:0},jn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qr]},Yt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qr]},ei={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ni=function(tt,Ur,hn={}){let zn=w({scope:"comment",begin:tt,end:Ur,contains:[]},hn);zn.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let Tt=xt("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return zn.contains.push({begin:Ze(/[ ]+/,"(",Tt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),zn},_i=ni("//","$"),Si=ni("/\\*","\\*/"),ti=ni("#","$"),li={scope:"number",begin:$e,relevance:0},xn={scope:"number",begin:mt,relevance:0},Ci={scope:"number",begin:$t,relevance:0},to={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[qr,{begin:/\[/,end:/\]/,relevance:0,contains:[qr]}]}]},Bi={scope:"title",begin:Oe,relevance:0},tr={scope:"title",begin:Se,relevance:0},Tr={begin:"\\.\\s*"+Se,relevance:0},ln=function(tt){return Object.assign(tt,{"on:begin":(Ur,hn)=>{hn.data._beginMatch=Ur[1]},"on:end":(Ur,hn)=>{hn.data._beginMatch!==Ur[1]&&hn.ignoreMatch()}})},Wn=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Je,IDENT_RE:Oe,UNDERSCORE_IDENT_RE:Se,NUMBER_RE:$e,C_NUMBER_RE:mt,BINARY_NUMBER_RE:$t,RE_STARTERS_RE:pr,SHEBANG:Cr,BACKSLASH_ESCAPE:qr,APOS_STRING_MODE:jn,QUOTE_STRING_MODE:Yt,PHRASAL_WORDS_MODE:ei,COMMENT:ni,C_LINE_COMMENT_MODE:_i,C_BLOCK_COMMENT_MODE:Si,HASH_COMMENT_MODE:ti,NUMBER_MODE:li,C_NUMBER_MODE:xn,BINARY_NUMBER_MODE:Ci,REGEXP_MODE:to,TITLE_MODE:Bi,UNDERSCORE_TITLE_MODE:tr,METHOD_GUARD:Tr,END_SAME_AS_BEGIN:ln});function Ui(tt,Ur){tt.input[tt.index-1]==="."&&Ur.ignoreMatch()}function Ki(tt,Ur){tt.className!==void 0&&(tt.scope=tt.className,delete tt.className)}function oi(tt,Ur){Ur&&tt.beginKeywords&&(tt.begin="\\b("+tt.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",tt.__beforeBegin=Ui,tt.keywords=tt.keywords||tt.beginKeywords,delete tt.beginKeywords,tt.relevance===void 0&&(tt.relevance=0))}function xi(tt,Ur){Array.isArray(tt.illegal)&&(tt.illegal=xt(...tt.illegal))}function vi(tt,Ur){if(tt.match){if(tt.begin||tt.end)throw new Error("begin & end are not supported with match");tt.begin=tt.match,delete tt.match}}function ro(tt,Ur){tt.relevance===void 0&&(tt.relevance=1)}var Di=(tt,Ur)=>{if(!tt.beforeMatch)return;if(tt.starts)throw new Error("beforeMatch cannot be used with starts");let hn=Object.assign({},tt);Object.keys(tt).forEach(zn=>{delete tt[zn]}),tt.keywords=hn.keywords,tt.begin=Ze(hn.beforeMatch,Ve(hn.begin)),tt.starts={relevance:0,contains:[Object.assign(hn,{endsParent:!0})]},tt.relevance=0,delete hn.beforeMatch},no=["of","and","for","in","not","or","if","then","parent","list","value"],io="keyword";function Gi(tt,Ur,hn=io){let zn=Object.create(null);return typeof tt=="string"?Tt(hn,tt.split(" ")):Array.isArray(tt)?Tt(hn,tt):Object.keys(tt).forEach(function(Pt){Object.assign(zn,Gi(tt[Pt],Ur,Pt))}),zn;function Tt(Pt,Wt){Ur&&(Wt=Wt.map(Y=>Y.toLowerCase())),Wt.forEach(function(Y){let me=Y.split("|");zn[me[0]]=[Pt,_o(me[0],me[1])]})}}function _o(tt,Ur){return Ur?Number(Ur):Dt(tt)?0:1}function Dt(tt){return no.includes(tt.toLowerCase())}var ze={},St=tt=>{console.error(tt)},Ot=(tt,...Ur)=>{console.log(`WARN: ${tt}`,...Ur)},Vt=(tt,Ur)=>{ze[`${tt}/${Ur}`]||(console.log(`Deprecated as of ${tt}. ${Ur}`),ze[`${tt}/${Ur}`]=!0)},ot=new Error;function pt(tt,Ur,{key:hn}){let zn=0,Tt=tt[hn],Pt={},Wt={};for(let Y=1;Y<=Ur.length;Y++)Wt[Y+zn]=Tt[Y],Pt[Y+zn]=!0,zn+=Ue(Ur[Y-1]);tt[hn]=Wt,tt[hn]._emit=Pt,tt[hn]._multi=!0}function Xe(tt){if(Array.isArray(tt.begin)){if(tt.skip||tt.excludeBegin||tt.returnBegin)throw St("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ot;if(typeof tt.beginScope!="object"||tt.beginScope===null)throw St("beginScope must be object"),ot;pt(tt,tt.begin,{key:"beginScope"}),tt.begin=gt(tt.begin,{joinWith:""})}}function It(tt){if(Array.isArray(tt.end)){if(tt.skip||tt.excludeEnd||tt.returnEnd)throw St("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ot;if(typeof tt.endScope!="object"||tt.endScope===null)throw St("endScope must be object"),ot;pt(tt,tt.end,{key:"endScope"}),tt.end=gt(tt.end,{joinWith:""})}}function nt(tt){tt.scope&&typeof tt.scope=="object"&&tt.scope!==null&&(tt.beginScope=tt.scope,delete tt.scope)}function Qt(tt){nt(tt),typeof tt.beginScope=="string"&&(tt.beginScope={_wrap:tt.beginScope}),typeof tt.endScope=="string"&&(tt.endScope={_wrap:tt.endScope}),Xe(tt),It(tt)}function lr(tt){function Ur(Wt,Y){return new RegExp(Ce(Wt),"m"+(tt.case_insensitive?"i":"")+(tt.unicodeRegex?"u":"")+(Y?"g":""))}class hn{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Y,me){me.position=this.position++,this.matchIndexes[this.matchAt]=me,this.regexes.push([me,Y]),this.matchAt+=Ue(Y)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let Y=this.regexes.map(me=>me[1]);this.matcherRe=Ur(gt(Y,{joinWith:"|"}),!0),this.lastIndex=0}exec(Y){this.matcherRe.lastIndex=this.lastIndex;let me=this.matcherRe.exec(Y);if(!me)return null;let we=me.findIndex((se,z)=>z>0&&se!==void 0),A=this.matchIndexes[we];return me.splice(0,we),Object.assign(me,A)}}class zn{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Y){if(this.multiRegexes[Y])return this.multiRegexes[Y];let me=new hn;return this.rules.slice(Y).forEach(([we,A])=>me.addRule(we,A)),me.compile(),this.multiRegexes[Y]=me,me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Y,me){this.rules.push([Y,me]),me.type==="begin"&&this.count++}exec(Y){let me=this.getMatcher(this.regexIndex);me.lastIndex=this.lastIndex;let we=me.exec(Y);if(this.resumingScanAtSamePosition()&&!(we&&we.index===this.lastIndex)){let A=this.getMatcher(0);A.lastIndex=this.lastIndex+1,we=A.exec(Y)}return we&&(this.regexIndex+=we.position+1,this.regexIndex===this.count&&this.considerAll()),we}}function Tt(Wt){let Y=new zn;return Wt.contains.forEach(me=>Y.addRule(me.begin,{rule:me,type:"begin"})),Wt.terminatorEnd&&Y.addRule(Wt.terminatorEnd,{type:"end"}),Wt.illegal&&Y.addRule(Wt.illegal,{type:"illegal"}),Y}function Pt(Wt,Y){let me=Wt;if(Wt.isCompiled)return me;[Ki,vi,Qt,Di].forEach(A=>A(Wt,Y)),tt.compilerExtensions.forEach(A=>A(Wt,Y)),Wt.__beforeBegin=null,[oi,xi,ro].forEach(A=>A(Wt,Y)),Wt.isCompiled=!0;let we=null;return typeof Wt.keywords=="object"&&Wt.keywords.$pattern&&(Wt.keywords=Object.assign({},Wt.keywords),we=Wt.keywords.$pattern,delete Wt.keywords.$pattern),we=we||/\w+/,Wt.keywords&&(Wt.keywords=Gi(Wt.keywords,tt.case_insensitive)),me.keywordPatternRe=Ur(we,!0),Y&&(Wt.begin||(Wt.begin=/\B|\b/),me.beginRe=Ur(me.begin),!Wt.end&&!Wt.endsWithParent&&(Wt.end=/\B|\b/),Wt.end&&(me.endRe=Ur(me.end)),me.terminatorEnd=Ce(me.end)||"",Wt.endsWithParent&&Y.terminatorEnd&&(me.terminatorEnd+=(Wt.end?"|":"")+Y.terminatorEnd)),Wt.illegal&&(me.illegalRe=Ur(Wt.illegal)),Wt.contains||(Wt.contains=[]),Wt.contains=[].concat(...Wt.contains.map(function(A){return zr(A==="self"?Wt:A)})),Wt.contains.forEach(function(A){Pt(A,me)}),Wt.starts&&Pt(Wt.starts,Y),me.matcher=Tt(me),me}if(tt.compilerExtensions||(tt.compilerExtensions=[]),tt.contains&&tt.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return tt.classNameAliases=w(tt.classNameAliases||{}),Pt(tt)}function wr(tt){return tt?tt.endsWithParent||wr(tt.starts):!1}function zr(tt){return tt.variants&&!tt.cachedVariants&&(tt.cachedVariants=tt.variants.map(function(Ur){return w(tt,{variants:null},Ur)})),tt.cachedVariants?tt.cachedVariants:wr(tt)?w(tt,{starts:tt.starts?w(tt.starts):null}):Object.isFrozen(tt)?w(tt):tt}var bt="11.6.0",Ft=class extends Error{constructor(tt,Ur){super(tt),this.name="HTMLInjectionError",this.html=Ur}},Er=g,an=w,Bn=Symbol("nomatch"),Fi=7,ai=function(tt){let Ur=Object.create(null),hn=Object.create(null),zn=[],Tt=!0,Pt="Could not find the language '{}', did you forget to load/include a language module?",Wt={disableAutodetect:!0,name:"Plain text",contains:[]},Y={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:_e};function me(dr){return Y.noHighlightRe.test(dr)}function we(dr){let qt=dr.className+" ";qt+=dr.parentNode?dr.parentNode.className:"";let rr=Y.languageDetectRe.exec(qt);if(rr){let Ar=fn(rr[1]);return Ar||(Ot(Pt.replace("{}",rr[1])),Ot("Falling back to no-highlight mode for this block.",dr)),Ar?rr[1]:"no-highlight"}return qt.split(/\s+/).find(Ar=>me(Ar)||fn(Ar))}function A(dr,qt,rr){let Ar="",_r="";typeof qt=="object"?(Ar=dr,rr=qt.ignoreIllegals,_r=qt.language):(Vt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Vt("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),_r=dr,Ar=qt),rr===void 0&&(rr=!0);let Mr={code:Ar,language:_r};Cn("before:highlight",Mr);let Fr=Mr.result?Mr.result:se(Mr.language,Mr.code,rr);return Fr.code=Mr.code,Cn("after:highlight",Fr),Fr}function se(dr,qt,rr,Ar){let _r=Object.create(null);function Mr(En,Hn){return En.keywords[Hn]}function Fr(){if(!On.keywords){Ti.addText(ci);return}let En=0;On.keywordPatternRe.lastIndex=0;let Hn=On.keywordPatternRe.exec(ci),ki="";for(;Hn;){ki+=ci.substring(En,Hn.index);let lo=Yi.case_insensitive?Hn[0].toLowerCase():Hn[0],Ia=Mr(On,lo);if(Ia){let[Ne,Ye]=Ia;if(Ti.addText(ki),ki="",_r[lo]=(_r[lo]||0)+1,_r[lo]<=Fi&&(Oo+=Ye),Ne.startsWith("_"))ki+=Hn[0];else{let _t=Yi.classNameAliases[Ne]||Ne;Ti.addKeyword(Hn[0],_t)}}else ki+=Hn[0];En=On.keywordPatternRe.lastIndex,Hn=On.keywordPatternRe.exec(ci)}ki+=ci.substring(En),Ti.addText(ki)}function Ln(){if(ci==="")return;let En=null;if(typeof On.subLanguage=="string"){if(!Ur[On.subLanguage]){Ti.addText(ci);return}En=se(On.subLanguage,ci,!0,Eo[On.subLanguage]),Eo[On.subLanguage]=En._top}else En=re(ci,On.subLanguage.length?On.subLanguage:null);On.relevance>0&&(Oo+=En.relevance),Ti.addSublanguage(En._emitter,En.language)}function Nn(){On.subLanguage!=null?Ln():Fr(),ci=""}function Ke(En,Hn){let ki=1,lo=Hn.length-1;for(;ki<=lo;){if(!En._emit[ki]){ki++;continue}let Ia=Yi.classNameAliases[En[ki]]||En[ki],Ne=Hn[ki];Ia?Ti.addKeyword(Ne,Ia):(ci=Ne,Fr(),ci=""),ki++}}function ut(En,Hn){return En.scope&&typeof En.scope=="string"&&Ti.openNode(Yi.classNameAliases[En.scope]||En.scope),En.beginScope&&(En.beginScope._wrap?(Ti.addKeyword(ci,Yi.classNameAliases[En.beginScope._wrap]||En.beginScope._wrap),ci=""):En.beginScope._multi&&(Ke(En.beginScope,Hn),ci="")),On=Object.create(En,{parent:{value:On}}),On}function be(En,Hn,ki){let lo=We(En.endRe,ki);if(lo){if(En["on:end"]){let Ia=new f(En);En["on:end"](Hn,Ia),Ia.isMatchIgnored&&(lo=!1)}if(lo){for(;En.endsParent&&En.parent;)En=En.parent;return En}}if(En.endsWithParent)return be(En.parent,Hn,ki)}function fr(En){return On.matcher.regexIndex===0?(ci+=En[0],1):(jg=!0,0)}function Jr(En){let Hn=En[0],ki=En.rule,lo=new f(ki),Ia=[ki.__beforeBegin,ki["on:begin"]];for(let Ne of Ia)if(Ne&&(Ne(En,lo),lo.isMatchIgnored))return fr(Hn);return ki.skip?ci+=Hn:(ki.excludeBegin&&(ci+=Hn),Nn(),!ki.returnBegin&&!ki.excludeBegin&&(ci=Hn)),ut(ki,En),ki.returnBegin?0:Hn.length}function rn(En){let Hn=En[0],ki=qt.substring(En.index),lo=be(On,En,ki);if(!lo)return Bn;let Ia=On;On.endScope&&On.endScope._wrap?(Nn(),Ti.addKeyword(Hn,On.endScope._wrap)):On.endScope&&On.endScope._multi?(Nn(),Ke(On.endScope,En)):Ia.skip?ci+=Hn:(Ia.returnEnd||Ia.excludeEnd||(ci+=Hn),Nn(),Ia.excludeEnd&&(ci=Hn));do On.scope&&Ti.closeNode(),!On.skip&&!On.subLanguage&&(Oo+=On.relevance),On=On.parent;while(On!==lo.parent);return lo.starts&&ut(lo.starts,En),Ia.returnEnd?0:Hn.length}function Xn(){let En=[];for(let Hn=On;Hn!==Yi;Hn=Hn.parent)Hn.scope&&En.unshift(Hn.scope);En.forEach(Hn=>Ti.openNode(Hn))}let bi={};function Mi(En,Hn){let ki=Hn&&Hn[0];if(ci+=En,ki==null)return Nn(),0;if(bi.type==="begin"&&Hn.type==="end"&&bi.index===Hn.index&&ki===""){if(ci+=qt.slice(Hn.index,Hn.index+1),!Tt){let lo=new Error(`0 width match regex (${dr})`);throw lo.languageName=dr,lo.badRule=bi.rule,lo}return 1}if(bi=Hn,Hn.type==="begin")return Jr(Hn);if(Hn.type==="illegal"&&!rr){let lo=new Error('Illegal lexeme "'+ki+'" for mode "'+(On.scope||"")+'"');throw lo.mode=On,lo}else if(Hn.type==="end"){let lo=rn(Hn);if(lo!==Bn)return lo}if(Hn.type==="illegal"&&ki==="")return 1;if(Ng>1e5&&Ng>Hn.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ci+=ki,ki.length}let Yi=fn(dr);if(!Yi)throw St(Pt.replace("{}",dr)),new Error('Unknown language: "'+dr+'"');let Vi=lr(Yi),So="",On=Ar||Vi,Eo={},Ti=new Y.__emitter(Y);Xn();let ci="",Oo=0,Io=0,Ng=0,jg=!1;try{for(On.matcher.considerAll();;){Ng++,jg?jg=!1:On.matcher.considerAll(),On.matcher.lastIndex=Io;let En=On.matcher.exec(qt);if(!En)break;let Hn=qt.substring(Io,En.index),ki=Mi(Hn,En);Io=En.index+ki}return Mi(qt.substring(Io)),Ti.closeAllNodes(),Ti.finalize(),So=Ti.toHTML(),{language:dr,value:So,relevance:Oo,illegal:!1,_emitter:Ti,_top:On}}catch(En){if(En.message&&En.message.includes("Illegal"))return{language:dr,value:Er(qt),illegal:!0,relevance:0,_illegalBy:{message:En.message,index:Io,context:qt.slice(Io-100,Io+100),mode:En.mode,resultSoFar:So},_emitter:Ti};if(Tt)return{language:dr,value:Er(qt),illegal:!1,relevance:0,errorRaised:En,_emitter:Ti,_top:On};throw En}}function z(dr){let qt={value:Er(dr),illegal:!1,relevance:0,_top:Wt,_emitter:new Y.__emitter(Y)};return qt._emitter.addText(dr),qt}function re(dr,qt){qt=qt||Y.languages||Object.keys(Ur);let rr=z(dr),Ar=qt.filter(fn).filter(en).map(Nn=>se(Nn,dr,!1));Ar.unshift(rr);let _r=Ar.sort((Nn,Ke)=>{if(Nn.relevance!==Ke.relevance)return Ke.relevance-Nn.relevance;if(Nn.language&&Ke.language){if(fn(Nn.language).supersetOf===Ke.language)return 1;if(fn(Ke.language).supersetOf===Nn.language)return-1}return 0}),[Mr,Fr]=_r,Ln=Mr;return Ln.secondBest=Fr,Ln}function he(dr,qt,rr){let Ar=qt&&hn[qt]||rr;dr.classList.add("hljs"),dr.classList.add(`language-${Ar}`)}function Q(dr){let qt=null,rr=we(dr);if(me(rr))return;if(Cn("before:highlightElement",{el:dr,language:rr}),dr.children.length>0&&(Y.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(dr)),Y.throwUnescapedHTML))throw new Ft("One of your code blocks includes unescaped HTML.",dr.innerHTML);qt=dr;let Ar=qt.textContent,_r=rr?A(Ar,{language:rr,ignoreIllegals:!0}):re(Ar);dr.innerHTML=_r.value,he(dr,rr,_r.language),dr.result={language:_r.language,re:_r.relevance,relevance:_r.relevance},_r.secondBest&&(dr.secondBest={language:_r.secondBest.language,relevance:_r.secondBest.relevance}),Cn("after:highlightElement",{el:dr,result:_r,text:Ar})}function ge(dr){Y=an(Y,dr)}let Te=()=>{Zt(),Vt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function st(){Zt(),Vt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let at=!1;function Zt(){if(document.readyState==="loading"){at=!0;return}document.querySelectorAll(Y.cssSelector).forEach(Q)}function xr(){at&&Zt()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",xr,!1);function Yr(dr,qt){let rr=null;try{rr=qt(tt)}catch(Ar){if(St("Language definition for '{}' could not be registered.".replace("{}",dr)),Tt)St(Ar);else throw Ar;rr=Wt}rr.name||(rr.name=dr),Ur[dr]=rr,rr.rawDefinition=qt.bind(null,tt),rr.aliases&&Pn(rr.aliases,{languageName:dr})}function Qr(dr){delete Ur[dr];for(let qt of Object.keys(hn))hn[qt]===dr&&delete hn[qt]}function Xr(){return Object.keys(Ur)}function fn(dr){return dr=(dr||"").toLowerCase(),Ur[dr]||Ur[hn[dr]]}function Pn(dr,{languageName:qt}){typeof dr=="string"&&(dr=[dr]),dr.forEach(rr=>{hn[rr.toLowerCase()]=qt})}function en(dr){let qt=fn(dr);return qt&&!qt.disableAutodetect}function gn(dr){dr["before:highlightBlock"]&&!dr["before:highlightElement"]&&(dr["before:highlightElement"]=qt=>{dr["before:highlightBlock"](Object.assign({block:qt.el},qt))}),dr["after:highlightBlock"]&&!dr["after:highlightElement"]&&(dr["after:highlightElement"]=qt=>{dr["after:highlightBlock"](Object.assign({block:qt.el},qt))})}function yn(dr){gn(dr),zn.push(dr)}function Cn(dr,qt){let rr=dr;zn.forEach(function(Ar){Ar[rr]&&Ar[rr](qt)})}function Mn(dr){return Vt("10.7.0","highlightBlock will be removed entirely in v12.0"),Vt("10.7.0","Please use highlightElement now."),Q(dr)}Object.assign(tt,{highlight:A,highlightAuto:re,highlightAll:Zt,highlightElement:Q,highlightBlock:Mn,configure:ge,initHighlighting:Te,initHighlightingOnLoad:st,registerLanguage:Yr,unregisterLanguage:Qr,listLanguages:Xr,getLanguage:fn,registerAliases:Pn,autoDetection:en,inherit:an,addPlugin:yn}),tt.debugMode=function(){Tt=!1},tt.safeMode=function(){Tt=!0},tt.versionString=bt,tt.regex={concat:Ze,lookahead:Ve,either:xt,optional:Pe,anyNumberOfTimes:qe};for(let dr in Wn)typeof Wn[dr]=="object"&&m.exports(Wn[dr]);return Object.assign(tt,Wn),tt},ui=ai({});h.exports=ui,ui.HighlightJS=ui,ui.default=ui}),Kz=u((n,h)=>{h.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"}),Gz=u((n,h)=>{h.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"});b(),y(),_(),wt(),ce(),b(),y(),_(),wt(),ce();var kp=p(cz()),Yz=p(gz()),Zz=p(Vz()),Qz=kp.Address.parse("EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"),Xz=kp.Address.parse("EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8");function Jz(n){let h=new Zz.Sha256;return h.update(n),yt.from(h.digestSync())}function eH(n,h){return n.replace("ipfs://",`https://tonsource${h?"-testnet":""}.infura-ipfs.io/ipfs/`)}function O8(n){return BigInt(`0x${n.toString("hex")}`)}var tH={async getSourcesJsonUrl(n,h){let m=new kp.TonClient4({endpoint:h?.httpApiEndpointV4??await(0,Yz.getHttpV4Endpoint)({network:h.testnet?"testnet":"mainnet"})}),{last:{seqno:S}}=await m.getLastBlock(),f=new kp.TupleBuilder;f.writeNumber(O8(Jz(h?.verifier??"orbs.com"))),f.writeNumber(O8(yt.from(n,"base64")));let{result:g}=await m.runMethod(S,h.testnet?Xz:Qz,"get_source_item_address",f.build()),w=new kp.TupleReader(g),R=w.readAddress();if(await m.isContractDeployed(S,R)){let{result:B}=await m.runMethod(S,R,"get_source_item_data");w=new kp.TupleReader(B);let M=w.skip(3).readCell().beginParse();if(M.loadUint(8)!==1)throw new Error("Unsupported version");return M.loadStringTail()}return null},async getSourcesData(n,h){let m=h.ipfsConverter??eH,S=m(n,!!h.testnet),f=await(await fetch(m(n,!!h.testnet))).json();return{files:(await Promise.all(f.sources.map(async g=>{let w=m(g.url,!!h.testnet),R=await fetch(w).then(B=>B.text());return{name:g.filename,content:R,isEntrypoint:g.isEntrypoint}}))).reverse().sort((g,w)=>Number(w.isEntrypoint)-Number(g.isEntrypoint)),verificationDate:new Date(f.verificationDate),compilerSettings:f.compilerSettings,compiler:f.compiler,ipfsHttpLink:S}}};b(),y(),_(),wt(),ce(),b(),y(),_(),wt(),ce();var rH=p(qz(),1),B8=rH.default;b(),y(),_(),wt(),ce(),b(),y(),_(),wt(),ce();var U8='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',D8=/\"[^\n\"]+\"[Hhcusa]?/,l_;try{l_=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,//,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,//,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1</,/0=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1</,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:n.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}b(),y(),_(),wt(),ce();var N8=/[a-zA-Z_][0-9a-zA-Z_]*/;function oH(n){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},{scope:"symbol",match:n.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function aH(n){n.registerLanguage("fift",iH),n.registerLanguage("func",nH),n.registerLanguage("tlb",oH)}b(),y(),_(),wt(),ce();var Lc=(n,...h)=>$8("div",n,...h),j8=(n,...h)=>$8("img",n,...h);function sH(n,h){for(let m of h)if(m)switch(typeof m){case"string":let S=document.createTextNode(m);n.appendChild(S);break;default:n.appendChild(m);break}}function lH(n,h){typeof h=="string"?n.setAttribute("style",h):Object.assign(n.style,h)}function uH(n,h){h.split(/\s/).forEach(m=>{m&&n.classList.add(m)})}function cH(n,h){let m=/^on([a-z]+)$/i;for(let S in h)if(S)if(S==="style")lH(n,h[S]);else if(S==="className")uH(n,h[S]);else if(m.test(S)){let f=S.replace(m,"$1").toLowerCase();n.addEventListener(f,h[S])}else n.setAttribute(S,h[S])}function $8(n,h,...m){if(typeof n=="function")return n(h);{let S=document.createElement(n);return h&&typeof h=="object"&&cH(S,h),m&&sH(S,m),S}}b(),y(),_(),wt(),ce();var dH=` + + + + + + + + + + +`,fH=` + + + + + + + + + + +`,pH=` + + +`,hH=` + + +`,gH=` + + +`,mH=` + + +`,ev={dark:{file:dH,folder:{open:gH,closed:pH}},light:{file:fH,folder:{open:mH,closed:hH}}},c_=n=>`data:image/svg+xml;base64,${yt.from(n,"utf8").toString("base64")}`,yH=({name:n},h)=>Lc({className:`${Ol.FILE} ${Ol.TREE_ITEM}`},j8({src:c_(ev[h].file)}),Lc(null,n));function vH(n,h){let m=h.target.classList.contains("folder-header")?h.target:h.target.parentElement,S=m.getAttribute("opened")!=="true";m.children[0].attributes.src.value=c_(S?ev[n].folder.open:ev[n].folder.closed);try{let f=m.nextElementSibling;S?f.classList.remove("hide"):f.classList.add("hide")}catch{console.warn(`No sibling of elem ${m} found ...`)}m.setAttribute("opened",S)}var bH=(n,h,...m)=>{let S=n.opened||!1,f=ev[h].folder[S?"open":"closed"],g=n.name||"unknown";return Lc({className:Ol.FOLDER_CONTAINER},Lc({onClick:vH.bind(void 0,h),className:`folder-header ${Ol.FOLDER} ${Ol.TREE_ITEM}`,opened:S},j8({src:c_(f)}),Lc(null,g)),Lc({className:`${S?"":"hide"} folder-content`},...m))},wH=`.contract-verifier-container { + display: flex; + height: 100%; +} + +.contract-verifier-code { + text-align: left; + overflow: auto; + height: 100%; + width: 100%; +} + +.contract-verifier-code.dark { + background: #232222; +} + +.contract-verifier-code code { + display: flex; + padding: 0.5em; +} + +.contract-verifier-code code div { + background: transparent; +} + +.contract-verifier-code code .contract-verifier-code-lines { + padding: 0 20px 0 0; + text-align: right; + display: none; +} + +.contract-verifier-container.lineNumbers .contract-verifier-code-lines { + display: initial; +} + +.contract-verifier-code code.dark .contract-verifier-code-lines { + color: #7e7e7e; +} + +.contract-verifier-code code.light .contract-verifier-code-lines { + color: #728a96; +} + +.contract-verifier-code pre { + margin: 0; +} + +.contract-verifier-files { + text-align: left; + flex-shrink: 0; + display: flex; + flex-direction: column; + width: 200px; + overflow-y: auto; +} + +.contract-verifier-files.dark { + background: #28292d; + color: white; +} + +.contract-verifier-files.light { + background: #fff; +} + +.contract-verifier-tree-item { + padding: 10px 6px; + cursor: pointer; + display: flex; + gap: 4px; + user-select: none; +} + +.contract-verifier-files.dark .contract-verifier-tree-item:hover { + filter: brightness(0.8); +} + +.contract-verifier-files.light .contract-verifier-tree-item:hover { + background-color: #f6f6f6; +} + +.contract-verifier-files.dark .contract-verifier-file.active { + background: #232222; +} + +.contract-verifier-files.light .contract-verifier-file.active { + background: #f2f2f2; +} + +.contract-verifier-files .hide { + display: none; +} + +.contract-verifier-folder-container > .folder-content { + padding-left: 12px; +} +`;aH(B8);var Ol={CONTAINER:"contract-verifier-container",FILES:"contract-verifier-files",FILE:"contract-verifier-file",FOLDER:"contract-verifier-folder",TREE_ITEM:"contract-verifier-tree-item",FOLDER_CONTAINER:"contract-verifier-folder-container",CODE_CONTAINER:"contract-verifier-code",CODE_LINES:"contract-verifier-code-lines",CODE_CONTENT:"contract-verifier-code-content"},F8={_stylesPopulated:{internal:!1},_populateStyle(n){if(!this._stylesPopulated[n]){this._stylesPopulated[n]=!0;let h=document.createElement("style");h.innerHTML=`${n==="light"?Kz().toString():Gz().toString()}`,document.head.appendChild(h)}if(!this._stylesPopulated.internal){this._stylesPopulated.internal=!0;let h=document.createElement("style");h.innerHTML=wH,document.head.appendChild(h)}},_populateCode(n,h){let m=document.querySelector(n);m.classList.add(Ol.CODE_CONTAINER),m.classList.add(h),m.innerHTML=`
    `},_setCode({name:n,content:h},m,S,f){if(f?.classList.contains("active"))return;m.scrollTo(0,0),h=h.trim();let g=m.querySelector("code");g.innerHTML="",g.appendChild(Lc({className:Ol.CODE_LINES},h.split(` +`).map((R,B)=>B+1).join(` +`)));let w=Lc({className:Ol.CODE_CONTENT},h);g.appendChild(w),n.match(/\.fif(t)?$/)?w.classList.add("language-fift"):w.classList.add("language-func"),B8.highlightElement(w),S?.querySelector(`.${Ol.FILE}.active`)?.classList.remove("active"),f?.classList.add("active")},setCode(n,h){this._setCode({name:"",content:h},document.querySelector(n))},_populateFiles(n,h,m,S){let f=document.querySelector(n);f.innerHTML="",f.classList.add(S),f.classList.add(Ol.FILES);let g={type:"root",children:[]};m.forEach(R=>{let B=Array.from(R.name.matchAll(/(?:\/|^)([^\/\n]+)/g)).map(I=>I[1]),M=B.length>1?B.slice(0,B.length-1):[],N=g;M.forEach(I=>{let te=N.children.find(_e=>_e.type==="folder"&&_e.name===I);if(!te){let _e={type:"folder",name:I,children:[]};N.children.push(_e),te=_e}N=te}),N.children.push({type:"file",name:B[B.length-1],content:R.content})});function w(R){return R.children.filter(B=>B.type==="file").map(B=>{let M=yH({name:B.name},S);return M.onclick=()=>{F8._setCode({name:B.name,content:B.content},document.querySelector(h),document.querySelector(n),M)},M}).concat(R.children.filter(B=>B.type==="folder").map(B=>bH({name:B.name,opened:!0},S,...w(B))))}w(g).forEach(R=>f.appendChild(R))},_populateContainer(n,h){let m=document.querySelector(n);m.classList.add(Ol.CONTAINER),h||m.classList.add("lineNumbers")},loadSourcesData(n,h){this._populateContainer(h.containerSelector,!!h.hideLineNumbers),h.fileListSelector&&this._populateFiles(h.fileListSelector,h.contentSelector,n.files,h.theme),this._populateStyle(h.theme),this._populateCode(h.contentSelector,h.theme),this._setCode(n.files[0],document.querySelector(h.contentSelector),document.querySelector(h.fileListSelector),document.querySelector(`${h.fileListSelector} .contract-verifier-file`))}};window.ContractVerifier=tH,window.ContractVerifierUI=F8})();function Hl(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i3?t.i-4:t.i:Array.isArray(e)?1:rE(e)?2:nE(e)?3:0}function f4(e,t){return Ag(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function b1e(e,t){return Ag(e)===2?e.get(t):e[t]}function qN(e,t,r){var i=Ag(e);i===2?e.set(t,r):i===3?(e.delete(t),e.add(r)):e[t]=r}function w1e(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function rE(e){return C1e&&e instanceof Map}function nE(e){return k1e&&e instanceof Set}function uf(e){return e.o||e.t}function iE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A1e(e);delete t[el];for(var r=lE(t),i=0;i1&&(e.set=e.add=e.clear=e.delete=x1e),Object.freeze(e),t&&Z0(e,function(r,i){return oE(i,!0)},!0)),e}function x1e(){Hl(2)}function aE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ru(e){var t=T1e[e];return t||Hl(18,e),t}function JP(){return Q0}function z5(e,t){t&&(Ru("Patches"),e.u=[],e.s=[],e.v=t)}function Cb(e){p4(e),e.p.forEach(_1e),e.p=null}function p4(e){e===Q0&&(Q0=e.l)}function eM(e){return Q0={p:[],l:Q0,h:e,m:!0,_:0}}function _1e(e){var t=e[el];t.i===0||t.i===1?t.j():t.O=!0}function H5(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.g||Ru("ES5").S(t,e,i),i?(r[el].P&&(Cb(t),Hl(4)),up(e)&&(e=kb(t,e),t.l||Eb(t,e)),t.u&&Ru("Patches").M(r[el].t,e,t.u,t.s)):e=kb(t,r,[]),Cb(t),t.u&&t.v(t.u,t.s),e!==KN?e:void 0}function kb(e,t,r){if(aE(t))return t;var i=t[el];if(!i)return Z0(t,function(a,s){return tM(e,i,t,a,s,r)},!0),t;if(i.A!==e)return t;if(!i.P)return Eb(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var o=i.i===4||i.i===5?i.o=iE(i.k):i.o;Z0(i.i===3?new Set(o):o,function(a,s){return tM(e,i,o,a,s,r)}),Eb(e,o,!1),r&&e.u&&Ru("Patches").N(i,r,e.u,e.s)}return i.o}function tM(e,t,r,i,o,a){if(Zh(o)){var s=kb(e,o,a&&t&&t.i!==3&&!f4(t.R,i)?a.concat(i):void 0);if(qN(r,i,s),!Zh(s))return;e.m=!1}if(up(o)&&!aE(o)){if(!e.h.D&&e._<1)return;kb(e,o),t&&t.A.l||Eb(e,o)}}function Eb(e,t,r){r===void 0&&(r=!1),e.h.D&&e.m&&oE(t,r)}function W5(e,t){var r=e[el];return(r?uf(r):e)[t]}function rM(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function h4(e){e.P||(e.P=!0,e.l&&h4(e.l))}function V5(e){e.o||(e.o=iE(e.t))}function g4(e,t,r){var i=rE(t)?Ru("MapSet").F(t,r):nE(t)?Ru("MapSet").T(t,r):e.g?function(o,a){var s=Array.isArray(o),l={i:s?1:0,A:a?a.A:JP(),P:!1,I:!1,R:{},l:a,t:o,k:null,o:null,j:null,C:!1},u=l,c=m4;s&&(u=[l],c=Fm);var d=Proxy.revocable(u,c),p=d.revoke,v=d.proxy;return l.k=v,l.j=p,v}(t,r):Ru("ES5").J(t,r);return(r?r.A:JP()).p.push(i),i}function S1e(e){return Zh(e)||Hl(22,e),function t(r){if(!up(r))return r;var i,o=r[el],a=Ag(r);if(o){if(!o.P&&(o.i<4||!Ru("ES5").K(o)))return o.t;o.I=!0,i=nM(r,a),o.I=!1}else i=nM(r,a);return Z0(i,function(s,l){o&&b1e(o.t,s)===l||qN(i,s,t(l))}),a===3?new Set(i):i}(e)}function nM(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return iE(e)}var iM,Q0,sE=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",C1e=typeof Map<"u",k1e=typeof Set<"u",oM=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",KN=sE?Symbol.for("immer-nothing"):((iM={})["immer-nothing"]=!0,iM),aM=sE?Symbol.for("immer-draftable"):"__$immer_draftable",el=sE?Symbol.for("immer-state"):"__$immer_state",E1e=""+Object.prototype.constructor,lE=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A1e=Object.getOwnPropertyDescriptors||function(e){var t={};return lE(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},T1e={},m4={get:function(e,t){if(t===el)return e;var r=uf(e);if(!f4(r,t))return function(o,a,s){var l,u=rM(a,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(o.k):void 0}(e,r,t);var i=r[t];return e.I||!up(i)?i:i===W5(e.t,t)?(V5(e),e.o[t]=g4(e.A.h,i,e)):i},has:function(e,t){return t in uf(e)},ownKeys:function(e){return Reflect.ownKeys(uf(e))},set:function(e,t,r){var i=rM(uf(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var o=W5(uf(e),t),a=o?.[el];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(w1e(r,o)&&(r!==void 0||f4(e.t,t)))return!0;V5(e),h4(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return W5(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,V5(e),h4(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=uf(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){Hl(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Hl(12)}},Fm={};Z0(m4,function(e,t){Fm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Fm.deleteProperty=function(e,t){return Fm.set.call(this,e,t,void 0)},Fm.set=function(e,t,r){return m4.set.call(this,e[0],t,r,e[0])};var I1e=function(){function e(r){var i=this;this.g=oM,this.D=!0,this.produce=function(o,a,s){if(typeof o=="function"&&typeof a!="function"){var l=a;a=o;var u=i;return function(y){var _=this;y===void 0&&(y=l);for(var k=arguments.length,E=Array(k>1?k-1:0),O=1;O1?d-1:0),v=1;v=0;o--){var a=i[o];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}o>-1&&(i=i.slice(o+1));var s=Ru("Patches").$;return Zh(r)?s(r,i):this.produce(r,function(l){return s(l,i)})},e}(),tl=new I1e,R1e=tl.produce;tl.produceWithPatches.bind(tl);tl.setAutoFreeze.bind(tl);tl.setUseProxies.bind(tl);tl.applyPatches.bind(tl);tl.createDraft.bind(tl);tl.finishDraft.bind(tl);const P1e=e=>(t,r,i)=>(i.setState=(o,a,...s)=>{const l=typeof o=="function"?R1e(o):o;return t(l,a,...s)},e(i.setState,r,i)),$x=P1e;var GN={},YN={},ZN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(){for(var o=arguments.length,a=new Array(o),s=0;s"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(l=window).gtag.apply(l,a)}},r=t;e.default=r})(ZN);var QN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function r(l){return l.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(u,c,d){return c>0&&c+u.length!==d.length&&u.search(t)>-1&&d.charAt(c-2)!==":"&&(d.charAt(c+u.length)!=="-"||d.charAt(c-1)==="-")&&d.charAt(c-1).search(/[^\s-]/)<0?u.toLowerCase():u.substr(1).search(/[A-Z]|\../)>-1?u:u.charAt(0).toUpperCase()+u.substr(1)})}function i(l){return typeof l=="string"&&l.indexOf("@")!==-1}var o="REDACTED (Potential Email Address)";function a(l){return i(l)?(console.warn("This arg looks like an email address, redacting."),o):l}function s(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=l||"";return u&&(d=r(l)),c&&(d=a(d)),d}})(QN);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=l(ZN),r=l(QN),i=["eventCategory","eventAction","eventLabel","eventValue","hitType"],o=["title","location"],a=["page","hitType"],s=["action","category","label","value","nonInteraction","transport"];function l(oe){return oe&&oe.__esModule?oe:{default:oe}}function u(oe,P){if(oe==null)return{};var ee=c(oe,P),le,pe;if(Object.getOwnPropertySymbols){var xe=Object.getOwnPropertySymbols(oe);for(pe=0;pe=0)&&(!Object.prototype.propertyIsEnumerable.call(oe,le)||(ee[le]=oe[le]))}return ee}function c(oe,P){if(oe==null)return{};var ee={},le=Object.keys(oe),pe,xe;for(xe=0;xe=0)&&(ee[pe]=oe[pe]);return ee}function d(oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(ee){return typeof ee}:d=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},d(oe)}function p(oe){return b(oe)||x(oe)||O(oe)||v()}function v(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(oe){if(typeof Symbol<"u"&&oe[Symbol.iterator]!=null||oe["@@iterator"]!=null)return Array.from(oe)}function b(oe){if(Array.isArray(oe))return U(oe)}function y(oe,P){var ee=Object.keys(oe);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(oe);P&&(le=le.filter(function(pe){return Object.getOwnPropertyDescriptor(oe,pe).enumerable})),ee.push.apply(ee,le)}return ee}function _(oe){for(var P=1;Poe.length)&&(P=oe.length);for(var ee=0,le=new Array(P);ee"u"||typeof document>"u")&&!P._hasLoadedGA){var pe=document.createElement("script");pe.async=!0,pe.src="https://www.googletagmanager.com/gtag/js?id=".concat(ee),le&&pe.setAttribute("nonce",le),document.body.appendChild(pe),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},P._hasLoadedGA=!0}}),G(this,"_toGtagOptions",function(ee){if(!!ee){var le={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},pe=Object.entries(ee).reduce(function(xe,J){var ft=k(J,2),Le=ft[0],He=ft[1];return le[Le]?xe[le[Le]]=He:xe[Le]=He,xe},{});return pe}}),G(this,"initialize",function(ee){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ee)throw new Error("Require GA_MEASUREMENT_ID");var pe=typeof ee=="string"?[{trackingId:ee}]:ee;P._currentMeasurementId=pe[0].trackingId;var xe=le.gaOptions,J=le.gtagOptions,ft=le.legacyDimensionMetric,Le=ft===void 0?!0:ft,He=le.nonce,nr=le.testMode,Bt=nr===void 0?!1:nr;if(P._testMode=Bt,Bt||P._loadGA(P._currentMeasurementId,He),P.isInitialized||(P._gtag("js",new Date),pe.forEach(function(vr){var At=P._appendCustomMap(_(_(_({send_page_view:!1},P._toGtagOptions(_(_({},xe),vr.gaOptions))),J),vr.gtagOptions),Le);P._gtag("config",vr.trackingId,At)})),P.isInitialized=!0,!Bt){var Rt=p(P._queueGtag);for(P._queueGtag=[],P._isQueuing=!1;Rt.length;){var Jt=Rt.shift();P._gtag.apply(P,p(Jt)),Jt[0]==="get"&&(P._isQueuing=!0)}}}),G(this,"set",function(ee){if(!ee){console.warn("`fieldsObject` is required in .set()");return}if(d(ee)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(ee).length===0&&console.warn("empty `fieldsObject` given to .set()"),P._gaCommand("set",ee)}),G(this,"_gaCommandSendEvent",function(ee,le,pe,xe,J){P._gtag("event",le,_(_({event_category:ee,event_label:pe,value:xe},J&&{non_interaction:J.nonInteraction}),P._toGtagOptions(J)))}),G(this,"_gaCommandSendEventParameters",function(){for(var ee=arguments.length,le=new Array(ee),pe=0;pe1?le-1:0),xe=1;xe1&&arguments[1]!==void 0?arguments[1]:!0;if(!le)return ee;ee.custom_map||(ee.custom_map={});for(var pe=1;pe<=200;pe++)ee.custom_map["dimension".concat(pe)]||(ee.custom_map["dimension".concat(pe)]="dimension".concat(pe)),ee.custom_map["metric".concat(pe)]||(ee.custom_map["metric".concat(pe)]="metric".concat(pe));return ee}},{key:"outboundLink",value:function(ee,le){var pe=ee.label;if(typeof le!="function"){console.warn("hitCallback function is required");return}if(!pe){console.warn("args.label is required in outboundLink()");return}var xe={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:(0,r.default)(pe)},J=!1,ft=function(){J=!0,le()},Le=setTimeout(ft,250),He=function(){clearTimeout(Le),J||le()};xe.hitCallback=He,this._gaCommand("send",xe)}}]),oe}();e.GA4=ae;var V=new ae;e.default=V})(YN);(function(e){function t(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(c){return typeof c}:t=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var r=o(YN);function i(l){if(typeof WeakMap!="function")return null;var u=new WeakMap,c=new WeakMap;return(i=function(p){return p?c:u})(l)}function o(l,u){if(!u&&l&&l.__esModule)return l;if(l===null||t(l)!=="object"&&typeof l!="function")return{default:l};var c=i(u);if(c&&c.has(l))return c.get(l);var d={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in l)if(v!=="default"&&Object.prototype.hasOwnProperty.call(l,v)){var x=p?Object.getOwnPropertyDescriptor(l,v):null;x&&(x.get||x.set)?Object.defineProperty(d,v,x):d[v]=l[v]}return d.default=l,c&&c.set(l,d),d}var a=r.GA4;e.ReactGAImplementation=a;var s=r.default;e.default=s})(GN);const Ab=Kb(GN);var ha=(e=>(e.ADD_FILE="ADD_FILE",e.CONNECT_WALLET_POPUP="CONNECT_WALLET_POPUP",e.WALLET_CONNECTED="WALLET_CONNECTED",e.SELECT_WALLET="SELECT_WALLET",e.COMPILE_SUBMIT="COMPILE_SUBMIT",e.COMPILE_SERVER_ERROR="COMPILE_SERVER_ERROR",e.SIGN_SERVER_ERROR="SIGN_SERVER_ERROR",e.SIGN_SERVER_SUCCESS="SIGN_SERVER_SUCCESS",e.COMPILE_HASHES_NOT_SIMILAR="COMPILE_HASHES_NOT_SIMILAR",e.COMPILE_COMPILATION_ERROR="COMPILE_COMPILATION_ERROR",e.COMPILE_SUCCESS_HASHES_MATCH="COMPILE_SUCCESS_HASHES_MATCH",e.PUBLISH_CLICK="PUBLISH_CLICK",e.TRANSACTION_ISSUED="TRANSACTION_ISSUED",e.TRANSACTION_REJECTED="TRANSACTION_REJECTED",e.TRANSACTION_ERROR="TRANSACTION_ERROR",e.TRANSACTION_EXPIRED="TRANSACTION_EXPIRED",e.CONTRACT_DEPLOYED="CONTRACT_DEPLOYED",e.IN_BROWSER_COMPILE_ERROR="IN_BROWSER_COMPILE_ERROR",e.IN_BROWSER_COMPILE_START="IN_BROWSER_COMPILE_START",e.IN_BROWSER_COMPILE_SUCCESS="IN_BROWSER_COMPILE_SUCCESS",e.GETTER_PARSE_START="GETTER_PARSE_START",e.RUN_GETTER="RUN_GETTER",e))(ha||{});const wa=(e,t="")=>{if(!!Ab.isInitialized)try{Ab.event({category:"VERIFIER",action:e,label:t})}catch(r){console.log(r)}},M1e=()=>{try{Ab.initialize("G-2TB9KYGCFR"),Ab.send(window.location.pathname+window.location.search)}catch{}};let Tb=["fc","func","pkg"];({}).VITE_ALLOW_FIFT&&Tb.push("fift");const zu=_g($x((e,t)=>({files:[],hasFiles:()=>t().files.length>0,addFiles:async r=>{const i=await Promise.all(r.map(async o=>{const a=await o.text(),s=o.path?.split("/").filter(l=>l)??[];return{fileObj:o,includeInCommand:!0,folder:s.slice(0,s.length-1).join("/"),hasIncludeDirectives:a.includes("#include"),isEntrypoint:/\(\)\s*(recv_internal|main)\s*\(/.test(a),isStdlib:/stdlib.(fc|func)/i.test(o.name)}}));e(o=>{const a=i.filter(s=>s.fileObj.name.match(new RegExp(`.*.(${Tb.join("|")})$`))&&!o.files.find(l=>l.fileObj.name===s.fileObj.name));a&&(wa(ha.ADD_FILE),o.files.push(...a))})},setInclueInCommand:(r,i)=>{e(o=>{o.files.find(a=>a.fileObj.name===r).includeInCommand=i})},setDirectory:(r,i)=>{e(o=>{o.files.find(a=>a.fileObj.name===r).folder=i})},removeFile:r=>{e(i=>{i.files=i.files.filter(o=>o.fileObj.name!==r)})},reorderFiles:(r,i)=>{e(o=>{const a=o.files,s=a.findIndex(c=>c.fileObj.name===r),l=a.findIndex(c=>c.fileObj.name===i),[u]=a.splice(s,1);a.splice(l,0,u)})},reset:()=>{e(r=>{r.files=[]})}}))),O1e="https://raw.githubusercontent.com/ton-community/contract-verifier-config/main/config.json";function uE(){const[e,t]=X.exports.useState(!0);return bc(["remoteConfig"],async()=>{const{funcVersions:r,tactVersions:i}=await(await fetch(O1e)).json();return t(!1),{funcVersions:r,tactVersions:i}},{enabled:e,initialData:{funcVersions:[],tactVersions:[]}})}const B1e=_g($x((e,t)=>({compiler:"func",compilerSettings:{funcVersion:"",commandLine:""},_defaultFuncVersion:"",initialize:r=>{e(i=>{i._defaultFuncVersion=r,i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}})},setCompilerSettings:r=>{e(i=>{i.compilerSettings=r})},setOverrideCommandLine:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.overrideCommandLine=r})},setFuncCliVersion:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.funcVersion=r})},setTactCliVersion:r=>{e(i=>{if(i.compiler!=="tact")throw new Error("not tact compiler");i.compilerSettings={tactVersion:r}})},setCompiler:r=>{e(i=>{i.compiler=r,r==="func"?i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}:r==="tact"&&(i.compilerSettings={tactVersion:""})})}})));function cE(){const{files:e,setInclueInCommand:t}=zu(),r=B1e(),{data:{tactVersions:i}}=uE();function o(){const s=e.filter(l=>l.includeInCommand).map(l=>(l.folder?l.folder+"/":"")+l.fileObj.name).join(" ");return e?`-SPA ${s}`:""}X.exports.useEffect(()=>{const s=e.find(l=>l.fileObj.name.endsWith(".pkg"));(async()=>{if(!s)return;const l=await s.fileObj.text(),u=JSON.parse(l);if(r.setCompiler("tact"),!i.includes(u.compiler.version))throw new Error("Unsupported tact version "+u.compiler.version);r.setCompilerSettings({tactVersion:u.compiler.version})})()},[e]);const a={};return r.compiler==="func"&&(a.commandLine=r.compilerSettings.overrideCommandLine??o()),{...r,compilerSettings:{...r.compilerSettings,...a}}}const U1e=(e,t,r)=>{const i=()=>{o.invalidateQueries(["CustomMutation",e]),o.invalidateQueries(["CustomMutationError",e])},o=hw(),a=bc(["CustomMutation",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),s=bc(["CustomMutationError",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),l=hU(e,async(...c)=>(i(),o.setQueryData(["CustomMutationError",e],!1),await t(...c)),{...r,onSuccess:(c,d,p)=>{o.setQueryData(["CustomMutation",e],c),r?.onSuccess&&r.onSuccess(c,d,p)},onError:(c,d,p)=>{o.setQueryData(["CustomMutationError",e],c),r?.onError&&r.onError(c,d,p)}}),u=Hq(e);return{...l,data:a.data,isLoading:!!u,error:s.data,isError:!!s.data,invalidate:i}};var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0});function D1e(e){{const t=Buffer.from(e);t.reverse();const r=t.toString("hex");return r.length===0?BigInt(0):BigInt(`0x${r}`)}}Uy.toBigIntLE=D1e;function L1e(e){{const t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}}var Ib=Uy.toBigIntBE=L1e;function N1e(e,t){{const r=e.toString(16),i=Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex");return i.reverse(),i}}Uy.toBufferLE=N1e;function j1e(e,t){{const r=e.toString(16);return Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex")}}var XN=Uy.toBufferBE=j1e;function $1e(e){let t=XN(e,4);return[t[0].toString(),t[1].toString(),t[2].toString(),t[3].toString()].join(".")}function F1e(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}class dE{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new dE(t)}async sendInternalMessage(t,r,i,o){await t.internal(r,{value:o,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i){await t.internal(r,{value:i,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:fo.beginCell().endCell()})}async getVerifier(t,r){let i=await t.get("get_verifier",[{type:"int",value:r}]);const o=i.stack.readCell(),a=i.stack.readCellOpt();return i.stack.readNumber()==0?{admin:null,settings:null}:{admin:o.beginParse().loadAddress(),settings:a}}async getVerifiersNum(t){return(await t.get("get_verifiers_num",[])).stack.readNumber()}async getVerifiers(t){const a=(await t.get("get_verifiers",[])).stack.readCell().beginParse().loadDict(fo.Dictionary.Keys.BigUint(256),F1e());return Array.from(a.values()).map(s=>{const l=s.loadAddress(),u=s.loadUint(8),c=s.loadDict(fo.Dictionary.Keys.BigUint(256),fo.Dictionary.Values.BigUint(32));return{admin:l,quorum:u,pubKeyEndpoints:Object.fromEntries(Array.from(c).map(([d,p])=>[XN(d,32).toString("base64"),$1e(p)])),name:s.loadRef().beginParse().loadStringTail(),url:s.loadRef().beginParse().loadStringTail()}})}}const z1e=e=>{const t=new Xk.Sha256;return t.update(e),Buffer.from(t.digestSync())};class Fx{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new Fx(t)}async sendInternalMessage(t,r,i,o){await t.internal(r,{value:o,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i,o=!0){await t.internal(r,{value:i,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:fo.beginCell().endCell(),bounce:o})}async getChildAddressFromChain(t,r,i){return(await t.get("get_source_item_address",[{type:"int",value:Ib(z1e(r))},{type:"int",value:Ib(Buffer.from(i,"base64"))}])).stack.readCell().beginParse().loadAddress()}async getVerifierRegistryAddress(t){return(await t.get("get_verifier_registry_address",[])).stack.readCell().beginParse().loadAddress()}async getAdminAddress(t){return(await t.get("get_admin_address",[])).stack.readCell().beginParse().loadMaybeAddress()}async getCodeOpt(t){const r=await t.getState();return r.state.type!="active"?null:r.state.code}async getDeploymentCosts(t){const r=await t.get("get_deployment_costs",[]),i=r.stack.readBigNumber(),o=r.stack.readBigNumber();return{min:fo.fromNano(i),max:fo.fromNano(o)}}}async function JN(e,t){return(await t.open(Fx.createFromAddress(e)).getAdminAddress())?.toString()}function Dy(){const e=Vn.Address.parse(window.sourcesRegistryAddress);return bc(["sourcesRegistry",e],async()=>{const t=await yp(),r=await JN(e,t),i=t.open(Fx.createFromAddress(e)),o=(await i.getVerifierRegistryAddress()).toString(),a=await i.getDeploymentCosts(),s=Vn.Cell.fromBoc((await t.getContractState(e)).code)[0].hash().toString("base64");return{admin:r,verifierRegistry:o,codeCellHash:s,address:e,deploymentCosts:a}})}function zx(){const{data:e}=Dy();return bc(["verifierRegistry",e?.verifierRegistry],async()=>await(await yp()).open(dE.createFromAddress(Vn.Address.parse(e.verifierRegistry))).getVerifiers())}function ej(e){return e[Math.floor(Math.random()*e.length)]}function H1e(e){return new Blob([JSON.stringify(e)],{type:"application/json"})}const m1=window.isTestnet?"https://ton-source-prod-testnet-1.herokuapp.com".split(","):"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com".split(","),W1e=Py(e=>({status:null,setStatus:t=>e({status:t}),clear:()=>e({status:null})}));function Hu(){const{contractAddress:e}=$u(),{data:t}=vp(),{hasFiles:r,files:i}=zu(),{compiler:o,compilerSettings:a}=cE(),s=Bx(),{clear:l,setStatus:u,status:c}=W1e(),{data:d}=zx(),p=d?.find(x=>x.name===window.verifierId);return{...U1e(["submitSources"],async()=>{if(!e||!t?.codeCellHash.base64||!r()||!p)return;if(!s)throw new Error("Wallet is not connected");l();const x=p.quorum;let b=x,y;wa(ha.COMPILE_SUBMIT);const _=new FormData;for(const j of i)_.append((j.folder?j.folder+"/":"")+j.fileObj.name,j.fileObj);_.append("json",H1e({compiler:o,compilerSettings:a,knownContractAddress:e,knownContractHash:t.codeCellHash.base64,sources:i.map(j=>({includeInCommand:j.includeInCommand,isEntrypoint:j.isEntrypoint,isStdLib:j.isStdlib,hasIncludeDirectives:j.hasIncludeDirectives,folder:j.folder})),senderAddress:s}));const k=m1[Math.floor(Math.random()*m1.length)],E=await fetch(`${k}/source`,{method:"POST",body:_});if(E.status!==200)throw wa(ha.COMPILE_SERVER_ERROR),new Error(`Error compiling on ${k} ${await E.text()}`);const O=await E.json(),U=[];["unknown_error","compile_error"].includes(O.compileResult.result)&&(wa(ha.COMPILE_COMPILATION_ERROR),i.some(j=>j.isStdlib)?i[0].isStdlib||U.push(Na.STDLIB_ORDER):Na.STDLIB_MISSING,i.some(j=>j.isEntrypoint)||U.push(Na.ENTRYPOINT_MISSING),U.push(Na.COMPILER_VERSION),U.push(Na.REQUIRED_FILES),U.push(Na.FILE_ORDER)),O.compileResult.result==="not_similar"&&(wa(ha.COMPILE_HASHES_NOT_SIMILAR),U.push(Na.NOT_SIMILAR)),O.compileResult.result!=="similar"&&U.push(Na.SUPPORT_GROUP),O.compileResult.result==="similar"&&wa(ha.COMPILE_SUCCESS_HASHES_MATCH);let D;if(O.msgCell){b--;const j=new Set([k]);for(y=O.msgCell;b;){u(`Compile successful. Collected ${x-b}/${x}`);const H=ej(m1.filter(ae=>!j.has(ae)));if(!H)throw new Error("Not enough backends to collect signatures");console.log("Backends used: "+[...j],"; next backend",H);const W=await fetch(`${H}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messageCell:y})});if(W.status!==200)throw wa(ha.SIGN_SERVER_ERROR),new Error(`Error collecting signatures from ${H} ${await W.text()}`);wa(ha.SIGN_SERVER_SUCCESS),y=(await W.json()).msgCell,b--}u(`Compile successful. Collected ${x-b}/${x}`),D=Vn.Cell.fromBoc(Buffer.from(O.msgCell))[0].beginParse().loadUint(64)}return{result:{...O,msgCell:y},hints:U,queryId:D,status:c}}),compileStatus:c}}var Na=(e=>(e[e.STDLIB_ORDER=0]="STDLIB_ORDER",e[e.STDLIB_MISSING=1]="STDLIB_MISSING",e[e.NOT_SIMILAR=2]="NOT_SIMILAR",e[e.COMPILER_VERSION=3]="COMPILER_VERSION",e[e.REQUIRED_FILES=4]="REQUIRED_FILES",e[e.FILE_ORDER=5]="FILE_ORDER",e[e.ENTRYPOINT_MISSING=6]="ENTRYPOINT_MISSING",e[e.SUPPORT_GROUP=7]="SUPPORT_GROUP",e))(Na||{});const fE=()=>{const[e]=kg();return async(t,r,i,o)=>{try{let a;if(o){const l=Vn.beginCell();Vn.storeStateInit(o)(l),a=l.asCell()}const s={validUntil:Date.now()+5*60*1e3,messages:[{address:t,amount:r.toString(),stateInit:a?a.toBoc().toString("base64"):void 0,payload:i?.toBoc().toString("base64")}]};return await e.sendTransaction(s),"issued"}catch(a){return console.error(a),"rejected"}}},V1e=Py((e,t)=>({txns:{},updateTxn:(r,i)=>{e(o=>({txns:{...t().txns,[r]:i}}))}}));function tj(e,t){const r=fE(),{updateTxn:i,txns:o}=V1e();return X.exports.useEffect(()=>{o[e]||i(e,"initial")},[]),{sendTXN:async(a,s,l,u)=>{i(e,"pending");const c=await r(a.toString(),s,l,u);let d=1;if(c==="issued"){i(e,"issued");const p=setInterval(async()=>{const v=await t(d);d++,i(e,v),v!=="issued"&&clearInterval(p)},2e3)}else c==="rejected"&&i(e,"rejected")},data:{status:o[e]},clearTXN:()=>{i(e,"initial")}}}function rj(){const{data:e}=Hu(),{data:t}=vp(),{data:r}=Dy(),{sendTXN:i,data:o,clearTXN:a}=tj("publishProof",async s=>{const l=await pE(t.codeCellHash.base64);return s>20?"error":l?"success":"issued"});return X.exports.useEffect(()=>{switch(o.status){case"pending":wa(ha.PUBLISH_CLICK);break;case"issued":wa(ha.TRANSACTION_ISSUED);break;case"rejected":wa(ha.TRANSACTION_REJECTED);break;case"error":wa(ha.TRANSACTION_ERROR);break;case"expired":wa(ha.TRANSACTION_EXPIRED);break;case"success":wa(ha.CONTRACT_DEPLOYED);break}},[o.status]),{sendTXN:()=>{i(Vn.Address.parse(r.verifierRegistry),Vn.toNano("0.5"),Vn.Cell.fromBoc(Buffer.from(e.result.msgCell))[0])},status:o.status,clearTXN:a}}const q1e=e=>{const t=new Xk.Sha256;return t.update(e),Buffer.from(t.digestSync())};async function pE(e){return ContractVerifier.getSourcesJsonUrl(e,{verifier:window.verifierId,testnet:window.isTestnet})}function Pc(){const{contractAddress:e}=$u(),{data:t,error:r}=vp(),{status:i}=rj(),{isLoading:o,error:a,data:s,refetch:l}=bc([e,"proof"],async()=>{if(!e)return{hasOnchainProof:!1};const u=await pE(t.codeCellHash.base64);return u?{hasOnchainProof:!0,...await ContractVerifier.getSourcesData(u,{testnet:window.isTestnet})}:{hasOnchainProof:!1,ipfsLink:u}},{enabled:!!e&&!!t?.codeCellHash.base64&&i==="initial",retry:2});return{isLoading:o,error:a??r,data:s,refetch:l}}function K1e(){const{data:e}=Pc();return X.exports.useEffect(()=>{!e?.files||ContractVerifierUI.loadSourcesData(e,{containerSelector:"#myVerifierContainer",fileListSelector:"#myVerifierFiles",contentSelector:"#myVerifierContent",theme:"light"})},[e?.files]),{hasOnchainProof:e?.hasOnchainProof}}function G1e({button:e}){return K1e(),Ut("div",{id:"myVerifierContainer",style:{color:"black"},children:[L("div",{id:"myVerifierFiles"}),Ut("div",{style:{position:"relative",overflow:"hidden",width:"100%"},children:[L("div",{id:"myVerifierContent"}),L("div",{style:{position:"absolute",top:-73,right:-24,zIndex:3},children:e})]})]})}var hE={exports:{}};function gE(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r=="object"&&!Object.isFrozen(r)&&gE(r)}),e}hE.exports=gE;hE.exports.default=gE;class sM{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function nj(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function rd(e,...t){const r=Object.create(null);for(const i in e)r[i]=e[i];return t.forEach(function(i){for(const o in i)r[o]=i[o]}),r}const Y1e="
    ",lM=e=>!!e.scope||e.sublanguage&&e.language,Z1e=(e,{prefix:t})=>{if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((i,o)=>`${i}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`};class Q1e{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=nj(t)}openNode(t){if(!lM(t))return;let r="";t.sublanguage?r=`language-${t.language}`:r=Z1e(t.scope,{prefix:this.classPrefix}),this.span(r)}closeNode(t){!lM(t)||(this.buffer+=Y1e)}value(){return this.buffer}span(t){this.buffer+=``}}const uM=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class mE{constructor(){this.rootNode=uM(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=uM({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(i=>this._walk(t,i)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{mE._collapse(r)})))}}class X1e extends mE{constructor(t){super(),this.options=t}addKeyword(t,r){t!==""&&(this.openNode(r),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,r){const i=t.root;i.sublanguage=!0,i.language=r,this.add(i)}toHTML(){return new Q1e(this,this.options).value()}finalize(){return!0}}function X0(e){return e?typeof e=="string"?e:e.source:null}function ij(e){return bp("(?=",e,")")}function J1e(e){return bp("(?:",e,")*")}function ebe(e){return bp("(?:",e,")?")}function bp(...e){return e.map(r=>X0(r)).join("")}function tbe(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function yE(...e){return"("+(tbe(e).capture?"":"?:")+e.map(i=>X0(i)).join("|")+")"}function oj(e){return new RegExp(e.toString()+"|").exec("").length-1}function rbe(e,t){const r=e&&e.exec(t);return r&&r.index===0}const nbe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function vE(e,{joinWith:t}){let r=0;return e.map(i=>{r+=1;const o=r;let a=X0(i),s="";for(;a.length>0;){const l=nbe.exec(a);if(!l){s+=a;break}s+=a.substring(0,l.index),a=a.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&r++)}return s}).map(i=>`(${i})`).join(t)}const ibe=/\b\B/,aj="[a-zA-Z]\\w*",bE="[a-zA-Z_]\\w*",sj="\\b\\d+(\\.\\d+)?",lj="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",uj="\\b(0b[01]+)",obe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",abe=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=bp(t,/.*\b/,e.binary,/\b.*/)),rd({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,i)=>{r.index!==0&&i.ignoreMatch()}},e)},J0={begin:"\\\\[\\s\\S]",relevance:0},sbe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[J0]},lbe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[J0]},ube={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Hx=function(e,t,r={}){const i=rd({scope:"comment",begin:e,end:t,contains:[]},r);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=yE("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:bp(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},cbe=Hx("//","$"),dbe=Hx("/\\*","\\*/"),fbe=Hx("#","$"),pbe={scope:"number",begin:sj,relevance:0},hbe={scope:"number",begin:lj,relevance:0},gbe={scope:"number",begin:uj,relevance:0},mbe={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[J0,{begin:/\[/,end:/\]/,relevance:0,contains:[J0]}]}]},ybe={scope:"title",begin:aj,relevance:0},vbe={scope:"title",begin:bE,relevance:0},bbe={begin:"\\.\\s*"+bE,relevance:0},wbe=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var jv=Object.freeze({__proto__:null,MATCH_NOTHING_RE:ibe,IDENT_RE:aj,UNDERSCORE_IDENT_RE:bE,NUMBER_RE:sj,C_NUMBER_RE:lj,BINARY_NUMBER_RE:uj,RE_STARTERS_RE:obe,SHEBANG:abe,BACKSLASH_ESCAPE:J0,APOS_STRING_MODE:sbe,QUOTE_STRING_MODE:lbe,PHRASAL_WORDS_MODE:ube,COMMENT:Hx,C_LINE_COMMENT_MODE:cbe,C_BLOCK_COMMENT_MODE:dbe,HASH_COMMENT_MODE:fbe,NUMBER_MODE:pbe,C_NUMBER_MODE:hbe,BINARY_NUMBER_MODE:gbe,REGEXP_MODE:mbe,TITLE_MODE:ybe,UNDERSCORE_TITLE_MODE:vbe,METHOD_GUARD:bbe,END_SAME_AS_BEGIN:wbe});function xbe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function _be(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Sbe(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xbe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Cbe(e,t){!Array.isArray(e.illegal)||(e.illegal=yE(...e.illegal))}function kbe(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Ebe(e,t){e.relevance===void 0&&(e.relevance=1)}const Abe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=r.keywords,e.begin=bp(r.beforeMatch,ij(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},Tbe=["of","and","for","in","not","or","if","then","parent","list","value"],Ibe="keyword";function cj(e,t,r=Ibe){const i=Object.create(null);return typeof e=="string"?o(r,e.split(" ")):Array.isArray(e)?o(r,e):Object.keys(e).forEach(function(a){Object.assign(i,cj(e[a],t,a))}),i;function o(a,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const u=l.split("|");i[u[0]]=[a,Rbe(u[0],u[1])]})}}function Rbe(e,t){return t?Number(t):Pbe(e)?0:1}function Pbe(e){return Tbe.includes(e.toLowerCase())}const cM={},Af=e=>{console.error(e)},dM=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jp=(e,t)=>{cM[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),cM[`${e}/${t}`]=!0)},Rb=new Error;function dj(e,t,{key:r}){let i=0;const o=e[r],a={},s={};for(let l=1;l<=t.length;l++)s[l+i]=o[l],a[l+i]=!0,i+=oj(t[l-1]);e[r]=s,e[r]._emit=a,e[r]._multi=!0}function Mbe(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Af("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Rb;if(typeof e.beginScope!="object"||e.beginScope===null)throw Af("beginScope must be object"),Rb;dj(e,e.begin,{key:"beginScope"}),e.begin=vE(e.begin,{joinWith:""})}}function Obe(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Af("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Rb;if(typeof e.endScope!="object"||e.endScope===null)throw Af("endScope must be object"),Rb;dj(e,e.end,{key:"endScope"}),e.end=vE(e.end,{joinWith:""})}}function Bbe(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ube(e){Bbe(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Mbe(e),Obe(e)}function Dbe(e){function t(s,l){return new RegExp(X0(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=oj(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=t(vE(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((p,v)=>v>0&&p!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new r;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function o(s){const l=new i;return s.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function a(s,l){const u=s;if(s.isCompiled)return u;[_be,kbe,Ube,Abe].forEach(d=>d(s,l)),e.compilerExtensions.forEach(d=>d(s,l)),s.__beforeBegin=null,[Sbe,Cbe,Ebe].forEach(d=>d(s,l)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=cj(s.keywords,e.case_insensitive)),u.keywordPatternRe=t(c,!0),l&&(s.begin||(s.begin=/\B|\b/),u.beginRe=t(u.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(u.endRe=t(u.end)),u.terminatorEnd=X0(u.end)||"",s.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(u.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(d){return Lbe(d==="self"?s:d)})),s.contains.forEach(function(d){a(d,u)}),s.starts&&a(s.starts,l),u.matcher=o(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=rd(e.classNameAliases||{}),a(e)}function fj(e){return e?e.endsWithParent||fj(e.starts):!1}function Lbe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return rd(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:fj(e)?rd(e,{starts:e.starts?rd(e.starts):null}):Object.isFrozen(e)?rd(e):e}var Nbe="11.6.0";class jbe extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const q5=nj,fM=rd,pM=Symbol("nomatch"),$be=7,Fbe=function(e){const t=Object.create(null),r=Object.create(null),i=[];let o=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:X1e};function u(le){return l.noHighlightRe.test(le)}function c(le){let pe=le.className+" ";pe+=le.parentNode?le.parentNode.className:"";const xe=l.languageDetectRe.exec(pe);if(xe){const J=W(xe[1]);return J||(dM(a.replace("{}",xe[1])),dM("Falling back to no-highlight mode for this block.",le)),J?xe[1]:"no-highlight"}return pe.split(/\s+/).find(J=>u(J)||W(J))}function d(le,pe,xe){let J="",ft="";typeof pe=="object"?(J=le,xe=pe.ignoreIllegals,ft=pe.language):(jp("10.7.0","highlight(lang, code, ...args) has been deprecated."),jp("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),ft=le,J=pe),xe===void 0&&(xe=!0);const Le={code:J,language:ft};P("before:highlight",Le);const He=Le.result?Le.result:p(Le.language,Le.code,xe);return He.code=Le.code,P("after:highlight",He),He}function p(le,pe,xe,J){const ft=Object.create(null);function Le(ie,de){return ie.keywords[de]}function He(){if(!Ie.keywords){fe.addText(Be);return}let ie=0;Ie.keywordPatternRe.lastIndex=0;let de=Ie.keywordPatternRe.exec(Be),$="";for(;de;){$+=Be.substring(ie,de.index);const C=ne.case_insensitive?de[0].toLowerCase():de[0],T=Le(Ie,C);if(T){const[Z,ve]=T;if(fe.addText($),$="",ft[C]=(ft[C]||0)+1,ft[C]<=$be&&(rt+=ve),Z.startsWith("_"))$+=de[0];else{const je=ne.classNameAliases[Z]||Z;fe.addKeyword(de[0],je)}}else $+=de[0];ie=Ie.keywordPatternRe.lastIndex,de=Ie.keywordPatternRe.exec(Be)}$+=Be.substring(ie),fe.addText($)}function nr(){if(Be==="")return;let ie=null;if(typeof Ie.subLanguage=="string"){if(!t[Ie.subLanguage]){fe.addText(Be);return}ie=p(Ie.subLanguage,Be,!0,Ae[Ie.subLanguage]),Ae[Ie.subLanguage]=ie._top}else ie=x(Be,Ie.subLanguage.length?Ie.subLanguage:null);Ie.relevance>0&&(rt+=ie.relevance),fe.addSublanguage(ie._emitter,ie.language)}function Bt(){Ie.subLanguage!=null?nr():He(),Be=""}function Rt(ie,de){let $=1;const C=de.length-1;for(;$<=C;){if(!ie._emit[$]){$++;continue}const T=ne.classNameAliases[ie[$]]||ie[$],Z=de[$];T?fe.addKeyword(Z,T):(Be=Z,He(),Be=""),$++}}function Jt(ie,de){return ie.scope&&typeof ie.scope=="string"&&fe.openNode(ne.classNameAliases[ie.scope]||ie.scope),ie.beginScope&&(ie.beginScope._wrap?(fe.addKeyword(Be,ne.classNameAliases[ie.beginScope._wrap]||ie.beginScope._wrap),Be=""):ie.beginScope._multi&&(Rt(ie.beginScope,de),Be="")),Ie=Object.create(ie,{parent:{value:Ie}}),Ie}function vr(ie,de,$){let C=rbe(ie.endRe,$);if(C){if(ie["on:end"]){const T=new sM(ie);ie["on:end"](de,T),T.isMatchIgnored&&(C=!1)}if(C){for(;ie.endsParent&&ie.parent;)ie=ie.parent;return ie}}if(ie.endsWithParent)return vr(ie.parent,de,$)}function At(ie){return Ie.matcher.regexIndex===0?(Be+=ie[0],1):(ce=!0,0)}function kt(ie){const de=ie[0],$=ie.rule,C=new sM($),T=[$.__beforeBegin,$["on:begin"]];for(const Z of T)if(!!Z&&(Z(ie,C),C.isMatchIgnored))return At(de);return $.skip?Be+=de:($.excludeBegin&&(Be+=de),Bt(),!$.returnBegin&&!$.excludeBegin&&(Be=de)),Jt($,ie),$.returnBegin?0:de.length}function Ct(ie){const de=ie[0],$=pe.substring(ie.index),C=vr(Ie,ie,$);if(!C)return pM;const T=Ie;Ie.endScope&&Ie.endScope._wrap?(Bt(),fe.addKeyword(de,Ie.endScope._wrap)):Ie.endScope&&Ie.endScope._multi?(Bt(),Rt(Ie.endScope,ie)):T.skip?Be+=de:(T.returnEnd||T.excludeEnd||(Be+=de),Bt(),T.excludeEnd&&(Be=de));do Ie.scope&&fe.closeNode(),!Ie.skip&&!Ie.subLanguage&&(rt+=Ie.relevance),Ie=Ie.parent;while(Ie!==C.parent);return C.starts&&Jt(C.starts,ie),T.returnEnd?0:de.length}function Lt(){const ie=[];for(let de=Ie;de!==ne;de=de.parent)de.scope&&ie.unshift(de.scope);ie.forEach(de=>fe.openNode(de))}let Kt={};function yr(ie,de){const $=de&&de[0];if(Be+=ie,$==null)return Bt(),0;if(Kt.type==="begin"&&de.type==="end"&&Kt.index===de.index&&$===""){if(Be+=pe.slice(de.index,de.index+1),!o){const C=new Error(`0 width match regex (${le})`);throw C.languageName=le,C.badRule=Kt.rule,C}return 1}if(Kt=de,de.type==="begin")return kt(de);if(de.type==="illegal"&&!xe){const C=new Error('Illegal lexeme "'+$+'" for mode "'+(Ie.scope||"")+'"');throw C.mode=Ie,C}else if(de.type==="end"){const C=Ct(de);if(C!==pM)return C}if(de.type==="illegal"&&$==="")return 1;if(jt>1e5&&jt>de.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Be+=$,$.length}const ne=W(le);if(!ne)throw Af(a.replace("{}",le)),new Error('Unknown language: "'+le+'"');const Mt=Dbe(ne);let Nt="",Ie=J||Mt;const Ae={},fe=new l.__emitter(l);Lt();let Be="",rt=0,lt=0,jt=0,ce=!1;try{for(Ie.matcher.considerAll();;){jt++,ce?ce=!1:Ie.matcher.considerAll(),Ie.matcher.lastIndex=lt;const ie=Ie.matcher.exec(pe);if(!ie)break;const de=pe.substring(lt,ie.index),$=yr(de,ie);lt=ie.index+$}return yr(pe.substring(lt)),fe.closeAllNodes(),fe.finalize(),Nt=fe.toHTML(),{language:le,value:Nt,relevance:rt,illegal:!1,_emitter:fe,_top:Ie}}catch(ie){if(ie.message&&ie.message.includes("Illegal"))return{language:le,value:q5(pe),illegal:!0,relevance:0,_illegalBy:{message:ie.message,index:lt,context:pe.slice(lt-100,lt+100),mode:ie.mode,resultSoFar:Nt},_emitter:fe};if(o)return{language:le,value:q5(pe),illegal:!1,relevance:0,errorRaised:ie,_emitter:fe,_top:Ie};throw ie}}function v(le){const pe={value:q5(le),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return pe._emitter.addText(le),pe}function x(le,pe){pe=pe||l.languages||Object.keys(t);const xe=v(le),J=pe.filter(W).filter(ae).map(Bt=>p(Bt,le,!1));J.unshift(xe);const ft=J.sort((Bt,Rt)=>{if(Bt.relevance!==Rt.relevance)return Rt.relevance-Bt.relevance;if(Bt.language&&Rt.language){if(W(Bt.language).supersetOf===Rt.language)return 1;if(W(Rt.language).supersetOf===Bt.language)return-1}return 0}),[Le,He]=ft,nr=Le;return nr.secondBest=He,nr}function b(le,pe,xe){const J=pe&&r[pe]||xe;le.classList.add("hljs"),le.classList.add(`language-${J}`)}function y(le){let pe=null;const xe=c(le);if(u(xe))return;if(P("before:highlightElement",{el:le,language:xe}),le.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(le)),l.throwUnescapedHTML))throw new jbe("One of your code blocks includes unescaped HTML.",le.innerHTML);pe=le;const J=pe.textContent,ft=xe?d(J,{language:xe,ignoreIllegals:!0}):x(J);le.innerHTML=ft.value,b(le,xe,ft.language),le.result={language:ft.language,re:ft.relevance,relevance:ft.relevance},ft.secondBest&&(le.secondBest={language:ft.secondBest.language,relevance:ft.secondBest.relevance}),P("after:highlightElement",{el:le,result:ft,text:J})}function _(le){l=fM(l,le)}const k=()=>{U(),jp("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function E(){U(),jp("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let O=!1;function U(){if(document.readyState==="loading"){O=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function D(){O&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",D,!1);function j(le,pe){let xe=null;try{xe=pe(e)}catch(J){if(Af("Language definition for '{}' could not be registered.".replace("{}",le)),o)Af(J);else throw J;xe=s}xe.name||(xe.name=le),t[le]=xe,xe.rawDefinition=pe.bind(null,e),xe.aliases&&G(xe.aliases,{languageName:le})}function F(le){delete t[le];for(const pe of Object.keys(r))r[pe]===le&&delete r[pe]}function H(){return Object.keys(t)}function W(le){return le=(le||"").toLowerCase(),t[le]||t[r[le]]}function G(le,{languageName:pe}){typeof le=="string"&&(le=[le]),le.forEach(xe=>{r[xe.toLowerCase()]=pe})}function ae(le){const pe=W(le);return pe&&!pe.disableAutodetect}function V(le){le["before:highlightBlock"]&&!le["before:highlightElement"]&&(le["before:highlightElement"]=pe=>{le["before:highlightBlock"](Object.assign({block:pe.el},pe))}),le["after:highlightBlock"]&&!le["after:highlightElement"]&&(le["after:highlightElement"]=pe=>{le["after:highlightBlock"](Object.assign({block:pe.el},pe))})}function oe(le){V(le),i.push(le)}function P(le,pe){const xe=le;i.forEach(function(J){J[xe]&&J[xe](pe)})}function ee(le){return jp("10.7.0","highlightBlock will be removed entirely in v12.0"),jp("10.7.0","Please use highlightElement now."),y(le)}Object.assign(e,{highlight:d,highlightAuto:x,highlightAll:U,highlightElement:y,highlightBlock:ee,configure:_,initHighlighting:k,initHighlightingOnLoad:E,registerLanguage:j,unregisterLanguage:F,listLanguages:H,getLanguage:W,registerAliases:G,autoDetection:ae,inherit:fM,addPlugin:oe}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Nbe,e.regex={concat:bp,lookahead:ij,either:yE,optional:ebe,anyNumberOfTimes:J1e};for(const le in jv)typeof jv[le]=="object"&&hE.exports(jv[le]);return Object.assign(e,jv),e};var ey=Fbe({}),zbe=ey;ey.HighlightJS=ey;ey.default=ey;const pj=zbe,hM='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',gM=/\"[^\n\"]+\"[Hhcusa]?/;let y4;try{y4=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,//,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,//,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1</,/0=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1</,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:e.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}const yM=/[a-zA-Z_][0-9a-zA-Z_]*/;function Vbe(e){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},{scope:"symbol",match:e.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function qbe(e){e.registerLanguage("fift",Wbe),e.registerLanguage("func",Hbe),e.registerLanguage("tlb",Vbe)}qbe(pj);function Kbe({button:e}){const{data:t}=vp(),r=la(),i=aa(r.breakpoints.down("lg")),o=X.exports.useRef(null);return X.exports.useEffect(()=>{pj.highlightElement(o.current)},[t?.decompiled,o.current]),Ut("pre",{style:{overflow:"auto",height:800,marginTop:0,lineHeight:"25px",fontSize:14,paddingTop:"0.5em",fontFamily:"monospace"},children:[Ut("code",{className:"language-fift",style:{background:"#fff",display:"flex"},children:[L("div",{style:{textAlign:"right",color:"#728a96",paddingLeft:i?0:20},children:t?.decompiled?.trim().split(` +`).map((a,s)=>s+1).join(` +`)}),L("div",{style:{background:"transparent",paddingLeft:20},ref:o,children:t?.decompiled})]}),e]})}const Gbe="/assets/verified-light.2c74da9f.svg",Ybe="/assets/download.62d50798.svg",Wx="/assets/copy.da496d78.svg";var hj={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(i,o,a){function s(c,d){if(!o[c]){if(!i[c]){var p=typeof $l=="function"&&$l;if(!d&&p)return p(c,!0);if(l)return l(c,!0);var v=new Error("Cannot find module '"+c+"'");throw v.code="MODULE_NOT_FOUND",v}var x=o[c]={exports:{}};i[c][0].call(x.exports,function(b){var y=i[c][1][b];return s(y||b)},x,x.exports,r,i,o,a)}return o[c].exports}for(var l=typeof $l=="function"&&$l,u=0;u>2,x=(3&c)<<4|d>>4,b=1>6:64,y=2>4,d=(15&v)<<4|(x=l.indexOf(u.charAt(y++)))>>2,p=(3&x)<<6|(b=l.indexOf(u.charAt(y++))),E[_++]=c,x!==64&&(E[_++]=d),b!==64&&(E[_++]=p);return E}},{"./support":30,"./utils":32}],2:[function(r,i,o){var a=r("./external"),s=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),u=r("./stream/DataLengthProbe");function c(d,p,v,x,b){this.compressedSize=d,this.uncompressedSize=p,this.crc32=v,this.compression=x,this.compressedContent=b}c.prototype={getContentWorker:function(){var d=new s(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),p=this;return d.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,p,v){return d.pipe(new l).pipe(new u("uncompressedSize")).pipe(p.compressWorker(v)).pipe(new u("compressedSize")).withStreamInfo("compression",p)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,i,o){var a=r("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},o.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,i,o){var a=r("./utils"),s=function(){for(var l,u=[],c=0;c<256;c++){l=c;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;u[c]=l}return u}();i.exports=function(l,u){return l!==void 0&&l.length?a.getTypeOf(l)!=="string"?function(c,d,p,v){var x=s,b=v+p;c^=-1;for(var y=v;y>>8^x[255&(c^d[y])];return-1^c}(0|u,l,l.length,0):function(c,d,p,v){var x=s,b=v+p;c^=-1;for(var y=v;y>>8^x[255&(c^d.charCodeAt(y))];return-1^c}(0|u,l,l.length,0):0}},{"./utils":32}],5:[function(r,i,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(r,i,o){var a=null;a=typeof Promise<"u"?Promise:r("lie"),i.exports={Promise:a}},{lie:37}],7:[function(r,i,o){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),l=r("./utils"),u=r("./stream/GenericWorker"),c=a?"uint8array":"array";function d(p,v){u.call(this,"FlateWorker/"+p),this._pako=null,this._pakoAction=p,this._pakoOptions=v,this.meta={}}o.magic="\b\0",l.inherits(d,u),d.prototype.processChunk=function(p){this.meta=p.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(c,p.data),!1)},d.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var p=this;this._pako.onData=function(v){p.push({data:v,meta:p.meta})}},o.compressWorker=function(p){return new d("Deflate",p)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,i,o){function a(x,b){var y,_="";for(y=0;y>>=8;return _}function s(x,b,y,_,k,E){var O,U,D=x.file,j=x.compression,F=E!==c.utf8encode,H=l.transformTo("string",E(D.name)),W=l.transformTo("string",c.utf8encode(D.name)),G=D.comment,ae=l.transformTo("string",E(G)),V=l.transformTo("string",c.utf8encode(G)),oe=W.length!==D.name.length,P=V.length!==G.length,ee="",le="",pe="",xe=D.dir,J=D.date,ft={crc32:0,compressedSize:0,uncompressedSize:0};b&&!y||(ft.crc32=x.crc32,ft.compressedSize=x.compressedSize,ft.uncompressedSize=x.uncompressedSize);var Le=0;b&&(Le|=8),F||!oe&&!P||(Le|=2048);var He=0,nr=0;xe&&(He|=16),k==="UNIX"?(nr=798,He|=function(Rt,Jt){var vr=Rt;return Rt||(vr=Jt?16893:33204),(65535&vr)<<16}(D.unixPermissions,xe)):(nr=20,He|=function(Rt){return 63&(Rt||0)}(D.dosPermissions)),O=J.getUTCHours(),O<<=6,O|=J.getUTCMinutes(),O<<=5,O|=J.getUTCSeconds()/2,U=J.getUTCFullYear()-1980,U<<=4,U|=J.getUTCMonth()+1,U<<=5,U|=J.getUTCDate(),oe&&(le=a(1,1)+a(d(H),4)+W,ee+="up"+a(le.length,2)+le),P&&(pe=a(1,1)+a(d(ae),4)+V,ee+="uc"+a(pe.length,2)+pe);var Bt="";return Bt+=` +\0`,Bt+=a(Le,2),Bt+=j.magic,Bt+=a(O,2),Bt+=a(U,2),Bt+=a(ft.crc32,4),Bt+=a(ft.compressedSize,4),Bt+=a(ft.uncompressedSize,4),Bt+=a(H.length,2),Bt+=a(ee.length,2),{fileRecord:p.LOCAL_FILE_HEADER+Bt+H+ee,dirRecord:p.CENTRAL_FILE_HEADER+a(nr,2)+Bt+a(ae.length,2)+"\0\0\0\0"+a(He,4)+a(_,4)+H+ee+ae}}var l=r("../utils"),u=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),p=r("../signature");function v(x,b,y,_){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=y,this.encodeFileName=_,this.streamFiles=x,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(v,u),v.prototype.push=function(x){var b=x.meta.percent||0,y=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(x):(this.bytesWritten+=x.data.length,u.prototype.push.call(this,{data:x.data,meta:{currentFile:this.currentFile,percent:y?(b+100*(y-_-1))/y:100}}))},v.prototype.openedSource=function(x){this.currentSourceOffset=this.bytesWritten,this.currentFile=x.file.name;var b=this.streamFiles&&!x.file.dir;if(b){var y=s(x,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(x){this.accumulate=!1;var b=this.streamFiles&&!x.file.dir,y=s(x,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),b)this.push({data:function(_){return p.DATA_DESCRIPTOR+a(_.crc32,4)+a(_.compressedSize,4)+a(_.uncompressedSize,4)}(x),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var x=this.bytesWritten,b=0;b=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=l,c},readString:function(l){return a.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},i.exports=s},{"../utils":32}],19:[function(r,i,o){var a=r("./Uint8ArrayReader");function s(l){a.call(this,l)}r("../utils").inherits(s,a),s.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,i,o){var a=r("./DataReader");function s(l){a.call(this,l)}r("../utils").inherits(s,a),s.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},s.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},s.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},s.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,i,o){var a=r("./ArrayReader");function s(l){a.call(this,l)}r("../utils").inherits(s,a),s.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,i,o){var a=r("../utils"),s=r("../support"),l=r("./ArrayReader"),u=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");i.exports=function(p){var v=a.getTypeOf(p);return a.checkSupport(v),v!=="string"||s.uint8array?v==="nodebuffer"?new c(p):s.uint8array?new d(a.transformTo("uint8array",p)):new l(a.transformTo("array",p)):new u(p)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,i,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,i,o){var a=r("./GenericWorker"),s=r("../utils");function l(u){a.call(this,"ConvertWorker to "+u),this.destType=u}s.inherits(l,a),l.prototype.processChunk=function(u){this.push({data:s.transformTo(this.destType,u.data),meta:u.meta})},i.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,i,o){var a=r("./GenericWorker"),s=r("../crc32");function l(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(l,a),l.prototype.processChunk=function(u){this.streamInfo.crc32=s(u.data,this.streamInfo.crc32||0),this.push(u)},i.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,i,o){var a=r("../utils"),s=r("./GenericWorker");function l(u){s.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}a.inherits(l,s),l.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}s.prototype.processChunk.call(this,u)},i.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,i,o){var a=r("../utils"),s=r("./GenericWorker");function l(u){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=a.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}a.inherits(l,s),l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,i,o){function a(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,l){return this._listeners[s].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,l){if(this._listeners[s])for(var u=0;u "+s:s}},i.exports=a},{}],29:[function(r,i,o){var a=r("../utils"),s=r("./ConvertWorker"),l=r("./GenericWorker"),u=r("../base64"),c=r("../support"),d=r("../external"),p=null;if(c.nodestream)try{p=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(b,y){return new d.Promise(function(_,k){var E=[],O=b._internalType,U=b._outputType,D=b._mimeType;b.on("data",function(j,F){E.push(j),y&&y(F)}).on("error",function(j){E=[],k(j)}).on("end",function(){try{var j=function(F,H,W){switch(F){case"blob":return a.newBlob(a.transformTo("arraybuffer",H),W);case"base64":return u.encode(H);default:return a.transformTo(F,H)}}(U,function(F,H){var W,G=0,ae=null,V=0;for(W=0;W"u")o.blob=!1;else{var a=new ArrayBuffer(0);try{o.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(a),o.blob=s.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(r,i,o){for(var a=r("./utils"),s=r("./support"),l=r("./nodejsUtils"),u=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function p(){u.call(this,"utf-8 decode"),this.leftOver=null}function v(){u.call(this,"utf-8 encode")}o.utf8encode=function(x){return s.nodebuffer?l.newBufferFrom(x,"utf-8"):function(b){var y,_,k,E,O,U=b.length,D=0;for(E=0;E>>6:(_<65536?y[O++]=224|_>>>12:(y[O++]=240|_>>>18,y[O++]=128|_>>>12&63),y[O++]=128|_>>>6&63),y[O++]=128|63&_);return y}(x)},o.utf8decode=function(x){return s.nodebuffer?a.transformTo("nodebuffer",x).toString("utf-8"):function(b){var y,_,k,E,O=b.length,U=new Array(2*O);for(y=_=0;y>10&1023,U[_++]=56320|1023&k)}return U.length!==_&&(U.subarray?U=U.subarray(0,_):U.length=_),a.applyFromCharCode(U)}(x=a.transformTo(s.uint8array?"uint8array":"array",x))},a.inherits(p,u),p.prototype.processChunk=function(x){var b=a.transformTo(s.uint8array?"uint8array":"array",x.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var y=b;(b=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),b.set(y,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var _=function(E,O){var U;for((O=O||E.length)>E.length&&(O=E.length),U=O-1;0<=U&&(192&E[U])==128;)U--;return U<0||U===0?O:U+c[E[U]]>O?U:O}(b),k=b;_!==b.length&&(s.uint8array?(k=b.subarray(0,_),this.leftOver=b.subarray(_,b.length)):(k=b.slice(0,_),this.leftOver=b.slice(_,b.length))),this.push({data:o.utf8decode(k),meta:x.meta})},p.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=p,a.inherits(v,u),v.prototype.processChunk=function(x){this.push({data:o.utf8encode(x.data),meta:x.meta})},o.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,i,o){var a=r("./support"),s=r("./base64"),l=r("./nodejsUtils"),u=r("./external");function c(y){return y}function d(y,_){for(var k=0;k>8;this.dir=!!(16&this.externalFileAttributes),x==0&&(this.dosPermissions=63&this.externalFileAttributes),x==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var x=a(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=x.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=x.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=x.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=x.readInt(4))}},readExtraFields:function(x){var b,y,_,k=x.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});x.index+4>>6:(x<65536?v[_++]=224|x>>>12:(v[_++]=240|x>>>18,v[_++]=128|x>>>12&63),v[_++]=128|x>>>6&63),v[_++]=128|63&x);return v},o.buf2binstring=function(p){return d(p,p.length)},o.binstring2buf=function(p){for(var v=new a.Buf8(p.length),x=0,b=v.length;x>10&1023,E[b++]=56320|1023&y)}return d(E,b)},o.utf8border=function(p,v){var x;for((v=v||p.length)>p.length&&(v=p.length),x=v-1;0<=x&&(192&p[x])==128;)x--;return x<0||x===0?v:x+u[p[x]]>v?x:v}},{"./common":41}],43:[function(r,i,o){i.exports=function(a,s,l,u){for(var c=65535&a|0,d=a>>>16&65535|0,p=0;l!==0;){for(l-=p=2e3>>1:s>>>1;l[u]=s}return l}();i.exports=function(s,l,u,c){var d=a,p=c+u;s^=-1;for(var v=c;v>>8^d[255&(s^l[v])];return-1^s}},{}],46:[function(r,i,o){var a,s=r("../utils/common"),l=r("./trees"),u=r("./adler32"),c=r("./crc32"),d=r("./messages"),p=0,v=4,x=0,b=-2,y=-1,_=4,k=2,E=8,O=9,U=286,D=30,j=19,F=2*U+1,H=15,W=3,G=258,ae=G+W+1,V=42,oe=113,P=1,ee=2,le=3,pe=4;function xe(ne,Mt){return ne.msg=d[Mt],Mt}function J(ne){return(ne<<1)-(4ne.avail_out&&(Nt=ne.avail_out),Nt!==0&&(s.arraySet(ne.output,Mt.pending_buf,Mt.pending_out,Nt,ne.next_out),ne.next_out+=Nt,Mt.pending_out+=Nt,ne.total_out+=Nt,ne.avail_out-=Nt,Mt.pending-=Nt,Mt.pending===0&&(Mt.pending_out=0))}function He(ne,Mt){l._tr_flush_block(ne,0<=ne.block_start?ne.block_start:-1,ne.strstart-ne.block_start,Mt),ne.block_start=ne.strstart,Le(ne.strm)}function nr(ne,Mt){ne.pending_buf[ne.pending++]=Mt}function Bt(ne,Mt){ne.pending_buf[ne.pending++]=Mt>>>8&255,ne.pending_buf[ne.pending++]=255&Mt}function Rt(ne,Mt){var Nt,Ie,Ae=ne.max_chain_length,fe=ne.strstart,Be=ne.prev_length,rt=ne.nice_match,lt=ne.strstart>ne.w_size-ae?ne.strstart-(ne.w_size-ae):0,jt=ne.window,ce=ne.w_mask,ie=ne.prev,de=ne.strstart+G,$=jt[fe+Be-1],C=jt[fe+Be];ne.prev_length>=ne.good_match&&(Ae>>=2),rt>ne.lookahead&&(rt=ne.lookahead);do if(jt[(Nt=Mt)+Be]===C&&jt[Nt+Be-1]===$&&jt[Nt]===jt[fe]&&jt[++Nt]===jt[fe+1]){fe+=2,Nt++;do;while(jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&jt[++fe]===jt[++Nt]&&felt&&--Ae!=0);return Be<=ne.lookahead?Be:ne.lookahead}function Jt(ne){var Mt,Nt,Ie,Ae,fe,Be,rt,lt,jt,ce,ie=ne.w_size;do{if(Ae=ne.window_size-ne.lookahead-ne.strstart,ne.strstart>=ie+(ie-ae)){for(s.arraySet(ne.window,ne.window,ie,ie,0),ne.match_start-=ie,ne.strstart-=ie,ne.block_start-=ie,Mt=Nt=ne.hash_size;Ie=ne.head[--Mt],ne.head[Mt]=ie<=Ie?Ie-ie:0,--Nt;);for(Mt=Nt=ie;Ie=ne.prev[--Mt],ne.prev[Mt]=ie<=Ie?Ie-ie:0,--Nt;);Ae+=ie}if(ne.strm.avail_in===0)break;if(Be=ne.strm,rt=ne.window,lt=ne.strstart+ne.lookahead,jt=Ae,ce=void 0,ce=Be.avail_in,jt=W)for(fe=ne.strstart-ne.insert,ne.ins_h=ne.window[fe],ne.ins_h=(ne.ins_h<=W&&(ne.ins_h=(ne.ins_h<=W)if(Ie=l._tr_tally(ne,ne.strstart-ne.match_start,ne.match_length-W),ne.lookahead-=ne.match_length,ne.match_length<=ne.max_lazy_match&&ne.lookahead>=W){for(ne.match_length--;ne.strstart++,ne.ins_h=(ne.ins_h<=W&&(ne.ins_h=(ne.ins_h<=W&&ne.match_length<=ne.prev_length){for(Ae=ne.strstart+ne.lookahead-W,Ie=l._tr_tally(ne,ne.strstart-1-ne.prev_match,ne.prev_length-W),ne.lookahead-=ne.prev_length-1,ne.prev_length-=2;++ne.strstart<=Ae&&(ne.ins_h=(ne.ins_h<ne.pending_buf_size-5&&(Nt=ne.pending_buf_size-5);;){if(ne.lookahead<=1){if(Jt(ne),ne.lookahead===0&&Mt===p)return P;if(ne.lookahead===0)break}ne.strstart+=ne.lookahead,ne.lookahead=0;var Ie=ne.block_start+Nt;if((ne.strstart===0||ne.strstart>=Ie)&&(ne.lookahead=ne.strstart-Ie,ne.strstart=Ie,He(ne,!1),ne.strm.avail_out===0)||ne.strstart-ne.block_start>=ne.w_size-ae&&(He(ne,!1),ne.strm.avail_out===0))return P}return ne.insert=0,Mt===v?(He(ne,!0),ne.strm.avail_out===0?le:pe):(ne.strstart>ne.block_start&&(He(ne,!1),ne.strm.avail_out),P)}),new kt(4,4,8,4,vr),new kt(4,5,16,8,vr),new kt(4,6,32,32,vr),new kt(4,4,16,16,At),new kt(8,16,32,32,At),new kt(8,16,128,128,At),new kt(8,32,128,256,At),new kt(32,128,258,1024,At),new kt(32,258,258,4096,At)],o.deflateInit=function(ne,Mt){return yr(ne,Mt,E,15,8,0)},o.deflateInit2=yr,o.deflateReset=Kt,o.deflateResetKeep=Lt,o.deflateSetHeader=function(ne,Mt){return ne&&ne.state?ne.state.wrap!==2?b:(ne.state.gzhead=Mt,x):b},o.deflate=function(ne,Mt){var Nt,Ie,Ae,fe;if(!ne||!ne.state||5>8&255),nr(Ie,Ie.gzhead.time>>16&255),nr(Ie,Ie.gzhead.time>>24&255),nr(Ie,Ie.level===9?2:2<=Ie.strategy||Ie.level<2?4:0),nr(Ie,255&Ie.gzhead.os),Ie.gzhead.extra&&Ie.gzhead.extra.length&&(nr(Ie,255&Ie.gzhead.extra.length),nr(Ie,Ie.gzhead.extra.length>>8&255)),Ie.gzhead.hcrc&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending,0)),Ie.gzindex=0,Ie.status=69):(nr(Ie,0),nr(Ie,0),nr(Ie,0),nr(Ie,0),nr(Ie,0),nr(Ie,Ie.level===9?2:2<=Ie.strategy||Ie.level<2?4:0),nr(Ie,3),Ie.status=oe);else{var Be=E+(Ie.w_bits-8<<4)<<8;Be|=(2<=Ie.strategy||Ie.level<2?0:Ie.level<6?1:Ie.level===6?2:3)<<6,Ie.strstart!==0&&(Be|=32),Be+=31-Be%31,Ie.status=oe,Bt(Ie,Be),Ie.strstart!==0&&(Bt(Ie,ne.adler>>>16),Bt(Ie,65535&ne.adler)),ne.adler=1}if(Ie.status===69)if(Ie.gzhead.extra){for(Ae=Ie.pending;Ie.gzindex<(65535&Ie.gzhead.extra.length)&&(Ie.pending!==Ie.pending_buf_size||(Ie.gzhead.hcrc&&Ie.pending>Ae&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),Le(ne),Ae=Ie.pending,Ie.pending!==Ie.pending_buf_size));)nr(Ie,255&Ie.gzhead.extra[Ie.gzindex]),Ie.gzindex++;Ie.gzhead.hcrc&&Ie.pending>Ae&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),Ie.gzindex===Ie.gzhead.extra.length&&(Ie.gzindex=0,Ie.status=73)}else Ie.status=73;if(Ie.status===73)if(Ie.gzhead.name){Ae=Ie.pending;do{if(Ie.pending===Ie.pending_buf_size&&(Ie.gzhead.hcrc&&Ie.pending>Ae&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),Le(ne),Ae=Ie.pending,Ie.pending===Ie.pending_buf_size)){fe=1;break}fe=Ie.gzindexAe&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),fe===0&&(Ie.gzindex=0,Ie.status=91)}else Ie.status=91;if(Ie.status===91)if(Ie.gzhead.comment){Ae=Ie.pending;do{if(Ie.pending===Ie.pending_buf_size&&(Ie.gzhead.hcrc&&Ie.pending>Ae&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),Le(ne),Ae=Ie.pending,Ie.pending===Ie.pending_buf_size)){fe=1;break}fe=Ie.gzindexAe&&(ne.adler=c(ne.adler,Ie.pending_buf,Ie.pending-Ae,Ae)),fe===0&&(Ie.status=103)}else Ie.status=103;if(Ie.status===103&&(Ie.gzhead.hcrc?(Ie.pending+2>Ie.pending_buf_size&&Le(ne),Ie.pending+2<=Ie.pending_buf_size&&(nr(Ie,255&ne.adler),nr(Ie,ne.adler>>8&255),ne.adler=0,Ie.status=oe)):Ie.status=oe),Ie.pending!==0){if(Le(ne),ne.avail_out===0)return Ie.last_flush=-1,x}else if(ne.avail_in===0&&J(Mt)<=J(Nt)&&Mt!==v)return xe(ne,-5);if(Ie.status===666&&ne.avail_in!==0)return xe(ne,-5);if(ne.avail_in!==0||Ie.lookahead!==0||Mt!==p&&Ie.status!==666){var rt=Ie.strategy===2?function(lt,jt){for(var ce;;){if(lt.lookahead===0&&(Jt(lt),lt.lookahead===0)){if(jt===p)return P;break}if(lt.match_length=0,ce=l._tr_tally(lt,0,lt.window[lt.strstart]),lt.lookahead--,lt.strstart++,ce&&(He(lt,!1),lt.strm.avail_out===0))return P}return lt.insert=0,jt===v?(He(lt,!0),lt.strm.avail_out===0?le:pe):lt.last_lit&&(He(lt,!1),lt.strm.avail_out===0)?P:ee}(Ie,Mt):Ie.strategy===3?function(lt,jt){for(var ce,ie,de,$,C=lt.window;;){if(lt.lookahead<=G){if(Jt(lt),lt.lookahead<=G&&jt===p)return P;if(lt.lookahead===0)break}if(lt.match_length=0,lt.lookahead>=W&&0lt.lookahead&&(lt.match_length=lt.lookahead)}if(lt.match_length>=W?(ce=l._tr_tally(lt,1,lt.match_length-W),lt.lookahead-=lt.match_length,lt.strstart+=lt.match_length,lt.match_length=0):(ce=l._tr_tally(lt,0,lt.window[lt.strstart]),lt.lookahead--,lt.strstart++),ce&&(He(lt,!1),lt.strm.avail_out===0))return P}return lt.insert=0,jt===v?(He(lt,!0),lt.strm.avail_out===0?le:pe):lt.last_lit&&(He(lt,!1),lt.strm.avail_out===0)?P:ee}(Ie,Mt):a[Ie.level].func(Ie,Mt);if(rt!==le&&rt!==pe||(Ie.status=666),rt===P||rt===le)return ne.avail_out===0&&(Ie.last_flush=-1),x;if(rt===ee&&(Mt===1?l._tr_align(Ie):Mt!==5&&(l._tr_stored_block(Ie,0,0,!1),Mt===3&&(ft(Ie.head),Ie.lookahead===0&&(Ie.strstart=0,Ie.block_start=0,Ie.insert=0))),Le(ne),ne.avail_out===0))return Ie.last_flush=-1,x}return Mt!==v?x:Ie.wrap<=0?1:(Ie.wrap===2?(nr(Ie,255&ne.adler),nr(Ie,ne.adler>>8&255),nr(Ie,ne.adler>>16&255),nr(Ie,ne.adler>>24&255),nr(Ie,255&ne.total_in),nr(Ie,ne.total_in>>8&255),nr(Ie,ne.total_in>>16&255),nr(Ie,ne.total_in>>24&255)):(Bt(Ie,ne.adler>>>16),Bt(Ie,65535&ne.adler)),Le(ne),0=Nt.w_size&&(fe===0&&(ft(Nt.head),Nt.strstart=0,Nt.block_start=0,Nt.insert=0),jt=new s.Buf8(Nt.w_size),s.arraySet(jt,Mt,ce-Nt.w_size,Nt.w_size,0),Mt=jt,ce=Nt.w_size),Be=ne.avail_in,rt=ne.next_in,lt=ne.input,ne.avail_in=ce,ne.next_in=0,ne.input=Mt,Jt(Nt);Nt.lookahead>=W;){for(Ie=Nt.strstart,Ae=Nt.lookahead-(W-1);Nt.ins_h=(Nt.ins_h<>>=W=H>>>24,O-=W,(W=H>>>16&255)===0)ee[d++]=65535&H;else{if(!(16&W)){if((64&W)==0){H=U[(65535&H)+(E&(1<>>=W,O-=W),O<15&&(E+=P[u++]<>>=W=H>>>24,O-=W,!(16&(W=H>>>16&255))){if((64&W)==0){H=D[(65535&H)+(E&(1<>>=W,O-=W,(W=d-p)>3,E&=(1<<(O-=G<<3))-1,a.next_in=u,a.next_out=d,a.avail_in=u>>24&255)+(V>>>8&65280)+((65280&V)<<8)+((255&V)<<24)}function E(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O(V){var oe;return V&&V.state?(oe=V.state,V.total_in=V.total_out=oe.total=0,V.msg="",oe.wrap&&(V.adler=1&oe.wrap),oe.mode=b,oe.last=0,oe.havedict=0,oe.dmax=32768,oe.head=null,oe.hold=0,oe.bits=0,oe.lencode=oe.lendyn=new a.Buf32(y),oe.distcode=oe.distdyn=new a.Buf32(_),oe.sane=1,oe.back=-1,v):x}function U(V){var oe;return V&&V.state?((oe=V.state).wsize=0,oe.whave=0,oe.wnext=0,O(V)):x}function D(V,oe){var P,ee;return V&&V.state?(ee=V.state,oe<0?(P=0,oe=-oe):(P=1+(oe>>4),oe<48&&(oe&=15)),oe&&(oe<8||15=pe.wsize?(a.arraySet(pe.window,oe,P-pe.wsize,pe.wsize,0),pe.wnext=0,pe.whave=pe.wsize):(ee<(le=pe.wsize-pe.wnext)&&(le=ee),a.arraySet(pe.window,oe,P-ee,le,pe.wnext),(ee-=le)?(a.arraySet(pe.window,oe,P-ee,ee,0),pe.wnext=ee,pe.whave=pe.wsize):(pe.wnext+=le,pe.wnext===pe.wsize&&(pe.wnext=0),pe.whave>>8&255,P.check=l(P.check,fe,2,0),He=Le=0,P.mode=2;break}if(P.flags=0,P.head&&(P.head.done=!1),!(1&P.wrap)||(((255&Le)<<8)+(Le>>8))%31){V.msg="incorrect header check",P.mode=30;break}if((15&Le)!=8){V.msg="unknown compression method",P.mode=30;break}if(He-=4,ne=8+(15&(Le>>>=4)),P.wbits===0)P.wbits=ne;else if(ne>P.wbits){V.msg="invalid window size",P.mode=30;break}P.dmax=1<>8&1),512&P.flags&&(fe[0]=255&Le,fe[1]=Le>>>8&255,P.check=l(P.check,fe,2,0)),He=Le=0,P.mode=3;case 3:for(;He<32;){if(J===0)break e;J--,Le+=ee[pe++]<>>8&255,fe[2]=Le>>>16&255,fe[3]=Le>>>24&255,P.check=l(P.check,fe,4,0)),He=Le=0,P.mode=4;case 4:for(;He<16;){if(J===0)break e;J--,Le+=ee[pe++]<>8),512&P.flags&&(fe[0]=255&Le,fe[1]=Le>>>8&255,P.check=l(P.check,fe,2,0)),He=Le=0,P.mode=5;case 5:if(1024&P.flags){for(;He<16;){if(J===0)break e;J--,Le+=ee[pe++]<>>8&255,P.check=l(P.check,fe,2,0)),He=Le=0}else P.head&&(P.head.extra=null);P.mode=6;case 6:if(1024&P.flags&&(J<(Rt=P.length)&&(Rt=J),Rt&&(P.head&&(ne=P.head.extra_len-P.length,P.head.extra||(P.head.extra=new Array(P.head.extra_len)),a.arraySet(P.head.extra,ee,pe,Rt,ne)),512&P.flags&&(P.check=l(P.check,ee,Rt,pe)),J-=Rt,pe+=Rt,P.length-=Rt),P.length))break e;P.length=0,P.mode=7;case 7:if(2048&P.flags){if(J===0)break e;for(Rt=0;ne=ee[pe+Rt++],P.head&&ne&&P.length<65536&&(P.head.name+=String.fromCharCode(ne)),ne&&Rt>9&1,P.head.done=!0),V.adler=P.check=0,P.mode=12;break;case 10:for(;He<32;){if(J===0)break e;J--,Le+=ee[pe++]<>>=7&He,He-=7&He,P.mode=27;break}for(;He<3;){if(J===0)break e;J--,Le+=ee[pe++]<>>=1)){case 0:P.mode=14;break;case 1:if(G(P),P.mode=20,oe!==6)break;Le>>>=2,He-=2;break e;case 2:P.mode=17;break;case 3:V.msg="invalid block type",P.mode=30}Le>>>=2,He-=2;break;case 14:for(Le>>>=7&He,He-=7&He;He<32;){if(J===0)break e;J--,Le+=ee[pe++]<>>16^65535)){V.msg="invalid stored block lengths",P.mode=30;break}if(P.length=65535&Le,He=Le=0,P.mode=15,oe===6)break e;case 15:P.mode=16;case 16:if(Rt=P.length){if(J>>=5,He-=5,P.ndist=1+(31&Le),Le>>>=5,He-=5,P.ncode=4+(15&Le),Le>>>=4,He-=4,286>>=3,He-=3}for(;P.have<19;)P.lens[Be[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,Nt={bits:P.lenbits},Mt=c(0,P.lens,0,19,P.lencode,0,P.work,Nt),P.lenbits=Nt.bits,Mt){V.msg="invalid code lengths set",P.mode=30;break}P.have=0,P.mode=19;case 19:for(;P.have>>16&255,Ct=65535&Ae,!((At=Ae>>>24)<=He);){if(J===0)break e;J--,Le+=ee[pe++]<>>=At,He-=At,P.lens[P.have++]=Ct;else{if(Ct===16){for(Ie=At+2;He>>=At,He-=At,P.have===0){V.msg="invalid bit length repeat",P.mode=30;break}ne=P.lens[P.have-1],Rt=3+(3&Le),Le>>>=2,He-=2}else if(Ct===17){for(Ie=At+3;He>>=At)),Le>>>=3,He-=3}else{for(Ie=At+7;He>>=At)),Le>>>=7,He-=7}if(P.have+Rt>P.nlen+P.ndist){V.msg="invalid bit length repeat",P.mode=30;break}for(;Rt--;)P.lens[P.have++]=ne}}if(P.mode===30)break;if(P.lens[256]===0){V.msg="invalid code -- missing end-of-block",P.mode=30;break}if(P.lenbits=9,Nt={bits:P.lenbits},Mt=c(d,P.lens,0,P.nlen,P.lencode,0,P.work,Nt),P.lenbits=Nt.bits,Mt){V.msg="invalid literal/lengths set",P.mode=30;break}if(P.distbits=6,P.distcode=P.distdyn,Nt={bits:P.distbits},Mt=c(p,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,Nt),P.distbits=Nt.bits,Mt){V.msg="invalid distances set",P.mode=30;break}if(P.mode=20,oe===6)break e;case 20:P.mode=21;case 21:if(6<=J&&258<=ft){V.next_out=xe,V.avail_out=ft,V.next_in=pe,V.avail_in=J,P.hold=Le,P.bits=He,u(V,Bt),xe=V.next_out,le=V.output,ft=V.avail_out,pe=V.next_in,ee=V.input,J=V.avail_in,Le=P.hold,He=P.bits,P.mode===12&&(P.back=-1);break}for(P.back=0;kt=(Ae=P.lencode[Le&(1<>>16&255,Ct=65535&Ae,!((At=Ae>>>24)<=He);){if(J===0)break e;J--,Le+=ee[pe++]<>Lt)])>>>16&255,Ct=65535&Ae,!(Lt+(At=Ae>>>24)<=He);){if(J===0)break e;J--,Le+=ee[pe++]<>>=Lt,He-=Lt,P.back+=Lt}if(Le>>>=At,He-=At,P.back+=At,P.length=Ct,kt===0){P.mode=26;break}if(32&kt){P.back=-1,P.mode=12;break}if(64&kt){V.msg="invalid literal/length code",P.mode=30;break}P.extra=15&kt,P.mode=22;case 22:if(P.extra){for(Ie=P.extra;He>>=P.extra,He-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=23;case 23:for(;kt=(Ae=P.distcode[Le&(1<>>16&255,Ct=65535&Ae,!((At=Ae>>>24)<=He);){if(J===0)break e;J--,Le+=ee[pe++]<>Lt)])>>>16&255,Ct=65535&Ae,!(Lt+(At=Ae>>>24)<=He);){if(J===0)break e;J--,Le+=ee[pe++]<>>=Lt,He-=Lt,P.back+=Lt}if(Le>>>=At,He-=At,P.back+=At,64&kt){V.msg="invalid distance code",P.mode=30;break}P.offset=Ct,P.extra=15&kt,P.mode=24;case 24:if(P.extra){for(Ie=P.extra;He>>=P.extra,He-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){V.msg="invalid distance too far back",P.mode=30;break}P.mode=25;case 25:if(ft===0)break e;if(Rt=Bt-ft,P.offset>Rt){if((Rt=P.offset-Rt)>P.whave&&P.sane){V.msg="invalid distance too far back",P.mode=30;break}Jt=Rt>P.wnext?(Rt-=P.wnext,P.wsize-Rt):P.wnext-Rt,Rt>P.length&&(Rt=P.length),vr=P.window}else vr=le,Jt=xe-P.offset,Rt=P.length;for(ftF?(W=Jt[vr+_[oe]],He[nr+_[oe]]):(W=96,0),E=1<>xe)+(O-=E)]=H<<24|W<<16|G|0,O!==0;);for(E=1<>=1;if(E!==0?(Le&=E-1,Le+=E):Le=0,oe++,--Bt[V]==0){if(V===ee)break;V=p[v+_[oe]]}if(le>>7)]}function nr(Ae,fe){Ae.pending_buf[Ae.pending++]=255&fe,Ae.pending_buf[Ae.pending++]=fe>>>8&255}function Bt(Ae,fe,Be){Ae.bi_valid>k-Be?(Ae.bi_buf|=fe<>k-Ae.bi_valid,Ae.bi_valid+=Be-k):(Ae.bi_buf|=fe<>>=1,Be<<=1,0<--fe;);return Be>>>1}function vr(Ae,fe,Be){var rt,lt,jt=new Array(_+1),ce=0;for(rt=1;rt<=_;rt++)jt[rt]=ce=ce+Be[rt-1]<<1;for(lt=0;lt<=fe;lt++){var ie=Ae[2*lt+1];ie!==0&&(Ae[2*lt]=Jt(jt[ie]++,ie))}}function At(Ae){var fe;for(fe=0;fe>1;1<=Be;Be--)Lt(Ae,jt,Be);for(lt=de;Be=Ae.heap[1],Ae.heap[1]=Ae.heap[Ae.heap_len--],Lt(Ae,jt,1),rt=Ae.heap[1],Ae.heap[--Ae.heap_max]=Be,Ae.heap[--Ae.heap_max]=rt,jt[2*lt]=jt[2*Be]+jt[2*rt],Ae.depth[lt]=(Ae.depth[Be]>=Ae.depth[rt]?Ae.depth[Be]:Ae.depth[rt])+1,jt[2*Be+1]=jt[2*rt+1]=lt,Ae.heap[1]=lt++,Lt(Ae,jt,1),2<=Ae.heap_len;);Ae.heap[--Ae.heap_max]=Ae.heap[1],function(C,T){var Z,ve,je,ct,ur,Dr,hr=T.dyn_tree,Rr=T.max_code,Gr=T.stat_desc.static_tree,Nr=T.stat_desc.has_stree,Kn=T.stat_desc.extra_bits,Tn=T.stat_desc.extra_base,In=T.stat_desc.max_length,yt=0;for(ct=0;ct<=_;ct++)C.bl_count[ct]=0;for(hr[2*C.heap[C.heap_max]+1]=0,Z=C.heap_max+1;Z>=7;lt>>=1)if(1&$&&ie.dyn_ltree[2*de]!==0)return s;if(ie.dyn_ltree[18]!==0||ie.dyn_ltree[20]!==0||ie.dyn_ltree[26]!==0)return l;for(de=32;de>>3,(jt=Ae.static_len+3+7>>>3)<=lt&&(lt=jt)):lt=jt=Be+5,Be+4<=lt&&fe!==-1?Ie(Ae,fe,Be,rt):Ae.strategy===4||jt===lt?(Bt(Ae,2+(rt?1:0),3),Kt(Ae,ae,V)):(Bt(Ae,4+(rt?1:0),3),function(ie,de,$,C){var T;for(Bt(ie,de-257,5),Bt(ie,$-1,5),Bt(ie,C-4,4),T=0;T>>8&255,Ae.pending_buf[Ae.d_buf+2*Ae.last_lit+1]=255&fe,Ae.pending_buf[Ae.l_buf+Ae.last_lit]=255&Be,Ae.last_lit++,fe===0?Ae.dyn_ltree[2*Be]++:(Ae.matches++,fe--,Ae.dyn_ltree[2*(P[Be]+p+1)]++,Ae.dyn_dtree[2*He(fe)]++),Ae.last_lit===Ae.lit_bufsize-1},o._tr_align=function(Ae){Bt(Ae,2,3),Rt(Ae,O,ae),function(fe){fe.bi_valid===16?(nr(fe,fe.bi_buf),fe.bi_buf=0,fe.bi_valid=0):8<=fe.bi_valid&&(fe.pending_buf[fe.pending++]=255&fe.bi_buf,fe.bi_buf>>=8,fe.bi_valid-=8)}(Ae)}},{"../utils/common":41}],53:[function(r,i,o){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,i,o){(function(a){(function(s,l){if(!s.setImmediate){var u,c,d,p,v=1,x={},b=!1,y=s.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(s);_=_&&_.setTimeout?_:s,u={}.toString.call(s.process)==="[object process]"?function(U){process.nextTick(function(){E(U)})}:function(){if(s.postMessage&&!s.importScripts){var U=!0,D=s.onmessage;return s.onmessage=function(){U=!1},s.postMessage("","*"),s.onmessage=D,U}}()?(p="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",O,!1):s.attachEvent("onmessage",O),function(U){s.postMessage(p+U,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(U){E(U.data)},function(U){d.port2.postMessage(U)}):y&&"onreadystatechange"in y.createElement("script")?(c=y.documentElement,function(U){var D=y.createElement("script");D.onreadystatechange=function(){E(U),D.onreadystatechange=null,c.removeChild(D),D=null},c.appendChild(D)}):function(U){setTimeout(E,0,U)},_.setImmediate=function(U){typeof U!="function"&&(U=new Function(""+U));for(var D=new Array(arguments.length-1),j=0;j"u"?a===void 0?this:a:self)}).call(this,typeof _n<"u"?_n:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(hj);const Zbe=hj.exports;var gj={exports:{}};(function(e,t){(function(r,i){i()})(_n,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,d,p){var v=new XMLHttpRequest;v.open("GET",c),v.responseType="blob",v.onload=function(){u(v.response,d,p)},v.onerror=function(){console.error("could not download file")},v.send()}function o(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof _n=="object"&&_n.global===_n?_n:void 0,l=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(c,d,p){var v=s.URL||s.webkitURL,x=document.createElement("a");d=d||c.name||"download",x.download=d,x.rel="noopener",typeof c=="string"?(x.href=c,x.origin===location.origin?a(x):o(x.href)?i(c,d,p):a(x,x.target="_blank")):(x.href=v.createObjectURL(c),setTimeout(function(){v.revokeObjectURL(x.href)},4e4),setTimeout(function(){a(x)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,p){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,p),d);else if(o(c))i(c,d,p);else{var v=document.createElement("a");v.href=c,v.target="_blank",setTimeout(function(){a(v)})}}:function(c,d,p,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof c=="string")return i(c,d,p);var x=c.type==="application/octet-stream",b=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||x&&b||l)&&typeof FileReader<"u"){var _=new FileReader;_.onloadend=function(){var O=_.result;O=y?O:O.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=O:location=O,v=null},_.readAsDataURL(c)}else{var k=s.URL||s.webkitURL,E=k.createObjectURL(c);v?v.location=E:location.href=E,v=null,setTimeout(function(){k.revokeObjectURL(E)},4e4)}});s.saveAs=u.saveAs=u,e.exports=u})})(gj);const Qbe=gj.exports;function Xbe(e){const t=new Zbe;e.map(r=>t.file(r.name,r.content)),t.generateAsync({type:"blob"}).then(function(r){Qbe.saveAs(r,"sources.zip")})}const Jbe=sr(jo)({fontSize:14,fontWeight:700}),ewe=sr(jo)({fontSize:12,color:"#949597"}),mj=sr(kn)({border:"1px solid #D9D9D988",overflow:"hidden",borderRadius:14,width:"100%",paddingBottom:6}),Cc=sr(kn)({display:"flex",flexDirection:"column"}),wE=sr(kn)({display:"flex",flexDirection:"row",alignItems:"center"}),yj=sr(wE)({background:"#F7F9FB",padding:"14px 20px"}),vj=sr(Cc)({fontSize:14}),G5=sr(j6)({padding:"10px 6px",borderBottom:0}),bj=sr(kn)({border:"1px solid #D8D8D8",background:"white",borderRadius:6,padding:"0px 10px",fontSize:12,textAlign:"center",display:"inline-block","&:hover":{border:"1px solid #b0b0b0"}}),twe=sr(kn)({borderRadius:10,padding:"10px 14px",whiteSpace:"break-spaces",wordBreak:"break-all","&:hover":{background:"#f8f8f8"}}),rwe=sr("input")({display:"flex",alignItems:"center",paddingLeft:10,width:"100%",boxSizing:"border-box",height:40,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),nwe=sr("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}});var wj={exports:{}};(function(e,t){var r=r!==void 0?r:{},i=function(){var o,a=typeof window=="object"?{currentScript:window.document.currentScript}:null;class s{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(u){return o||(r=Object.assign({},r,u),o=new Promise(c=>{var d,p={};for(d in r)r.hasOwnProperty(d)&&(p[d]=r[d]);var v,x,b=[],y="./this.program",_=function(Ge,ke){throw ke},k=!1,E=!1;k=typeof window=="object",E=typeof importScripts=="function",v=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",x=!k&&!v&&!E;var O,U,D,j,F,H="";v?(H=E?Nm.dirname(H)+"/":__dirname+"/",O=function(Ge,ke){return j||(j=Nm),F||(F=Nm),Ge=F.normalize(Ge),j.readFileSync(Ge,ke?null:"utf8")},D=function(Ge){var ke=O(Ge,!0);return ke.buffer||(ke=new Uint8Array(ke)),Le(ke.buffer),ke},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),b=process.argv.slice(2),e.exports=r,_=function(Ge){process.exit(Ge)},r.inspect=function(){return"[Emscripten Module object]"}):x?(typeof read<"u"&&(O=function(Ge){return read(Ge)}),D=function(Ge){var ke;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Ge)):(Le(typeof(ke=read(Ge,"binary"))=="object"),ke)},typeof scriptArgs<"u"?b=scriptArgs:arguments!==void 0&&(b=arguments),typeof quit=="function"&&(_=function(Ge){quit(Ge)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(k||E)&&(E?H=self.location.href:a!==void 0&&a.currentScript&&(H=a.currentScript.src),H=H.indexOf("blob:")!==0?H.substr(0,H.lastIndexOf("/")+1):"",O=function(Ge){var ke=new XMLHttpRequest;return ke.open("GET",Ge,!1),ke.send(null),ke.responseText},E&&(D=function(Ge){var ke=new XMLHttpRequest;return ke.open("GET",Ge,!1),ke.responseType="arraybuffer",ke.send(null),new Uint8Array(ke.response)}),U=function(Ge,ke,Qe){var Ht=new XMLHttpRequest;Ht.open("GET",Ge,!0),Ht.responseType="arraybuffer",Ht.onload=function(){Ht.status==200||Ht.status==0&&Ht.response?ke(Ht.response):Qe()},Ht.onerror=Qe,Ht.send(null)}),r.print||console.log.bind(console);var W=r.printErr||console.warn.bind(console);for(d in p)p.hasOwnProperty(d)&&(r[d]=p[d]);p=null,r.arguments&&(b=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(_=r.quit);var G=16,ae,V=[];function oe(Ge,ke){if(!ae){ae=new WeakMap;for(var Qe=0;Qe>0]=ke;break;case"i16":Jt[Ge>>1]=ke;break;case"i32":vr[Ge>>2]=ke;break;case"i64":je=[ke>>>0,(ve=ke,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],vr[Ge>>2]=je[0],vr[Ge+4>>2]=je[1];break;case"float":At[Ge>>2]=ke;break;case"double":kt[Ge>>3]=ke;break;default:T("invalid type for setValue: "+Qe)}}function J(Ge,ke,Qe){switch((ke=ke||"i8").charAt(ke.length-1)==="*"&&(ke="i32"),ke){case"i1":case"i8":return Bt[Ge>>0];case"i16":return Jt[Ge>>1];case"i32":case"i64":return vr[Ge>>2];case"float":return At[Ge>>2];case"double":return kt[Ge>>3];default:T("invalid type for getValue: "+ke)}return null}typeof WebAssembly!="object"&&T("no native wasm support detected");var ft=!1;function Le(Ge,ke){Ge||T("Assertion failed: "+ke)}var He=1,nr,Bt,Rt,Jt,vr,At,kt,Ct=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Lt(Ge,ke,Qe){for(var Ht=ke+Qe,or=ke;Ge[or]&&!(or>=Ht);)++or;if(or-ke>16&&Ge.subarray&&Ct)return Ct.decode(Ge.subarray(ke,or));for(var kr="";ke>10,56320|1023&yi)}}else kr+=String.fromCharCode((31&$r)<<6|Vr)}else kr+=String.fromCharCode($r)}return kr}function Kt(Ge,ke){return Ge?Lt(Rt,Ge,ke):""}function yr(Ge,ke,Qe,Ht){if(!(Ht>0))return 0;for(var or=Qe,kr=Qe+Ht-1,$r=0;$r=55296&&Vr<=57343&&(Vr=65536+((1023&Vr)<<10)|1023&Ge.charCodeAt(++$r)),Vr<=127){if(Qe>=kr)break;ke[Qe++]=Vr}else if(Vr<=2047){if(Qe+1>=kr)break;ke[Qe++]=192|Vr>>6,ke[Qe++]=128|63&Vr}else if(Vr<=65535){if(Qe+2>=kr)break;ke[Qe++]=224|Vr>>12,ke[Qe++]=128|Vr>>6&63,ke[Qe++]=128|63&Vr}else{if(Qe+3>=kr)break;ke[Qe++]=240|Vr>>18,ke[Qe++]=128|Vr>>12&63,ke[Qe++]=128|Vr>>6&63,ke[Qe++]=128|63&Vr}}return ke[Qe]=0,Qe-or}function ne(Ge,ke,Qe){return yr(Ge,Rt,ke,Qe)}function Mt(Ge){for(var ke=0,Qe=0;Qe=55296&&Ht<=57343&&(Ht=65536+((1023&Ht)<<10)|1023&Ge.charCodeAt(++Qe)),Ht<=127?++ke:ke+=Ht<=2047?2:Ht<=65535?3:4}return ke}function Nt(Ge){var ke=Mt(Ge)+1,Qe=cr(ke);return yr(Ge,Bt,Qe,ke),Qe}function Ie(Ge){nr=Ge,r.HEAP8=Bt=new Int8Array(Ge),r.HEAP16=Jt=new Int16Array(Ge),r.HEAP32=vr=new Int32Array(Ge),r.HEAPU8=Rt=new Uint8Array(Ge),r.HEAPU16=new Uint16Array(Ge),r.HEAPU32=new Uint32Array(Ge),r.HEAPF32=At=new Float32Array(Ge),r.HEAPF64=kt=new Float64Array(Ge)}var Ae=r.INITIAL_MEMORY||33554432;(le=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:Ae/65536,maximum:32768}))&&(nr=le.buffer),Ae=nr.byteLength,Ie(nr);var fe=new WebAssembly.Table({initial:20,element:"anyfunc"}),Be=[],rt=[],lt=[],jt=[],ce=!1,ie=0,de=null;function $(Ge){ie++,r.monitorRunDependencies&&r.monitorRunDependencies(ie)}function C(Ge){if(ie--,r.monitorRunDependencies&&r.monitorRunDependencies(ie),ie==0&&de){var ke=de;de=null,ke()}}function T(Ge){throw r.onAbort&&r.onAbort(Ge),W(Ge+=""),ft=!0,Ge="abort("+Ge+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Ge)}r.preloadedImages={},r.preloadedAudios={},r.preloadedWasm={};var Z,ve,je,ct="data:application/octet-stream;base64,";function ur(Ge){return Ge.startsWith(ct)}function Dr(Ge){return Ge.startsWith("file://")}function hr(Ge){try{if(Ge==Z&&P)return new Uint8Array(P);if(D)return D(Ge);throw"both async and sync fetching of the wasm failed"}catch(ke){T(ke)}}ur(Z="tree-sitter.wasm")||(Z=function(Ge){return r.locateFile?r.locateFile(Ge,H):H+Ge}(Z));var Rr={},Gr={get:function(Ge,ke){return Rr[ke]||(Rr[ke]=new WebAssembly.Global({value:"i32",mutable:!0})),Rr[ke]}};function Nr(Ge){for(;Ge.length>0;){var ke=Ge.shift();if(typeof ke!="function"){var Qe=ke.func;typeof Qe=="number"?ke.arg===void 0?fe.get(Qe)():fe.get(Qe)(ke.arg):Qe(ke.arg===void 0?null:ke.arg)}else ke(r)}}function Kn(Ge){var ke=0;function Qe(){for(var qn=0,wi=1;;){var so=Ge[ke++];if(qn+=(127&so)*wi,wi*=128,!(128&so))break}return qn}if(Ge instanceof WebAssembly.Module){var Ht=WebAssembly.Module.customSections(Ge,"dylink");Le(Ht.length!=0,"need dylink section"),Ge=new Int8Array(Ht[0])}else Le(new Uint32Array(new Uint8Array(Ge.subarray(0,24)).buffer)[0]==1836278016,"need to see wasm magic number"),Le(Ge[8]===0,"need the dylink section to be first"),ke=9,Qe(),Le(Ge[ke]===6),Le(Ge[++ke]==="d".charCodeAt(0)),Le(Ge[++ke]==="y".charCodeAt(0)),Le(Ge[++ke]==="l".charCodeAt(0)),Le(Ge[++ke]==="i".charCodeAt(0)),Le(Ge[++ke]==="n".charCodeAt(0)),Le(Ge[++ke]==="k".charCodeAt(0)),ke++;var or={};or.memorySize=Qe(),or.memoryAlign=Qe(),or.tableSize=Qe(),or.tableAlign=Qe();var kr=Qe();or.neededDynlibs=[];for(var $r=0;$r0}function yt(Ge){return Ge.indexOf("dynCall_")==0||["stackAlloc","stackSave","stackRestore"].includes(Ge)?Ge:"_"+Ge}function Ei(Ge,ke){for(var Qe in Ge)if(Ge.hasOwnProperty(Qe)){ye.hasOwnProperty(Qe)||(ye[Qe]=Ge[Qe]);var Ht=yt(Qe);r.hasOwnProperty(Ht)||(r[Ht]=Ge[Qe])}}var Yn={nextHandle:1,loadedLibs:{},loadedLibNames:{}};function Pi(Ge,ke,Qe){return Ge.includes("j")?function(Ht,or,kr){var $r=r["dynCall_"+Ht];return kr&&kr.length?$r.apply(null,[or].concat(kr)):$r.call(null,or)}(Ge,ke,Qe):fe.get(ke).apply(null,Qe)}var Ji=5251072;function qo(Ge){return["__cpp_exception","__wasm_apply_data_relocs","__dso_handle","__set_stack_limits"].includes(Ge)}function eo(Ge,ke){var Qe={};for(var Ht in Ge){var or=Ge[Ht];typeof or=="object"&&(or=or.value),typeof or=="number"&&(or+=ke),Qe[Ht]=or}return function(kr){for(var $r in kr)if(!qo($r)){var Vr=!1,dn=kr[$r];$r.startsWith("orig$")&&($r=$r.split("$")[1],Vr=!0),Rr[$r]||(Rr[$r]=new WebAssembly.Global({value:"i32",mutable:!0})),(Vr||Rr[$r].value==0)&&(typeof dn=="function"?Rr[$r].value=oe(dn):typeof dn=="number"?Rr[$r].value=dn:W("unhandled export type for `"+$r+"`: "+typeof dn))}}(Qe),Qe}function Mo(Ge,ke){var Qe,Ht;return ke&&(Qe=ye["orig$"+Ge]),Qe||(Qe=ye[Ge]),Qe||(Qe=r[yt(Ge)]),!Qe&&Ge.startsWith("invoke_")&&(Ht=Ge.split("_")[1],Qe=function(){var or=dt();try{return Pi(Ht,arguments[0],Array.prototype.slice.call(arguments,1))}catch(kr){if(br(or),kr!==kr+0&&kr!=="longjmp")throw kr;Or(1,0)}}),Qe}function Wi(Ge,ke){var Qe=Kn(Ge);function Ht(){var or=Math.pow(2,Qe.memoryAlign);or=Math.max(or,G);var kr,$r,Vr,dn=(kr=function(Oi){if(ce)return Me(Oi);var $i=Ji,Un=$i+Oi+15&-16;return Ji=Un,Rr.__heap_base.value=Un,$i}(Qe.memorySize+or),($r=or)||($r=G),Math.ceil(kr/$r)*$r),yi=fe.length;fe.grow(Qe.tableSize);for(var qn=dn;qn>2]=Ht,-1;Qe=Re()}return vr[ke>>2]=Qe/1e3|0,vr[ke+4>>2]=Qe%1e3*1e3*1e3|0,0}function ar(Ge){try{return le.grow(Ge-nr.byteLength+65535>>>16),Ie(le.buffer),1}catch{}}function Br(Ge){Sn(Ge)}Xt.sig="iii",Br.sig="vi";var Hr={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(Ge,ke,Qe){if(ke[0]==="/")return ke;var Ht;if(Ge===-100)Ht=FS.cwd();else{var or=FS.getStream(Ge);if(!or)throw new FS.ErrnoError(8);Ht=or.path}if(ke.length==0){if(!Qe)throw new FS.ErrnoError(44);return Ht}return PATH.join2(Ht,ke)},doStat:function(Ge,ke,Qe){try{var Ht=Ge(ke)}catch(or){if(or&&or.node&&PATH.normalize(ke)!==PATH.normalize(FS.getPath(or.node)))return-54;throw or}return vr[Qe>>2]=Ht.dev,vr[Qe+4>>2]=0,vr[Qe+8>>2]=Ht.ino,vr[Qe+12>>2]=Ht.mode,vr[Qe+16>>2]=Ht.nlink,vr[Qe+20>>2]=Ht.uid,vr[Qe+24>>2]=Ht.gid,vr[Qe+28>>2]=Ht.rdev,vr[Qe+32>>2]=0,je=[Ht.size>>>0,(ve=Ht.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],vr[Qe+40>>2]=je[0],vr[Qe+44>>2]=je[1],vr[Qe+48>>2]=4096,vr[Qe+52>>2]=Ht.blocks,vr[Qe+56>>2]=Ht.atime.getTime()/1e3|0,vr[Qe+60>>2]=0,vr[Qe+64>>2]=Ht.mtime.getTime()/1e3|0,vr[Qe+68>>2]=0,vr[Qe+72>>2]=Ht.ctime.getTime()/1e3|0,vr[Qe+76>>2]=0,je=[Ht.ino>>>0,(ve=Ht.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],vr[Qe+80>>2]=je[0],vr[Qe+84>>2]=je[1],0},doMsync:function(Ge,ke,Qe,Ht,or){var kr=Rt.slice(Ge,Ge+Qe);FS.msync(ke,kr,or,Qe,Ht)},doMkdir:function(Ge,ke){return(Ge=PATH.normalize(Ge))[Ge.length-1]==="/"&&(Ge=Ge.substr(0,Ge.length-1)),FS.mkdir(Ge,ke,0),0},doMknod:function(Ge,ke,Qe){switch(61440&ke){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(Ge,ke,Qe),0},doReadlink:function(Ge,ke,Qe){if(Qe<=0)return-28;var Ht=FS.readlink(Ge),or=Math.min(Qe,Mt(Ht)),kr=Bt[ke+or];return ne(Ht,ke,Qe+1),Bt[ke+or]=kr,or},doAccess:function(Ge,ke){if(-8&ke)return-28;var Qe;if(!(Qe=FS.lookupPath(Ge,{follow:!0}).node))return-44;var Ht="";return 4&ke&&(Ht+="r"),2&ke&&(Ht+="w"),1&ke&&(Ht+="x"),Ht&&FS.nodePermissions(Qe,Ht)?-2:0},doDup:function(Ge,ke,Qe){var Ht=FS.getStream(Qe);return Ht&&FS.close(Ht),FS.open(Ge,ke,0,Qe,Qe).fd},doReadv:function(Ge,ke,Qe,Ht){for(var or=0,kr=0;kr>2],Vr=vr[ke+(8*kr+4)>>2],dn=FS.read(Ge,Bt,$r,Vr,Ht);if(dn<0)return-1;if(or+=dn,dn>2],Vr=vr[ke+(8*kr+4)>>2],dn=FS.write(Ge,Bt,$r,Vr,Ht);if(dn<0)return-1;or+=dn}return or},varargs:void 0,get:function(){return Hr.varargs+=4,vr[Hr.varargs-4>>2]},getStr:function(Ge){return Kt(Ge)},getStreamFromFD:function(Ge){var ke=FS.getStream(Ge);if(!ke)throw new FS.ErrnoError(8);return ke},get64:function(Ge,ke){return Ge}};function An(Ge){try{var ke=Hr.getStreamFromFD(Ge);return FS.close(ke),0}catch(Qe){return typeof FS<"u"&&Qe instanceof FS.ErrnoError||T(Qe),Qe.errno}}function un(Ge,ke,Qe,Ht){try{var or=Hr.getStreamFromFD(Ge),kr=Hr.doWritev(or,ke,Qe);return vr[Ht>>2]=kr,0}catch($r){return typeof FS<"u"&&$r instanceof FS.ErrnoError||T($r),$r.errno}}function vt(Ge){}An.sig="ii",un.sig="iiiii",vt.sig="vi";var K,ye={__heap_base:Ji,__indirect_function_table:fe,__memory_base:1024,__stack_pointer:Ee,__table_base:1,abort:q,clock_gettime:Xt,emscripten_memcpy_big:function(Ge,ke,Qe){Rt.copyWithin(Ge,ke,ke+Qe)},emscripten_resize_heap:function(Ge){var ke,Qe,Ht=Rt.length;if((Ge>>>=0)>2147483648)return!1;for(var or=1;or<=4;or*=2){var kr=Ht*(1+.2/or);if(kr=Math.min(kr,Ge+100663296),ar(Math.min(2147483648,((ke=Math.max(Ge,kr))%(Qe=65536)>0&&(ke+=Qe-ke%Qe),ke))))return!0}return!1},exit:Br,fd_close:An,fd_seek:function(Ge,ke,Qe,Ht,or){try{var kr=Hr.getStreamFromFD(Ge),$r=4294967296*Qe+(ke>>>0);return $r<=-9007199254740992||$r>=9007199254740992?-61:(FS.llseek(kr,$r,Ht),je=[kr.position>>>0,(ve=kr.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],vr[or>>2]=je[0],vr[or+4>>2]=je[1],kr.getdents&&$r===0&&Ht===0&&(kr.getdents=null),0)}catch(Vr){return typeof FS<"u"&&Vr instanceof FS.ErrnoError||T(Vr),Vr.errno}},fd_write:un,memory:le,setTempRet0:vt,tree_sitter_log_callback:function(Ge,ke){if(Qn){const Qe=Kt(ke);Qn(Qe,Ge!==0)}},tree_sitter_parse_callback:function(Ge,ke,Qe,Ht,or){var kr=mi(ke,{row:Qe,column:Ht});typeof kr=="string"?(xe(or,kr.length,"i32"),function($r,Vr,dn){if(dn===void 0&&(dn=2147483647),dn<2)return 0;for(var yi=(dn-=2)<2*$r.length?dn/2:$r.length,qn=0;qn>1]=wi,Vr+=2}Jt[Vr>>1]=0}(kr,Ge,10240)):xe(or,0,"i32")}},Me=(function(){var Ge={env:ye,wasi_snapshot_preview1:ye,"GOT.mem":new Proxy(ye,Gr),"GOT.func":new Proxy(ye,Gr)};function ke(or,kr){var $r=or.exports;$r=eo($r,1024),r.asm=$r;var Vr,dn=Kn(kr);dn.neededDynlibs&&(ee=dn.neededDynlibs.concat(ee)),Ei($r),Vr=r.asm.__wasm_call_ctors,rt.unshift(Vr),C()}function Qe(or){ke(or.instance,or.module)}function Ht(or){return function(){if(!P&&(k||E)){if(typeof fetch=="function"&&!Dr(Z))return fetch(Z,{credentials:"same-origin"}).then(function(kr){if(!kr.ok)throw"failed to load wasm binary file at '"+Z+"'";return kr.arrayBuffer()}).catch(function(){return hr(Z)});if(U)return new Promise(function(kr,$r){U(Z,function(Vr){kr(new Uint8Array(Vr))},$r)})}return Promise.resolve().then(function(){return hr(Z)})}().then(function(kr){return WebAssembly.instantiate(kr,Ge)}).then(or,function(kr){W("failed to asynchronously prepare wasm: "+kr),T(kr)})}if($(),r.instantiateWasm)try{return r.instantiateWasm(Ge,ke)}catch(or){return W("Module.instantiateWasm callback failed with error: "+or),!1}P||typeof WebAssembly.instantiateStreaming!="function"||ur(Z)||Dr(Z)||typeof fetch!="function"?Ht(Qe):fetch(Z,{credentials:"same-origin"}).then(function(or){return WebAssembly.instantiateStreaming(or,Ge).then(Qe,function(kr){return W("wasm streaming compile failed: "+kr),W("falling back to ArrayBuffer instantiation"),Ht(Qe)})})}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r._malloc=function(){return(Me=r._malloc=r.asm.malloc).apply(null,arguments)}),it=(r._calloc=function(){return(r._calloc=r.asm.calloc).apply(null,arguments)},r._realloc=function(){return(r._realloc=r.asm.realloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},r._ts_language_symbol_count=function(){return(r._ts_language_symbol_count=r.asm.ts_language_symbol_count).apply(null,arguments)},r._ts_language_version=function(){return(r._ts_language_version=r.asm.ts_language_version).apply(null,arguments)},r._ts_language_field_count=function(){return(r._ts_language_field_count=r.asm.ts_language_field_count).apply(null,arguments)},r._ts_language_symbol_name=function(){return(r._ts_language_symbol_name=r.asm.ts_language_symbol_name).apply(null,arguments)},r._ts_language_symbol_for_name=function(){return(r._ts_language_symbol_for_name=r.asm.ts_language_symbol_for_name).apply(null,arguments)},r._ts_language_symbol_type=function(){return(r._ts_language_symbol_type=r.asm.ts_language_symbol_type).apply(null,arguments)},r._ts_language_field_name_for_id=function(){return(r._ts_language_field_name_for_id=r.asm.ts_language_field_name_for_id).apply(null,arguments)},r._memcpy=function(){return(r._memcpy=r.asm.memcpy).apply(null,arguments)},r._ts_parser_delete=function(){return(r._ts_parser_delete=r.asm.ts_parser_delete).apply(null,arguments)},r._ts_parser_reset=function(){return(r._ts_parser_reset=r.asm.ts_parser_reset).apply(null,arguments)},r._ts_parser_set_language=function(){return(r._ts_parser_set_language=r.asm.ts_parser_set_language).apply(null,arguments)},r._ts_parser_timeout_micros=function(){return(r._ts_parser_timeout_micros=r.asm.ts_parser_timeout_micros).apply(null,arguments)},r._ts_parser_set_timeout_micros=function(){return(r._ts_parser_set_timeout_micros=r.asm.ts_parser_set_timeout_micros).apply(null,arguments)},r._memmove=function(){return(r._memmove=r.asm.memmove).apply(null,arguments)},r._memcmp=function(){return(r._memcmp=r.asm.memcmp).apply(null,arguments)},r._ts_query_new=function(){return(r._ts_query_new=r.asm.ts_query_new).apply(null,arguments)},r._ts_query_delete=function(){return(r._ts_query_delete=r.asm.ts_query_delete).apply(null,arguments)},r._iswspace=function(){return(r._iswspace=r.asm.iswspace).apply(null,arguments)},r._iswalnum=function(){return(r._iswalnum=r.asm.iswalnum).apply(null,arguments)},r._ts_query_pattern_count=function(){return(r._ts_query_pattern_count=r.asm.ts_query_pattern_count).apply(null,arguments)},r._ts_query_capture_count=function(){return(r._ts_query_capture_count=r.asm.ts_query_capture_count).apply(null,arguments)},r._ts_query_string_count=function(){return(r._ts_query_string_count=r.asm.ts_query_string_count).apply(null,arguments)},r._ts_query_capture_name_for_id=function(){return(r._ts_query_capture_name_for_id=r.asm.ts_query_capture_name_for_id).apply(null,arguments)},r._ts_query_string_value_for_id=function(){return(r._ts_query_string_value_for_id=r.asm.ts_query_string_value_for_id).apply(null,arguments)},r._ts_query_predicates_for_pattern=function(){return(r._ts_query_predicates_for_pattern=r.asm.ts_query_predicates_for_pattern).apply(null,arguments)},r._ts_tree_copy=function(){return(r._ts_tree_copy=r.asm.ts_tree_copy).apply(null,arguments)},r._ts_tree_delete=function(){return(r._ts_tree_delete=r.asm.ts_tree_delete).apply(null,arguments)},r._ts_init=function(){return(r._ts_init=r.asm.ts_init).apply(null,arguments)},r._ts_parser_new_wasm=function(){return(r._ts_parser_new_wasm=r.asm.ts_parser_new_wasm).apply(null,arguments)},r._ts_parser_enable_logger_wasm=function(){return(r._ts_parser_enable_logger_wasm=r.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},r._ts_parser_parse_wasm=function(){return(r._ts_parser_parse_wasm=r.asm.ts_parser_parse_wasm).apply(null,arguments)},r._ts_language_type_is_named_wasm=function(){return(r._ts_language_type_is_named_wasm=r.asm.ts_language_type_is_named_wasm).apply(null,arguments)},r._ts_language_type_is_visible_wasm=function(){return(r._ts_language_type_is_visible_wasm=r.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},r._ts_tree_root_node_wasm=function(){return(r._ts_tree_root_node_wasm=r.asm.ts_tree_root_node_wasm).apply(null,arguments)},r._ts_tree_edit_wasm=function(){return(r._ts_tree_edit_wasm=r.asm.ts_tree_edit_wasm).apply(null,arguments)},r._ts_tree_get_changed_ranges_wasm=function(){return(r._ts_tree_get_changed_ranges_wasm=r.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},r._ts_tree_cursor_new_wasm=function(){return(r._ts_tree_cursor_new_wasm=r.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},r._ts_tree_cursor_delete_wasm=function(){return(r._ts_tree_cursor_delete_wasm=r.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},r._ts_tree_cursor_reset_wasm=function(){return(r._ts_tree_cursor_reset_wasm=r.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_first_child_wasm=function(){return(r._ts_tree_cursor_goto_first_child_wasm=r.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_next_sibling_wasm=function(){return(r._ts_tree_cursor_goto_next_sibling_wasm=r.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_parent_wasm=function(){return(r._ts_tree_cursor_goto_parent_wasm=r.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_type_id_wasm=function(){return(r._ts_tree_cursor_current_node_type_id_wasm=r.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_is_named_wasm=function(){return(r._ts_tree_cursor_current_node_is_named_wasm=r.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_is_missing_wasm=function(){return(r._ts_tree_cursor_current_node_is_missing_wasm=r.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_id_wasm=function(){return(r._ts_tree_cursor_current_node_id_wasm=r.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},r._ts_tree_cursor_start_position_wasm=function(){return(r._ts_tree_cursor_start_position_wasm=r.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},r._ts_tree_cursor_end_position_wasm=function(){return(r._ts_tree_cursor_end_position_wasm=r.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},r._ts_tree_cursor_start_index_wasm=function(){return(r._ts_tree_cursor_start_index_wasm=r.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},r._ts_tree_cursor_end_index_wasm=function(){return(r._ts_tree_cursor_end_index_wasm=r.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},r._ts_tree_cursor_current_field_id_wasm=function(){return(r._ts_tree_cursor_current_field_id_wasm=r.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_wasm=function(){return(r._ts_tree_cursor_current_node_wasm=r.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},r._ts_node_symbol_wasm=function(){return(r._ts_node_symbol_wasm=r.asm.ts_node_symbol_wasm).apply(null,arguments)},r._ts_node_child_count_wasm=function(){return(r._ts_node_child_count_wasm=r.asm.ts_node_child_count_wasm).apply(null,arguments)},r._ts_node_named_child_count_wasm=function(){return(r._ts_node_named_child_count_wasm=r.asm.ts_node_named_child_count_wasm).apply(null,arguments)},r._ts_node_child_wasm=function(){return(r._ts_node_child_wasm=r.asm.ts_node_child_wasm).apply(null,arguments)},r._ts_node_named_child_wasm=function(){return(r._ts_node_named_child_wasm=r.asm.ts_node_named_child_wasm).apply(null,arguments)},r._ts_node_child_by_field_id_wasm=function(){return(r._ts_node_child_by_field_id_wasm=r.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},r._ts_node_next_sibling_wasm=function(){return(r._ts_node_next_sibling_wasm=r.asm.ts_node_next_sibling_wasm).apply(null,arguments)},r._ts_node_prev_sibling_wasm=function(){return(r._ts_node_prev_sibling_wasm=r.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},r._ts_node_next_named_sibling_wasm=function(){return(r._ts_node_next_named_sibling_wasm=r.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},r._ts_node_prev_named_sibling_wasm=function(){return(r._ts_node_prev_named_sibling_wasm=r.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},r._ts_node_parent_wasm=function(){return(r._ts_node_parent_wasm=r.asm.ts_node_parent_wasm).apply(null,arguments)},r._ts_node_descendant_for_index_wasm=function(){return(r._ts_node_descendant_for_index_wasm=r.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},r._ts_node_named_descendant_for_index_wasm=function(){return(r._ts_node_named_descendant_for_index_wasm=r.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},r._ts_node_descendant_for_position_wasm=function(){return(r._ts_node_descendant_for_position_wasm=r.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},r._ts_node_named_descendant_for_position_wasm=function(){return(r._ts_node_named_descendant_for_position_wasm=r.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},r._ts_node_start_point_wasm=function(){return(r._ts_node_start_point_wasm=r.asm.ts_node_start_point_wasm).apply(null,arguments)},r._ts_node_end_point_wasm=function(){return(r._ts_node_end_point_wasm=r.asm.ts_node_end_point_wasm).apply(null,arguments)},r._ts_node_start_index_wasm=function(){return(r._ts_node_start_index_wasm=r.asm.ts_node_start_index_wasm).apply(null,arguments)},r._ts_node_end_index_wasm=function(){return(r._ts_node_end_index_wasm=r.asm.ts_node_end_index_wasm).apply(null,arguments)},r._ts_node_to_string_wasm=function(){return(r._ts_node_to_string_wasm=r.asm.ts_node_to_string_wasm).apply(null,arguments)},r._ts_node_children_wasm=function(){return(r._ts_node_children_wasm=r.asm.ts_node_children_wasm).apply(null,arguments)},r._ts_node_named_children_wasm=function(){return(r._ts_node_named_children_wasm=r.asm.ts_node_named_children_wasm).apply(null,arguments)},r._ts_node_descendants_of_type_wasm=function(){return(r._ts_node_descendants_of_type_wasm=r.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},r._ts_node_is_named_wasm=function(){return(r._ts_node_is_named_wasm=r.asm.ts_node_is_named_wasm).apply(null,arguments)},r._ts_node_has_changes_wasm=function(){return(r._ts_node_has_changes_wasm=r.asm.ts_node_has_changes_wasm).apply(null,arguments)},r._ts_node_has_error_wasm=function(){return(r._ts_node_has_error_wasm=r.asm.ts_node_has_error_wasm).apply(null,arguments)},r._ts_node_is_missing_wasm=function(){return(r._ts_node_is_missing_wasm=r.asm.ts_node_is_missing_wasm).apply(null,arguments)},r._ts_query_matches_wasm=function(){return(r._ts_query_matches_wasm=r.asm.ts_query_matches_wasm).apply(null,arguments)},r._ts_query_captures_wasm=function(){return(r._ts_query_captures_wasm=r.asm.ts_query_captures_wasm).apply(null,arguments)},r._iswdigit=function(){return(r._iswdigit=r.asm.iswdigit).apply(null,arguments)},r._iswalpha=function(){return(r._iswalpha=r.asm.iswalpha).apply(null,arguments)},r._iswlower=function(){return(r._iswlower=r.asm.iswlower).apply(null,arguments)},r._towupper=function(){return(r._towupper=r.asm.towupper).apply(null,arguments)},r.___errno_location=function(){return(it=r.___errno_location=r.asm.__errno_location).apply(null,arguments)}),dt=(r._memchr=function(){return(r._memchr=r.asm.memchr).apply(null,arguments)},r._strlen=function(){return(r._strlen=r.asm.strlen).apply(null,arguments)},r.stackSave=function(){return(dt=r.stackSave=r.asm.stackSave).apply(null,arguments)}),br=r.stackRestore=function(){return(br=r.stackRestore=r.asm.stackRestore).apply(null,arguments)},cr=r.stackAlloc=function(){return(cr=r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},Or=r._setThrew=function(){return(Or=r._setThrew=r.asm.setThrew).apply(null,arguments)};r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},r.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(r.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=r.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=r.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=r.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},r.__Znwm=function(){return(r.__Znwm=r.asm._Znwm).apply(null,arguments)},r.__ZdlPv=function(){return(r.__ZdlPv=r.asm._ZdlPv).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r._orig$ts_parser_timeout_micros=function(){return(r._orig$ts_parser_timeout_micros=r.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},r._orig$ts_parser_set_timeout_micros=function(){return(r._orig$ts_parser_set_timeout_micros=r.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)};function Sr(Ge){this.name="ExitStatus",this.message="Program terminated with exit("+Ge+")",this.status=Ge}r.allocate=function(Ge,ke){var Qe;return Qe=ke==He?cr(Ge.length):Me(Ge.length),Ge.subarray||Ge.slice?Rt.set(Ge,Qe):Rt.set(new Uint8Array(Ge),Qe),Qe},de=function Ge(){K||on(),K||(de=Ge)};var Kr=!1;function on(Ge){function ke(){K||(K=!0,r.calledRun=!0,ft||(ce=!0,Nr(rt),Nr(lt),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Rn&&function(Qe){var Ht=r._main;if(Ht){var or=(Qe=Qe||[]).length+1,kr=cr(4*(or+1));vr[kr>>2]=Nt(y);for(var $r=1;$r>2)+$r]=Nt(Qe[$r-1]);vr[(kr>>2)+or]=0;try{Sn(Ht(or,kr),!0)}catch(dn){if(dn instanceof Sr||dn=="unwind")return;var Vr=dn;dn&&typeof dn=="object"&&dn.stack&&(Vr=[dn,dn.stack]),W("exception thrown: "+Vr),_(1,dn)}finally{}}}(Ge),function(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Qe=r.postRun.shift(),jt.unshift(Qe);var Qe;Nr(jt)}()))}Ge=Ge||b,ie>0||!Kr&&(function(){if(ee.length){if(!D)return $(),void ee.reduce(function(Qe,Ht){return Qe.then(function(){return pa(Ht,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){C(),ue()});ee.forEach(function(Qe){pa(Qe,{global:!0,nodelete:!0,allowUndefined:!0})}),ue()}else ue()}(),Kr=!0,ie>0)||(function(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Qe=r.preRun.shift(),Be.unshift(Qe);var Qe;Nr(Be)}(),ie>0||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),ke()},1)):ke()))}function Sn(Ge,ke){ke&&In()&&Ge===0||(In()||(r.onExit&&r.onExit(Ge),ft=!0),_(Ge,new Sr(Ge)))}if(r.run=on,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();var Rn=!0;r.noInitialRun&&(Rn=!1),on();const ir=r,gr={},Gt=4,jr=5*Gt,Pr=2*Gt,Lr=2*Gt+2*Pr,Wr={row:0,column:0},Fn=/[\w-.]*/g,Jn=1,fi=2,si=/^_?tree_sitter_\w+/;var Et,pi,cn,mi,Qn;class Ai{static init(){cn=ir._ts_init(),Et=J(cn,"i32"),pi=J(cn+Gt,"i32")}initialize(){ir._ts_parser_new_wasm(),this[0]=J(cn,"i32"),this[1]=J(cn+Gt,"i32")}delete(){ir._ts_parser_delete(this[0]),ir._free(this[1]),this[0]=0,this[1]=0}setLanguage(ke){let Qe;if(ke){if(ke.constructor!==Li)throw new Error("Argument must be a Language");{Qe=ke[0];const Ht=ir._ts_language_version(Qe);if(Htke.slice(dn,qn);else{if(typeof ke!="function")throw new Error("Argument must be a string or a function");mi=ke}this.logCallback?(Qn=this.logCallback,ir._ts_parser_enable_logger_wasm(this[0],1)):(Qn=null,ir._ts_parser_enable_logger_wasm(this[0],0));let or=0,kr=0;if(Ht&&Ht.includedRanges){or=Ht.includedRanges.length;let dn=kr=ir._calloc(or,Lr);for(let yi=0;yi0){let kr=Ht;for(let $r=0;$r0){let Ht=Qe;for(let or=0;or0){let Ht=Qe;for(let or=0;or0){let qn=dn;for(let wi=0;wi>0];if(!kr)return or;or+=String.fromCharCode(kr)}}(ke);return ir._free(ke),Qe}}class ji{constructor(ke,Qe){To(ke),this.tree=Qe,Vd(this)}delete(){Ea(this),ir._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(ke){Zn(ke),Ea(this,cn+jr),ir._ts_tree_cursor_reset_wasm(this.tree[0]),Vd(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return Ea(this),ir._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return Ea(this),ir._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return Ea(this),ir._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return Ea(this),ir._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){Ea(this);const ke=ir._ts_tree_cursor_start_index_wasm(this.tree[0]),Qe=ir._ts_tree_cursor_end_index_wasm(this.tree[0]);return wo(this.tree,ke,Qe)}get startPosition(){return Ea(this),ir._ts_tree_cursor_start_position_wasm(this.tree[0]),qd(cn)}get endPosition(){return Ea(this),ir._ts_tree_cursor_end_position_wasm(this.tree[0]),qd(cn)}get startIndex(){return Ea(this),ir._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return Ea(this),ir._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return Ea(this),ir._ts_tree_cursor_current_node_wasm(this.tree[0]),Fo(this.tree)}currentFieldId(){return Ea(this),ir._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){Ea(this);const ke=ir._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return Vd(this),ke===1}gotoNextSibling(){Ea(this);const ke=ir._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return Vd(this),ke===1}gotoParent(){Ea(this);const ke=ir._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return Vd(this),ke===1}}class Li{constructor(ke,Qe){To(ke),this[0]=Qe,this.types=new Array(ir._ts_language_symbol_count(this[0]));for(let Ht=0,or=this.types.length;Ht0){if(Un[0].type!=="string")throw new Error("Predicates must begin with a literal value");const Kd=Un[0].value;let Mc=!0;switch(Kd){case"not-eq?":Mc=!1;case"eq?":if(Un.length!==3)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${Un.length-1}`);if(Un[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${Un[1].value}"`);if(Un[2].type==="capture"){const Ml=Un[1].name,Vu=Un[2].name;Aa[ii].push(function(xp){let qu,Bg;for(const _p of xp)_p.name===Ml&&(qu=_p.node),_p.name===Vu&&(Bg=_p.node);return qu===void 0||Bg===void 0||qu.text===Bg.text===Mc})}else{const Ml=Un[1].name,Vu=Un[2].value;Aa[ii].push(function(xp){for(const qu of xp)if(qu.name===Ml)return qu.node.text===Vu===Mc;return!0})}break;case"not-match?":Mc=!1;case"match?":if(Un.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${Un.length-1}.`);if(Un[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${Un[1].value}".`);if(Un[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${Un[2].value}.`);const qy=Un[1].name,Xx=new RegExp(Un[2].value);Aa[ii].push(function(Ml){for(const Vu of Ml)if(Vu.name===qy)return Xx.test(Vu.node.text)===Mc;return!0});break;case"set!":if(Un.length<2||Un.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${Un.length-1}.`);if(Un.some(Ml=>Ml.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');qn[ii]||(qn[ii]={}),qn[ii][Un[1].value]=Un[2]?Un[2].value:null;break;case"is?":case"is-not?":if(Un.length<2||Un.length>3)throw new Error(`Wrong number of arguments to \`#${Kd}\` predicate. Expected 1 or 2. Got ${Un.length-1}.`);if(Un.some(Ml=>Ml.type!=="string"))throw new Error(`Arguments to \`#${Kd}\` predicate must be a strings.".`);const wp=Kd==="is?"?wi:so;wp[ii]||(wp[ii]={}),wp[ii][Un[1].value]=Un[2]?Un[2].value:null;break;default:Ko[ii].push({operator:Kd,operands:Un.slice(1)})}Un.length=0}}Object.freeze(qn[ii]),Object.freeze(wi[ii]),Object.freeze(so[ii])}return ir._free(Ht),new bo(gr,or,dn,Aa,Ko,Object.freeze(qn),Object.freeze(wi),Object.freeze(so))}static load(ke){let Qe;if(ke instanceof Uint8Array)Qe=Promise.resolve(ke);else{const or=ke;if(typeof process<"u"&&process.versions&&process.versions.node){const kr=Nm;Qe=Promise.resolve(kr.readFileSync(or))}else Qe=fetch(or).then(kr=>kr.arrayBuffer().then($r=>{if(kr.ok)return new Uint8Array($r);{const Vr=new TextDecoder("utf-8").decode($r);throw new Error(`Language.load failed with status ${kr.status}. + +${Vr}`)}}))}const Ht=typeof loadSideModule=="function"?loadSideModule:Wi;return Qe.then(or=>Ht(or,{loadAsync:!0})).then(or=>{const kr=Object.keys(or),$r=kr.find(dn=>si.test(dn)&&!dn.includes("external_scanner_"));$r||console.log(`Couldn't find language function in WASM file. Symbols: +${JSON.stringify(kr,null,2)}`);const Vr=or[$r]();return new Li(gr,Vr)})}}class bo{constructor(ke,Qe,Ht,or,kr,$r,Vr,dn){To(ke),this[0]=Qe,this.captureNames=Ht,this.textPredicates=or,this.predicates=kr,this.setProperties=$r,this.assertedProperties=Vr,this.refutedProperties=dn,this.exceededMatchLimit=!1}delete(){ir._ts_query_delete(this[0]),this[0]=0}matches(ke,Qe,Ht,or){Qe||(Qe=Wr),Ht||(Ht=Wr),or||(or={});let kr=or.matchLimit;if(kr===void 0)kr=0;else if(typeof kr!="number")throw new Error("Arguments must be numbers");Zn(ke),ir._ts_query_matches_wasm(this[0],ke.tree[0],Qe.row,Qe.column,Ht.row,Ht.column,kr);const $r=J(cn,"i32"),Vr=J(cn+Gt,"i32"),dn=J(cn+2*Gt,"i32"),yi=new Array($r);this.exceededMatchLimit=!!dn;let qn=0,wi=Vr;for(let so=0;so<$r;so++){const Ko=J(wi,"i32"),Aa=J(wi+=Gt,"i32");wi+=Gt;const ii=new Array(Aa);if(wi=$o(this,ke.tree,wi,ii),this.textPredicates[Ko].every(Oi=>Oi(ii))){yi[qn++]={pattern:Ko,captures:ii};const Oi=this.setProperties[Ko];Oi&&(yi[so].setProperties=Oi);const $i=this.assertedProperties[Ko];$i&&(yi[so].assertedProperties=$i);const Un=this.refutedProperties[Ko];Un&&(yi[so].refutedProperties=Un)}}return yi.length=qn,ir._free(Vr),yi}captures(ke,Qe,Ht,or){Qe||(Qe=Wr),Ht||(Ht=Wr),or||(or={});let kr=or.matchLimit;if(kr===void 0)kr=0;else if(typeof kr!="number")throw new Error("Arguments must be numbers");Zn(ke),ir._ts_query_captures_wasm(this[0],ke.tree[0],Qe.row,Qe.column,Ht.row,Ht.column,kr);const $r=J(cn,"i32"),Vr=J(cn+Gt,"i32"),dn=J(cn+2*Gt,"i32"),yi=[];this.exceededMatchLimit=!!dn;const qn=[];let wi=Vr;for(let so=0;so<$r;so++){const Ko=J(wi,"i32"),Aa=J(wi+=Gt,"i32"),ii=J(wi+=Gt,"i32");if(wi+=Gt,qn.length=Aa,wi=$o(this,ke.tree,wi,qn),this.textPredicates[Ko].every(Oi=>Oi(qn))){const Oi=qn[ii],$i=this.setProperties[Ko];$i&&(Oi.setProperties=$i);const Un=this.assertedProperties[Ko];Un&&(Oi.assertedProperties=Un);const xo=this.refutedProperties[Ko];xo&&(Oi.refutedProperties=xo),yi.push(Oi)}}return ir._free(Vr),yi}predicatesForPattern(ke){return this.predicates[ke]}didExceedMatchLimit(){return this.exceededMatchLimit}}function wo(Ge,ke,Qe){const Ht=Qe-ke;let or=Ge.textCallback(ke,null,Qe);for(ke+=or.length;ke0))break;ke+=kr.length,or+=kr}return ke>Qe&&(or=or.slice(0,Ht)),or}function $o(Ge,ke,Qe,Ht){for(let or=0,kr=Ht.length;or{Ai.init(),c()}}))}}return s}();e.exports=i})(wj);const v4=wj.exports,xj=()=>(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch{}return!1})(),iwe=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";let b4;const owe=async(e,t)=>{if(b4)return;const r={locateFile(){return e}};await v4.init(r),b4=await v4.Language.load(t)},awe=()=>{const e=new v4;return e.setLanguage(b4),e.setTimeoutMicros(1e3*1e3),e};async function swe(e){return xj()?(wa(ha.GETTER_PARSE_START),await owe("./tree-sitter.wasm","./tree-sitter-func.wasm"),awe().parse(e).rootNode.children.filter(a=>a.type==="function_definition"&&a.children.find(s=>s.type==="specifiers_list")?.text.includes("method_id")).map(a=>{const s=a.children[0].children.filter(c=>!c.type.match(/[,()]/)).map(c=>c.text),l=a.children.find(c=>c.type==="function_name").text,u=a.children.find(c=>c.type==="parameter_list").children.filter(c=>c.type==="parameter_declaration").map(c=>({type:c.child(0).text,name:c.child(1).text}));return{returnTypes:s,name:l,parameters:u}})):[]}const lwe=_g($x((e,t)=>({name:"",setName:r=>{e(i=>{i.name=r})},parameters:[],addParameter:()=>{e(r=>{const i=Math.random();r.parameters.push({name:"",_id:i,possibleTypes:["int","slice","address"],selectedTypeIdx:0,setValue:o=>r.parameters.find(a=>a._id===i).value=o,setName:o=>{e(a=>{a.parameters.find(s=>s._id===i).name=o})},toggleNextType:()=>{e(o=>{const a=o.parameters.find(s=>s._id===i);a.selectedTypeIdx=(a.selectedTypeIdx+1)%a.possibleTypes.length})},type:()=>{const o=t().parameters.find(a=>a._id===i);return o.possibleTypes[o.selectedTypeIdx]},originalType:()=>t().parameters.find(a=>a._id===i).possibleTypes[0],value:""})})},returnTypes:[],removeParameter:()=>{e(r=>{r.parameters.pop()})},clear:()=>{e(r=>{r.name="",r.parameters=[]})}})));function _j(){return lwe()}const $v=(e,t,r)=>e.find(i=>i.name===t).parameters.find(i=>i.name===r),Sj=_g($x((e,t)=>({getters:[],setGetters:r=>{e(i=>{const o=r.map(a=>({name:a.name,parameters:a.parameters.map(s=>{const l=[s.type];return["cell","slice"].includes(s.type)&&l.push("address"),{name:s.name,value:"",possibleTypes:l,selectedTypeIdx:0,toggleNextType:()=>{e(u=>{const c=$v(u.getters,a.name,s.name);c.selectedTypeIdx=(c.selectedTypeIdx+1)%c.possibleTypes.length})},type:()=>{const u=$v(t().getters,a.name,s.name);return u.possibleTypes[u.selectedTypeIdx]},originalType:()=>$v(t().getters,a.name,s.name).possibleTypes[0],setValue:u=>{e(c=>{const d=$v(c.getters,a.name,s.name);d.value=u})}}}),returnTypes:a.returnTypes}));i.getters=o})}})));function xE(){const{getters:e}=Sj();return{getters:e}}function uwe(){const{data:e}=Pc(),{setGetters:t}=Sj(),{clear:r}=_j(),{contractAddress:i}=$u();X.exports.useEffect(()=>{t([]),r()},[i]),X.exports.useEffect(()=>{(async()=>{const o=[];for(const a of e?.files??[])!a.name.match(/\.(fc|func)/)||o.push(...await swe(a.content));t(o),r()})()},[e?.files])}function cwe(e=[]){const t=new Vn.TupleBuilder;return e.forEach(r=>{if(r instanceof Vn.Cell)t.writeSlice(r);else if(typeof r=="bigint")t.writeNumber(r);else throw new Error("unknown type!")}),t.build()}function dwe(e){const t=[];for(;e.remaining;){const r=e.pop();switch(r.type){case"int":{t.push(r.value);break}case"cell":{t.push(r.cell);break}case"tuple":{if(r.items.length===0)t.push(null);else throw new Error("list parsing not supported");break}default:throw new Error(`unknown type: ${r.type}`)}}return t}async function fwe(e,t,r,i,o){const{stack:a}=await o.runMethod(e,t,cwe(r));return i(dwe(a))}function Cj(e){const{contractAddress:t}=$u(),{getters:r}=xE();return hU([t,"getter",e.name],async()=>{const i=await yp();return!t||!r?void 0:(wa(ha.RUN_GETTER),fwe(Vn.Address.parse(t),e.name,e.parameters.map(a=>{switch(a.possibleTypes[a.selectedTypeIdx]){case"int":return BigInt(a.value);case"address":return Vn.beginCell().storeAddress(Vn.Address.parse(a.value)).endCell();default:return Vn.Cell.fromBoc(Buffer.from(a.value,"base64"))[0]}}),a=>a.map(s=>{const l=[];if(s instanceof Vn.Cell){try{s.beginParse().remainingBits===267&&l.push({type:"address",value:s.beginParse().loadAddress().toString()})}catch{}l.push({type:"base64",value:s.toBoc().toString("base64")}),l.push({type:"boc",value:s.toString()})}else typeof s=="bigint"?(l.push({type:"int",value:s.toString()}),l.push({type:"coins",value:Vn.fromNano(s)}),l.push({type:"hex",value:s.toString(16)}),l.push({type:"base64",value:Buffer.from(s.toString(16),"hex").toString("base64")})):l.push({type:"raw",value:String(s)});return l}),i))})}var ps=(e=>(e.ERROR="Error",e.HINT="Hint",e.SUCCESS="Success",e.INFO="Info",e))(ps||{});const pwe=Xi(da)(e=>({padding:`${e.singleLine?0:15}px 25px`,marginBottom:e.noBottomMargin?0:24,marginTop:e.noTopMargin?0:24,background:e.backgroundColor||"",border:`1px solid ${e.borderColor||"#D8D8D8"}`,borderRadius:12}));function Cs({title:e,type:t,notificationBody:r,singleLine:i,noBottomMargin:o,noTopMargin:a}){let s,l;switch(t){case"Info":l="rgba(216, 216, 216, 0.2);";break;case"Error":s="rgba(252, 86, 86, 0.42);",l="rgba(252, 86, 86, 0.08);";break;case"Hint":l="rgba(94, 117, 232, 0.1);";break;case"Success":l="#D6FFCE";break}return Ut(pwe,{singleLine:i,borderColor:s,backgroundColor:l,noBottomMargin:o,noTopMargin:a,children:[e,r]})}function hwe({parameter:e}){return Ut(Cc,{sx:{gap:1},children:[Ut(Cc,{sx:{gap:.5,flexDirection:"row"},children:[L(kn,{children:e.name}),L(bj,{sx:{cursor:e.possibleTypes.length>1?"pointer":"inherit"},onClick:()=>{e.toggleNextType()},children:e.type()})]}),L(rwe,{onChange:t=>{e.setValue(t.target.value)}})]})}function kj({getter:e}){return Ut(kn,{children:[L(kn,{sx:{mb:1},children:L("b",{children:"Request"})}),Ut(Cc,{sx:{gap:2},children:[e.parameters.map((t,r)=>L(hwe,{parameter:t},t.name)),(e.parameters.length??0)===0&&L(kn,{sx:{color:"#949597"},children:"(No params)"})]})]})}function gwe({value:e}){const[t,r]=X.exports.useState(0);return{onClick:()=>{r((t+1)%e.length)},type:e[t]?.type??"unknown",value:e[t].value}}function mwe({type:e,value:t}){const{type:r,value:i,onClick:o}=gwe({value:t}),{showNotification:a}=Ry();return Ut(xc,{sx:{gap:1,cursor:t.length>1?"pointer":"initial"},onClick:o,children:[L(G5,{children:L(bj,{children:r})}),L(G5,{width:"100%",children:L(twe,{children:i})}),L(G5,{children:L(Bs,{sx:{padding:0,opacity:.8},onClick:s=>{s.stopPropagation(),navigator.clipboard.writeText(i),a("Copied to clipboard!","success")},children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]})}function Ej({returnTypes:e,values:t,isLoading:r}){return Ut(ta,{children:[(t.length>0||r)&&L(kn,{children:L("b",{children:"Response"})}),t.length>0&&L(Cc,{sx:{gap:1.5},children:L(L6,{children:L(N6,{children:t.map((i,o)=>L(mwe,{type:e[o],value:i}))})})}),t.length===0&&r&&L(Cc,{sx:{gap:1},children:e.map(i=>L(Xa,{variant:"rounded",height:20}))})]})}function ywe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[Ut(kn,{sx:{flexGrow:1},children:[Ut(Jbe,{children:[e.name,"(",e.parameters.map(a=>a.originalType()).join(", "),")"]}),Ut(ewe,{children:[L("b",{children:"returns"})," ",e.returnTypes.join(", ")]})]}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function vwe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[L(kn,{sx:{flexGrow:1},children:L(nwe,{value:e.name,placeholder:"Get method name",onChange:a=>e.setName(a.target.value)})}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),Ut("div",{style:{width:300,display:"flex",gap:10},children:[L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.addParameter()},children:"Add parameter"}),L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.removeParameter()},children:"Remove parameter"})]}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function bwe(){const{getters:e}=xE(),t=_j();return Ut(kn,{sx:{display:"flex",gap:4,flexDirection:"column",mt:2},children:[e?.map(r=>L(ywe,{getter:r})),L(vwe,{getter:t})]})}const wwe=Xi($n)({justifyContent:"space-between",width:"100%"}),xwe=Xi(kn)({position:"relative"}),_we=Xi(kn)({position:"absolute",top:"80px",right:"40px",zIndex:3}),Swe=Xi(H7)({borderBottom:"1px solid #E8E8E8","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function Cwe(){const{data:e}=Pc(),[t,r]=X.exports.useState(void 0),i=aa("(max-width: 450px)"),o=aa("(max-width: 600px)"),{showNotification:a}=Ry(),s=(c,d)=>{r(d)},l=X.exports.useCallback(async c=>{const d=document.querySelector(c===1?"#myVerifierContent > pre > code > .contract-verifier-code-content":"pre > code > div.hljs.language-fift");navigator.clipboard.writeText(d?.innerText),a("Copied to clipboard!","success")},[]);X.exports.useEffect(()=>{r(e?.hasOnchainProof?0:1)},[e?.hasOnchainProof]);const{getters:u}=xE();return Ut(kn,{sx:{border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",borderRadius:"20px",position:"relative"},children:[L(p2,{mb:1,children:Ut(wwe,{children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:Gbe,alt:"Block icon",width:41,height:41})}),Ut(Fd,{children:[!!e?.hasOnchainProof&&"Verified"," Source ",i&&L("br",{})," ","Code"]})]}),t===0&&L(kn,{sx:{alignSelf:"baseline",position:"relative",top:o?"5px":"3px"},children:Ut(Ha,{fontSize:12,fontWeight:500,hoverBackground:"#F5F5F5",background:"#F2F2F2",height:o?30:37,width:o?30:167,onClick:()=>{e?.files?.length&&Xbe(e.files)},children:[L("img",{src:Ybe,alt:"Download icon",width:19,height:19}),o?"":"Download sources"]})})]})}),Ut(xwe,{p:3,children:[Ut(Swe,{value:t,onChange:s,children:[L(Q_,{sx:{textTransform:"none"},disabled:!e?.hasOnchainProof,label:"Sources"}),L(Q_,{sx:{textTransform:"none"},label:"Disassembled"}),L(Q_,{sx:{textTransform:"none"},label:`Getters (${u?.length??0})`})]}),L(kn,{sx:{display:t===0?"block":"none"},children:L(G1e,{button:L(vM,{onCopy:l,copyText:1})})}),L(kn,{sx:{display:t===1?"block":"none"},children:L(Kbe,{button:L(vM,{onCopy:l,copyText:0})})}),L(kn,{sx:{display:t===2?"block":"none"},children:L(bwe,{})})]})]})}const vM=({copyText:e,onCopy:t})=>L(_we,{children:L(Bs,{onClick:()=>t(e),children:L("img",{alt:"Copy Icon",src:Wx,width:16,height:16})})});function kwe(){const{contractAddress:e}=$u(),t=Bx(),[r]=yw(),[i,o]=X.exports.useState(!1);return X.exports.useEffect(()=>{(async()=>{if(!(!t||!e)){if(r.get("override")!==null){const a=await yp();if(await JN(Vn.Address.parse(window.sourcesRegistryAddress),a)===t){o(!0);return}}o(!1)}})()},[t,e]),i}const hc={COMPILE:"COMPILE",PUBLISH:"PUBLISH"},sc={SOURCES:"SOURCES",PUBLISH:"PUBLISH"},bM=()=>({step:hc.COMPILE,currentSection:sc.SOURCES}),Ewe=e=>({...bM(),proceedToPublish:()=>{e({step:hc.PUBLISH,currentSection:sc.PUBLISH})},toggleSection:t=>{e({currentSection:t})},reset:()=>{e(bM())}}),Vx=Py(Ewe),Aj=_g(e=>({isPreloaded:!1,markPreloaded:()=>{e({isPreloaded:!0})},clearPreloaded:()=>{e({isPreloaded:!1})}}));function Awe(){const{contractAddress:e}=$u(),t=Hu(),{reset:r}=zu(),{reset:i}=Vx(),{isPreloaded:o,clearPreloaded:a}=Aj();X.exports.useEffect(()=>{o?a():r(),i(),t.invalidate()},[e])}const _E="/assets/contract.ff46c407.svg",Twe=Xi(ug)({minWidth:100}),Iwe=Xi(kn)(e=>({display:e.isShrinked&&!e.isExtraSmallScreen?"flex":"inherit",flexWrap:e.isShrinked&&!e.isExtraSmallScreen?"wrap":"inherit",columnGap:e.isShrinked&&!e.isExtraSmallScreen?30:"",padding:e.isShrinked&&!e.isExtraSmallScreen?"0 30px":"","&>*:last-child":{borderBottom:e.isShrinked?"":"none !important"},"&:last-child":{marginBottom:3}})),Rwe=Xi($n)(e=>({boxSizing:e.isShrinked?"border-box":"inherit",flex:e.isShrinked?"40%":"inherit",width:e.isShrinked&&!e.isExtraSmallScreen?0:e.isShrinked&&e.isExtraSmallScreen?"100%":"",minHeight:38,padding:"10px 24px",transition:"background .15s",borderTop:"1px solid rgba(114, 138, 150, 0.2)"})),Tj=Xi(jo)({fontSize:14,color:"#000",minWidth:90,fontWeight:800}),Ij=Xi(jo)({width:"100%",wordBreak:"break-word",fontSize:14,color:"#728A96"}),Pwe=Xi($n)({minWidth:25,justifyContent:"flex-end"}),Mwe=(e,t,r,i)=>Ut(({children:s})=>r?L($7,{placement:"top-start",title:e,children:L("span",{children:s})}):L(ta,{children:s}),{children:[L(({children:s})=>t&&!!e?L(uc,{target:"_blank",href:t,sx:{textDecoration:"none",cursor:"pointer"},children:s}):L(ta,{children:s}),{children:e??"-"}),L(kn,{sx:{fontSize:12,opacity:.8},children:i??""})]});function SE({isFlexibleWrapper:e,icon:t,title:r,dataRows:i,isLoading:o}){const a=e?Twe:ug,{showNotification:s}=Ry(),l=aa("(max-width: 500px)"),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(a,{pb:e?0:2,children:[Ut(p2,{mb:1,children:[L(cg,{children:L("img",{src:t,alt:"Block icon",width:41,height:41})}),L(Fd,{children:r})]}),L(Iwe,{mt:2.5,isShrinked:!e,isExtraSmallScreen:l,children:i.map(({title:c,value:d,showIcon:p,color:v,customLink:x,tooltip:b,onClick:y,subtitle:_})=>Ut(Rwe,{isExtraSmallScreen:l,isShrinked:!e,children:[L(Tj,{children:c}),L(Ij,{sx:{cursor:y?"pointer":"initial"},onClick:y,children:Mwe(d,x,b,_)}),p&&L(Pwe,{children:d&&L(Bs,{sx:{padding:0},onClick:()=>u(d),children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]},c))})]})}function Rj(e){try{const t=Vn.Address.parse(e);switch(t.workChain){case-1:return"Masterchain (-1)";case 0:return"Basic Workchain (0)";default:return`${t.workChain}`}}catch{return""}}const Owe=new Intl.NumberFormat("en-US",{minimumFractionDigits:4});function Y5(e,t){const[r,i]=X.exports.useState(e);return X.exports.useEffect(()=>{i(e)},[e,t]),[r,()=>{i(r===e?t:e)}]}function Bwe(){const{contractAddress:e,contractAddressHex:t}=$u(),{data:r,isLoading:i}=vp(),{data:o}=Pc(),a=[],[s,l]=Y5(e,t),[u,c]=Y5(r?.codeCellHash.base64,r?.codeCellHash.hex),[d,p]=Y5(r?.dataCellHash.base64,r?.dataCellHash.hex);return r&&(a.push({title:"Address",value:s??"",showIcon:!0,onClick:()=>{l()},tooltip:!0,subtitle:Rj(e||"")}),a.push({title:"Balance",value:`${Owe.format(parseFloat(r.balance))} TON`}),a.push({title:"Code Hash",value:u??"",showIcon:!0,onClick:()=>{c()},tooltip:!0}),a.push({title:"Data Hash",value:d??"",showIcon:!0,onClick:()=>{p()},tooltip:!0})),L(SE,{title:"Contract",icon:_E,dataRows:a,isLoading:i,isFlexibleWrapper:!!o?.hasOnchainProof})}const Uwe="/assets/compiler.05d3a143.svg";var Pj="en",CE={},w4={};function Mj(){return Pj}function Dwe(e){Pj=e}function Lwe(e){return CE[e]}function Nwe(e){if(!e)throw new Error("No locale data passed");CE[e.locale]=e,w4[e.locale.toLowerCase()]=e.locale}function wM(e){if(CE[e])return e;if(w4[e.toLowerCase()])return w4[e.toLowerCase()]}function Oj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.localeMatcher||"lookup";switch(r){case"lookup":return xM(e);case"best fit":return xM(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function xM(e){var t=wM(e);if(t)return t;for(var r=e.split("-");e.length>1;){r.pop(),e=r.join("-");var i=wM(e);if(i)return i}}var er={af:function(t){return t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"},ast:function(t){var r=String(t).split("."),i=!r[1];return t==1&&i?"one":"other"},be:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2);return o==1&&a!=11?"one":o>=2&&o<=4&&(a<12||a>14)?"few":i&&o==0||o>=5&&o<=9||a>=11&&a<=14?"many":"other"},br:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2),s=i&&r[0].slice(-6);return o==1&&a!=11&&a!=71&&a!=91?"one":o==2&&a!=12&&a!=72&&a!=92?"two":(o==3||o==4||o==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&i&&s==0?"many":"other"},bs:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":a&&s>=2&&s<=4&&(l<12||l>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1&&o?"one":i!=0&&a==0&&o?"many":"other"},ceb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=o.slice(-1);return a&&(i==1||i==2||i==3)||a&&s!=4&&s!=6&&s!=9||!a&&l!=4&&l!=6&&l!=9?"one":"other"},cs:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return t==1&&o?"one":i>=2&&i<=4&&o?"few":o?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var r=String(t).split("."),i=r[0],o=Number(r[0])==t;return t==1||!o&&(i==0||i==1)?"one":"other"},dsb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-2),l=o.slice(-2);return a&&s==1||l==1?"one":a&&s==2||l==2?"two":a&&(s==3||s==4)||l==3||l==4?"few":"other"},dz:function(t){return"other"},es:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1?"one":i!=0&&a==0&&o?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t>=0&&t<2?"one":i!=0&&a==0&&o?"many":"other"},ga:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1?"one":t==2?"two":i&&t>=3&&t<=6?"few":i&&t>=7&&t<=10?"many":"other"},gd:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1||t==11?"one":t==2||t==12?"two":i&&t>=3&&t<=10||i&&t>=13&&t<=19?"few":"other"},he:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return i==1&&o||i==0&&!o?"one":i==2&&o?"two":"other"},is:function(t){var r=String(t).split("."),i=r[0],o=(r[1]||"").replace(/0+$/,""),a=Number(r[0])==t,s=i.slice(-1),l=i.slice(-2);return a&&s==1&&l!=11||o%10==1&&o%100!=11?"one":"other"},ksh:function(t){return t==0?"zero":t==1?"one":"other"},lt:function(t){var r=String(t).split("."),i=r[1]||"",o=Number(r[0])==t,a=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return a==1&&(s<11||s>19)?"one":a>=2&&a<=9&&(s<11||s>19)?"few":i!=0?"many":"other"},lv:function(t){var r=String(t).split("."),i=r[1]||"",o=i.length,a=Number(r[0])==t,s=a&&r[0].slice(-1),l=a&&r[0].slice(-2),u=i.slice(-2),c=i.slice(-1);return a&&s==0||l>=11&&l<=19||o==2&&u>=11&&u<=19?"zero":s==1&&l!=11||o==2&&c==1&&u!=11||o!=2&&c==1?"one":"other"},mk:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":"other"},mt:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==1?"one":t==2?"two":t==0||o>=3&&o<=10?"few":o>=11&&o<=19?"many":"other"},pa:function(t){return t==0||t==1?"one":"other"},pl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return t==1&&o?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&i!=1&&(a==0||a==1)||o&&a>=5&&a<=9||o&&s>=12&&s<=14?"many":"other"},pt:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return i==0||i==1?"one":i!=0&&a==0&&o?"many":"other"},ro:function(t){var r=String(t).split("."),i=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-2);return t==1&&i?"one":!i||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return o&&a==1&&s!=11?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&s>=11&&s<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"";return t==0||t==1||i==0&&o==1?"one":"other"},sl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-2);return o&&a==1?"one":o&&a==2?"two":o&&(a==3||a==4)||!o?"few":"other"}};er.as=er.am;er.az=er.af;er.bg=er.af;er.bn=er.am;er.brx=er.af;er.ce=er.af;er.chr=er.af;er.de=er.ast;er.ee=er.af;er.el=er.af;er.en=er.ast;er.et=er.ast;er.eu=er.af;er.fa=er.am;er.fi=er.ast;er.fil=er.ceb;er.fo=er.af;er.fur=er.af;er.fy=er.ast;er.gl=er.ast;er.gu=er.am;er.ha=er.af;er.hi=er.am;er.hr=er.bs;er.hsb=er.dsb;er.hu=er.af;er.hy=er.ff;er.ia=er.ast;er.id=er.dz;er.ig=er.dz;er.it=er.ca;er.ja=er.dz;er.jgo=er.af;er.jv=er.dz;er.ka=er.af;er.kea=er.dz;er.kk=er.af;er.kl=er.af;er.km=er.dz;er.kn=er.am;er.ko=er.dz;er.ks=er.af;er.ku=er.af;er.ky=er.af;er.lb=er.af;er.lkt=er.dz;er.lo=er.dz;er.ml=er.af;er.mn=er.af;er.mr=er.af;er.ms=er.dz;er.my=er.dz;er.nb=er.af;er.ne=er.af;er.nl=er.ast;er.nn=er.af;er.no=er.af;er.or=er.af;er.pcm=er.am;er.ps=er.af;er.rm=er.af;er.sah=er.dz;er.sc=er.ast;er.sd=er.af;er.sk=er.cs;er.so=er.af;er.sq=er.af;er.sr=er.bs;er.su=er.dz;er.sv=er.ast;er.sw=er.ast;er.ta=er.af;er.te=er.af;er.th=er.dz;er.ti=er.pa;er.tk=er.af;er.to=er.dz;er.tr=er.af;er.ug=er.af;er.uk=er.ru;er.ur=er.ast;er.uz=er.af;er.vi=er.dz;er.wae=er.af;er.wo=er.dz;er.xh=er.af;er.yi=er.ast;er.yo=er.dz;er.yue=er.dz;er.zh=er.dz;er.zu=er.am;const _M=er;function SM(e){return e==="pt-PT"?e:$we(e)}var jwe=/^([a-z0-9]+)/i;function $we(e){var t=e.match(jwe);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function Fwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CM(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,i=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Gwe(this,e);var i=r.numeric,o=r.style,a=r.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",i!==void 0){if(Qwe.indexOf(i)<0)throw new RangeError('Invalid "numeric" option: '.concat(i));this.numeric=i}if(o!==void 0){if(Xwe.indexOf(o)<0)throw new RangeError('Invalid "style" option: '.concat(o));this.style=o}if(a!==void 0){if(Jwe.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(Mj()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");x4.supportedLocalesOf(this.locale).length>0?this.pluralRules=new x4(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=Oj(this.locale,{localeMatcher:this.localeMatcher})}return Ywe(e,[{key:"format",value:function(){var r=RM(arguments),i=AM(r,2),o=i[0],a=i[1];return this.getRule(o,a).replace("{0}",this.formatNumber(Math.abs(o)))}},{key:"formatToParts",value:function(){var r=RM(arguments),i=AM(r,2),o=i[0],a=i[1],s=this.getRule(o,a),l=s.indexOf("{0}");if(l<0)return[{type:"literal",value:s}];var u=[];return l>0&&u.push({type:"literal",value:s.slice(0,l)}),u=u.concat(this.formatNumberToParts(Math.abs(o)).map(function(c){return EM(EM({},c),{},{unit:a})})),l+31&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(r){return Oj(r,t)})};Ud.addLocale=Nwe;Ud.setDefaultLocale=Dwe;Ud.getDefaultLocale=Mj;Ud.PluralRules=x4;var Z5='Invalid "unit" argument';function e2e(e){if(_4(e)==="symbol")throw new TypeError(Z5);if(typeof e!="string")throw new RangeError("".concat(Z5,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),Zwe.indexOf(e)<0)throw new RangeError("".concat(Z5,": ").concat(e));return e}var t2e='Invalid "number" argument';function r2e(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(t2e,": ").concat(e));return e}function n2e(e){return 1/e===-1/0}function i2e(e){return e<0||e===0&&n2e(e)}function RM(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[r2e(e[0]),e2e(e[1])]}function Pb(e){return Pb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pb(e)}function o2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l2e(e,t){if(!!e){if(typeof e=="string")return OM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OM(e,t)}}function OM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r1;)if(a.pop(),o=a.join("-"),t(o))return o}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function c2e(){var e=(typeof Intl>"u"?"undefined":S4(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function C4(e){return C4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C4(e)}function d2e(e){return p2e(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var f2e={}.constructor;function p2e(e){return C4(e)!==void 0&&e!==null&&e.constructor===f2e}var nc=60,Mb=60*nc,Tf=24*Mb,k4=7*Tf,E4=30.44*Tf,Bj=146097/400*Tf;function xh(e){switch(e){case"second":return 1;case"minute":return nc;case"hour":return Mb;case"day":return Tf;case"week":return k4;case"month":return E4;case"year":return Bj}}function Uj(e){return e.factor!==void 0?e.factor:xh(e.unit||e.formatAs)||1}function ty(e){switch(e){case"floor":return Math.floor;default:return Math.round}}function kE(e){switch(e){case"floor":return 1;default:return .5}}function A4(e){return A4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A4(e)}function Dj(e,t){var r=t.prevStep,i=t.timestamp,o=t.now,a=t.future,s=t.round,l;return r&&(r.id||r.unit)&&(l=e["threshold_for_".concat(r.id||r.unit)]),l===void 0&&e.threshold!==void 0&&(l=e.threshold,typeof l=="function"&&(l=l(o,a))),l===void 0&&(l=e.minTime),A4(l)==="object"&&(r&&r.id&&l[r.id]!==void 0?l=l[r.id]:l=l.default),typeof l=="function"&&(l=l(i,{future:a,getMinTimeForUnit:function(c,d){return BM(c,d||r&&r.formatAs,{round:s})}})),l===void 0&&e.test&&(e.test(i,{now:o,future:a})?l=0:l=9007199254740991),l===void 0&&(r?e.formatAs&&r.formatAs&&(l=BM(e.formatAs,r.formatAs,{round:s})):l=0),l===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),l}function BM(e,t,r){var i=r.round,o=xh(e),a;if(t==="now"?a=xh(e):a=xh(t),o!==void 0&&a!==void 0)return o-a*(1-kE(i))}function UM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function h2e(e){for(var t=1;t0)return e[s-1]}return l}}}function Lj(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=Dj(e[i],h2e({prevStep:e[i-1],timestamp:r.now-t*1e3},r));return o===void 0||Math.abs(t)=0:!0})}function b2e(e,t,r){var i=r.now,o=r.round;if(!!xh(e)){var a=xh(e)*1e3,s=t>i,l=Math.abs(t-i),u=ty(o)(l/a)*a;return s?u>0?l-u+x2e(o,a):l-u+1:-(l-u)+w2e(o,a)}}function w2e(e,t){return kE(e)*t}function x2e(e,t){return(1-kE(e))*t+1}var _2e=365*24*60*60*1e3,Nj=1e3*_2e;function S2e(e,t,r){var i=r.prevStep,o=r.nextStep,a=r.now,s=r.future,l=r.round,u=e.getTime?e.getTime():e,c=function(b){return b2e(b,u,{now:a,round:l})},d=k2e(s?t:o,u,{future:s,now:a,round:l,prevStep:s?i:t});if(d!==void 0){var p;if(t&&(t.getTimeToNextUpdate&&(p=t.getTimeToNextUpdate(u,{getTimeToNextUpdateForUnit:c,getRoundFunction:ty,now:a,future:s,round:l})),p===void 0)){var v=t.unit||t.formatAs;v&&(p=c(v))}return p===void 0?d:Math.min(p,d)}}function C2e(e,t,r){var i=r.now,o=r.future,a=r.round,s=r.prevStep,l=Dj(e,{timestamp:t,now:i,future:o,round:a,prevStep:s});if(l!==void 0)return o?t-l*1e3+1:l===0&&t===i?Nj:t+l*1e3}function k2e(e,t,r){var i=r.now,o=r.future,a=r.round,s=r.prevStep;if(e){var l=C2e(e,t,{now:i,future:o,round:a,prevStep:s});return l===void 0?void 0:l-i}else return o?t-i+1:Nj}var jj={};function uh(e){return jj[e]}function $j(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");jj[e.locale]=e}const E2e=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],T4={steps:E2e,labels:"long"};function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function LM(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V2e(e,t){return G2e(e)||K2e(e,t)||Hj(e,t)||q2e()}function q2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hj(e,t){if(!!e){if(typeof e=="string")return XM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XM(e,t)}}function XM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.polyfill;Y2e(this,e),typeof t=="string"&&(t=[t]),this.locale=u2e(t.concat(e.getDefaultLocale()),uh),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),i===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Ud,this.IntlPluralRules=Ud.PluralRules),this.relativeTimeFormatCache=new MM,this.pluralRulesCache=new MM}return Z2e(e,[{key:"format",value:function(r,i,o){o||(i&&!txe(i)?(o=i,i=void 0):o={}),i||(i=I4),typeof i=="string"&&(i=H2e(i));var a=Q2e(r),s=this.getLabels(i.flavour||i.labels),l=s.labels,u=s.labelsType,c;i.now!==void 0&&(c=i.now),c===void 0&&o.now!==void 0&&(c=o.now),c===void 0&&(c=Date.now());var d=(c-a)/1e3,p=o.future||d<0,v=exe(l,uh(this.locale).now,uh(this.locale).long,p);if(i.custom){var x=i.custom({now:c,date:new Date(a),time:a,elapsed:d,locale:this.locale});if(x!==void 0)return x}var b=J2e(i.units,l,v),y=o.round||i.round,_=m2e(i.gradation||i.steps||I4.steps,d,{now:c,units:b,round:y,future:p,getNextStep:!0}),k=V2e(_,3),E=k[0],O=k[1],U=k[2],D=this.formatDateForStep(a,O,d,{labels:l,labelsType:u,nowLabel:v,now:c,future:p,round:y})||"";if(o.getTimeToNextUpdate){var j=S2e(a,O,{nextStep:U,prevStep:E,now:c,future:p,round:y});return[D,j]}return D}},{key:"formatDateForStep",value:function(r,i,o,a){var s=this,l=a.labels,u=a.labelsType,c=a.nowLabel,d=a.now,p=a.future,v=a.round;if(!!i){if(i.format)return i.format(r,this.locale,{formatAs:function(k,E){return s.formatValue(E,k,{labels:l,future:p})},now:d,future:p});var x=i.unit||i.formatAs;if(!x)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(i)));if(x==="now")return c;var b=Math.abs(o)/Uj(i);i.granularity&&(b=ty(v)(b/i.granularity)*i.granularity);var y=-1*Math.sign(o)*ty(v)(b);switch(y===0&&(p?y=0:y=-0),u){case"long":case"short":case"narrow":return this.getFormatter(u).format(y,x);default:return this.formatValue(y,x,{labels:l,future:p})}}}},{key:"formatValue",value:function(r,i,o){var a=o.labels,s=o.future;return this.getFormattingRule(a,i,r,{future:s}).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"getFormattingRule",value:function(r,i,o,a){var s=a.future;if(this.locale,r=r[i],typeof r=="string")return r;var l=o===0?s?"future":"past":o<0?"past":"future",u=r[l]||r;if(typeof u=="string")return u;var c=this.getPluralRules().select(Math.abs(o));return u[c]||u.other}},{key:"formatNumber",value:function(r){return this.numberFormat?this.numberFormat.format(r):String(r)}},{key:"getFormatter",value:function(r){return this.relativeTimeFormatCache.get(this.locale,r)||this.relativeTimeFormatCache.put(this.locale,r,new this.IntlRelativeTimeFormat(this.locale,{style:r}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof r=="string"&&(r=[r]),r=r.map(function(l){switch(l){case"tiny":case"mini-time":return"mini";default:return l}}),r=r.concat("long");for(var i=uh(this.locale),o=W2e(r),a;!(a=o()).done;){var s=a.value;if(i[s])return{labelsType:s,labels:i[s]}}}}]),e}(),Wj="en";Pu.getDefaultLocale=function(){return Wj};Pu.setDefaultLocale=function(e){return Wj=e};Pu.addDefaultLocale=function(e){if(eO)return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");eO=!0,Pu.setDefaultLocale(e.locale),Pu.addLocale(e)};var eO;Pu.addLocale=function(e){$j(e),Ud.addLocale(e)};Pu.locale=Pu.addLocale;Pu.addLabels=function(e,t,r){var i=uh(e);i||($j({locale:e}),i=uh(e)),i[t]=r};function Q2e(e){if(e.constructor===Date||X2e(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(Ob(e),", ").concat(e))}function X2e(e){return Ob(e)==="object"&&typeof e.getTime=="function"}function J2e(e,t,r){var i=Object.keys(t);return r&&i.push("now"),e&&(i=e.filter(function(o){return o==="now"||i.indexOf(o)>=0})),i}function exe(e,t,r,i){var o=e.now||t&&t.now;if(o)return typeof o=="string"?o:i?o.future:o.past;if(r&&r.second&&r.second.current)return r.second.current}function txe(e){return typeof e=="string"||d2e(e)}const rxe={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}},nxe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/func`,ixe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/fift`,oxe=e=>`https://github.com/tact-lang/tact/tree/v${e}`;Pu.addDefaultLocale(rxe);function axe(){const{data:e}=Pc(),t=e.compilerSettings,r=[];if(e){if(r.push({title:"Compiler",value:`${e.compiler}`}),e.compiler==="func"){const i=t?.funcVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:i&&nxe(i)})}else if(e.compiler==="fift"){const i=t?.fiftVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:ixe(i)})}else if(e.compiler==="tact"){const i=t?.tactVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:oxe(i)})}e.compiler!=="tact"&&r.push({title:"Command",value:t?.commandLine,showIcon:!0,tooltip:!0}),r.push({title:"Verified on",value:e.verificationDate?.toLocaleDateString()??""})}return L(SE,{title:"Compiler",icon:Uwe,dataRows:r,isFlexibleWrapper:!0})}function Tg(e,t,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(p){s(p)}}function u(d){try{c(i.throw(d))}catch(p){s(p)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})}function Ig(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(c){return function(d){return u([c,d])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(r=0)),r;)try{if(i=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a}function rO(e,t,r){if(r||arguments.length===2)for(var i=0,o=t.length,a;i0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function lxe(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var i=t.split(".").pop().toLowerCase(),o=sxe.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var uxe=[".DS_Store","Thumbs.db"];function cxe(e){return Tg(this,void 0,void 0,function(){return Ig(this,function(t){return Bb(e)&&dxe(e.dataTransfer)?[2,gxe(e.dataTransfer,e.type)]:fxe(e)?[2,pxe(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,hxe(e)]:[2,[]]})})}function dxe(e){return Bb(e)}function fxe(e){return Bb(e)&&Bb(e.target)}function Bb(e){return typeof e=="object"&&e!==null}function pxe(e){return O4(e.target.files).map(function(t){return Ly(t)})}function hxe(e){return Tg(this,void 0,void 0,function(){var t;return Ig(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(i){return Ly(i)})]}})})}function gxe(e,t){return Tg(this,void 0,void 0,function(){var r,i;return Ig(this,function(o){switch(o.label){case 0:return e.items?(r=O4(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(mxe))]):[3,2];case 1:return i=o.sent(),[2,nO(Vj(i))];case 2:return[2,nO(O4(e.files).map(function(a){return Ly(a)}))]}})})}function nO(e){return e.filter(function(t){return uxe.indexOf(t.name)===-1})}function O4(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,i=new Array(t);rr)return[!1,lO(r)];if(e.sizer)return[!1,lO(r)]}return[!0,null]}function pf(e){return e!=null}function Mxe(e){var t=e.files,r=e.accept,i=e.minSize,o=e.maxSize,a=e.multiple,s=e.maxFiles,l=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(u){var c=Yj(u,r),d=ny(c,1),p=d[0],v=Zj(u,i,o),x=ny(v,1),b=x[0],y=l?l(u):null;return p&&b&&!y})}function Ub(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function cO(e){e.preventDefault()}function Oxe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Bxe(e){return e.indexOf("Edge/")!==-1}function Uxe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Oxe(e)||Bxe(e)}function lu(){for(var e=arguments.length,t=new Array(e),r=0;r1?o-1:0),s=1;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function Xxe(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}var EE=X.exports.forwardRef(function(e,t){var r=e.children,i=Db(e,Fxe),o=t$(i),a=o.open,s=Db(o,zxe);return X.exports.useImperativeHandle(t,function(){return{open:a}},[a]),L(X.exports.Fragment,{children:r(Go(Go({},s),{},{open:a}))})});EE.displayName="Dropzone";var e$={disabled:!1,getFilesFromEvent:cxe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};EE.defaultProps=e$;EE.propTypes={children:Co.exports.func,accept:Co.exports.objectOf(Co.exports.arrayOf(Co.exports.string)),multiple:Co.exports.bool,preventDropOnDocument:Co.exports.bool,noClick:Co.exports.bool,noKeyboard:Co.exports.bool,noDrag:Co.exports.bool,noDragEventsBubbling:Co.exports.bool,minSize:Co.exports.number,maxSize:Co.exports.number,maxFiles:Co.exports.number,disabled:Co.exports.bool,getFilesFromEvent:Co.exports.func,onFileDialogCancel:Co.exports.func,onFileDialogOpen:Co.exports.func,useFsAccessApi:Co.exports.bool,autoFocus:Co.exports.bool,onDragEnter:Co.exports.func,onDragLeave:Co.exports.func,onDragOver:Co.exports.func,onDrop:Co.exports.func,onDropAccepted:Co.exports.func,onDropRejected:Co.exports.func,onError:Co.exports.func,validator:Co.exports.func};var L4={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function t$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Go(Go({},e$),e),r=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,l=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,v=t.onDrop,x=t.onDropAccepted,b=t.onDropRejected,y=t.onFileDialogCancel,_=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,O=t.preventDropOnDocument,U=t.noClick,D=t.noKeyboard,j=t.noDrag,F=t.noDragEventsBubbling,H=t.onError,W=t.validator,G=X.exports.useMemo(function(){return Nxe(r)},[r]),ae=X.exports.useMemo(function(){return Lxe(r)},[r]),V=X.exports.useMemo(function(){return typeof _=="function"?_:fO},[_]),oe=X.exports.useMemo(function(){return typeof y=="function"?y:fO},[y]),P=X.exports.useRef(null),ee=X.exports.useRef(null),le=X.exports.useReducer(Jxe,L4),pe=Q5(le,2),xe=pe[0],J=pe[1],ft=xe.isFocused,Le=xe.isFileDialogActive,He=X.exports.useRef(typeof window<"u"&&window.isSecureContext&&k&&Dxe()),nr=function(){!He.current&&Le&&setTimeout(function(){if(ee.current){var ie=ee.current.files;ie.length||(J({type:"closeDialog"}),oe())}},300)};X.exports.useEffect(function(){return window.addEventListener("focus",nr,!1),function(){window.removeEventListener("focus",nr,!1)}},[ee,Le,oe,He]);var Bt=X.exports.useRef([]),Rt=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),Bt.current=[])};X.exports.useEffect(function(){return O&&(document.addEventListener("dragover",cO,!1),document.addEventListener("drop",Rt,!1)),function(){O&&(document.removeEventListener("dragover",cO),document.removeEventListener("drop",Rt))}},[P,O]),X.exports.useEffect(function(){return!i&&E&&P.current&&P.current.focus(),function(){}},[P,E,i]);var Jt=X.exports.useCallback(function(ce){H?H(ce):console.error(ce)},[H]),vr=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[].concat(Vxe(Bt.current),[ce.target]),zv(ce)&&Promise.resolve(o(ce)).then(function(ie){if(!(Ub(ce)&&!F)){var de=ie.length,$=de>0&&Mxe({files:ie,accept:G,minSize:s,maxSize:a,multiple:l,maxFiles:u,validator:W}),C=de>0&&!$;J({isDragAccept:$,isDragReject:C,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ce)}}).catch(function(ie){return Jt(ie)})},[o,c,Jt,F,G,s,a,l,u,W]),At=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=zv(ce);if(ie&&ce.dataTransfer)try{ce.dataTransfer.dropEffect="copy"}catch{}return ie&&p&&p(ce),!1},[p,F]),kt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=Bt.current.filter(function($){return P.current&&P.current.contains($)}),de=ie.indexOf(ce.target);de!==-1&&ie.splice(de,1),Bt.current=ie,!(ie.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zv(ce)&&d&&d(ce))},[P,d,F]),Ct=X.exports.useCallback(function(ce,ie){var de=[],$=[];ce.forEach(function(C){var T=Yj(C,G),Z=Q5(T,2),ve=Z[0],je=Z[1],ct=Zj(C,s,a),ur=Q5(ct,2),Dr=ur[0],hr=ur[1],Rr=W?W(C):null;if(ve&&Dr&&!Rr)de.push(C);else{var Gr=[je,hr];Rr&&(Gr=Gr.concat(Rr)),$.push({file:C,errors:Gr.filter(function(Nr){return Nr})})}}),(!l&&de.length>1||l&&u>=1&&de.length>u)&&(de.forEach(function(C){$.push({file:C,errors:[Pxe]})}),de.splice(0)),J({acceptedFiles:de,fileRejections:$,type:"setFiles"}),v&&v(de,$,ie),$.length>0&&b&&b($,ie),de.length>0&&x&&x(de,ie)},[J,l,G,s,a,u,v,x,b,W]),Lt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[],zv(ce)&&Promise.resolve(o(ce)).then(function(ie){Ub(ce)&&!F||Ct(ie,ce)}).catch(function(ie){return Jt(ie)}),J({type:"reset"})},[o,Ct,Jt,F]),Kt=X.exports.useCallback(function(){if(He.current){J({type:"openDialog"}),V();var ce={multiple:l,types:ae};window.showOpenFilePicker(ce).then(function(ie){return o(ie)}).then(function(ie){Ct(ie,null),J({type:"closeDialog"})}).catch(function(ie){jxe(ie)?(oe(ie),J({type:"closeDialog"})):$xe(ie)?(He.current=!1,ee.current?(ee.current.value=null,ee.current.click()):Jt(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Jt(ie)});return}ee.current&&(J({type:"openDialog"}),V(),ee.current.value=null,ee.current.click())},[J,V,oe,k,Ct,Jt,ae,l]),yr=X.exports.useCallback(function(ce){!P.current||!P.current.isEqualNode(ce.target)||(ce.key===" "||ce.key==="Enter"||ce.keyCode===32||ce.keyCode===13)&&(ce.preventDefault(),Kt())},[P,Kt]),ne=X.exports.useCallback(function(){J({type:"focus"})},[]),Mt=X.exports.useCallback(function(){J({type:"blur"})},[]),Nt=X.exports.useCallback(function(){U||(Uxe()?setTimeout(Kt,0):Kt())},[U,Kt]),Ie=function(ie){return i?null:ie},Ae=function(ie){return D?null:Ie(ie)},fe=function(ie){return j?null:Ie(ie)},Be=function(ie){F&&ie.stopPropagation()},rt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.role,C=ce.onKeyDown,T=ce.onFocus,Z=ce.onBlur,ve=ce.onClick,je=ce.onDragEnter,ct=ce.onDragOver,ur=ce.onDragLeave,Dr=ce.onDrop,hr=Db(ce,Hxe);return Go(Go(D4({onKeyDown:Ae(lu(C,yr)),onFocus:Ae(lu(T,ne)),onBlur:Ae(lu(Z,Mt)),onClick:Ie(lu(ve,Nt)),onDragEnter:fe(lu(je,vr)),onDragOver:fe(lu(ct,At)),onDragLeave:fe(lu(ur,kt)),onDrop:fe(lu(Dr,Lt)),role:typeof $=="string"&&$!==""?$:"presentation"},de,P),!i&&!D?{tabIndex:0}:{}),hr)}},[P,yr,ne,Mt,Nt,vr,At,kt,Lt,D,j,i]),lt=X.exports.useCallback(function(ce){ce.stopPropagation()},[]),jt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.onChange,C=ce.onClick,T=Db(ce,Wxe),Z=D4({accept:G,multiple:l,type:"file",style:{display:"none"},onChange:Ie(lu($,Lt)),onClick:Ie(lu(C,lt)),tabIndex:-1},de,ee);return Go(Go({},Z),T)}},[ee,r,l,Lt,i]);return Go(Go({},xe),{},{isFocused:ft&&!i,getRootProps:rt,getInputProps:jt,rootRef:P,inputRef:ee,open:Ie(Kt)})}function Jxe(e,t){switch(t.type){case"focus":return Go(Go({},e),{},{isFocused:!0});case"blur":return Go(Go({},e),{},{isFocused:!1});case"openDialog":return Go(Go({},L4),{},{isFileDialogActive:!0});case"closeDialog":return Go(Go({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Go(Go({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Go(Go({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Go({},L4);default:return e}}function fO(){}const e_e="/assets/sources.bdd55da1.svg",r$="/assets/verified-bold.54828026.svg",t_e="/assets/upload.c0ad3052.svg",r_e=Xi($n)({justifyContent:"center",backgroundColor:"#F7F9FB",textAlign:"center",height:148,overflow:"hidden",border:"1px dashed #E3E8EA",color:"#728A96",borderRadius:20,lineHeight:148,cursor:"pointer","&:hover":{border:"1px dashed #9da3a5"}});function n_e(){const{addFiles:e,hasFiles:t}=zu(),{step:r}=Vx(),i=aa("(max-width: 450px)"),{active:o}=wk(),a=c=>{e(c)},{getRootProps:s,getInputProps:l,isDragActive:u}=t$({onDrop:a,accept:{"text/plain":Tb.map(c=>`.${c}`)}});return Ut(ta,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",width:"100%",flexDirection:i?"column":"inherit"},children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:r===hc.PUBLISH?r$:e_e,alt:"Block icon",width:41,height:41})}),L(Fd,{children:"Add sources"})]}),t()&&r!==hc.PUBLISH&&L("div",{...s(),children:Ut(Ha,{fontSize:12,fontWeight:700,hoverBackground:"#e3e3e3",background:"#F8F8F8",height:44,width:159,children:[L("img",{src:t_e,alt:"Sources icon",width:19,height:19}),"Upload source"]})})]})}),Ut(kn,{sx:{padding:"15px 30px"},children:[L(kn,{sx:{position:"relative",zIndex:o?0:4,transition:o?"":"1.5s z-index"},children:!t()&&Ut(r_e,{...s(),children:["Drop sources (",Tb.map(c=>`.${c}`).join(", "),") here"]})}),L("input",{...l(),onClick:c=>{c.target.value=""},style:{display:"none"},id:"fileUpload",type:"file",multiple:!0,accept:".fc,.func,.fif"})]})]})}function i_e(){for(var e=arguments.length,t=new Array(e),r=0;ri=>{t.forEach(o=>o(i))},t)}const qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rg(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function AE(e){return"nodeType"in e}function Ds(e){var t,r;return e?Rg(e)?e:AE(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function TE(e){const{Document:t}=Ds(e);return e instanceof t}function Ny(e){return Rg(e)?!1:e instanceof Ds(e).HTMLElement}function o_e(e){return e instanceof Ds(e).SVGElement}function Pg(e){return e?Rg(e)?e.document:AE(e)?TE(e)?e:Ny(e)?e.ownerDocument:document:document:document}const Jl=qx?X.exports.useLayoutEffect:X.exports.useEffect;function IE(e){const t=X.exports.useRef(e);return Jl(()=>{t.current=e}),X.exports.useCallback(function(){for(var r=arguments.length,i=new Array(r),o=0;o{e.current=setInterval(i,o)},[]),r=X.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function iy(e,t){t===void 0&&(t=[e]);const r=X.exports.useRef(e);return Jl(()=>{r.current!==e&&(r.current=e)},t),r}function jy(e,t){const r=X.exports.useRef();return X.exports.useMemo(()=>{const i=e(r.current);return r.current=i,i},[...t])}function Lb(e){const t=IE(e),r=X.exports.useRef(null),i=X.exports.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,i]}function N4(e){const t=X.exports.useRef();return X.exports.useEffect(()=>{t.current=e},[e]),t.current}let X5={};function $y(e,t){return X.exports.useMemo(()=>{if(t)return t;const r=X5[e]==null?0:X5[e]+1;return X5[e]=r,e+"-"+r},[e,t])}function n$(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{const l=Object.entries(s);for(const[u,c]of l){const d=a[u];d!=null&&(a[u]=d+e*c)}return a},{...t})}}const _h=n$(1),oy=n$(-1);function s_e(e){return"clientX"in e&&"clientY"in e}function RE(e){if(!e)return!1;const{KeyboardEvent:t}=Ds(e.target);return t&&e instanceof t}function l_e(e){if(!e)return!1;const{TouchEvent:t}=Ds(e.target);return t&&e instanceof t}function j4(e){if(l_e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return s_e(e)?{x:e.clientX,y:e.clientY}:null}const ay=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[ay.Translate.toString(e),ay.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:i}=e;return t+" "+r+"ms "+i}}}),pO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function u_e(e){return e.matches(pO)?e:e.querySelector(pO)}function c_e(e,t,r){const i={...e};return t.top+e.y<=r.top?i.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(i.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?i.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(i.x=r.left+r.width-t.right),i}const d_e=e=>{let{containerNodeRect:t,draggingNodeRect:r,transform:i}=e;return!r||!t?i:c_e(i,r,t)},f_e=e=>{let{transform:t}=e;return{...t,x:0}},p_e={display:"none"};function h_e(e){let{id:t,value:r}=e;return L("div",{id:t,style:p_e,children:r})}const g_e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function m_e(e){let{id:t,announcement:r}=e;return L("div",{id:t,style:g_e,role:"status","aria-live":"assertive","aria-atomic":!0,children:r})}function y_e(){const[e,t]=X.exports.useState("");return{announce:X.exports.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const i$=X.exports.createContext(null);function v_e(e){const t=X.exports.useContext(i$);X.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function b_e(){const[e]=X.exports.useState(()=>new Set),t=X.exports.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[X.exports.useCallback(i=>{let{type:o,event:a}=i;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const w_e={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},x_e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function __e(e){let{announcements:t=x_e,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=w_e}=e;const{announce:a,announcement:s}=y_e(),l=$y("DndLiveRegion"),[u,c]=X.exports.useState(!1);if(X.exports.useEffect(()=>{c(!0)},[]),v_e(X.exports.useMemo(()=>({onDragStart(p){let{active:v}=p;a(t.onDragStart({active:v}))},onDragMove(p){let{active:v,over:x}=p;t.onDragMove&&a(t.onDragMove({active:v,over:x}))},onDragOver(p){let{active:v,over:x}=p;a(t.onDragOver({active:v,over:x}))},onDragEnd(p){let{active:v,over:x}=p;a(t.onDragEnd({active:v,over:x}))},onDragCancel(p){let{active:v,over:x}=p;a(t.onDragCancel({active:v,over:x}))}}),[a,t])),!u)return null;const d=Ut(ta,{children:[L(h_e,{id:i,value:o.draggable}),L(m_e,{id:l,announcement:s})]});return r?ml.exports.createPortal(d,r):d}var xa;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xa||(xa={}));function Nb(){}function J5(e,t){return X.exports.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function S_e(){for(var e=arguments.length,t=new Array(e),r=0;r[...t].filter(i=>i!=null),[...t])}const eu=Object.freeze({x:0,y:0});function o$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function a$(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return r-i}function C_e(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return i-r}function hO(e){let{left:t,top:r,height:i,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+i},{x:t+o,y:r+i}]}function s$(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function gO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const k_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=gO(t,t.left,t.top),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=o$(gO(u),o);a.push({id:l,data:{droppableContainer:s,value:c}})}}return a.sort(a$)},E_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=hO(t),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=hO(u),d=o.reduce((v,x,b)=>v+o$(c[b],x),0),p=Number((d/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:p}})}}return a.sort(a$)};function A_e(e,t){const r=Math.max(t.top,e.top),i=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-i,l=a-r;if(i{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=[];for(const a of i){const{id:s}=a,l=r.get(s);if(l){const u=A_e(l,t);u>0&&o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(C_e)};function I_e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function l$(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:eu}function R_e(e){return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const P_e=R_e(1);function M_e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function O_e(e,t,r){const i=M_e(t);if(!i)return e;const{scaleX:o,scaleY:a,x:s,y:l}=i,u=e.left-s-(1-o)*parseFloat(r),c=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,p=a?e.height/a:e.height;return{width:d,height:p,top:c,right:u+d,bottom:c+p,left:u}}const B_e={ignoreTransform:!1};function Mg(e,t){t===void 0&&(t=B_e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=Ds(e),{transform:d,transformOrigin:p}=c(e);d&&(r=O_e(r,d,p))}const{top:i,left:o,width:a,height:s,bottom:l,right:u}=r;return{top:i,left:o,width:a,height:s,bottom:l,right:u}}function mO(e){return Mg(e,{ignoreTransform:!0})}function U_e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function D_e(e,t){return t===void 0&&(t=Ds(e).getComputedStyle(e)),t.position==="fixed"}function L_e(e,t){t===void 0&&(t=Ds(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?r.test(a):!1})}function Kx(e,t){const r=[];function i(o){if(t!=null&&r.length>=t||!o)return r;if(TE(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!Ny(o)||o_e(o)||r.includes(o))return r;const{getComputedStyle:a}=Ds(o),s=a(o);return o!==e&&L_e(o,s)&&r.push(o),D_e(o,s)?r:i(o.parentNode)}return e?i(e):r}function u$(e){const[t]=Kx(e,1);return t??null}function e3(e){return!qx||!e?null:Rg(e)?e:AE(e)?TE(e)||e===Pg(e).scrollingElement?window:Ny(e)?e:null:null}function c$(e){return Rg(e)?e.scrollX:e.scrollLeft}function d$(e){return Rg(e)?e.scrollY:e.scrollTop}function $4(e){return{x:c$(e),y:d$(e)}}var Ma;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ma||(Ma={}));function f$(e){return!qx||!e?!1:e===document.scrollingElement}function p$(e){const t={x:0,y:0},r=f$(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:o,isLeft:a,isBottom:s,isRight:l,maxScroll:i,minScroll:t}}const N_e={x:.2,y:.2};function j_e(e,t,r,i,o){let{top:a,left:s,right:l,bottom:u}=r;i===void 0&&(i=10),o===void 0&&(o=N_e);const{isTop:c,isBottom:d,isLeft:p,isRight:v}=p$(e),x={x:0,y:0},b={x:0,y:0},y={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+y.height?(x.y=Ma.Backward,b.y=i*Math.abs((t.top+y.height-a)/y.height)):!d&&u>=t.bottom-y.height&&(x.y=Ma.Forward,b.y=i*Math.abs((t.bottom-y.height-u)/y.height)),!v&&l>=t.right-y.width?(x.x=Ma.Forward,b.x=i*Math.abs((t.right-y.width-l)/y.width)):!p&&s<=t.left+y.width&&(x.x=Ma.Backward,b.x=i*Math.abs((t.left+y.width-s)/y.width)),{direction:x,speed:b}}function $_e(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:r,right:i,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function h$(e){return e.reduce((t,r)=>_h(t,$4(r)),eu)}function F_e(e){return e.reduce((t,r)=>t+c$(r),0)}function z_e(e){return e.reduce((t,r)=>t+d$(r),0)}function H_e(e,t){if(t===void 0&&(t=Mg),!e)return;const{top:r,left:i,bottom:o,right:a}=t(e);!u$(e)||(o<=0||a<=0||r>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const W_e=[["x",["left","right"],F_e],["y",["top","bottom"],z_e]];class PE{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kx(r),o=h$(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of W_e)for(const u of s)Object.defineProperty(this,u,{get:()=>{const c=l(i),d=o[a]-c;return this.rect[u]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class l0{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...r)})},this.target=t}add(t,r,i){var o;(o=this.target)==null||o.addEventListener(t,r,i),this.listeners.push([t,r,i])}}function V_e(e){const{EventTarget:t}=Ds(e);return e instanceof t?e:Pg(e)}function t3(e,t){const r=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+i**2)>t:"x"in t&&"y"in t?r>t.x&&i>t.y:"x"in t?r>t.x:"y"in t?i>t.y:!1}var pl;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pl||(pl={}));function yO(e){e.preventDefault()}function q_e(e){e.stopPropagation()}var zi;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(zi||(zi={}));const g$={start:[zi.Space,zi.Enter],cancel:[zi.Esc],end:[zi.Space,zi.Enter]},K_e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case zi.Right:return{...r,x:r.x+25};case zi.Left:return{...r,x:r.x-25};case zi.Down:return{...r,y:r.y+25};case zi.Up:return{...r,y:r.y-25}}};class ME{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new l0(Pg(r)),this.windowListeners=new l0(Ds(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pl.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,i=t.node.current;i&&H_e(i),r(eu)}handleKeyDown(t){if(RE(t)){const{active:r,context:i,options:o}=this.props,{keyboardCodes:a=g$,coordinateGetter:s=K_e,scrollBehavior:l="smooth"}=o,{code:u}=t;if(a.end.includes(u)){this.handleEnd(t);return}if(a.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:eu;this.referenceCoordinates||(this.referenceCoordinates=d);const p=s(t,{active:r,context:i.current,currentCoordinates:d});if(p){const v=oy(p,d),x={x:0,y:0},{scrollableAncestors:b}=i.current;for(const y of b){const _=t.code,{isTop:k,isRight:E,isLeft:O,isBottom:U,maxScroll:D,minScroll:j}=p$(y),F=$_e(y),H={x:Math.min(_===zi.Right?F.right-F.width/2:F.right,Math.max(_===zi.Right?F.left:F.left+F.width/2,p.x)),y:Math.min(_===zi.Down?F.bottom-F.height/2:F.bottom,Math.max(_===zi.Down?F.top:F.top+F.height/2,p.y))},W=_===zi.Right&&!E||_===zi.Left&&!O,G=_===zi.Down&&!U||_===zi.Up&&!k;if(W&&H.x!==p.x){const ae=y.scrollLeft+v.x,V=_===zi.Right&&ae<=D.x||_===zi.Left&&ae>=j.x;if(V&&!v.y){y.scrollTo({left:ae,behavior:l});return}V?x.x=y.scrollLeft-ae:x.x=_===zi.Right?y.scrollLeft-D.x:y.scrollLeft-j.x,x.x&&y.scrollBy({left:-x.x,behavior:l});break}else if(G&&H.y!==p.y){const ae=y.scrollTop+v.y,V=_===zi.Down&&ae<=D.y||_===zi.Up&&ae>=j.y;if(V&&!v.x){y.scrollTo({top:ae,behavior:l});return}V?x.y=y.scrollTop-ae:x.y=_===zi.Down?y.scrollTop-D.y:y.scrollTop-j.y,x.y&&y.scrollBy({top:-x.y,behavior:l});break}}this.handleMove(t,_h(oy(p,this.referenceCoordinates),x))}}}handleMove(t,r){const{onMove:i}=this.props;t.preventDefault(),i(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ME.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:i=g$,onActivation:o}=t,{active:a}=r;const{code:s}=e.nativeEvent;if(i.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function vO(e){return Boolean(e&&"distance"in e)}function bO(e){return Boolean(e&&"delay"in e)}class OE{constructor(t,r,i){var o;i===void 0&&(i=V_e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:s}=a;this.props=t,this.events=r,this.document=Pg(s),this.documentListeners=new l0(this.document),this.listeners=new l0(i),this.windowListeners=new l0(Ds(s)),this.initialCoordinates=(o=j4(a))!=null?o:eu,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.DragStart,yO),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),this.windowListeners.add(pl.ContextMenu,yO),this.documentListeners.add(pl.Keydown,this.handleKeydown),r){if(vO(r))return;if(bO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(pl.Click,q_e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pl.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:i,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!o)return;const u=(r=j4(t))!=null?r:eu,c=oy(o,u);if(!i&&l){if(bO(l))return t3(c,l.tolerance)?this.handleCancel():void 0;if(vO(l))return l.tolerance!=null&&t3(c,l.tolerance)?this.handleCancel():t3(c,l.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===zi.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const G_e={move:{name:"pointermove"},end:{name:"pointerup"}};class m$ extends OE{constructor(t){const{event:r}=t,i=Pg(r.target);super(t,G_e,i)}}m$.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return!r.isPrimary||r.button!==0?!1:(i?.({event:r}),!0)}}];const Y_e={move:{name:"mousemove"},end:{name:"mouseup"}};var F4;(function(e){e[e.RightClick=2]="RightClick"})(F4||(F4={}));class y$ extends OE{constructor(t){super(t,Y_e,Pg(t.event.target))}}y$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return r.button===F4.RightClick?!1:(i?.({event:r}),!0)}}];const r3={move:{name:"touchmove"},end:{name:"touchend"}};class v$ extends OE{constructor(t){super(t,r3)}static setup(){return window.addEventListener(r3.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(r3.move.name,t)};function t(){}}}v$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;const{touches:o}=r;return o.length>1?!1:(i?.({event:r}),!0)}}];var u0;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(u0||(u0={}));var jb;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jb||(jb={}));function Z_e(e){let{acceleration:t,activator:r=u0.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:l=jb.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:v}=e;const x=X_e({delta:p,disabled:!a}),[b,y]=a_e(),_=X.exports.useRef({x:0,y:0}),k=X.exports.useRef({x:0,y:0}),E=X.exports.useMemo(()=>{switch(r){case u0.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case u0.DraggableRect:return o}},[r,o,u]),O=X.exports.useRef(null),U=X.exports.useCallback(()=>{const j=O.current;if(!j)return;const F=_.current.x*k.current.x,H=_.current.y*k.current.y;j.scrollBy(F,H)},[]),D=X.exports.useMemo(()=>l===jb.TreeOrder?[...c].reverse():c,[l,c]);X.exports.useEffect(()=>{if(!a||!c.length||!E){y();return}for(const j of D){if(i?.(j)===!1)continue;const F=c.indexOf(j),H=d[F];if(!H)continue;const{direction:W,speed:G}=j_e(j,H,E,t,v);for(const ae of["x","y"])x[ae][W[ae]]||(G[ae]=0,W[ae]=0);if(G.x>0||G.y>0){y(),O.current=j,b(U,s),_.current=G,k.current=W;return}}_.current={x:0,y:0},k.current={x:0,y:0},y()},[t,U,i,y,a,s,JSON.stringify(E),JSON.stringify(x),b,c,D,d,JSON.stringify(v)])}const Q_e={x:{[Ma.Backward]:!1,[Ma.Forward]:!1},y:{[Ma.Backward]:!1,[Ma.Forward]:!1}};function X_e(e){let{delta:t,disabled:r}=e;const i=N4(t);return jy(o=>{if(r||!i||!o)return Q_e;const a={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Ma.Backward]:o.x[Ma.Backward]||a.x===-1,[Ma.Forward]:o.x[Ma.Forward]||a.x===1},y:{[Ma.Backward]:o.y[Ma.Backward]||a.y===-1,[Ma.Forward]:o.y[Ma.Forward]||a.y===1}}},[r,t,i])}function J_e(e,t){const r=t!==null?e.get(t):void 0,i=r?r.node.current:null;return jy(o=>{var a;return t===null?null:(a=i??o)!=null?a:null},[i,t])}function e5e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{const{sensor:o}=i,a=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,i)}));return[...r,...a]},[]),[e,t])}var sy;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sy||(sy={}));var z4;(function(e){e.Optimized="optimized"})(z4||(z4={}));const wO=new Map;function t5e(e,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=X.exports.useState(null),{frequency:l,measure:u,strategy:c}=o,d=X.exports.useRef(e),p=_(),v=iy(p),x=X.exports.useCallback(function(k){k===void 0&&(k=[]),!v.current&&s(E=>E===null?k:E.concat(k.filter(O=>!E.includes(O))))},[v]),b=X.exports.useRef(null),y=jy(k=>{if(p&&!r)return wO;if(!k||k===wO||d.current!==e||a!=null){const E=new Map;for(let O of e){if(!O)continue;if(a&&a.length>0&&!a.includes(O.id)&&O.rect.current){E.set(O.id,O.rect.current);continue}const U=O.node.current,D=U?new PE(u(U),U):null;O.rect.current=D,D&&E.set(O.id,D)}return E}return k},[e,a,r,p,u]);return X.exports.useEffect(()=>{d.current=e},[e]),X.exports.useEffect(()=>{p||x()},[r,p]),X.exports.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),X.exports.useEffect(()=>{p||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{x(),b.current=null},l))},[l,p,x,...i]),{droppableRects:y,measureDroppableContainers:x,measuringScheduled:a!=null};function _(){switch(c){case sy.Always:return!1;case sy.BeforeDragging:return r;default:return!r}}}function b$(e,t){return jy(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function r5e(e,t){return b$(e,t)}function n5e(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function Gx(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function i5e(e){return new PE(Mg(e),e)}function xO(e,t,r){t===void 0&&(t=i5e);const[i,o]=X.exports.useReducer(l,null),a=n5e({callback(u){if(!!e)for(const c of u){const{type:d,target:p}=c;if(d==="childList"&&p instanceof HTMLElement&&p.contains(e)){o();break}}}}),s=Gx({callback:o});return Jl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),i;function l(u){if(!e)return null;if(e.isConnected===!1){var c;return(c=u??r)!=null?c:null}const d=t(e);return JSON.stringify(u)===JSON.stringify(d)?u:d}}function o5e(e){const t=b$(e);return l$(e,t)}const _O=[];function a5e(e){const t=X.exports.useRef(e),r=jy(i=>e?i&&i!==_O&&e&&t.current&&e.parentNode===t.current.parentNode?i:Kx(e):_O,[e]);return X.exports.useEffect(()=>{t.current=e},[e]),r}function s5e(e){const[t,r]=X.exports.useState(null),i=X.exports.useRef(e),o=X.exports.useCallback(a=>{const s=e3(a.target);!s||r(l=>l?(l.set(s,$4(s)),new Map(l)):null)},[]);return X.exports.useEffect(()=>{const a=i.current;if(e!==a){s(a);const l=e.map(u=>{const c=e3(u);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,$4(c)]):null}).filter(u=>u!=null);r(l.length?new Map(l):null),i.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(u=>{const c=e3(u);c?.removeEventListener("scroll",o)})}},[o,e]),X.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>_h(a,s),eu):h$(e):eu,[e,t])}function SO(e,t){t===void 0&&(t=[]);const r=X.exports.useRef(null);return X.exports.useEffect(()=>{r.current=null},t),X.exports.useEffect(()=>{const i=e!==eu;i&&!r.current&&(r.current=e),!i&&r.current&&(r.current=null)},[e]),r.current?oy(e,r.current):eu}function l5e(e){X.exports.useEffect(()=>{if(!qx)return;const t=e.map(r=>{let{sensor:i}=r;return i.setup==null?void 0:i.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function u5e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{let{eventName:o,handler:a}=i;return r[o]=s=>{a(s,t)},r},{}),[e,t])}function w$(e){return X.exports.useMemo(()=>e?U_e(e):null,[e])}const n3=[];function c5e(e,t){t===void 0&&(t=Mg);const[r]=e,i=w$(r?Ds(r):null),[o,a]=X.exports.useReducer(l,n3),s=Gx({callback:a});return e.length>0&&o===n3&&a(),Jl(()=>{e.length?e.forEach(u=>s?.observe(u)):(s?.disconnect(),a())},[e]),o;function l(){return e.length?e.map(u=>f$(u)?i:new PE(t(u),u)):n3}}function d5e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ny(t)?t:e}function f5e(e){let{measure:t}=e;const[r,i]=X.exports.useState(null),o=X.exports.useCallback(c=>{for(const{target:d}of c)if(Ny(d)){i(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),a=Gx({callback:o}),s=X.exports.useCallback(c=>{const d=d5e(c);a?.disconnect(),d&&a?.observe(d),i(d?t(d):null)},[t,a]),[l,u]=Lb(s);return X.exports.useMemo(()=>({nodeRef:l,rect:r,setRef:u}),[r,l,u])}const p5e=[{sensor:m$,options:{}},{sensor:ME,options:{}}],h5e={current:{}},y1={draggable:{measure:mO},droppable:{measure:mO,strategy:sy.WhileDragging,frequency:z4.Optimized},dragOverlay:{measure:Mg}};class c0 extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,i;return(r=(i=this.get(t))==null?void 0:i.node.current)!=null?r:void 0}}const g5e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new c0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:y1,measureDroppableContainers:Nb,windowRect:null,measuringScheduled:!1},m5e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nb,draggableNodes:new Map,over:null,measureDroppableContainers:Nb},Yx=X.exports.createContext(m5e),x$=X.exports.createContext(g5e);function y5e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new c0}}}function v5e(e,t){switch(t.type){case xa.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case xa.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case xa.DragEnd:case xa.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xa.RegisterDroppable:{const{element:r}=t,{id:i}=r,o=new c0(e.droppable.containers);return o.set(i,r),{...e,droppable:{...e.droppable,containers:o}}}case xa.SetDroppableDisabled:{const{id:r,key:i,disabled:o}=t,a=e.droppable.containers.get(r);if(!a||i!==a.key)return e;const s=new c0(e.droppable.containers);return s.set(r,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case xa.UnregisterDroppable:{const{id:r,key:i}=t,o=e.droppable.containers.get(r);if(!o||i!==o.key)return e;const a=new c0(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function b5e(e){let{disabled:t}=e;const{active:r,activatorEvent:i,draggableNodes:o}=X.exports.useContext(Yx),a=N4(i),s=N4(r?.id);return X.exports.useEffect(()=>{if(!t&&!i&&a&&s!=null){if(!RE(a)||document.activeElement===a.target)return;const l=o.get(s);if(!l)return;const{activatorNode:u,node:c}=l;if(!u.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[u.current,c.current]){if(!d)continue;const p=u_e(d);if(p){p.focus();break}}})}},[i,t,o,s,a]),null}function w5e(e,t){let{transform:r,...i}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...i}),r):r}function x5e(e){return X.exports.useMemo(()=>({draggable:{...y1.draggable,...e?.draggable},droppable:{...y1.droppable,...e?.droppable},dragOverlay:{...y1.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function _5e(e){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=e;const a=X.exports.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Jl(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!i)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),p=l$(d,i);if(s||(p.x=0),l||(p.y=0),a.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const v=u$(c);v&&v.scrollBy({top:p.y,left:p.x})}},[t,s,l,i,r])}const _$=X.exports.createContext({...eu,scaleX:1,scaleY:1});var Kc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Kc||(Kc={}));const S5e=X.exports.memo(function(t){var r,i,o,a;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=p5e,collisionDetection:p=T_e,measuring:v,modifiers:x,...b}=t;const y=X.exports.useReducer(v5e,void 0,y5e),[_,k]=y,[E,O]=b_e(),[U,D]=X.exports.useState(Kc.Uninitialized),j=U===Kc.Initialized,{draggable:{active:F,nodes:H,translate:W},droppable:{containers:G}}=_,ae=F?H.get(F):null,V=X.exports.useRef({initial:null,translated:null}),oe=X.exports.useMemo(()=>{var Tn;return F!=null?{id:F,data:(Tn=ae?.data)!=null?Tn:h5e,rect:V}:null},[F,ae]),P=X.exports.useRef(null),[ee,le]=X.exports.useState(null),[pe,xe]=X.exports.useState(null),J=iy(b,Object.values(b)),ft=$y("DndDescribedBy",s),Le=X.exports.useMemo(()=>G.getEnabled(),[G]),He=x5e(v),{droppableRects:nr,measureDroppableContainers:Bt,measuringScheduled:Rt}=t5e(Le,{dragging:j,dependencies:[W.x,W.y],config:He.droppable}),Jt=J_e(H,F),vr=X.exports.useMemo(()=>pe?j4(pe):null,[pe]),At=Kn(),kt=r5e(Jt,He.draggable.measure);_5e({activeNode:F?H.get(F):null,config:At.layoutShiftCompensation,initialRect:kt,measure:He.draggable.measure});const Ct=xO(Jt,He.draggable.measure,kt),Lt=xO(Jt?Jt.parentElement:null),Kt=X.exports.useRef({activatorEvent:null,active:null,activeNode:Jt,collisionRect:null,collisions:null,droppableRects:nr,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),yr=G.getNodeFor((r=Kt.current.over)==null?void 0:r.id),ne=f5e({measure:He.dragOverlay.measure}),Mt=(i=ne.nodeRef.current)!=null?i:Jt,Nt=j?(o=ne.rect)!=null?o:Ct:null,Ie=Boolean(ne.nodeRef.current&&ne.rect),Ae=o5e(Ie?null:Ct),fe=w$(Mt?Ds(Mt):null),Be=a5e(j?yr??Jt:null),rt=c5e(Be),lt=w5e(x,{transform:{x:W.x-Ae.x,y:W.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:pe,active:oe,activeNodeRect:Ct,containerNodeRect:Lt,draggingNodeRect:Nt,over:Kt.current.over,overlayNodeRect:ne.rect,scrollableAncestors:Be,scrollableAncestorRects:rt,windowRect:fe}),jt=vr?_h(vr,W):null,ce=s5e(Be),ie=SO(ce),de=SO(ce,[Ct]),$=_h(lt,ie),C=Nt?P_e(Nt,lt):null,T=oe&&C?p({active:oe,collisionRect:C,droppableRects:nr,droppableContainers:Le,pointerCoordinates:jt}):null,Z=s$(T,"id"),[ve,je]=X.exports.useState(null),ct=Ie?lt:_h(lt,de),ur=I_e(ct,(a=ve?.rect)!=null?a:null,Ct),Dr=X.exports.useCallback((Tn,In)=>{let{sensor:yt,options:Ei}=In;if(P.current==null)return;const Yn=H.get(P.current);if(!Yn)return;const Pi=Tn.nativeEvent,Ji=new yt({active:P.current,activeNode:Yn,event:Pi,options:Ei,context:Kt,onStart(eo){const Mo=P.current;if(Mo==null)return;const Wi=H.get(Mo);if(!Wi)return;const{onDragStart:pa}=J.current,ue={active:{id:Mo,data:Wi.data,rect:V}};ml.exports.unstable_batchedUpdates(()=>{pa?.(ue),D(Kc.Initializing),k({type:xa.DragStart,initialCoordinates:eo,active:Mo}),E({type:"onDragStart",event:ue})})},onMove(eo){k({type:xa.DragMove,coordinates:eo})},onEnd:qo(xa.DragEnd),onCancel:qo(xa.DragCancel)});ml.exports.unstable_batchedUpdates(()=>{le(Ji),xe(Tn.nativeEvent)});function qo(eo){return async function(){const{active:Wi,collisions:pa,over:ue,scrollAdjustedTranslate:Re}=Kt.current;let Ee=null;if(Wi&&Re){const{cancelDrop:q}=J.current;Ee={activatorEvent:Pi,active:Wi,collisions:pa,delta:Re,over:ue},eo===xa.DragEnd&&typeof q=="function"&&await Promise.resolve(q(Ee))&&(eo=xa.DragCancel)}P.current=null,ml.exports.unstable_batchedUpdates(()=>{k({type:eo}),D(Kc.Uninitialized),je(null),le(null),xe(null);const q=eo===xa.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const Fe=J.current[q];Fe?.(Ee),E({type:q,event:Ee})}})}}},[H]),hr=X.exports.useCallback((Tn,In)=>(yt,Ei)=>{const Yn=yt.nativeEvent,Pi=H.get(Ei);if(P.current!==null||!Pi||Yn.dndKit||Yn.defaultPrevented)return;const Ji={active:Pi};Tn(yt,In.options,Ji)===!0&&(Yn.dndKit={capturedBy:In.sensor},P.current=Ei,Dr(yt,In))},[H,Dr]),Rr=e5e(d,hr);l5e(d),Jl(()=>{Ct&&U===Kc.Initializing&&D(Kc.Initialized)},[Ct,U]),X.exports.useEffect(()=>{const{onDragMove:Tn}=J.current,{active:In,activatorEvent:yt,collisions:Ei,over:Yn}=Kt.current;if(!In||!yt)return;const Pi={active:In,activatorEvent:yt,collisions:Ei,delta:{x:$.x,y:$.y},over:Yn};ml.exports.unstable_batchedUpdates(()=>{Tn?.(Pi),E({type:"onDragMove",event:Pi})})},[$.x,$.y]),X.exports.useEffect(()=>{const{active:Tn,activatorEvent:In,collisions:yt,droppableContainers:Ei,scrollAdjustedTranslate:Yn}=Kt.current;if(!Tn||P.current==null||!In||!Yn)return;const{onDragOver:Pi}=J.current,Ji=Ei.get(Z),qo=Ji&&Ji.rect.current?{id:Ji.id,rect:Ji.rect.current,data:Ji.data,disabled:Ji.disabled}:null,eo={active:Tn,activatorEvent:In,collisions:yt,delta:{x:Yn.x,y:Yn.y},over:qo};ml.exports.unstable_batchedUpdates(()=>{je(qo),Pi?.(eo),E({type:"onDragOver",event:eo})})},[Z]),Jl(()=>{Kt.current={activatorEvent:pe,active:oe,activeNode:Jt,collisionRect:C,collisions:T,droppableRects:nr,draggableNodes:H,draggingNode:Mt,draggingNodeRect:Nt,droppableContainers:G,over:ve,scrollableAncestors:Be,scrollAdjustedTranslate:$},V.current={initial:Nt,translated:C}},[oe,Jt,T,C,H,Mt,Nt,nr,G,ve,Be,$]),Z_e({...At,delta:W,draggingRect:C,pointerCoordinates:jt,scrollableAncestors:Be,scrollableAncestorRects:rt});const Gr=X.exports.useMemo(()=>({active:oe,activeNode:Jt,activeNodeRect:Ct,activatorEvent:pe,collisions:T,containerNodeRect:Lt,dragOverlay:ne,draggableNodes:H,droppableContainers:G,droppableRects:nr,over:ve,measureDroppableContainers:Bt,scrollableAncestors:Be,scrollableAncestorRects:rt,measuringConfiguration:He,measuringScheduled:Rt,windowRect:fe}),[oe,Jt,Ct,pe,T,Lt,ne,H,G,nr,ve,Bt,Be,rt,He,Rt,fe]),Nr=X.exports.useMemo(()=>({activatorEvent:pe,activators:Rr,active:oe,activeNodeRect:Ct,ariaDescribedById:{draggable:ft},dispatch:k,draggableNodes:H,over:ve,measureDroppableContainers:Bt}),[pe,Rr,oe,Ct,k,ft,H,ve,Bt]);return Ut(i$.Provider,{value:O,children:[Ut(Yx.Provider,{value:Nr,children:[L(x$.Provider,{value:Gr,children:L(_$.Provider,{value:ur,children:c})}),L(b5e,{disabled:l?.restoreFocus===!1})]}),L(__e,{...l,hiddenTextDescribedById:ft})]});function Kn(){const Tn=ee?.autoScrollEnabled===!1,In=typeof u=="object"?u.enabled===!1:u===!1,yt=j&&!Tn&&!In;return typeof u=="object"?{...u,enabled:yt}:{enabled:yt}}}),C5e=X.exports.createContext(null),CO="button",k5e="Droppable";function E5e(e){let{id:t,data:r,disabled:i=!1,attributes:o}=e;const a=$y(k5e),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:p,over:v}=X.exports.useContext(Yx),{role:x=CO,roleDescription:b="draggable",tabIndex:y=0}=o??{},_=u?.id===t,k=X.exports.useContext(_?_$:C5e),[E,O]=Lb(),[U,D]=Lb(),j=u5e(s,t),F=iy(r);Jl(()=>(p.set(t,{id:t,key:a,node:E,activatorNode:U,data:F}),()=>{const W=p.get(t);W&&W.key===a&&p.delete(t)}),[p,t]);const H=X.exports.useMemo(()=>({role:x,tabIndex:y,"aria-disabled":i,"aria-pressed":_&&x===CO?!0:void 0,"aria-roledescription":b,"aria-describedby":d.draggable}),[i,x,y,_,b,d.draggable]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:H,isDragging:_,listeners:i?void 0:j,node:E,over:v,setNodeRef:O,setActivatorNodeRef:D,transform:k}}function A5e(){return X.exports.useContext(x$)}const T5e="Droppable",I5e={timeout:25};function R5e(e){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=e;const a=$y(T5e),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=X.exports.useContext(Yx),d=X.exports.useRef({disabled:r}),p=X.exports.useRef(!1),v=X.exports.useRef(null),x=X.exports.useRef(null),{disabled:b,updateMeasurementsFor:y,timeout:_}={...I5e,...o},k=iy(y??i),E=X.exports.useCallback(()=>{if(!p.current){p.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{c(Array.isArray(k.current)?k.current:[k.current]),x.current=null},_)},[_]),O=Gx({callback:E,disabled:b||!s}),U=X.exports.useCallback((H,W)=>{!O||(W&&(O.unobserve(W),p.current=!1),H&&O.observe(H))},[O]),[D,j]=Lb(U),F=iy(t);return X.exports.useEffect(()=>{!O||!D.current||(O.disconnect(),p.current=!1,O.observe(D.current))},[D,O]),Jl(()=>(l({type:xa.RegisterDroppable,element:{id:i,key:a,disabled:r,node:D,rect:v,data:F}}),()=>l({type:xa.UnregisterDroppable,key:a,id:i})),[i]),X.exports.useEffect(()=>{r!==d.current.disabled&&(l({type:xa.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,l]),{active:s,rect:v,isOver:u?.id===i,node:D,over:u,setNodeRef:j}}function S$(e,t,r){const i=e.slice();return i.splice(r<0?i.length+r:r,0,i.splice(t,1)[0]),i}function P5e(e,t){return e.reduce((r,i,o)=>{const a=t.get(i);return a&&(r[o]=a),r},Array(e.length))}function Hv(e){return e!==null&&e>=0}function M5e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r{let{rects:t,activeIndex:r,overIndex:i,index:o}=e;const a=S$(t,i,r),s=t[o],l=a[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Wv={scaleX:1,scaleY:1},B5e=e=>{var t;let{activeIndex:r,activeNodeRect:i,index:o,rects:a,overIndex:s}=e;const l=(t=a[r])!=null?t:i;if(!l)return null;if(o===r){const c=a[s];return c?{x:0,y:rr&&o<=s?{x:0,y:-l.height-u,...Wv}:o=s?{x:0,y:l.height+u,...Wv}:{x:0,y:0,...Wv}};function U5e(e,t,r){const i=e[t],o=e[t-1],a=e[t+1];return i?ri.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),b=s!=null,y=s?x.indexOf(s.id):-1,_=c?x.indexOf(c.id):-1,k=X.exports.useRef(x),E=!M5e(x,k.current),O=_!==-1&&y===-1||E,U=O5e(a);Jl(()=>{E&&b&&d(x)},[E,x,b,d]),X.exports.useEffect(()=>{k.current=x},[x]);const D=X.exports.useMemo(()=>({activeIndex:y,containerId:p,disabled:U,disableTransforms:O,items:x,overIndex:_,useDragOverlay:v,sortedRects:P5e(x,u),strategy:o}),[y,p,U.draggable,U.droppable,O,x,_,u,v,o]);return L(E$.Provider,{value:D,children:t})}const L5e=e=>{let{id:t,items:r,activeIndex:i,overIndex:o}=e;return S$(r,i,o).indexOf(t)},N5e=e=>{let{containerId:t,isSorting:r,wasDragging:i,index:o,items:a,newIndex:s,previousItems:l,previousContainerId:u,transition:c}=e;return!c||!i||l!==a&&o===s?!1:r?!0:s!==o&&t===u},j5e={duration:200,easing:"ease"},A$="transform",$5e=ay.Transition.toString({property:A$,duration:0,easing:"linear"}),F5e={roleDescription:"sortable"};function z5e(e){let{disabled:t,index:r,node:i,rect:o}=e;const[a,s]=X.exports.useState(null),l=X.exports.useRef(r);return Jl(()=>{if(!t&&r!==l.current&&i.current){const u=o.current;if(u){const c=Mg(i.current,{ignoreTransform:!0}),d={x:u.left-c.left,y:u.top-c.top,scaleX:u.width/c.width,scaleY:u.height/c.height};(d.x||d.y)&&s(d)}}r!==l.current&&(l.current=r)},[t,r,i,o]),X.exports.useEffect(()=>{a&&s(null)},[a]),a}function T$(e){let{animateLayoutChanges:t=N5e,attributes:r,disabled:i,data:o,getNewIndex:a=L5e,id:s,strategy:l,resizeObserverConfig:u,transition:c=j5e}=e;const{items:d,containerId:p,activeIndex:v,disabled:x,disableTransforms:b,sortedRects:y,overIndex:_,useDragOverlay:k,strategy:E}=X.exports.useContext(E$),O=H5e(i,x),U=d.indexOf(s),D=X.exports.useMemo(()=>({sortable:{containerId:p,index:U,items:d},...o}),[p,o,U,d]),j=X.exports.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:F,node:H,isOver:W,setNodeRef:G}=R5e({id:s,data:D,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...u}}),{active:ae,activatorEvent:V,activeNodeRect:oe,attributes:P,setNodeRef:ee,listeners:le,isDragging:pe,over:xe,setActivatorNodeRef:J,transform:ft}=E5e({id:s,data:D,attributes:{...F5e,...r},disabled:O.draggable}),Le=i_e(G,ee),He=Boolean(ae),nr=He&&!b&&Hv(v)&&Hv(_),Bt=!k&&pe,Rt=Bt&&nr?ft:null,vr=nr?Rt??(l??E)({rects:y,activeNodeRect:oe,activeIndex:v,overIndex:_,index:U}):null,At=Hv(v)&&Hv(_)?a({id:s,items:d,activeIndex:v,overIndex:_}):U,kt=ae?.id,Ct=X.exports.useRef({activeId:kt,items:d,newIndex:At,containerId:p}),Lt=d!==Ct.current.items,Kt=t({active:ae,containerId:p,isDragging:pe,isSorting:He,id:s,index:U,items:d,newIndex:Ct.current.newIndex,previousItems:Ct.current.items,previousContainerId:Ct.current.containerId,transition:c,wasDragging:Ct.current.activeId!=null}),yr=z5e({disabled:!Kt,index:U,node:H,rect:F});return X.exports.useEffect(()=>{He&&Ct.current.newIndex!==At&&(Ct.current.newIndex=At),p!==Ct.current.containerId&&(Ct.current.containerId=p),d!==Ct.current.items&&(Ct.current.items=d)},[He,At,p,d]),X.exports.useEffect(()=>{if(kt===Ct.current.activeId)return;if(kt&&!Ct.current.activeId){Ct.current.activeId=kt;return}const Mt=setTimeout(()=>{Ct.current.activeId=kt},50);return()=>clearTimeout(Mt)},[kt]),{active:ae,activeIndex:v,attributes:P,data:D,rect:F,index:U,newIndex:At,items:d,isOver:W,isSorting:He,isDragging:pe,listeners:le,node:H,overIndex:_,over:xe,setNodeRef:Le,setActivatorNodeRef:J,setDroppableNodeRef:G,setDraggableNodeRef:ee,transform:yr??vr,transition:ne()};function ne(){if(yr||Lt&&Ct.current.newIndex===U)return $5e;if(!(Bt&&!RE(V)||!c)&&(He||Kt))return ay.Transition.toString({...c,property:A$})}}function H5e(e,t){var r,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(i=e?.droppable)!=null?i:t.droppable}}function $b(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const W5e=[zi.Down,zi.Right,zi.Up,zi.Left],V5e=(e,t)=>{let{context:{active:r,collisionRect:i,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(W5e.includes(e.code)){if(e.preventDefault(),!r||!i)return;const u=[];a.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const v=o.get(p.id);if(!!v)switch(e.code){case zi.Down:i.topv.top&&u.push(p);break;case zi.Left:i.left>v.left&&u.push(p);break;case zi.Right:i.left1&&(d=c[1].id),d!=null){const p=a.get(r.id),v=a.get(d),x=v?o.get(v.id):null,b=v?.node.current;if(b&&x&&p&&v){const _=Kx(b).some((j,F)=>l[F]!==j),k=I$(p,v),E=q5e(p,v),O=_||!k?{x:0,y:0}:{x:E?i.width-x.width:0,y:E?i.height-x.height:0},U={x:x.left,y:x.top};return O.x&&O.y?U:oy(U,O)}}}};function I$(e,t){return!$b(e)||!$b(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function q5e(e,t){return!$b(e)||!$b(t)||!I$(e,t)?!1:e.data.current.sortable.indext(!0),o=()=>t(!1);return X.exports.useEffect(()=>{const a=r.current;if(a)return a.addEventListener("mouseover",i),a.addEventListener("mouseout",o),()=>{a.removeEventListener("mouseover",i),a.removeEventListener("mouseout",o)}},[r.current]),{hoverRef:r,isHover:e}}const G5e="/assets/delete.42fb1897.svg",Y5e="/assets/dnd.dcf4594c.svg",Z5e=Xi("input")({display:"flex",alignItems:"center",width:300,height:44,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",paddingLeft:10,outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),rs=Xi(j6)({border:"none",padding:0}),qp=Xi(j6)({fontWeight:700}),Fl=Xi("hr")({display:"block",width:"100%",height:1,backgroundColor:"#ccc",border:"none"}),Q5e=e=>e.replace(/\/+/g,"/").replace(/^\/[^\/]/,"").replace(/\/$/,"");function kO({file:e,pos:t,isHover:r}){const i=e.fileObj.name,{attributes:o,listeners:a}=T$({id:i}),s=la(),l=aa(s.breakpoints.down("lg")),{setInclueInCommand:u,setDirectory:c,removeFile:d}=zu(),{data:p}=Hu(),v=!!p?.result?.msgCell;return Ut(ta,{children:[L(rs,{sx:{paddingLeft:1},...o,...a,children:Ut($n,{sx:{color:"#D8D8D8"},children:[t,".",L($n,{ml:5,style:{cursor:"pointer",visibility:r?"visible":"hidden"},children:L("img",{src:Y5e,alt:"Drag n drop icon",width:24,height:24})})]})}),L(rs,{children:L(Z5e,{disabled:v,value:e.folder,onBlur:x=>{c(i,Q5e(x.target.value))},onChange:x=>{c(i,x.target.value)}})}),L(rs,{sx:{paddingLeft:l?2:0},children:Ut($n,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"flex-start"},children:[L(jo,{sx:{fontSize:14},children:e.fileObj.name}),Ut(jo,{sx:{fontSize:12,color:"#C1C1C1"},children:[e.fileObj.size," bytes"]})]})}),L(rs,{children:L(woe,{disabled:v,checked:e.includeInCommand,onChange:x=>{u(i,x.target.checked)}})}),L(rs,{align:"right",children:L(Bs,{sx:{visibility:r?"visible":"hidden",opacity:.5,cursor:"pointer",marginRight:1},onClick:()=>{d(i)},children:L("img",{src:G5e,alt:"Delete icon",width:18,height:18})})})]})}function X5e({file:e,pos:t}){const r=e.fileObj.name,{hoverRef:i,isHover:o}=K5e(),{data:a}=Hu(),s=!!a?.result?.msgCell,{setNodeRef:l,transform:u,transition:c,isDragging:d}=T$({id:r}),p={transform:ay.Transform.toString(u),transition:c};return s?L(xc,{sx:{height:60},children:L(kO,{file:e,pos:t,isDragging:!1,isHover:!1})}):L(xc,{sx:{height:60,transition:".15s all","&:hover":{background:"#FAFAFA"}},ref:v=>{l(v),i.current=v},style:p,children:L(kO,{file:e,pos:t,isDragging:d,isHover:o})},r)}function J5e(){const{files:e,reorderFiles:t}=zu(),{data:r}=Hu(),i=la(),o=aa(i.breakpoints.down("lg")),a=!!r?.result?.msgCell,s=S_e(J5(y$,{}),J5(v$,{}),J5(ME,{coordinateGetter:V5e}));function l(u){const{active:c,over:d}=u;c.id!==d.id&&t(c.id,d.id)}return L(S5e,{sensors:s,collisionDetection:k_e,onDragEnd:l,modifiers:[f_e,d_e],children:L(Xoe,{children:Ut(L6,{sx:{minWidth:650},children:[Ut(z7,{sx:{"&.MuiTableHead-root th":{border:"none"}},children:[Ut(xc,{sx:{fontWeight:700},children:[L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2,width:100},children:"Order"}),L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2},children:"Directory"}),L(qp,{sx:{paddingLeft:o?2:0,width:300,paddingBottom:o?0:2},children:"File"}),L(qp,{sx:{paddingLeft:0,width:150,paddingBottom:o?0:2},children:"Include in command"}),L(qp,{sx:{paddingLeft:0,width:100,paddingBottom:o?0:2}})]}),Ut(xc,{children:[L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})})]})]}),L(N6,{children:L(D5e,{disabled:a,items:e.map(u=>u.fileObj.name),strategy:B5e,children:e.map((u,c)=>L(X5e,{file:u,pos:c+1},u.fileObj.name))})})]})})})}const i3=Xi(k7)({flexGrow:1}),o3=Xi(j7)(({theme:e})=>({borderRadius:e.spacing(1.2),height:e.spacing(5.3),minWidth:150,".MuiOutlinedInput-notchedOutline":{border:"1px solid #D8D8D8"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #807e7e"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #b0b0b0"}})),Vv=Xi(E7)(({theme:e})=>({color:"#000",fontSize:12,marginLeft:e.spacing(1),marginBottom:e.spacing(1)})),e3e=Xi("input")(({theme:e})=>({display:"flex",alignItems:"center",boxSizing:"border-box",width:"100%",flex:2,height:e.spacing(5.3),borderRadius:e.spacing(1.2),border:"1px solid #D8D8D8",outline:"none",padding:"0 40px 0 125px",color:"#000",background:"transparent",fontFamily:"Mulish",fontSize:14,"&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}})),t3e="/assets/undo.944d3e45.svg";function r3e(){const{compilerSettings:e,setOverrideCommandLine:t,setFuncCliVersion:r,setTactCliVersion:i,compiler:o,setCompiler:a}=cE(),{data:s}=Hu(),l=la(),u=aa(l.breakpoints.down("md")),c=!!s?.result?.msgCell,{data:{funcVersions:d,tactVersions:p}}=uE();return Ut(da,{mt:4,children:[L(jo,{variant:"h5",style:{fontWeight:800,fontSize:16,marginBottom:16},children:"Compiler"}),Ut($n,{sx:{gap:1,alignItems:u?"center":"flex-end",flexDirection:u?"column":"inherit"},children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{children:[L(Vv,{children:"Compiler"}),Ut(o3,{value:o,onChange:v=>{a(v.target.value)},children:[L(rm,{value:"func",children:"func"}),L(rm,{value:"tact",children:"tact"}),{}.VITE_ALLOW_FIFT&&L(rm,{value:"fift",children:"fift"})]})]})}),o==="func"&&Ut(ta,{children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.funcVersion,onChange:v=>{r(v.target.value)},children:d?.map(v=>L(rm,{value:v,children:v},v))})]})}),Ut(da,{sx:{width:"100%",position:"relative"},children:[L(Vv,{sx:{display:"block"},children:"Func command"}),L(e3e,{disabled:c,value:e.commandLine,onChange:v=>{t(v.target.value)}}),L(Fee,{sx:{position:"absolute",left:3,top:28,height:37,background:"#F5F5F5",borderRadius:1.5,color:"#000",fontSize:14},label:"func -o tmp.fif"}),!!e.overrideCommandLine&&L(Bs,{sx:{color:"blue",position:"absolute",right:10,top:31},onClick:()=>{t(null)},children:L("img",{src:t3e,alt:"Undo icon",width:15,height:15})})]})]}),o==="tact"&&L(ta,{children:L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.tactVersion,disabled:!0,children:p?.map(v=>L(rm,{value:v,children:v},v))})]})})})]})]})}const n3e="/assets/reorder-hint.5f3a54fb.svg",i3e="/assets/light-bulb.7768be40.svg",R$="/assets/like.af7e7b33.svg",o3e=sr(kn)({maxWidth:1160,width:"calc(100% - 50px)",margin:"auto"}),a3e=sr(kn)({display:"flex",justifyContent:"space-between",height:73}),s3e=sr(kn)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),l3e=sr(kn)(({theme:e})=>({display:"flex",flexWrap:"wrap",justifyContent:"space-between",marginTop:e.spacing(3),marginBottom:e.spacing(2),color:"#728A96",fontSize:14,[e.breakpoints.down("md")]:{"& > *":{marginBottom:`${e.spacing(1)} !important`}}})),u3e=sr("hr")({height:"1px",backgroundColor:"#e6e6e6",border:"none"}),EO=sr(uc)(({theme:e})=>({display:"inline-flex",alignItems:"center",color:"inherit",textDecoration:"none",[e.breakpoints.down("md")]:{justifyContent:"flex-end"}})),Fy=sr(kn)({display:"flex",justifyContent:"center",alignItems:"center"}),c3e=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"100%",flex:2,order:3}})),P$=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"50%"}})),d3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"start"},[e.breakpoints.down("sm")]:{minWidth:100}})),f3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"end"},[e.breakpoints.down("sm")]:{minWidth:100}})),p3e="/assets/heart.52fe96d0.svg",h3e="/assets/orbs.eb35e74b.svg",g3e="/assets/telegram.bcba2ca3.svg",m3e="/assets/telegram-hover.72b9d3ce.svg",y3e="/assets/github-footer.0bd3bbab.svg",v3e="/assets/github-hover.33daf3ef.svg",AO=sr(kn)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",width:t.spacing(3),height:t.spacing(3),background:`url(${e.iconUrl})`,"&:hover":{transitionDuration:".25s",background:`url(${e.disabled?e.iconUrl:e.hoveredIconUrl})`,cursor:e.disabled?"cursor":"pointer"}})),TO=({iconUrl:e,hoveredIconUrl:t,link:r})=>r.length?L(uc,{target:"_blank",href:r,children:L(AO,{iconUrl:e,hoveredIconUrl:t})}):L(AO,{iconUrl:e,hoveredIconUrl:t,disabled:!0});function M$(){const e=ZC(),[t,r]=yw();return()=>{t.has("testnet")?t.delete("testnet"):t.append("testnet",""),r(t),e(0)}}function BE(){const e=M$();return L(kn,{sx:{background:"red",color:"white",py:2},children:Ut(wE,{sx:{gap:4,px:4},children:[L(jo,{sx:{fontWeight:"bold",flexGrow:1},children:"Testnet"}),L(jo,{onClick:()=>{e()},sx:{cursor:"pointer"},children:"Switch to mainnet"})]})})}const H4="https://t.me/tonverifier";function Fb(){const e=aa("(max-width: 450px)"),t=Ac(),r=M$();return Ut(o3e,{children:[Ut(a3e,{mb:e?5:"inherit",sx:{flexDirection:e?"column":"inherit",alignItems:e?"center":"inherit"},children:[L($n,{children:Ut(ap,{sx:{color:"#000"},onClick:()=>t("/"),children:[L("img",{src:vw,alt:"App icon",width:30,height:30}),L(cx,{children:"TON VERIFIER"})]})}),Ut(s3e,{children:[L(TO,{iconUrl:g3e,hoveredIconUrl:m3e,link:H4}),L(TO,{iconUrl:y3e,hoveredIconUrl:v3e,link:"https://github.com/orbs-network/ton-contract-verifier"})]})]}),L(u3e,{}),Ut(l3e,{children:[L(d3e,{children:L(jo,{variant:"body2",children:"\xA9 2023"})}),L(c3e,{children:Ut($n,{sx:{gap:.1},children:["Contributed with",L($n,{mx:.4,children:L("img",{src:p3e,alt:"Heart",width:12,height:12})}),"by",L($n,{mx:.4,children:L("img",{src:h3e,alt:"Orbs logo",width:12,height:12})}),L(EO,{sx:{color:"#5E75E8"},target:"_blank",href:"https://orbs.com/powered-by",children:"Orbs"})]})}),Ut(f3e,{children:[L(EO,{target:"_blank",href:H4,children:L(jo,{variant:"body2",children:"Support"})}),!window.isTestnet&&L(jo,{onClick:()=>{r()},sx:{ml:2,cursor:"pointer"},variant:"body2",children:"Switch to Testnet"})]})]})]})}const b3e=sr("li")({maxWidth:650,fontSize:14,fontWeight:400,marginBottom:10});function w3e(e,t){switch(e){case Na.ENTRYPOINT_MISSING:return"There usually should be at least one file containing an entrypoint (recv_internal, main)";case Na.STDLIB_ORDER:return"stdlib.fc should usually be the first file in the list (unless it's imported from another file)";case Na.STDLIB_MISSING:return"You can try to add stdlib.fc to your sources.";case Na.NOT_SIMILAR:return"Source code compiles correctly but does not match the on-chain contract hash. Make sure you are using the correct compiler version, command line and file order.";case Na.FILE_ORDER:return"Make sure all files in the command line are in the correct order";case Na.COMPILER_VERSION:return"Try to use the same compiler version as the contract was compiled with";case Na.REQUIRED_FILES:return"Make sure all required files are included in the command line";case Na.SUPPORT_GROUP:return Ut("div",{children:["If you are still facing issues, you can use the"," ",L(uc,{target:"_blank",href:H4,sx:{textDecoration:"none",cursor:"pointer"},children:"Telegram support group"})]})}}const x3e=({hint:e})=>{const{data:t}=Hu();return L(b3e,{children:w3e(e,t?.result.compileResult)})},Dd=sr(jo)({fontSize:14,fontWeight:400,marginBottom:"10px"}),IO=sr(jo)({fontSize:14,fontWeight:700}),O$=sr(jo)({fontSize:14,fontWeight:400}),RO=sr($n)({padding:"20px 30px",paddingLeft:0,"&:hover":{background:"transparent"}}),PO=sr(Tj)({minWidth:200,fontSize:14,fontWeight:600}),_3e=sr(da)({borderBottom:"1px solid rgba(0, 0, 0, 0.2)"}),MO=sr(Ij)({color:"#000",fontSize:14,fontWeight:400});function S3e(){const{data:e,error:t}=Hu(),{data:r}=vp(),i=e?.result?.compileResult,o=e?.hints??[];return Ut(da,{my:3,children:[["similar"].includes(i?.result??"")&&L(Cs,{singleLine:!0,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(da,{})}),["not_similar"].includes(i?.result??"")&&L(Cs,{type:ps.ERROR,title:Ut($n,{children:[L($n,{mr:1,children:L("img",{src:n3e,alt:"Reorder icon",width:39,height:26})}),L(IO,{children:"Hashes are not similar"})]}),notificationBody:Ut(da,{sx:{display:"flex",flexDirection:"column"},children:[Ut(RO,{children:[L(PO,{children:"Contract hash"}),L(MO,{children:r?.codeCellHash.base64??"-"})]}),L(_3e,{}),Ut(RO,{children:[L(PO,{children:"Compile output hash"}),L(MO,{children:i?.hash??"-"})]})]})}),i?.error&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:i.error})})})}),!!t&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Server error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:t.toString()})})})}),o.length>0&&L(Cs,{type:ps.HINT,title:Ut($n,{mb:2,children:[L($n,{mr:1,children:L("img",{src:i3e,alt:"Light bulb icon",width:21,height:22})}),L(IO,{children:"Possible reasons for failure"})]}),notificationBody:L("ul",{style:{paddingLeft:25},children:o.map(a=>L(x3e,{hint:a},a))})})]})}function B$(){const[e]=kg();return L(Ha,{background:"#1976d2",hoverBackground:"#156cc2",height:37,fontSize:14,fontWeight:700,textColor:"#fff",type:"button",onClick:()=>e.connectWallet(),children:"Connect wallet"})}const C3e=Xi(da)({padding:"15px 24px"});function k3e(){const e=Bx(),{hasFiles:t}=zu(),{step:r,proceedToPublish:i,toggleSection:o,currentSection:a}=Vx(),{mutate:s,data:l,error:u,isLoading:c,compileStatus:d}=Hu(),p=!!l?.result?.msgCell,v=()=>o(sc.SOURCES);return Ut(ug,{children:[L(da,{sx:{cursor:r===hc.PUBLISH&&p?"pointer":"inherit"},onClick:v,children:L(n_e,{})}),a===sc.SOURCES&&L(vy,{in:a===sc.SOURCES,children:L(C3e,{children:Ut(ta,{children:[t()&&Ut(ta,{children:[L(J5e,{}),L(r3e,{})]}),(l||u)&&L(S3e,{}),t()&&L($n,{sx:{justifyContent:"center"},mt:3,mb:"9px",children:e?l?.result?.msgCell?L(Ha,{disabled:r===hc.PUBLISH,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:i,children:"Ready to publish"}):Ut(Ha,{disabled:!t(),fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(null)},children:[c&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Compile"]}):L(B$,{})})]})})})]})}const E3e=sr(c2)({borderRadius:40,fontFamily:"inherit",fontWeight:700,textTransform:"none",background:"#0088CC","&:disabled":{backgroundColor:"#e0e0e0"}});function nd(e){return L(E3e,{disableElevation:!0,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,variant:"contained",disabled:e.disabled,onClick:e.disabled?void 0:e.onClick,...e,children:e.text})}const A3e="/assets/publish.83df630b.svg";function T3e(){const{data:e}=Hu(),{sendTXN:t,status:r,clearTXN:i}=rj(),{step:o,toggleSection:a,currentSection:s}=Vx();zu();const l=!!e?.result?.msgCell;let u;const c=()=>o===hc.PUBLISH&&l&&a(sc.PUBLISH);switch(r){case"initial":u=L("span",{children:"To store your contract\u2019s verification proof on-chain, you will need to issue a transaction. This will cost 0.5 TON"});break;case"rejected":u="Transaction rejected, please retry.";break;case"pending":u="Check your wallet for a pending transaction.";break;case"issued":u="Transaction issued, monitoring proof deployment on-chain.";break;case"success":u="Your contract is now verified! Click below to view it.";break;case"expired":u="Transaction expired, please retry.";break;case"error":u="The transaction is taking too long to complete or have failed. Please use a blockchain explorer to monitor it. You can also use our telegram support group."}return Ut(ug,{mb:6,children:[Ut($n,{p:s===sc.PUBLISH?"30px 24px 0 24px":"20px 24px",onClick:c,sx:{opacity:o===hc.PUBLISH&&l?1:.25,cursor:o===hc.PUBLISH&&l?"pointer":"inherit"},children:[L(cg,{children:L("img",{src:r==="success"?r$:A3e,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Publish"})]}),s===sc.PUBLISH&&l&&L(vy,{in:s===sc.PUBLISH,children:Ut(da,{children:[L(da,{sx:{padding:"0 30px"},children:L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:u})})})}),Ut($n,{mb:3,sx:{justifyContent:"center"},children:[r!=="success"&&Ut(Ha,{disabled:r==="pending"||r==="issued",fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{t()},children:[(r==="pending"||r==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Publish"]}),r==="success"&&L(nd,{sx:{height:44},text:"View verified contract",onClick:()=>{location.reload()}})]})]})})]})}const I3e="/assets/verification-alert.0ebcec4f.svg",R3e="/assets/verification-binary.d6844d86.svg",P3e="/assets/verification-bomb.3bf48d9c.svg",M3e="/assets/verification-paper.34a39e79.svg",O3e="/assets/show.836c8f4f.svg",B3e="/assets/verification.fbd44dba.svg",U3e=Xi(Bs)(()=>({color:"#000"})),D3e=Xi(da)({display:"flex",alignItems:"center",flexDirection:"column","& .title":{texAlign:"center",fontWeight:500,fontSize:20,marginBottom:20},"& .base-button":{height:40,marginTop:30}});function L3e({open:e,onClose:t,children:r,backgroundColor:i="rgba(48, 48, 48, 0.4)",blur:o=!0,className:a="",maxWidth:s,hideCloseButton:l,paddingTop:u}){return L(rre,{className:`${a} ${o&&"popup-filter"}`,fullWidth:!0,onClose:t,open:e,PaperProps:{style:{maxWidth:s||"unset",width:"100%",borderRadius:"10px",padding:0,overflow:"unset",margin:20}},BackdropProps:{style:{backgroundColor:i}},children:Ut(da,{sx:{overflow:"scroll","::-webkit-scrollbar":{display:"none"}},children:[!l&&L(da,{sx:{display:"flex",justifyContent:"end",width:"100%"},children:L(U3e,{onClick:t,children:L(Ck,{style:{width:23,height:23}})})}),L(D3e,{px:3,pb:3,pt:u?3:0,children:r})]})})}const N3e="/assets/verification-popup.1a3fc640.svg",j3e=sr(L6)({overflow:"scroll",background:"#F7F9FB",borderRadius:"5px",width:"100%"}),$3e=sr(kn)({background:"#F7F9FB",borderRadius:"5px",width:"100%"}),F3e=sr(z7)({"&.MuiTableHead-root th":{border:"none",fontSize:13}}),z3e=sr(xc)({fontWeight:700}),$p=sr(qp)({paddingLeft:0,paddingBottom:"2px"}),Fp=sr(rs)({paddingBottom:10}),H3e=sr($n)({width:59,height:21,background:"#08D088",borderRadius:40,color:"#fff",justifyContent:"space-around",fontSize:12}),id=sr(rs)({paddingBottom:16}),W3e=sr(uc)({textDecoration:"none",cursor:"pointer",color:"#0088CC"}),V3e=sr(kn)({width:"100%",display:"flex",justifyContent:"flex-end"}),a3=sr(jo)({color:"#728A96",fontSize:14}),q3e=sr(Fd)({fontSize:18,fontWeight:800,color:"#000",textAlign:"center"}),K3e=sr(kn)({display:"inline-flex",alignItems:"center",height:"20px",padding:"0 7px",background:"rgba(146, 146, 146, 0.3)",borderRadius:"10px",color:"#212121",fontWeight:400,fontSize:"14px",fontFamily:"IBM Plex Mono, monospace"});sr(K3e)({position:"relative",top:5,display:"inline-block",whiteSpace:"nowrap",lineHeight:"20px",width:"100%",maxWidth:600,overflow:"hidden",textOverflow:"ellipsis"});const G3e="/assets/verified.4e0dc210.svg",Am=()=>L(Xa,{width:"85%",variant:"text",sx:{transform:"none",background:"#e6e8eb"}}),Y3e=()=>Ut(F3e,{children:[Ut(z3e,{children:[L($p,{sx:{width:80,paddingLeft:3},children:"Status"}),L($p,{sx:{width:370},children:"Public Key"}),L($p,{sx:{width:35}}),L($p,{sx:{width:105},children:"IP"}),L($p,{sx:{width:150},children:"Verification date"}),L($p,{sx:{width:100},children:"Verifier"})]}),Ut(xc,{children:[L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})})]})]}),OO=()=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:L(Am,{})}),L(id,{children:L(Am,{})}),L(id,{children:L(Xa,{width:25,variant:"text",sx:{transform:"none",background:"#e6e8eb"}})}),L(id,{children:L(Am,{})}),L(id,{children:L(Am,{})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L(Am,{})})]}),Z3e=({pubKey:e,endpoint:t,name:r,onCopy:i,date:o,url:a})=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:Ut(H3e,{px:1,children:[L("img",{src:G3e,alt:"Verified icon",width:11,height:11}),"Verified"]})}),L(id,{children:L(a3,{children:e})}),L(id,{children:L(Bs,{onClick:()=>i(e),sx:{padding:.5},children:L("img",{src:Wx,alt:"Copy icon",width:16,height:16})})}),L(id,{children:L(a3,{children:t})}),L(id,{children:L(a3,{children:o})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L($n,{children:L(W3e,{target:"_blank",href:a,children:r})})})]});function Q3e(){const{data:e,isLoading:t,error:r}=Pc(),{data:i,isLoading:o,error:a}=zx(),{showNotification:s}=Ry(),l=i?.find(c=>c.name===window.verifierId),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(kn,{sx:{overflow:"scroll",borderRadius:"5px","::-webkit-scrollbar":{display:"none"}},children:[Ut(j3e,{sx:{minWidth:900},children:[L(Y3e,{}),L(N6,{children:t||o?Ut(ta,{children:[L(OO,{}),L(OO,{})]}):l&&e&&Object.entries(l.pubKeyEndpoints).map(([c,d])=>L(Z3e,{pubKey:c,onCopy:u,url:l.url,date:e?.verificationDate?.toLocaleDateString()||"",endpoint:d,name:l.name},c))})]}),(!!r||!!a)&&`${r} ${a} (App notification)`]})}const X3e="modulepreload",J3e=function(e){return"/"+e},BO={},Tm=function(t,r,i){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=J3e(a),a in BO)return;BO[a]=!0;const s=a.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let d=o.length-1;d>=0;d--){const p=o[d];if(p.href===a&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":X3e,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var v1=(e=>(e.VALID="VALID",e.WASM="WebAssembly is not supported",e.COMPILER="Only FunC contracts can be verified",e.VERSION="FunC version is not supported",e))(v1||{});const eSe=["0.2.0","0.3.0","0.4.0","0.4.1"];function tSe(){const{data:e}=Pc(),{data:t}=vp(),[r,i]=X.exports.useState(null),[o,a]=X.exports.useState(!1),[s,l]=X.exports.useState(null),u=async()=>{wa(ha.IN_BROWSER_COMPILE_START),i(null),a(!0);const{FuncCompiler:p}=await Tm(()=>import("./index.9d39f999.js").then(E=>E.i),[]),v=e?.files?.map(E=>({filename:E.name,content:E.content}))??[],x=e?.compilerSettings?.funcVersion;if(!x){i("FunC is not available for in-browser verification"),a(!1);return}let b;switch(x){case"0.2.0":{let{object:E}=await Tm(()=>import("./index.fbca1507.js").then(O=>O.i),[]);b=E;break}case"0.3.0":{let{object:E}=await Tm(()=>import("./index.f65cb428.js").then(O=>O.i),[]);b=E;break}case"0.4.0":{let{object:E}=await Tm(()=>import("./index.fb59a6c3.js").then(O=>O.i),[]);b=E;break}case"0.4.1":{let{object:E}=await Tm(()=>import("./index.bf0da248.js").then(O=>O.i),[]);b=E;break}}let _=await new p(b).compileFunc({sources:v,targets:(e?.compilerSettings).commandLine.split(" ").filter(E=>E.match(/\.(fc|func)$/))});if(_.status==="error"){i(_.message),a(!1),wa(ha.IN_BROWSER_COMPILE_ERROR);return}const k=Vn.Cell.fromBoc(Buffer.from(_.codeBoc,"base64"))[0];a(!1),t?.codeCellHash.base64===k.hash().toString("base64")&&l(k.hash().toString("base64")),wa(ha.IN_BROWSER_COMPILE_SUCCESS)},c=()=>xj()?e?.compiler!=="func"?"Only FunC contracts can be verified":d()?"VALID":"FunC version is not supported":"WebAssembly is not supported",d=()=>eSe.some(p=>p===e?.compilerSettings?.funcVersion);return{verifyContract:u,isVerificationEnabled:c,loading:o,error:r,hash:s}}function rSe(){const{verifyContract:e,isVerificationEnabled:t,error:r,loading:i,hash:o}=tSe(),a=la(),s=aa(a.breakpoints.down("md"));return Ut(kn,{p:2,children:[Ut(jo,{sx:{fontSize:14},children:["You are not required to rely on third-party validators. You can now verify this contract by yourself by having your browser download the sources and compile them locally in-browser using"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/func-js",target:"_blank",children:"WASM"}),".",!iwe()&&L($n,{mt:1,sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{margin:0},children:["The web page you're looking at is"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/contract-verifier",target:"_blank",children:"open source"}),", you can also fork or run it locally if you wish to have absolute control."]})})]}),t()!==v1.VALID?L($7,{arrow:!0,title:L(jo,{sx:{fontSize:13},children:t()}),placement:"top",children:L(kn,{sx:{width:144,margin:"auto"},children:L(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:"Verify"})})}):Ut(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:[i&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Verify"]}),r&&Ut(ta,{children:[L(Cs,{noBottomMargin:!0,type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:r})})})}),Ut(jo,{sx:{marginTop:1,fontSize:13},children:["You can ask for help in our"," ",L(uc,{sx:{textDecoration:"none",cursor:"pointer",color:"#0088CC"},href:"https://t.me/tonverifier",target:"_blank",children:"Telegram support group"})]})]}),!!o&&L(Cs,{noBottomMargin:!0,singleLine:!s,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(kn,{})})]})}function nSe(){const{data:e,isLoading:t}=Pc(),{isLoading:r}=zx();return Ut(kn,{sx:{width:"100%"},children:[e&&!r&&Ut($3e,{pt:3,pb:1,children:[L(q3e,{children:"Verify manually"}),L(iSe,{})]}),(t||r)&&L(Xa,{width:"100%",height:250,sx:{transform:"none",borderRadius:"20px",background:"#e6e8eb"}})]})}Xi(H7)({borderBottom:"none","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function iSe(){return L(kn,{sx:{width:"100%"},children:L(rSe,{})})}function oSe({onClose:e}){const t=la(),r=aa(t.breakpoints.down("lg"));return L(L3e,{open:!0,maxWidth:r?"88%":1e3,hideCloseButton:!0,children:L(w6,{onClickAway:e,children:Ut(kn,{sx:{width:"100%"},children:[L(V3e,{pt:2,children:L(Bs,{sx:{padding:0},onClick:e,children:L("img",{src:b6,alt:"Close icon",width:15,height:15})})}),Ut($n,{mb:4,justifyContent:"center",children:[L("img",{src:N3e,alt:"Popup icon",width:41,height:41}),L(Fd,{pl:2,sx:{fontSize:18,fontWeight:800},children:"Verification Proof"})]}),L(Q3e,{}),L($n,{mt:3,children:L(nSe,{})})]})})})}const aSe=Xi($n)(({theme:e})=>t=>({flexWrap:t.makeFlexible?"wrap":"inherit",gap:t.makeFlexible?20:"inherit",justifyContent:t.makeFlexible?"center":"space-between",padding:24,[e.breakpoints.down("lg")]:{width:"70%",margin:"auto"}})),sSe=Xi(Fy)({boxSizing:"border-box",display:"flex",minWidth:200,maxWidth:260,height:108,background:"#F7F9FB",borderRadius:14,padding:"28px 13px"}),lSe=Xi(jo)({fontSize:14,color:"#000"}),uSe=[{icon:M3e,description:"This source code compiles to the same exact bytecode that is found on-chain."},{icon:P3e,description:"You can review verification proofs and perform your own client-side verification."},{icon:I3e,description:"Variable/function names may not reflect actual usage. compiler may remove unused code."},{icon:R3e,description:"Comments may not be honest and should generally be ignored."}],cSe=()=>{const[e]=yw(),[t,r]=Gn.useState(e.get("showProof")!==null),i=la(),o=aa(i.breakpoints.down("lg")),a=aa(i.breakpoints.down("md")),s=aa("(max-width: 450px)");return Ut(ug,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",flexDirection:s?"column":"inherit",width:"100%"},children:[Ut($n,{mb:s?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:B3e,alt:"Verification icon",width:41,height:41})}),L(Fd,{children:"How is this contract verified?"})]}),Ut("div",{children:[Ut(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",background:"#1976d2",hoverBackground:"#156cc2",height:37,width:132,onClick:()=>{r(!0)},children:[L("img",{src:O3e,alt:"Show icon",width:19,height:19}),"Show Proof"]}),t&&L(oSe,{onClose:()=>r(!1)})]})]})}),L(aSe,{makeFlexible:o,isMobile:a,children:uSe.map(u=>Ut(sSe,{children:[L(Fy,{sx:{alignSelf:"flex-start"},mr:1.5,children:L("img",{alt:"Icon",src:u.icon,width:41,height:41})}),L(lSe,{children:u.description})]},u.description))})]})};function dSe(){const e=ej(m1),{isLoading:t,error:r,data:i}=bc(["latestVerifiedContracts"],async()=>(await(await fetch(`${e}/latestVerified`,{method:"GET"})).json()).slice(0,100));return{isLoading:t,error:r,data:i}}const fSe=sr(kn)(({theme:e})=>({background:"white",padding:"16px 20px",borderRadius:10,boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",border:"0.5px solid rgba(114, 138, 150, 0.24)",cursor:"pointer",[e.breakpoints.down("sm")]:{width:280}})),pSe=sr(kn)(({theme:e})=>({maxWidth:1160,width:"calc(100% - 50px)",paddingTop:20,margin:"0 auto"})),hSe=sr(kn)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,margin:"0 auto",justifyContent:"left",overflow:"auto",marginTop:24,"-webkit-text-size-adjust":"100%"}),gSe=sr(kn)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,color:"#728A96"}),mSe=sr(kn)({marginLeft:"auto",fontSize:14,background:"#F0F0F099",color:"#728A9699",padding:"2px 12px",borderRadius:4});function ySe(){const{data:e,isLoading:t}=dSe(),r=Ac(),i=X.exports.useRef(new Array(30).fill(null).map(o=>Math.random()*100));return Ut(pSe,{children:[L(jo,{variant:"h6",children:L("b",{children:"Latest verified contracts"})}),Ut(hSe,{children:[t&&i.current.map(o=>L(Xa,{sx:{borderRadius:2},variant:"rectangular",width:400+o,height:70})),e?.map(o=>Ut(fSe,{onClick:a=>{r(`/${o.address}`)},children:[L(gSe,{children:o.address}),Ut("div",{style:{display:"flex",alignItems:"center",marginTop:6.5},children:[L(jo,{sx:{fontSize:14,color:"#728A9699"},children:o.mainFile}),L(mSe,{children:o.compiler})]})]}))]})]})}const U$=Xi(kn)({maxWidth:1160,margin:"auto"}),D$=Xi(kn)(e=>({display:e.isMobile?"inherit":"flex",gap:20})),qv=Xi(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,padding:20,color:"#000"});function UO(){const{isLoading:e,data:t,error:r}=Pc(),[i,o]=X.exports.useState(!1),a=la(),s=kwe(),{contractAddress:l,isAddressEmpty:u}=$u(),{hasFiles:c}=zu(),d=X.exports.useRef(),p=aa(a.breakpoints.down("lg")),v=aa(a.breakpoints.down("md")),x=!r&&e&&l;AL(),Awe(),uwe(),X.exports.useEffect(()=>{window.scrollTo({behavior:"auto",top:d.current?.offsetTop})},[window.location.pathname]);const{initialize:b}=cE(),{data:{funcVersions:y}}=uE();return X.exports.useEffect(()=>{(y?.length??0)>0&&b(y[0])},[y]),Ut(kn,{onDragEnter:()=>o(!0),onDrop:()=>o(!1),onClick:()=>o(!1),children:[L(u2,{sx:{color:"#fff",zIndex:4},open:i,onDragEnd:()=>o(!1)}),L(kn,{ref:d}),window.isTestnet&&L(BE,{}),L(gve,{}),l===null&&u&&L(ySe,{}),l===null&&!u&&L(kn,{m:4,children:L(Cs,{singleLine:!0,type:ps.ERROR,title:Ut($n,{sx:{height:42},children:[L("span",{style:{color:"#FC5656",marginRight:4},children:"Error: "}),"Invalid address"]}),notificationBody:L(kn,{})})}),Ut(U$,{px:p?"20px":0,children:[!!r&&L(kn,{mt:4,children:L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Unable to fetch contract data"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("pre",{children:L("code",{children:r.toString()})})})})}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),!e&&Ut(D$,{isMobile:v,children:[L(Bwe,{}),t?.hasOnchainProof&&L(axe,{})]}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),!e&&t?.hasOnchainProof&&L(cSe,{}),t&&(!t.hasOnchainProof||s)&&Ut(ta,{children:[L(k3e,{}),c()&&L(T3e,{})]}),t&&!c()?L(qv,{sx:{padding:0},mb:5,children:L(Cwe,{})}):L(ta,{children:x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:5,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:250}})]}),L(Xa,{variant:"rectangular",width:"100%",height:500})]})}),t&&L(Fb,{})]}),!t&&L(Fy,{sx:{bottom:0,width:"100%"},children:L(Fb,{})})]})}function L$({space:e}){return L("div",{style:{height:e}})}function vSe(){const[e,t]=X.exports.useState({spec:[],builder:Vn.beginCell()});return Ut("div",{children:[L("h4",{children:"Build the cell"}),L(wh,{required:!0,id:"outlined-required",label:"UINT",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const[i,o]=r.target.value.split(",");t(a=>({spec:[...a.spec,{type:"uint"+o,value:i}],builder:a.builder.storeUint(i,o)})),r.target.value=""}}}),L(wh,{required:!0,id:"outlined-required",label:"Address",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const i=r.target.value;t(o=>({spec:[...o.spec,{type:"address",value:i}],builder:o.builder.storeAddress(Vn.Address.parse(i))})),r.target.value=""}}}),L("div",{children:JSON.stringify(e.spec)}),L(L$,{space:30}),L(c2,{variant:"outlined",children:"Send the message"})]})}function bSe(){return Ut("div",{style:{margin:"0 auto",maxWidth:1100,padding:40},children:[L(B$,{}),L(L$,{space:35}),L(wh,{required:!0,id:"outlined-required",label:"Contract address",fullWidth:!0}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),Ut("div",{children:[L("h3",{children:"OPs"}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),L(vSe,{})]})]})}const wSe=v6({typography:{fontFamily:"Mulish"},components:{MuiSwitch:{styleOverrides:{switchBase:{color:"#ccc"},colorPrimary:{"&.Mui-checked":{color:"#fff"}},track:{opacity:1,backgroundColor:"#D1D1D6",".Mui-checked.Mui-checked + &":{opacity:1,backgroundColor:"#0088CC"}},thumb:{background:"#fff",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.16)"}}}}});function UE({label:e,data:t}){return Ut("div",{className:"InfoPiece",children:[L("div",{className:"InfoPiece-Label",children:e}),L("div",{className:"InfoPiece-Data",children:t})]})}var zy=e=>e.type==="checkbox",ch=e=>e instanceof Date,ds=e=>e==null;const N$=e=>typeof e=="object";var ka=e=>!ds(e)&&!Array.isArray(e)&&N$(e)&&!ch(e),j$=e=>ka(e)&&e.target?zy(e.target)?e.target.checked:e.target.value:e,xSe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$$=(e,t)=>e.has(xSe(t)),_Se=e=>{const t=e.constructor&&e.constructor.prototype;return ka(t)&&t.hasOwnProperty("isPrototypeOf")},DE=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ja(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(DE&&(e instanceof Blob||e instanceof FileList))&&(r||ka(e)))if(t=r?[]:{},!r&&!_Se(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Ja(e[i]));else return e;return t}var Og=e=>Array.isArray(e)?e.filter(Boolean):[],Ro=e=>e===void 0,vn=(e,t,r)=>{if(!t||!ka(e))return r;const i=Og(t.split(/[,[\].]+?/)).reduce((o,a)=>ds(o)?o:o[a],e);return Ro(i)||i===e?Ro(e[t])?r:e[t]:i},vu=e=>typeof e=="boolean";const zb={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},yl={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Xu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},SSe=Gn.createContext(null),Zx=()=>Gn.useContext(SSe);var F$=(e,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==yl.all&&(t._proxyFormState[s]=!i||yl.all),r&&(r[s]=!0),e[s]}});return o},Vs=e=>ka(e)&&!Object.keys(e).length,z$=(e,t,r,i)=>{r(e);const{name:o,...a}=e;return Vs(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!i||yl.all))},Gs=e=>Array.isArray(e)?e:[e],H$=(e,t,r)=>!e||!t||e===t||Gs(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i)));function Qx(e){const t=Gn.useRef(e);t.current=e,Gn.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function CSe(e){const t=Zx(),{control:r=t.control,disabled:i,name:o,exact:a}=e||{},[s,l]=Gn.useState(r._formState),u=Gn.useRef(!0),c=Gn.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Gn.useRef(o);return d.current=o,Qx({disabled:i,next:p=>u.current&&H$(d.current,p.name,a)&&z$(p,c.current,r._updateFormState)&&l({...r._formState,...p}),subject:r._subjects.state}),Gn.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),F$(s,r,c.current,!1)}var bu=e=>typeof e=="string",W$=(e,t,r,i,o)=>bu(e)?(i&&t.watch.add(e),vn(r,e,o)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),vn(r,a))):(i&&(t.watchAll=!0),r);function kSe(e){const t=Zx(),{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s}=e||{},l=Gn.useRef(i);l.current=i,Qx({disabled:a,subject:r._subjects.values,next:d=>{H$(l.current,d.name,s)&&c(Ja(W$(l.current,r._names,d.values||r._formValues,!1,o)))}});const[u,c]=Gn.useState(r._getWatch(i,o));return Gn.useEffect(()=>r._removeUnmounted()),u}var LE=e=>/^\w*$/.test(e),V$=e=>Og(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ao(e,t,r){let i=-1;const o=LE(t)?[t]:V$(t),a=o.length,s=a-1;for(;++i{const d=o._options.shouldUnregister||a,p=(v,x)=>{const b=vn(o._fields,v);b&&(b._f.mount=x)};if(p(r,!0),d){const v=Ja(vn(o._options.defaultValues,r));Ao(o._defaultValues,r,v),Ro(vn(o._formValues,r))&&Ao(o._formValues,r,v)}return()=>{(s?d&&!o._state.action:d)?o.unregister(r):p(r,!1)}},[r,o,s,a]),Gn.useEffect(()=>{vn(o._fields,r)&&o._updateDisabledField({disabled:i,fields:o._fields,name:r,value:vn(o._fields,r)._f.value})},[i,r,o]),{field:{name:r,value:l,...vu(i)||vu(u.disabled)?{disabled:u.disabled||i}:{},onChange:Gn.useCallback(d=>c.current.onChange({target:{value:j$(d),name:r},type:zb.CHANGE}),[r]),onBlur:Gn.useCallback(()=>c.current.onBlur({target:{value:vn(o._formValues,r),name:r},type:zb.BLUR}),[r,o]),ref:d=>{const p=vn(o._fields,r);p&&d&&(p._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:v=>d.setCustomValidity(v),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!vn(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!vn(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!vn(u.touchedFields,r)},error:{enumerable:!0,get:()=>vn(u.errors,r)}})}}const ASe=e=>e.render(ESe(e));var TSe=(e,t,r,i,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:o||!0}}:{},zc=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},s3=(e,t,r={})=>r.shouldFocus||Ro(r.shouldFocus)?r.focusName||`${e}.${Ro(r.focusIndex)?t:r.focusIndex}.`:"",W4=e=>({isOnSubmit:!e||e===yl.onSubmit,isOnBlur:e===yl.onBlur,isOnChange:e===yl.onChange,isOnAll:e===yl.all,isOnTouch:e===yl.onTouched}),V4=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const d0=(e,t,r,i)=>{for(const o of r||Object.keys(e)){const a=vn(e,o);if(a){const{_f:s,...l}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!i)break;if(s.ref&&t(s.ref,s.name)&&!i)break}else ka(l)&&d0(l,t)}}};var q$=(e,t,r)=>{const i=Og(vn(e,r));return Ao(i,"root",t[r]),Ao(e,r,i),e},NE=e=>e.type==="file",od=e=>typeof e=="function",Hb=e=>{if(!DE)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},b1=e=>bu(e),jE=e=>e.type==="radio",Wb=e=>e instanceof RegExp;const DO={value:!1,isValid:!1},LO={value:!0,isValid:!0};var K$=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ro(e[0].attributes.value)?Ro(e[0].value)||e[0].value===""?LO:{value:e[0].value,isValid:!0}:LO:DO}return DO};const NO={isValid:!1,value:null};var G$=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,NO):NO;function jO(e,t,r="validate"){if(b1(e)||Array.isArray(e)&&e.every(b1)||vu(e)&&!e)return{type:r,message:b1(e)?e:"",ref:t}}var zp=e=>ka(e)&&!Wb(e)?e:{value:e,message:""},q4=async(e,t,r,i,o)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:d,max:p,pattern:v,validate:x,name:b,valueAsNumber:y,mount:_,disabled:k}=e._f,E=vn(t,b);if(!_||k)return{};const O=s?s[0]:a,U=V=>{i&&O.reportValidity&&(O.setCustomValidity(vu(V)?"":V||""),O.reportValidity())},D={},j=jE(a),F=zy(a),H=j||F,W=(y||NE(a))&&Ro(a.value)&&Ro(E)||Hb(a)&&a.value===""||E===""||Array.isArray(E)&&!E.length,G=TSe.bind(null,b,r,D),ae=(V,oe,P,ee=Xu.maxLength,le=Xu.minLength)=>{const pe=V?oe:P;D[b]={type:V?ee:le,message:pe,ref:a,...G(V?ee:le,pe)}};if(o?!Array.isArray(E)||!E.length:l&&(!H&&(W||ds(E))||vu(E)&&!E||F&&!K$(s).isValid||j&&!G$(s).isValid)){const{value:V,message:oe}=b1(l)?{value:!!l,message:l}:zp(l);if(V&&(D[b]={type:Xu.required,message:oe,ref:O,...G(Xu.required,oe)},!r))return U(oe),D}if(!W&&(!ds(d)||!ds(p))){let V,oe;const P=zp(p),ee=zp(d);if(!ds(E)&&!isNaN(E)){const le=a.valueAsNumber||E&&+E;ds(P.value)||(V=le>P.value),ds(ee.value)||(oe=lenew Date(new Date().toDateString()+" "+ft),xe=a.type=="time",J=a.type=="week";bu(P.value)&&E&&(V=xe?pe(E)>pe(P.value):J?E>P.value:le>new Date(P.value)),bu(ee.value)&&E&&(oe=xe?pe(E)+V.value,ee=!ds(oe.value)&&E.length<+oe.value;if((P||ee)&&(ae(P,V.message,oe.message),!r))return U(D[b].message),D}if(v&&!W&&bu(E)){const{value:V,message:oe}=zp(v);if(Wb(V)&&!E.match(V)&&(D[b]={type:Xu.pattern,message:oe,ref:a,...G(Xu.pattern,oe)},!r))return U(oe),D}if(x){if(od(x)){const V=await x(E,t),oe=jO(V,O);if(oe&&(D[b]={...oe,...G(Xu.validate,oe.message)},!r))return U(oe.message),D}else if(ka(x)){let V={};for(const oe in x){if(!Vs(V)&&!r)break;const P=jO(await x[oe](E,t),O,oe);P&&(V={...P,...G(oe,P.message)},U(P.message),r&&(D[b]=V))}if(!Vs(V)&&(D[b]={ref:O,...V},!r))return D}}return U(!0),D};function l3(e,t){return[...e,...Gs(t)]}var u3=e=>Array.isArray(e)?e.map(()=>{}):void 0;function c3(e,t,r){return[...e.slice(0,t),...Gs(r),...e.slice(t)]}var d3=(e,t,r)=>Array.isArray(e)?(Ro(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function f3(e,t){return[...Gs(t),...Gs(e)]}function ISe(e,t){let r=0;const i=[...e];for(const o of t)i.splice(o-r,1),r++;return Og(i).length?i:[]}var p3=(e,t)=>Ro(t)?[]:ISe(e,Gs(t).sort((r,i)=>r-i)),h3=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function RSe(e,t){const r=t.slice(0,-1).length;let i=0;for(;i(e[t]=r,e);function MSe(e){const t=Zx(),{control:r=t.control,name:i,keyName:o="id",shouldUnregister:a}=e,[s,l]=Gn.useState(r._getFieldArray(i)),u=Gn.useRef(r._getFieldArray(i).map(zc)),c=Gn.useRef(s),d=Gn.useRef(i),p=Gn.useRef(!1);d.current=i,c.current=s,r._names.array.add(i),e.rules&&r.register(i,e.rules),Qx({next:({values:D,name:j})=>{if(j===d.current||!j){const F=vn(D,d.current);Array.isArray(F)&&(l(F),u.current=F.map(zc))}},subject:r._subjects.array});const v=Gn.useCallback(D=>{p.current=!0,r._updateFieldArray(i,D)},[r,i]),x=(D,j)=>{const F=Gs(Ja(D)),H=l3(r._getFieldArray(i),F);r._names.focus=s3(i,H.length-1,j),u.current=l3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,l3,{argA:u3(D)})},b=(D,j)=>{const F=Gs(Ja(D)),H=f3(r._getFieldArray(i),F);r._names.focus=s3(i,0,j),u.current=f3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,f3,{argA:u3(D)})},y=D=>{const j=p3(r._getFieldArray(i),D);u.current=p3(u.current,D),v(j),l(j),r._updateFieldArray(i,j,p3,{argA:D})},_=(D,j,F)=>{const H=Gs(Ja(j)),W=c3(r._getFieldArray(i),D,H);r._names.focus=s3(i,D,F),u.current=c3(u.current,D,H.map(zc)),v(W),l(W),r._updateFieldArray(i,W,c3,{argA:D,argB:u3(j)})},k=(D,j)=>{const F=r._getFieldArray(i);h3(F,D,j),h3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,h3,{argA:D,argB:j},!1)},E=(D,j)=>{const F=r._getFieldArray(i);d3(F,D,j),d3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,d3,{argA:D,argB:j},!1)},O=(D,j)=>{const F=Ja(j),H=$O(r._getFieldArray(i),D,F);u.current=[...H].map((W,G)=>!W||G===D?zc():u.current[G]),v(H),l([...H]),r._updateFieldArray(i,H,$O,{argA:D,argB:F},!0,!1)},U=D=>{const j=Gs(Ja(D));u.current=j.map(zc),v([...j]),l([...j]),r._updateFieldArray(i,[...j],F=>F,{},!0,!1)};return Gn.useEffect(()=>{if(r._state.action=!1,V4(i,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!W4(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(D=>{const j=vn(D.errors,i),F=vn(r._formState.errors,i);(F?!j&&F.type||j&&(F.type!==j.type||F.message!==j.message):j&&j.type)&&(j?Ao(r._formState.errors,i,j):Ra(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const D=vn(r._fields,i);D&&D._f&&q4(D,r._formValues,r._options.criteriaMode===yl.all,r._options.shouldUseNativeValidation,!0).then(j=>!Vs(j)&&r._subjects.state.next({errors:q$(r._formState.errors,j,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&d0(r._fields,(D,j)=>{if(r._names.focus&&j.startsWith(r._names.focus)&&D.focus)return D.focus(),1}),r._names.focus="",r._updateValid(),p.current=!1},[s,i,r]),Gn.useEffect(()=>(!vn(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||a)&&r.unregister(i)}),[i,r,o,a]),{swap:Gn.useCallback(k,[v,i,r]),move:Gn.useCallback(E,[v,i,r]),prepend:Gn.useCallback(b,[v,i,r]),append:Gn.useCallback(x,[v,i,r]),remove:Gn.useCallback(y,[v,i,r]),insert:Gn.useCallback(_,[v,i,r]),update:Gn.useCallback(O,[v,i,r]),replace:Gn.useCallback(U,[v,i,r]),fields:Gn.useMemo(()=>s.map((D,j)=>({...D,[o]:u.current[j]||zc()})),[s,o])}}function g3(){let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var Vb=e=>ds(e)||!N$(e);function wf(e,t){if(Vb(e)||Vb(t))return e===t;if(ch(e)&&ch(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const o of r){const a=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const s=t[o];if(ch(a)&&ch(s)||ka(a)&&ka(s)||Array.isArray(a)&&Array.isArray(s)?!wf(a,s):a!==s)return!1}}return!0}var Y$=e=>e.type==="select-multiple",OSe=e=>jE(e)||zy(e),m3=e=>Hb(e)&&e.isConnected,Z$=e=>{for(const t in e)if(od(e[t]))return!0;return!1};function qb(e,t={}){const r=Array.isArray(e);if(ka(e)||r)for(const i in e)Array.isArray(e[i])||ka(e[i])&&!Z$(e[i])?(t[i]=Array.isArray(e[i])?[]:{},qb(e[i],t[i])):ds(e[i])||(t[i]=!0);return t}function Q$(e,t,r){const i=Array.isArray(e);if(ka(e)||i)for(const o in e)Array.isArray(e[o])||ka(e[o])&&!Z$(e[o])?Ro(t)||Vb(r[o])?r[o]=Array.isArray(e[o])?qb(e[o],[]):{...qb(e[o])}:Q$(e[o],ds(t)?{}:t[o],r[o]):r[o]=!wf(e[o],t[o]);return r}var y3=(e,t)=>Q$(e,t,qb(t)),X$=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Ro(e)?e:t?e===""?NaN:e&&+e:r&&bu(e)?new Date(e):i?i(e):e;function v3(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return NE(t)?t.files:jE(t)?G$(e.refs).value:Y$(t)?[...t.selectedOptions].map(({value:r})=>r):zy(t)?K$(e.refs).value:X$(Ro(t.value)?e.ref.value:t.value,e)}var BSe=(e,t,r,i)=>{const o={};for(const a of e){const s=vn(t,a);s&&Ao(o,a,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:i}},Im=e=>Ro(e)?e:Wb(e)?e.source:ka(e)?Wb(e.value)?e.value.source:e.value:e,USe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function FO(e,t,r){const i=vn(e,r);if(i||LE(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const a=o.join("."),s=vn(t,a),l=vn(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(l&&l.type)return{name:a,error:l};o.pop()}return{name:r}}var DSe=(e,t,r,i,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?i.isOnBlur:o.isOnBlur)?!e:(r?i.isOnChange:o.isOnChange)?e:!0,LSe=(e,t)=>!Og(vn(e,t)).length&&Ra(e,t);const NSe={mode:yl.onSubmit,reValidateMode:yl.onChange,shouldFocusError:!0};function jSe(e={},t){let r={...NSe,...e},i={submitCount:0,isDirty:!1,isLoading:od(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},a=ka(r.defaultValues)||ka(r.values)?Ja(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Ja(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const p={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:g3(),array:g3(),state:g3()},x=e.resetOptions&&e.resetOptions.keepDirtyValues,b=W4(r.mode),y=W4(r.reValidateMode),_=r.criteriaMode===yl.all,k=fe=>Be=>{clearTimeout(d),d=setTimeout(fe,Be)},E=async fe=>{if(p.isValid||fe){const Be=r.resolver?Vs((await W()).errors):await ae(o,!0);Be!==i.isValid&&v.state.next({isValid:Be})}},O=fe=>p.isValidating&&v.state.next({isValidating:fe}),U=(fe,Be=[],rt,lt,jt=!0,ce=!0)=>{if(lt&&rt){if(l.action=!0,ce&&Array.isArray(vn(o,fe))){const ie=rt(vn(o,fe),lt.argA,lt.argB);jt&&Ao(o,fe,ie)}if(ce&&Array.isArray(vn(i.errors,fe))){const ie=rt(vn(i.errors,fe),lt.argA,lt.argB);jt&&Ao(i.errors,fe,ie),LSe(i.errors,fe)}if(p.touchedFields&&ce&&Array.isArray(vn(i.touchedFields,fe))){const ie=rt(vn(i.touchedFields,fe),lt.argA,lt.argB);jt&&Ao(i.touchedFields,fe,ie)}p.dirtyFields&&(i.dirtyFields=y3(a,s)),v.state.next({name:fe,isDirty:oe(fe,Be),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Ao(s,fe,Be)},D=(fe,Be)=>{Ao(i.errors,fe,Be),v.state.next({errors:i.errors})},j=(fe,Be,rt,lt)=>{const jt=vn(o,fe);if(jt){const ce=vn(s,fe,Ro(rt)?vn(a,fe):rt);Ro(ce)||lt&<.defaultChecked||Be?Ao(s,fe,Be?ce:v3(jt._f)):le(fe,ce),l.mount&&E()}},F=(fe,Be,rt,lt,jt)=>{let ce=!1,ie=!1;const de={name:fe};if(!rt||lt){p.isDirty&&(ie=i.isDirty,i.isDirty=de.isDirty=oe(),ce=ie!==de.isDirty);const $=wf(vn(a,fe),Be);ie=vn(i.dirtyFields,fe),$?Ra(i.dirtyFields,fe):Ao(i.dirtyFields,fe,!0),de.dirtyFields=i.dirtyFields,ce=ce||p.dirtyFields&&ie!==!$}if(rt){const $=vn(i.touchedFields,fe);$||(Ao(i.touchedFields,fe,rt),de.touchedFields=i.touchedFields,ce=ce||p.touchedFields&&$!==rt)}return ce&&jt&&v.state.next(de),ce?de:{}},H=(fe,Be,rt,lt)=>{const jt=vn(i.errors,fe),ce=p.isValid&&vu(Be)&&i.isValid!==Be;if(e.delayError&&rt?(c=k(()=>D(fe,rt)),c(e.delayError)):(clearTimeout(d),c=null,rt?Ao(i.errors,fe,rt):Ra(i.errors,fe)),(rt?!wf(jt,rt):jt)||!Vs(lt)||ce){const ie={...lt,...ce&&vu(Be)?{isValid:Be}:{},errors:i.errors,name:fe};i={...i,...ie},v.state.next(ie)}O(!1)},W=async fe=>r.resolver(s,r.context,BSe(fe||u.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),G=async fe=>{const{errors:Be}=await W(fe);if(fe)for(const rt of fe){const lt=vn(Be,rt);lt?Ao(i.errors,rt,lt):Ra(i.errors,rt)}else i.errors=Be;return Be},ae=async(fe,Be,rt={valid:!0})=>{for(const lt in fe){const jt=fe[lt];if(jt){const{_f:ce,...ie}=jt;if(ce){const de=u.array.has(ce.name),$=await q4(jt,s,_,r.shouldUseNativeValidation&&!Be,de);if($[ce.name]&&(rt.valid=!1,Be))break;!Be&&(vn($,ce.name)?de?q$(i.errors,$,ce.name):Ao(i.errors,ce.name,$[ce.name]):Ra(i.errors,ce.name))}ie&&await ae(ie,Be,rt)}}return rt.valid},V=()=>{for(const fe of u.unMount){const Be=vn(o,fe);Be&&(Be._f.refs?Be._f.refs.every(rt=>!m3(rt)):!m3(Be._f.ref))&&vr(fe)}u.unMount=new Set},oe=(fe,Be)=>(fe&&Be&&Ao(s,fe,Be),!wf(He(),a)),P=(fe,Be,rt)=>W$(fe,u,{...l.mount?s:Ro(Be)?a:bu(fe)?{[fe]:Be}:Be},rt,Be),ee=fe=>Og(vn(l.mount?s:a,fe,e.shouldUnregister?vn(a,fe,[]):[])),le=(fe,Be,rt={})=>{const lt=vn(o,fe);let jt=Be;if(lt){const ce=lt._f;ce&&(!ce.disabled&&Ao(s,fe,X$(Be,ce)),jt=Hb(ce.ref)&&ds(Be)?"":Be,Y$(ce.ref)?[...ce.ref.options].forEach(ie=>ie.selected=jt.includes(ie.value)):ce.refs?zy(ce.ref)?ce.refs.length>1?ce.refs.forEach(ie=>(!ie.defaultChecked||!ie.disabled)&&(ie.checked=Array.isArray(jt)?!!jt.find(de=>de===ie.value):jt===ie.value)):ce.refs[0]&&(ce.refs[0].checked=!!jt):ce.refs.forEach(ie=>ie.checked=ie.value===jt):NE(ce.ref)?ce.ref.value="":(ce.ref.value=jt,ce.ref.type||v.values.next({name:fe,values:{...s}})))}(rt.shouldDirty||rt.shouldTouch)&&F(fe,jt,rt.shouldTouch,rt.shouldDirty,!0),rt.shouldValidate&&Le(fe)},pe=(fe,Be,rt)=>{for(const lt in Be){const jt=Be[lt],ce=`${fe}.${lt}`,ie=vn(o,ce);(u.array.has(fe)||!Vb(jt)||ie&&!ie._f)&&!ch(jt)?pe(ce,jt,rt):le(ce,jt,rt)}},xe=(fe,Be,rt={})=>{const lt=vn(o,fe),jt=u.array.has(fe),ce=Ja(Be);Ao(s,fe,ce),jt?(v.array.next({name:fe,values:{...s}}),(p.isDirty||p.dirtyFields)&&rt.shouldDirty&&v.state.next({name:fe,dirtyFields:y3(a,s),isDirty:oe(fe,ce)})):lt&&!lt._f&&!ds(ce)?pe(fe,ce,rt):le(fe,ce,rt),V4(fe,u)&&v.state.next({...i}),v.values.next({name:fe,values:{...s}}),!l.mount&&t()},J=async fe=>{const Be=fe.target;let rt=Be.name,lt=!0;const jt=vn(o,rt),ce=()=>Be.type?v3(jt._f):j$(fe),ie=de=>{lt=Number.isNaN(de)||de===vn(s,rt,de)};if(jt){let de,$;const C=ce(),T=fe.type===zb.BLUR||fe.type===zb.FOCUS_OUT,Z=!USe(jt._f)&&!r.resolver&&!vn(i.errors,rt)&&!jt._f.deps||DSe(T,vn(i.touchedFields,rt),i.isSubmitted,y,b),ve=V4(rt,u,T);Ao(s,rt,C),T?(jt._f.onBlur&&jt._f.onBlur(fe),c&&c(0)):jt._f.onChange&&jt._f.onChange(fe);const je=F(rt,C,T,!1),ct=!Vs(je)||ve;if(!T&&v.values.next({name:rt,type:fe.type,values:{...s}}),Z)return p.isValid&&E(),ct&&v.state.next({name:rt,...ve?{}:je});if(!T&&ve&&v.state.next({...i}),O(!0),r.resolver){const{errors:ur}=await W([rt]);if(ie(C),lt){const Dr=FO(i.errors,o,rt),hr=FO(ur,o,Dr.name||rt);de=hr.error,rt=hr.name,$=Vs(ur)}}else de=(await q4(jt,s,_,r.shouldUseNativeValidation))[rt],ie(C),lt&&(de?$=!1:p.isValid&&($=await ae(o,!0)));lt&&(jt._f.deps&&Le(jt._f.deps),H(rt,$,de,je))}},ft=(fe,Be)=>{if(vn(i.errors,Be)&&fe.focus)return fe.focus(),1},Le=async(fe,Be={})=>{let rt,lt;const jt=Gs(fe);if(O(!0),r.resolver){const ce=await G(Ro(fe)?fe:jt);rt=Vs(ce),lt=fe?!jt.some(ie=>vn(ce,ie)):rt}else fe?(lt=(await Promise.all(jt.map(async ce=>{const ie=vn(o,ce);return await ae(ie&&ie._f?{[ce]:ie}:ie)}))).every(Boolean),!(!lt&&!i.isValid)&&E()):lt=rt=await ae(o);return v.state.next({...!bu(fe)||p.isValid&&rt!==i.isValid?{}:{name:fe},...r.resolver||!fe?{isValid:rt}:{},errors:i.errors,isValidating:!1}),Be.shouldFocus&&!lt&&d0(o,ft,fe?jt:u.mount),lt},He=fe=>{const Be={...a,...l.mount?s:{}};return Ro(fe)?Be:bu(fe)?vn(Be,fe):fe.map(rt=>vn(Be,rt))},nr=(fe,Be)=>({invalid:!!vn((Be||i).errors,fe),isDirty:!!vn((Be||i).dirtyFields,fe),isTouched:!!vn((Be||i).touchedFields,fe),error:vn((Be||i).errors,fe)}),Bt=fe=>{fe&&Gs(fe).forEach(Be=>Ra(i.errors,Be)),v.state.next({errors:fe?i.errors:{}})},Rt=(fe,Be,rt)=>{const lt=(vn(o,fe,{_f:{}})._f||{}).ref;Ao(i.errors,fe,{...Be,ref:lt}),v.state.next({name:fe,errors:i.errors,isValid:!1}),rt&&rt.shouldFocus&<&<.focus&<.focus()},Jt=(fe,Be)=>od(fe)?v.values.subscribe({next:rt=>fe(P(void 0,Be),rt)}):P(fe,Be,!0),vr=(fe,Be={})=>{for(const rt of fe?Gs(fe):u.mount)u.mount.delete(rt),u.array.delete(rt),Be.keepValue||(Ra(o,rt),Ra(s,rt)),!Be.keepError&&Ra(i.errors,rt),!Be.keepDirty&&Ra(i.dirtyFields,rt),!Be.keepTouched&&Ra(i.touchedFields,rt),!r.shouldUnregister&&!Be.keepDefaultValue&&Ra(a,rt);v.values.next({values:{...s}}),v.state.next({...i,...Be.keepDirty?{isDirty:oe()}:{}}),!Be.keepIsValid&&E()},At=({disabled:fe,name:Be,field:rt,fields:lt,value:jt})=>{if(vu(fe)){const ce=fe?void 0:Ro(jt)?v3(rt?rt._f:vn(lt,Be)._f):jt;Ao(s,Be,ce),F(Be,ce,!1,!1,!0)}},kt=(fe,Be={})=>{let rt=vn(o,fe);const lt=vu(Be.disabled);return Ao(o,fe,{...rt||{},_f:{...rt&&rt._f?rt._f:{ref:{name:fe}},name:fe,mount:!0,...Be}}),u.mount.add(fe),rt?At({field:rt,disabled:Be.disabled,name:fe}):j(fe,!0,Be.value),{...lt?{disabled:Be.disabled}:{},...r.progressive?{required:!!Be.required,min:Im(Be.min),max:Im(Be.max),minLength:Im(Be.minLength),maxLength:Im(Be.maxLength),pattern:Im(Be.pattern)}:{},name:fe,onChange:J,onBlur:J,ref:jt=>{if(jt){kt(fe,Be),rt=vn(o,fe);const ce=Ro(jt.value)&&jt.querySelectorAll&&jt.querySelectorAll("input,select,textarea")[0]||jt,ie=OSe(ce),de=rt._f.refs||[];if(ie?de.find($=>$===ce):ce===rt._f.ref)return;Ao(o,fe,{_f:{...rt._f,...ie?{refs:[...de.filter(m3),ce,...Array.isArray(vn(a,fe))?[{}]:[]],ref:{type:ce.type,name:fe}}:{ref:ce}}}),j(fe,!1,void 0,ce)}else rt=vn(o,fe,{}),rt._f&&(rt._f.mount=!1),(r.shouldUnregister||Be.shouldUnregister)&&!($$(u.array,fe)&&l.action)&&u.unMount.add(fe)}}},Ct=()=>r.shouldFocusError&&d0(o,ft,u.mount),Lt=fe=>{vu(fe)&&(v.state.next({disabled:fe}),d0(o,Be=>{Be.disabled=fe},0,!1))},Kt=(fe,Be)=>async rt=>{rt&&(rt.preventDefault&&rt.preventDefault(),rt.persist&&rt.persist());let lt=Ja(s);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:jt,values:ce}=await W();i.errors=jt,lt=ce}else await ae(o);Ra(i.errors,"root"),Vs(i.errors)?(v.state.next({errors:{}}),await fe(lt,rt)):(Be&&await Be({...i.errors},rt),Ct(),setTimeout(Ct)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vs(i.errors),submitCount:i.submitCount+1,errors:i.errors})},yr=(fe,Be={})=>{vn(o,fe)&&(Ro(Be.defaultValue)?xe(fe,vn(a,fe)):(xe(fe,Be.defaultValue),Ao(a,fe,Be.defaultValue)),Be.keepTouched||Ra(i.touchedFields,fe),Be.keepDirty||(Ra(i.dirtyFields,fe),i.isDirty=Be.defaultValue?oe(fe,vn(a,fe)):oe()),Be.keepError||(Ra(i.errors,fe),p.isValid&&E()),v.state.next({...i}))},ne=(fe,Be={})=>{const rt=fe?Ja(fe):a,lt=Ja(rt),jt=fe&&!Vs(fe)?lt:a;if(Be.keepDefaultValues||(a=rt),!Be.keepValues){if(Be.keepDirtyValues||x)for(const ce of u.mount)vn(i.dirtyFields,ce)?Ao(jt,ce,vn(s,ce)):xe(ce,vn(jt,ce));else{if(DE&&Ro(fe))for(const ce of u.mount){const ie=vn(o,ce);if(ie&&ie._f){const de=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Hb(de)){const $=de.closest("form");if($){$.reset();break}}}}o={}}s=e.shouldUnregister?Be.keepDefaultValues?Ja(a):{}:Ja(jt),v.array.next({values:{...jt}}),v.values.next({values:{...jt}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!p.isValid||!!Be.keepIsValid,l.watch=!!e.shouldUnregister,v.state.next({submitCount:Be.keepSubmitCount?i.submitCount:0,isDirty:Be.keepDirty?i.isDirty:!!(Be.keepDefaultValues&&!wf(fe,a)),isSubmitted:Be.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:Be.keepDirtyValues?i.dirtyFields:Be.keepDefaultValues&&fe?y3(a,fe):{},touchedFields:Be.keepTouched?i.touchedFields:{},errors:Be.keepErrors?i.errors:{},isSubmitSuccessful:Be.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1})},Mt=(fe,Be)=>ne(od(fe)?fe(s):fe,Be);return{control:{register:kt,unregister:vr,getFieldState:nr,handleSubmit:Kt,setError:Rt,_executeSchema:W,_getWatch:P,_getDirty:oe,_updateValid:E,_removeUnmounted:V,_updateFieldArray:U,_updateDisabledField:At,_getFieldArray:ee,_reset:ne,_resetDefaultValues:()=>od(r.defaultValues)&&r.defaultValues().then(fe=>{Mt(fe,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:fe=>{i={...i,...fe}},_disableForm:Lt,_subjects:v,_proxyFormState:p,get _fields(){return o},get _formValues(){return s},get _state(){return l},set _state(fe){l=fe},get _defaultValues(){return a},get _names(){return u},set _names(fe){u=fe},get _formState(){return i},set _formState(fe){i=fe},get _options(){return r},set _options(fe){r={...r,...fe}}},trigger:Le,register:kt,handleSubmit:Kt,watch:Jt,setValue:xe,getValues:He,reset:Mt,resetField:yr,clearErrors:Bt,unregister:vr,setError:Rt,setFocus:(fe,Be={})=>{const rt=vn(o,fe),lt=rt&&rt._f;if(lt){const jt=lt.refs?lt.refs[0]:lt.ref;jt.focus&&(jt.focus(),Be.shouldSelect&&jt.select())}},getFieldState:nr}}function w1(e={}){const t=Gn.useRef(),r=Gn.useRef(),[i,o]=Gn.useState({isDirty:!1,isValidating:!1,isLoading:od(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:od(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...jSe(e,()=>o(s=>({...s}))),formState:i});const a=t.current.control;return a._options=e,Qx({subject:a._subjects.state,next:s=>{z$(s,a._proxyFormState,a._updateFormState,!0)&&o({...a._formState})}}),Gn.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Gn.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==i.isDirty&&a._subjects.state.next({isDirty:s})}},[a,i.isDirty]),Gn.useEffect(()=>{e.values&&!wf(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),Gn.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=F$(i,a),t.current}function ic({label:e,name:t,control:r}){return L(ASe,{name:t,control:r,render:({field:i,fieldState:{error:o}})=>L(wh,{helperText:o?o.message:null,error:!!o,fullWidth:!0,label:e,variant:"outlined",...i})})}function $Se(e){return Vn.beginCell().storeUint(2003,32).storeUint(0,64).storeAddress(e).endCell()}function FSe(e){return Vn.beginCell().storeUint(3004,32).storeUint(0,64).storeAddress(e).endCell()}function zSe(e,t){return Vn.beginCell().storeUint(6007,32).storeUint(0,64).storeCoins(e).storeCoins(t).endCell()}function HSe(){const{data:e,isLoading:t}=Dy();kg();const r=fE(),i=w1({defaultValues:{admin:e?.admin||""}}),o=w1({defaultValues:{verifierRegistry:e?.verifierRegistry||""}}),a=w1({defaultValues:{minTon:e?.deploymentCosts.min||"",maxTon:e?.deploymentCosts.max||""}});async function s(c){if(!e?.address)throw new Error("no address");if(c.admin!==e?.admin)try{const d=FSe(Vn.Address.parse(c.admin));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&i.setError("admin",{message:"Failed to change admin"})}catch(d){let p="Failed to change admin";"message"in d&&(p=d.message),i.setError("admin",{message:p})}}async function l(c){if(!e?.address)throw new Error("no address");if(c.verifierRegistry!==e?.verifierRegistry)try{const d=$Se(Vn.Address.parse(c.verifierRegistry));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&o.setError("verifierRegistry",{message:"Failed to change verifier registry"})}catch(d){let p="Failed to change verifier registry";"message"in d&&(p=d.message),o.setError("verifierRegistry",{message:p})}}async function u(c){if(!e?.address)throw new Error("no address");if(c.minTon!==e?.deploymentCosts.min||c.maxTon!==e?.deploymentCosts.max)try{const d=zSe(Vn.toNano(c.minTon),Vn.toNano(c.maxTon));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&a.setError("root",{message:"Failed to change deployment costs"})}catch(d){let p="Failed to change deployment costs";"message"in d&&(p=d.message),a.setError("root",{message:p})}}return X.exports.useEffect(()=>{e&&(i.reset({admin:e.admin}),o.reset({verifierRegistry:e.verifierRegistry}),a.reset({minTon:e.deploymentCosts.min,maxTon:e.deploymentCosts.max}))},[e]),Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Sources Registry"}),t&&L(lg,{}),e&&Ut(ta,{children:[L(UE,{label:"Address",data:e.address.toString()}),L("form",{id:"adminForm",onSubmit:i.handleSubmit(s),children:Ut(xs,{spacing:2,children:[!i.formState.isValid&&L(d1,{severity:"error",children:Object.entries(i.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...i.register("admin"),control:i.control,label:"Admin"}),L(nd,{text:"Save",type:"submit",disabled:!i.formState.isDirty})]})]})}),L("form",{id:"verifierRegistryForm",onSubmit:o.handleSubmit(l),children:Ut(xs,{spacing:2,children:[!o.formState.isValid&&L(d1,{severity:"error",children:Object.entries(o.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...o.register("verifierRegistry"),control:o.control,label:"Verifier Reg."}),L(nd,{text:"Save",type:"submit",disabled:!o.formState.isDirty})]})]})}),L("form",{id:"sourcesRegistryForm",onSubmit:a.handleSubmit(u),children:Ut(xs,{spacing:2,children:[!a.formState.isValid&&L(d1,{severity:"error",children:Object.entries(a.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...a.register("minTon"),control:a.control,label:"Min Ton"}),L(ic,{...a.register("maxTon"),control:a.control,label:"Max Ton"}),L(nd,{text:"Save",type:"submit",disabled:!a.formState.isDirty})]})]})})]})]})}const J$={removeVerifier:435836471,updateVerifier:1610798618,forwardMessage:1965127512};function zO(e){return Ib(q1e(e))}function WSe(e){let t=e.split(".");return((+t[0]*256+ +t[1])*256+ +t[2])*256+ +t[3]}function VSe(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}function qSe(e){let t=Vn.beginCell();t.storeUint(J$.updateVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.storeUint(e.quorum,8);let r=Vn.Dictionary.empty(Vn.Dictionary.Keys.BigUint(256),VSe());return e.endpoints.forEach(function(i,o){r.set(o,Vn.beginCell().storeUint(i,32).endCell().beginParse())}),t.storeDict(r),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.name)).endCell()),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.marketingUrl)).endCell()),t.endCell()}function KSe(e){let t=Vn.beginCell();return t.storeUint(J$.removeVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.endCell()}function HO({verifier:e,altColor:t,isNew:r}){const i=fE(),{data:o}=Dy(),a=X.exports.useMemo(()=>Object.entries(e.pubKeyEndpoints).map(([p,v])=>({pubKey:p,ip:v})),[e.pubKeyEndpoints]),s=w1({defaultValues:{quorum:e.quorum.toString()||"",name:e.name||"",url:e.url||"",pubKeyEndpoints:a||[]},mode:"onChange"});async function l(p){if(!p.name){s.setError("name",{message:"Name is required"});return}if(!p.url){s.setError("url",{message:"Url is required"});return}if(!p.quorum||Number(p.quorum)<1){s.setError("quorum",{message:"Quorum is required and should be at least 1"});return}try{await i(o?.verifierRegistry??"",Vn.toNano(r?"1000":"0.01"),qSe({id:zO(p.name),quorum:Number(p.quorum),endpoints:new Map(p.pubKeyEndpoints.map(({pubKey:x,ip:b})=>[Ib(Buffer.from(x,"base64")),WSe(b)])),name:p.name,marketingUrl:p.url}))==="rejected"&&s.setError("root",{message:`Failed to update config of ${p.name}`})}catch(v){let x=`Failed to update config of ${p.name}`;"message"in v&&(x=v.message),s.setError("root",{message:x})}}const{fields:u,append:c,remove:d}=MSe({control:s.control,name:"pubKeyEndpoints"});return L("form",{id:e.admin.toString(),onSubmit:s.handleSubmit(l),children:Ut(xs,{spacing:4,px:4,py:6,style:{backgroundColor:t?"#eeeeef":"transparent"},children:[!s.formState.isValid&&L(d1,{severity:"error",children:Object.entries(s.formState.errors).map(([p,v])=>L("div",{children:v.message},p))}),Ut(xs,{flexDirection:"row",alignItems:"center",gap:2,children:[L("h3",{style:{margin:0},children:r?"Add Verifier":s.getValues("name")}),!r&&L(nd,{text:"Remove",onClick:()=>{i(o.verifierRegistry,Vn.toNano("0.01"),KSe({id:zO(s.getValues("name"))}))}})]}),L(UE,{label:"Admin",data:e.admin.toString()}),r&&L(ic,{label:"Name",name:"name",control:s.control}),L(ic,{label:"Url",name:"url",control:s.control}),L(ic,{label:"Quorum",name:"quorum",control:s.control}),Ut(xs,{spacing:2,alignItems:"flex-start",children:[Ut(xs,{direction:"row",spacing:4,alignItems:"center",children:[L("h4",{children:"Public Key Endpoints"}),L(nd,{size:"small",text:"Add",onClick:()=>{c({pubKey:"",ip:""})}})]}),u.map((p,v)=>Ut(Cv,{container:!0,alignItems:"center",gap:2,wrap:"nowrap",children:[L(Cv,{item:!0,xs:6,children:L(ic,{label:`PubKey-${v}`,name:`pubKeyEndpoints.${v}.pubKey`,control:s.control})}),L(Cv,{item:!0,xs:5,children:L(ic,{label:`IP-${v}`,name:`pubKeyEndpoints.${v}.ip`,control:s.control})}),L(Cv,{item:!0,xs:1,children:L(nd,{text:"Remove",onClick:()=>d(v)})})]},p.id))]}),L(nd,{text:r?"Add verifier":"Update config",type:"submit",disabled:!s.formState.isDirty})]})})}function GSe(){const{data:e,isLoading:t}=zx(),{data:r}=Dy(),[i]=kg();return Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Verifier Registry"}),L(UE,{label:"Address",data:r?.verifierRegistry??""}),t&&L(lg,{}),Ut(xs,{children:[t&&"Loading...",e?.map((o,a)=>L(HO,{verifier:o,altColor:a%2!==1,isNew:!1}))]}),i.account?.address&&L(HO,{isNew:!0,altColor:!0,verifier:{admin:Vn.Address.parse(i.account?.address),name:"",quorum:0,url:"",pubKeyEndpoints:{}}})]})}function YSe(){return Ut("div",{children:[window.isTestnet&&L(BE,{}),Ut(xs,{direction:"row",justifyContent:"space-between",alignItems:"center",p:4,children:[L("h1",{children:"Admin"}),L(Ux,{})]}),L(HSe,{}),L(GSe,{}),L(Fb,{})]})}const ZSe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",height:t.isMobile?90:100,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}));function QSe(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg"));return L(ZSe,{px:r?3.4:0,isMobile:t,children:Ut(IL,{mb:5,children:[Ut(ap,{children:[L("img",{src:vw,width:30,height:30,alt:"App icon"}),L(cx,{children:"TACT DEPLOYER"})]}),Ut(TL,{children:[L($n,{mr:t?0:2,children:L(Ux,{})}),!t&&Ut(ap,{href:$6,target:"_blank",children:[L("img",{src:QC,alt:"Github icon",width:20,height:20}),L(xk,{children:"GitHub"})]})]})]})})}const XSe=sr("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),JSe=Vn.Cell.fromBoc(Buffer.from("te6cckEBAQEADgAAGJRqmLYAAAAAAAAAAOnNeQ0=","base64"))[0];async function b3(e){const t=`https://tact-deployer${window.isTestnet?"-testnet":""}.infura-ipfs.io`;return fetch(`${t}/ipfs/${e}`)}function $E({workchain:e}){const{ipfsHash:t}=xU(),{data:r,error:i,isLoading:o}=bc(["tactDeploy",t],async()=>{if(!t)return null;const a=await yp(),s=await b3(t).then(_=>_.json()),l=await b3(s.pkg).then(_=>_.json()),u=await b3(s.dataCell).then(_=>_.arrayBuffer()).then(_=>Vn.Cell.fromBoc(Buffer.from(_))[0]),c=Vn.Cell.fromBoc(Buffer.from(l.code,"base64"))[0],d=Vn.contractAddress(e,{code:c,data:u}),p={code:c,data:u},v=u.hash().toString("base64"),x=c.hash().toString("base64"),b=await a.isContractDeployed(d),y=b&&await pE(x);return{address:d,stateInit:p,pkg:l,codeCellHash:x,dataCellHash:v,isDeployed:b,hasProof:y}});return{data:r,error:i,isLoading:o}}function e4e(e,t,r){const{sendTXN:i,data:o,clearTXN:a}=tj("deployContract",async s=>{if(!r)throw new Error("No address");const l=await yp();return s>20?"error":await l.isContractDeployed(r)?"success":"issued"});return{sendTXN:()=>{!r||i(r,Vn.toNano(e),JSe,t)},status:o.status,clearTXN:a}}function t4e(){const e=[],{data:t,error:r}=$E({workchain:0});return t&&(e.push({title:"Name",value:t.pkg.name}),e.push({title:"Compiler",value:`Tact ${t.pkg.compiler.version}`}),e.push({title:"Code Hash",value:t.codeCellHash}),e.push({title:"Data Hash",value:t.dataCellHash}),e.push({title:"Workchain",value:Rj(t.address.toString())})),L(SE,{title:"Contract",icon:_E,dataRows:e,isLoading:!1,isFlexibleWrapper:!0})}function r4e(){const[e,t]=X.exports.useState("0.5"),{data:r,error:i}=$E({workchain:0}),{sendTXN:o,status:a}=e4e(e,r?.stateInit,r?.address),{markPreloaded:s}=Aj(),l=Ac(),u=zu();let c="";if(i)c=i.toString();else if(r?.isDeployed)c=Ut("div",{children:["Contract is already deployed.",!r.hasProof&&" You can publish its sources to verify it."]});else switch(a){case"initial":c="Contract is ready for deployment";break;case"pending":c="Please approve the transaction in your wallet";break;case"issued":c="Transaction was issued. Monitoring deployment...";break;case"rejected":c="Transaction was rejected. Please retry.";break;case"error":c="Transaction failed. Please retry.";break;case"expired":c="Transaction expired. Please retry.";break;case"success":c="Contract deployed successfully! You can now publish its sources to verify it.";break}let d=Ut(Ha,{disabled:a==="pending"||a==="issued"||r?.isDeployed,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{o()},children:[(a==="pending"||a==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Deploy"]});return(a==="success"||r?.isDeployed&&!r.hasProof)&&(d=L(Ha,{fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(),l("/"+r.address.toString()),u.addFiles([new File([JSON.stringify(r.pkg)],r.pkg.name+".pkg",{type:"text/plain"})])},children:"Verify"})),Ut(ug,{mb:6,children:[Ut($n,{p:"30px 24px 0 24px",children:[L(cg,{children:L("img",{src:_E,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Deploy"})]}),Ut(kn,{children:[Ut(kn,{sx:{padding:"0 30px"},children:[Ut(wE,{gap:2,sx:{mt:2},children:[L(Cc,{children:L("div",{children:"Value to initialize contract (TON)"})}),L(Cc,{children:L(XSe,{disabled:!!r?.isDeployed||a==="issued"||a=="pending",value:e,type:"number",onChange:p=>{t(p.target.value)}})})]}),L(Cs,{type:ps.HINT,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{marginBottom:0},children:[L(kn,{sx:{fontWeight:600},children:"Contract Address"}),L(kn,{sx:{fontSize:18,fontWeight:700,wordBreak:"break-all"},children:r?.address.toString()})]})})}),L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:c})})}),d]}),L($n,{mb:3,sx:{justifyContent:"center"}})]})]})}function n4e(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg")),{data:i,error:o,isLoading:a}=$E({workchain:0});return Ut(kn,{children:[window.isTestnet&&L(BE,{}),L(QSe,{}),Ut(U$,{px:r?"20px":0,children:[a&&Ut(Cc,{sx:{marginTop:3},children:[L(Xa,{height:330,variant:"rounded",sx:{marginBottom:3}}),L(Xa,{height:280,variant:"rounded"})]}),!a&&Ut(ta,{children:[L(D$,{isMobile:t,children:L(t4e,{})}),L(r4e,{})]})]}),")",L(Fb,{})]})}const i4e=new KH({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});M1e();yS.createRoot(document.getElementById("root")).render(L(ope,{maxSnack:3,children:L(BZ,{theme:wSe,children:L(Rq,{client:i4e,children:L(uve,{manifestUrl:"https://verifier.ton.org/tonconnect-manifest.json",children:L(HK,{basename:"/",children:Ut(FK,{children:[L(Hp,{path:"/interact",element:L(bSe,{})}),L(Hp,{path:"/admin",element:L(YSe,{})}),L(Hp,{path:"/tactDeployer/:ipfsHash",element:L(n4e,{})}),L(Hp,{path:"/:contractAddress",element:L(UO,{})}),L(Hp,{path:"/",element:L(UO,{})})]})})})})})}));export{Kb as g}; diff --git a/assets/index.b98184c3.js b/assets/index.b98184c3.js deleted file mode 100644 index cb14ba5..0000000 --- a/assets/index.b98184c3.js +++ /dev/null @@ -1,1242 +0,0 @@ -function qF(e,t){for(var r=0;ri[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerpolicy&&(o.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?o.credentials="include":a.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();window.location.hostname==="tonverifier.live"&&window.location.replace(window.location.href.replace("tonverifier.live","verifier.ton.org"));var xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lb(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),r}var TM={},ub={};ub.byteLength=YF;ub.toByteArray=XF;ub.fromByteArray=ez;var ru=[],Qs=[],KF=typeof Uint8Array<"u"?Uint8Array:Array,kx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var sp=0,GF=kx.length;sp0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function YF(e){var t=IM(e),r=t[0],i=t[1];return(r+i)*3/4-i}function QF(e,t,r){return(t+r)*3/4-r}function XF(e){var t,r=IM(e),i=r[0],a=r[1],o=new KF(QF(e,i,a)),s=0,l=a>0?i-4:i,u;for(u=0;u>16&255,o[s++]=t>>8&255,o[s++]=t&255;return a===2&&(t=Qs[e.charCodeAt(u)]<<2|Qs[e.charCodeAt(u+1)]>>4,o[s++]=t&255),a===1&&(t=Qs[e.charCodeAt(u)]<<10|Qs[e.charCodeAt(u+1)]<<4|Qs[e.charCodeAt(u+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function ZF(e){return ru[e>>18&63]+ru[e>>12&63]+ru[e>>6&63]+ru[e&63]}function JF(e,t,r){for(var i,a=[],o=t;ol?l:s+o));return i===1?(t=e[r-1],a.push(ru[t>>2]+ru[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],a.push(ru[t>>10]+ru[t>>4&63]+ru[t<<2&63]+"=")),a.join("")}var KS={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */KS.read=function(e,t,r,i,a){var o,s,l=a*8-i-1,u=(1<>1,d=-7,g=r?a-1:0,x=r?-1:1,w=e[t+g];for(g+=x,o=w&(1<<-d)-1,w>>=-d,d+=l;d>0;o=o*256+e[t+g],g+=x,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+e[t+g],g+=x,d-=8);if(o===0)o=1-c;else{if(o===u)return s?NaN:(w?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-c}return(w?-1:1)*s*Math.pow(2,o-i)};KS.write=function(e,t,r,i,a,o){var s,l,u,c=o*8-a-1,d=(1<>1,x=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=i?0:o-1,v=i?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+g>=1?t+=x/u:t+=x*Math.pow(2,1-g),t*u>=2&&(s++,u/=2),s+g>=d?(l=0,s=d):s+g>=1?(l=(t*u-1)*Math.pow(2,a),s=s+g):(l=t*Math.pow(2,g-1)*Math.pow(2,a),s=0));a>=8;e[r+w]=l&255,w+=v,l/=256,a-=8);for(s=s<0;e[r+w]=s&255,w+=v,s/=256,c-=8);e[r+w-v]|=y*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(e){const t=ub,r=KS,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const a=2147483647;e.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=o(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const $=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf($,C),$.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.byteOffset}});function s($){if($>a)throw new RangeError('The value "'+$+'" is invalid for option "size"');const C=new Uint8Array($);return Object.setPrototypeOf(C,l.prototype),C}function l($,C,R){if(typeof $=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g($)}return u($,C,R)}l.poolSize=8192;function u($,C,R){if(typeof $=="string")return x($,C);if(ArrayBuffer.isView($))return v($);if($==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(Ot($,ArrayBuffer)||$&&Ot($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ot($,SharedArrayBuffer)||$&&Ot($.buffer,SharedArrayBuffer)))return y($,C,R);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Q=$.valueOf&&$.valueOf();if(Q!=null&&Q!==$)return l.from(Q,C,R);const me=_($);if(me)return me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return l.from($[Symbol.toPrimitive]("string"),C,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}l.from=function($,C,R){return u($,C,R)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function c($){if(typeof $!="number")throw new TypeError('"size" argument must be of type number');if($<0)throw new RangeError('The value "'+$+'" is invalid for option "size"')}function d($,C,R){return c($),$<=0?s($):C!==void 0?typeof R=="string"?s($).fill(C,R):s($).fill(C):s($)}l.alloc=function($,C,R){return d($,C,R)};function g($){return c($),s($<0?0:E($)|0)}l.allocUnsafe=function($){return g($)},l.allocUnsafeSlow=function($){return g($)};function x($,C){if((typeof C!="string"||C==="")&&(C="utf8"),!l.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const R=B($,C)|0;let Q=s(R);const me=Q.write($,C);return me!==R&&(Q=Q.slice(0,me)),Q}function w($){const C=$.length<0?0:E($.length)|0,R=s(C);for(let Q=0;Q=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return $|0}function A($){return+$!=$&&($=0),l.alloc(+$)}l.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==l.prototype},l.compare=function(C,R){if(Ot(C,Uint8Array)&&(C=l.from(C,C.offset,C.byteLength)),Ot(R,Uint8Array)&&(R=l.from(R,R.offset,R.byteLength)),!l.isBuffer(C)||!l.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===R)return 0;let Q=C.length,me=R.length;for(let je=0,lt=Math.min(Q,me);jeme.length?(l.isBuffer(lt)||(lt=l.from(lt)),lt.copy(me,je)):Uint8Array.prototype.set.call(me,lt,je);else if(l.isBuffer(lt))lt.copy(me,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=lt.length}return me};function B($,C){if(l.isBuffer($))return $.length;if(ArrayBuffer.isView($)||Ot($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);const R=$.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&R===0)return 0;let me=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Te($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return $t($).length;default:if(me)return Q?-1:Te($).length;C=(""+C).toLowerCase(),me=!0}}l.byteLength=B;function U($,C,R){let Q=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,C>>>=0,R<=C))return"";for($||($="utf8");;)switch($){case"hex":return J(this,C,R);case"utf8":case"utf-8":return M(this,C,R);case"ascii":return he(this,C,R);case"latin1":case"binary":return xe(this,C,R);case"base64":return ae(this,C,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ct(this,C,R);default:if(Q)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),Q=!0}}l.prototype._isBuffer=!0;function L($,C,R){const Q=$[C];$[C]=$[R],$[R]=Q}l.prototype.swap16=function(){const C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;RR&&(C+=" ... "),""},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(C,R,Q,me,je){if(Ot(C,Uint8Array)&&(C=l.from(C,C.offset,C.byteLength)),!l.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(R===void 0&&(R=0),Q===void 0&&(Q=C?C.length:0),me===void 0&&(me=0),je===void 0&&(je=this.length),R<0||Q>C.length||me<0||je>this.length)throw new RangeError("out of range index");if(me>=je&&R>=Q)return 0;if(me>=je)return-1;if(R>=Q)return 1;if(R>>>=0,Q>>>=0,me>>>=0,je>>>=0,this===C)return 0;let lt=je-me,ur=Q-R;const Dr=Math.min(lt,ur),hr=this.slice(me,je),Rr=C.slice(R,Q);for(let Gr=0;Gr2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,br(R)&&(R=me?0:$.length-1),R<0&&(R=$.length+R),R>=$.length){if(me)return-1;R=$.length-1}else if(R<0)if(me)R=0;else return-1;if(typeof C=="string"&&(C=l.from(C,Q)),l.isBuffer(C))return C.length===0?-1:V($,C,R,Q,me);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call($,C,R):Uint8Array.prototype.lastIndexOf.call($,C,R):V($,[C],R,Q,me);throw new TypeError("val must be string, number or Buffer")}function V($,C,R,Q,me){let je=1,lt=$.length,ur=C.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if($.length<2||C.length<2)return-1;je=2,lt/=2,ur/=2,R/=2}function Dr(Rr,Gr){return je===1?Rr[Gr]:Rr.readUInt16BE(Gr*je)}let hr;if(me){let Rr=-1;for(hr=R;hrlt&&(R=lt-ur),hr=R;hr>=0;hr--){let Rr=!0;for(let Gr=0;Grme&&(Q=me)):Q=me;const je=C.length;Q>je/2&&(Q=je/2);let lt;for(lt=0;lt>>0,isFinite(Q)?(Q=Q>>>0,me===void 0&&(me="utf8")):(me=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const je=this.length-R;if((Q===void 0||Q>je)&&(Q=je),C.length>0&&(Q<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");let lt=!1;for(;;)switch(me){case"hex":return H(this,C,R,Q);case"utf8":case"utf-8":return z(this,C,R,Q);case"ascii":case"latin1":case"binary":return Y(this,C,R,Q);case"base64":return oe(this,C,R,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,C,R,Q);default:if(lt)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),lt=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae($,C,R){return C===0&&R===$.length?t.fromByteArray($):t.fromByteArray($.slice(C,R))}function M($,C,R){R=Math.min($.length,R);const Q=[];let me=C;for(;me239?4:je>223?3:je>191?2:1;if(me+ur<=R){let Dr,hr,Rr,Gr;switch(ur){case 1:je<128&&(lt=je);break;case 2:Dr=$[me+1],(Dr&192)===128&&(Gr=(je&31)<<6|Dr&63,Gr>127&&(lt=Gr));break;case 3:Dr=$[me+1],hr=$[me+2],(Dr&192)===128&&(hr&192)===128&&(Gr=(je&15)<<12|(Dr&63)<<6|hr&63,Gr>2047&&(Gr<55296||Gr>57343)&&(lt=Gr));break;case 4:Dr=$[me+1],hr=$[me+2],Rr=$[me+3],(Dr&192)===128&&(hr&192)===128&&(Rr&192)===128&&(Gr=(je&15)<<18|(Dr&63)<<12|(hr&63)<<6|Rr&63,Gr>65535&&Gr<1114112&&(lt=Gr))}}lt===null?(lt=65533,ur=1):lt>65535&&(lt-=65536,Q.push(lt>>>10&1023|55296),lt=56320|lt&1023),Q.push(lt),me+=ur}return ue(Q)}const te=4096;function ue($){const C=$.length;if(C<=te)return String.fromCharCode.apply(String,$);let R="",Q=0;for(;QQ)&&(R=Q);let me="";for(let je=C;jeQ&&(C=Q),R<0?(R+=Q,R<0&&(R=0)):R>Q&&(R=Q),RR)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(C,R,Q){C=C>>>0,R=R>>>0,Q||De(C,R,this.length);let me=this[C],je=1,lt=0;for(;++lt>>0,R=R>>>0,Q||De(C,R,this.length);let me=this[C+--R],je=1;for(;R>0&&(je*=256);)me+=this[C+--R]*je;return me},l.prototype.readUint8=l.prototype.readUInt8=function(C,R){return C=C>>>0,R||De(C,1,this.length),this[C]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(C,R){return C=C>>>0,R||De(C,2,this.length),this[C]|this[C+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(C,R){return C=C>>>0,R||De(C,2,this.length),this[C]<<8|this[C+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(C,R){return C=C>>>0,R||De(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(C,R){return C=C>>>0,R||De(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},l.prototype.readBigUInt64LE=se(function(C){C=C>>>0,mr(C,"offset");const R=this[C],Q=this[C+7];(R===void 0||Q===void 0)&&ne(C,this.length-8);const me=R+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,je=this[++C]+this[++C]*2**8+this[++C]*2**16+Q*2**24;return BigInt(me)+(BigInt(je)<>>0,mr(C,"offset");const R=this[C],Q=this[C+7];(R===void 0||Q===void 0)&&ne(C,this.length-8);const me=R*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],je=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+Q;return(BigInt(me)<>>0,R=R>>>0,Q||De(C,R,this.length);let me=this[C],je=1,lt=0;for(;++lt=je&&(me-=Math.pow(2,8*R)),me},l.prototype.readIntBE=function(C,R,Q){C=C>>>0,R=R>>>0,Q||De(C,R,this.length);let me=R,je=1,lt=this[C+--me];for(;me>0&&(je*=256);)lt+=this[C+--me]*je;return je*=128,lt>=je&&(lt-=Math.pow(2,8*R)),lt},l.prototype.readInt8=function(C,R){return C=C>>>0,R||De(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},l.prototype.readInt16LE=function(C,R){C=C>>>0,R||De(C,2,this.length);const Q=this[C]|this[C+1]<<8;return Q&32768?Q|4294901760:Q},l.prototype.readInt16BE=function(C,R){C=C>>>0,R||De(C,2,this.length);const Q=this[C+1]|this[C]<<8;return Q&32768?Q|4294901760:Q},l.prototype.readInt32LE=function(C,R){return C=C>>>0,R||De(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},l.prototype.readInt32BE=function(C,R){return C=C>>>0,R||De(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},l.prototype.readBigInt64LE=se(function(C){C=C>>>0,mr(C,"offset");const R=this[C],Q=this[C+7];(R===void 0||Q===void 0)&&ne(C,this.length-8);const me=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(Q<<24);return(BigInt(me)<>>0,mr(C,"offset");const R=this[C],Q=this[C+7];(R===void 0||Q===void 0)&&ne(C,this.length-8);const me=(R<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(me)<>>0,R||De(C,4,this.length),r.read(this,C,!0,23,4)},l.prototype.readFloatBE=function(C,R){return C=C>>>0,R||De(C,4,this.length),r.read(this,C,!1,23,4)},l.prototype.readDoubleLE=function(C,R){return C=C>>>0,R||De(C,8,this.length),r.read(this,C,!0,52,8)},l.prototype.readDoubleBE=function(C,R){return C=C>>>0,R||De(C,8,this.length),r.read(this,C,!1,52,8)};function ze($,C,R,Q,me,je){if(!l.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>me||C$.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(C,R,Q,me){if(C=+C,R=R>>>0,Q=Q>>>0,!me){const ur=Math.pow(2,8*Q)-1;ze(this,C,R,Q,ur,0)}let je=1,lt=0;for(this[R]=C&255;++lt>>0,Q=Q>>>0,!me){const ur=Math.pow(2,8*Q)-1;ze(this,C,R,Q,ur,0)}let je=Q-1,lt=1;for(this[R+je]=C&255;--je>=0&&(lt*=256);)this[R+je]=C/lt&255;return R+Q},l.prototype.writeUint8=l.prototype.writeUInt8=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,1,255,0),this[R]=C&255,R+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,2,65535,0),this[R]=C&255,this[R+1]=C>>>8,R+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,2,65535,0),this[R]=C>>>8,this[R+1]=C&255,R+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,4,4294967295,0),this[R+3]=C>>>24,this[R+2]=C>>>16,this[R+1]=C>>>8,this[R]=C&255,R+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,4,4294967295,0),this[R]=C>>>24,this[R+1]=C>>>16,this[R+2]=C>>>8,this[R+3]=C&255,R+4};function ir($,C,R,Q,me){Gt(C,Q,me,$,R,7);let je=Number(C&BigInt(4294967295));$[R++]=je,je=je>>8,$[R++]=je,je=je>>8,$[R++]=je,je=je>>8,$[R++]=je;let lt=Number(C>>BigInt(32)&BigInt(4294967295));return $[R++]=lt,lt=lt>>8,$[R++]=lt,lt=lt>>8,$[R++]=lt,lt=lt>>8,$[R++]=lt,R}function Rt($,C,R,Q,me){Gt(C,Q,me,$,R,7);let je=Number(C&BigInt(4294967295));$[R+7]=je,je=je>>8,$[R+6]=je,je=je>>8,$[R+5]=je,je=je>>8,$[R+4]=je;let lt=Number(C>>BigInt(32)&BigInt(4294967295));return $[R+3]=lt,lt=lt>>8,$[R+2]=lt,lt=lt>>8,$[R+1]=lt,lt=lt>>8,$[R]=lt,R+8}l.prototype.writeBigUInt64LE=se(function(C,R=0){return ir(this,C,R,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=se(function(C,R=0){return Rt(this,C,R,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(C,R,Q,me){if(C=+C,R=R>>>0,!me){const Dr=Math.pow(2,8*Q-1);ze(this,C,R,Q,Dr-1,-Dr)}let je=0,lt=1,ur=0;for(this[R]=C&255;++je>0)-ur&255;return R+Q},l.prototype.writeIntBE=function(C,R,Q,me){if(C=+C,R=R>>>0,!me){const Dr=Math.pow(2,8*Q-1);ze(this,C,R,Q,Dr-1,-Dr)}let je=Q-1,lt=1,ur=0;for(this[R+je]=C&255;--je>=0&&(lt*=256);)C<0&&ur===0&&this[R+je+1]!==0&&(ur=1),this[R+je]=(C/lt>>0)-ur&255;return R+Q},l.prototype.writeInt8=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,1,127,-128),C<0&&(C=255+C+1),this[R]=C&255,R+1},l.prototype.writeInt16LE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,2,32767,-32768),this[R]=C&255,this[R+1]=C>>>8,R+2},l.prototype.writeInt16BE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,2,32767,-32768),this[R]=C>>>8,this[R+1]=C&255,R+2},l.prototype.writeInt32LE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,4,2147483647,-2147483648),this[R]=C&255,this[R+1]=C>>>8,this[R+2]=C>>>16,this[R+3]=C>>>24,R+4},l.prototype.writeInt32BE=function(C,R,Q){return C=+C,R=R>>>0,Q||ze(this,C,R,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[R]=C>>>24,this[R+1]=C>>>16,this[R+2]=C>>>8,this[R+3]=C&255,R+4},l.prototype.writeBigInt64LE=se(function(C,R=0){return ir(this,C,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=se(function(C,R=0){return Rt(this,C,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function At($,C,R,Q,me,je){if(R+Q>$.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function Xt($,C,R,Q,me){return C=+C,R=R>>>0,me||At($,C,R,4),r.write($,C,R,Q,23,4),R+4}l.prototype.writeFloatLE=function(C,R,Q){return Xt(this,C,R,!0,Q)},l.prototype.writeFloatBE=function(C,R,Q){return Xt(this,C,R,!1,Q)};function vr($,C,R,Q,me){return C=+C,R=R>>>0,me||At($,C,R,8),r.write($,C,R,Q,52,8),R+8}l.prototype.writeDoubleLE=function(C,R,Q){return vr(this,C,R,!0,Q)},l.prototype.writeDoubleBE=function(C,R,Q){return vr(this,C,R,!1,Q)},l.prototype.copy=function(C,R,Q,me){if(!l.isBuffer(C))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!me&&me!==0&&(me=this.length),R>=C.length&&(R=C.length),R||(R=0),me>0&&me=this.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),C.length-R>>0,Q=Q===void 0?this.length:Q>>>0,C||(C=0);let je;if(typeof C=="number")for(je=R;je2**32?me=xt(String(R)):typeof R=="bigint"&&(me=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(me=xt(me)),me+="n"),Q+=` It must be ${C}. Received ${me}`,Q},RangeError);function xt($){let C="",R=$.length;const Q=$[0]==="-"?1:0;for(;R>=Q+4;R-=3)C=`_${$.slice(R-3,R)}${C}`;return`${$.slice(0,R)}${C}`}function Ut($,C,R){mr(C,"offset"),($[C]===void 0||$[C+R]===void 0)&&ne(C,$.length-(R+1))}function Gt($,C,R,Q,me,je){if($>R||$3?C===0||C===BigInt(0)?ur=`>= 0${lt} and < 2${lt} ** ${(je+1)*8}${lt}`:ur=`>= -(2${lt} ** ${(je+1)*8-1}${lt}) and < 2 ** ${(je+1)*8-1}${lt}`:ur=`>= ${C}${lt} and <= ${R}${lt}`,new Et.ERR_OUT_OF_RANGE("value",ur,$)}Ut(Q,me,je)}function mr($,C){if(typeof $!="number")throw new Et.ERR_INVALID_ARG_TYPE(C,"number",$)}function ne($,C,R){throw Math.floor($)!==$?(mr($,R),new Et.ERR_OUT_OF_RANGE(R||"offset","an integer",$)):C<0?new Et.ERR_BUFFER_OUT_OF_BOUNDS:new Et.ERR_OUT_OF_RANGE(R||"offset",`>= ${R?1:0} and <= ${C}`,$)}const Pt=/[^+/0-9A-Za-z-_]/g;function Dt($){if($=$.split("=")[0],$=$.trim().replace(Pt,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function Te($,C){C=C||1/0;let R;const Q=$.length;let me=null;const je=[];for(let lt=0;lt55295&&R<57344){if(!me){if(R>56319){(C-=3)>-1&&je.push(239,191,189);continue}else if(lt+1===Q){(C-=3)>-1&&je.push(239,191,189);continue}me=R;continue}if(R<56320){(C-=3)>-1&&je.push(239,191,189),me=R;continue}R=(me-55296<<10|R-56320)+65536}else me&&(C-=3)>-1&&je.push(239,191,189);if(me=null,R<128){if((C-=1)<0)break;je.push(R)}else if(R<2048){if((C-=2)<0)break;je.push(R>>6|192,R&63|128)}else if(R<65536){if((C-=3)<0)break;je.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((C-=4)<0)break;je.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return je}function Ae($){const C=[];for(let R=0;R<$.length;++R)C.push($.charCodeAt(R)&255);return C}function ot($,C){let R,Q,me;const je=[];for(let lt=0;lt<$.length&&!((C-=2)<0);++lt)R=$.charCodeAt(lt),Q=R>>8,me=R%256,je.push(me),je.push(Q);return je}function $t($){return t.toByteArray(Dt($))}function tr($,C,R,Q){let me;for(me=0;me=C.length||me>=$.length);++me)C[me+R]=$[me];return me}function Ot($,C){return $ instanceof C||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===C.name}function br($){return $!==$}const be=function(){const $="0123456789abcdef",C=new Array(256);for(let R=0;R<16;++R){const Q=R*16;for(let me=0;me<16;++me)C[Q+me]=$[R]+$[me]}return C}();function se($){return typeof BigInt>"u"?ce:$}function ce(){throw new Error("BigInt not supported")}})(TM);globalThis.Buffer=TM.Buffer;class Ah{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Bm=typeof window>"u"||"Deno"in window;function Js(){}function tz(e,t){return typeof e=="function"?e(t):e}function S5(e){return typeof e=="number"&&e>=0&&e!==1/0}function RM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jg(e,t,r){return Th(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function rz(e,t,r){return Th(e)?typeof t=="function"?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Ac(e,t,r){return Th(e)?[{...t,queryKey:e},r]:[e||{},t]}function nz(e,t,r){return Th(e)?[{...t,mutationKey:e},r]:[e||{},t]}function Nk(e,t){const{type:r="all",exact:i,fetchStatus:a,predicate:o,queryKey:s,stale:l}=e;if(Th(s)){if(i){if(t.queryHash!==GS(s,t.options))return!1}else if(!$v(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a<"u"&&a!==t.state.fetchStatus||o&&!o(t))}function jk(e,t){const{exact:r,fetching:i,predicate:a,mutationKey:o}=e;if(Th(o)){if(!t.options.mutationKey)return!1;if(r){if(Yd(t.options.mutationKey)!==Yd(o))return!1}else if(!$v(t.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&t.state.status==="loading"!==i||a&&!a(t))}function GS(e,t){return(t?.queryKeyHashFn||Yd)(e)}function Yd(e){return JSON.stringify(e,(t,r)=>E5(r)?Object.keys(r).sort().reduce((i,a)=>(i[a]=r[a],i),{}):r)}function $v(e,t){return PM(e,t)}function PM(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!PM(e[r],t[r])):!1}function MM(e,t){if(e===t)return e;const r=$k(e)&&$k(t);if(r||E5(e)&&E5(t)){const i=r?e.length:Object.keys(e).length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{};let l=0;for(let u=0;u"u")return!0;const r=t.prototype;return!(!Fk(r)||!r.hasOwnProperty("isPrototypeOf"))}function Fk(e){return Object.prototype.toString.call(e)==="[object Object]"}function Th(e){return Array.isArray(e)}function OM(e){return new Promise(t=>{setTimeout(t,e)})}function zk(e){OM(0).then(e)}function iz(){if(typeof AbortController=="function")return new AbortController}function k5(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?MM(e,t):t}class oz extends Ah{constructor(){super(),this.setup=t=>{if(!Bm&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Fv=new oz;class az extends Ah{constructor(){super(),this.setup=t=>{if(!Bm&&window.addEventListener){const r=()=>t();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zv=new az;function sz(e){return Math.min(1e3*2**e,3e4)}function cb(e){return(e??"online")==="online"?zv.isOnline():!0}class BM{constructor(t){this.revert=t?.revert,this.silent=t?.silent}}function gv(e){return e instanceof BM}function UM(e){let t=!1,r=0,i=!1,a,o,s;const l=new Promise((_,E)=>{o=_,s=E}),u=_=>{i||(w(new BM(_)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},g=()=>!Fv.isFocused()||e.networkMode!=="always"&&!zv.isOnline(),x=_=>{i||(i=!0,e.onSuccess==null||e.onSuccess(_),a?.(),o(_))},w=_=>{i||(i=!0,e.onError==null||e.onError(_),a?.(),s(_))},v=()=>new Promise(_=>{a=E=>{if(i||!g())return _(E)},e.onPause==null||e.onPause()}).then(()=>{a=void 0,i||e.onContinue==null||e.onContinue()}),y=()=>{if(i)return;let _;try{_=e.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(x).catch(E=>{var A,B;if(i)return;const U=(A=e.retry)!=null?A:3,L=(B=e.retryDelay)!=null?B:sz,K=typeof L=="function"?L(r,E):L,V=U===!0||typeof U=="number"&&r{if(g())return v()}).then(()=>{t?w(E):y()})})};return cb(e.networkMode)?y():v().then(y),{promise:l,cancel:u,continue:()=>{a?.()},cancelRetry:c,continueRetry:d}}const YS=console;function lz(){let e=[],t=0,r=d=>{d()},i=d=>{d()};const a=d=>{let g;t++;try{g=d()}finally{t--,t||l()}return g},o=d=>{t?e.push(d):zk(()=>{r(d)})},s=d=>(...g)=>{o(()=>{d(...g)})},l=()=>{const d=e;e=[],d.length&&zk(()=>{i(()=>{d.forEach(g=>{r(g)})})})};return{batch:a,batchCalls:s,schedule:o,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{i=d}}}const Yo=lz();class DM{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),S5(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Bm?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class uz extends DM{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||YS,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||cz(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const i=k5(this.state.data,t,this.options);return this.dispatch({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const i=this.promise;return(r=this.retryer)==null||r.cancel(t),i?i.then(Js).catch(Js):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!RM(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(i=>i.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(i=>i.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var i,a;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(v=>v.options.queryFn);w&&this.setOptions(w.options)}Array.isArray(this.options.queryKey);const s=iz(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(l);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(u(d),(i=this.options.behavior)==null||i.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=d.fetchOptions)==null?void 0:a.meta)){var g;this.dispatch({type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta})}const x=w=>{if(gv(w)&&w.silent||this.dispatch({type:"error",error:w}),!gv(w)){var v,y;(v=(y=this.cache.config).onError)==null||v.call(y,w,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=UM({fn:d.fetchFn,abort:s?.abort.bind(s),onSuccess:w=>{var v,y;if(typeof w>"u"){x(new Error("undefined"));return}this.setData(w),(v=(y=this.cache.config).onSuccess)==null||v.call(y,w,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:x,onFail:(w,v)=>{this.dispatch({type:"failed",failureCount:w,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=i=>{var a,o;switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(a=t.meta)!=null?a:null,fetchStatus:cb(this.options.networkMode)?"fetching":"paused",...!i.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return gv(s)&&s.revert&&this.revertState?{...this.revertState}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=r(this.state),Yo.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function cz(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class dz extends Ah{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,i){var a;const o=r.queryKey,s=(a=r.queryHash)!=null?a:GS(o,r);let l=this.get(s);return l||(l=new uz({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(r),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(i=>i!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Yo.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[i]=Ac(t,r);return typeof i.exact>"u"&&(i.exact=!0),this.queries.find(a=>Nk(i,a))}findAll(t,r){const[i]=Ac(t,r);return Object.keys(i).length>0?this.queries.filter(a=>Nk(i,a)):this.queries}notify(t){Yo.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Yo.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Yo.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class fz extends DM{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||YS,this.observers=[],this.state=t.state||LM(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(r=>r!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const t=()=>{var B;return this.retryer=UM({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(U,L)=>{this.dispatch({type:"failed",failureCount:U,error:L})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(B=this.options.retry)!=null?B:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var i,a,o,s,l,u;if(!r){var c,d,g,x;this.dispatch({type:"loading",variables:this.options.variables}),await((c=(d=this.mutationCache.config).onMutate)==null?void 0:c.call(d,this.state.variables,this));const U=await((g=(x=this.options).onMutate)==null?void 0:g.call(x,this.state.variables));U!==this.state.context&&this.dispatch({type:"loading",context:U,variables:this.state.variables})}const B=await t();return await((i=(a=this.mutationCache.config).onSuccess)==null?void 0:i.call(a,B,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,B,this.state.variables,this.state.context)),await((l=(u=this.options).onSettled)==null?void 0:l.call(u,B,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:B}),B}catch(B){try{var w,v,y,_,E,A;throw await((w=(v=this.mutationCache.config).onError)==null?void 0:w.call(v,B,this.state.variables,this.state.context,this)),await((y=(_=this.options).onError)==null?void 0:y.call(_,B,this.state.variables,this.state.context)),await((E=(A=this.options).onSettled)==null?void 0:E.call(A,void 0,B,this.state.variables,this.state.context)),B}finally{this.dispatch({type:"error",error:B})}}}dispatch(t){const r=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"loading":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!cb(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...i,...t.state}}};this.state=r(this.state),Yo.batch(()=>{this.observers.forEach(i=>{i.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function LM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class pz extends Ah{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,i){const a=new fz({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:i,defaultOptions:r.mutationKey?t.getMutationDefaults(r.mutationKey):void 0});return this.add(a),a}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){Yo.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(r=>jk(t,r))}findAll(t){return this.mutations.filter(r=>jk(t,r))}notify(t){Yo.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.mutations.filter(r=>r.state.isPaused);return Yo.batch(()=>t.reduce((r,i)=>r.then(()=>i.continue().catch(Js)),Promise.resolve()))}}function hz(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,i,a,o,s;const l=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,u=(i=e.fetchOptions)==null||(a=i.meta)==null?void 0:a.fetchMore,c=u?.pageParam,d=u?.direction==="forward",g=u?.direction==="backward",x=((o=e.state.data)==null?void 0:o.pages)||[],w=((s=e.state.data)==null?void 0:s.pageParams)||[];let v=w,y=!1;const _=K=>{Object.defineProperty(K,"signal",{enumerable:!0,get:()=>{var V;if((V=e.signal)!=null&&V.aborted)y=!0;else{var H;(H=e.signal)==null||H.addEventListener("abort",()=>{y=!0})}return e.signal}})},E=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),A=(K,V,H,z)=>(v=z?[V,...v]:[...v,V],z?[H,...K]:[...K,H]),B=(K,V,H,z)=>{if(y)return Promise.reject("Cancelled");if(typeof H>"u"&&!V&&K.length)return Promise.resolve(K);const Y={queryKey:e.queryKey,pageParam:H,meta:e.options.meta};_(Y);const oe=E(Y);return Promise.resolve(oe).then(ae=>A(K,H,ae,z))};let U;if(!x.length)U=B([]);else if(d){const K=typeof c<"u",V=K?c:Hk(e.options,x);U=B(x,K,V)}else if(g){const K=typeof c<"u",V=K?c:gz(e.options,x);U=B(x,K,V,!0)}else{v=[];const K=typeof e.options.getNextPageParam>"u";U=(l&&x[0]?l(x[0],0,x):!0)?B([],K,w[0]):Promise.resolve(A([],w[0],x[0]));for(let H=1;H{if(l&&x[H]?l(x[H],H,x):!0){const oe=K?w[H]:Hk(e.options,z);return B(z,K,oe)}return Promise.resolve(A(z,w[H],x[H]))})}return U.then(K=>({pages:K,pageParams:v}))}}}}function Hk(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function gz(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class mz{constructor(t={}){this.queryCache=t.queryCache||new dz,this.mutationCache=t.mutationCache||new pz,this.logger=t.logger||YS,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Fv.subscribe(()=>{Fv.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=zv.subscribe(()=>{zv.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[i]=Ac(t,r);return i.fetchStatus="fetching",this.queryCache.findAll(i).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var i;return(i=this.queryCache.find(t,r))==null?void 0:i.state.data}ensureQueryData(t,r,i){const a=Jg(t,r,i),o=this.getQueryData(a.queryKey);return o?Promise.resolve(o):this.fetchQuery(a)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:i})=>{const a=i.data;return[r,a]})}setQueryData(t,r,i){const a=this.queryCache.find(t),o=a?.state.data,s=tz(r,o);if(typeof s>"u")return;const l=Jg(t),u=this.defaultQueryOptions(l);return this.queryCache.build(this,u).setData(s,{...i,manual:!0})}setQueriesData(t,r,i){return Yo.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,r,i)]))}getQueryState(t,r){var i;return(i=this.queryCache.find(t,r))==null?void 0:i.state}removeQueries(t,r){const[i]=Ac(t,r),a=this.queryCache;Yo.batch(()=>{a.findAll(i).forEach(o=>{a.remove(o)})})}resetQueries(t,r,i){const[a,o]=Ac(t,r,i),s=this.queryCache,l={type:"active",...a};return Yo.batch(()=>(s.findAll(a).forEach(u=>{u.reset()}),this.refetchQueries(l,o)))}cancelQueries(t,r,i){const[a,o={}]=Ac(t,r,i);typeof o.revert>"u"&&(o.revert=!0);const s=Yo.batch(()=>this.queryCache.findAll(a).map(l=>l.cancel(o)));return Promise.all(s).then(Js).catch(Js)}invalidateQueries(t,r,i){const[a,o]=Ac(t,r,i);return Yo.batch(()=>{var s,l;if(this.queryCache.findAll(a).forEach(c=>{c.invalidate()}),a.refetchType==="none")return Promise.resolve();const u={...a,type:(s=(l=a.refetchType)!=null?l:a.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,r,i){const[a,o]=Ac(t,r,i),s=Yo.batch(()=>this.queryCache.findAll(a).filter(u=>!u.isDisabled()).map(u=>{var c;return u.fetch(void 0,{...o,cancelRefetch:(c=o?.cancelRefetch)!=null?c:!0,meta:{refetchPage:a.refetchPage}})}));let l=Promise.all(s).then(Js);return o!=null&&o.throwOnError||(l=l.catch(Js)),l}fetchQuery(t,r,i){const a=Jg(t,r,i),o=this.defaultQueryOptions(a);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,r,i){return this.fetchQuery(t,r,i).then(Js).catch(Js)}fetchInfiniteQuery(t,r,i){const a=Jg(t,r,i);return a.behavior=hz(),this.fetchQuery(a)}prefetchInfiniteQuery(t,r,i){return this.fetchInfiniteQuery(t,r,i).then(Js).catch(Js)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,r){const i=this.queryDefaults.find(a=>Yd(t)===Yd(a.queryKey));i?i.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(i=>$v(t,i.queryKey));return r?.defaultOptions}setMutationDefaults(t,r){const i=this.mutationDefaults.find(a=>Yd(t)===Yd(a.mutationKey));i?i.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(i=>$v(t,i.mutationKey));return r?.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r={...this.defaultOptions.queries,...this.getQueryDefaults(t?.queryKey),...t,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=GS(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t?.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class yz extends Ah{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Wk(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return A5(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return A5(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),C5(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const o=this.hasListeners();o&&Vk(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(r),o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t);return this.createResult(r,t)}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),t[i])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...r}={}){return this.fetch({...r,meta:{refetchPage:t}})}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),i=this.client.getQueryCache().build(this.client,r);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,r))}fetch(t){var r;return this.executeFetch({...t,cancelRefetch:(r=t.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Js)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Bm||this.currentResult.isStale||!S5(this.options.staleTime))return;const r=RM(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Bm||this.options.enabled===!1||!S5(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Fv.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const i=this.currentQuery,a=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,u=t!==i,c=u?t.state:this.currentQueryInitialState,d=u?this.currentResult:this.previousQueryResult,{state:g}=t;let{dataUpdatedAt:x,error:w,errorUpdatedAt:v,fetchStatus:y,status:_}=g,E=!1,A=!1,B;if(r._optimisticResults){const H=this.hasListeners(),z=!H&&Wk(t,r),Y=H&&Vk(t,i,r,a);(z||Y)&&(y=cb(t.options.networkMode)?"fetching":"paused",x||(_="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!g.dataUpdatedAt&&d!=null&&d.isSuccess&&_!=="error")B=d.data,x=d.dataUpdatedAt,_=d.status,E=!0;else if(r.select&&typeof g.data<"u")if(o&&g.data===s?.data&&r.select===this.selectFn)B=this.selectResult;else try{this.selectFn=r.select,B=r.select(g.data),B=k5(o?.data,B,r),this.selectResult=B,this.selectError=null}catch(H){this.selectError=H}else B=g.data;if(typeof r.placeholderData<"u"&&typeof B>"u"&&_==="loading"){let H;if(o!=null&&o.isPlaceholderData&&r.placeholderData===l?.placeholderData)H=o.data;else if(H=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof H<"u")try{H=r.select(H),this.selectError=null}catch(z){this.selectError=z}typeof H<"u"&&(_="success",B=k5(o?.data,H,r),A=!0)}this.selectError&&(w=this.selectError,B=this.selectResult,v=Date.now(),_="error");const U=y==="fetching",L=_==="loading",K=_==="error";return{status:_,fetchStatus:y,isLoading:L,isSuccess:_==="success",isError:K,isInitialLoading:L&&U,data:B,dataUpdatedAt:x,error:w,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>c.dataUpdateCount||g.errorUpdateCount>c.errorUpdateCount,isFetching:U,isRefetching:U&&!L,isLoadingError:K&&g.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:A,isPreviousData:E,isRefetchError:K&&g.dataUpdatedAt!==0,isStale:QS(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,C5(i,r))return;this.currentResult=i;const a={cache:!0},o=()=>{if(!r)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==r[c]&&l.has(c)})};t?.listeners!==!1&&o()&&(a.listeners=!0),this.notify({...a,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!gv(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Yo.batch(()=>{if(t.onSuccess){var r,i,a,o;(r=(i=this.options).onSuccess)==null||r.call(i,this.currentResult.data),(a=(o=this.options).onSettled)==null||a.call(o,this.currentResult.data,null)}else if(t.onError){var s,l,u,c;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(u=(c=this.options).onSettled)==null||u.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(d=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function vz(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Wk(e,t){return vz(e,t)||e.state.dataUpdatedAt>0&&A5(e,t,t.refetchOnMount)}function A5(e,t,r){if(t.enabled!==!1){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&QS(e,t)}return!1}function Vk(e,t,r,i){return r.enabled!==!1&&(e!==t||i.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&QS(e,r)}function QS(e,t){return e.isStaleByTime(t.staleTime)}class bz extends Ah{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.client.defaultMutationOptions(t),C5(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:LM(),r={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(t){Yo.batch(()=>{if(this.mutateOptions){if(t.onSuccess){var r,i,a,o;(r=(i=this.mutateOptions).onSuccess)==null||r.call(i,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(a=(o=this.mutateOptions).onSettled)==null||a.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var s,l,u,c;(s=(l=this.mutateOptions).onError)==null||s.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(c=this.mutateOptions).onSettled)==null||u.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(d=>{d(this.currentResult)})})}}var il={exports:{}},Hs={},Z={exports:{}},Di={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var I0=Symbol.for("react.element"),wz=Symbol.for("react.portal"),xz=Symbol.for("react.fragment"),_z=Symbol.for("react.strict_mode"),Sz=Symbol.for("react.profiler"),Cz=Symbol.for("react.provider"),Ez=Symbol.for("react.context"),kz=Symbol.for("react.forward_ref"),Az=Symbol.for("react.suspense"),Tz=Symbol.for("react.memo"),Iz=Symbol.for("react.lazy"),qk=Symbol.iterator;function Rz(e){return e===null||typeof e!="object"?null:(e=qk&&e[qk]||e["@@iterator"],typeof e=="function"?e:null)}var NM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jM=Object.assign,$M={};function Ih(e,t,r){this.props=e,this.context=t,this.refs=$M,this.updater=r||NM}Ih.prototype.isReactComponent={};Ih.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ih.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FM(){}FM.prototype=Ih.prototype;function XS(e,t,r){this.props=e,this.context=t,this.refs=$M,this.updater=r||NM}var ZS=XS.prototype=new FM;ZS.constructor=XS;jM(ZS,Ih.prototype);ZS.isPureReactComponent=!0;var Kk=Array.isArray,zM=Object.prototype.hasOwnProperty,JS={current:null},HM={key:!0,ref:!0,__self:!0,__source:!0};function WM(e,t,r){var i,a={},o=null,s=null;if(t!=null)for(i in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)zM.call(t,i)&&!HM.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(l===1)a.children=r;else if(1>>1,ze=xe[De];if(0>>1;Dea(At,ct))Xta(vr,At)?(xe[De]=vr,xe[Xt]=ct,De=Xt):(xe[De]=At,xe[Rt]=ct,De=Rt);else if(Xta(vr,ct))xe[De]=vr,xe[Xt]=ct,De=Xt;else break e}}return J}function a(xe,J){var ct=xe.sortIndex-J.sortIndex;return ct!==0?ct:xe.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,g=null,x=3,w=!1,v=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(xe){for(var J=r(c);J!==null;){if(J.callback===null)i(c);else if(J.startTime<=xe)i(c),J.sortIndex=J.expirationTime,t(u,J);else break;J=r(c)}}function U(xe){if(y=!1,B(xe),!v)if(r(u)!==null)v=!0,ue(L);else{var J=r(c);J!==null&&he(U,J.startTime-xe)}}function L(xe,J){v=!1,y&&(y=!1,E(H),H=-1),w=!0;var ct=x;try{for(B(J),g=r(u);g!==null&&(!(g.expirationTime>J)||xe&&!oe());){var De=g.callback;if(typeof De=="function"){g.callback=null,x=g.priorityLevel;var ze=De(g.expirationTime<=J);J=e.unstable_now(),typeof ze=="function"?g.callback=ze:g===r(u)&&i(u),B(J)}else i(u);g=r(u)}if(g!==null)var ir=!0;else{var Rt=r(c);Rt!==null&&he(U,Rt.startTime-J),ir=!1}return ir}finally{g=null,x=ct,w=!1}}var K=!1,V=null,H=-1,z=5,Y=-1;function oe(){return!(e.unstable_now()-Yxe||125De?(xe.sortIndex=ct,t(c,xe),r(u)===null&&xe===r(c)&&(y?(E(H),H=-1):y=!0,he(U,ct-De))):(xe.sortIndex=ze,t(u,xe),v||w||(v=!0,ue(L))),xe},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(xe){var J=x;return function(){var ct=x;x=J;try{return xe.apply(this,arguments)}finally{x=ct}}}})(qM);(function(e){e.exports=qM})(VM);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var KM=Z.exports,Ns=VM.exports;function tn(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),T5=Object.prototype.hasOwnProperty,Uz=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Yk={},Qk={};function Dz(e){return T5.call(Qk,e)?!0:T5.call(Yk,e)?!1:Uz.test(e)?Qk[e]=!0:(Yk[e]=!0,!1)}function Lz(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nz(e,t,r,i){if(t===null||typeof t>"u"||Lz(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ls(e,t,r,i,a,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Na={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Na[e]=new ls(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Na[t]=new ls(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Na[e]=new ls(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Na[e]=new ls(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Na[e]=new ls(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Na[e]=new ls(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Na[e]=new ls(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Na[e]=new ls(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Na[e]=new ls(e,5,!1,e.toLowerCase(),null,!1,!1)});var t4=/[\-:]([a-z])/g;function r4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(t4,r4);Na[t]=new ls(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(t4,r4);Na[t]=new ls(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(t4,r4);Na[t]=new ls(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Na[e]=new ls(e,1,!1,e.toLowerCase(),null,!1,!1)});Na.xlinkHref=new ls("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Na[e]=new ls(e,1,!1,e.toLowerCase(),null,!0,!0)});function n4(e,t,r,i){var a=Na.hasOwnProperty(t)?Na[t]:null;(a!==null?a.type!==0:i||!(2l||a[s]!==o[l]){var u=` -`+a[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{Ix=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?em(e):""}function jz(e){switch(e.tag){case 5:return em(e.type);case 16:return em("Lazy");case 13:return em("Suspense");case 19:return em("SuspenseList");case 0:case 2:case 15:return e=Rx(e.type,!1),e;case 11:return e=Rx(e.type.render,!1),e;case 1:return e=Rx(e.type,!0),e;default:return""}}function M5(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Tp:return"Fragment";case Ap:return"Portal";case I5:return"Profiler";case i4:return"StrictMode";case R5:return"Suspense";case P5:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case QM:return(e.displayName||"Context")+".Consumer";case YM:return(e._context.displayName||"Context")+".Provider";case o4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case a4:return t=e.displayName||null,t!==null?t:M5(e.type)||"Memo";case Tc:t=e._payload,e=e._init;try{return M5(e(t))}catch{}}return null}function $z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M5(t);case 8:return t===i4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function od(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ZM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fz(e){var t=ZM(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ky(e){e._valueTracker||(e._valueTracker=Fz(e))}function JM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=ZM(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Hv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function O5(e,t){var r=t.checked;return Xo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Zk(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=od(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function eO(e,t){t=t.checked,t!=null&&n4(e,"checked",t,!1)}function B5(e,t){eO(e,t);var r=od(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?U5(e,t.type,r):t.hasOwnProperty("defaultValue")&&U5(e,t.type,od(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jk(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function U5(e,t,r){(t!=="number"||Hv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var tm=Array.isArray;function Wp(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Ay.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dm(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var dm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zz=["Webkit","ms","Moz","O"];Object.keys(dm).forEach(function(e){zz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dm[t]=dm[e]})});function iO(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||dm.hasOwnProperty(e)&&dm[e]?(""+t).trim():t+"px"}function oO(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=iO(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var Hz=Xo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function N5(e,t){if(t){if(Hz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(tn(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(tn(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(tn(61))}if(t.style!=null&&typeof t.style!="object")throw Error(tn(62))}}function j5(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $5=null;function s4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var F5=null,Vp=null,qp=null;function r8(e){if(e=M0(e)){if(typeof F5!="function")throw Error(tn(280));var t=e.stateNode;t&&(t=gb(t),F5(e.stateNode,e.type,t))}}function aO(e){Vp?qp?qp.push(e):qp=[e]:Vp=e}function sO(){if(Vp){var e=Vp,t=qp;if(qp=Vp=null,r8(e),t)for(e=0;e>>=0,e===0?32:31-(eH(e)/tH|0)|0}var Ty=64,Iy=4194304;function rm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Kv(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes,s=r&268435455;if(s!==0){var l=s&~a;l!==0?i=rm(l):(o&=s,o!==0&&(i=rm(o)))}else s=r&~a,s!==0?i=rm(s):o!==0&&(i=rm(o));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function R0(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ul(t),e[t]=r}function oH(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=pm),d8=String.fromCharCode(32),f8=!1;function AO(e,t){switch(e){case"keyup":return OH.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ip=!1;function UH(e,t){switch(e){case"compositionend":return TO(t);case"keypress":return t.which!==32?null:(f8=!0,d8);case"textInput":return e=t.data,e===d8&&f8?null:e;default:return null}}function DH(e,t){if(Ip)return e==="compositionend"||!g4&&AO(e,t)?(e=EO(),bv=f4=Uc=null,Ip=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=m8(r)}}function MO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?MO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function OO(){for(var e=window,t=Hv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Hv(e.document)}return t}function m4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function VH(e){var t=OO(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&MO(r.ownerDocument.documentElement,r)){if(i!==null&&m4(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,o=Math.min(i.start,a);i=i.end===void 0?o:Math.min(i.end,a),!e.extend&&o>i&&(a=i,i=o,o=a),a=y8(r,o);var s=y8(r,i);a&&s&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Rp=null,K5=null,gm=null,G5=!1;function v8(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;G5||Rp==null||Rp!==Hv(i)||(i=Rp,"selectionStart"in i&&m4(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),gm&&zm(gm,i)||(gm=i,i=Qv(K5,"onSelect"),0Op||(e.current=e3[Op],e3[Op]=null,Op--)}function To(e,t){Op++,e3[Op]=e.current,e.current=t}var ad={},Za=wd(ad),ys=wd(!1),df=ad;function rh(e,t){var r=e.type.contextTypes;if(!r)return ad;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in r)a[o]=t[o];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function vs(e){return e=e.childContextTypes,e!=null}function Zv(){Do(ys),Do(Za)}function E8(e,t,r){if(Za.current!==ad)throw Error(tn(168));To(Za,t),To(ys,r)}function zO(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(tn(108,$z(e)||"Unknown",a));return Xo({},r,i)}function Jv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ad,df=Za.current,To(Za,e),To(ys,ys.current),!0}function k8(e,t,r){var i=e.stateNode;if(!i)throw Error(tn(169));r?(e=zO(e,t,df),i.__reactInternalMemoizedMergedChildContext=e,Do(ys),Do(Za),To(Za,e)):Do(ys),To(ys,r)}var ju=null,mb=!1,Wx=!1;function HO(e){ju===null?ju=[e]:ju.push(e)}function nW(e){mb=!0,HO(e)}function xd(){if(!Wx&&ju!==null){Wx=!0;var e=0,t=ho;try{var r=ju;for(ho=1;e>=s,a-=s,Hu=1<<32-Ul(t)+a|r<H?(z=V,V=null):z=V.sibling;var Y=x(E,V,B[H],U);if(Y===null){V===null&&(V=z);break}e&&V&&Y.alternate===null&&t(E,V),A=o(Y,A,H),K===null?L=Y:K.sibling=Y,K=Y,V=z}if(H===B.length)return r(E,V),$o&&$d(E,H),L;if(V===null){for(;HH?(z=V,V=null):z=V.sibling;var oe=x(E,V,Y.value,U);if(oe===null){V===null&&(V=z);break}e&&V&&oe.alternate===null&&t(E,V),A=o(oe,A,H),K===null?L=oe:K.sibling=oe,K=oe,V=z}if(Y.done)return r(E,V),$o&&$d(E,H),L;if(V===null){for(;!Y.done;H++,Y=B.next())Y=g(E,Y.value,U),Y!==null&&(A=o(Y,A,H),K===null?L=Y:K.sibling=Y,K=Y);return $o&&$d(E,H),L}for(V=i(E,V);!Y.done;H++,Y=B.next())Y=w(V,E,H,Y.value,U),Y!==null&&(e&&Y.alternate!==null&&V.delete(Y.key===null?H:Y.key),A=o(Y,A,H),K===null?L=Y:K.sibling=Y,K=Y);return e&&V.forEach(function(q){return t(E,q)}),$o&&$d(E,H),L}function _(E,A,B,U){if(typeof B=="object"&&B!==null&&B.type===Tp&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case Ey:e:{for(var L=B.key,K=A;K!==null;){if(K.key===L){if(L=B.type,L===Tp){if(K.tag===7){r(E,K.sibling),A=a(K,B.props.children),A.return=E,E=A;break e}}else if(K.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Tc&&O8(L)===K.type){r(E,K.sibling),A=a(K,B.props),A.ref=mg(E,K,B),A.return=E,E=A;break e}r(E,K);break}else t(E,K);K=K.sibling}B.type===Tp?(A=rf(B.props.children,E.mode,U,B.key),A.return=E,E=A):(U=Av(B.type,B.key,B.props,null,E.mode,U),U.ref=mg(E,A,B),U.return=E,E=U)}return s(E);case Ap:e:{for(K=B.key;A!==null;){if(A.key===K)if(A.tag===4&&A.stateNode.containerInfo===B.containerInfo&&A.stateNode.implementation===B.implementation){r(E,A.sibling),A=a(A,B.children||[]),A.return=E,E=A;break e}else{r(E,A);break}else t(E,A);A=A.sibling}A=Zx(B,E.mode,U),A.return=E,E=A}return s(E);case Tc:return K=B._init,_(E,A,K(B._payload),U)}if(tm(B))return v(E,A,B,U);if(dg(B))return y(E,A,B,U);Dy(E,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,A!==null&&A.tag===6?(r(E,A.sibling),A=a(A,B),A.return=E,E=A):(r(E,A),A=Xx(B,E.mode,U),A.return=E,E=A),s(E)):r(E,A)}return _}var ih=XO(!0),ZO=XO(!1),O0={},lu=wd(O0),qm=wd(O0),Km=wd(O0);function Zd(e){if(e===O0)throw Error(tn(174));return e}function E4(e,t){switch(To(Km,t),To(qm,e),To(lu,O0),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:L5(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=L5(t,e)}Do(lu),To(lu,t)}function oh(){Do(lu),Do(qm),Do(Km)}function JO(e){Zd(Km.current);var t=Zd(lu.current),r=L5(t,e.type);t!==r&&(To(qm,e),To(lu,r))}function k4(e){qm.current===e&&(Do(lu),Do(qm))}var Go=wd(0);function o1(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vx=[];function A4(){for(var e=0;er?r:4,e(!0);var i=qx.transition;qx.transition={};try{e(!1),t()}finally{ho=r,qx.transition=i}}function gB(){return pl().memoizedState}function sW(e,t,r){var i=Gc(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},mB(e))yB(t,r);else if(r=KO(e,t,r,i),r!==null){var a=as();Dl(r,e,i,a),vB(r,t,i)}}function lW(e,t,r){var i=Gc(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(mB(e))yB(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,r);if(a.hasEagerState=!0,a.eagerState=l,Ll(l,s)){var u=t.interleaved;u===null?(a.next=a,S4(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}r=KO(e,t,a,i),r!==null&&(a=as(),Dl(r,e,i,a),vB(r,t,i))}}function mB(e){var t=e.alternate;return e===Qo||t!==null&&t===Qo}function yB(e,t){mm=a1=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vB(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,u4(e,r)}}var s1={readContext:fl,useCallback:za,useContext:za,useEffect:za,useImperativeHandle:za,useInsertionEffect:za,useLayoutEffect:za,useMemo:za,useReducer:za,useRef:za,useState:za,useDebugValue:za,useDeferredValue:za,useTransition:za,useMutableSource:za,useSyncExternalStore:za,useId:za,unstable_isNewReconciler:!1},uW={readContext:fl,useCallback:function(e,t){return Zl().memoizedState=[e,t===void 0?null:t],e},useContext:fl,useEffect:U8,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Sv(4194308,4,cB.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Sv(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sv(4,2,e,t)},useMemo:function(e,t){var r=Zl();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Zl();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=sW.bind(null,Qo,e),[i.memoizedState,e]},useRef:function(e){var t=Zl();return e={current:e},t.memoizedState=e},useState:B8,useDebugValue:M4,useDeferredValue:function(e){return Zl().memoizedState=e},useTransition:function(){var e=B8(!1),t=e[0];return e=aW.bind(null,e[1]),Zl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Qo,a=Zl();if($o){if(r===void 0)throw Error(tn(407));r=r()}else{if(r=t(),Ta===null)throw Error(tn(349));(pf&30)!==0||rB(i,t,r)}a.memoizedState=r;var o={value:r,getSnapshot:t};return a.queue=o,U8(iB.bind(null,i,o,e),[e]),i.flags|=2048,Qm(9,nB.bind(null,i,o,r,t),void 0,null),r},useId:function(){var e=Zl(),t=Ta.identifierPrefix;if($o){var r=Wu,i=Hu;r=(i&~(1<<32-Ul(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Gm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=s.createElement(r,{is:i.is}):(e=s.createElement(r),r==="select"&&(s=e,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):e=s.createElementNS(e,r),e[nu]=t,e[Vm]=i,AB(e,t,!1,!1),t.stateNode=e;e:{switch(s=j5(r,i),r){case"dialog":Mo("cancel",e),Mo("close",e),a=i;break;case"iframe":case"object":case"embed":Mo("load",e),a=i;break;case"video":case"audio":for(a=0;ash&&(t.flags|=128,i=!0,yg(o,!1),t.lanes=4194304)}else{if(!i)if(e=o1(s),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),yg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!$o)return Ha(t),null}else 2*oa()-o.renderingStartTime>sh&&r!==1073741824&&(t.flags|=128,i=!0,yg(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(r=o.last,r!==null?r.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=oa(),t.sibling=null,r=Go.current,To(Go,i?r&1|2:r&1),t):(Ha(t),null);case 22:case 23:return N4(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Ms&1073741824)!==0&&(Ha(t),t.subtreeFlags&6&&(t.flags|=8192)):Ha(t),null;case 24:return null;case 25:return null}throw Error(tn(156,t.tag))}function yW(e,t){switch(v4(t),t.tag){case 1:return vs(t.type)&&Zv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oh(),Do(ys),Do(Za),A4(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return k4(t),null;case 13:if(Do(Go),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(tn(340));nh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Do(Go),null;case 4:return oh(),null;case 10:return _4(t.type._context),null;case 22:case 23:return N4(),null;case 24:return null;default:return null}}var Ny=!1,Ka=!1,vW=typeof WeakSet=="function"?WeakSet:Set,Un=null;function Lp(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){ea(e,t,i)}else r.current=null}function f3(e,t,r){try{r()}catch(i){ea(e,t,i)}}var W8=!1;function bW(e,t){if(Y5=Gv,e=OO(),m4(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,c=0,d=0,g=e,x=null;t:for(;;){for(var w;g!==r||a!==0&&g.nodeType!==3||(l=s+a),g!==o||i!==0&&g.nodeType!==3||(u=s+i),g.nodeType===3&&(s+=g.nodeValue.length),(w=g.firstChild)!==null;)x=g,g=w;for(;;){if(g===e)break t;if(x===r&&++c===a&&(l=s),x===o&&++d===i&&(u=s),(w=g.nextSibling)!==null)break;g=x,x=g.parentNode}g=w}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Q5={focusedElem:e,selectionRange:r},Gv=!1,Un=t;Un!==null;)if(t=Un,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Un=e;else for(;Un!==null;){t=Un;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,_=v.memoizedState,E=t.stateNode,A=E.getSnapshotBeforeUpdate(t.elementType===t.type?y:Cl(t.type,y),_);E.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var B=t.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(tn(163))}}catch(U){ea(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,Un=e;break}Un=t.return}return v=W8,W8=!1,v}function ym(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&f3(t,r,o)}a=a.next}while(a!==i)}}function bb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function p3(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function RB(e){var t=e.alternate;t!==null&&(e.alternate=null,RB(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nu],delete t[Vm],delete t[J5],delete t[tW],delete t[rW])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function PB(e){return e.tag===5||e.tag===3||e.tag===4}function V8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||PB(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function h3(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Xv));else if(i!==4&&(e=e.child,e!==null))for(h3(e,t,r),e=e.sibling;e!==null;)h3(e,t,r),e=e.sibling}function g3(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(g3(e,t,r),e=e.sibling;e!==null;)g3(e,t,r),e=e.sibling}var Pa=null,El=!1;function Sc(e,t,r){for(r=r.child;r!==null;)MB(e,t,r),r=r.sibling}function MB(e,t,r){if(su&&typeof su.onCommitFiberUnmount=="function")try{su.onCommitFiberUnmount(db,r)}catch{}switch(r.tag){case 5:Ka||Lp(r,t);case 6:var i=Pa,a=El;Pa=null,Sc(e,t,r),Pa=i,El=a,Pa!==null&&(El?(e=Pa,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pa.removeChild(r.stateNode));break;case 18:Pa!==null&&(El?(e=Pa,r=r.stateNode,e.nodeType===8?Hx(e.parentNode,r):e.nodeType===1&&Hx(e,r),$m(e)):Hx(Pa,r.stateNode));break;case 4:i=Pa,a=El,Pa=r.stateNode.containerInfo,El=!0,Sc(e,t,r),Pa=i,El=a;break;case 0:case 11:case 14:case 15:if(!Ka&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var o=a,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&f3(r,t,s),a=a.next}while(a!==i)}Sc(e,t,r);break;case 1:if(!Ka&&(Lp(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(l){ea(r,t,l)}Sc(e,t,r);break;case 21:Sc(e,t,r);break;case 22:r.mode&1?(Ka=(i=Ka)||r.memoizedState!==null,Sc(e,t,r),Ka=i):Sc(e,t,r);break;default:Sc(e,t,r)}}function q8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new vW),t.forEach(function(i){var a=TW.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function _l(e,t){var r=t.deletions;if(r!==null)for(var i=0;ia&&(a=s),i&=~o}if(i=a,i=oa()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*xW(i/1960))-i,10e?16:e,Dc===null)var i=!1;else{if(e=Dc,Dc=null,c1=0,(Wi&6)!==0)throw Error(tn(331));var a=Wi;for(Wi|=4,Un=e.current;Un!==null;){var o=Un,s=o.child;if((Un.flags&16)!==0){var l=o.deletions;if(l!==null){for(var u=0;uoa()-D4?tf(e,0):U4|=r),bs(e,t)}function $B(e,t){t===0&&((e.mode&1)===0?t=1:(t=Iy,Iy<<=1,(Iy&130023424)===0&&(Iy=4194304)));var r=as();e=tc(e,t),e!==null&&(R0(e,t,r),bs(e,r))}function AW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),$B(e,r)}function TW(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(tn(314))}i!==null&&i.delete(t),$B(e,r)}var FB;FB=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ys.current)ms=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return ms=!1,gW(e,t,r);ms=(e.flags&131072)!==0}else ms=!1,$o&&(t.flags&1048576)!==0&&WO(t,t1,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Cv(e,t),e=t.pendingProps;var a=rh(t,Za.current);Gp(t,r),a=I4(null,t,i,e,a,r);var o=R4();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vs(i)?(o=!0,Jv(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,C4(t),a.updater=yb,t.stateNode=a,a._reactInternals=t,o3(t,i,e,r),t=l3(null,t,i,!0,o,r)):(t.tag=0,$o&&o&&y4(t),rs(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Cv(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=RW(i),e=Cl(i,e),a){case 0:t=s3(null,t,i,e,r);break e;case 1:t=F8(null,t,i,e,r);break e;case 11:t=j8(null,t,i,e,r);break e;case 14:t=$8(null,t,i,Cl(i.type,e),r);break e}throw Error(tn(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cl(i,a),s3(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cl(i,a),F8(e,t,i,a,r);case 3:e:{if(CB(t),e===null)throw Error(tn(387));i=t.pendingProps,o=t.memoizedState,a=o.element,GO(e,t),i1(t,i,null,r);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=ah(Error(tn(423)),t),t=z8(e,t,i,r,a);break e}else if(i!==a){a=ah(Error(tn(424)),t),t=z8(e,t,i,r,a);break e}else for(Bs=Vc(t.stateNode.containerInfo.firstChild),Ds=t,$o=!0,Al=null,r=ZO(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(nh(),i===a){t=rc(e,t,r);break e}rs(e,t,i,r)}t=t.child}return t;case 5:return JO(t),e===null&&r3(t),i=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,s=a.children,X5(i,a)?s=null:o!==null&&X5(i,o)&&(t.flags|=32),SB(e,t),rs(e,t,s,r),t.child;case 6:return e===null&&r3(t),null;case 13:return EB(e,t,r);case 4:return E4(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ih(t,null,i,r):rs(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cl(i,a),j8(e,t,i,a,r);case 7:return rs(e,t,t.pendingProps,r),t.child;case 8:return rs(e,t,t.pendingProps.children,r),t.child;case 12:return rs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,To(r1,i._currentValue),i._currentValue=s,o!==null)if(Ll(o.value,s)){if(o.children===a.children&&!ys.current){t=rc(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===i){if(o.tag===1){u=qu(-1,r&-r),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),n3(o.return,r,t),l.lanes|=r;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(tn(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),n3(s,r,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}rs(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Gp(t,r),a=fl(a),i=i(a),t.flags|=1,rs(e,t,i,r),t.child;case 14:return i=t.type,a=Cl(i,t.pendingProps),a=Cl(i.type,a),$8(e,t,i,a,r);case 15:return xB(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cl(i,a),Cv(e,t),t.tag=1,vs(i)?(e=!0,Jv(t)):e=!1,Gp(t,r),QO(t,i,a),o3(t,i,a,r),l3(null,t,i,!0,e,r);case 19:return kB(e,t,r);case 22:return _B(e,t,r)}throw Error(tn(156,t.tag))};function zB(e,t){return hO(e,t)}function IW(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ol(e,t,r,i){return new IW(e,t,r,i)}function $4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RW(e){if(typeof e=="function")return $4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===o4)return 11;if(e===a4)return 14}return 2}function Yc(e,t){var r=e.alternate;return r===null?(r=ol(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Av(e,t,r,i,a,o){var s=2;if(i=e,typeof e=="function")$4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Tp:return rf(r.children,a,o,t);case i4:s=8,a|=8;break;case I5:return e=ol(12,r,t,a|2),e.elementType=I5,e.lanes=o,e;case R5:return e=ol(13,r,t,a),e.elementType=R5,e.lanes=o,e;case P5:return e=ol(19,r,t,a),e.elementType=P5,e.lanes=o,e;case XM:return xb(r,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case YM:s=10;break e;case QM:s=9;break e;case o4:s=11;break e;case a4:s=14;break e;case Tc:s=16,i=null;break e}throw Error(tn(130,e==null?e:typeof e,""))}return t=ol(s,r,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function rf(e,t,r,i){return e=ol(7,e,i,t),e.lanes=r,e}function xb(e,t,r,i){return e=ol(22,e,i,t),e.elementType=XM,e.lanes=r,e.stateNode={isHidden:!1},e}function Xx(e,t,r){return e=ol(6,e,null,t),e.lanes=r,e}function Zx(e,t,r){return t=ol(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PW(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mx(0),this.expirationTimes=Mx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mx(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function F4(e,t,r,i,a,o,s,l,u){return e=new PW(e,t,r,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ol(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},C4(o),e}function MW(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}t(),e.exports=Hs})(il);const Fy=sb(il.exports);var V4={exports:{}},qB={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var lh=Z.exports;function LW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var NW=typeof Object.is=="function"?Object.is:LW,jW=lh.useState,$W=lh.useEffect,FW=lh.useLayoutEffect,zW=lh.useDebugValue;function HW(e,t){var r=t(),i=jW({inst:{value:r,getSnapshot:t}}),a=i[0].inst,o=i[1];return FW(function(){a.value=r,a.getSnapshot=t,Jx(a)&&o({inst:a})},[e,r,t]),$W(function(){return Jx(a)&&o({inst:a}),e(function(){Jx(a)&&o({inst:a})})},[e]),zW(r),r}function Jx(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!NW(e,r)}catch{return!0}}function WW(e,t){return t()}var VW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WW:HW;qB.useSyncExternalStore=lh.useSyncExternalStore!==void 0?lh.useSyncExternalStore:VW;(function(e){e.exports=qB})(V4);const q4=V4.exports.useSyncExternalStore;var kb={exports:{}},Ab={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var qW=Z.exports,KW=Symbol.for("react.element"),GW=Symbol.for("react.fragment"),YW=Object.prototype.hasOwnProperty,QW=qW.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XW={key:!0,ref:!0,__self:!0,__source:!0};function KB(e,t,r){var i,a={},o=null,s=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(i in t)YW.call(t,i)&&!XW.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)a[i]===void 0&&(a[i]=t[i]);return{$$typeof:KW,type:e,key:o,ref:s,props:a,_owner:QW.current}}Ab.Fragment=GW;Ab.jsx=KB;Ab.jsxs=KB;(function(e){e.exports=Ab})(kb);const Eo=kb.exports.Fragment,N=kb.exports.jsx,Bt=kb.exports.jsxs,ZW=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Eo,jsx:N,jsxs:Bt},Symbol.toStringTag,{value:"Module"})),eA=Z.exports.createContext(void 0),GB=Z.exports.createContext(!1);function YB(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=eA),window.ReactQueryClientContext):eA)}const Tb=({context:e}={})=>{const t=Z.exports.useContext(YB(e,Z.exports.useContext(GB)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},JW=({client:e,children:t,context:r,contextSharing:i=!1})=>{Z.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const a=YB(r,i);return N(GB.Provider,{value:!r&&i,children:N(a.Provider,{value:e,children:t})})},QB=Z.exports.createContext(!1),eV=()=>Z.exports.useContext(QB);QB.Provider;function tV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const rV=Z.exports.createContext(tV()),nV=()=>Z.exports.useContext(rV);function XB(e,t){return typeof e=="function"?e(...t):!!e}const iV=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},oV=e=>{Z.exports.useEffect(()=>{e.clearReset()},[e])},aV=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:i})=>e.isError&&!t.isReset()&&!e.isFetching&&XB(r,[e.error,i]),sV=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},lV=(e,t)=>e.isLoading&&e.isFetching&&!t,uV=(e,t,r)=>e?.suspense&&lV(t,r),cV=(e,t,r)=>t.fetchOptimistic(e).then(({data:i})=>{e.onSuccess==null||e.onSuccess(i),e.onSettled==null||e.onSettled(i,null)}).catch(i=>{r.clearReset(),e.onError==null||e.onError(i),e.onSettled==null||e.onSettled(void 0,i)});function dV(e,t){const r=Tb({context:e.context}),i=eV(),a=nV(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",o.onError&&(o.onError=Yo.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Yo.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Yo.batchCalls(o.onSettled)),sV(o),iV(o,a),oV(a);const[s]=Z.exports.useState(()=>new t(r,o)),l=s.getOptimisticResult(o);if(q4(Z.exports.useCallback(u=>i?()=>{}:s.subscribe(Yo.batchCalls(u)),[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),Z.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),uV(o,l,i))throw cV(o,s,a);if(aV({result:l,errorResetBoundary:a,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function nc(e,t,r){const i=Jg(e,t,r);return dV(i,yz)}function fV(e,t,r){const[i,a={}]=nz(e,t,r),o=Tb({context:a.context}),s=o.getMutationCache();return q4(Z.exports.useCallback(l=>s.subscribe(Yo.batchCalls(l)),[s]),()=>o.isMutating(i),()=>o.isMutating(i))}function ZB(e,t,r){const i=rz(e,t,r),a=Tb({context:i.context}),[o]=Z.exports.useState(()=>new bz(a,i));Z.exports.useEffect(()=>{o.setOptions(i)},[o,i]);const s=q4(Z.exports.useCallback(u=>o.subscribe(Yo.batchCalls(u)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=Z.exports.useCallback((u,c)=>{o.mutate(u,c).catch(pV)},[o]);if(s.error&&XB(o.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}function pV(){}var w3={},tA=il.exports;w3.createRoot=tA.createRoot,w3.hydrateRoot=tA.hydrateRoot;/** - * @remix-run/router v1.2.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function p1(){return p1=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function gV(){return Math.random().toString(36).substr(2,8)}function nA(e){return{usr:e.state,key:e.key}}function x3(e,t,r,i){return r===void 0&&(r=null),p1({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Mh(t):t,{state:r,key:t&&t.key||i||gV()})}function K4(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Mh(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function mV(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,r=typeof e=="string"?e:K4(e);return Ia(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}function yV(e,t,r,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:o=!1}=i,s=a.history,l=Lc.Pop,u=null;function c(){l=Lc.Pop,u&&u({action:l,location:x.location})}function d(w,v){l=Lc.Push;let y=x3(x.location,w,v);r&&r(y,w);let _=nA(y),E=x.createHref(y);try{s.pushState(_,"",E)}catch{a.location.assign(E)}o&&u&&u({action:l,location:x.location})}function g(w,v){l=Lc.Replace;let y=x3(x.location,w,v);r&&r(y,w);let _=nA(y),E=x.createHref(y);s.replaceState(_,"",E),o&&u&&u({action:l,location:x.location})}let x={get action(){return l},get location(){return e(a,s)},listen(w){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(rA,c),u=w,()=>{a.removeEventListener(rA,c),u=null}},createHref(w){return t(a,w)},encodeLocation(w){let v=mV(typeof w=="string"?w:K4(w));return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:g,go(w){return s.go(w)}};return x}var iA;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(iA||(iA={}));function vV(e,t,r){r===void 0&&(r="/");let i=typeof t=="string"?Mh(t):t,a=t9(i.pathname||"/",r);if(a==null)return null;let o=JB(e);bV(o);let s=null;for(let l=0;s==null&&l{let u={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(Ia(u.relativePath.startsWith(i),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(i.length));let c=nf([i,u.relativePath]),d=r.concat(u);o.children&&o.children.length>0&&(Ia(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),JB(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:kV(c,o.index),routesMeta:d})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,s);else for(let u of e9(o.path))a(o,s,u)}),t}function e9(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(i.length===0)return a?[o,""]:[o];let s=e9(i.join("/")),l=[];return l.push(...s.map(u=>u===""?o:[o,u].join("/"))),a&&l.push(...s),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function bV(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:AV(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const wV=/^:\w+$/,xV=3,_V=2,SV=1,CV=10,EV=-2,oA=e=>e==="*";function kV(e,t){let r=e.split("/"),i=r.length;return r.some(oA)&&(i+=EV),t&&(i+=_V),r.filter(a=>!oA(a)).reduce((a,o)=>a+(wV.test(o)?xV:o===""?SV:CV),i)}function AV(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function TV(e,t){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s{if(d==="*"){let x=l[g]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}return c[d]=MV(l[g]||"",d),c},{}),pathname:o,pathnameBase:s,pattern:e}}function RV(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),G4(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(i.push(l),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function PV(e){try{return decodeURI(e)}catch(t){return G4(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function MV(e,t){try{return decodeURIComponent(e)}catch(r){return G4(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function t9(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function G4(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function OV(e,t){t===void 0&&(t="/");let{pathname:r,search:i="",hash:a=""}=typeof e=="string"?Mh(e):e;return{pathname:r?r.startsWith("/")?r:BV(r,t):t,search:NV(i),hash:jV(a)}}function BV(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function e_(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function UV(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function DV(e,t,r,i){i===void 0&&(i=!1);let a;typeof e=="string"?a=Mh(e):(a=p1({},e),Ia(!a.pathname||!a.pathname.includes("?"),e_("?","pathname","search",a)),Ia(!a.pathname||!a.pathname.includes("#"),e_("#","pathname","hash",a)),Ia(!a.search||!a.search.includes("#"),e_("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,l;if(i||s==null)l=r;else{let g=t.length-1;if(s.startsWith("..")){let x=s.split("/");for(;x[0]==="..";)x.shift(),g-=1;a.pathname=x.join("/")}l=g>=0?t[g]:"/"}let u=OV(a,l),c=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const nf=e=>e.join("/").replace(/\/\/+/g,"/"),LV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),NV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class $V{constructor(t,r,i,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function FV(e){return e instanceof $V}const zV=["post","put","patch","delete"];[...zV];/** - * React Router v6.6.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.value=i,a.getSnapshot=t,t_(a)&&o({inst:a})},[e,i,t]),qV(()=>(t_(a)&&o({inst:a}),e(()=>{t_(a)&&o({inst:a})})),[e]),GV(i),i}function t_(e){const t=e.getSnapshot,r=e.value;try{const i=t();return!WV(r,i)}catch{return!0}}function QV(e,t,r){return t()}const XV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZV=!XV,JV=ZV?QV:YV;"useSyncExternalStore"in cf&&(e=>e.useSyncExternalStore)(cf);const r9=Z.exports.createContext(null),n9=Z.exports.createContext(null),Y4=Z.exports.createContext(null),Ib=Z.exports.createContext(null),Oh=Z.exports.createContext({outlet:null,matches:[]}),i9=Z.exports.createContext(null);function Rb(){return Z.exports.useContext(Ib)!=null}function B0(){return Rb()||Ia(!1),Z.exports.useContext(Ib).location}function Q4(){Rb()||Ia(!1);let{basename:e,navigator:t}=Z.exports.useContext(Y4),{matches:r}=Z.exports.useContext(Oh),{pathname:i}=B0(),a=JSON.stringify(UV(r).map(l=>l.pathnameBase)),o=Z.exports.useRef(!1);return Z.exports.useEffect(()=>{o.current=!0}),Z.exports.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){t.go(l);return}let c=DV(l,JSON.parse(a),i,u.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:nf([e,c.pathname])),(u.replace?t.replace:t.push)(c,u.state,u)},[e,t,a,i])}function o9(){let{matches:e}=Z.exports.useContext(Oh),t=e[e.length-1];return t?t.params:{}}function eq(e,t){Rb()||Ia(!1);let{navigator:r}=Z.exports.useContext(Y4),i=Z.exports.useContext(n9),{matches:a}=Z.exports.useContext(Oh),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=B0(),c;if(t){var d;let y=typeof t=="string"?Mh(t):t;l==="/"||((d=y.pathname)==null?void 0:d.startsWith(l))||Ia(!1),c=y}else c=u;let g=c.pathname||"/",x=l==="/"?g:g.slice(l.length)||"/",w=vV(e,{pathname:x}),v=iq(w&&w.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:nf([l,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:nf([l,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,i||void 0);return t&&v?N(Ib.Provider,{value:{location:_3({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Lc.Pop},children:v}):v}function tq(){let e=lq(),t=FV(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i};return Bt(Eo,{children:[N("h2",{children:"Unhandled Thrown Error!"}),N("h3",{style:{fontStyle:"italic"},children:t}),r?N("pre",{style:a,children:r}):null,N("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),Bt("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",N("code",{style:o,children:"errorElement"})," props on\xA0",N("code",{style:o,children:""})]})]})}class rq extends Z.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?N(Oh.Provider,{value:this.props.routeContext,children:N(i9.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function nq(e){let{routeContext:t,match:r,children:i}=e,a=Z.exports.useContext(r9);return a&&a.static&&a.staticContext&&r.route.errorElement&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),N(Oh.Provider,{value:t,children:i})}function iq(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let i=e,a=r?.errors;if(a!=null){let o=i.findIndex(s=>s.route.id&&a?.[s.route.id]);o>=0||Ia(!1),i=i.slice(0,Math.min(i.length,o+1))}return i.reduceRight((o,s,l)=>{let u=s.route.id?a?.[s.route.id]:null,c=r?s.route.errorElement||N(tq,{}):null,d=t.concat(i.slice(0,l+1)),g=()=>N(nq,{match:s,routeContext:{outlet:o,matches:d},children:u?c:s.route.element!==void 0?s.route.element:o});return r&&(s.route.errorElement||l===0)?N(rq,{location:r.location,component:c,error:u,children:g(),routeContext:{outlet:null,matches:d}}):g()},null)}var aA;(function(e){e.UseRevalidator="useRevalidator"})(aA||(aA={}));var h1;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(h1||(h1={}));function oq(e){let t=Z.exports.useContext(n9);return t||Ia(!1),t}function aq(e){let t=Z.exports.useContext(Oh);return t||Ia(!1),t}function sq(e){let t=aq(),r=t.matches[t.matches.length-1];return r.route.id||Ia(!1),r.route.id}function lq(){var e;let t=Z.exports.useContext(i9),r=oq(h1.UseRouteError),i=sq(h1.UseRouteError);return t||((e=r.errors)==null?void 0:e[i])}function Sp(e){Ia(!1)}function uq(e){let{basename:t="/",children:r=null,location:i,navigationType:a=Lc.Pop,navigator:o,static:s=!1}=e;Rb()&&Ia(!1);let l=t.replace(/^\/*/,"/"),u=Z.exports.useMemo(()=>({basename:l,navigator:o,static:s}),[l,o,s]);typeof i=="string"&&(i=Mh(i));let{pathname:c="/",search:d="",hash:g="",state:x=null,key:w="default"}=i,v=Z.exports.useMemo(()=>{let y=t9(c,l);return y==null?null:{pathname:y,search:d,hash:g,state:x,key:w}},[l,c,d,g,x,w]);return v==null?null:N(Y4.Provider,{value:u,children:N(Ib.Provider,{children:r,value:{location:v,navigationType:a}})})}function cq(e){let{children:t,location:r}=e,i=Z.exports.useContext(r9),a=i&&!t?i.router.routes:S3(t);return eq(a,r)}var sA;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(sA||(sA={}));new Promise(()=>{});function S3(e,t){t===void 0&&(t=[]);let r=[];return Z.exports.Children.forEach(e,(i,a)=>{if(!Z.exports.isValidElement(i))return;if(i.type===Z.exports.Fragment){r.push.apply(r,S3(i.props.children,t));return}i.type!==Sp&&Ia(!1),!i.props.index||!i.props.children||Ia(!1);let o=[...t,a],s={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,hasErrorBoundary:i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle};i.props.children&&(s.children=S3(i.props.children,o)),r.push(s)}),r}/** - * React Router DOM v6.6.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function C3(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(a=>[r,a]):[[r,i]])},[]))}function dq(e,t){let r=C3(e);for(let i of t.keys())r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)});return r}function fq(e){let{basename:t,children:r,window:i}=e,a=Z.exports.useRef();a.current==null&&(a.current=hV({window:i,v5Compat:!0}));let o=a.current,[s,l]=Z.exports.useState({action:o.action,location:o.location});return Z.exports.useLayoutEffect(()=>o.listen(l),[o]),N(uq,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o})}var lA;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(lA||(lA={}));var uA;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uA||(uA={}));function Pb(e){let t=Z.exports.useRef(C3(e)),r=B0(),i=Z.exports.useMemo(()=>dq(r.search,t.current),[r.search]),a=Q4(),o=Z.exports.useCallback((s,l)=>{const u=C3(typeof s=="function"?s(i):s);a("?"+u,l)},[a,i]);return[i,o]}const Mb="/assets/icon.136020fa.svg",X4="/assets/github-dark.aac0d47c.svg";function Ue(){return Ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=a9(e[r])}),t}function ll(e,t,r={clone:!0}){const i=r.clone?Ue({},e):e;return Vd(e)&&Vd(t)&&Object.keys(t).forEach(a=>{a!=="__proto__"&&(Vd(t[a])&&a in e&&Vd(e[a])?i[a]=ll(e[a],t[a],r):r.clone?i[a]=Vd(t[a])?a9(t[a]):t[a]:i[a]=t[a])}),i}var _o={exports:{}},pq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hq=pq,gq=hq;function s9(){}function l9(){}l9.resetWarningCache=s9;var mq=function(){function e(i,a,o,s,l,u){if(u!==gq){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l9,resetWarningCache:s9};return r.PropTypes=r,r};_o.exports=mq();function sd(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rr==null?t:function(...a){t.apply(this,a),r.apply(this,a)},()=>{})}function mf(e,t=166){let r;function i(...a){const o=()=>{e.apply(this,a)};clearTimeout(r),r=setTimeout(o,t)}return i.clear=()=>{clearTimeout(r)},i}function wq(e,t){return()=>null}function Tv(e,t){return Z.exports.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function pa(e){return e&&e.ownerDocument||document}function hl(e){return pa(e).defaultView||window}function xq(e,t){return()=>null}function g1(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const _q=typeof window<"u"?Z.exports.useLayoutEffect:Z.exports.useEffect,Nl=_q;let cA=0;function Sq(e){const[t,r]=Z.exports.useState(e),i=e||t;return Z.exports.useEffect(()=>{t==null&&(cA+=1,r(`mui-${cA}`))},[t]),i}const dA=cf["useId"];function Hb(e){if(dA!==void 0){const t=dA();return e??t}return Sq(e)}function Cq(e,t,r,i,a){return null}function Zm({controlled:e,default:t,name:r,state:i="value"}){const{current:a}=Z.exports.useRef(e!==void 0),[o,s]=Z.exports.useState(t),l=a?e:o,u=Z.exports.useCallback(c=>{a||s(c)},[]);return[l,u]}function al(e){const t=Z.exports.useRef(e);return Nl(()=>{t.current=e}),Z.exports.useCallback((...r)=>(0,t.current)(...r),[])}function zo(...e){return Z.exports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{g1(r,t)})},e)}let Wb=!0,k3=!1,fA;const Eq={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function kq(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&Eq[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Aq(e){e.metaKey||e.altKey||e.ctrlKey||(Wb=!0)}function r_(){Wb=!1}function Tq(){this.visibilityState==="hidden"&&k3&&(Wb=!0)}function Iq(e){e.addEventListener("keydown",Aq,!0),e.addEventListener("mousedown",r_,!0),e.addEventListener("pointerdown",r_,!0),e.addEventListener("touchstart",r_,!0),e.addEventListener("visibilitychange",Tq,!0)}function Rq(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Wb||kq(t)}function Vb(){const e=Z.exports.useCallback(a=>{a!=null&&Iq(a.ownerDocument)},[]),t=Z.exports.useRef(!1);function r(){return t.current?(k3=!0,window.clearTimeout(fA),fA=window.setTimeout(()=>{k3=!1},100),t.current=!1,!0):!1}function i(a){return Rq(a)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:i,onBlur:r,ref:e}}function c9(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let up;function d9(){if(up)return up;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),up="reverse",e.scrollLeft>0?up="default":(e.scrollLeft=1,e.scrollLeft===0&&(up="negative")),document.body.removeChild(e),up}function pA(e,t){const r=e.scrollLeft;if(t!=="rtl")return r;switch(d9()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function eC(e,t){const r=Ue({},t);return Object.keys(e).forEach(i=>{if(i.toString().match(/^(components|slots)$/))r[i]=Ue({},e[i],r[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=e[i]||{},o=t[i];r[i]={},!o||!Object.keys(o)?r[i]=a:!a||!Object.keys(a)?r[i]=o:(r[i]=Ue({},o),Object.keys(a).forEach(s=>{r[i][s]=eC(a[s],o[s])}))}else r[i]===void 0&&(r[i]=e[i])}),r}function ci(e,t,r){const i={};return Object.keys(e).forEach(a=>{i[a]=e[a].reduce((o,s)=>(s&&(o.push(t(s)),r&&r[s]&&o.push(r[s])),o),[]).join(" ")}),i}const hA=e=>e,Pq=()=>{let e=hA;return{configure(t){e=t},generate(t){return e(t)},reset(){e=hA}}},Mq=Pq(),tC=Mq,Oq={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function oi(e,t,r="Mui"){const i=Oq[t];return i?`${r}-${i}`:`${tC.generate(e)}-${t}`}function Xn(e,t,r="Mui"){const i={};return t.forEach(a=>{i[a]=oi(e,a,r)}),i}function vn(e,t){if(e==null)return{};var r={},i=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function f9(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Bq=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Uq=f9(function(e){return Bq.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Dq(e){if(e.sheet)return e.sheet;for(var t=0;t0?Oa(Bh,--_s):0,uh--,da===10&&(uh=1,Kb--),da}function Ls(){return da=_s2||e0(da)>3?"":" "}function Gq(e,t){for(;--t&&Ls()&&!(da<48||da>102||da>57&&da<65||da>70&&da<97););return U0(e,Iv()+(t<6&&uu()==32&&Ls()==32))}function T3(e){for(;Ls();)switch(da){case e:return _s;case 34:case 39:e!==34&&e!==39&&T3(da);break;case 40:e===41&&T3(e);break;case 92:Ls();break}return _s}function Yq(e,t){for(;Ls()&&e+da!==47+10;)if(e+da===42+42&&uu()===47)break;return"/*"+U0(t,_s-1)+"*"+qb(e===47?e:Ls())}function Qq(e){for(;!e0(uu());)Ls();return U0(e,_s)}function Xq(e){return v9(Pv("",null,null,null,[""],e=y9(e),0,[0],e))}function Pv(e,t,r,i,a,o,s,l,u){for(var c=0,d=0,g=s,x=0,w=0,v=0,y=1,_=1,E=1,A=0,B="",U=a,L=o,K=i,V=B;_;)switch(v=A,A=Ls()){case 40:if(v!=108&&Oa(V,g-1)==58){A3(V+=lo(Rv(A),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:V+=Rv(A);break;case 9:case 10:case 13:case 32:V+=Kq(v);break;case 92:V+=Gq(Iv()-1,7);continue;case 47:switch(uu()){case 42:case 47:zy(Zq(Yq(Ls(),Iv()),t,r),u);break;default:V+="/"}break;case 123*y:l[c++]=Jl(V)*E;case 125*y:case 59:case 0:switch(A){case 0:case 125:_=0;case 59+d:w>0&&Jl(V)-g&&zy(w>32?mA(V+";",i,r,g-1):mA(lo(V," ","")+";",i,r,g-2),u);break;case 59:V+=";";default:if(zy(K=gA(V,t,r,c,d,a,l,B,U=[],L=[],g),o),A===123)if(d===0)Pv(V,t,K,K,U,o,g,l,L);else switch(x===99&&Oa(V,3)===110?100:x){case 100:case 109:case 115:Pv(e,K,K,i&&zy(gA(e,K,K,0,0,a,l,B,a,U=[],g),L),a,L,g,l,i?U:L);break;default:Pv(V,K,K,K,[""],L,0,l,L)}}c=d=w=0,y=E=1,B=V="",g=s;break;case 58:g=1+Jl(V),w=v;default:if(y<1){if(A==123)--y;else if(A==125&&y++==0&&qq()==125)continue}switch(V+=qb(A),A*y){case 38:E=d>0?1:(V+="\f",-1);break;case 44:l[c++]=(Jl(V)-1)*E,E=1;break;case 64:uu()===45&&(V+=Rv(Ls())),x=uu(),d=g=Jl(B=V+=Qq(Iv())),A++;break;case 45:v===45&&Jl(V)==2&&(y=0)}}return o}function gA(e,t,r,i,a,o,s,l,u,c,d){for(var g=a-1,x=a===0?o:[""],w=iC(x),v=0,y=0,_=0;v0?x[E]+" "+A:lo(A,/&\f/g,x[E])))&&(u[_++]=B);return Gb(e,t,r,a===0?rC:l,u,c,d)}function Zq(e,t,r){return Gb(e,t,r,p9,qb(Vq()),Jm(e,2,-2),0)}function mA(e,t,r,i){return Gb(e,t,r,nC,Jm(e,0,i),Jm(e,i+1,-1),i)}function Qp(e,t){for(var r="",i=iC(e),a=0;a6)switch(Oa(e,t+1)){case 109:if(Oa(e,t+4)!==45)break;case 102:return lo(e,/(.+:)(.+)-([^]+)/,"$1"+no+"$2-$3$1"+m1+(Oa(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~A3(e,"stretch")?b9(lo(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Oa(e,t+1)!==115)break;case 6444:switch(Oa(e,Jl(e)-3-(~A3(e,"!important")&&10))){case 107:return lo(e,":",":"+no)+e;case 101:return lo(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+no+(Oa(e,14)===45?"inline-":"")+"box$3$1"+no+"$2$3$1"+Va+"$2box$3")+e}break;case 5936:switch(Oa(e,t+11)){case 114:return no+e+Va+lo(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return no+e+Va+lo(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return no+e+Va+lo(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return no+e+Va+e+e}return e}var sK=function(t,r,i,a){if(t.length>-1&&!t.return)switch(t.type){case nC:t.return=b9(t.value,t.length);break;case h9:return Qp([bg(t,{value:lo(t.value,"@","@"+no)})],a);case rC:if(t.length)return Wq(t.props,function(o){switch(Hq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Qp([bg(t,{props:[lo(o,/:(read-\w+)/,":"+m1+"$1")]})],a);case"::placeholder":return Qp([bg(t,{props:[lo(o,/:(plac\w+)/,":"+no+"input-$1")]}),bg(t,{props:[lo(o,/:(plac\w+)/,":"+m1+"$1")]}),bg(t,{props:[lo(o,/:(plac\w+)/,Va+"input-$1")]})],a)}return""})}},lK=[sK],uK=function(t){var r=t.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(y){var _=y.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var a=t.stylisPlugins||lK,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var _=y.getAttribute("data-emotion").split(" "),E=1;E<_.length;E++)o[_[E]]=!0;l.push(y)});var u,c=[oK,aK];{var d,g=[Jq,tK(function(y){d.insert(y)})],x=eK(c.concat(a,g)),w=function(_){return Qp(Xq(_),x)};u=function(_,E,A,B){d=A,w(_?_+"{"+E.styles+"}":E.styles),B&&(v.inserted[E.name]=!0)}}var v={key:r,sheet:new Nq({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:u};return v.sheet.hydrate(l),v},w9={exports:{}},mo={};/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ra=typeof Symbol=="function"&&Symbol.for,oC=Ra?Symbol.for("react.element"):60103,aC=Ra?Symbol.for("react.portal"):60106,Yb=Ra?Symbol.for("react.fragment"):60107,Qb=Ra?Symbol.for("react.strict_mode"):60108,Xb=Ra?Symbol.for("react.profiler"):60114,Zb=Ra?Symbol.for("react.provider"):60109,Jb=Ra?Symbol.for("react.context"):60110,sC=Ra?Symbol.for("react.async_mode"):60111,ew=Ra?Symbol.for("react.concurrent_mode"):60111,tw=Ra?Symbol.for("react.forward_ref"):60112,rw=Ra?Symbol.for("react.suspense"):60113,cK=Ra?Symbol.for("react.suspense_list"):60120,nw=Ra?Symbol.for("react.memo"):60115,iw=Ra?Symbol.for("react.lazy"):60116,dK=Ra?Symbol.for("react.block"):60121,fK=Ra?Symbol.for("react.fundamental"):60117,pK=Ra?Symbol.for("react.responder"):60118,hK=Ra?Symbol.for("react.scope"):60119;function Vs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case oC:switch(e=e.type,e){case sC:case ew:case Yb:case Xb:case Qb:case rw:return e;default:switch(e=e&&e.$$typeof,e){case Jb:case tw:case iw:case nw:case Zb:return e;default:return t}}case aC:return t}}}function x9(e){return Vs(e)===ew}mo.AsyncMode=sC;mo.ConcurrentMode=ew;mo.ContextConsumer=Jb;mo.ContextProvider=Zb;mo.Element=oC;mo.ForwardRef=tw;mo.Fragment=Yb;mo.Lazy=iw;mo.Memo=nw;mo.Portal=aC;mo.Profiler=Xb;mo.StrictMode=Qb;mo.Suspense=rw;mo.isAsyncMode=function(e){return x9(e)||Vs(e)===sC};mo.isConcurrentMode=x9;mo.isContextConsumer=function(e){return Vs(e)===Jb};mo.isContextProvider=function(e){return Vs(e)===Zb};mo.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===oC};mo.isForwardRef=function(e){return Vs(e)===tw};mo.isFragment=function(e){return Vs(e)===Yb};mo.isLazy=function(e){return Vs(e)===iw};mo.isMemo=function(e){return Vs(e)===nw};mo.isPortal=function(e){return Vs(e)===aC};mo.isProfiler=function(e){return Vs(e)===Xb};mo.isStrictMode=function(e){return Vs(e)===Qb};mo.isSuspense=function(e){return Vs(e)===rw};mo.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yb||e===ew||e===Xb||e===Qb||e===rw||e===cK||typeof e=="object"&&e!==null&&(e.$$typeof===iw||e.$$typeof===nw||e.$$typeof===Zb||e.$$typeof===Jb||e.$$typeof===tw||e.$$typeof===fK||e.$$typeof===pK||e.$$typeof===hK||e.$$typeof===dK)};mo.typeOf=Vs;(function(e){e.exports=mo})(w9);var _9=w9.exports,gK={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},mK={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},S9={};S9[_9.ForwardRef]=gK;S9[_9.Memo]=mK;var yK=!0;function vK(e,t,r){var i="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):i+=a+" "}),i}var C9=function(t,r,i){var a=t.key+"-"+r.name;(i===!1||yK===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},E9=function(t,r,i){C9(t,r,i);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function bK(e){for(var t=0,r,i=0,a=e.length;a>=4;++i,a-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var wK={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xK=/[A-Z]|^ms/g,_K=/_EMO_([^_]+?)_([^]*?)_EMO_/g,k9=function(t){return t.charCodeAt(1)===45},vA=function(t){return t!=null&&typeof t!="boolean"},n_=f9(function(e){return k9(e)?e:e.replace(xK,"-$&").toLowerCase()}),bA=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(_K,function(i,a,o){return eu={name:a,styles:o,next:eu},a})}return wK[t]!==1&&!k9(t)&&typeof r=="number"&&r!==0?r+"px":r};function t0(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return eu={name:r.name,styles:r.styles,next:eu},r.name;if(r.styles!==void 0){var i=r.next;if(i!==void 0)for(;i!==void 0;)eu={name:i.name,styles:i.styles,next:eu},i=i.next;var a=r.styles+";";return a}return SK(e,t,r)}case"function":{if(e!==void 0){var o=eu,s=r(e);return eu=o,t0(e,t,s)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function SK(e,t,r){var i="";if(Array.isArray(r))for(var a=0;a96?AK:TK},SA=function(t,r,i){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof a!="function"&&i&&(a=t.__emotion_forwardProp),a},IK=function(t){var r=t.cache,i=t.serialized,a=t.isStringTag;return C9(r,i,a),EK(function(){return E9(r,i,a)}),null},RK=function e(t,r){var i=t.__emotion_real===t,a=i&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var l=SA(t,r,i),u=l||_A(a),c=!u("as");return function(){var d=arguments,g=i&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)g.push.apply(g,d);else{g.push(d[0][0]);for(var x=d.length,w=1;wt(OK(a)?r:a):t})}/** - * @mui/styled-engine v5.11.11 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function R9(e,t){return MK(e,t)}const UK=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function wm(e,t){return t?ll(e,t,{clone:!1}):e}const cC={xs:0,sm:600,md:900,lg:1200,xl:1536},CA={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${cC[e]}px)`};function ic(e,t,r){const i=e.theme||{};if(Array.isArray(t)){const o=i.breakpoints||CA;return t.reduce((s,l,u)=>(s[o.up(o.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const o=i.breakpoints||CA;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||cC).indexOf(l)!==-1){const u=o.up(l);s[u]=r(t[l],l)}else{const u=l;s[u]=t[u]}return s},{})}return r(t)}function DK(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((i,a)=>{const o=e.up(a);return i[o]={},i},{}))||{}}function LK(e,t){return e.reduce((r,i)=>{const a=r[i];return(!a||Object.keys(a).length===0)&&delete r[i],r},t)}function ch(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const i=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(i!=null)return i}return t.split(".").reduce((i,a)=>i&&i[a]!=null?i[a]:null,e)}function y1(e,t,r,i=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||i:a=ch(e,r)||i,t&&(a=t(a,i,e)),a}function fo(e){const{prop:t,cssProperty:r=e.prop,themeKey:i,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],u=s.theme,c=ch(u,i)||{};return ic(s,l,g=>{let x=y1(c,a,g);return g===x&&typeof g=="string"&&(x=y1(c,a,`${t}${g==="default"?"":Xr(g)}`,g)),r===!1?x:{[r]:x}})};return o.propTypes={},o.filterProps=[t],o}function ow(...e){const t=e.reduce((i,a)=>(a.filterProps.forEach(o=>{i[o]=a}),i),{}),r=i=>Object.keys(i).reduce((a,o)=>t[o]?wm(a,t[o](i)):a,{});return r.propTypes={},r.filterProps=e.reduce((i,a)=>i.concat(a.filterProps),[]),r}function NK(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const jK={m:"margin",p:"padding"},$K={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},EA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},FK=NK(e=>{if(e.length>2)if(EA[e])e=EA[e];else return[e];const[t,r]=e.split(""),i=jK[t],a=$K[r]||"";return Array.isArray(a)?a.map(o=>i+o):[i+a]}),dC=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fC=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...dC,...fC];function D0(e,t,r,i){var a;const o=(a=ch(e,t,!1))!=null?a:r;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function P9(e){return D0(e,"spacing",8)}function L0(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),i=e(r);return t>=0?i:typeof i=="number"?-i:`-${i}`}function zK(e,t){return r=>e.reduce((i,a)=>(i[a]=L0(t,r),i),{})}function HK(e,t,r,i){if(t.indexOf(r)===-1)return null;const a=FK(r),o=zK(a,i),s=e[r];return ic(e,s,o)}function M9(e,t){const r=P9(e.theme);return Object.keys(e).map(i=>HK(e,t,i,r)).reduce(wm,{})}function Zo(e){return M9(e,dC)}Zo.propTypes={};Zo.filterProps=dC;function Jo(e){return M9(e,fC)}Jo.propTypes={};Jo.filterProps=fC;function iu(e){return typeof e!="number"?e:`${e}px solid`}const WK=fo({prop:"border",themeKey:"borders",transform:iu}),VK=fo({prop:"borderTop",themeKey:"borders",transform:iu}),qK=fo({prop:"borderRight",themeKey:"borders",transform:iu}),KK=fo({prop:"borderBottom",themeKey:"borders",transform:iu}),GK=fo({prop:"borderLeft",themeKey:"borders",transform:iu}),YK=fo({prop:"borderColor",themeKey:"palette"}),QK=fo({prop:"borderTopColor",themeKey:"palette"}),XK=fo({prop:"borderRightColor",themeKey:"palette"}),ZK=fo({prop:"borderBottomColor",themeKey:"palette"}),JK=fo({prop:"borderLeftColor",themeKey:"palette"}),aw=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=D0(e.theme,"shape.borderRadius",4),r=i=>({borderRadius:L0(t,i)});return ic(e,e.borderRadius,r)}return null};aw.propTypes={};aw.filterProps=["borderRadius"];ow(WK,VK,qK,KK,GK,YK,QK,XK,ZK,JK,aw);const sw=e=>{if(e.gap!==void 0&&e.gap!==null){const t=D0(e.theme,"spacing",8),r=i=>({gap:L0(t,i)});return ic(e,e.gap,r)}return null};sw.propTypes={};sw.filterProps=["gap"];const lw=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=D0(e.theme,"spacing",8),r=i=>({columnGap:L0(t,i)});return ic(e,e.columnGap,r)}return null};lw.propTypes={};lw.filterProps=["columnGap"];const uw=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=D0(e.theme,"spacing",8),r=i=>({rowGap:L0(t,i)});return ic(e,e.rowGap,r)}return null};uw.propTypes={};uw.filterProps=["rowGap"];const eG=fo({prop:"gridColumn"}),tG=fo({prop:"gridRow"}),rG=fo({prop:"gridAutoFlow"}),nG=fo({prop:"gridAutoColumns"}),iG=fo({prop:"gridAutoRows"}),oG=fo({prop:"gridTemplateColumns"}),aG=fo({prop:"gridTemplateRows"}),sG=fo({prop:"gridTemplateAreas"}),lG=fo({prop:"gridArea"});ow(sw,lw,uw,eG,tG,rG,nG,iG,oG,aG,sG,lG);function Xp(e,t){return t==="grey"?t:e}const uG=fo({prop:"color",themeKey:"palette",transform:Xp}),cG=fo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xp}),dG=fo({prop:"backgroundColor",themeKey:"palette",transform:Xp});ow(uG,cG,dG);function Os(e){return e<=1&&e!==0?`${e*100}%`:e}const fG=fo({prop:"width",transform:Os}),pC=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,o;return{maxWidth:((i=e.theme)==null||(a=i.breakpoints)==null||(o=a.values)==null?void 0:o[r])||cC[r]||Os(r)}};return ic(e,e.maxWidth,t)}return null};pC.filterProps=["maxWidth"];const pG=fo({prop:"minWidth",transform:Os}),hG=fo({prop:"height",transform:Os}),gG=fo({prop:"maxHeight",transform:Os}),mG=fo({prop:"minHeight",transform:Os});fo({prop:"size",cssProperty:"width",transform:Os});fo({prop:"size",cssProperty:"height",transform:Os});const yG=fo({prop:"boxSizing"});ow(fG,pC,pG,hG,gG,mG,yG);const vG={border:{themeKey:"borders",transform:iu},borderTop:{themeKey:"borders",transform:iu},borderRight:{themeKey:"borders",transform:iu},borderBottom:{themeKey:"borders",transform:iu},borderLeft:{themeKey:"borders",transform:iu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:aw},color:{themeKey:"palette",transform:Xp},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xp},backgroundColor:{themeKey:"palette",transform:Xp},p:{style:Jo},pt:{style:Jo},pr:{style:Jo},pb:{style:Jo},pl:{style:Jo},px:{style:Jo},py:{style:Jo},padding:{style:Jo},paddingTop:{style:Jo},paddingRight:{style:Jo},paddingBottom:{style:Jo},paddingLeft:{style:Jo},paddingX:{style:Jo},paddingY:{style:Jo},paddingInline:{style:Jo},paddingInlineStart:{style:Jo},paddingInlineEnd:{style:Jo},paddingBlock:{style:Jo},paddingBlockStart:{style:Jo},paddingBlockEnd:{style:Jo},m:{style:Zo},mt:{style:Zo},mr:{style:Zo},mb:{style:Zo},ml:{style:Zo},mx:{style:Zo},my:{style:Zo},margin:{style:Zo},marginTop:{style:Zo},marginRight:{style:Zo},marginBottom:{style:Zo},marginLeft:{style:Zo},marginX:{style:Zo},marginY:{style:Zo},marginInline:{style:Zo},marginInlineStart:{style:Zo},marginInlineEnd:{style:Zo},marginBlock:{style:Zo},marginBlockStart:{style:Zo},marginBlockEnd:{style:Zo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:sw},rowGap:{style:uw},columnGap:{style:lw},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Os},maxWidth:{style:pC},minWidth:{transform:Os},height:{transform:Os},maxHeight:{transform:Os},minHeight:{transform:Os},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},cw=vG;function bG(...e){const t=e.reduce((i,a)=>i.concat(Object.keys(a)),[]),r=new Set(t);return e.every(i=>r.size===Object.keys(i).length)}function wG(e,t){return typeof e=="function"?e(t):e}function xG(){function e(r,i,a,o){const s={[r]:i,theme:a},l=o[r];if(!l)return{[r]:i};const{cssProperty:u=r,themeKey:c,transform:d,style:g}=l;if(i==null)return null;const x=ch(a,c)||{};return g?g(s):ic(s,i,v=>{let y=y1(x,d,v);return v===y&&typeof v=="string"&&(y=y1(x,d,`${r}${v==="default"?"":Xr(v)}`,v)),u===!1?y:{[u]:y}})}function t(r){var i;const{sx:a,theme:o={}}=r||{};if(!a)return null;const s=(i=o.unstable_sxConfig)!=null?i:cw;function l(u){let c=u;if(typeof u=="function")c=u(o);else if(typeof u!="object")return u;if(!c)return null;const d=DK(o.breakpoints),g=Object.keys(d);let x=d;return Object.keys(c).forEach(w=>{const v=wG(c[w],o);if(v!=null)if(typeof v=="object")if(s[w])x=wm(x,e(w,v,o,s));else{const y=ic({theme:o},v,_=>({[w]:_}));bG(y,v)?x[w]=t({sx:v,theme:o}):x=wm(x,y)}else x=wm(x,e(w,v,o,s))}),LK(g,x)}return Array.isArray(a)?a.map(l):l(a)}return t}const O9=xG();O9.filterProps=["sx"];const dw=O9,_G=["sx"],SG=e=>{var t,r;const i={systemProps:{},otherProps:{}},a=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:cw;return Object.keys(e).forEach(o=>{a[o]?i.systemProps[o]=e[o]:i.otherProps[o]=e[o]}),i};function B9(e){const{sx:t}=e,r=vn(e,_G),{systemProps:i,otherProps:a}=SG(r);let o;return Array.isArray(t)?o=[i,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Vd(l)?Ue({},i,l):i}:o=Ue({},i,t),Ue({},a,{sx:o})}function U9(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,i)=>r.val-i.val),t.reduce((r,i)=>Ue({},r,{[i.key]:i.val}),{})};function kG(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,a=vn(e,CG),o=EG(t),s=Object.keys(o);function l(x){return`@media (min-width:${typeof t[x]=="number"?t[x]:x}${r})`}function u(x){return`@media (max-width:${(typeof t[x]=="number"?t[x]:x)-i/100}${r})`}function c(x,w){const v=s.indexOf(w);return`@media (min-width:${typeof t[x]=="number"?t[x]:x}${r}) and (max-width:${(v!==-1&&typeof t[s[v]]=="number"?t[s[v]]:w)-i/100}${r})`}function d(x){return s.indexOf(x)+1(i.length===0?[1]:i).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}const RG=["breakpoints","palette","spacing","shape"];function hC(e={},...t){const{breakpoints:r={},palette:i={},spacing:a,shape:o={}}=e,s=vn(e,RG),l=kG(r),u=IG(a);let c=ll({breakpoints:l,direction:"ltr",components:{},palette:Ue({mode:"light"},i),spacing:u,shape:Ue({},TG,o)},s);return c=t.reduce((d,g)=>ll(d,g),c),c.unstable_sxConfig=Ue({},cw,s?.unstable_sxConfig),c.unstable_sx=function(g){return dw({sx:g,theme:this})},c}const PG=Z.exports.createContext(null),D9=PG;function L9(){return Z.exports.useContext(D9)}const MG=typeof Symbol=="function"&&Symbol.for,OG=MG?Symbol.for("mui.nested"):"__THEME_NESTED__";function BG(e,t){return typeof t=="function"?t(e):Ue({},e,t)}function UG(e){const{children:t,theme:r}=e,i=L9(),a=Z.exports.useMemo(()=>{const o=i===null?r:BG(i,r);return o!=null&&(o[OG]=i!==null),o},[r,i]);return N(D9.Provider,{value:a,children:t})}function DG(e){return Object.keys(e).length===0}function gC(e=null){const t=L9();return!t||DG(t)?e:t}const LG=hC();function fw(e=LG){return gC(e)}const NG=["className","component"];function N9(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=R9("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(dw);return Z.exports.forwardRef(function(l,u){const c=fw(t),d=B9(l),{className:g,component:x="div"}=d,w=vn(d,NG);return N(a,Ue({as:x,ref:u,className:dn(g,i?i(r):r),theme:c},w))})}const jG=N9(),aa=jG,$G=["variant"];function kA(e){return e.length===0}function j9(e){const{variant:t}=e,r=vn(e,$G);let i=t||"";return Object.keys(r).sort().forEach(a=>{a==="color"?i+=kA(i)?e[a]:Xr(e[a]):i+=`${kA(i)?a:Xr(a)}${Xr(e[a].toString())}`}),i}const FG=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],zG=["theme"],HG=["theme"];function wg(e){return Object.keys(e).length===0}function WG(e){return typeof e=="string"&&e.charCodeAt(0)>96}const VG=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,qG=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const i={};return r.forEach(a=>{const o=j9(a.props);i[o]=a.style}),i},KG=(e,t,r,i)=>{var a,o;const{ownerState:s={}}=e,l=[],u=r==null||(a=r.components)==null||(o=a[i])==null?void 0:o.variants;return u&&u.forEach(c=>{let d=!0;Object.keys(c.props).forEach(g=>{s[g]!==c.props[g]&&e[g]!==c.props[g]&&(d=!1)}),d&&l.push(t[j9(c.props)])}),l};function xm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const GG=hC();function $9(e={}){const{defaultTheme:t=GG,rootShouldForwardProp:r=xm,slotShouldForwardProp:i=xm}=e,a=o=>{const s=wg(o.theme)?t:o.theme;return dw(Ue({},o,{theme:s}))};return a.__mui_systemSx=!0,(o,s={})=>{UK(o,B=>B.filter(U=>!(U!=null&&U.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:g}=s,x=vn(s,FG),w=c!==void 0?c:u&&u!=="Root"||!1,v=d||!1;let y,_=xm;u==="Root"?_=r:u?_=i:WG(o)&&(_=void 0);const E=R9(o,Ue({shouldForwardProp:_,label:y},x)),A=(B,...U)=>{const L=U?U.map(z=>typeof z=="function"&&z.__emotion_real!==z?Y=>{let{theme:oe}=Y,q=vn(Y,zG);return z(Ue({theme:wg(oe)?t:oe},q))}:z):[];let K=B;l&&g&&L.push(z=>{const Y=wg(z.theme)?t:z.theme,oe=VG(l,Y);if(oe){const q={};return Object.entries(oe).forEach(([ae,M])=>{q[ae]=typeof M=="function"?M(Ue({},z,{theme:Y})):M}),g(z,q)}return null}),l&&!w&&L.push(z=>{const Y=wg(z.theme)?t:z.theme;return KG(z,qG(l,Y),Y,l)}),v||L.push(a);const V=L.length-U.length;if(Array.isArray(B)&&V>0){const z=new Array(V).fill("");K=[...B,...z],K.raw=[...B.raw,...z]}else typeof B=="function"&&B.__emotion_real!==B&&(K=z=>{let{theme:Y}=z,oe=vn(z,HG);return B(Ue({theme:wg(Y)?t:Y},oe))});return E(K,...L)};return E.withConfig&&(A.withConfig=E.withConfig),A}}const YG=$9(),Qi=YG;function F9(e){const{theme:t,name:r,props:i}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?i:eC(t.components[r].defaultProps,i)}function QG({props:e,name:t,defaultTheme:r}){const i=fw(r);return F9({theme:i,name:t,props:e})}function mC(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function XG(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,a)=>a<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function yf(e){if(e.type)return e;if(e.charAt(0)==="#")return yf(XG(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(sd(9,e));let i=e.substring(t+1,e.length-1),a;if(r==="color"){if(i=i.split(" "),a=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a)===-1)throw new Error(sd(10,a))}else i=i.split(",");return i=i.map(o=>parseFloat(o)),{type:r,values:i,colorSpace:a}}function pw(e){const{type:t,colorSpace:r}=e;let{values:i}=e;return t.indexOf("rgb")!==-1?i=i.map((a,o)=>o<3?parseInt(a,10):a):t.indexOf("hsl")!==-1&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),t.indexOf("color")!==-1?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${t}(${i})`}function ZG(e){e=yf(e);const{values:t}=e,r=t[0],i=t[1]/100,a=t[2]/100,o=i*Math.min(a,1-a),s=(c,d=(c+r/30)%12)=>a-o*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),pw({type:l,values:u})}function R3(e){e=yf(e);let t=e.type==="hsl"||e.type==="hsla"?yf(ZG(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function JG(e,t){const r=R3(e),i=R3(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function Yi(e,t){return e=yf(e),t=mC(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,pw(e)}function hw(e,t){if(e=yf(e),t=mC(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return pw(e)}function gw(e,t){if(e=yf(e),t=mC(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return pw(e)}function eY(e,t=.15){return R3(e)>.5?hw(e,t):gw(e,t)}const tY={};function rY(e){const t=fw();return N(uC.Provider,{value:typeof t=="object"?t:tY,children:e.children})}function nY(e){const{children:t,theme:r}=e;return N(UG,{theme:r,children:N(rY,{children:t})})}function iY(e,t){return Ue({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const oY={black:"#000",white:"#fff"},n0=oY,aY={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},sY=aY,lY={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},cp=lY,uY={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},dp=uY,cY={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},xg=cY,dY={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},fp=dY,fY={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},pp=fY,pY={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},hp=pY,hY=["mode","contrastThreshold","tonalOffset"],AA={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:n0.white,default:n0.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},i_={text:{primary:n0.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:n0.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function TA(e,t,r,i){const a=i.light||i,o=i.dark||i*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=gw(e.main,a):t==="dark"&&(e.dark=hw(e.main,o)))}function gY(e="light"){return e==="dark"?{main:fp[200],light:fp[50],dark:fp[400]}:{main:fp[700],light:fp[400],dark:fp[800]}}function mY(e="light"){return e==="dark"?{main:cp[200],light:cp[50],dark:cp[400]}:{main:cp[500],light:cp[300],dark:cp[700]}}function yY(e="light"){return e==="dark"?{main:dp[500],light:dp[300],dark:dp[700]}:{main:dp[700],light:dp[400],dark:dp[800]}}function vY(e="light"){return e==="dark"?{main:pp[400],light:pp[300],dark:pp[700]}:{main:pp[700],light:pp[500],dark:pp[900]}}function bY(e="light"){return e==="dark"?{main:hp[400],light:hp[300],dark:hp[700]}:{main:hp[800],light:hp[500],dark:hp[900]}}function wY(e="light"){return e==="dark"?{main:xg[400],light:xg[300],dark:xg[700]}:{main:"#ed6c02",light:xg[500],dark:xg[900]}}function xY(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:i=.2}=e,a=vn(e,hY),o=e.primary||gY(t),s=e.secondary||mY(t),l=e.error||yY(t),u=e.info||vY(t),c=e.success||bY(t),d=e.warning||wY(t);function g(y){return JG(y,i_.text.primary)>=r?i_.text.primary:AA.text.primary}const x=({color:y,name:_,mainShade:E=500,lightShade:A=300,darkShade:B=700})=>{if(y=Ue({},y),!y.main&&y[E]&&(y.main=y[E]),!y.hasOwnProperty("main"))throw new Error(sd(11,_?` (${_})`:"",E));if(typeof y.main!="string")throw new Error(sd(12,_?` (${_})`:"",JSON.stringify(y.main)));return TA(y,"light",A,i),TA(y,"dark",B,i),y.contrastText||(y.contrastText=g(y.main)),y},w={dark:i_,light:AA};return ll(Ue({common:Ue({},n0),mode:t,primary:x({color:o,name:"primary"}),secondary:x({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:x({color:l,name:"error"}),warning:x({color:d,name:"warning"}),info:x({color:u,name:"info"}),success:x({color:c,name:"success"}),grey:sY,contrastThreshold:r,getContrastText:g,augmentColor:x,tonalOffset:i},w[t]),a)}const _Y=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function SY(e){return Math.round(e*1e5)/1e5}const IA={textTransform:"uppercase"},RA='"Roboto", "Helvetica", "Arial", sans-serif';function CY(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:i=RA,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:g}=r,x=vn(r,_Y),w=a/14,v=g||(E=>`${E/c*w}rem`),y=(E,A,B,U,L)=>Ue({fontFamily:i,fontWeight:E,fontSize:v(A),lineHeight:B},i===RA?{letterSpacing:`${SY(U/A)}em`}:{},L,d),_={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,IA),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,IA)};return ll(Ue({htmlFontSize:c,pxToRem:v,fontFamily:i,fontSize:a,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:u},_),x,{clone:!1})}const EY=.2,kY=.14,AY=.12;function jo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${EY})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${kY})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${AY})`].join(",")}const TY=["none",jo(0,2,1,-1,0,1,1,0,0,1,3,0),jo(0,3,1,-2,0,2,2,0,0,1,5,0),jo(0,3,3,-2,0,3,4,0,0,1,8,0),jo(0,2,4,-1,0,4,5,0,0,1,10,0),jo(0,3,5,-1,0,5,8,0,0,1,14,0),jo(0,3,5,-1,0,6,10,0,0,1,18,0),jo(0,4,5,-2,0,7,10,1,0,2,16,1),jo(0,5,5,-3,0,8,10,1,0,3,14,2),jo(0,5,6,-3,0,9,12,1,0,3,16,2),jo(0,6,6,-3,0,10,14,1,0,4,18,3),jo(0,6,7,-4,0,11,15,1,0,4,20,3),jo(0,7,8,-4,0,12,17,2,0,5,22,4),jo(0,7,8,-4,0,13,19,2,0,5,24,4),jo(0,7,9,-4,0,14,21,2,0,5,26,4),jo(0,8,9,-5,0,15,22,2,0,6,28,5),jo(0,8,10,-5,0,16,24,2,0,6,30,5),jo(0,8,11,-5,0,17,26,2,0,6,32,5),jo(0,9,11,-5,0,18,28,2,0,7,34,6),jo(0,9,12,-6,0,19,29,2,0,7,36,6),jo(0,10,13,-6,0,20,31,3,0,8,38,7),jo(0,10,13,-6,0,21,33,3,0,8,40,7),jo(0,10,14,-6,0,22,35,3,0,8,42,7),jo(0,11,14,-7,0,23,36,3,0,9,44,8),jo(0,11,15,-7,0,24,38,3,0,9,46,8)],IY=TY,RY=["duration","easing","delay"],PY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},z9={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function PA(e){return`${Math.round(e)}ms`}function MY(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function OY(e){const t=Ue({},PY,e.easing),r=Ue({},z9,e.duration);return Ue({getAutoHeightDuration:MY,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:u=0}=o;return vn(o,RY),(Array.isArray(a)?a:[a]).map(c=>`${c} ${typeof s=="string"?s:PA(s)} ${l} ${typeof u=="string"?u:PA(u)}`).join(",")}},e,{easing:t,duration:r})}const BY={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},UY=BY,DY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function yC(e={},...t){const{mixins:r={},palette:i={},transitions:a={},typography:o={}}=e,s=vn(e,DY);if(e.vars)throw new Error(sd(18));const l=xY(i),u=hC(e);let c=ll(u,{mixins:iY(u.breakpoints,r),palette:l,shadows:IY.slice(),typography:CY(l,o),transitions:OY(a),zIndex:Ue({},UY)});return c=ll(c,s),c=t.reduce((d,g)=>ll(d,g),c),c.unstable_sxConfig=Ue({},cw,s?.unstable_sxConfig),c.unstable_sx=function(g){return dw({sx:g,theme:this})},c}function LY(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function NY(e){return parseFloat(e)}const jY=yC(),mw=jY;function sa(){return fw(mw)}function pi({props:e,name:t}){return QG({props:e,name:t,defaultTheme:mw})}const Wl=e=>xm(e)&&e!=="classes",$Y=xm,FY=$9({defaultTheme:mw,rootShouldForwardProp:Wl}),ar=FY,zY=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},MA=zY,HY="/assets/search.7f4d94b1.svg",vC="/assets/close.3e490fed.svg";function v1(e){return typeof e=="string"}function im(e,t,r){return e===void 0||v1(e)?t:Ue({},t,{ownerState:Ue({},t.ownerState,r)})}function WY(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{r[i]=e[i]}),r}function P3(e,t){return typeof e=="function"?e(t):e}function OA(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function VY(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:a,className:o}=e;if(!t){const w=dn(a?.className,i?.className,o,r?.className),v=Ue({},r?.style,a?.style,i?.style),y=Ue({},r,a,i);return w.length>0&&(y.className=w),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:void 0}}const s=WY(Ue({},a,i)),l=OA(i),u=OA(a),c=t(s),d=dn(c?.className,r?.className,o,a?.className,i?.className),g=Ue({},c?.style,r?.style,a?.style,i?.style),x=Ue({},c,r,u,l);return d.length>0&&(x.className=d),Object.keys(g).length>0&&(x.style=g),{props:x,internalRef:c.ref}}const qY=["elementType","externalSlotProps","ownerState"];function M3(e){var t;const{elementType:r,externalSlotProps:i,ownerState:a}=e,o=vn(e,qY),s=P3(i,a),{props:l,internalRef:u}=VY(Ue({},o,{externalSlotProps:s})),c=zo(u,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return im(r,Ue({},l,{ref:c}),a)}function BA(e){return e.substring(2).toLowerCase()}function KY(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=zo(t.ref,l),g=al(v=>{const y=c.current;c.current=!1;const _=pa(l.current);if(!u.current||!l.current||"clientX"in v&&KY(v,_))return;if(s.current){s.current=!1;return}let E;v.composedPath?E=v.composedPath().indexOf(l.current)>-1:E=!_.documentElement.contains(v.target)||l.current.contains(v.target),!E&&(r||!y)&&a(v)}),x=v=>y=>{c.current=!0;const _=t.props[v];_&&_(y)},w={ref:d};return o!==!1&&(w[o]=x(o)),Z.exports.useEffect(()=>{if(o!==!1){const v=BA(o),y=pa(l.current),_=()=>{s.current=!0};return y.addEventListener(v,g),y.addEventListener("touchmove",_),()=>{y.removeEventListener(v,g),y.removeEventListener("touchmove",_)}}},[g,o]),i!==!1&&(w[i]=x(i)),Z.exports.useEffect(()=>{if(i!==!1){const v=BA(i),y=pa(l.current);return y.addEventListener(v,g),()=>{y.removeEventListener(v,g)}}},[g,i]),N(Z.exports.Fragment,{children:Z.exports.cloneElement(t,w)})}const GY=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function YY(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function QY(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function XY(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||QY(e))}function ZY(e){const t=[],r=[];return Array.from(e.querySelectorAll(GY)).forEach((i,a)=>{const o=YY(i);o===-1||!XY(i)||(o===0?t.push(i):r.push({documentOrder:a,tabIndex:o,node:i}))}),r.sort((i,a)=>i.tabIndex===a.tabIndex?i.documentOrder-a.documentOrder:i.tabIndex-a.tabIndex).map(i=>i.node).concat(t)}function JY(){return!0}function eQ(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:a=!1,getTabbable:o=ZY,isEnabled:s=JY,open:l}=e,u=Z.exports.useRef(!1),c=Z.exports.useRef(null),d=Z.exports.useRef(null),g=Z.exports.useRef(null),x=Z.exports.useRef(null),w=Z.exports.useRef(!1),v=Z.exports.useRef(null),y=zo(t.ref,v),_=Z.exports.useRef(null);Z.exports.useEffect(()=>{!l||!v.current||(w.current=!r)},[r,l]),Z.exports.useEffect(()=>{if(!l||!v.current)return;const B=pa(v.current);return v.current.contains(B.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),w.current&&v.current.focus()),()=>{a||(g.current&&g.current.focus&&(u.current=!0,g.current.focus()),g.current=null)}},[l]),Z.exports.useEffect(()=>{if(!l||!v.current)return;const B=pa(v.current),U=V=>{const{current:H}=v;if(H!==null){if(!B.hasFocus()||i||!s()||u.current){u.current=!1;return}if(!H.contains(B.activeElement)){if(V&&x.current!==V.target||B.activeElement!==x.current)x.current=null;else if(x.current!==null)return;if(!w.current)return;let oe=[];if((B.activeElement===c.current||B.activeElement===d.current)&&(oe=o(v.current)),oe.length>0){var z,Y;const q=Boolean(((z=_.current)==null?void 0:z.shiftKey)&&((Y=_.current)==null?void 0:Y.key)==="Tab"),ae=oe[0],M=oe[oe.length-1];typeof ae!="string"&&typeof M!="string"&&(q?M.focus():ae.focus())}else H.focus()}}},L=V=>{_.current=V,!(i||!s()||V.key!=="Tab")&&B.activeElement===v.current&&V.shiftKey&&(u.current=!0,d.current&&d.current.focus())};B.addEventListener("focusin",U),B.addEventListener("keydown",L,!0);const K=setInterval(()=>{B.activeElement&&B.activeElement.tagName==="BODY"&&U(null)},50);return()=>{clearInterval(K),B.removeEventListener("focusin",U),B.removeEventListener("keydown",L,!0)}},[r,i,a,s,l,o]);const E=B=>{g.current===null&&(g.current=B.relatedTarget),w.current=!0,x.current=B.target;const U=t.props.onFocus;U&&U(B)},A=B=>{g.current===null&&(g.current=B.relatedTarget),w.current=!0};return Bt(Z.exports.Fragment,{children:[N("div",{tabIndex:l?0:-1,onFocus:A,ref:c,"data-testid":"sentinelStart"}),Z.exports.cloneElement(t,{ref:y,onFocus:E}),N("div",{tabIndex:l?0:-1,onFocus:A,ref:d,"data-testid":"sentinelEnd"})]})}var ws="top",gl="bottom",ml="right",xs="left",wC="auto",N0=[ws,gl,ml,xs],dh="start",i0="end",tQ="clippingParents",H9="viewport",_g="popper",rQ="reference",UA=N0.reduce(function(e,t){return e.concat([t+"-"+dh,t+"-"+i0])},[]),W9=[].concat(N0,[wC]).reduce(function(e,t){return e.concat([t,t+"-"+dh,t+"-"+i0])},[]),nQ="beforeRead",iQ="read",oQ="afterRead",aQ="beforeMain",sQ="main",lQ="afterMain",uQ="beforeWrite",cQ="write",dQ="afterWrite",fQ=[nQ,iQ,oQ,aQ,sQ,lQ,uQ,cQ,dQ];function bu(e){return e?(e.nodeName||"").toLowerCase():null}function vl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function vf(e){var t=vl(e).Element;return e instanceof t||e instanceof Element}function ul(e){var t=vl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xC(e){if(typeof ShadowRoot>"u")return!1;var t=vl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pQ(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},a=t.attributes[r]||{},o=t.elements[r];!ul(o)||!bu(o)||(Object.assign(o.style,i),Object.keys(a).forEach(function(s){var l=a[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function hQ(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var a=t.elements[i],o=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),l=s.reduce(function(u,c){return u[c]="",u},{});!ul(a)||!bu(a)||(Object.assign(a.style,l),Object.keys(o).forEach(function(u){a.removeAttribute(u)}))})}}const gQ={name:"applyStyles",enabled:!0,phase:"write",fn:pQ,effect:hQ,requires:["computeStyles"]};function cu(e){return e.split("-")[0]}var of=Math.max,b1=Math.min,fh=Math.round;function O3(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function V9(){return!/^((?!chrome|android).)*safari/i.test(O3())}function ph(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),a=1,o=1;t&&ul(e)&&(a=e.offsetWidth>0&&fh(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&fh(i.height)/e.offsetHeight||1);var s=vf(e)?vl(e):window,l=s.visualViewport,u=!V9()&&r,c=(i.left+(u&&l?l.offsetLeft:0))/a,d=(i.top+(u&&l?l.offsetTop:0))/o,g=i.width/a,x=i.height/o;return{width:g,height:x,top:d,right:c+g,bottom:d+x,left:c,x:c,y:d}}function _C(e){var t=ph(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function q9(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xC(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function oc(e){return vl(e).getComputedStyle(e)}function mQ(e){return["table","td","th"].indexOf(bu(e))>=0}function _d(e){return((vf(e)?e.ownerDocument:e.document)||window.document).documentElement}function yw(e){return bu(e)==="html"?e:e.assignedSlot||e.parentNode||(xC(e)?e.host:null)||_d(e)}function DA(e){return!ul(e)||oc(e).position==="fixed"?null:e.offsetParent}function yQ(e){var t=/firefox/i.test(O3()),r=/Trident/i.test(O3());if(r&&ul(e)){var i=oc(e);if(i.position==="fixed")return null}var a=yw(e);for(xC(a)&&(a=a.host);ul(a)&&["html","body"].indexOf(bu(a))<0;){var o=oc(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function j0(e){for(var t=vl(e),r=DA(e);r&&mQ(r)&&oc(r).position==="static";)r=DA(r);return r&&(bu(r)==="html"||bu(r)==="body"&&oc(r).position==="static")?t:r||yQ(e)||t}function SC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _m(e,t,r){return of(e,b1(t,r))}function vQ(e,t,r){var i=_m(e,t,r);return i>r?r:i}function K9(){return{top:0,right:0,bottom:0,left:0}}function G9(e){return Object.assign({},K9(),e)}function Y9(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var bQ=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,G9(typeof t!="number"?t:Y9(t,N0))};function wQ(e){var t,r=e.state,i=e.name,a=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=cu(r.placement),u=SC(l),c=[xs,ml].indexOf(l)>=0,d=c?"height":"width";if(!(!o||!s)){var g=bQ(a.padding,r),x=_C(o),w=u==="y"?ws:xs,v=u==="y"?gl:ml,y=r.rects.reference[d]+r.rects.reference[u]-s[u]-r.rects.popper[d],_=s[u]-r.rects.reference[u],E=j0(o),A=E?u==="y"?E.clientHeight||0:E.clientWidth||0:0,B=y/2-_/2,U=g[w],L=A-x[d]-g[v],K=A/2-x[d]/2+B,V=_m(U,K,L),H=u;r.modifiersData[i]=(t={},t[H]=V,t.centerOffset=V-K,t)}}function xQ(e){var t=e.state,r=e.options,i=r.element,a=i===void 0?"[data-popper-arrow]":i;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||!q9(t.elements.popper,a)||(t.elements.arrow=a))}const _Q={name:"arrow",enabled:!0,phase:"main",fn:wQ,effect:xQ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hh(e){return e.split("-")[1]}var SQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CQ(e){var t=e.x,r=e.y,i=window,a=i.devicePixelRatio||1;return{x:fh(t*a)/a||0,y:fh(r*a)/a||0}}function LA(e){var t,r=e.popper,i=e.popperRect,a=e.placement,o=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,g=e.isFixed,x=s.x,w=x===void 0?0:x,v=s.y,y=v===void 0?0:v,_=typeof d=="function"?d({x:w,y}):{x:w,y};w=_.x,y=_.y;var E=s.hasOwnProperty("x"),A=s.hasOwnProperty("y"),B=xs,U=ws,L=window;if(c){var K=j0(r),V="clientHeight",H="clientWidth";if(K===vl(r)&&(K=_d(r),oc(K).position!=="static"&&l==="absolute"&&(V="scrollHeight",H="scrollWidth")),K=K,a===ws||(a===xs||a===ml)&&o===i0){U=gl;var z=g&&K===L&&L.visualViewport?L.visualViewport.height:K[V];y-=z-i.height,y*=u?1:-1}if(a===xs||(a===ws||a===gl)&&o===i0){B=ml;var Y=g&&K===L&&L.visualViewport?L.visualViewport.width:K[H];w-=Y-i.width,w*=u?1:-1}}var oe=Object.assign({position:l},c&&SQ),q=d===!0?CQ({x:w,y}):{x:w,y};if(w=q.x,y=q.y,u){var ae;return Object.assign({},oe,(ae={},ae[U]=A?"0":"",ae[B]=E?"0":"",ae.transform=(L.devicePixelRatio||1)<=1?"translate("+w+"px, "+y+"px)":"translate3d("+w+"px, "+y+"px, 0)",ae))}return Object.assign({},oe,(t={},t[U]=A?y+"px":"",t[B]=E?w+"px":"",t.transform="",t))}function EQ(e){var t=e.state,r=e.options,i=r.gpuAcceleration,a=i===void 0?!0:i,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:cu(t.placement),variation:hh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LA(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LA(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const kQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:EQ,data:{}};var Hy={passive:!0};function AQ(e){var t=e.state,r=e.instance,i=e.options,a=i.scroll,o=a===void 0?!0:a,s=i.resize,l=s===void 0?!0:s,u=vl(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",r.update,Hy)}),l&&u.addEventListener("resize",r.update,Hy),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",r.update,Hy)}),l&&u.removeEventListener("resize",r.update,Hy)}}const TQ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:AQ,data:{}};var IQ={left:"right",right:"left",bottom:"top",top:"bottom"};function Mv(e){return e.replace(/left|right|bottom|top/g,function(t){return IQ[t]})}var RQ={start:"end",end:"start"};function NA(e){return e.replace(/start|end/g,function(t){return RQ[t]})}function CC(e){var t=vl(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function EC(e){return ph(_d(e)).left+CC(e).scrollLeft}function PQ(e,t){var r=vl(e),i=_d(e),a=r.visualViewport,o=i.clientWidth,s=i.clientHeight,l=0,u=0;if(a){o=a.width,s=a.height;var c=V9();(c||!c&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}return{width:o,height:s,x:l+EC(e),y:u}}function MQ(e){var t,r=_d(e),i=CC(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=of(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=of(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-i.scrollLeft+EC(e),u=-i.scrollTop;return oc(a||r).direction==="rtl"&&(l+=of(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:s,x:l,y:u}}function kC(e){var t=oc(e),r=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+i)}function Q9(e){return["html","body","#document"].indexOf(bu(e))>=0?e.ownerDocument.body:ul(e)&&kC(e)?e:Q9(yw(e))}function Sm(e,t){var r;t===void 0&&(t=[]);var i=Q9(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=vl(i),s=a?[o].concat(o.visualViewport||[],kC(i)?i:[]):i,l=t.concat(s);return a?l:l.concat(Sm(yw(s)))}function B3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function OQ(e,t){var r=ph(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function jA(e,t,r){return t===H9?B3(PQ(e,r)):vf(t)?OQ(t,r):B3(MQ(_d(e)))}function BQ(e){var t=Sm(yw(e)),r=["absolute","fixed"].indexOf(oc(e).position)>=0,i=r&&ul(e)?j0(e):e;return vf(i)?t.filter(function(a){return vf(a)&&q9(a,i)&&bu(a)!=="body"}):[]}function UQ(e,t,r,i){var a=t==="clippingParents"?BQ(e):[].concat(t),o=[].concat(a,[r]),s=o[0],l=o.reduce(function(u,c){var d=jA(e,c,i);return u.top=of(d.top,u.top),u.right=b1(d.right,u.right),u.bottom=b1(d.bottom,u.bottom),u.left=of(d.left,u.left),u},jA(e,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function X9(e){var t=e.reference,r=e.element,i=e.placement,a=i?cu(i):null,o=i?hh(i):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(a){case ws:u={x:s,y:t.y-r.height};break;case gl:u={x:s,y:t.y+t.height};break;case ml:u={x:t.x+t.width,y:l};break;case xs:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=a?SC(a):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case dh:u[c]=u[c]-(t[d]/2-r[d]/2);break;case i0:u[c]=u[c]+(t[d]/2-r[d]/2);break}}return u}function o0(e,t){t===void 0&&(t={});var r=t,i=r.placement,a=i===void 0?e.placement:i,o=r.strategy,s=o===void 0?e.strategy:o,l=r.boundary,u=l===void 0?tQ:l,c=r.rootBoundary,d=c===void 0?H9:c,g=r.elementContext,x=g===void 0?_g:g,w=r.altBoundary,v=w===void 0?!1:w,y=r.padding,_=y===void 0?0:y,E=G9(typeof _!="number"?_:Y9(_,N0)),A=x===_g?rQ:_g,B=e.rects.popper,U=e.elements[v?A:x],L=UQ(vf(U)?U:U.contextElement||_d(e.elements.popper),u,d,s),K=ph(e.elements.reference),V=X9({reference:K,element:B,strategy:"absolute",placement:a}),H=B3(Object.assign({},B,V)),z=x===_g?H:K,Y={top:L.top-z.top+E.top,bottom:z.bottom-L.bottom+E.bottom,left:L.left-z.left+E.left,right:z.right-L.right+E.right},oe=e.modifiersData.offset;if(x===_g&&oe){var q=oe[a];Object.keys(Y).forEach(function(ae){var M=[ml,gl].indexOf(ae)>=0?1:-1,te=[ws,gl].indexOf(ae)>=0?"y":"x";Y[ae]+=q[te]*M})}return Y}function DQ(e,t){t===void 0&&(t={});var r=t,i=r.placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?W9:u,d=hh(i),g=d?l?UA:UA.filter(function(v){return hh(v)===d}):N0,x=g.filter(function(v){return c.indexOf(v)>=0});x.length===0&&(x=g);var w=x.reduce(function(v,y){return v[y]=o0(e,{placement:y,boundary:a,rootBoundary:o,padding:s})[cu(y)],v},{});return Object.keys(w).sort(function(v,y){return w[v]-w[y]})}function LQ(e){if(cu(e)===wC)return[];var t=Mv(e);return[NA(e),t,NA(t)]}function NQ(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var a=r.mainAxis,o=a===void 0?!0:a,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,d=r.boundary,g=r.rootBoundary,x=r.altBoundary,w=r.flipVariations,v=w===void 0?!0:w,y=r.allowedAutoPlacements,_=t.options.placement,E=cu(_),A=E===_,B=u||(A||!v?[Mv(_)]:LQ(_)),U=[_].concat(B).reduce(function(Rt,At){return Rt.concat(cu(At)===wC?DQ(t,{placement:At,boundary:d,rootBoundary:g,padding:c,flipVariations:v,allowedAutoPlacements:y}):At)},[]),L=t.rects.reference,K=t.rects.popper,V=new Map,H=!0,z=U[0],Y=0;Y=0,te=M?"width":"height",ue=o0(t,{placement:oe,boundary:d,rootBoundary:g,altBoundary:x,padding:c}),he=M?ae?ml:xs:ae?gl:ws;L[te]>K[te]&&(he=Mv(he));var xe=Mv(he),J=[];if(o&&J.push(ue[q]<=0),l&&J.push(ue[he]<=0,ue[xe]<=0),J.every(function(Rt){return Rt})){z=oe,H=!1;break}V.set(oe,J)}if(H)for(var ct=v?3:1,De=function(At){var Xt=U.find(function(vr){var Et=V.get(vr);if(Et)return Et.slice(0,At).every(function(St){return St})});if(Xt)return z=Xt,"break"},ze=ct;ze>0;ze--){var ir=De(ze);if(ir==="break")break}t.placement!==z&&(t.modifiersData[i]._skip=!0,t.placement=z,t.reset=!0)}}const jQ={name:"flip",enabled:!0,phase:"main",fn:NQ,requiresIfExists:["offset"],data:{_skip:!1}};function $A(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function FA(e){return[ws,ml,gl,xs].some(function(t){return e[t]>=0})}function $Q(e){var t=e.state,r=e.name,i=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,s=o0(t,{elementContext:"reference"}),l=o0(t,{altBoundary:!0}),u=$A(s,i),c=$A(l,a,o),d=FA(u),g=FA(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":g})}const FQ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$Q};function zQ(e,t,r){var i=cu(e),a=[xs,ws].indexOf(i)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=o[0],l=o[1];return s=s||0,l=(l||0)*a,[xs,ml].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function HQ(e){var t=e.state,r=e.options,i=e.name,a=r.offset,o=a===void 0?[0,0]:a,s=W9.reduce(function(d,g){return d[g]=zQ(g,t.rects,o),d},{}),l=s[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}const WQ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:HQ};function VQ(e){var t=e.state,r=e.name;t.modifiersData[r]=X9({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const qQ={name:"popperOffsets",enabled:!0,phase:"read",fn:VQ,data:{}};function KQ(e){return e==="x"?"y":"x"}function GQ(e){var t=e.state,r=e.options,i=e.name,a=r.mainAxis,o=a===void 0?!0:a,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,g=r.padding,x=r.tether,w=x===void 0?!0:x,v=r.tetherOffset,y=v===void 0?0:v,_=o0(t,{boundary:u,rootBoundary:c,padding:g,altBoundary:d}),E=cu(t.placement),A=hh(t.placement),B=!A,U=SC(E),L=KQ(U),K=t.modifiersData.popperOffsets,V=t.rects.reference,H=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,Y=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),oe=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(!!K){if(o){var ae,M=U==="y"?ws:xs,te=U==="y"?gl:ml,ue=U==="y"?"height":"width",he=K[U],xe=he+_[M],J=he-_[te],ct=w?-H[ue]/2:0,De=A===dh?V[ue]:H[ue],ze=A===dh?-H[ue]:-V[ue],ir=t.elements.arrow,Rt=w&&ir?_C(ir):{width:0,height:0},At=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:K9(),Xt=At[M],vr=At[te],Et=_m(0,V[ue],Rt[ue]),St=B?V[ue]/2-ct-Et-Xt-Y.mainAxis:De-Et-Xt-Y.mainAxis,xt=B?-V[ue]/2+ct+Et+vr+Y.mainAxis:ze+Et+vr+Y.mainAxis,Ut=t.elements.arrow&&j0(t.elements.arrow),Gt=Ut?U==="y"?Ut.clientTop||0:Ut.clientLeft||0:0,mr=(ae=oe?.[U])!=null?ae:0,ne=he+St-mr-Gt,Pt=he+xt-mr,Dt=_m(w?b1(xe,ne):xe,he,w?of(J,Pt):J);K[U]=Dt,q[U]=Dt-he}if(l){var Te,Ae=U==="x"?ws:xs,ot=U==="x"?gl:ml,$t=K[L],tr=L==="y"?"height":"width",Ot=$t+_[Ae],br=$t-_[ot],be=[ws,xs].indexOf(E)!==-1,se=(Te=oe?.[L])!=null?Te:0,ce=be?Ot:$t-V[tr]-H[tr]-se+Y.altAxis,$=be?$t+V[tr]+H[tr]-se-Y.altAxis:br,C=w&&be?vQ(ce,$t,$):_m(w?ce:Ot,$t,w?$:br);K[L]=C,q[L]=C-$t}t.modifiersData[i]=q}}const YQ={name:"preventOverflow",enabled:!0,phase:"main",fn:GQ,requiresIfExists:["offset"]};function QQ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function XQ(e){return e===vl(e)||!ul(e)?CC(e):QQ(e)}function ZQ(e){var t=e.getBoundingClientRect(),r=fh(t.width)/e.offsetWidth||1,i=fh(t.height)/e.offsetHeight||1;return r!==1||i!==1}function JQ(e,t,r){r===void 0&&(r=!1);var i=ul(t),a=ul(t)&&ZQ(t),o=_d(t),s=ph(e,a,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&((bu(t)!=="body"||kC(o))&&(l=XQ(t)),ul(t)?(u=ph(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=EC(o))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function eX(e){var t=new Map,r=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function a(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&a(u)}}),i.push(o)}return e.forEach(function(o){r.has(o.name)||a(o)}),i}function tX(e){var t=eX(e);return fQ.reduce(function(r,i){return r.concat(t.filter(function(a){return a.phase===i}))},[])}function rX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function nX(e){var t=e.reduce(function(r,i){var a=r[i.name];return r[i.name]=a?Object.assign({},a,i,{options:Object.assign({},a.options,i.options),data:Object.assign({},a.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var zA={placement:"bottom",modifiers:[],strategy:"absolute"};function HA(){for(var e=arguments.length,t=new Array(e),r=0;r{o||l(sX(a)||document.body)},[a,o]),Nl(()=>{if(s&&!o)return g1(r,s),()=>{g1(r,null)}},[r,s,o]),o){if(Z.exports.isValidElement(i)){const c={ref:u};return Z.exports.cloneElement(i,c)}return N(Z.exports.Fragment,{children:i})}return N(Z.exports.Fragment,{children:s&&il.exports.createPortal(i,s)})}),Z9=lX;function uX(e){return oi("MuiPopperUnstyled",e)}Xn("MuiPopperUnstyled",["root"]);const cX=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],dX=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function fX(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function U3(e){return typeof e=="function"?e():e}function pX(e){return e.nodeType!==void 0}const hX=()=>ci({root:["root"]},uX,{}),gX={},mX=Z.exports.forwardRef(function(t,r){var i;const{anchorEl:a,children:o,component:s,direction:l,disablePortal:u,modifiers:c,open:d,ownerState:g,placement:x,popperOptions:w,popperRef:v,slotProps:y={},slots:_={},TransitionProps:E}=t,A=vn(t,cX),B=Z.exports.useRef(null),U=zo(B,r),L=Z.exports.useRef(null),K=zo(L,v),V=Z.exports.useRef(K);Nl(()=>{V.current=K},[K]),Z.exports.useImperativeHandle(v,()=>L.current,[]);const H=fX(x,l),[z,Y]=Z.exports.useState(H),[oe,q]=Z.exports.useState(U3(a));Z.exports.useEffect(()=>{L.current&&L.current.forceUpdate()}),Z.exports.useEffect(()=>{a&&q(U3(a))},[a]),Nl(()=>{if(!oe||!d)return;const he=ct=>{Y(ct.placement)};let xe=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:ct})=>{he(ct)}}];c!=null&&(xe=xe.concat(c)),w&&w.modifiers!=null&&(xe=xe.concat(w.modifiers));const J=aX(oe,B.current,Ue({placement:H},w,{modifiers:xe}));return V.current(J),()=>{J.destroy(),V.current(null)}},[oe,u,c,d,w,H]);const ae={placement:z};E!==null&&(ae.TransitionProps=E);const M=hX(),te=(i=s??_.root)!=null?i:"div",ue=M3({elementType:te,externalSlotProps:y.root,externalForwardedProps:A,additionalProps:{role:"tooltip",ref:U},ownerState:Ue({},t,g),className:M.root});return N(te,Ue({},ue,{children:typeof o=="function"?o(ae):o}))}),yX=Z.exports.forwardRef(function(t,r){const{anchorEl:i,children:a,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:g="bottom",popperOptions:x=gX,popperRef:w,style:v,transition:y=!1,slotProps:_={},slots:E={}}=t,A=vn(t,dX),[B,U]=Z.exports.useState(!0),L=()=>{U(!1)},K=()=>{U(!0)};if(!u&&!d&&(!y||B))return null;let V;if(o)V=o;else if(i){const Y=U3(i);V=Y&&pX(Y)?pa(Y).body:pa(null).body}const H=!d&&u&&(!y||B)?"none":void 0,z=y?{in:d,onEnter:L,onExited:K}:void 0;return N(Z9,{disablePortal:l,container:V,children:N(mX,Ue({anchorEl:i,direction:s,disablePortal:l,modifiers:c,ref:r,open:y?!B:d,placement:g,popperOptions:x,popperRef:w,slotProps:_,slots:E},A,{style:Ue({position:"fixed",top:0,left:0,display:H},v),TransitionProps:z,children:a}))})}),vX=yX;function bX(e){const t=pa(e);return t.body===e?hl(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Cm(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function WA(e){return parseInt(hl(e).getComputedStyle(e).paddingRight,10)||0}function wX(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||i}function VA(e,t,r,i,a){const o=[t,r,...i];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,u=!wX(s);l&&u&&Cm(s,a)})}function o_(e,t){let r=-1;return e.some((i,a)=>t(i)?(r=a,!0):!1),r}function xX(e,t){const r=[],i=e.container;if(!t.disableScrollLock){if(bX(i)){const s=c9(pa(i));r.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${WA(i)+s}px`;const l=pa(i).querySelectorAll(".mui-fixed");[].forEach.call(l,u=>{r.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${WA(u)+s}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=pa(i).body;else{const s=i.parentElement,l=hl(i);o=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:i}r.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{r.forEach(({value:o,el:s,property:l})=>{o?s.style.setProperty(l,o):s.style.removeProperty(l)})}}function _X(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class SX{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&Cm(t.modalRef,!1);const a=_X(r);VA(r,t.mount,t.modalRef,a,!0);const o=o_(this.containers,s=>s.container===r);return o!==-1?(this.containers[o].modals.push(t),i):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:a}),i)}mount(t,r){const i=o_(this.containers,o=>o.modals.indexOf(t)!==-1),a=this.containers[i];a.restore||(a.restore=xX(a,r))}remove(t,r=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const a=o_(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[a];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Cm(t.modalRef,r),VA(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(a,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Cm(s.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function CX(e){return oi("MuiModal",e)}Xn("MuiModal",["root","hidden"]);const EX=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],kX=e=>{const{open:t,exited:r,classes:i}=e;return ci({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},CX,i)};function AX(e){return typeof e=="function"?e():e}function TX(e){return e?e.props.hasOwnProperty("in"):!1}const IX=new SX,RX=Z.exports.forwardRef(function(t,r){var i,a;const{children:o,classes:s,closeAfterTransition:l=!1,component:u,container:c,disableAutoFocus:d=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:v=!1,disableScrollLock:y=!1,hideBackdrop:_=!1,keepMounted:E=!1,manager:A=IX,onBackdropClick:B,onClose:U,onKeyDown:L,open:K,onTransitionEnter:V,onTransitionExited:H,slotProps:z={},slots:Y={}}=t,oe=vn(t,EX),[q,ae]=Z.exports.useState(!K),M=Z.exports.useRef({}),te=Z.exports.useRef(null),ue=Z.exports.useRef(null),he=zo(ue,r),xe=TX(o),J=(i=t["aria-hidden"])!=null?i:!0,ct=()=>pa(te.current),De=()=>(M.current.modalRef=ue.current,M.current.mountNode=te.current,M.current),ze=()=>{A.mount(De(),{disableScrollLock:y}),ue.current&&(ue.current.scrollTop=0)},ir=al(()=>{const Ae=AX(c)||ct().body;A.add(De(),Ae),ue.current&&ze()}),Rt=Z.exports.useCallback(()=>A.isTopModal(De()),[A]),At=al(Ae=>{te.current=Ae,!(!Ae||!ue.current)&&(K&&Rt()?ze():Cm(ue.current,J))}),Xt=Z.exports.useCallback(()=>{A.remove(De(),J)},[A,J]);Z.exports.useEffect(()=>()=>{Xt()},[Xt]),Z.exports.useEffect(()=>{K?ir():(!xe||!l)&&Xt()},[K,Xt,xe,l,ir]);const vr=Ue({},t,{classes:s,closeAfterTransition:l,disableAutoFocus:d,disableEnforceFocus:g,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:v,disableScrollLock:y,exited:q,hideBackdrop:_,keepMounted:E}),Et=kX(vr),St=()=>{ae(!1),V&&V()},xt=()=>{ae(!0),H&&H(),l&&Xt()},Ut=Ae=>{Ae.target===Ae.currentTarget&&(B&&B(Ae),U&&U(Ae,"backdropClick"))},Gt=Ae=>{L&&L(Ae),!(Ae.key!=="Escape"||!Rt())&&(x||(Ae.stopPropagation(),U&&U(Ae,"escapeKeyDown")))},mr={};o.props.tabIndex===void 0&&(mr.tabIndex="-1"),xe&&(mr.onEnter=E3(St,o.props.onEnter),mr.onExited=E3(xt,o.props.onExited));const ne=(a=u??Y.root)!=null?a:"div",Pt=M3({elementType:ne,externalSlotProps:z.root,externalForwardedProps:oe,additionalProps:{ref:he,role:"presentation",onKeyDown:Gt},className:Et.root,ownerState:vr}),Dt=Y.backdrop,Te=M3({elementType:Dt,externalSlotProps:z.backdrop,additionalProps:{"aria-hidden":!0,onClick:Ut,open:K},className:Et.backdrop,ownerState:vr});return!E&&!K&&(!xe||q)?null:N(Z9,{ref:At,container:c,disablePortal:w,children:Bt(ne,Ue({},Pt,{children:[!_&&Dt?N(Dt,Ue({},Te)):null,N(eQ,{disableEnforceFocus:g,disableAutoFocus:d,disableRestoreFocus:v,isEnabled:Rt,open:K,children:Z.exports.cloneElement(o,mr)})]}))})}),PX=RX,MX=["onChange","maxRows","minRows","style","value"];function Wy(e,t){return parseInt(e[t],10)||0}const OX={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function qA(e){return e==null||Object.keys(e).length===0}const BX=Z.exports.forwardRef(function(t,r){const{onChange:i,maxRows:a,minRows:o=1,style:s,value:l}=t,u=vn(t,MX),{current:c}=Z.exports.useRef(l!=null),d=Z.exports.useRef(null),g=zo(r,d),x=Z.exports.useRef(null),w=Z.exports.useRef(0),[v,y]=Z.exports.useState({}),_=Z.exports.useCallback(()=>{const L=d.current,V=hl(L).getComputedStyle(L);if(V.width==="0px")return{};const H=x.current;H.style.width=V.width,H.value=L.value||t.placeholder||"x",H.value.slice(-1)===` -`&&(H.value+=" ");const z=V["box-sizing"],Y=Wy(V,"padding-bottom")+Wy(V,"padding-top"),oe=Wy(V,"border-bottom-width")+Wy(V,"border-top-width"),q=H.scrollHeight;H.value="x";const ae=H.scrollHeight;let M=q;o&&(M=Math.max(Number(o)*ae,M)),a&&(M=Math.min(Number(a)*ae,M)),M=Math.max(M,ae);const te=M+(z==="border-box"?Y+oe:0),ue=Math.abs(M-q)<=1;return{outerHeightStyle:te,overflow:ue}},[a,o,t.placeholder]),E=(L,K)=>{const{outerHeightStyle:V,overflow:H}=K;return w.current<20&&(V>0&&Math.abs((L.outerHeightStyle||0)-V)>1||L.overflow!==H)?(w.current+=1,{overflow:H,outerHeightStyle:V}):L},A=Z.exports.useCallback(()=>{const L=_();qA(L)||y(K=>E(K,L))},[_]),B=()=>{const L=_();qA(L)||il.exports.flushSync(()=>{y(K=>E(K,L))})};Z.exports.useEffect(()=>{const L=mf(()=>{w.current=0,d.current&&B()}),K=hl(d.current);K.addEventListener("resize",L);let V;return typeof ResizeObserver<"u"&&(V=new ResizeObserver(L),V.observe(d.current)),()=>{L.clear(),K.removeEventListener("resize",L),V&&V.disconnect()}}),Nl(()=>{A()}),Z.exports.useEffect(()=>{w.current=0},[l]);const U=L=>{w.current=0,c||A(),i&&i(L)};return Bt(Z.exports.Fragment,{children:[N("textarea",Ue({value:l,onChange:U,ref:g,rows:o,style:Ue({height:v.outerHeightStyle,overflow:v.overflow?"hidden":null},s)},u)),N("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:x,tabIndex:-1,style:Ue({},OX.shadow,s,{padding:0})})]})}),UX=BX;function DX(e){return oi("MuiSvgIcon",e)}Xn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const LX=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],NX=e=>{const{color:t,fontSize:r,classes:i}=e,a={root:["root",t!=="inherit"&&`color${Xr(t)}`,`fontSize${Xr(r)}`]};return ci(a,DX,i)},jX=ar("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Xr(r.color)}`],t[`fontSize${Xr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,i,a,o,s,l,u,c,d,g,x,w,v,y,_,E,A;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(i=r.create)==null?void 0:i.call(r,"fill",{duration:(a=e.transitions)==null||(o=a.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,24))||"1.5rem",large:((d=e.typography)==null||(g=d.pxToRem)==null?void 0:g.call(d,35))||"2.1875rem"}[t.fontSize],color:(x=(w=(e.vars||e).palette)==null||(v=w[t.color])==null?void 0:v.main)!=null?x:{action:(y=(e.vars||e).palette)==null||(_=y.action)==null?void 0:_.active,disabled:(E=(e.vars||e).palette)==null||(A=E.action)==null?void 0:A.disabled,inherit:void 0}[t.color]}}),J9=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:g,viewBox:x="0 0 24 24"}=i,w=vn(i,LX),v=Ue({},i,{color:s,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:x}),y={};d||(y.viewBox=x);const _=NX(v);return Bt(jX,Ue({as:l,className:dn(_.root,o),focusable:"false",color:c,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:r},y,w,{ownerState:v,children:[a,g?N("title",{children:g}):null]}))});J9.muiName="SvgIcon";const gh=J9;function $0(e,t){function r(i,a){return N(gh,Ue({"data-testid":`${t}Icon`,ref:a},i,{children:e}))}return r.muiName=gh.muiName,Z.exports.memo(Z.exports.forwardRef(r))}const $X={configure:e=>{tC.configure(e)}},FX=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:$X,capitalize:Xr,createChainedFunction:E3,createSvgIcon:$0,debounce:mf,deprecatedPropType:wq,isMuiElement:Tv,ownerDocument:pa,ownerWindow:hl,requirePropFactory:xq,setRef:g1,unstable_useEnhancedEffect:Nl,unstable_useId:Hb,unsupportedProp:Cq,useControlled:Zm,useEventCallback:al,useForkRef:zo,useIsFocusVisible:Vb},Symbol.toStringTag,{value:"Module"}));function D3(e,t){return D3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},D3(e,t)}function eU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,D3(e,t)}const KA={disabled:!1},w1=Us.createContext(null);var zX=function(t){return t.scrollTop},om="unmounted",zd="exited",Hd="entering",Cp="entered",L3="exiting",dc=function(e){eU(t,e);function t(i,a){var o;o=e.call(this,i,a)||this;var s=a,l=s&&!s.isMounting?i.enter:i.appear,u;return o.appearStatus=null,i.in?l?(u=zd,o.appearStatus=Hd):u=Cp:i.unmountOnExit||i.mountOnEnter?u=om:u=zd,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(a,o){var s=a.in;return s&&o.status===om?{status:zd}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var o=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==Hd&&s!==Cp&&(o=Hd):(s===Hd||s===Cp)&&(o=L3)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,o,s,l;return o=s=l=a,a!=null&&typeof a!="number"&&(o=a.exit,s=a.enter,l=a.appear!==void 0?a.appear:s),{exit:o,enter:s,appear:l}},r.updateStatus=function(a,o){if(a===void 0&&(a=!1),o!==null)if(this.cancelNextCallback(),o===Hd){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Fy.findDOMNode(this);s&&zX(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zd&&this.setState({status:om})},r.performEnter=function(a){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:a,u=this.props.nodeRef?[l]:[Fy.findDOMNode(this),l],c=u[0],d=u[1],g=this.getTimeouts(),x=l?g.appear:g.enter;if(!a&&!s||KA.disabled){this.safeSetState({status:Cp},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Hd},function(){o.props.onEntering(c,d),o.onTransitionEnd(x,function(){o.safeSetState({status:Cp},function(){o.props.onEntered(c,d)})})})},r.performExit=function(){var a=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:Fy.findDOMNode(this);if(!o||KA.disabled){this.safeSetState({status:zd},function(){a.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:L3},function(){a.props.onExiting(l),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:zd},function(){a.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,o){o=this.setNextCallback(o),this.setState(a,o)},r.setNextCallback=function(a){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,a(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(a,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Fy.findDOMNode(this),l=a==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===om)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=vn(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N(w1.Provider,{value:null,children:typeof s=="function"?s(a,l):Us.cloneElement(Us.Children.only(s),l)})},t}(Us.Component);dc.contextType=w1;dc.propTypes={};function gp(){}dc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gp,onEntering:gp,onEntered:gp,onExit:gp,onExiting:gp,onExited:gp};dc.UNMOUNTED=om;dc.EXITED=zd;dc.ENTERING=Hd;dc.ENTERED=Cp;dc.EXITING=L3;const vw=dc;function HX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AC(e,t){var r=function(o){return t&&Z.exports.isValidElement(o)?t(o):o},i=Object.create(null);return e&&Z.exports.Children.map(e,function(a){return a}).forEach(function(a){i[a.key]=r(a)}),i}function WX(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var i=Object.create(null),a=[];for(var o in e)o in t?a.length&&(i[o]=a,a=[]):a.push(o);var s,l={};for(var u in t){if(i[u])for(s=0;se.scrollTop;function ld(e,t){var r,i;const{timeout:a,easing:o,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof a=="number"?a:a[t.mode]||0,easing:(i=s.transitionTimingFunction)!=null?i:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function QX(e){return oi("MuiCollapse",e)}Xn("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const XX=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],ZX=e=>{const{orientation:t,classes:r}=e,i={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return ci(i,QX,r)},JX=ar("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.state==="entered"&&t.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>Ue({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&Ue({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),eZ=ar("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>Ue({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),tZ=ar("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>Ue({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),tU=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiCollapse"}),{addEndListener:a,children:o,className:s,collapsedSize:l="0px",component:u,easing:c,in:d,onEnter:g,onEntered:x,onEntering:w,onExit:v,onExited:y,onExiting:_,orientation:E="vertical",style:A,timeout:B=z9.standard,TransitionComponent:U=vw}=i,L=vn(i,XX),K=Ue({},i,{orientation:E,collapsedSize:l}),V=ZX(K),H=sa(),z=Z.exports.useRef(),Y=Z.exports.useRef(null),oe=Z.exports.useRef(),q=typeof l=="number"?`${l}px`:l,ae=E==="horizontal",M=ae?"width":"height";Z.exports.useEffect(()=>()=>{clearTimeout(z.current)},[]);const te=Z.exports.useRef(null),ue=zo(r,te),he=Xt=>vr=>{if(Xt){const Et=te.current;vr===void 0?Xt(Et):Xt(Et,vr)}},xe=()=>Y.current?Y.current[ae?"clientWidth":"clientHeight"]:0,J=he((Xt,vr)=>{Y.current&&ae&&(Y.current.style.position="absolute"),Xt.style[M]=q,g&&g(Xt,vr)}),ct=he((Xt,vr)=>{const Et=xe();Y.current&&ae&&(Y.current.style.position="");const{duration:St,easing:xt}=ld({style:A,timeout:B,easing:c},{mode:"enter"});if(B==="auto"){const Ut=H.transitions.getAutoHeightDuration(Et);Xt.style.transitionDuration=`${Ut}ms`,oe.current=Ut}else Xt.style.transitionDuration=typeof St=="string"?St:`${St}ms`;Xt.style[M]=`${Et}px`,Xt.style.transitionTimingFunction=xt,w&&w(Xt,vr)}),De=he((Xt,vr)=>{Xt.style[M]="auto",x&&x(Xt,vr)}),ze=he(Xt=>{Xt.style[M]=`${xe()}px`,v&&v(Xt)}),ir=he(y),Rt=he(Xt=>{const vr=xe(),{duration:Et,easing:St}=ld({style:A,timeout:B,easing:c},{mode:"exit"});if(B==="auto"){const xt=H.transitions.getAutoHeightDuration(vr);Xt.style.transitionDuration=`${xt}ms`,oe.current=xt}else Xt.style.transitionDuration=typeof Et=="string"?Et:`${Et}ms`;Xt.style[M]=q,Xt.style.transitionTimingFunction=St,_&&_(Xt)});return N(U,Ue({in:d,onEnter:J,onEntered:De,onEntering:ct,onExit:ze,onExited:ir,onExiting:Rt,addEndListener:Xt=>{B==="auto"&&(z.current=setTimeout(Xt,oe.current||0)),a&&a(te.current,Xt)},nodeRef:te,timeout:B==="auto"?null:B},L,{children:(Xt,vr)=>N(JX,Ue({as:u,className:dn(V.root,s,{entered:V.entered,exited:!d&&q==="0px"&&V.hidden}[Xt]),style:Ue({[ae?"minWidth":"minHeight"]:q},A),ownerState:Ue({},K,{state:Xt}),ref:ue},vr,{children:N(eZ,{ownerState:Ue({},K,{state:Xt}),className:V.wrapper,ref:Y,children:N(tZ,{ownerState:Ue({},K,{state:Xt}),className:V.wrapperInner,children:o})})}))}))});tU.muiSupportAuto=!0;const rZ=tU;function nZ(e){return oi("MuiPaper",e)}Xn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const iZ=["className","component","elevation","square","variant"],oZ=e=>{const{square:t,elevation:r,variant:i,classes:a}=e,o={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${r}`]};return ci(o,nZ,a)},aZ=ar("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return Ue({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&Ue({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Yi("#fff",MA(t.elevation))}, ${Yi("#fff",MA(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),sZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiPaper"}),{className:a,component:o="div",elevation:s=1,square:l=!1,variant:u="elevation"}=i,c=vn(i,iZ),d=Ue({},i,{component:o,elevation:s,square:l,variant:u}),g=oZ(d);return N(aZ,Ue({as:o,ownerState:d,className:dn(g.root,a),ref:r},c))}),F0=sZ;function lZ(e){const{className:t,classes:r,pulsate:i=!1,rippleX:a,rippleY:o,rippleSize:s,in:l,onExited:u,timeout:c}=e,[d,g]=Z.exports.useState(!1),x=dn(t,r.ripple,r.rippleVisible,i&&r.ripplePulsate),w={width:s,height:s,top:-(s/2)+o,left:-(s/2)+a},v=dn(r.child,d&&r.childLeaving,i&&r.childPulsate);return!l&&!d&&g(!0),Z.exports.useEffect(()=>{if(!l&&u!=null){const y=setTimeout(u,c);return()=>{clearTimeout(y)}}},[u,l,c]),N("span",{className:x,style:w,children:N("span",{className:v})})}const uZ=Xn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),el=uZ,cZ=["center","classes","className"];let bw=e=>e,GA,YA,QA,XA;const N3=550,dZ=80,fZ=Gf(GA||(GA=bw` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),pZ=Gf(YA||(YA=bw` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),hZ=Gf(QA||(QA=bw` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),gZ=ar("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),mZ=ar(lZ,{name:"MuiTouchRipple",slot:"Ripple"})(XA||(XA=bw` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),el.rippleVisible,fZ,N3,({theme:e})=>e.transitions.easing.easeInOut,el.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,el.child,el.childLeaving,pZ,N3,({theme:e})=>e.transitions.easing.easeInOut,el.childPulsate,hZ,({theme:e})=>e.transitions.easing.easeInOut),yZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:o={},className:s}=i,l=vn(i,cZ),[u,c]=Z.exports.useState([]),d=Z.exports.useRef(0),g=Z.exports.useRef(null);Z.exports.useEffect(()=>{g.current&&(g.current(),g.current=null)},[u]);const x=Z.exports.useRef(!1),w=Z.exports.useRef(null),v=Z.exports.useRef(null),y=Z.exports.useRef(null);Z.exports.useEffect(()=>()=>{clearTimeout(w.current)},[]);const _=Z.exports.useCallback(U=>{const{pulsate:L,rippleX:K,rippleY:V,rippleSize:H,cb:z}=U;c(Y=>[...Y,N(mZ,{classes:{ripple:dn(o.ripple,el.ripple),rippleVisible:dn(o.rippleVisible,el.rippleVisible),ripplePulsate:dn(o.ripplePulsate,el.ripplePulsate),child:dn(o.child,el.child),childLeaving:dn(o.childLeaving,el.childLeaving),childPulsate:dn(o.childPulsate,el.childPulsate)},timeout:N3,pulsate:L,rippleX:K,rippleY:V,rippleSize:H},d.current)]),d.current+=1,g.current=z},[o]),E=Z.exports.useCallback((U={},L={},K=()=>{})=>{const{pulsate:V=!1,center:H=a||L.pulsate,fakeElement:z=!1}=L;if(U?.type==="mousedown"&&x.current){x.current=!1;return}U?.type==="touchstart"&&(x.current=!0);const Y=z?null:y.current,oe=Y?Y.getBoundingClientRect():{width:0,height:0,left:0,top:0};let q,ae,M;if(H||U===void 0||U.clientX===0&&U.clientY===0||!U.clientX&&!U.touches)q=Math.round(oe.width/2),ae=Math.round(oe.height/2);else{const{clientX:te,clientY:ue}=U.touches&&U.touches.length>0?U.touches[0]:U;q=Math.round(te-oe.left),ae=Math.round(ue-oe.top)}if(H)M=Math.sqrt((2*oe.width**2+oe.height**2)/3),M%2===0&&(M+=1);else{const te=Math.max(Math.abs((Y?Y.clientWidth:0)-q),q)*2+2,ue=Math.max(Math.abs((Y?Y.clientHeight:0)-ae),ae)*2+2;M=Math.sqrt(te**2+ue**2)}U!=null&&U.touches?v.current===null&&(v.current=()=>{_({pulsate:V,rippleX:q,rippleY:ae,rippleSize:M,cb:K})},w.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},dZ)):_({pulsate:V,rippleX:q,rippleY:ae,rippleSize:M,cb:K})},[a,_]),A=Z.exports.useCallback(()=>{E({},{pulsate:!0})},[E]),B=Z.exports.useCallback((U,L)=>{if(clearTimeout(w.current),U?.type==="touchend"&&v.current){v.current(),v.current=null,w.current=setTimeout(()=>{B(U,L)});return}v.current=null,c(K=>K.length>0?K.slice(1):K),g.current=L},[]);return Z.exports.useImperativeHandle(r,()=>({pulsate:A,start:E,stop:B}),[A,E,B]),N(gZ,Ue({className:dn(el.root,o.root,s),ref:y},l,{children:N(YX,{component:null,exit:!0,children:u})}))}),vZ=yZ;function bZ(e){return oi("MuiButtonBase",e)}const wZ=Xn("MuiButtonBase",["root","disabled","focusVisible"]),xZ=wZ,_Z=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],SZ=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:i,classes:a}=e,s=ci({root:["root",t&&"disabled",r&&"focusVisible"]},bZ,a);return r&&i&&(s.root+=` ${i}`),s},CZ=ar("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${xZ.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),EZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:o=!1,children:s,className:l,component:u="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:g=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:v,onClick:y,onContextMenu:_,onDragLeave:E,onFocus:A,onFocusVisible:B,onKeyDown:U,onKeyUp:L,onMouseDown:K,onMouseLeave:V,onMouseUp:H,onTouchEnd:z,onTouchMove:Y,onTouchStart:oe,tabIndex:q=0,TouchRippleProps:ae,touchRippleRef:M,type:te}=i,ue=vn(i,_Z),he=Z.exports.useRef(null),xe=Z.exports.useRef(null),J=zo(xe,M),{isFocusVisibleRef:ct,onFocus:De,onBlur:ze,ref:ir}=Vb(),[Rt,At]=Z.exports.useState(!1);c&&Rt&&At(!1),Z.exports.useImperativeHandle(a,()=>({focusVisible:()=>{At(!0),he.current.focus()}}),[]);const[Xt,vr]=Z.exports.useState(!1);Z.exports.useEffect(()=>{vr(!0)},[]);const Et=Xt&&!d&&!c;Z.exports.useEffect(()=>{Rt&&x&&!d&&Xt&&xe.current.pulsate()},[d,x,Rt,Xt]);function St(R,Q,me=g){return al(je=>(Q&&Q(je),!me&&xe.current&&xe.current[R](je),!0))}const xt=St("start",K),Ut=St("stop",_),Gt=St("stop",E),mr=St("stop",H),ne=St("stop",R=>{Rt&&R.preventDefault(),V&&V(R)}),Pt=St("start",oe),Dt=St("stop",z),Te=St("stop",Y),Ae=St("stop",R=>{ze(R),ct.current===!1&&At(!1),v&&v(R)},!1),ot=al(R=>{he.current||(he.current=R.currentTarget),De(R),ct.current===!0&&(At(!0),B&&B(R)),A&&A(R)}),$t=()=>{const R=he.current;return u&&u!=="button"&&!(R.tagName==="A"&&R.href)},tr=Z.exports.useRef(!1),Ot=al(R=>{x&&!tr.current&&Rt&&xe.current&&R.key===" "&&(tr.current=!0,xe.current.stop(R,()=>{xe.current.start(R)})),R.target===R.currentTarget&&$t()&&R.key===" "&&R.preventDefault(),U&&U(R),R.target===R.currentTarget&&$t()&&R.key==="Enter"&&!c&&(R.preventDefault(),y&&y(R))}),br=al(R=>{x&&R.key===" "&&xe.current&&Rt&&!R.defaultPrevented&&(tr.current=!1,xe.current.stop(R,()=>{xe.current.pulsate(R)})),L&&L(R),y&&R.target===R.currentTarget&&$t()&&R.key===" "&&!R.defaultPrevented&&y(R)});let be=u;be==="button"&&(ue.href||ue.to)&&(be=w);const se={};be==="button"?(se.type=te===void 0?"button":te,se.disabled=c):(!ue.href&&!ue.to&&(se.role="button"),c&&(se["aria-disabled"]=c));const ce=zo(r,ir,he),$=Ue({},i,{centerRipple:o,component:u,disabled:c,disableRipple:d,disableTouchRipple:g,focusRipple:x,tabIndex:q,focusVisible:Rt}),C=SZ($);return Bt(CZ,Ue({as:be,className:dn(C.root,l),ownerState:$,onBlur:Ae,onClick:y,onContextMenu:Ut,onFocus:ot,onKeyDown:Ot,onKeyUp:br,onMouseDown:xt,onMouseLeave:ne,onMouseUp:mr,onDragLeave:Gt,onTouchEnd:Dt,onTouchMove:Te,onTouchStart:Pt,ref:ce,tabIndex:c?-1:q,type:te},se,ue,{children:[s,Et?N(vZ,Ue({ref:J,center:o},ae)):null]}))}),ud=EZ;function kZ(e){return oi("MuiIconButton",e)}const AZ=Xn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),TZ=AZ,IZ=["edge","children","className","color","disabled","disableFocusRipple","size"],RZ=e=>{const{classes:t,disabled:r,color:i,edge:a,size:o}=e,s={root:["root",r&&"disabled",i!=="default"&&`color${Xr(i)}`,a&&`edge${Xr(a)}`,`size${Xr(o)}`]};return ci(s,kZ,t)},PZ=ar(ud,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${Xr(r.color)}`],r.edge&&t[`edge${Xr(r.edge)}`],t[`size${Xr(r.size)}`]]}})(({theme:e,ownerState:t})=>Ue({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const i=(r=(e.vars||e).palette)==null?void 0:r[t.color];return Ue({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&Ue({color:i?.main},!t.disableRipple&&{"&:hover":Ue({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${TZ.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),MZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiIconButton"}),{edge:a=!1,children:o,className:s,color:l="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium"}=i,g=vn(i,IZ),x=Ue({},i,{edge:a,color:l,disabled:u,disableFocusRipple:c,size:d}),w=RZ(x);return N(PZ,Ue({className:dn(w.root,s),centerRipple:!0,focusRipple:!c,disabled:u,ref:r,ownerState:x},g,{children:o}))}),qs=MZ;function OZ(e){return oi("MuiTypography",e)}Xn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const BZ=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],UZ=e=>{const{align:t,gutterBottom:r,noWrap:i,paragraph:a,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Xr(t)}`,r&&"gutterBottom",i&&"noWrap",a&&"paragraph"]};return ci(l,OZ,s)},DZ=ar("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Xr(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Ue({margin:0},t.variant&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),ZA={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},LZ={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},NZ=e=>LZ[e]||e,jZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTypography"}),a=NZ(i.color),o=B9(Ue({},i,{color:a})),{align:s="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:d=!1,paragraph:g=!1,variant:x="body1",variantMapping:w=ZA}=o,v=vn(o,BZ),y=Ue({},o,{align:s,color:a,className:l,component:u,gutterBottom:c,noWrap:d,paragraph:g,variant:x,variantMapping:w}),_=u||(g?"p":w[x]||ZA[x])||"span",E=UZ(y);return N(DZ,Ue({as:_,ref:r,ownerState:y,className:dn(E.root,l)},v))}),Io=jZ,$Z=["components","componentsProps","slots","slotProps"],FZ=ar(vX,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zZ=Z.exports.forwardRef(function(t,r){var i;const a=gC(),o=pi({props:t,name:"MuiPopper"}),{components:s,componentsProps:l,slots:u,slotProps:c}=o,d=vn(o,$Z),g=(i=u?.root)!=null?i:s?.Root;return N(FZ,Ue({direction:a?.direction,slots:{root:g},slotProps:c??l},d,{ref:r}))}),rU=zZ,HZ=$0(N("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function WZ(e){return oi("MuiChip",e)}const VZ=Xn("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Gi=VZ,qZ=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],KZ=e=>{const{classes:t,disabled:r,size:i,color:a,iconColor:o,onDelete:s,clickable:l,variant:u}=e,c={root:["root",u,r&&"disabled",`size${Xr(i)}`,`color${Xr(a)}`,l&&"clickable",l&&`clickableColor${Xr(a)}`,s&&"deletable",s&&`deletableColor${Xr(a)}`,`${u}${Xr(a)}`],label:["label",`label${Xr(i)}`],avatar:["avatar",`avatar${Xr(i)}`,`avatarColor${Xr(a)}`],icon:["icon",`icon${Xr(i)}`,`iconColor${Xr(o)}`],deleteIcon:["deleteIcon",`deleteIcon${Xr(i)}`,`deleteIconColor${Xr(a)}`,`deleteIcon${Xr(u)}Color${Xr(a)}`]};return ci(c,WZ,t)},GZ=ar("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:i,iconColor:a,clickable:o,onDelete:s,size:l,variant:u}=r;return[{[`& .${Gi.avatar}`]:t.avatar},{[`& .${Gi.avatar}`]:t[`avatar${Xr(l)}`]},{[`& .${Gi.avatar}`]:t[`avatarColor${Xr(i)}`]},{[`& .${Gi.icon}`]:t.icon},{[`& .${Gi.icon}`]:t[`icon${Xr(l)}`]},{[`& .${Gi.icon}`]:t[`iconColor${Xr(a)}`]},{[`& .${Gi.deleteIcon}`]:t.deleteIcon},{[`& .${Gi.deleteIcon}`]:t[`deleteIcon${Xr(l)}`]},{[`& .${Gi.deleteIcon}`]:t[`deleteIconColor${Xr(i)}`]},{[`& .${Gi.deleteIcon}`]:t[`deleteIcon${Xr(u)}Color${Xr(i)}`]},t.root,t[`size${Xr(l)}`],t[`color${Xr(i)}`],o&&t.clickable,o&&i!=="default"&&t[`clickableColor${Xr(i)})`],s&&t.deletable,s&&i!=="default"&&t[`deletableColor${Xr(i)}`],t[u],t[`${u}${Xr(i)}`]]}})(({theme:e,ownerState:t})=>{const r=Yi(e.palette.text.primary,.26),i=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return Ue({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Gi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Gi.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:i,fontSize:e.typography.pxToRem(12)},[`& .${Gi.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Gi.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Gi.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Gi.icon}`]:Ue({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&Ue({color:e.vars?e.vars.palette.Chip.defaultIconColor:i},t.color!=="default"&&{color:"inherit"})),[`& .${Gi.deleteIcon}`]:Ue({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:r,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Yi(r,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Yi(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Yi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>Ue({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Yi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Yi(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>Ue({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Gi.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Gi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Gi.avatar}`]:{marginLeft:4},[`& .${Gi.avatarSmall}`]:{marginLeft:2},[`& .${Gi.icon}`]:{marginLeft:4},[`& .${Gi.iconSmall}`]:{marginLeft:2},[`& .${Gi.deleteIcon}`]:{marginRight:5},[`& .${Gi.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Yi(e.palette[t.color].main,.7)}`,[`&.${Gi.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Gi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Yi(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Gi.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Yi(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),YZ=ar("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:i}=r;return[t.label,t[`label${Xr(i)}`]]}})(({ownerState:e})=>Ue({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.size==="small"&&{paddingLeft:8,paddingRight:8}));function JA(e){return e.key==="Backspace"||e.key==="Delete"}const QZ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiChip"}),{avatar:a,className:o,clickable:s,color:l="default",component:u,deleteIcon:c,disabled:d=!1,icon:g,label:x,onClick:w,onDelete:v,onKeyDown:y,onKeyUp:_,size:E="medium",variant:A="filled",tabIndex:B,skipFocusWhenDisabled:U=!1}=i,L=vn(i,qZ),K=Z.exports.useRef(null),V=zo(K,r),H=J=>{J.stopPropagation(),v&&v(J)},z=J=>{J.currentTarget===J.target&&JA(J)&&J.preventDefault(),y&&y(J)},Y=J=>{J.currentTarget===J.target&&(v&&JA(J)?v(J):J.key==="Escape"&&K.current&&K.current.blur()),_&&_(J)},oe=s!==!1&&w?!0:s,q=oe||v?ud:u||"div",ae=Ue({},i,{component:q,disabled:d,size:E,color:l,iconColor:Z.exports.isValidElement(g)&&g.props.color||l,onDelete:!!v,clickable:oe,variant:A}),M=KZ(ae),te=q===ud?Ue({component:u||"div",focusVisibleClassName:M.focusVisible},v&&{disableRipple:!0}):{};let ue=null;v&&(ue=c&&Z.exports.isValidElement(c)?Z.exports.cloneElement(c,{className:dn(c.props.className,M.deleteIcon),onClick:H}):N(HZ,{className:dn(M.deleteIcon),onClick:H}));let he=null;a&&Z.exports.isValidElement(a)&&(he=Z.exports.cloneElement(a,{className:dn(M.avatar,a.props.className)}));let xe=null;return g&&Z.exports.isValidElement(g)&&(xe=Z.exports.cloneElement(g,{className:dn(M.icon,g.props.className)})),Bt(GZ,Ue({as:q,className:dn(M.root,o),disabled:oe&&d?!0:void 0,onClick:w,onKeyDown:z,onKeyUp:Y,ref:V,tabIndex:U&&d?-1:B,ownerState:ae},te,L,{children:[he||xe,N(YZ,{className:dn(M.label),ownerState:ae,children:x}),ue]}))}),XZ=QZ;function Uh({props:e,states:t,muiFormControl:r}){return t.reduce((i,a)=>(i[a]=e[a],r&&typeof e[a]>"u"&&(i[a]=r[a]),i),{})}const ZZ=Z.exports.createContext(void 0),RC=ZZ;function Yf(){return Z.exports.useContext(RC)}function JZ(e){return N(BK,Ue({},e,{defaultTheme:mw}))}function eT(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function PC(e,t=!1){return e&&(eT(e.value)&&e.value!==""||t&&eT(e.defaultValue)&&e.defaultValue!=="")}function eJ(e){return e.startAdornment}function tJ(e){return oi("MuiInputBase",e)}const rJ=Xn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),mh=rJ,nJ=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],ww=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${Xr(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},xw=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},iJ=e=>{const{classes:t,color:r,disabled:i,error:a,endAdornment:o,focused:s,formControl:l,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:g,size:x,startAdornment:w,type:v}=e,y={root:["root",`color${Xr(r)}`,i&&"disabled",a&&"error",u&&"fullWidth",s&&"focused",l&&"formControl",x==="small"&&"sizeSmall",d&&"multiline",w&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",g&&"readOnly"],input:["input",i&&"disabled",v==="search"&&"inputTypeSearch",d&&"inputMultiline",x==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",w&&"inputAdornedStart",o&&"inputAdornedEnd",g&&"readOnly"]};return ci(y,tJ,t)},_w=ar("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ww})(({theme:e,ownerState:t})=>Ue({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${mh.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&Ue({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Sw=ar("input",{name:"MuiInputBase",slot:"Input",overridesResolver:xw})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",i=Ue({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),a={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return Ue({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${mh.formControl} &`]:{"&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${mh.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),oJ=N(JZ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),aJ=Z.exports.forwardRef(function(t,r){var i;const a=pi({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:u,components:c={},componentsProps:d={},defaultValue:g,disabled:x,disableInjectingGlobalStyles:w,endAdornment:v,fullWidth:y=!1,id:_,inputComponent:E="input",inputProps:A={},inputRef:B,maxRows:U,minRows:L,multiline:K=!1,name:V,onBlur:H,onChange:z,onClick:Y,onFocus:oe,onKeyDown:q,onKeyUp:ae,placeholder:M,readOnly:te,renderSuffix:ue,rows:he,slotProps:xe={},slots:J={},startAdornment:ct,type:De="text",value:ze}=a,ir=vn(a,nJ),Rt=A.value!=null?A.value:ze,{current:At}=Z.exports.useRef(Rt!=null),Xt=Z.exports.useRef(),vr=Z.exports.useCallback(C=>{},[]),Et=zo(Xt,B,A.ref,vr),[St,xt]=Z.exports.useState(!1),Ut=Yf(),Gt=Uh({props:a,muiFormControl:Ut,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Gt.focused=Ut?Ut.focused:St,Z.exports.useEffect(()=>{!Ut&&x&&St&&(xt(!1),H&&H())},[Ut,x,St,H]);const mr=Ut&&Ut.onFilled,ne=Ut&&Ut.onEmpty,Pt=Z.exports.useCallback(C=>{PC(C)?mr&&mr():ne&&ne()},[mr,ne]);Nl(()=>{At&&Pt({value:Rt})},[Rt,Pt,At]);const Dt=C=>{if(Gt.disabled){C.stopPropagation();return}oe&&oe(C),A.onFocus&&A.onFocus(C),Ut&&Ut.onFocus?Ut.onFocus(C):xt(!0)},Te=C=>{H&&H(C),A.onBlur&&A.onBlur(C),Ut&&Ut.onBlur?Ut.onBlur(C):xt(!1)},Ae=(C,...R)=>{if(!At){const Q=C.target||Xt.current;if(Q==null)throw new Error(sd(1));Pt({value:Q.value})}A.onChange&&A.onChange(C,...R),z&&z(C,...R)};Z.exports.useEffect(()=>{Pt(Xt.current)},[]);const ot=C=>{Xt.current&&C.currentTarget===C.target&&Xt.current.focus(),Y&&Y(C)};let $t=E,tr=A;K&&$t==="input"&&(he?tr=Ue({type:void 0,minRows:he,maxRows:he},tr):tr=Ue({type:void 0,maxRows:U,minRows:L},tr),$t=UX);const Ot=C=>{Pt(C.animationName==="mui-auto-fill-cancel"?Xt.current:{value:"x"})};Z.exports.useEffect(()=>{Ut&&Ut.setAdornedStart(Boolean(ct))},[Ut,ct]);const br=Ue({},a,{color:Gt.color||"primary",disabled:Gt.disabled,endAdornment:v,error:Gt.error,focused:Gt.focused,formControl:Ut,fullWidth:y,hiddenLabel:Gt.hiddenLabel,multiline:K,size:Gt.size,startAdornment:ct,type:De}),be=iJ(br),se=J.root||c.Root||_w,ce=xe.root||d.root||{},$=J.input||c.Input||Sw;return tr=Ue({},tr,(i=xe.input)!=null?i:d.input),Bt(Z.exports.Fragment,{children:[!w&&oJ,Bt(se,Ue({},ce,!v1(se)&&{ownerState:Ue({},br,ce.ownerState)},{ref:r,onClick:ot},ir,{className:dn(be.root,ce.className,u),children:[ct,N(RC.Provider,{value:null,children:N($,Ue({ownerState:br,"aria-invalid":Gt.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:g,disabled:Gt.disabled,id:_,onAnimationStart:Ot,name:V,placeholder:M,readOnly:te,required:Gt.required,rows:he,value:Rt,onKeyDown:q,onKeyUp:ae,type:De},tr,!v1($)&&{as:$t,ownerState:Ue({},br,tr.ownerState)},{ref:Et,className:dn(be.input,tr.className),onBlur:Te,onChange:Ae,onFocus:Dt}))}),v,ue?ue(Ue({},Gt,{startAdornment:ct})):null]}))]})}),MC=aJ;function sJ(e){return oi("MuiInput",e)}const lJ=Ue({},mh,Xn("MuiInput",["root","underline","input"])),Sg=lJ;function uJ(e){return oi("MuiOutlinedInput",e)}const cJ=Ue({},mh,Xn("MuiOutlinedInput",["root","notchedOutline","input"])),Cc=cJ;function dJ(e){return oi("MuiFilledInput",e)}const fJ=Ue({},mh,Xn("MuiFilledInput",["root","underline","input"])),Md=fJ,pJ=$0(N("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),hJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],gJ={entering:{opacity:1},entered:{opacity:1}},mJ=Z.exports.forwardRef(function(t,r){const i=sa(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:u,in:c,onEnter:d,onEntered:g,onEntering:x,onExit:w,onExited:v,onExiting:y,style:_,timeout:E=a,TransitionComponent:A=vw}=t,B=vn(t,hJ),U=Z.exports.useRef(null),L=zo(U,l.ref,r),K=M=>te=>{if(M){const ue=U.current;te===void 0?M(ue):M(ue,te)}},V=K(x),H=K((M,te)=>{IC(M);const ue=ld({style:_,timeout:E,easing:u},{mode:"enter"});M.style.webkitTransition=i.transitions.create("opacity",ue),M.style.transition=i.transitions.create("opacity",ue),d&&d(M,te)}),z=K(g),Y=K(y),oe=K(M=>{const te=ld({style:_,timeout:E,easing:u},{mode:"exit"});M.style.webkitTransition=i.transitions.create("opacity",te),M.style.transition=i.transitions.create("opacity",te),w&&w(M)}),q=K(v);return N(A,Ue({appear:s,in:c,nodeRef:U,onEnter:H,onEntered:z,onEntering:V,onExit:oe,onExited:q,onExiting:Y,addEndListener:M=>{o&&o(U.current,M)},timeout:E},B,{children:(M,te)=>Z.exports.cloneElement(l,Ue({style:Ue({opacity:0,visibility:M==="exited"&&!c?"hidden":void 0},gJ[M],_,l.props.style),ref:L},te))}))}),z0=mJ;function yJ(e){return oi("MuiBackdrop",e)}Xn("MuiBackdrop",["root","invisible"]);const vJ=["children","component","components","componentsProps","className","invisible","open","slotProps","slots","transitionDuration","TransitionComponent"],bJ=e=>{const{classes:t,invisible:r}=e;return ci({root:["root",r&&"invisible"]},yJ,t)},wJ=ar("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>Ue({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),xJ=Z.exports.forwardRef(function(t,r){var i,a,o;const s=pi({props:t,name:"MuiBackdrop"}),{children:l,component:u="div",components:c={},componentsProps:d={},className:g,invisible:x=!1,open:w,slotProps:v={},slots:y={},transitionDuration:_,TransitionComponent:E=z0}=s,A=vn(s,vJ),B=Ue({},s,{component:u,invisible:x}),U=bJ(B),L=(i=v.root)!=null?i:d.root;return N(E,Ue({in:w,timeout:_},A,{children:N(wJ,Ue({"aria-hidden":!0},L,{as:(a=(o=y.root)!=null?o:c.Root)!=null?a:u,className:dn(U.root,g,L?.className),ownerState:Ue({},B,L?.ownerState),classes:U,ref:r,children:l}))}))}),Cw=xJ,_J=yC(),SJ=N9({defaultTheme:_J,defaultClassName:"MuiBox-root",generateClassName:tC.generate}),Cn=SJ;function CJ(e){return oi("MuiButton",e)}const EJ=Xn("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Vy=EJ,kJ=Z.exports.createContext({}),AJ=kJ,TJ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],IJ=e=>{const{color:t,disableElevation:r,fullWidth:i,size:a,variant:o,classes:s}=e,l={root:["root",o,`${o}${Xr(t)}`,`size${Xr(a)}`,`${o}Size${Xr(a)}`,t==="inherit"&&"colorInherit",r&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Xr(a)}`],endIcon:["endIcon",`iconSize${Xr(a)}`]},u=ci(l,CJ,s);return Ue({},s,u)},nU=e=>Ue({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),RJ=ar(ud,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Xr(r.color)}`],t[`size${Xr(r.size)}`],t[`${r.variant}Size${Xr(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var r,i;return Ue({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":Ue({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":Ue({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Vy.focusVisible}`]:Ue({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Vy.disabled}`]:Ue({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="outlined"&&t.color==="secondary"&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Yi(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(i=e.palette).getContrastText)==null?void 0:r.call(i,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Vy.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Vy.disabled}`]:{boxShadow:"none"}}),PJ=ar("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${Xr(r.size)}`]]}})(({ownerState:e})=>Ue({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},nU(e))),MJ=ar("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${Xr(r.size)}`]]}})(({ownerState:e})=>Ue({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},nU(e))),OJ=Z.exports.forwardRef(function(t,r){const i=Z.exports.useContext(AJ),a=eC(i,t),o=pi({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:c,disabled:d=!1,disableElevation:g=!1,disableFocusRipple:x=!1,endIcon:w,focusVisibleClassName:v,fullWidth:y=!1,size:_="medium",startIcon:E,type:A,variant:B="text"}=o,U=vn(o,TJ),L=Ue({},o,{color:l,component:u,disabled:d,disableElevation:g,disableFocusRipple:x,fullWidth:y,size:_,type:A,variant:B}),K=IJ(L),V=E&&N(PJ,{className:K.startIcon,ownerState:L,children:E}),H=w&&N(MJ,{className:K.endIcon,ownerState:L,children:w});return Bt(RJ,Ue({ownerState:L,className:dn(i.className,K.root,c),component:u,disabled:d,focusRipple:!x,focusVisibleClassName:dn(K.focusVisible,v),ref:r,type:A},U,{classes:K,children:[V,s,H]}))}),Ew=OJ;function BJ(e){return oi("PrivateSwitchBase",e)}Xn("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const UJ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],DJ=e=>{const{classes:t,checked:r,disabled:i,edge:a}=e,o={root:["root",r&&"checked",i&&"disabled",a&&`edge${Xr(a)}`],input:["input"]};return ci(o,BJ,t)},LJ=ar(ud)(({ownerState:e})=>Ue({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),NJ=ar("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jJ=Z.exports.forwardRef(function(t,r){const{autoFocus:i,checked:a,checkedIcon:o,className:s,defaultChecked:l,disabled:u,disableFocusRipple:c=!1,edge:d=!1,icon:g,id:x,inputProps:w,inputRef:v,name:y,onBlur:_,onChange:E,onFocus:A,readOnly:B,required:U,tabIndex:L,type:K,value:V}=t,H=vn(t,UJ),[z,Y]=Zm({controlled:a,default:Boolean(l),name:"SwitchBase",state:"checked"}),oe=Yf(),q=J=>{A&&A(J),oe&&oe.onFocus&&oe.onFocus(J)},ae=J=>{_&&_(J),oe&&oe.onBlur&&oe.onBlur(J)},M=J=>{if(J.nativeEvent.defaultPrevented)return;const ct=J.target.checked;Y(ct),E&&E(J,ct)};let te=u;oe&&typeof te>"u"&&(te=oe.disabled);const ue=K==="checkbox"||K==="radio",he=Ue({},t,{checked:z,disabled:te,disableFocusRipple:c,edge:d}),xe=DJ(he);return Bt(LJ,Ue({component:"span",className:dn(xe.root,s),centerRipple:!0,focusRipple:!c,disabled:te,tabIndex:null,role:void 0,onFocus:q,onBlur:ae,ownerState:he,ref:r},H,{children:[N(NJ,Ue({autoFocus:i,checked:a,defaultChecked:l,className:xe.input,disabled:te,id:ue&&x,name:y,onChange:M,readOnly:B,ref:v,required:U,ownerState:he,tabIndex:L,type:K},K==="checkbox"&&V===void 0?{}:{value:V},w)),z?o:g]}))}),$J=jJ;function FJ(e){return oi("MuiCircularProgress",e)}Xn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const zJ=["className","color","disableShrink","size","style","thickness","value","variant"];let kw=e=>e,tT,rT,nT,iT;const Ec=44,HJ=Gf(tT||(tT=kw` - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -`)),WJ=Gf(rT||(rT=kw` - 0% { - stroke-dasharray: 1px, 200px; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -15px; - } - - 100% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -125px; - } -`)),VJ=e=>{const{classes:t,variant:r,color:i,disableShrink:a}=e,o={root:["root",r,`color${Xr(i)}`],svg:["svg"],circle:["circle",`circle${Xr(r)}`,a&&"circleDisableShrink"]};return ci(o,FJ,t)},qJ=ar("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${Xr(r.color)}`]]}})(({ownerState:e,theme:t})=>Ue({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&r0(nT||(nT=kw` - animation: ${0} 1.4s linear infinite; - `),HJ)),KJ=ar("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),GJ=ar("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${Xr(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>Ue({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&r0(iT||(iT=kw` - animation: ${0} 1.4s ease-in-out infinite; - `),WJ)),YJ=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiCircularProgress"}),{className:a,color:o="primary",disableShrink:s=!1,size:l=40,style:u,thickness:c=3.6,value:d=0,variant:g="indeterminate"}=i,x=vn(i,zJ),w=Ue({},i,{color:o,disableShrink:s,size:l,thickness:c,value:d,variant:g}),v=VJ(w),y={},_={},E={};if(g==="determinate"){const A=2*Math.PI*((Ec-c)/2);y.strokeDasharray=A.toFixed(3),E["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*A).toFixed(3)}px`,_.transform="rotate(-90deg)"}return N(qJ,Ue({className:dn(v.root,a),style:Ue({width:l,height:l},_,u),ownerState:w,ref:r,role:"progressbar"},E,x,{children:N(KJ,{className:v.svg,ownerState:w,viewBox:`${Ec/2} ${Ec/2} ${Ec} ${Ec}`,children:N(GJ,{className:v.circle,style:y,ownerState:w,cx:Ec,cy:Ec,r:(Ec-c)/2,fill:"none",strokeWidth:c})})}))}),Aw=YJ,QJ=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],XJ=e=>e.classes,ZJ=ar("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>Ue({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),JJ=ar(Cw,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),eee=Z.exports.forwardRef(function(t,r){var i,a,o,s,l,u;const c=pi({name:"MuiModal",props:t}),{BackdropComponent:d=JJ,BackdropProps:g,closeAfterTransition:x=!1,children:w,component:v,components:y={},componentsProps:_={},disableAutoFocus:E=!1,disableEnforceFocus:A=!1,disableEscapeKeyDown:B=!1,disablePortal:U=!1,disableRestoreFocus:L=!1,disableScrollLock:K=!1,hideBackdrop:V=!1,keepMounted:H=!1,slotProps:z,slots:Y,theme:oe}=c,q=vn(c,QJ),[ae,M]=Z.exports.useState(!0),te={closeAfterTransition:x,disableAutoFocus:E,disableEnforceFocus:A,disableEscapeKeyDown:B,disablePortal:U,disableRestoreFocus:L,disableScrollLock:K,hideBackdrop:V,keepMounted:H},ue=Ue({},c,te,{exited:ae}),he=XJ(ue),xe=(i=(a=Y?.root)!=null?a:y.Root)!=null?i:ZJ,J=(o=(s=Y?.backdrop)!=null?s:y.Backdrop)!=null?o:d,ct=(l=z?.root)!=null?l:_.root,De=(u=z?.backdrop)!=null?u:_.backdrop;return N(PX,Ue({slots:{root:xe,backdrop:J},slotProps:{root:()=>Ue({},P3(ct,ue),!v1(xe)&&{as:v,theme:oe}),backdrop:()=>Ue({},g,P3(De,ue))},onTransitionEnter:()=>M(!1),onTransitionExited:()=>M(!0),ref:r},q,{classes:he},te,{children:w}))}),OC=eee;function tee(e){return oi("MuiDialog",e)}const ree=Xn("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),a_=ree,nee=Z.exports.createContext({}),iU=nee,iee=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],oee=ar(Cw,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),aee=e=>{const{classes:t,scroll:r,maxWidth:i,fullWidth:a,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Xr(r)}`],paper:["paper",`paperScroll${Xr(r)}`,`paperWidth${Xr(String(i))}`,a&&"paperFullWidth",o&&"paperFullScreen"]};return ci(s,tee,t)},see=ar(OC,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),lee=ar("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${Xr(r.scroll)}`]]}})(({ownerState:e})=>Ue({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),uee=ar(F0,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${Xr(r.scroll)}`],t[`paperWidth${Xr(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>Ue({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${a_.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${a_.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${a_.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),cee=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiDialog"}),a=sa(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:u,BackdropProps:c,children:d,className:g,disableEscapeKeyDown:x=!1,fullScreen:w=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:_,onClose:E,open:A,PaperComponent:B=F0,PaperProps:U={},scroll:L="paper",TransitionComponent:K=z0,transitionDuration:V=o,TransitionProps:H}=i,z=vn(i,iee),Y=Ue({},i,{disableEscapeKeyDown:x,fullScreen:w,fullWidth:v,maxWidth:y,scroll:L}),oe=aee(Y),q=Z.exports.useRef(),ae=he=>{q.current=he.target===he.currentTarget},M=he=>{!q.current||(q.current=null,_&&_(he),E&&E(he,"backdropClick"))},te=Hb(l),ue=Z.exports.useMemo(()=>({titleId:te}),[te]);return N(see,Ue({className:dn(oe.root,g),closeAfterTransition:!0,components:{Backdrop:oee},componentsProps:{backdrop:Ue({transitionDuration:V,as:u},c)},disableEscapeKeyDown:x,onClose:E,open:A,ref:r,onClick:M,ownerState:Y},z,{children:N(K,Ue({appear:!0,in:A,timeout:V,role:"presentation"},H,{children:N(lee,{className:dn(oe.container),onMouseDown:ae,ownerState:Y,children:N(uee,Ue({as:B,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":te},U,{className:dn(oe.paper,U.className),ownerState:Y,children:N(iU.Provider,{value:ue,children:d})}))})}))}))}),BC=cee;function dee(e){return oi("MuiDialogActions",e)}Xn("MuiDialogActions",["root","spacing"]);const fee=["className","disableSpacing"],pee=e=>{const{classes:t,disableSpacing:r}=e;return ci({root:["root",!r&&"spacing"]},dee,t)},hee=ar("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>Ue({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),gee=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiDialogActions"}),{className:a,disableSpacing:o=!1}=i,s=vn(i,fee),l=Ue({},i,{disableSpacing:o}),u=pee(l);return N(hee,Ue({className:dn(u.root,a),ownerState:l,ref:r},s))}),oU=gee;function mee(e){return oi("MuiDialogContent",e)}Xn("MuiDialogContent",["root","dividers"]);function yee(e){return oi("MuiDialogTitle",e)}const vee=Xn("MuiDialogTitle",["root"]),bee=vee,wee=["className","dividers"],xee=e=>{const{classes:t,dividers:r}=e;return ci({root:["root",r&&"dividers"]},mee,t)},_ee=ar("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>Ue({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${bee.root} + &`]:{paddingTop:0}})),See=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiDialogContent"}),{className:a,dividers:o=!1}=i,s=vn(i,wee),l=Ue({},i,{dividers:o}),u=xee(l);return N(_ee,Ue({className:dn(u.root,a),ownerState:l,ref:r},s))}),aU=See,Cee=["className","id"],Eee=e=>{const{classes:t}=e;return ci({root:["root"]},yee,t)},kee=ar(Io,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Aee=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiDialogTitle"}),{className:a,id:o}=i,s=vn(i,Cee),l=i,u=Eee(l),{titleId:c=o}=Z.exports.useContext(iU);return N(kee,Ue({component:"h2",className:dn(u.root,a),ownerState:l,ref:r,variant:"h6",id:c},s))}),sU=Aee,Tee=Xn("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),oT=Tee,Iee=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Ree(e,t,r){const i=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),o=hl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let l=0,u=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");l=parseInt(c[4],10),u=parseInt(c[5],10)}return e==="left"?a?`translateX(${a.right+l-i.left}px)`:`translateX(${o.innerWidth+l-i.left}px)`:e==="right"?a?`translateX(-${i.right-a.left-l}px)`:`translateX(-${i.left+i.width-l}px)`:e==="up"?a?`translateY(${a.bottom+u-i.top}px)`:`translateY(${o.innerHeight+u-i.top}px)`:a?`translateY(-${i.top-a.top+i.height-u}px)`:`translateY(-${i.top+i.height-u}px)`}function Pee(e){return typeof e=="function"?e():e}function qy(e,t,r){const i=Pee(r),a=Ree(e,t,i);a&&(t.style.webkitTransform=a,t.style.transform=a)}const Mee=Z.exports.forwardRef(function(t,r){const i=sa(),a={enter:i.transitions.easing.easeOut,exit:i.transitions.easing.sharp},o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,container:c,direction:d="down",easing:g=a,in:x,onEnter:w,onEntered:v,onEntering:y,onExit:_,onExited:E,onExiting:A,style:B,timeout:U=o,TransitionComponent:L=vw}=t,K=vn(t,Iee),V=Z.exports.useRef(null),H=zo(u.ref,V,r),z=xe=>J=>{xe&&(J===void 0?xe(V.current):xe(V.current,J))},Y=z((xe,J)=>{qy(d,xe,c),IC(xe),w&&w(xe,J)}),oe=z((xe,J)=>{const ct=ld({timeout:U,style:B,easing:g},{mode:"enter"});xe.style.webkitTransition=i.transitions.create("-webkit-transform",Ue({},ct)),xe.style.transition=i.transitions.create("transform",Ue({},ct)),xe.style.webkitTransform="none",xe.style.transform="none",y&&y(xe,J)}),q=z(v),ae=z(A),M=z(xe=>{const J=ld({timeout:U,style:B,easing:g},{mode:"exit"});xe.style.webkitTransition=i.transitions.create("-webkit-transform",J),xe.style.transition=i.transitions.create("transform",J),qy(d,xe,c),_&&_(xe)}),te=z(xe=>{xe.style.webkitTransition="",xe.style.transition="",E&&E(xe)}),ue=xe=>{s&&s(V.current,xe)},he=Z.exports.useCallback(()=>{V.current&&qy(d,V.current,c)},[d,c]);return Z.exports.useEffect(()=>{if(x||d==="down"||d==="right")return;const xe=mf(()=>{V.current&&qy(d,V.current,c)}),J=hl(V.current);return J.addEventListener("resize",xe),()=>{xe.clear(),J.removeEventListener("resize",xe)}},[d,x,c]),Z.exports.useEffect(()=>{x||he()},[x,he]),N(L,Ue({nodeRef:V,onEnter:Y,onEntered:q,onEntering:oe,onExit:M,onExited:te,onExiting:ae,addEndListener:ue,appear:l,in:x,timeout:U},K,{children:(xe,J)=>Z.exports.cloneElement(u,Ue({ref:H,style:Ue({visibility:xe==="exited"&&!x?"hidden":void 0},B,u.props.style)},J))}))}),lU=Mee;function Oee(e){return oi("MuiDrawer",e)}Xn("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Bee=["BackdropProps"],Uee=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],uU=(e,t)=>{const{ownerState:r}=e;return[t.root,(r.variant==="permanent"||r.variant==="persistent")&&t.docked,t.modal]},Dee=e=>{const{classes:t,anchor:r,variant:i}=e,a={root:["root"],docked:[(i==="permanent"||i==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Xr(r)}`,i!=="temporary"&&`paperAnchorDocked${Xr(r)}`]};return ci(a,Oee,t)},Lee=ar(OC,{name:"MuiDrawer",slot:"Root",overridesResolver:uU})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),aT=ar("div",{shouldForwardProp:Wl,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:uU})({flex:"0 0 auto"}),Nee=ar(F0,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${Xr(r.anchor)}`],r.variant!=="temporary"&&t[`paperAnchorDocked${Xr(r.anchor)}`]]}})(({theme:e,ownerState:t})=>Ue({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),cU={left:"right",right:"left",top:"down",bottom:"up"};function jee(e){return["left","right"].indexOf(e)!==-1}function $ee(e,t){return e.direction==="rtl"&&jee(t)?cU[t]:t}const Fee=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiDrawer"}),a=sa(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:u,className:c,elevation:d=16,hideBackdrop:g=!1,ModalProps:{BackdropProps:x}={},onClose:w,open:v=!1,PaperProps:y={},SlideProps:_,TransitionComponent:E=lU,transitionDuration:A=o,variant:B="temporary"}=i,U=vn(i.ModalProps,Bee),L=vn(i,Uee),K=Z.exports.useRef(!1);Z.exports.useEffect(()=>{K.current=!0},[]);const V=$ee(a,s),z=Ue({},i,{anchor:s,elevation:d,open:v,variant:B},L),Y=Dee(z),oe=N(Nee,Ue({elevation:B==="temporary"?d:0,square:!0},y,{className:dn(Y.paper,y.className),ownerState:z,children:u}));if(B==="permanent")return N(aT,Ue({className:dn(Y.root,Y.docked,c),ownerState:z,ref:r},L,{children:oe}));const q=N(E,Ue({in:v,direction:cU[V],timeout:A,appear:K.current},_,{children:oe}));return B==="persistent"?N(aT,Ue({className:dn(Y.root,Y.docked,c),ownerState:z,ref:r},L,{children:q})):N(Lee,Ue({BackdropProps:Ue({},l,x,{transitionDuration:A}),className:dn(Y.root,Y.modal,c),open:v,ownerState:z,onClose:w,hideBackdrop:g,ref:r},L,U,{children:q}))}),zee=Fee,Hee=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Wee=e=>{const{classes:t,disableUnderline:r}=e,a=ci({root:["root",!r&&"underline"],input:["input"]},dJ,t);return Ue({},t,a)},Vee=ar(_w,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...ww(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var r;const i=e.palette.mode==="light",a=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Ue({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Md.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Md.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(r=(e.vars||e).palette[t.color||"primary"])==null?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Md.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Md.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:a}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Md.disabled}, .${Md.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Md.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&Ue({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),qee=ar(Sw,{name:"MuiFilledInput",slot:"Input",overridesResolver:xw})(({theme:e,ownerState:t})=>Ue({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9})),dU=Z.exports.forwardRef(function(t,r){var i,a,o,s;const l=pi({props:t,name:"MuiFilledInput"}),{components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:g="input",multiline:x=!1,slotProps:w,slots:v={},type:y="text"}=l,_=vn(l,Hee),E=Ue({},l,{fullWidth:d,inputComponent:g,multiline:x,type:y}),A=Wee(l),B={root:{ownerState:E},input:{ownerState:E}},U=w??c?ll(w??c,B):B,L=(i=(a=v.root)!=null?a:u.Root)!=null?i:Vee,K=(o=(s=v.input)!=null?s:u.Input)!=null?o:qee;return N(MC,Ue({slots:{root:L,input:K},componentsProps:U,fullWidth:d,inputComponent:g,multiline:x,ref:r,type:y},_,{classes:A}))});dU.muiName="Input";const fU=dU;function Kee(e){return oi("MuiFormControl",e)}Xn("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Gee=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Yee=e=>{const{classes:t,margin:r,fullWidth:i}=e,a={root:["root",r!=="none"&&`margin${Xr(r)}`,i&&"fullWidth"]};return ci(a,Kee,t)},Qee=ar("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>Ue({},t.root,t[`margin${Xr(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>Ue({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Xee=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiFormControl"}),{children:a,className:o,color:s="primary",component:l="div",disabled:u=!1,error:c=!1,focused:d,fullWidth:g=!1,hiddenLabel:x=!1,margin:w="none",required:v=!1,size:y="medium",variant:_="outlined"}=i,E=vn(i,Gee),A=Ue({},i,{color:s,component:l,disabled:u,error:c,fullWidth:g,hiddenLabel:x,margin:w,required:v,size:y,variant:_}),B=Yee(A),[U,L]=Z.exports.useState(()=>{let ae=!1;return a&&Z.exports.Children.forEach(a,M=>{if(!Tv(M,["Input","Select"]))return;const te=Tv(M,["Select"])?M.props.input:M;te&&eJ(te.props)&&(ae=!0)}),ae}),[K,V]=Z.exports.useState(()=>{let ae=!1;return a&&Z.exports.Children.forEach(a,M=>{!Tv(M,["Input","Select"])||PC(M.props,!0)&&(ae=!0)}),ae}),[H,z]=Z.exports.useState(!1);u&&H&&z(!1);const Y=d!==void 0&&!u?d:H;let oe;const q=Z.exports.useMemo(()=>({adornedStart:U,setAdornedStart:L,color:s,disabled:u,error:c,filled:K,focused:Y,fullWidth:g,hiddenLabel:x,size:y,onBlur:()=>{z(!1)},onEmpty:()=>{V(!1)},onFilled:()=>{V(!0)},onFocus:()=>{z(!0)},registerEffect:oe,required:v,variant:_}),[U,s,u,c,K,Y,g,x,oe,v,y,_]);return N(RC.Provider,{value:q,children:N(Qee,Ue({as:l,ownerState:A,className:dn(B.root,o),ref:r},E,{children:a}))})}),pU=Xee;function Zee(e){return oi("MuiFormHelperText",e)}const Jee=Xn("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),sT=Jee;var lT;const ete=["children","className","component","disabled","error","filled","focused","margin","required","variant"],tte=e=>{const{classes:t,contained:r,size:i,disabled:a,error:o,filled:s,focused:l,required:u}=e,c={root:["root",a&&"disabled",o&&"error",i&&`size${Xr(i)}`,r&&"contained",l&&"focused",s&&"filled",u&&"required"]};return ci(c,Zee,t)},rte=ar("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${Xr(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(({theme:e,ownerState:t})=>Ue({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${sT.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${sT.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),nte=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiFormHelperText"}),{children:a,className:o,component:s="p"}=i,l=vn(i,ete),u=Yf(),c=Uh({props:i,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),d=Ue({},i,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),g=tte(d);return N(rte,Ue({as:s,ownerState:d,className:dn(g.root,o),ref:r},l,{children:a===" "?lT||(lT=N("span",{className:"notranslate",children:"\u200B"})):a}))}),ite=nte;function ote(e){return oi("MuiFormLabel",e)}const ate=Xn("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Em=ate,ste=["children","className","color","component","disabled","error","filled","focused","required"],lte=e=>{const{classes:t,color:r,focused:i,disabled:a,error:o,filled:s,required:l}=e,u={root:["root",`color${Xr(r)}`,a&&"disabled",o&&"error",s&&"filled",i&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return ci(u,ote,t)},ute=ar("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>Ue({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>Ue({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Em.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Em.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Em.error}`]:{color:(e.vars||e).palette.error.main}})),cte=ar("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Em.error}`]:{color:(e.vars||e).palette.error.main}})),dte=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiFormLabel"}),{children:a,className:o,component:s="label"}=i,l=vn(i,ste),u=Yf(),c=Uh({props:i,muiFormControl:u,states:["color","required","focused","disabled","error","filled"]}),d=Ue({},i,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),g=lte(d);return Bt(ute,Ue({as:s,ownerState:d,className:dn(g.root,o),ref:r},l,{children:[a,c.required&&Bt(cte,{ownerState:d,"aria-hidden":!0,className:g.asterisk,children:["\u2009","*"]})]}))}),hU=dte,fte=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function j3(e){return`scale(${e}, ${e**2})`}const pte={entering:{opacity:1,transform:j3(1)},entered:{opacity:1,transform:"none"}},s_=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),gU=Z.exports.forwardRef(function(t,r){const{addEndListener:i,appear:a=!0,children:o,easing:s,in:l,onEnter:u,onEntered:c,onEntering:d,onExit:g,onExited:x,onExiting:w,style:v,timeout:y="auto",TransitionComponent:_=vw}=t,E=vn(t,fte),A=Z.exports.useRef(),B=Z.exports.useRef(),U=sa(),L=Z.exports.useRef(null),K=zo(L,o.ref,r),V=te=>ue=>{if(te){const he=L.current;ue===void 0?te(he):te(he,ue)}},H=V(d),z=V((te,ue)=>{IC(te);const{duration:he,delay:xe,easing:J}=ld({style:v,timeout:y,easing:s},{mode:"enter"});let ct;y==="auto"?(ct=U.transitions.getAutoHeightDuration(te.clientHeight),B.current=ct):ct=he,te.style.transition=[U.transitions.create("opacity",{duration:ct,delay:xe}),U.transitions.create("transform",{duration:s_?ct:ct*.666,delay:xe,easing:J})].join(","),u&&u(te,ue)}),Y=V(c),oe=V(w),q=V(te=>{const{duration:ue,delay:he,easing:xe}=ld({style:v,timeout:y,easing:s},{mode:"exit"});let J;y==="auto"?(J=U.transitions.getAutoHeightDuration(te.clientHeight),B.current=J):J=ue,te.style.transition=[U.transitions.create("opacity",{duration:J,delay:he}),U.transitions.create("transform",{duration:s_?J:J*.666,delay:s_?he:he||J*.333,easing:xe})].join(","),te.style.opacity=0,te.style.transform=j3(.75),g&&g(te)}),ae=V(x),M=te=>{y==="auto"&&(A.current=setTimeout(te,B.current||0)),i&&i(L.current,te)};return Z.exports.useEffect(()=>()=>{clearTimeout(A.current)},[]),N(_,Ue({appear:a,in:l,nodeRef:L,onEnter:z,onEntered:Y,onEntering:H,onExit:q,onExited:ae,onExiting:oe,addEndListener:M,timeout:y==="auto"?null:y},E,{children:(te,ue)=>Z.exports.cloneElement(o,Ue({style:Ue({opacity:0,transform:j3(.75),visibility:te==="exited"&&!l?"hidden":void 0},pte[te],v,o.props.style),ref:K},ue))}))});gU.muiSupportAuto=!0;const $3=gU;function hte(e,t,r,i,a){const o=typeof window<"u"&&typeof window.matchMedia<"u",[s,l]=Z.exports.useState(()=>a&&o?r(e).matches:i?i(e).matches:t);return Nl(()=>{let u=!0;if(!o)return;const c=r(e),d=()=>{u&&l(c.matches)};return d(),c.addListener(d),()=>{u=!1,c.removeListener(d)}},[e,r,o]),s}const mU=cf["useSyncExternalStore"];function gte(e,t,r,i){const a=Z.exports.useCallback(()=>t,[t]),o=Z.exports.useMemo(()=>{if(i!==null){const{matches:c}=i(e);return()=>c}return a},[a,e,i]),[s,l]=Z.exports.useMemo(()=>{if(r===null)return[a,()=>()=>{}];const c=r(e);return[()=>c.matches,d=>(c.addListener(d),()=>{c.removeListener(d)})]},[a,r,e]);return mU(l,s,o)}function ra(e,t={}){const r=gC(),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:o=i?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l}=F9({name:"MuiUseMediaQuery",props:t,theme:r});let u=typeof e=="function"?e(r):e;return u=u.replace(/^@media( ?)/m,""),(mU!==void 0?gte:hte)(u,a,o,s,l)}const mte=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],yte=e=>{const{classes:t,disableUnderline:r}=e,a=ci({root:["root",!r&&"underline"],input:["input"]},sJ,t);return Ue({},t,a)},vte=ar(_w,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...ww(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let i=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(i=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),Ue({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Sg.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Sg.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Sg.disabled}, .${Sg.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${i}`}},[`&.${Sg.disabled}:before`]:{borderBottomStyle:"dotted"}})}),bte=ar(Sw,{name:"MuiInput",slot:"Input",overridesResolver:xw})({}),yU=Z.exports.forwardRef(function(t,r){var i,a,o,s;const l=pi({props:t,name:"MuiInput"}),{disableUnderline:u,components:c={},componentsProps:d,fullWidth:g=!1,inputComponent:x="input",multiline:w=!1,slotProps:v,slots:y={},type:_="text"}=l,E=vn(l,mte),A=yte(l),U={root:{ownerState:{disableUnderline:u}}},L=v??d?ll(v??d,U):U,K=(i=(a=y.root)!=null?a:c.Root)!=null?i:vte,V=(o=(s=y.input)!=null?s:c.Input)!=null?o:bte;return N(MC,Ue({slots:{root:K,input:V},slotProps:L,fullWidth:g,inputComponent:x,multiline:w,ref:r,type:_},E,{classes:A}))});yU.muiName="Input";const vU=yU;function wte(e){return oi("MuiInputLabel",e)}Xn("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const xte=["disableAnimation","margin","shrink","variant","className"],_te=e=>{const{classes:t,formControl:r,size:i,shrink:a,disableAnimation:o,variant:s,required:l}=e,c=ci({root:["root",r&&"formControl",!o&&"animated",a&&"shrink",i==="small"&&"sizeSmall",s],asterisk:[l&&"asterisk"]},wte,t);return Ue({},t,c)},Ste=ar(hU,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Em.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,t[r.variant]]}})(({theme:e,ownerState:t})=>Ue({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&Ue({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&Ue({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&Ue({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))),Cte=Z.exports.forwardRef(function(t,r){const i=pi({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,shrink:o,className:s}=i,l=vn(i,xte),u=Yf();let c=o;typeof c>"u"&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Uh({props:i,muiFormControl:u,states:["size","variant","required"]}),g=Ue({},i,{disableAnimation:a,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required}),x=_te(g);return N(Ste,Ue({"data-shrink":c,ownerState:g,ref:r,className:dn(x.root,s)},l,{classes:x}))}),Ete=Cte;function kte(e){return oi("MuiLink",e)}const Ate=Xn("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Tte=Ate,bU={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ite=e=>bU[e]||e,Rte=({theme:e,ownerState:t})=>{const r=Ite(t.color),i=ch(e,`palette.${r}`,!1)||t.color,a=ch(e,`palette.${r}Channel`);return"vars"in e&&a?`rgba(${a} / 0.4)`:Yi(i,.4)},Pte=Rte,Mte=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Ote=e=>{const{classes:t,component:r,focusVisible:i,underline:a}=e,o={root:["root",`underline${Xr(a)}`,r==="button"&&"button",i&&"focusVisible"]};return ci(o,kte,t)},Bte=ar(Io,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${Xr(r.underline)}`],r.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>Ue({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&Ue({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:Pte({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Tte.focusVisible}`]:{outline:"auto"}})),Ute=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiLink"}),{className:a,color:o="primary",component:s="a",onBlur:l,onFocus:u,TypographyClasses:c,underline:d="always",variant:g="inherit",sx:x}=i,w=vn(i,Mte),{isFocusVisibleRef:v,onBlur:y,onFocus:_,ref:E}=Vb(),[A,B]=Z.exports.useState(!1),U=zo(r,E),L=z=>{y(z),v.current===!1&&B(!1),l&&l(z)},K=z=>{_(z),v.current===!0&&B(!0),u&&u(z)},V=Ue({},i,{color:o,component:s,focusVisible:A,underline:d,variant:g}),H=Ote(V);return N(Bte,Ue({color:o,className:dn(H.root,a),classes:c,component:s,onBlur:L,onFocus:K,ref:U,ownerState:V,variant:g,sx:[...Object.keys(bU).includes(o)?[]:[{color:o}],...Array.isArray(x)?x:[x]]},w))}),Ku=Ute,Dte=Z.exports.createContext({}),F3=Dte;function Lte(e){return oi("MuiList",e)}Xn("MuiList",["root","padding","dense","subheader"]);const Nte=["children","className","component","dense","disablePadding","subheader"],jte=e=>{const{classes:t,disablePadding:r,dense:i,subheader:a}=e;return ci({root:["root",!r&&"padding",i&&"dense",a&&"subheader"]},Lte,t)},$te=ar("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>Ue({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Fte=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiList"}),{children:a,className:o,component:s="ul",dense:l=!1,disablePadding:u=!1,subheader:c}=i,d=vn(i,Nte),g=Z.exports.useMemo(()=>({dense:l}),[l]),x=Ue({},i,{component:s,dense:l,disablePadding:u}),w=jte(x);return N(F3.Provider,{value:g,children:Bt($te,Ue({as:s,className:dn(w.root,o),ref:r,ownerState:x},d,{children:[c,a]}))})}),zte=Fte,Hte=Xn("MuiListItemIcon",["root","alignItemsFlexStart"]),uT=Hte,Wte=Xn("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),cT=Wte,Vte=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function l_(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function dT(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function wU(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function Cg(e,t,r,i,a,o){let s=!1,l=a(e,t,t?r:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const u=i?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!wU(l,o)||u)l=a(e,l,r);else return l.focus(),!0}return!1}const qte=Z.exports.forwardRef(function(t,r){const{actions:i,autoFocus:a=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:u=!1,disableListWrap:c=!1,onKeyDown:d,variant:g="selectedMenu"}=t,x=vn(t,Vte),w=Z.exports.useRef(null),v=Z.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Nl(()=>{a&&w.current.focus()},[a]),Z.exports.useImperativeHandle(i,()=>({adjustStyleForScrollbar:(B,U)=>{const L=!w.current.style.width;if(B.clientHeight{const U=w.current,L=B.key,K=pa(U).activeElement;if(L==="ArrowDown")B.preventDefault(),Cg(U,K,c,u,l_);else if(L==="ArrowUp")B.preventDefault(),Cg(U,K,c,u,dT);else if(L==="Home")B.preventDefault(),Cg(U,null,c,u,l_);else if(L==="End")B.preventDefault(),Cg(U,null,c,u,dT);else if(L.length===1){const V=v.current,H=L.toLowerCase(),z=performance.now();V.keys.length>0&&(z-V.lastTime>500?(V.keys=[],V.repeating=!0,V.previousKeyMatched=!0):V.repeating&&H!==V.keys[0]&&(V.repeating=!1)),V.lastTime=z,V.keys.push(H);const Y=K&&!V.repeating&&wU(K,V);V.previousKeyMatched&&(Y||Cg(U,K,!1,u,l_,V))?B.preventDefault():V.previousKeyMatched=!1}d&&d(B)},_=zo(w,r);let E=-1;Z.exports.Children.forEach(s,(B,U)=>{!Z.exports.isValidElement(B)||B.props.disabled||(g==="selectedMenu"&&B.props.selected||E===-1)&&(E=U)});const A=Z.exports.Children.map(s,(B,U)=>{if(U===E){const L={};return o&&(L.autoFocus=!0),B.props.tabIndex===void 0&&g==="selectedMenu"&&(L.tabIndex=0),Z.exports.cloneElement(B,L)}return B});return N(zte,Ue({role:"menu",ref:_,className:l,onKeyDown:y,tabIndex:a?0:-1},x,{children:A}))}),Kte=qte;function Gte(e){return oi("MuiPopover",e)}Xn("MuiPopover",["root","paper"]);const Yte=["onEntering"],Qte=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function fT(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function pT(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function hT(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function u_(e){return typeof e=="function"?e():e}const Xte=e=>{const{classes:t}=e;return ci({root:["root"],paper:["paper"]},Gte,t)},Zte=ar(OC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Jte=ar(F0,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ere=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiPopover"}),{action:a,anchorEl:o,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:u="anchorEl",children:c,className:d,container:g,elevation:x=8,marginThreshold:w=16,open:v,PaperProps:y={},transformOrigin:_={vertical:"top",horizontal:"left"},TransitionComponent:E=$3,transitionDuration:A="auto",TransitionProps:{onEntering:B}={}}=i,U=vn(i.TransitionProps,Yte),L=vn(i,Qte),K=Z.exports.useRef(),V=zo(K,y.ref),H=Ue({},i,{anchorOrigin:s,anchorReference:u,elevation:x,marginThreshold:w,PaperProps:y,transformOrigin:_,TransitionComponent:E,transitionDuration:A,TransitionProps:U}),z=Xte(H),Y=Z.exports.useCallback(()=>{if(u==="anchorPosition")return l;const ct=u_(o),ze=(ct&&ct.nodeType===1?ct:pa(K.current).body).getBoundingClientRect();return{top:ze.top+fT(ze,s.vertical),left:ze.left+pT(ze,s.horizontal)}},[o,s.horizontal,s.vertical,l,u]),oe=Z.exports.useCallback(ct=>({vertical:fT(ct,_.vertical),horizontal:pT(ct,_.horizontal)}),[_.horizontal,_.vertical]),q=Z.exports.useCallback(ct=>{const De={width:ct.offsetWidth,height:ct.offsetHeight},ze=oe(De);if(u==="none")return{top:null,left:null,transformOrigin:hT(ze)};const ir=Y();let Rt=ir.top-ze.vertical,At=ir.left-ze.horizontal;const Xt=Rt+De.height,vr=At+De.width,Et=hl(u_(o)),St=Et.innerHeight-w,xt=Et.innerWidth-w;if(RtSt){const Ut=Xt-St;Rt-=Ut,ze.vertical+=Ut}if(Atxt){const Ut=vr-xt;At-=Ut,ze.horizontal+=Ut}return{top:`${Math.round(Rt)}px`,left:`${Math.round(At)}px`,transformOrigin:hT(ze)}},[o,u,Y,oe,w]),[ae,M]=Z.exports.useState(v),te=Z.exports.useCallback(()=>{const ct=K.current;if(!ct)return;const De=q(ct);De.top!==null&&(ct.style.top=De.top),De.left!==null&&(ct.style.left=De.left),ct.style.transformOrigin=De.transformOrigin,M(!0)},[q]),ue=(ct,De)=>{B&&B(ct,De),te()},he=()=>{M(!1)};Z.exports.useEffect(()=>{v&&te()}),Z.exports.useImperativeHandle(a,()=>v?{updatePosition:()=>{te()}}:null,[v,te]),Z.exports.useEffect(()=>{if(!v)return;const ct=mf(()=>{te()}),De=hl(o);return De.addEventListener("resize",ct),()=>{ct.clear(),De.removeEventListener("resize",ct)}},[o,v,te]);let xe=A;A==="auto"&&!E.muiSupportAuto&&(xe=void 0);const J=g||(o?pa(u_(o)).body:void 0);return N(Zte,Ue({BackdropProps:{invisible:!0},className:dn(z.root,d),container:J,open:v,ref:r,ownerState:H},L,{children:N(E,Ue({appear:!0,in:v,onEntering:ue,onExited:he,timeout:xe},U,{children:N(Jte,Ue({elevation:x},y,{ref:V,className:dn(z.paper,y.className)},ae?void 0:{style:Ue({},y.style,{opacity:0})},{ownerState:H,children:c}))}))}))}),tre=ere;function rre(e){return oi("MuiMenu",e)}Xn("MuiMenu",["root","paper","list"]);const nre=["onEntering"],ire=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],ore={vertical:"top",horizontal:"right"},are={vertical:"top",horizontal:"left"},sre=e=>{const{classes:t}=e;return ci({root:["root"],paper:["paper"],list:["list"]},rre,t)},lre=ar(tre,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ure=ar(F0,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),cre=ar(Kte,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),dre=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:o,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:c,PaperProps:d={},PopoverClasses:g,transitionDuration:x="auto",TransitionProps:{onEntering:w}={},variant:v="selectedMenu"}=i,y=vn(i.TransitionProps,nre),_=vn(i,ire),E=sa(),A=E.direction==="rtl",B=Ue({},i,{autoFocus:a,disableAutoFocusItem:s,MenuListProps:l,onEntering:w,PaperProps:d,transitionDuration:x,TransitionProps:y,variant:v}),U=sre(B),L=a&&!s&&c,K=Z.exports.useRef(null),V=(Y,oe)=>{K.current&&K.current.adjustStyleForScrollbar(Y,E),w&&w(Y,oe)},H=Y=>{Y.key==="Tab"&&(Y.preventDefault(),u&&u(Y,"tabKeyDown"))};let z=-1;return Z.exports.Children.map(o,(Y,oe)=>{!Z.exports.isValidElement(Y)||Y.props.disabled||(v==="selectedMenu"&&Y.props.selected||z===-1)&&(z=oe)}),N(lre,Ue({onClose:u,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?ore:are,PaperProps:Ue({component:ure},d,{classes:Ue({},d.classes,{root:U.paper})}),className:U.root,open:c,ref:r,transitionDuration:x,TransitionProps:Ue({onEntering:V},y),ownerState:B},_,{classes:g,children:N(cre,Ue({onKeyDown:H,actions:K,autoFocus:a&&(z===-1||s),autoFocusItem:L,variant:v},l,{className:dn(U.list,l.className),children:o}))}))}),fre=dre;function pre(e){return oi("MuiMenuItem",e)}const hre=Xn("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Eg=hre,gre=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],mre=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},yre=e=>{const{disabled:t,dense:r,divider:i,disableGutters:a,selected:o,classes:s}=e,u=ci({root:["root",r&&"dense",t&&"disabled",!a&&"gutters",i&&"divider",o&&"selected"]},pre,s);return Ue({},s,u)},vre=ar(ud,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:mre})(({theme:e,ownerState:t})=>Ue({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Eg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Eg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Eg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Eg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Eg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${oT.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${oT.inset}`]:{marginLeft:52},[`& .${cT.root}`]:{marginTop:0,marginBottom:0},[`& .${cT.inset}`]:{paddingLeft:36},[`& .${uT.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&Ue({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${uT.root} svg`]:{fontSize:"1.25rem"}}))),bre=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiMenuItem"}),{autoFocus:a=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:u=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:g,className:x}=i,w=vn(i,gre),v=Z.exports.useContext(F3),y=Z.exports.useMemo(()=>({dense:s||v.dense||!1,disableGutters:u}),[v.dense,s,u]),_=Z.exports.useRef(null);Nl(()=>{a&&_.current&&_.current.focus()},[a]);const E=Ue({},i,{dense:y.dense,divider:l,disableGutters:u}),A=yre(i),B=zo(_,r);let U;return i.disabled||(U=g!==void 0?g:-1),N(F3.Provider,{value:y,children:N(vre,Ue({ref:B,role:d,tabIndex:U,component:o,focusVisibleClassName:dn(A.focusVisible,c),className:dn(A.root,x)},w,{ownerState:E,classes:A}))})}),kg=bre;function wre(e){return oi("MuiNativeSelect",e)}const xre=Xn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),UC=xre,_re=["className","disabled","IconComponent","inputRef","variant"],Sre=e=>{const{classes:t,variant:r,disabled:i,multiple:a,open:o}=e,s={select:["select",r,i&&"disabled",a&&"multiple"],icon:["icon",`icon${Xr(r)}`,o&&"iconOpen",i&&"disabled"]};return ci(s,wre,t)},xU=({ownerState:e,theme:t})=>Ue({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Ue({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${UC.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),Cre=ar("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Wl,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],{[`&.${UC.multiple}`]:t.multiple}]}})(xU),_U=({ownerState:e,theme:t})=>Ue({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${UC.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Ere=ar("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Xr(r.variant)}`],r.open&&t.iconOpen]}})(_U),kre=Z.exports.forwardRef(function(t,r){const{className:i,disabled:a,IconComponent:o,inputRef:s,variant:l="standard"}=t,u=vn(t,_re),c=Ue({},t,{disabled:a,variant:l}),d=Sre(c);return Bt(Z.exports.Fragment,{children:[N(Cre,Ue({ownerState:c,className:dn(d.select,i),disabled:a,ref:s||r},u)),t.multiple?null:N(Ere,{as:o,ownerState:c,className:d.icon})]})}),Are=kre;var gT;const Tre=["children","classes","className","label","notched"],Ire=ar("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Rre=ar("legend")(({ownerState:e,theme:t})=>Ue({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&Ue({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function Pre(e){const{className:t,label:r,notched:i}=e,a=vn(e,Tre),o=r!=null&&r!=="",s=Ue({},e,{notched:i,withLabel:o});return N(Ire,Ue({"aria-hidden":!0,className:t,ownerState:s},a,{children:N(Rre,{ownerState:s,children:o?N("span",{children:r}):gT||(gT=N("span",{className:"notranslate",children:"\u200B"}))})}))}const Mre=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Ore=e=>{const{classes:t}=e,i=ci({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},uJ,t);return Ue({},t,i)},Bre=ar(_w,{shouldForwardProp:e=>Wl(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ww})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Ue({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Cc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${Cc.focused} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Cc.error} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Cc.disabled} .${Cc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&Ue({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),Ure=ar(Pre,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Dre=ar(Sw,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:xw})(({theme:e,ownerState:t})=>Ue({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),SU=Z.exports.forwardRef(function(t,r){var i,a,o,s,l;const u=pi({props:t,name:"MuiOutlinedInput"}),{components:c={},fullWidth:d=!1,inputComponent:g="input",label:x,multiline:w=!1,notched:v,slots:y={},type:_="text"}=u,E=vn(u,Mre),A=Ore(u),B=Yf(),U=Uh({props:u,muiFormControl:B,states:["required"]}),L=Ue({},u,{color:U.color||"primary",disabled:U.disabled,error:U.error,focused:U.focused,formControl:B,fullWidth:d,hiddenLabel:U.hiddenLabel,multiline:w,size:U.size,type:_}),K=(i=(a=y.root)!=null?a:c.Root)!=null?i:Bre,V=(o=(s=y.input)!=null?s:c.Input)!=null?o:Dre;return N(MC,Ue({slots:{root:K,input:V},renderSuffix:H=>N(Ure,{ownerState:L,className:A.notchedOutline,label:x!=null&&x!==""&&U.required?l||(l=Bt(Z.exports.Fragment,{children:[x,"\xA0","*"]})):x,notched:typeof v<"u"?v:Boolean(H.startAdornment||H.filled||H.focused)}),fullWidth:d,inputComponent:g,multiline:w,ref:r,type:_},E,{classes:Ue({},A,{notchedOutline:null})}))});SU.muiName="Input";const CU=SU;function Lre(e){return oi("MuiSelect",e)}const Nre=Xn("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Ky=Nre;var mT;const jre=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$re=ar("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${Ky.select}`]:t.select},{[`&.${Ky.select}`]:t[r.variant]},{[`&.${Ky.multiple}`]:t.multiple}]}})(xU,{[`&.${Ky.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Fre=ar("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Xr(r.variant)}`],r.open&&t.iconOpen]}})(_U),zre=ar("input",{shouldForwardProp:e=>$Y(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yT(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Hre(e){return e==null||typeof e=="string"&&!e.trim()}const Wre=e=>{const{classes:t,variant:r,disabled:i,multiple:a,open:o}=e,s={select:["select",r,i&&"disabled",a&&"multiple"],icon:["icon",`icon${Xr(r)}`,o&&"iconOpen",i&&"disabled"],nativeInput:["nativeInput"]};return ci(s,Lre,t)},Vre=Z.exports.forwardRef(function(t,r){const{"aria-describedby":i,"aria-label":a,autoFocus:o,autoWidth:s,children:l,className:u,defaultOpen:c,defaultValue:d,disabled:g,displayEmpty:x,IconComponent:w,inputRef:v,labelId:y,MenuProps:_={},multiple:E,name:A,onBlur:B,onChange:U,onClose:L,onFocus:K,onOpen:V,open:H,readOnly:z,renderValue:Y,SelectDisplayProps:oe={},tabIndex:q,value:ae,variant:M="standard"}=t,te=vn(t,jre),[ue,he]=Zm({controlled:ae,default:d,name:"Select"}),[xe,J]=Zm({controlled:H,default:c,name:"Select"}),ct=Z.exports.useRef(null),De=Z.exports.useRef(null),[ze,ir]=Z.exports.useState(null),{current:Rt}=Z.exports.useRef(H!=null),[At,Xt]=Z.exports.useState(),vr=zo(r,v),Et=Z.exports.useCallback(R=>{De.current=R,R&&ir(R)},[]),St=ze?.parentNode;Z.exports.useImperativeHandle(vr,()=>({focus:()=>{De.current.focus()},node:ct.current,value:ue}),[ue]),Z.exports.useEffect(()=>{c&&xe&&ze&&!Rt&&(Xt(s?null:St.clientWidth),De.current.focus())},[ze,s]),Z.exports.useEffect(()=>{o&&De.current.focus()},[o]),Z.exports.useEffect(()=>{if(!y)return;const R=pa(De.current).getElementById(y);if(R){const Q=()=>{getSelection().isCollapsed&&De.current.focus()};return R.addEventListener("click",Q),()=>{R.removeEventListener("click",Q)}}},[y]);const xt=(R,Q)=>{R?V&&V(Q):L&&L(Q),Rt||(Xt(s?null:St.clientWidth),J(R))},Ut=R=>{R.button===0&&(R.preventDefault(),De.current.focus(),xt(!0,R))},Gt=R=>{xt(!1,R)},mr=Z.exports.Children.toArray(l),ne=R=>{const Q=mr.map(je=>je.props.value).indexOf(R.target.value);if(Q===-1)return;const me=mr[Q];he(me.props.value),U&&U(R,me)},Pt=R=>Q=>{let me;if(!!Q.currentTarget.hasAttribute("tabindex")){if(E){me=Array.isArray(ue)?ue.slice():[];const je=ue.indexOf(R.props.value);je===-1?me.push(R.props.value):me.splice(je,1)}else me=R.props.value;if(R.props.onClick&&R.props.onClick(Q),ue!==me&&(he(me),U)){const je=Q.nativeEvent||Q,lt=new je.constructor(je.type,je);Object.defineProperty(lt,"target",{writable:!0,value:{value:me,name:A}}),U(lt,R)}E||xt(!1,Q)}},Dt=R=>{z||[" ","ArrowUp","ArrowDown","Enter"].indexOf(R.key)!==-1&&(R.preventDefault(),xt(!0,R))},Te=ze!==null&&xe,Ae=R=>{!Te&&B&&(Object.defineProperty(R,"target",{writable:!0,value:{value:ue,name:A}}),B(R))};delete te["aria-invalid"];let ot,$t;const tr=[];let Ot=!1;(PC({value:ue})||x)&&(Y?ot=Y(ue):Ot=!0);const br=mr.map((R,Q,me)=>{var je,lt,ur,Dr;if(!Z.exports.isValidElement(R))return null;let hr;if(E){if(!Array.isArray(ue))throw new Error(sd(2));hr=ue.some(Gr=>yT(Gr,R.props.value)),hr&&Ot&&tr.push(R.props.children)}else hr=yT(ue,R.props.value),hr&&Ot&&($t=R.props.children);if(R.props.value===void 0)return Z.exports.cloneElement(R,{"aria-readonly":!0,role:"option"});const Rr=()=>{if(ue)return hr;const Gr=me.find(Nr=>{var Vn;return(Nr==null||(Vn=Nr.props)==null?void 0:Vn.value)!==void 0&&Nr.props.disabled!==!0});return R===Gr?!0:hr};return Z.exports.cloneElement(R,{"aria-selected":hr?"true":"false",onClick:Pt(R),onKeyUp:Gr=>{Gr.key===" "&&Gr.preventDefault(),R.props.onKeyUp&&R.props.onKeyUp(Gr)},role:"option",selected:((je=me[0])==null||(lt=je.props)==null?void 0:lt.value)===void 0||((ur=me[0])==null||(Dr=ur.props)==null?void 0:Dr.disabled)===!0?Rr():hr,value:void 0,"data-value":R.props.value})});Ot&&(E?tr.length===0?ot=null:ot=tr.reduce((R,Q,me)=>(R.push(Q),me{const{classes:t}=e;return t},DC={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Wl(e)&&e!=="variant",slot:"Root"},Yre=ar(vU,DC)(""),Qre=ar(CU,DC)(""),Xre=ar(fU,DC)(""),EU=Z.exports.forwardRef(function(t,r){const i=pi({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:o,classes:s={},className:l,defaultOpen:u=!1,displayEmpty:c=!1,IconComponent:d=pJ,id:g,input:x,inputProps:w,label:v,labelId:y,MenuProps:_,multiple:E=!1,native:A=!1,onClose:B,onOpen:U,open:L,renderValue:K,SelectDisplayProps:V,variant:H="outlined"}=i,z=vn(i,Kre),Y=A?Are:qre,oe=Yf(),ae=Uh({props:i,muiFormControl:oe,states:["variant"]}).variant||H,M=x||{standard:vT||(vT=N(Yre,{})),outlined:N(Qre,{label:v}),filled:bT||(bT=N(Xre,{}))}[ae],te=Ue({},i,{variant:ae,classes:s}),ue=Gre(te),he=zo(r,M.ref);return N(Z.exports.Fragment,{children:Z.exports.cloneElement(M,Ue({inputComponent:Y,inputProps:Ue({children:o,IconComponent:d,variant:ae,type:void 0,multiple:E},A?{id:g}:{autoWidth:a,defaultOpen:u,displayEmpty:c,labelId:y,MenuProps:_,onClose:B,onOpen:U,open:L,renderValue:K,SelectDisplayProps:Ue({id:g},V)},w,{classes:w?ll(ue,w.classes):ue},x?x.props.inputProps:{})},E&&A&&ae==="outlined"?{notched:!0}:{},{ref:he,className:dn(M.props.className,l)},!x&&{variant:ae},z))})});EU.muiName="Select";const kU=EU;function Zre(e){return oi("MuiSkeleton",e)}Xn("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Jre=["animation","className","component","height","style","variant","width"];let x1=e=>e,wT,xT,_T,ST;const ene=e=>{const{classes:t,variant:r,animation:i,hasChildren:a,width:o,height:s}=e;return ci({root:["root",r,i,a&&"withChildren",a&&!o&&"fitContent",a&&!s&&"heightAuto"]},Zre,t)},tne=Gf(wT||(wT=x1` - 0% { - opacity: 1; - } - - 50% { - opacity: 0.4; - } - - 100% { - opacity: 1; - } -`)),rne=Gf(xT||(xT=x1` - 0% { - transform: translateX(-100%); - } - - 50% { - /* +0.5s of delay between each loop */ - transform: translateX(100%); - } - - 100% { - transform: translateX(100%); - } -`)),nne=ar("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.animation!==!1&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const r=LY(e.shape.borderRadius)||"px",i=NY(e.shape.borderRadius);return Ue({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Yi(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${i}${r}/${Math.round(i/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&r0(_T||(_T=x1` - animation: ${0} 1.5s ease-in-out 0.5s infinite; - `),tne),({ownerState:e,theme:t})=>e.animation==="wave"&&r0(ST||(ST=x1` - position: relative; - overflow: hidden; - - /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ - -webkit-mask-image: -webkit-radial-gradient(white, black); - - &::after { - animation: ${0} 1.6s linear 0.5s infinite; - background: linear-gradient( - 90deg, - transparent, - ${0}, - transparent - ); - content: ''; - position: absolute; - transform: translateX(-100%); /* Avoid flash during server-side hydration */ - bottom: 0; - left: 0; - right: 0; - top: 0; - } - `),rne,(t.vars||t).palette.action.hover)),ine=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiSkeleton"}),{animation:a="pulse",className:o,component:s="span",height:l,style:u,variant:c="text",width:d}=i,g=vn(i,Jre),x=Ue({},i,{animation:a,component:s,variant:c,hasChildren:Boolean(g.children)}),w=ene(x);return N(nne,Ue({as:s,ref:r,className:dn(w.root,o),ownerState:x},g,{style:Ue({width:d,height:l},u)}))}),qa=ine;function one(e){return oi("MuiTooltip",e)}const ane=Xn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Nc=ane,sne=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function lne(e){return Math.round(e*1e5)/1e5}const une=e=>{const{classes:t,disableInteractive:r,arrow:i,touch:a,placement:o}=e,s={popper:["popper",!r&&"popperInteractive",i&&"popperArrow"],tooltip:["tooltip",i&&"tooltipArrow",a&&"touch",`tooltipPlacement${Xr(o.split("-")[0])}`],arrow:["arrow"]};return ci(s,one,t)},cne=ar(rU,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>Ue({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Nc.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nc.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nc.arrow}`]:Ue({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Nc.arrow}`]:Ue({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),dne=ar("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Xr(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>Ue({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Yi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${lne(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Nc.popper}[data-popper-placement*="left"] &`]:Ue({transformOrigin:"right center"},t.isRtl?Ue({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):Ue({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Nc.popper}[data-popper-placement*="right"] &`]:Ue({transformOrigin:"left center"},t.isRtl?Ue({marginRight:"14px"},t.touch&&{marginRight:"24px"}):Ue({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Nc.popper}[data-popper-placement*="top"] &`]:Ue({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Nc.popper}[data-popper-placement*="bottom"] &`]:Ue({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),fne=ar("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Yi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Gy=!1,c_=null;function Yy(e,t){return r=>{t&&t(r),e(r)}}const pne=Z.exports.forwardRef(function(t,r){var i,a,o,s,l,u,c,d,g,x,w,v,y,_,E,A,B,U,L;const K=pi({props:t,name:"MuiTooltip"}),{arrow:V=!1,children:H,components:z={},componentsProps:Y={},describeChild:oe=!1,disableFocusListener:q=!1,disableHoverListener:ae=!1,disableInteractive:M=!1,disableTouchListener:te=!1,enterDelay:ue=100,enterNextDelay:he=0,enterTouchDelay:xe=700,followCursor:J=!1,id:ct,leaveDelay:De=0,leaveTouchDelay:ze=1500,onClose:ir,onOpen:Rt,open:At,placement:Xt="bottom",PopperComponent:vr,PopperProps:Et={},slotProps:St={},slots:xt={},title:Ut,TransitionComponent:Gt=$3,TransitionProps:mr}=K,ne=vn(K,sne),Pt=sa(),Dt=Pt.direction==="rtl",[Te,Ae]=Z.exports.useState(),[ot,$t]=Z.exports.useState(null),tr=Z.exports.useRef(!1),Ot=M||J,br=Z.exports.useRef(),be=Z.exports.useRef(),se=Z.exports.useRef(),ce=Z.exports.useRef(),[$,C]=Zm({controlled:At,default:!1,name:"Tooltip",state:"open"});let R=$;const Q=Hb(ct),me=Z.exports.useRef(),je=Z.exports.useCallback(()=>{me.current!==void 0&&(document.body.style.WebkitUserSelect=me.current,me.current=void 0),clearTimeout(ce.current)},[]);Z.exports.useEffect(()=>()=>{clearTimeout(br.current),clearTimeout(be.current),clearTimeout(se.current),je()},[je]);const lt=tt=>{clearTimeout(c_),Gy=!0,C(!0),Rt&&!R&&Rt(tt)},ur=al(tt=>{clearTimeout(c_),c_=setTimeout(()=>{Gy=!1},800+De),C(!1),ir&&R&&ir(tt),clearTimeout(br.current),br.current=setTimeout(()=>{tr.current=!1},Pt.transitions.duration.shortest)}),Dr=tt=>{tr.current&&tt.type!=="touchstart"||(Te&&Te.removeAttribute("title"),clearTimeout(be.current),clearTimeout(se.current),ue||Gy&&he?be.current=setTimeout(()=>{lt(tt)},Gy?he:ue):lt(tt))},hr=tt=>{clearTimeout(be.current),clearTimeout(se.current),se.current=setTimeout(()=>{ur(tt)},De)},{isFocusVisibleRef:Rr,onBlur:Gr,onFocus:Nr,ref:Vn}=Vb(),[,An]=Z.exports.useState(!1),Tn=tt=>{Gr(tt),Rr.current===!1&&(An(!1),hr(tt))},ht=tt=>{Te||Ae(tt.currentTarget),Nr(tt),Rr.current===!0&&(An(!0),Dr(tt))},Ci=tt=>{tr.current=!0;const st=H.props;st.onTouchStart&&st.onTouchStart(tt)},qn=Dr,Ii=hr,Xi=tt=>{Ci(tt),clearTimeout(se.current),clearTimeout(br.current),je(),me.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ce.current=setTimeout(()=>{document.body.style.WebkitUserSelect=me.current,Dr(tt)},xe)},Ho=tt=>{H.props.onTouchEnd&&H.props.onTouchEnd(tt),je(),clearTimeout(se.current),se.current=setTimeout(()=>{ur(tt)},ze)};Z.exports.useEffect(()=>{if(!R)return;function tt(st){(st.key==="Escape"||st.key==="Esc")&&ur(st)}return document.addEventListener("keydown",tt),()=>{document.removeEventListener("keydown",tt)}},[ur,R]);const Zi=zo(H.ref,Vn,Ae,r);!Ut&&Ut!==0&&(R=!1);const Ro=Z.exports.useRef({x:0,y:0}),zi=Z.exports.useRef(),ua=tt=>{const st=H.props;st.onMouseMove&&st.onMouseMove(tt),Ro.current={x:tt.clientX,y:tt.clientY},zi.current&&zi.current.update()},le={},Ie=typeof Ut=="string";oe?(le.title=!R&&Ie&&!ae?Ut:null,le["aria-describedby"]=R?Q:null):(le["aria-label"]=Ie?Ut:null,le["aria-labelledby"]=R&&!Ie?Q:null);const Ee=Ue({},le,ne,H.props,{className:dn(ne.className,H.props.className),onTouchStart:Ci,ref:Zi},J?{onMouseMove:ua}:{}),F={};te||(Ee.onTouchStart=Xi,Ee.onTouchEnd=Ho),ae||(Ee.onMouseOver=Yy(qn,Ee.onMouseOver),Ee.onMouseLeave=Yy(Ii,Ee.onMouseLeave),Ot||(F.onMouseOver=qn,F.onMouseLeave=Ii)),q||(Ee.onFocus=Yy(ht,Ee.onFocus),Ee.onBlur=Yy(Tn,Ee.onBlur),Ot||(F.onFocus=ht,F.onBlur=Tn));const Ne=Z.exports.useMemo(()=>{var tt;let st=[{name:"arrow",enabled:Boolean(ot),options:{element:ot,padding:4}}];return(tt=Et.popperOptions)!=null&&tt.modifiers&&(st=st.concat(Et.popperOptions.modifiers)),Ue({},Et.popperOptions,{modifiers:st})},[ot,Et]),Qt=Ue({},K,{isRtl:Dt,arrow:V,disableInteractive:Ot,placement:Xt,PopperComponentProp:vr,touch:tr.current}),or=une(Qt),Br=(i=(a=xt.popper)!=null?a:z.Popper)!=null?i:cne,Hr=(o=(s=(l=xt.transition)!=null?l:z.Transition)!=null?s:Gt)!=null?o:$3,kn=(u=(c=xt.tooltip)!=null?c:z.Tooltip)!=null?u:dne,un=(d=(g=xt.arrow)!=null?g:z.Arrow)!=null?d:fne,gt=im(Br,Ue({},Et,(x=St.popper)!=null?x:Y.popper,{className:dn(or.popper,Et?.className,(w=(v=St.popper)!=null?v:Y.popper)==null?void 0:w.className)}),Qt),W=im(Hr,Ue({},mr,(y=St.transition)!=null?y:Y.transition),Qt),ge=im(kn,Ue({},(_=St.tooltip)!=null?_:Y.tooltip,{className:dn(or.tooltip,(E=(A=St.tooltip)!=null?A:Y.tooltip)==null?void 0:E.className)}),Qt),Pe=im(un,Ue({},(B=St.arrow)!=null?B:Y.arrow,{className:dn(or.arrow,(U=(L=St.arrow)!=null?L:Y.arrow)==null?void 0:U.className)}),Qt);return Bt(Z.exports.Fragment,{children:[Z.exports.cloneElement(H,Ee),N(Br,Ue({as:vr??rU,placement:Xt,anchorEl:J?{getBoundingClientRect:()=>({top:Ro.current.y,left:Ro.current.x,right:Ro.current.x,bottom:Ro.current.y,width:0,height:0})}:Te,popperRef:zi,open:Te?R:!1,id:Q,transition:!0},F,gt,{popperOptions:Ne,children:({TransitionProps:tt})=>N(Hr,Ue({timeout:Pt.transitions.duration.shorter},tt,W,{children:Bt(kn,Ue({},ge,{children:[Ut,V?N(un,Ue({},Pe,{ref:$t})):null]}))}))}))]})}),AU=pne;function hne(e){return oi("MuiSwitch",e)}const gne=Xn("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),ts=gne,mne=["className","color","edge","size","sx"],yne=e=>{const{classes:t,edge:r,size:i,color:a,checked:o,disabled:s}=e,l={root:["root",r&&`edge${Xr(r)}`,`size${Xr(i)}`],switchBase:["switchBase",`color${Xr(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=ci(l,hne,t);return Ue({},t,u)},vne=ar("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${Xr(r.edge)}`],t[`size${Xr(r.size)}`]]}})(({ownerState:e})=>Ue({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${ts.thumb}`]:{width:16,height:16},[`& .${ts.switchBase}`]:{padding:4,[`&.${ts.checked}`]:{transform:"translateX(16px)"}}})),bne=ar($J,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${ts.input}`]:t.input},r.color!=="default"&&t[`color${Xr(r.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ts.checked}`]:{transform:"translateX(20px)"},[`&.${ts.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ts.checked} + .${ts.track}`]:{opacity:.5},[`&.${ts.disabled} + .${ts.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${ts.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>Ue({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${ts.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Yi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ts.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?gw(e.palette[t.color].main,.62):hw(e.palette[t.color].main,.55)}`}},[`&.${ts.checked} + .${ts.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),wne=ar("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),xne=ar("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),_ne=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:l="medium",sx:u}=i,c=vn(i,mne),d=Ue({},i,{color:o,edge:s,size:l}),g=yne(d),x=N(xne,{className:g.thumb,ownerState:d});return Bt(vne,{className:dn(g.root,a),sx:u,ownerState:d,children:[N(bne,Ue({type:"checkbox",icon:x,checkedIcon:x,ref:r,ownerState:d},c,{classes:Ue({},g,{root:g.switchBase})})),N(wne,{className:g.track,ownerState:d})]})}),Sne=_ne;function Cne(e){return oi("MuiTab",e)}const Ene=Xn("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Od=Ene,kne=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Ane=e=>{const{classes:t,textColor:r,fullWidth:i,wrapped:a,icon:o,label:s,selected:l,disabled:u}=e,c={root:["root",o&&s&&"labelIcon",`textColor${Xr(r)}`,i&&"fullWidth",a&&"wrapped",l&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return ci(c,Cne,t)},Tne=ar(ud,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${Xr(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>Ue({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Od.iconWrapper}`]:Ue({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Od.selected}`]:{opacity:1},[`&.${Od.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Od.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Od.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Od.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Od.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),Ine=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTab"}),{className:a,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:u,iconPosition:c="top",indicator:d,label:g,onChange:x,onClick:w,onFocus:v,selected:y,selectionFollowsFocus:_,textColor:E="inherit",value:A,wrapped:B=!1}=i,U=vn(i,kne),L=Ue({},i,{disabled:o,disableFocusRipple:s,selected:y,icon:!!u,iconPosition:c,label:!!g,fullWidth:l,textColor:E,wrapped:B}),K=Ane(L),V=u&&g&&Z.exports.isValidElement(u)?Z.exports.cloneElement(u,{className:dn(K.iconWrapper,u.props.className)}):u,H=Y=>{!y&&x&&x(Y,A),w&&w(Y)},z=Y=>{_&&!y&&x&&x(Y,A),v&&v(Y)};return Bt(Tne,Ue({focusRipple:!s,className:dn(K.root,a),ref:r,role:"tab","aria-selected":y,disabled:o,onClick:H,onFocus:z,ownerState:L,tabIndex:y?0:-1},U,{children:[c==="top"||c==="start"?Bt(Z.exports.Fragment,{children:[V,g]}):Bt(Z.exports.Fragment,{children:[g,V]}),d]}))}),d_=Ine,Rne=Z.exports.createContext(),TU=Rne;function Pne(e){return oi("MuiTable",e)}Xn("MuiTable",["root","stickyHeader"]);const Mne=["className","component","padding","size","stickyHeader"],One=e=>{const{classes:t,stickyHeader:r}=e;return ci({root:["root",r&&"stickyHeader"]},Pne,t)},Bne=ar("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>Ue({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Ue({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),CT="table",Une=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTable"}),{className:a,component:o=CT,padding:s="normal",size:l="medium",stickyHeader:u=!1}=i,c=vn(i,Mne),d=Ue({},i,{component:o,padding:s,size:l,stickyHeader:u}),g=One(d),x=Z.exports.useMemo(()=>({padding:s,size:l,stickyHeader:u}),[s,l,u]);return N(TU.Provider,{value:x,children:N(Bne,Ue({as:o,role:o===CT?null:"table",ref:r,className:dn(g.root,a),ownerState:d},c))})}),LC=Une,Dne=Z.exports.createContext(),Tw=Dne;function Lne(e){return oi("MuiTableBody",e)}Xn("MuiTableBody",["root"]);const Nne=["className","component"],jne=e=>{const{classes:t}=e;return ci({root:["root"]},Lne,t)},$ne=ar("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),Fne={variant:"body"},ET="tbody",zne=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTableBody"}),{className:a,component:o=ET}=i,s=vn(i,Nne),l=Ue({},i,{component:o}),u=jne(l);return N(Tw.Provider,{value:Fne,children:N($ne,Ue({className:dn(u.root,a),as:o,ref:r,role:o===ET?null:"rowgroup",ownerState:l},s))})}),NC=zne;function Hne(e){return oi("MuiTableCell",e)}const Wne=Xn("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Vne=Wne,qne=["align","className","component","padding","scope","size","sortDirection","variant"],Kne=e=>{const{classes:t,variant:r,align:i,padding:a,size:o,stickyHeader:s}=e,l={root:["root",r,s&&"stickyHeader",i!=="inherit"&&`align${Xr(i)}`,a!=="normal"&&`padding${Xr(a)}`,`size${Xr(o)}`]};return ci(l,Hne,t)},Gne=ar("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${Xr(r.size)}`],r.padding!=="normal"&&t[`padding${Xr(r.padding)}`],r.align!=="inherit"&&t[`align${Xr(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>Ue({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?gw(Yi(e.palette.divider,1),.88):hw(Yi(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${Vne.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),Yne=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTableCell"}),{align:a="inherit",className:o,component:s,padding:l,scope:u,size:c,sortDirection:d,variant:g}=i,x=vn(i,qne),w=Z.exports.useContext(TU),v=Z.exports.useContext(Tw),y=v&&v.variant==="head";let _;s?_=s:_=y?"th":"td";let E=u;_==="td"?E=void 0:!E&&y&&(E="col");const A=g||v&&v.variant,B=Ue({},i,{align:a,component:_,padding:l||(w&&w.padding?w.padding:"normal"),size:c||(w&&w.size?w.size:"medium"),sortDirection:d,stickyHeader:A==="head"&&w&&w.stickyHeader,variant:A}),U=Kne(B);let L=null;return d&&(L=d==="asc"?"ascending":"descending"),N(Gne,Ue({as:_,ref:r,className:dn(U.root,o),"aria-sort":L,scope:E,ownerState:B},x))}),jC=Yne;function Qne(e){return oi("MuiTableContainer",e)}Xn("MuiTableContainer",["root"]);const Xne=["className","component"],Zne=e=>{const{classes:t}=e;return ci({root:["root"]},Qne,t)},Jne=ar("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),eie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTableContainer"}),{className:a,component:o="div"}=i,s=vn(i,Xne),l=Ue({},i,{component:o}),u=Zne(l);return N(Jne,Ue({ref:r,as:o,className:dn(u.root,a),ownerState:l},s))}),tie=eie;function rie(e){return oi("MuiTableHead",e)}Xn("MuiTableHead",["root"]);const nie=["className","component"],iie=e=>{const{classes:t}=e;return ci({root:["root"]},rie,t)},oie=ar("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),aie={variant:"head"},kT="thead",sie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTableHead"}),{className:a,component:o=kT}=i,s=vn(i,nie),l=Ue({},i,{component:o}),u=iie(l);return N(Tw.Provider,{value:aie,children:N(oie,Ue({as:o,className:dn(u.root,a),ref:r,role:o===kT?null:"rowgroup",ownerState:l},s))})}),IU=sie,lie=$0(N("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),uie=$0(N("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function cie(e){return oi("MuiTableRow",e)}const die=Xn("MuiTableRow",["root","selected","hover","head","footer"]),AT=die,fie=["className","component","hover","selected"],pie=e=>{const{classes:t,selected:r,hover:i,head:a,footer:o}=e;return ci({root:["root",r&&"selected",i&&"hover",a&&"head",o&&"footer"]},cie,t)},hie=ar("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${AT.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${AT.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Yi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),TT="tr",gie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTableRow"}),{className:a,component:o=TT,hover:s=!1,selected:l=!1}=i,u=vn(i,fie),c=Z.exports.useContext(Tw),d=Ue({},i,{component:o,hover:s,selected:l,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),g=pie(d);return N(hie,Ue({as:o,ref:r,className:dn(g.root,a),role:o===TT?null:"row",ownerState:d},u))}),ac=gie;function mie(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function yie(e,t,r,i={},a=()=>{}){const{ease:o=mie,duration:s=300}=i;let l=null;const u=t[e];let c=!1;const d=()=>{c=!0},g=x=>{if(c){a(new Error("Animation cancelled"));return}l===null&&(l=x);const w=Math.min(1,(x-l)/s);if(t[e]=o(w)*(r-u)+u,w>=1){requestAnimationFrame(()=>{a(null)});return}requestAnimationFrame(g)};return u===r?(a(new Error("Element already at target position")),d):(requestAnimationFrame(g),d)}const vie=["onChange"],bie={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function wie(e){const{onChange:t}=e,r=vn(e,vie),i=Z.exports.useRef(),a=Z.exports.useRef(null),o=()=>{i.current=a.current.offsetHeight-a.current.clientHeight};return Z.exports.useEffect(()=>{const s=mf(()=>{const u=i.current;o(),u!==i.current&&t(i.current)}),l=hl(a.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),Z.exports.useEffect(()=>{o(),t(i.current)},[t]),N("div",Ue({style:bie,ref:a},r))}function xie(e){return oi("MuiTabScrollButton",e)}const _ie=Xn("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Sie=_ie;var IT,RT;const Cie=["className","direction","orientation","disabled"],Eie=e=>{const{classes:t,orientation:r,disabled:i}=e;return ci({root:["root",r,i&&"disabled"]},xie,t)},kie=ar(ud,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>Ue({width:40,flexShrink:0,opacity:.8,[`&.${Sie.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Aie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTabScrollButton"}),{className:a,direction:o}=i,s=vn(i,Cie),u=sa().direction==="rtl",c=Ue({isRtl:u},i),d=Eie(c);return N(kie,Ue({component:"div",className:dn(d.root,a),ref:r,role:null,ownerState:c,tabIndex:null},s,{children:o==="left"?IT||(IT=N(lie,{fontSize:"small"})):RT||(RT=N(uie,{fontSize:"small"}))}))}),Tie=Aie;function Iie(e){return oi("MuiTabs",e)}const Rie=Xn("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),f_=Rie,Pie=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],PT=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,MT=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Qy=(e,t,r)=>{let i=!1,a=r(e,t);for(;a;){if(a===e.firstChild){if(i)return;i=!0}const o=a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||o)a=r(e,a);else{a.focus();return}}},Mie=e=>{const{vertical:t,fixed:r,hideScrollbar:i,scrollableX:a,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:u}=e;return ci({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",i&&"hideScrollbar",a&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[a&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},Iie,u)},Oie=ar("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${f_.scrollButtons}`]:t.scrollButtons},{[`& .${f_.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>Ue({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${f_.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Bie=ar("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>Ue({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Uie=ar("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>Ue({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Die=ar("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>Ue({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Lie=ar(wie,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),OT={},Nie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTabs"}),a=sa(),o=a.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:u,centered:c=!1,children:d,className:g,component:x="div",allowScrollButtonsMobile:w=!1,indicatorColor:v="primary",onChange:y,orientation:_="horizontal",ScrollButtonComponent:E=Tie,scrollButtons:A="auto",selectionFollowsFocus:B,TabIndicatorProps:U={},TabScrollButtonProps:L={},textColor:K="primary",value:V,variant:H="standard",visibleScrollbar:z=!1}=i,Y=vn(i,Pie),oe=H==="scrollable",q=_==="vertical",ae=q?"scrollTop":"scrollLeft",M=q?"top":"left",te=q?"bottom":"right",ue=q?"clientHeight":"clientWidth",he=q?"height":"width",xe=Ue({},i,{component:x,allowScrollButtonsMobile:w,indicatorColor:v,orientation:_,vertical:q,scrollButtons:A,textColor:K,variant:H,visibleScrollbar:z,fixed:!oe,hideScrollbar:oe&&!z,scrollableX:oe&&!q,scrollableY:oe&&q,centered:c&&!oe,scrollButtonsHideMobile:!w}),J=Mie(xe),[ct,De]=Z.exports.useState(!1),[ze,ir]=Z.exports.useState(OT),[Rt,At]=Z.exports.useState({start:!1,end:!1}),[Xt,vr]=Z.exports.useState({overflow:"hidden",scrollbarWidth:0}),Et=new Map,St=Z.exports.useRef(null),xt=Z.exports.useRef(null),Ut=()=>{const C=St.current;let R;if(C){const me=C.getBoundingClientRect();R={clientWidth:C.clientWidth,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop,scrollLeftNormalized:pA(C,a.direction),scrollWidth:C.scrollWidth,top:me.top,bottom:me.bottom,left:me.left,right:me.right}}let Q;if(C&&V!==!1){const me=xt.current.children;if(me.length>0){const je=me[Et.get(V)];Q=je?je.getBoundingClientRect():null}}return{tabsMeta:R,tabMeta:Q}},Gt=al(()=>{const{tabsMeta:C,tabMeta:R}=Ut();let Q=0,me;if(q)me="top",R&&C&&(Q=R.top-C.top+C.scrollTop);else if(me=o?"right":"left",R&&C){const lt=o?C.scrollLeftNormalized+C.clientWidth-C.scrollWidth:C.scrollLeft;Q=(o?-1:1)*(R[me]-C[me]+lt)}const je={[me]:Q,[he]:R?R[he]:0};if(isNaN(ze[me])||isNaN(ze[he]))ir(je);else{const lt=Math.abs(ze[me]-je[me]),ur=Math.abs(ze[he]-je[he]);(lt>=1||ur>=1)&&ir(je)}}),mr=(C,{animation:R=!0}={})=>{R?yie(ae,St.current,C,{duration:a.transitions.duration.standard}):St.current[ae]=C},ne=C=>{let R=St.current[ae];q?R+=C:(R+=C*(o?-1:1),R*=o&&d9()==="reverse"?-1:1),mr(R)},Pt=()=>{const C=St.current[ue];let R=0;const Q=Array.from(xt.current.children);for(let me=0;meC){me===0&&(R=C);break}R+=je[ue]}return R},Dt=()=>{ne(-1*Pt())},Te=()=>{ne(Pt())},Ae=Z.exports.useCallback(C=>{vr({overflow:null,scrollbarWidth:C})},[]),ot=()=>{const C={};C.scrollbarSizeListener=oe?N(Lie,{onChange:Ae,className:dn(J.scrollableX,J.hideScrollbar)}):null;const R=Rt.start||Rt.end,Q=oe&&(A==="auto"&&R||A===!0);return C.scrollButtonStart=Q?N(E,Ue({orientation:_,direction:o?"right":"left",onClick:Dt,disabled:!Rt.start},L,{className:dn(J.scrollButtons,L.className)})):null,C.scrollButtonEnd=Q?N(E,Ue({orientation:_,direction:o?"left":"right",onClick:Te,disabled:!Rt.end},L,{className:dn(J.scrollButtons,L.className)})):null,C},$t=al(C=>{const{tabsMeta:R,tabMeta:Q}=Ut();if(!(!Q||!R)){if(Q[M]R[te]){const me=R[ae]+(Q[te]-R[te]);mr(me,{animation:C})}}}),tr=al(()=>{if(oe&&A!==!1){const{scrollTop:C,scrollHeight:R,clientHeight:Q,scrollWidth:me,clientWidth:je}=St.current;let lt,ur;if(q)lt=C>1,ur=C1,ur=o?Dr>1:Dr{const C=mf(()=>{St.current&&(Gt(),tr())}),R=hl(St.current);R.addEventListener("resize",C);let Q;return typeof ResizeObserver<"u"&&(Q=new ResizeObserver(C),Array.from(xt.current.children).forEach(me=>{Q.observe(me)})),()=>{C.clear(),R.removeEventListener("resize",C),Q&&Q.disconnect()}},[Gt,tr]);const Ot=Z.exports.useMemo(()=>mf(()=>{tr()}),[tr]);Z.exports.useEffect(()=>()=>{Ot.clear()},[Ot]),Z.exports.useEffect(()=>{De(!0)},[]),Z.exports.useEffect(()=>{Gt(),tr()}),Z.exports.useEffect(()=>{$t(OT!==ze)},[$t,ze]),Z.exports.useImperativeHandle(u,()=>({updateIndicator:Gt,updateScrollButtons:tr}),[Gt,tr]);const br=N(Die,Ue({},U,{className:dn(J.indicator,U.className),ownerState:xe,style:Ue({},ze,U.style)}));let be=0;const se=Z.exports.Children.map(d,C=>{if(!Z.exports.isValidElement(C))return null;const R=C.props.value===void 0?be:C.props.value;Et.set(R,be);const Q=R===V;return be+=1,Z.exports.cloneElement(C,Ue({fullWidth:H==="fullWidth",indicator:Q&&!ct&&br,selected:Q,selectionFollowsFocus:B,onChange:y,textColor:K,value:R},be===1&&V===!1&&!C.props.tabIndex?{tabIndex:0}:{}))}),ce=C=>{const R=xt.current,Q=pa(R).activeElement;if(Q.getAttribute("role")!=="tab")return;let je=_==="horizontal"?"ArrowLeft":"ArrowUp",lt=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&o&&(je="ArrowRight",lt="ArrowLeft"),C.key){case je:C.preventDefault(),Qy(R,Q,MT);break;case lt:C.preventDefault(),Qy(R,Q,PT);break;case"Home":C.preventDefault(),Qy(R,null,PT);break;case"End":C.preventDefault(),Qy(R,null,MT);break}},$=ot();return Bt(Oie,Ue({className:dn(J.root,g),ownerState:xe,ref:r,as:x},Y,{children:[$.scrollButtonStart,$.scrollbarSizeListener,Bt(Bie,{className:J.scroller,ownerState:xe,style:{overflow:Xt.overflow,[q?`margin${o?"Left":"Right"}`:"marginBottom"]:z?void 0:-Xt.scrollbarWidth},ref:St,onScroll:Ot,children:[N(Uie,{"aria-label":s,"aria-labelledby":l,"aria-orientation":_==="vertical"?"vertical":null,className:J.flexContainer,ownerState:xe,onKeyDown:ce,ref:xt,role:"tablist",children:se}),ct&&br]}),$.scrollButtonEnd]}))}),RU=Nie;function jie(e){return oi("MuiTextField",e)}Xn("MuiTextField",["root"]);const $ie=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Fie={standard:vU,filled:fU,outlined:CU},zie=e=>{const{classes:t}=e;return ci({root:["root"]},jie,t)},Hie=ar(pU,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wie=Z.exports.forwardRef(function(t,r){const i=pi({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:o=!1,children:s,className:l,color:u="primary",defaultValue:c,disabled:d=!1,error:g=!1,FormHelperTextProps:x,fullWidth:w=!1,helperText:v,id:y,InputLabelProps:_,inputProps:E,InputProps:A,inputRef:B,label:U,maxRows:L,minRows:K,multiline:V=!1,name:H,onBlur:z,onChange:Y,onFocus:oe,placeholder:q,required:ae=!1,rows:M,select:te=!1,SelectProps:ue,type:he,value:xe,variant:J="outlined"}=i,ct=vn(i,$ie),De=Ue({},i,{autoFocus:o,color:u,disabled:d,error:g,fullWidth:w,multiline:V,required:ae,select:te,variant:J}),ze=zie(De),ir={};J==="outlined"&&(_&&typeof _.shrink<"u"&&(ir.notched=_.shrink),ir.label=U),te&&((!ue||!ue.native)&&(ir.id=void 0),ir["aria-describedby"]=void 0);const Rt=Hb(y),At=v&&Rt?`${Rt}-helper-text`:void 0,Xt=U&&Rt?`${Rt}-label`:void 0,vr=Fie[J],Et=N(vr,Ue({"aria-describedby":At,autoComplete:a,autoFocus:o,defaultValue:c,fullWidth:w,multiline:V,name:H,rows:M,maxRows:L,minRows:K,type:he,value:xe,id:Rt,inputRef:B,onBlur:z,onChange:Y,onFocus:oe,placeholder:q,inputProps:E},ir,A));return Bt(Hie,Ue({className:dn(ze.root,l),disabled:d,error:g,fullWidth:w,ref:r,required:ae,color:u,variant:J,ownerState:De},ct,{children:[U!=null&&U!==""&&N(Ete,Ue({htmlFor:Rt,id:Xt},_,{children:U})),te?N(kU,Ue({"aria-describedby":At,id:Rt,labelId:Xt,value:xe,input:Et},ue,{children:s})):Et,v&&N(ite,Ue({id:At},x,{children:v}))]}))}),af=Wie,PU=1160,Vie=250,$C="https://github.com/orbs-network/ton-contract-verifier",qie=ar(Ew)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"0px 16px",margin:"auto",maxWidth:160,width:e.width||"100%",height:e.height||"100%",fontSize:e.fontSize||14,fontWeight:e.fontWeight||400,boxShadow:"none",borderRadius:40,border:e.transparent?"1px solid #50A7EA":"",background:e.background||"inherit",whiteSpace:"nowrap",textTransform:"none",color:e.textColor||"#000","&:hover":{background:e.hoverBackground||"inherit"},"& img":{maxWidth:22},"&:disabled":{background:"#D9D9D9"},[t.breakpoints.down(900)]:{padding:0,minWidth:25}})),La=({children:e,disabled:t,onClick:r,type:i="button",fontSize:a=14,fontWeight:o,transparent:s,background:l,hoverBackground:u,width:c,height:d,textColor:g})=>N(qie,{width:c,height:d,fontSize:a,fontWeight:o,transparent:s,background:l,textColor:g,hoverBackground:u,className:"base-button",type:i,onClick:r||(()=>{}),variant:s?"outlined":"contained",disabled:t,disableElevation:!0,children:e}),Kie="/assets/recent-search.82384f57.svg",jn=ar(Cn)(()=>({display:"flex",alignItems:"center"})),Dh=ar(Cn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,color:"#000",border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}),Iw=ar(jn)({padding:"30px 24px 0 24px"}),Lh=ar(jn)({marginRight:8}),Sd=ar(Io)({fontSize:20,color:"#161C28",fontWeight:800}),Gie=Qi(aa)(({theme:e})=>({position:"absolute",top:"calc(100% + 10px)",left:0,padding:`${e.spacing(1)}, ${e.spacing(2)}`,zIndex:99,background:"rgba(232,233,235)",border:"0.5px solid rgba(114, 138, 150, 0.16)",borderRadius:16,width:"100%",maxHeight:450,overflowY:"auto",[e.breakpoints.down("md")]:{display:"none"}})),Yie=Qi(aa)({display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",fontSize:20,color:"#000",fontWeight:500,height:30,padding:"20px 21px",transitionDuration:".15s","&:hover":{cursor:"pointer",background:"rgb(225,227,230)"}}),Qie=({searchResults:e,onItemClick:t,onItemDelete:r,onHistoryClear:i})=>Bt(Gie,{children:[e.map(a=>Bt(Yie,{onClick:()=>t(a),children:[Bt(jn,{children:[N(jn,{mr:1.5,children:N("img",{width:18,height:18,src:Kie,alt:"Search Icon"})}),N(Io,{children:a})]}),N(qs,{onClick:o=>r(o,a),children:N("img",{src:vC,alt:"Close Icon",width:16,height:16})})]})),N(jn,{mt:2,mb:1,ml:1,sx:{width:"fit-content"},children:N(La,{onClick:i,height:34,transparent:!0,children:"Clear History"})})]});function fc(){const e=B0(),t=Q4();return(r,i)=>{t(typeof r=="string"?{pathname:r,search:e.search,hash:e.hash}:r,i)}}function Xie(e,t,r){const i=document.createElement("a"),a=new Blob([e],{type:r});i.href=URL.createObjectURL(a),i.download=t,i.click()}const MU=[{category:"Wallets - FIFT",contracts:[["wallet v1r1","EQAAQ-CfIZkUjmZ6ES9D_keK2yHz10U1ba49K0S86Whva74Z"],["wallet v1r2","EQAAVd4c_2pMb4Bp8BxumyV8jutdwJ9R-q0dBqQj7tj_W8SX"],["wallet v1r3","EQAAEgdraul87g9zvm5Lxtd9FNoebifojeyT90uG6zrWBvRh"],["wallet v2r1","EQAAC2tOLQxG4KuFcS_pb2Rta1MDdgx8wAtZnGf5bIEIMLft"],["wallet v2r2","EQAAnU-irJsuuljRAWBRUhdvFB-rvGRHbdQSWXPSQYND6MVb"],["wallet v3r1","EQAY_2_A88HD43S96hbVGbCLB21e6_k1nbaqICwS3ZCrMBaZ"],["wallet v3r2","EQALgHQ-KpmkwftbsdeZdA4DvVDCYkKvria9llb7_RMeZj_8"]]},{category:"DNS",contracts:[["dns-root","Ef_lZ1T4NCb2mwkme9h2rJfESCE0W34ma9lWp7-_uY3zXDvq"],["dns-collection","EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz"],["dns-item","EQAGSjhQajnMSne9c9hGnKdMKmohX2-MkZuOkk7TmwQKwFOU"]]},{category:"Jettons",contracts:[["jetton-minter-discoverable","EQD-LkpmPTHhPW68cNfc7B83NcfE9JyGegXzAT8LetpQSRSm"],["jetton-minter","EQBb4JNqn4Z6U6-nf0cSLnOJo2dxj1QRuGoq-y6Hod72jPbl"],["jetton-wallet","EQAhuLHxOcrBwwMHKDnCUMYefuHwJ2iTOFKHWYQlDD-dgb__"],["jetton-wallet-fwd-fee","EQDt0qeoHwip8CtuUeNsaKjK-g0rwL7zUunKAnv0NCTZDSs3"],["kotecoin-minter","EQBlU_tKISgpepeMFT9t3xTDeiVmo25dW_4vUOl6jId_BNIj"]]},{category:"Wallets",contracts:[["wallet-v4","EQDerEPTIh0O8lBdjWc6aLaJs5HYqlfBN2Ruj1lJQH_6vcaZ"],["wallet-subscription-plugin","EQAteJqywxP0g6-6e6LX7VRKKDmZDoQv1Mhx0hdslJvAUGEy"],["highload-wallet-v2","EQBPrDVWoh-AMOk3fhgPPEDs6XkN5OC6kKP9N4-7hdAkFSmO"],["highload-wallet","EQBSXD33ezTpFxVVIB7SA5vuagUa2E8LO9ujIEGnpbyMXYHT"],["lockup-wallet-universal","0QBy4wyHHuR0jOyz7uM2BH8r5aSix7251ySvQt4OZRX9veAD"]]},{category:"Source Verifier",contracts:[["sources-registry","EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"],["source-item","EQAXUJjoC9RUnBgTJdpp_XXebYUbq-sibaYnZ1C6Rojesz8w"]]},{category:"Validators/Staking",contracts:[["single-nominator","Ef_BLbagjGnqZEkpURP96guu7M9aICAYe5hKB_P5Ng5Gju5Y"],["nominator-pool","Ef8iu8EiNOP2MczVvHseFi-CrGO1C4v6MkSSOgVZcESNGfT7"]]},{category:"NFTs",contracts:[["telemint-item","EQAwC64h_7B6YrmGlsto39tBcFWjjakGzSvV7QaMwXiMKy20"],["telemint-collection","EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi"],["nft-item-v1","EQCZLzCnJuXCBktkb5IiqANbgThvqo2hYXjpupdTe5yHV6oY"],["sbt-item","EQC7JOIVycOY_cQnNRVtEBk8DpEFClZM8S3TlqfuD72jvU59"],["nft-single","EQBPIJPKd1G8eJ8vIWUnkpRf-5rpRp_oqiOepv3Tf571LKbq"],["nft-marketplace-v2","EQBYTuYbLf8INxFtD8tQeNk5ZLy-nAX9ahQbG_yl1qQ-GEMS"],["nft-item-editable","EQC2VNMbjQ8BY8b4iXTEop7dxNgYEXPAlr6ph1I-h42LrdED"],["nft-offer","EQA6rqhL9hxd8c3c1JVYQPohQVicy8PEZibTgF60iQCSEk1c"],["nft-fixprice-sale-v2","EQBeaUJdPdO66uL-P_D7-oHClw6uYIAPxoo9CX-TE6psn6lk"],["nft-fixprice-sale-v3","EQCljxPgw_0Z0uELYyt7AoGsmtGP7ORB-A4jk-gyuNJIjsRW"],["nft-collection-editable","EQCHmW1OkT6_-_vO6zoSFW9Z2T62dhffNZkkKRpdaPTFLPdT"],["nft-auction","EQC1yTmHvpD5z4Dk_l-YnEhZclc06utSisqhthfzBGz-w0Ae"],["nft-auction-v2","EQCnTg1uvsqc1ZCSgEOl5Yk5LItktG6OOYrSQ8SnJP4FFa58"]]},{category:"DEX",contracts:[["amm-minter","EQBIzHiopIkaXdXdSZ6Sm57kZV0y_5tZjnGO4fTUsMT0lOUz"]]},{category:"Core",contracts:[["elector","Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"],["config","Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn","latest code in github does not match onchain, func0.2.0 with smart contract from commit 9bff928"]]},{category:"Bridge",contracts:[["eth-bridge","Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr"],["eth-bridge-multisig-gov-v2","Ef87m7_QrVM4uXAPCDM4DuF9Rj5Rwa5nHubwiQG96JmyAjQY"],["eth-bridge-multisig-gov-v1","kf8rV4RD7BD-j_C-Xsu8FBO9BOOOwISjNPbBC8tcq688Gcmk"],["eth-bridge-votes-collector","EQCuzvIOXLjH2tv35gY4tzhIvXCqZWDuK9kUhFGXKLImgxT5"],["bsc-bridge-multisig-gov-v1","kf8_gV8rpqtPl1vmYDrMzwxlGQDJ63SIKO8vDhNZHT5wwVhd"],["bsc-bridge-multisig-gov-v2","kf8OvX_5ynDgbp4iqJIvWudSEanWo0qAlOjhWHtga9u2Yo7j"],["bsc-bridge-votes-collector","EQAHI1vGuw7d4WG-CtfDrWqEPNtmUuKjKFEFeJmZaqqfWTvW"],["bsc-bridge","Ef9NXAIQs12t2qIZ-sRZ26D977H65Ol6DQeXc5_gUNaUys5r"]]},{category:"Other",contracts:[["counter","EQC-QTihJV_B4f8M2nynateMLynaRT_uwNYnnuyy87kam-G7"],["tact-example","EQA7c2RpiXxH1X52lvOxLFrVj4MukLeuCENcM86rHYcQdbha"]]},{category:"Unverified",contracts:[["system","Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU"]]}];function Zie(){const e=([r,i,a])=>`[https://verifier.ton.org/${i}] // ${r} ${a??""}`,t=["# Verified Examples"];MU.forEach(({category:r,contracts:i})=>{t.push(`## ${r}`),t.push(i.map(e).join(` - -`))}),Xie(t.join(` - -`),"examples.md","text/markdown")}function Jie(){const e=fc();return Bt("div",{style:{position:"absolute",padding:20,background:"#000000",borderRadius:20,height:300,top:60,overflow:"auto"},children:[N("div",{style:{display:"flex",alignItems:"center",gap:20},children:N(Ew,{variant:"contained",onClick:()=>{Zie()},children:"Download examples.md"})}),N("br",{}),N("div",{children:MU.map(({category:t,contracts:r})=>Bt(Eo,{children:[N("h2",{children:t}),N("div",{style:{gap:20,display:"flex",textAlign:"center",flexWrap:"wrap"},children:r.sort((i,a)=>i[0].localeCompare(a[0])).map(([i,a])=>N("div",{style:{color:"#50a7ea",cursor:"pointer",border:"1px solid #50a7ea",padding:"10px 20px",borderRadius:10},onClick:o=>{e(`/${a}`)},children:i},i))})]}))})]})}var Qn={},uo={},js={};const eoe=Symbol.for("nodejs.util.inspect.custom");var Nh=eoe,jh={};Object.defineProperty(jh,"__esModule",{value:!0});jh.crc16=void 0;function toe(e){let r=0;const i=Buffer.alloc(e.length+2);i.set(e);for(let a of i){let o=128;for(;o>0;)r<<=1,a&o&&(r+=1),o>>=1,r>65535&&(r&=65535,r^=4129)}return Buffer.from([Math.floor(r/256),r%256])}jh.crc16=toe;var roe=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},OU;Object.defineProperty(js,"__esModule",{value:!0});js.address=js.Address=void 0;const noe=roe(Nh),BU=jh,z3=17,UU=81,H3=128;function BT(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e,"base64");if(t.length!==36)throw new Error("Unknown address type: byte length is not equal to 36");const r=t.subarray(0,34),i=t.subarray(34,36),a=(0,BU.crc16)(r);if(!(a[0]===i[0]&&a[1]===i[1]))throw new Error("Invalid checksum: "+e);let o=r[0],s=!1,l=!1;if(o&H3&&(s=!0,o=o^H3),o!==z3&&o!==UU)throw"Unknown address tag";l=o===z3;let u=null;r[1]===255?u=-1:u=r[1];const c=r.subarray(2,34);return{isTestOnly:s,isBounceable:l,workchain:u,hashPart:c}}class $u{static isAddress(t){return t instanceof $u}static isFriendly(t){return t.indexOf(":")<0}static normalize(t){return typeof t=="string"?$u.parse(t).toString():t.toString()}static parse(t){return $u.isFriendly(t)?this.parseFriendly(t).address:this.parseRaw(t)}static parseRaw(t){let r=parseInt(t.split(":")[0]),i=Buffer.from(t.split(":")[1],"hex");return new $u(r,i)}static parseFriendly(t){if(Buffer.isBuffer(t)){let r=BT(t);return{isBounceable:r.isBounceable,isTestOnly:r.isTestOnly,address:new $u(r.workchain,r.hashPart)}}else{let r=t.replace(/\-/g,"+").replace(/_/g,"/"),i=BT(r);return{isBounceable:i.isBounceable,isTestOnly:i.isTestOnly,address:new $u(i.workchain,i.hashPart)}}}constructor(t,r){this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{const i=Buffer.alloc(36);return i.set(this.hash),i.set([this.workChain,this.workChain,this.workChain,this.workChain],32),i},this.toStringBuffer=i=>{let a=i&&i.testOnly!==void 0?i.testOnly:!1,s=(i&&i.bounceable!==void 0?i.bounceable:!0)?z3:UU;a&&(s|=H3);const l=Buffer.alloc(34);l[0]=s,l[1]=this.workChain,l.set(this.hash,2);const u=Buffer.alloc(36);return u.set(l),u.set((0,BU.crc16)(l),34),u},this.toString=i=>{let a=i&&i.urlSafe!==void 0?i.urlSafe:!0,o=this.toStringBuffer(i);return a?o.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):o.toString("base64")},this[OU]=()=>this.toString(),this.workChain=t,this.hash=r,Object.freeze(this)}equals(t){return t.workChain!==this.workChain?!1:t.hash.equals(this.hash)}}js.Address=$u;OU=noe.default;function ioe(e){return $u.parse(e)}js.address=ioe;var $h={},ooe=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},DU;Object.defineProperty($h,"__esModule",{value:!0});$h.ExternalAddress=void 0;const aoe=ooe(Nh);class FC{static isAddress(t){return t instanceof FC}constructor(t,r){this[DU]=()=>this.toString(),this.value=t,this.bits=r}toString(){return`External<${this.bits}:${this.value}>`}}$h.ExternalAddress=FC;DU=aoe.default;var Rw={},bf={};Object.defineProperty(bf,"__esModule",{value:!0});bf.base32Decode=bf.base32Encode=void 0;const W3="abcdefghijklmnopqrstuvwxyz234567";function soe(e){const t=e.byteLength;let r=0,i=0,a="";for(let o=0;o=5;)a+=W3[i>>>r-5&31],r-=5;return r>0&&(a+=W3[i<<5-r&31]),a}bf.base32Encode=soe;function loe(e,t){const r=e.indexOf(t);if(r===-1)throw new Error("Invalid character found: "+t);return r}function uoe(e){let t;t=e.toLowerCase();const{length:r}=t;let i=0,a=0,o=0;const s=Buffer.alloc(r*5/8|0);for(let l=0;l=8&&(s[o++]=a>>>i-8&255,i-=8);return s}bf.base32Decode=uoe;var coe=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},LU;Object.defineProperty(Rw,"__esModule",{value:!0});Rw.ADNLAddress=void 0;const doe=coe(Nh),UT=bf,DT=jh;class _1{static parseFriendly(t){if(t.length!==55)throw Error("Invalid address");t="f"+t;let r=(0,UT.base32Decode)(t);if(r[0]!==45)throw Error("Invalid address");let i=r.slice(33);if(!(0,DT.crc16)(r.slice(0,33)).equals(i))throw Error("Invalid address");return new _1(r.slice(1,33))}static parseRaw(t){const r=Buffer.from(t,"base64");return new _1(r)}constructor(t){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let r=Buffer.concat([Buffer.from([45]),this.address]),i=(0,DT.crc16)(r);return r=Buffer.concat([r,i]),(0,UT.base32Encode)(r).slice(1)},this[LU]=()=>this.toString(),t.length!==32)throw Error("Invalid address");this.address=t}equals(t){return this.address.equals(t.address)}}Rw.ADNLAddress=_1;LU=doe.default;var Pw={},Bd={},Ag={},Tg={},Ig={},LT;function zC(){if(LT)return Ig;LT=1,Object.defineProperty(Ig,"__esModule",{value:!0}),Ig.bitsToPaddedBuffer=void 0;const e=Mw();function t(r){let i=new e.BitBuilder(Math.ceil(r.length/8)*8);i.writeBits(r);let a=Math.ceil(r.length/8)*8-r.length;for(let o=0;othis.toString(),u<0)throw new Error(`Length ${u} is out of bounds`);this._length=u,this._data=s,this._offset=l}get length(){return this._length}at(s){if(s>=this._length)throw new Error(`Index ${s} > ${this._length} is out of bounds`);if(s<0)throw new Error(`Index ${s} < 0 is out of bounds`);let l=this._offset+s>>3,u=7-(this._offset+s)%8;return(this._data[l]&1<=this._length)throw new Error(`Offset(${s}) > ${this._length} is out of bounds`);if(s<0)throw new Error(`Offset(${s}) < 0 is out of bounds`);if(l===0)return a.EMPTY;if(s+l>this._length)throw new Error(`Offset ${s} + Length ${l} > ${this._length} is out of bounds`);return new a(this._data,this._offset+s,l)}subbuffer(s,l){if(s>=this._length)throw new Error(`Offset ${s} is out of bounds`);if(s<0)throw new Error(`Offset ${s} is out of bounds`);if(s+l>this._length)throw new Error(`Offset + Lenght = ${s+l} is out of bounds`);if(l%8!==0||(this._offset+s)%8!==0)return null;let u=this._offset+s>>3,c=u+(l>>3);return this._data.subarray(u,c)}equals(s){if(this._length!==s._length)return!1;for(let l=0;lthis._buffer.length*8)throw new Error("BitBuilder overflow");(o===!0||o>0)&&(this._buffer[s/8|0]|=1<<7-s%8),this._length++}writeBits(o){for(let s=0;sthis._buffer.length*8)throw new Error("BitBuilder overflow");o.copy(this._buffer,this._length/8),this._length+=o.length*8}else for(let s=0;s255||!Number.isSafeInteger(d))throw Error(`value is out of range for ${s} bits. Got ${o}`);this._buffer[this._length/8]=Number(o),this._length+=8;return}if(s===16&&this._length%8===0){let d=Number(o);if(d<0||d>65536||!Number.isSafeInteger(d))throw Error(`value is out of range for ${s} bits. Got ${o}`);this._buffer[this._length/8]=d>>8,this._buffer[this._length/8+1]=d&255,this._length+=16;return}let l=BigInt(o);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(s===0){if(o!==0n)throw Error(`value is not zero for ${s} bits. Got ${o}`);return}let u=1n<=u)throw Error(`bitLength is too small for a value ${o}. Got ${s}`);let c=[];for(;l>0;)c.push(l%2n===1n),l/=2n;for(let d=0;d=u)throw Error(`value is out of range for ${s} bits. Got ${o}`);l<0?(this.writeBit(!0),l=u+l):this.writeBit(!1),this.writeUint(l,s-1)}writeVarUint(o,s){let l=BigInt(o);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(l<0)throw Error(`value is negative. Got ${o}`);if(l===0n){this.writeUint(0,s);return}const u=Math.ceil(l.toString(2).length/8),c=u*8;this.writeUint(u,s),this.writeUint(l,c)}writeVarInt(o,s){let l=BigInt(o);if(s<0||!Number.isSafeInteger(s))throw Error(`invalid bit length. Got ${s}`);if(l===0n){this.writeUint(0,s);return}let u=l>0?l:-l;const c=1+Math.ceil(u.toString(2).length/8),d=c*8;this.writeUint(c,s),this.writeInt(l,d)}writeCoins(o){this.writeVarUint(o,4)}writeAddress(o){if(o==null){this.writeUint(0,2);return}if(e.Address.isAddress(o)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(o.workChain,8),this.writeBuffer(o.hash);return}if(t.ExternalAddress.isAddress(o)){this.writeUint(1,2),this.writeUint(o.bits,9),this.writeUint(o.value,o.bits);return}throw Error(`Invalid address. Got ${o}`)}build(){return new r.BitString(this._buffer,0,this._length)}buffer(){if(this._length%8!==0)throw new Error("BitBuilder buffer is not byte aligned");return this._buffer.subarray(0,this._length/8)}}return Ag.BitBuilder=i,Ag}var Rg={},Fh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CellType=void 0,function(t){t[t.Ordinary=-1]="Ordinary",t[t.PrunedBranch=1]="PrunedBranch",t[t.Library=2]="Library",t[t.MerkleProof=3]="MerkleProof",t[t.MerkleUpdate=4]="MerkleUpdate"}(e.CellType||(e.CellType={}))})(Fh);var Pg={},Mg={},Ow={};Object.defineProperty(Ow,"__esModule",{value:!0});Ow.parseDict=void 0;function foe(e){let t=0;for(;e.loadBit();)t++;return t}function V3(e,t,r,i,a){let o=t.loadBit()?1:0,s=0,l=e;if(o===0){s=foe(t);for(let u=0;u(0,o.deserializeInternalKey)(z))}values(){return Array.from(this._map.values())}store(z,Y,oe){if(this._map.size===0)z.storeBit(0);else{let q=this._key;Y!=null&&(q=Y);let ae=this._value;if(oe!=null&&(ae=oe),!q)throw Error("Key serializer is not defined");if(!ae)throw Error("Value serializer is not defined");let M=new Map;for(const[ue,he]of this._map)M.set(q.serialize((0,o.deserializeInternalKey)(ue)),he);z.storeBit(1);let te=(0,t.beginCell)();(0,a.serializeDict)(M,q.bits,ae.serialize,te),z.storeRef(te.endCell())}}storeDirect(z,Y,oe){if(this._map.size===0)throw Error("Cannot store empty dictionary directly");let q=this._key;Y!=null&&(q=Y);let ae=this._value;if(oe!=null&&(ae=oe),!q)throw Error("Key serializer is not defined");if(!ae)throw Error("Value serializer is not defined");let M=new Map;for(const[te,ue]of this._map)M.set(q.serialize((0,o.deserializeInternalKey)(te)),ue);(0,a.serializeDict)(M,q.bits,ae.serialize,z)}}Mg.Dictionary=s,s.Keys={Address:()=>l(),BigInt:H=>u(H),Int:H=>c(H),BigUint:H=>d(H),Uint:H=>g(H),Buffer:H=>x(H)},s.Values={BigInt:H=>v(H),Int:H=>w(H),BigVarInt:H=>y(H),BigUint:H=>A(H),Uint:H=>E(H),BigVarUint:H=>_(H),Bool:()=>B(),Address:()=>U(),Cell:()=>L(),Buffer:H=>V(H),Dictionary:(H,z)=>K(H,z)};function l(){return{bits:267,serialize:H=>{if(!e.Address.isAddress(H))throw Error("Key is not an address");return(0,t.beginCell)().storeAddress(H).endCell().beginParse().preloadUintBig(267)},parse:H=>(0,t.beginCell)().storeUint(H,267).endCell().beginParse().loadAddress()}}function u(H){return{bits:H,serialize:z=>{if(typeof z!="bigint")throw Error("Key is not a bigint");return(0,t.beginCell)().storeInt(z,H).endCell().beginParse().loadUintBig(H)},parse:z=>(0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadIntBig(H)}}function c(H){return{bits:H,serialize:z=>{if(typeof z!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(z))throw Error("Key is not a safe integer: "+z);return(0,t.beginCell)().storeInt(z,H).endCell().beginParse().loadUintBig(H)},parse:z=>(0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadInt(H)}}function d(H){return{bits:H,serialize:z=>{if(typeof z!="bigint")throw Error("Key is not a bigint");if(z<0)throw Error("Key is negative: "+z);return(0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadUintBig(H)},parse:z=>(0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadUintBig(H)}}function g(H){return{bits:H,serialize:z=>{if(typeof z!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(z))throw Error("Key is not a safe integer: "+z);if(z<0)throw Error("Key is negative: "+z);return(0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadUintBig(H)},parse:z=>Number((0,t.beginCell)().storeUint(z,H).endCell().beginParse().loadUint(H))}}function x(H){return{bits:H*8,serialize:z=>{if(!Buffer.isBuffer(z))throw Error("Key is not a buffer");return(0,t.beginCell)().storeBuffer(z).endCell().beginParse().loadUintBig(H*8)},parse:z=>(0,t.beginCell)().storeUint(z,H*8).endCell().beginParse().loadBuffer(H)}}function w(H){return{serialize:(z,Y)=>{Y.storeInt(z,H)},parse:z=>z.loadInt(H)}}function v(H){return{serialize:(z,Y)=>{Y.storeInt(z,H)},parse:z=>z.loadIntBig(H)}}function y(H){return{serialize:(z,Y)=>{Y.storeVarInt(z,H)},parse:z=>z.loadVarIntBig(H)}}function _(H){return{serialize:(z,Y)=>{Y.storeVarUint(z,H)},parse:z=>z.loadVarUintBig(H)}}function E(H){return{serialize:(z,Y)=>{Y.storeUint(z,H)},parse:z=>z.loadUint(H)}}function A(H){return{serialize:(z,Y)=>{Y.storeUint(z,H)},parse:z=>z.loadUintBig(H)}}function B(){return{serialize:(H,z)=>{z.storeBit(H)},parse:H=>H.loadBit()}}function U(){return{serialize:(H,z)=>{z.storeAddress(H)},parse:H=>H.loadAddress()}}function L(){return{serialize:(H,z)=>{z.storeRef(H)},parse:H=>H.loadRef()}}function K(H,z){return{serialize:(Y,oe)=>{Y.store(oe)},parse:Y=>s.load(H,z,Y)}}function V(H){return{serialize:(z,Y)=>{if(z.length!==H)throw Error("Invalid buffer size");Y.storeBuffer(z)},parse:z=>z.loadBuffer(H)}}return Mg}var Ou={},zT;function jU(){if(zT)return Ou;zT=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.writeString=Ou.stringToCell=Ou.readString=void 0;const e=Ja();function t(s){if(s.remainingBits%8!==0)throw new Error(`Invalid string length: ${s.remainingBits}`);if(s.remainingRefs!==0&&s.remainingRefs!==1)throw new Error(`invalid number of refs: ${s.remainingRefs}`);if(s.remainingRefs===1&&1023-s.remainingBits>7)throw new Error(`invalid string length: ${s.remainingBits/8}`);let l;return s.remainingBits===0?l=Buffer.alloc(0):l=s.loadBuffer(s.remainingBits/8),s.remainingRefs===1&&(l=Buffer.concat([l,t(s.loadRef().beginParse())])),l}function r(s){return t(s).toString()}Ou.readString=r;function i(s,l){if(s.length>0){let u=Math.floor(l.availableBits/8);if(s.length>u){let c=s.subarray(0,u),d=s.subarray(u);l=l.storeBuffer(c);let g=(0,e.beginCell)();i(d,g),l=l.storeRef(g.endCell())}else l=l.storeBuffer(s)}}function a(s){let l=(0,e.beginCell)();return i(Buffer.from(s),l),l.endCell()}Ou.stringToCell=a;function o(s,l){i(Buffer.from(s),l)}return Ou.writeString=o,Ou}var HT;function HC(){if(HT)return Pg;HT=1;var e=xn&&xn.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t;Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.Slice=void 0;const r=e(Nh),i=Qf(),a=Ja(),o=jU();class s{constructor(u,c){this[t]=()=>this.toString(),this._reader=u.clone(),this._refs=[...c],this._refsOffset=0}get remainingBits(){return this._reader.remaining}get offsetBits(){return this._reader.offset}get remainingRefs(){return this._refs.length-this._refsOffset}get offsetRefs(){return this._refsOffset}skip(u){return this._reader.skip(u),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(u){return this._reader.loadBits(u)}preloadBits(u){return this._reader.preloadBits(u)}loadUint(u){return this._reader.loadUint(u)}loadUintBig(u){return this._reader.loadUintBig(u)}preloadUint(u){return this._reader.preloadUint(u)}preloadUintBig(u){return this._reader.preloadUintBig(u)}loadMaybeUint(u){return this.loadBit()?this.loadUint(u):null}loadMaybeUintBig(u){return this.loadBit()?this.loadUintBig(u):null}loadInt(u){return this._reader.loadInt(u)}loadIntBig(u){return this._reader.loadIntBig(u)}preloadInt(u){return this._reader.preloadInt(u)}preloadIntBig(u){return this._reader.preloadIntBig(u)}loadMaybeInt(u){return this.loadBit()?this.loadInt(u):null}loadMaybeIntBig(u){return this.loadBit()?this.loadIntBig(u):null}loadVarUint(u){return this._reader.loadVarUint(u)}loadVarUintBig(u){return this._reader.loadVarUintBig(u)}preloadVarUint(u){return this._reader.preloadVarUint(u)}preloadVarUintBig(u){return this._reader.preloadVarUintBig(u)}loadVarInt(u){return this._reader.loadVarInt(u)}loadVarIntBig(u){return this._reader.loadVarIntBig(u)}preloadVarInt(u){return this._reader.preloadVarInt(u)}preloadVarIntBig(u){return this._reader.preloadVarIntBig(u)}loadCoins(){return this._reader.loadCoins()}preloadCoins(){return this._reader.preloadCoins()}loadMaybeCoins(){return this._reader.loadBit()?this._reader.loadCoins():null}loadAddress(){return this._reader.loadAddress()}loadMaybeAddress(){return this._reader.loadMaybeAddress()}loadExternalAddress(){return this._reader.loadExternalAddress()}loadMaybeExternalAddress(){return this._reader.loadMaybeExternalAddress()}loadAddressAny(){return this._reader.loadAddressAny()}loadRef(){if(this._refsOffset>=this._refs.length)throw new Error("No more references");return this._refs[this._refsOffset++]}preloadRef(){if(this._refsOffset>=this._refs.length)throw new Error("No more references");return this._refs[this._refsOffset]}loadMaybeRef(){return this.loadBit()?this.loadRef():null}preloadMaybeRef(){return this.preloadBit()?this.preloadRef():null}loadBuffer(u){return this._reader.loadBuffer(u)}preloadBuffer(u){return this._reader.preloadBuffer(u)}loadStringTail(){return(0,o.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,o.readString)(this):null}loadStringRefTail(){return(0,o.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){const u=this.loadMaybeRef();return u?(0,o.readString)(u.beginParse()):null}loadDict(u,c){return i.Dictionary.load(u,c,this)}loadDictDirect(u,c){return i.Dictionary.loadDirect(u,c,this)}endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw new Error("Slice is not empty")}asCell(){return(0,a.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,a.beginCell)().storeSlice(this)}clone(u=!1){if(u){let c=this._reader.clone();return c.reset(),new s(c,this._refs)}else{let c=new s(this._reader,this._refs);return c._refsOffset=this._refsOffset,c}}toString(){return this.asCell().toString()}}return Pg.Slice=s,t=r.default,Pg}var Uw={},Vl={};Object.defineProperty(Vl,"__esModule",{value:!0});Vl.BitReader=void 0;const voe=js,boe=$h;class WC{constructor(t,r=0){this._checkpoints=[],this._bits=t,this._offset=r}get offset(){return this._offset}get remaining(){return this._bits.length-this._offset}skip(t){if(t<0||this._offset+t>this._bits.length)throw new Error(`Index ${this._offset+t} is out of bounds`);this._offset+=t}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let t=this._bits.at(this._offset);return this._offset++,t}preloadBit(){return this._bits.at(this._offset)}loadBits(t){let r=this._bits.substring(this._offset,t);return this._offset+=t,r}preloadBits(t){return this._bits.substring(this._offset,t)}loadBuffer(t){let r=this._preloadBuffer(t,this._offset);return this._offset+=t*8,r}preloadBuffer(t){return this._preloadBuffer(t,this._offset)}loadUint(t){return Number(this.loadUintBig(t))}loadUintBig(t){let r=this.preloadUintBig(t);return this._offset+=t,r}preloadUint(t){return Number(this._preloadUint(t,this._offset))}preloadUintBig(t){return this._preloadUint(t,this._offset)}loadInt(t){let r=this._preloadInt(t,this._offset);return this._offset+=t,Number(r)}loadIntBig(t){let r=this._preloadInt(t,this._offset);return this._offset+=t,r}preloadInt(t){return Number(this._preloadInt(t,this._offset))}preloadIntBig(t){return this._preloadInt(t,this._offset)}loadVarUint(t){let r=Number(this.loadUint(t));return Number(this.loadUintBig(r*8))}loadVarUintBig(t){let r=Number(this.loadUint(t));return this.loadUintBig(r*8)}preloadVarUint(t){let r=Number(this._preloadUint(t,this._offset));return Number(this._preloadUint(r*8,this._offset+t))}preloadVarUintBig(t){let r=Number(this._preloadUint(t,this._offset));return this._preloadUint(r*8,this._offset+t)}loadVarInt(t){let r=Number(this.loadUint(t));return Number(this.loadIntBig(r*8))}loadVarIntBig(t){let r=Number(this.loadUint(t));return this.loadIntBig(r*8)}preloadVarInt(t){let r=Number(this._preloadUint(t,this._offset));return Number(this._preloadInt(r*8,this._offset+t))}preloadVarIntBig(t){let r=Number(this._preloadUint(t,this._offset));return this._preloadInt(r*8,this._offset+t)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===2)return this._loadInternalAddress();throw new Error("Invalid address: "+t)}loadMaybeAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===2)return this._loadInternalAddress();throw new Error("Invalid address")}loadExternalAddress(){if(Number(this._preloadUint(2,this._offset))===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadMaybeExternalAddress(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadAddressAny(){let t=Number(this._preloadUint(2,this._offset));if(t===0)return this._offset+=2,null;if(t===2)return this._loadInternalAddress();if(t===1)return this._loadExternalAddress();throw Error(t===3?"Unsupported":"Unreachable")}loadPaddedBits(t){if(t%8!==0)throw new Error("Invalid number of bits");let r=t;for(;;)if(this._bits.at(this._offset+r-1)){r--;break}else r--;let i=this._bits.substring(this._offset,r);return this._offset+=t,i}clone(){return new WC(this._bits,this._offset)}_preloadInt(t,r){if(t==0)return 0n;let i=this._bits.at(r),a=0n;for(let o=0;o>t-1)%2!==0}}Vh.LevelMask=VC;function koe(e){return e=e-(e>>1&1431655765),e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}Object.defineProperty(Wh,"__esModule",{value:!0});Wh.exoticPruned=void 0;const Aoe=Vl,WT=Vh;function Toe(e,t){let r=new Aoe.BitReader(e),i=r.loadUint(8);if(i!==1)throw new Error(`Pruned branch cell must have type 1, got "${i}"`);if(t.length!==0)throw new Error(`Pruned Branch cell can't has refs, got "${t.length}"`);let a;if(e.length===280)a=new WT.LevelMask(1);else{if(a=new WT.LevelMask(r.loadUint(8)),a.level<1||a.level>3)throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${a.level}/${a.value}"`);const u=8+8+a.apply(a.level-1).hashCount*(256+16);if(e.length!==u)throw new Error(`Pruned branch cell must have exactly ${u} bits, got "${e.length}"`)}let o=[],s=[],l=[];for(let u=0;u>1);return{type:Dw.CellType.MerkleProof,depths:r,hashes:i,mask:a}}function Loe(e,t){(0,Moe.exoticMerkleUpdate)(e,t);let r=[],i=[],a=new Lw.LevelMask((t[0].level()|t[1].level())>>1);return{type:Dw.CellType.MerkleUpdate,depths:r,hashes:i,mask:a}}function Noe(e,t){let i=new Ioe.BitReader(e).preloadUint(8);if(i===1)return Boe(e,t);if(i===2)return Uoe(e,t);if(i===3)return Doe(e,t);if(i===4)return Loe(e,t);throw Error("Invalid exotic cell type: "+i)}Uw.resolveExotic=Noe;var Nw={},Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.getRepr=Gu.getBitsDescriptor=Gu.getRefsDescriptor=void 0;const am=Fh,joe=zC();function $U(e,t,r){return e.length+(r!==am.CellType.Ordinary?1:0)*8+t*32}Gu.getRefsDescriptor=$U;function FU(e){let t=e.length;return Math.ceil(t/8)+Math.floor(t/8)}Gu.getBitsDescriptor=FU;function $oe(e,t,r,i,a){const o=Math.ceil(t.length/8),s=Buffer.alloc(2+o+(2+32)*r.length);let l=0;s[l++]=$U(r,i,a),s[l++]=FU(e),(0,joe.bitsToPaddedBuffer)(t).copy(s,l),l+=o;for(const u of r){let c;a==am.CellType.MerkleProof||a==am.CellType.MerkleUpdate?c=u.depth(i+1):c=u.depth(i),s[l++]=Math.floor(c/256),s[l++]=c%256}for(const u of r){let c;a==am.CellType.MerkleProof||a==am.CellType.MerkleUpdate?c=u.hash(i+1):c=u.hash(i),c.copy(s,l),l+=32}return s}Gu.getRepr=$oe;var p_={},Qc={},jw={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(xn,function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function i(se,ce,$,C){var R,Q,me,je=ce||[0],lt=($=$||0)>>>3,ur=C===-1?3:0;for(R=0;R>>2,je.length<=Q&&je.push(0),je[Q]|=se[R]<<8*(ur+C*(me%4));return{value:je,binLen:8*se.length+$}}function a(se,ce,$){switch(ce){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(se){case"HEX":return function(C,R,Q){return function(me,je,lt,ur){var Dr,hr,Rr,Gr;if(me.length%2!=0)throw new Error("String of HEX type must be in byte increments");var Nr=je||[0],Vn=(lt=lt||0)>>>3,An=ur===-1?3:0;for(Dr=0;Dr>>1)+Vn)>>>2;Nr.length<=Rr;)Nr.push(0);Nr[Rr]|=hr<<8*(An+ur*(Gr%4))}return{value:Nr,binLen:4*me.length+lt}}(C,R,Q,$)};case"TEXT":return function(C,R,Q){return function(me,je,lt,ur,Dr){var hr,Rr,Gr,Nr,Vn,An,Tn,ht,Ci=0,qn=lt||[0],Ii=(ur=ur||0)>>>3;if(je==="UTF8")for(Tn=Dr===-1?3:0,Gr=0;Gr(hr=me.charCodeAt(Gr))?Rr.push(hr):2048>hr?(Rr.push(192|hr>>>6),Rr.push(128|63&hr)):55296>hr||57344<=hr?Rr.push(224|hr>>>12,128|hr>>>6&63,128|63&hr):(Gr+=1,hr=65536+((1023&hr)<<10|1023&me.charCodeAt(Gr)),Rr.push(240|hr>>>18,128|hr>>>12&63,128|hr>>>6&63,128|63&hr)),Nr=0;Nr>>2;qn.length<=Vn;)qn.push(0);qn[Vn]|=Rr[Nr]<<8*(Tn+Dr*(An%4)),Ci+=1}else for(Tn=Dr===-1?2:0,ht=je==="UTF16LE"&&Dr!==1||je!=="UTF16LE"&&Dr===1,Gr=0;Gr>>8),Vn=(An=Ci+Ii)>>>2;qn.length<=Vn;)qn.push(0);qn[Vn]|=hr<<8*(Tn+Dr*(An%4)),Ci+=2}return{value:qn,binLen:8*Ci+ur}}(C,ce,R,Q,$)};case"B64":return function(C,R,Q){return function(me,je,lt,ur){var Dr,hr,Rr,Gr,Nr,Vn,An=0,Tn=je||[0],ht=(lt=lt||0)>>>3,Ci=ur===-1?3:0,qn=me.indexOf("=");if(me.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(me=me.replace(/=/g,""),qn!==-1&&qn>24&255,le[Ie+1]=Ee>>16&255,le[Ie+2]=Ee>>8&255,le[Ie+3]=Ee&255,le[Ie+4]=F>>24&255,le[Ie+5]=F>>16&255,le[Ie+6]=F>>8&255,le[Ie+7]=F&255}function y(le,Ie,Ee,F,Ne){var Qt,or=0;for(Qt=0;Qt>>8)-1}function _(le,Ie,Ee,F){return y(le,Ie,Ee,F,16)}function E(le,Ie,Ee,F){return y(le,Ie,Ee,F,32)}function A(le,Ie,Ee,F){for(var Ne=F[0]&255|(F[1]&255)<<8|(F[2]&255)<<16|(F[3]&255)<<24,Qt=Ee[0]&255|(Ee[1]&255)<<8|(Ee[2]&255)<<16|(Ee[3]&255)<<24,or=Ee[4]&255|(Ee[5]&255)<<8|(Ee[6]&255)<<16|(Ee[7]&255)<<24,Br=Ee[8]&255|(Ee[9]&255)<<8|(Ee[10]&255)<<16|(Ee[11]&255)<<24,Hr=Ee[12]&255|(Ee[13]&255)<<8|(Ee[14]&255)<<16|(Ee[15]&255)<<24,kn=F[4]&255|(F[5]&255)<<8|(F[6]&255)<<16|(F[7]&255)<<24,un=Ie[0]&255|(Ie[1]&255)<<8|(Ie[2]&255)<<16|(Ie[3]&255)<<24,gt=Ie[4]&255|(Ie[5]&255)<<8|(Ie[6]&255)<<16|(Ie[7]&255)<<24,W=Ie[8]&255|(Ie[9]&255)<<8|(Ie[10]&255)<<16|(Ie[11]&255)<<24,ge=Ie[12]&255|(Ie[13]&255)<<8|(Ie[14]&255)<<16|(Ie[15]&255)<<24,Pe=F[8]&255|(F[9]&255)<<8|(F[10]&255)<<16|(F[11]&255)<<24,tt=Ee[16]&255|(Ee[17]&255)<<8|(Ee[18]&255)<<16|(Ee[19]&255)<<24,st=Ee[20]&255|(Ee[21]&255)<<8|(Ee[22]&255)<<16|(Ee[23]&255)<<24,yr=Ee[24]&255|(Ee[25]&255)<<8|(Ee[26]&255)<<16|(Ee[27]&255)<<24,lr=Ee[28]&255|(Ee[29]&255)<<8|(Ee[30]&255)<<16|(Ee[31]&255)<<24,Or=F[12]&255|(F[13]&255)<<8|(F[14]&255)<<16|(F[15]&255)<<24,Sr=Ne,Kr=Qt,on=or,_n=Br,In=Hr,rr=kn,pr=un,Vt=gt,jr=W,Pr=ge,Lr=Pe,Wr=tt,$n=st,Zn=yr,di=lr,ai=Or,_t,fi=0;fi<20;fi+=2)_t=Sr+$n|0,In^=_t<<7|_t>>>32-7,_t=In+Sr|0,jr^=_t<<9|_t>>>32-9,_t=jr+In|0,$n^=_t<<13|_t>>>32-13,_t=$n+jr|0,Sr^=_t<<18|_t>>>32-18,_t=rr+Kr|0,Pr^=_t<<7|_t>>>32-7,_t=Pr+rr|0,Zn^=_t<<9|_t>>>32-9,_t=Zn+Pr|0,Kr^=_t<<13|_t>>>32-13,_t=Kr+Zn|0,rr^=_t<<18|_t>>>32-18,_t=Lr+pr|0,di^=_t<<7|_t>>>32-7,_t=di+Lr|0,on^=_t<<9|_t>>>32-9,_t=on+di|0,pr^=_t<<13|_t>>>32-13,_t=pr+on|0,Lr^=_t<<18|_t>>>32-18,_t=ai+Wr|0,_n^=_t<<7|_t>>>32-7,_t=_n+ai|0,Vt^=_t<<9|_t>>>32-9,_t=Vt+_n|0,Wr^=_t<<13|_t>>>32-13,_t=Wr+Vt|0,ai^=_t<<18|_t>>>32-18,_t=Sr+_n|0,Kr^=_t<<7|_t>>>32-7,_t=Kr+Sr|0,on^=_t<<9|_t>>>32-9,_t=on+Kr|0,_n^=_t<<13|_t>>>32-13,_t=_n+on|0,Sr^=_t<<18|_t>>>32-18,_t=rr+In|0,pr^=_t<<7|_t>>>32-7,_t=pr+rr|0,Vt^=_t<<9|_t>>>32-9,_t=Vt+pr|0,In^=_t<<13|_t>>>32-13,_t=In+Vt|0,rr^=_t<<18|_t>>>32-18,_t=Lr+Pr|0,Wr^=_t<<7|_t>>>32-7,_t=Wr+Lr|0,jr^=_t<<9|_t>>>32-9,_t=jr+Wr|0,Pr^=_t<<13|_t>>>32-13,_t=Pr+jr|0,Lr^=_t<<18|_t>>>32-18,_t=ai+di|0,$n^=_t<<7|_t>>>32-7,_t=$n+ai|0,Zn^=_t<<9|_t>>>32-9,_t=Zn+$n|0,di^=_t<<13|_t>>>32-13,_t=di+Zn|0,ai^=_t<<18|_t>>>32-18;Sr=Sr+Ne|0,Kr=Kr+Qt|0,on=on+or|0,_n=_n+Br|0,In=In+Hr|0,rr=rr+kn|0,pr=pr+un|0,Vt=Vt+gt|0,jr=jr+W|0,Pr=Pr+ge|0,Lr=Lr+Pe|0,Wr=Wr+tt|0,$n=$n+st|0,Zn=Zn+yr|0,di=di+lr|0,ai=ai+Or|0,le[0]=Sr>>>0&255,le[1]=Sr>>>8&255,le[2]=Sr>>>16&255,le[3]=Sr>>>24&255,le[4]=Kr>>>0&255,le[5]=Kr>>>8&255,le[6]=Kr>>>16&255,le[7]=Kr>>>24&255,le[8]=on>>>0&255,le[9]=on>>>8&255,le[10]=on>>>16&255,le[11]=on>>>24&255,le[12]=_n>>>0&255,le[13]=_n>>>8&255,le[14]=_n>>>16&255,le[15]=_n>>>24&255,le[16]=In>>>0&255,le[17]=In>>>8&255,le[18]=In>>>16&255,le[19]=In>>>24&255,le[20]=rr>>>0&255,le[21]=rr>>>8&255,le[22]=rr>>>16&255,le[23]=rr>>>24&255,le[24]=pr>>>0&255,le[25]=pr>>>8&255,le[26]=pr>>>16&255,le[27]=pr>>>24&255,le[28]=Vt>>>0&255,le[29]=Vt>>>8&255,le[30]=Vt>>>16&255,le[31]=Vt>>>24&255,le[32]=jr>>>0&255,le[33]=jr>>>8&255,le[34]=jr>>>16&255,le[35]=jr>>>24&255,le[36]=Pr>>>0&255,le[37]=Pr>>>8&255,le[38]=Pr>>>16&255,le[39]=Pr>>>24&255,le[40]=Lr>>>0&255,le[41]=Lr>>>8&255,le[42]=Lr>>>16&255,le[43]=Lr>>>24&255,le[44]=Wr>>>0&255,le[45]=Wr>>>8&255,le[46]=Wr>>>16&255,le[47]=Wr>>>24&255,le[48]=$n>>>0&255,le[49]=$n>>>8&255,le[50]=$n>>>16&255,le[51]=$n>>>24&255,le[52]=Zn>>>0&255,le[53]=Zn>>>8&255,le[54]=Zn>>>16&255,le[55]=Zn>>>24&255,le[56]=di>>>0&255,le[57]=di>>>8&255,le[58]=di>>>16&255,le[59]=di>>>24&255,le[60]=ai>>>0&255,le[61]=ai>>>8&255,le[62]=ai>>>16&255,le[63]=ai>>>24&255}function B(le,Ie,Ee,F){for(var Ne=F[0]&255|(F[1]&255)<<8|(F[2]&255)<<16|(F[3]&255)<<24,Qt=Ee[0]&255|(Ee[1]&255)<<8|(Ee[2]&255)<<16|(Ee[3]&255)<<24,or=Ee[4]&255|(Ee[5]&255)<<8|(Ee[6]&255)<<16|(Ee[7]&255)<<24,Br=Ee[8]&255|(Ee[9]&255)<<8|(Ee[10]&255)<<16|(Ee[11]&255)<<24,Hr=Ee[12]&255|(Ee[13]&255)<<8|(Ee[14]&255)<<16|(Ee[15]&255)<<24,kn=F[4]&255|(F[5]&255)<<8|(F[6]&255)<<16|(F[7]&255)<<24,un=Ie[0]&255|(Ie[1]&255)<<8|(Ie[2]&255)<<16|(Ie[3]&255)<<24,gt=Ie[4]&255|(Ie[5]&255)<<8|(Ie[6]&255)<<16|(Ie[7]&255)<<24,W=Ie[8]&255|(Ie[9]&255)<<8|(Ie[10]&255)<<16|(Ie[11]&255)<<24,ge=Ie[12]&255|(Ie[13]&255)<<8|(Ie[14]&255)<<16|(Ie[15]&255)<<24,Pe=F[8]&255|(F[9]&255)<<8|(F[10]&255)<<16|(F[11]&255)<<24,tt=Ee[16]&255|(Ee[17]&255)<<8|(Ee[18]&255)<<16|(Ee[19]&255)<<24,st=Ee[20]&255|(Ee[21]&255)<<8|(Ee[22]&255)<<16|(Ee[23]&255)<<24,yr=Ee[24]&255|(Ee[25]&255)<<8|(Ee[26]&255)<<16|(Ee[27]&255)<<24,lr=Ee[28]&255|(Ee[29]&255)<<8|(Ee[30]&255)<<16|(Ee[31]&255)<<24,Or=F[12]&255|(F[13]&255)<<8|(F[14]&255)<<16|(F[15]&255)<<24,Sr=Ne,Kr=Qt,on=or,_n=Br,In=Hr,rr=kn,pr=un,Vt=gt,jr=W,Pr=ge,Lr=Pe,Wr=tt,$n=st,Zn=yr,di=lr,ai=Or,_t,fi=0;fi<20;fi+=2)_t=Sr+$n|0,In^=_t<<7|_t>>>32-7,_t=In+Sr|0,jr^=_t<<9|_t>>>32-9,_t=jr+In|0,$n^=_t<<13|_t>>>32-13,_t=$n+jr|0,Sr^=_t<<18|_t>>>32-18,_t=rr+Kr|0,Pr^=_t<<7|_t>>>32-7,_t=Pr+rr|0,Zn^=_t<<9|_t>>>32-9,_t=Zn+Pr|0,Kr^=_t<<13|_t>>>32-13,_t=Kr+Zn|0,rr^=_t<<18|_t>>>32-18,_t=Lr+pr|0,di^=_t<<7|_t>>>32-7,_t=di+Lr|0,on^=_t<<9|_t>>>32-9,_t=on+di|0,pr^=_t<<13|_t>>>32-13,_t=pr+on|0,Lr^=_t<<18|_t>>>32-18,_t=ai+Wr|0,_n^=_t<<7|_t>>>32-7,_t=_n+ai|0,Vt^=_t<<9|_t>>>32-9,_t=Vt+_n|0,Wr^=_t<<13|_t>>>32-13,_t=Wr+Vt|0,ai^=_t<<18|_t>>>32-18,_t=Sr+_n|0,Kr^=_t<<7|_t>>>32-7,_t=Kr+Sr|0,on^=_t<<9|_t>>>32-9,_t=on+Kr|0,_n^=_t<<13|_t>>>32-13,_t=_n+on|0,Sr^=_t<<18|_t>>>32-18,_t=rr+In|0,pr^=_t<<7|_t>>>32-7,_t=pr+rr|0,Vt^=_t<<9|_t>>>32-9,_t=Vt+pr|0,In^=_t<<13|_t>>>32-13,_t=In+Vt|0,rr^=_t<<18|_t>>>32-18,_t=Lr+Pr|0,Wr^=_t<<7|_t>>>32-7,_t=Wr+Lr|0,jr^=_t<<9|_t>>>32-9,_t=jr+Wr|0,Pr^=_t<<13|_t>>>32-13,_t=Pr+jr|0,Lr^=_t<<18|_t>>>32-18,_t=ai+di|0,$n^=_t<<7|_t>>>32-7,_t=$n+ai|0,Zn^=_t<<9|_t>>>32-9,_t=Zn+$n|0,di^=_t<<13|_t>>>32-13,_t=di+Zn|0,ai^=_t<<18|_t>>>32-18;le[0]=Sr>>>0&255,le[1]=Sr>>>8&255,le[2]=Sr>>>16&255,le[3]=Sr>>>24&255,le[4]=rr>>>0&255,le[5]=rr>>>8&255,le[6]=rr>>>16&255,le[7]=rr>>>24&255,le[8]=Lr>>>0&255,le[9]=Lr>>>8&255,le[10]=Lr>>>16&255,le[11]=Lr>>>24&255,le[12]=ai>>>0&255,le[13]=ai>>>8&255,le[14]=ai>>>16&255,le[15]=ai>>>24&255,le[16]=pr>>>0&255,le[17]=pr>>>8&255,le[18]=pr>>>16&255,le[19]=pr>>>24&255,le[20]=Vt>>>0&255,le[21]=Vt>>>8&255,le[22]=Vt>>>16&255,le[23]=Vt>>>24&255,le[24]=jr>>>0&255,le[25]=jr>>>8&255,le[26]=jr>>>16&255,le[27]=jr>>>24&255,le[28]=Pr>>>0&255,le[29]=Pr>>>8&255,le[30]=Pr>>>16&255,le[31]=Pr>>>24&255}function U(le,Ie,Ee,F){A(le,Ie,Ee,F)}function L(le,Ie,Ee,F){B(le,Ie,Ee,F)}var K=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function V(le,Ie,Ee,F,Ne,Qt,or){var Br=new Uint8Array(16),Hr=new Uint8Array(64),kn,un;for(un=0;un<16;un++)Br[un]=0;for(un=0;un<8;un++)Br[un]=Qt[un];for(;Ne>=64;){for(U(Hr,Br,or,K),un=0;un<64;un++)le[Ie+un]=Ee[F+un]^Hr[un];for(kn=1,un=8;un<16;un++)kn=kn+(Br[un]&255)|0,Br[un]=kn&255,kn>>>=8;Ne-=64,Ie+=64,F+=64}if(Ne>0)for(U(Hr,Br,or,K),un=0;un=64;){for(U(or,Qt,Ne,K),Hr=0;Hr<64;Hr++)le[Ie+Hr]=or[Hr];for(Br=1,Hr=8;Hr<16;Hr++)Br=Br+(Qt[Hr]&255)|0,Qt[Hr]=Br&255,Br>>>=8;Ee-=64,Ie+=64}if(Ee>0)for(U(or,Qt,Ne,K),Hr=0;Hr>>13|Ee<<3)&8191,F=le[4]&255|(le[5]&255)<<8,this.r[2]=(Ee>>>10|F<<6)&7939,Ne=le[6]&255|(le[7]&255)<<8,this.r[3]=(F>>>7|Ne<<9)&8191,Qt=le[8]&255|(le[9]&255)<<8,this.r[4]=(Ne>>>4|Qt<<12)&255,this.r[5]=Qt>>>1&8190,or=le[10]&255|(le[11]&255)<<8,this.r[6]=(Qt>>>14|or<<2)&8191,Br=le[12]&255|(le[13]&255)<<8,this.r[7]=(or>>>11|Br<<5)&8065,Hr=le[14]&255|(le[15]&255)<<8,this.r[8]=(Br>>>8|Hr<<8)&8191,this.r[9]=Hr>>>5&127,this.pad[0]=le[16]&255|(le[17]&255)<<8,this.pad[1]=le[18]&255|(le[19]&255)<<8,this.pad[2]=le[20]&255|(le[21]&255)<<8,this.pad[3]=le[22]&255|(le[23]&255)<<8,this.pad[4]=le[24]&255|(le[25]&255)<<8,this.pad[5]=le[26]&255|(le[27]&255)<<8,this.pad[6]=le[28]&255|(le[29]&255)<<8,this.pad[7]=le[30]&255|(le[31]&255)<<8};oe.prototype.blocks=function(le,Ie,Ee){for(var F=this.fin?0:2048,Ne,Qt,or,Br,Hr,kn,un,gt,W,ge,Pe,tt,st,yr,lr,Or,Sr,Kr,on,_n=this.h[0],In=this.h[1],rr=this.h[2],pr=this.h[3],Vt=this.h[4],jr=this.h[5],Pr=this.h[6],Lr=this.h[7],Wr=this.h[8],$n=this.h[9],Zn=this.r[0],di=this.r[1],ai=this.r[2],_t=this.r[3],fi=this.r[4],cn=this.r[5],hi=this.r[6],Gn=this.r[7],Ei=this.r[8],yt=this.r[9];Ee>=16;)Ne=le[Ie+0]&255|(le[Ie+1]&255)<<8,_n+=Ne&8191,Qt=le[Ie+2]&255|(le[Ie+3]&255)<<8,In+=(Ne>>>13|Qt<<3)&8191,or=le[Ie+4]&255|(le[Ie+5]&255)<<8,rr+=(Qt>>>10|or<<6)&8191,Br=le[Ie+6]&255|(le[Ie+7]&255)<<8,pr+=(or>>>7|Br<<9)&8191,Hr=le[Ie+8]&255|(le[Ie+9]&255)<<8,Vt+=(Br>>>4|Hr<<12)&8191,jr+=Hr>>>1&8191,kn=le[Ie+10]&255|(le[Ie+11]&255)<<8,Pr+=(Hr>>>14|kn<<2)&8191,un=le[Ie+12]&255|(le[Ie+13]&255)<<8,Lr+=(kn>>>11|un<<5)&8191,gt=le[Ie+14]&255|(le[Ie+15]&255)<<8,Wr+=(un>>>8|gt<<8)&8191,$n+=gt>>>5|F,W=0,ge=W,ge+=_n*Zn,ge+=In*(5*yt),ge+=rr*(5*Ei),ge+=pr*(5*Gn),ge+=Vt*(5*hi),W=ge>>>13,ge&=8191,ge+=jr*(5*cn),ge+=Pr*(5*fi),ge+=Lr*(5*_t),ge+=Wr*(5*ai),ge+=$n*(5*di),W+=ge>>>13,ge&=8191,Pe=W,Pe+=_n*di,Pe+=In*Zn,Pe+=rr*(5*yt),Pe+=pr*(5*Ei),Pe+=Vt*(5*Gn),W=Pe>>>13,Pe&=8191,Pe+=jr*(5*hi),Pe+=Pr*(5*cn),Pe+=Lr*(5*fi),Pe+=Wr*(5*_t),Pe+=$n*(5*ai),W+=Pe>>>13,Pe&=8191,tt=W,tt+=_n*ai,tt+=In*di,tt+=rr*Zn,tt+=pr*(5*yt),tt+=Vt*(5*Ei),W=tt>>>13,tt&=8191,tt+=jr*(5*Gn),tt+=Pr*(5*hi),tt+=Lr*(5*cn),tt+=Wr*(5*fi),tt+=$n*(5*_t),W+=tt>>>13,tt&=8191,st=W,st+=_n*_t,st+=In*ai,st+=rr*di,st+=pr*Zn,st+=Vt*(5*yt),W=st>>>13,st&=8191,st+=jr*(5*Ei),st+=Pr*(5*Gn),st+=Lr*(5*hi),st+=Wr*(5*cn),st+=$n*(5*fi),W+=st>>>13,st&=8191,yr=W,yr+=_n*fi,yr+=In*_t,yr+=rr*ai,yr+=pr*di,yr+=Vt*Zn,W=yr>>>13,yr&=8191,yr+=jr*(5*yt),yr+=Pr*(5*Ei),yr+=Lr*(5*Gn),yr+=Wr*(5*hi),yr+=$n*(5*cn),W+=yr>>>13,yr&=8191,lr=W,lr+=_n*cn,lr+=In*fi,lr+=rr*_t,lr+=pr*ai,lr+=Vt*di,W=lr>>>13,lr&=8191,lr+=jr*Zn,lr+=Pr*(5*yt),lr+=Lr*(5*Ei),lr+=Wr*(5*Gn),lr+=$n*(5*hi),W+=lr>>>13,lr&=8191,Or=W,Or+=_n*hi,Or+=In*cn,Or+=rr*fi,Or+=pr*_t,Or+=Vt*ai,W=Or>>>13,Or&=8191,Or+=jr*di,Or+=Pr*Zn,Or+=Lr*(5*yt),Or+=Wr*(5*Ei),Or+=$n*(5*Gn),W+=Or>>>13,Or&=8191,Sr=W,Sr+=_n*Gn,Sr+=In*hi,Sr+=rr*cn,Sr+=pr*fi,Sr+=Vt*_t,W=Sr>>>13,Sr&=8191,Sr+=jr*ai,Sr+=Pr*di,Sr+=Lr*Zn,Sr+=Wr*(5*yt),Sr+=$n*(5*Ei),W+=Sr>>>13,Sr&=8191,Kr=W,Kr+=_n*Ei,Kr+=In*Gn,Kr+=rr*hi,Kr+=pr*cn,Kr+=Vt*fi,W=Kr>>>13,Kr&=8191,Kr+=jr*_t,Kr+=Pr*ai,Kr+=Lr*di,Kr+=Wr*Zn,Kr+=$n*(5*yt),W+=Kr>>>13,Kr&=8191,on=W,on+=_n*yt,on+=In*Ei,on+=rr*Gn,on+=pr*hi,on+=Vt*cn,W=on>>>13,on&=8191,on+=jr*fi,on+=Pr*_t,on+=Lr*ai,on+=Wr*di,on+=$n*Zn,W+=on>>>13,on&=8191,W=(W<<2)+W|0,W=W+ge|0,ge=W&8191,W=W>>>13,Pe+=W,_n=ge,In=Pe,rr=tt,pr=st,Vt=yr,jr=lr,Pr=Or,Lr=Sr,Wr=Kr,$n=on,Ie+=16,Ee-=16;this.h[0]=_n,this.h[1]=In,this.h[2]=rr,this.h[3]=pr,this.h[4]=Vt,this.h[5]=jr,this.h[6]=Pr,this.h[7]=Lr,this.h[8]=Wr,this.h[9]=$n},oe.prototype.finish=function(le,Ie){var Ee=new Uint16Array(10),F,Ne,Qt,or;if(this.leftover){for(or=this.leftover,this.buffer[or++]=1;or<16;or++)this.buffer[or]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(F=this.h[1]>>>13,this.h[1]&=8191,or=2;or<10;or++)this.h[or]+=F,F=this.h[or]>>>13,this.h[or]&=8191;for(this.h[0]+=F*5,F=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=F,F=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=F,Ee[0]=this.h[0]+5,F=Ee[0]>>>13,Ee[0]&=8191,or=1;or<10;or++)Ee[or]=this.h[or]+F,F=Ee[or]>>>13,Ee[or]&=8191;for(Ee[9]-=1<<13,Ne=(F^1)-1,or=0;or<10;or++)Ee[or]&=Ne;for(Ne=~Ne,or=0;or<10;or++)this.h[or]=this.h[or]&Ne|Ee[or];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Qt=this.h[0]+this.pad[0],this.h[0]=Qt&65535,or=1;or<8;or++)Qt=(this.h[or]+this.pad[or]|0)+(Qt>>>16)|0,this.h[or]=Qt&65535;le[Ie+0]=this.h[0]>>>0&255,le[Ie+1]=this.h[0]>>>8&255,le[Ie+2]=this.h[1]>>>0&255,le[Ie+3]=this.h[1]>>>8&255,le[Ie+4]=this.h[2]>>>0&255,le[Ie+5]=this.h[2]>>>8&255,le[Ie+6]=this.h[3]>>>0&255,le[Ie+7]=this.h[3]>>>8&255,le[Ie+8]=this.h[4]>>>0&255,le[Ie+9]=this.h[4]>>>8&255,le[Ie+10]=this.h[5]>>>0&255,le[Ie+11]=this.h[5]>>>8&255,le[Ie+12]=this.h[6]>>>0&255,le[Ie+13]=this.h[6]>>>8&255,le[Ie+14]=this.h[7]>>>0&255,le[Ie+15]=this.h[7]>>>8&255},oe.prototype.update=function(le,Ie,Ee){var F,Ne;if(this.leftover){for(Ne=16-this.leftover,Ne>Ee&&(Ne=Ee),F=0;F=16&&(Ne=Ee-Ee%16,this.blocks(le,Ie,Ne),Ie+=Ne,Ee-=Ne),Ee){for(F=0;F>16&1),Qt[Ee-1]&=65535;Qt[15]=or[15]-32767-(Qt[14]>>16&1),Ne=Qt[15]>>16&1,Qt[14]&=65535,xe(or,Qt,1-Ne)}for(Ee=0;Ee<16;Ee++)le[2*Ee]=or[Ee]&255,le[2*Ee+1]=or[Ee]>>8}function ct(le,Ie){var Ee=new Uint8Array(32),F=new Uint8Array(32);return J(Ee,le),J(F,Ie),E(Ee,0,F,0)}function De(le){var Ie=new Uint8Array(32);return J(Ie,le),Ie[0]&1}function ze(le,Ie){var Ee;for(Ee=0;Ee<16;Ee++)le[Ee]=Ie[2*Ee]+(Ie[2*Ee+1]<<8);le[15]&=32767}function ir(le,Ie,Ee){for(var F=0;F<16;F++)le[F]=Ie[F]+Ee[F]}function Rt(le,Ie,Ee){for(var F=0;F<16;F++)le[F]=Ie[F]-Ee[F]}function At(le,Ie,Ee){var F,Ne,Qt=0,or=0,Br=0,Hr=0,kn=0,un=0,gt=0,W=0,ge=0,Pe=0,tt=0,st=0,yr=0,lr=0,Or=0,Sr=0,Kr=0,on=0,_n=0,In=0,rr=0,pr=0,Vt=0,jr=0,Pr=0,Lr=0,Wr=0,$n=0,Zn=0,di=0,ai=0,_t=Ee[0],fi=Ee[1],cn=Ee[2],hi=Ee[3],Gn=Ee[4],Ei=Ee[5],yt=Ee[6],io=Ee[7],Li=Ee[8],Ui=Ee[9],yo=Ee[10],vo=Ee[11],Lo=Ee[12],ko=Ee[13],So=Ee[14],Kn=Ee[15];F=Ie[0],Qt+=F*_t,or+=F*fi,Br+=F*cn,Hr+=F*hi,kn+=F*Gn,un+=F*Ei,gt+=F*yt,W+=F*io,ge+=F*Li,Pe+=F*Ui,tt+=F*yo,st+=F*vo,yr+=F*Lo,lr+=F*ko,Or+=F*So,Sr+=F*Kn,F=Ie[1],or+=F*_t,Br+=F*fi,Hr+=F*cn,kn+=F*hi,un+=F*Gn,gt+=F*Ei,W+=F*yt,ge+=F*io,Pe+=F*Li,tt+=F*Ui,st+=F*yo,yr+=F*vo,lr+=F*Lo,Or+=F*ko,Sr+=F*So,Kr+=F*Kn,F=Ie[2],Br+=F*_t,Hr+=F*fi,kn+=F*cn,un+=F*hi,gt+=F*Gn,W+=F*Ei,ge+=F*yt,Pe+=F*io,tt+=F*Li,st+=F*Ui,yr+=F*yo,lr+=F*vo,Or+=F*Lo,Sr+=F*ko,Kr+=F*So,on+=F*Kn,F=Ie[3],Hr+=F*_t,kn+=F*fi,un+=F*cn,gt+=F*hi,W+=F*Gn,ge+=F*Ei,Pe+=F*yt,tt+=F*io,st+=F*Li,yr+=F*Ui,lr+=F*yo,Or+=F*vo,Sr+=F*Lo,Kr+=F*ko,on+=F*So,_n+=F*Kn,F=Ie[4],kn+=F*_t,un+=F*fi,gt+=F*cn,W+=F*hi,ge+=F*Gn,Pe+=F*Ei,tt+=F*yt,st+=F*io,yr+=F*Li,lr+=F*Ui,Or+=F*yo,Sr+=F*vo,Kr+=F*Lo,on+=F*ko,_n+=F*So,In+=F*Kn,F=Ie[5],un+=F*_t,gt+=F*fi,W+=F*cn,ge+=F*hi,Pe+=F*Gn,tt+=F*Ei,st+=F*yt,yr+=F*io,lr+=F*Li,Or+=F*Ui,Sr+=F*yo,Kr+=F*vo,on+=F*Lo,_n+=F*ko,In+=F*So,rr+=F*Kn,F=Ie[6],gt+=F*_t,W+=F*fi,ge+=F*cn,Pe+=F*hi,tt+=F*Gn,st+=F*Ei,yr+=F*yt,lr+=F*io,Or+=F*Li,Sr+=F*Ui,Kr+=F*yo,on+=F*vo,_n+=F*Lo,In+=F*ko,rr+=F*So,pr+=F*Kn,F=Ie[7],W+=F*_t,ge+=F*fi,Pe+=F*cn,tt+=F*hi,st+=F*Gn,yr+=F*Ei,lr+=F*yt,Or+=F*io,Sr+=F*Li,Kr+=F*Ui,on+=F*yo,_n+=F*vo,In+=F*Lo,rr+=F*ko,pr+=F*So,Vt+=F*Kn,F=Ie[8],ge+=F*_t,Pe+=F*fi,tt+=F*cn,st+=F*hi,yr+=F*Gn,lr+=F*Ei,Or+=F*yt,Sr+=F*io,Kr+=F*Li,on+=F*Ui,_n+=F*yo,In+=F*vo,rr+=F*Lo,pr+=F*ko,Vt+=F*So,jr+=F*Kn,F=Ie[9],Pe+=F*_t,tt+=F*fi,st+=F*cn,yr+=F*hi,lr+=F*Gn,Or+=F*Ei,Sr+=F*yt,Kr+=F*io,on+=F*Li,_n+=F*Ui,In+=F*yo,rr+=F*vo,pr+=F*Lo,Vt+=F*ko,jr+=F*So,Pr+=F*Kn,F=Ie[10],tt+=F*_t,st+=F*fi,yr+=F*cn,lr+=F*hi,Or+=F*Gn,Sr+=F*Ei,Kr+=F*yt,on+=F*io,_n+=F*Li,In+=F*Ui,rr+=F*yo,pr+=F*vo,Vt+=F*Lo,jr+=F*ko,Pr+=F*So,Lr+=F*Kn,F=Ie[11],st+=F*_t,yr+=F*fi,lr+=F*cn,Or+=F*hi,Sr+=F*Gn,Kr+=F*Ei,on+=F*yt,_n+=F*io,In+=F*Li,rr+=F*Ui,pr+=F*yo,Vt+=F*vo,jr+=F*Lo,Pr+=F*ko,Lr+=F*So,Wr+=F*Kn,F=Ie[12],yr+=F*_t,lr+=F*fi,Or+=F*cn,Sr+=F*hi,Kr+=F*Gn,on+=F*Ei,_n+=F*yt,In+=F*io,rr+=F*Li,pr+=F*Ui,Vt+=F*yo,jr+=F*vo,Pr+=F*Lo,Lr+=F*ko,Wr+=F*So,$n+=F*Kn,F=Ie[13],lr+=F*_t,Or+=F*fi,Sr+=F*cn,Kr+=F*hi,on+=F*Gn,_n+=F*Ei,In+=F*yt,rr+=F*io,pr+=F*Li,Vt+=F*Ui,jr+=F*yo,Pr+=F*vo,Lr+=F*Lo,Wr+=F*ko,$n+=F*So,Zn+=F*Kn,F=Ie[14],Or+=F*_t,Sr+=F*fi,Kr+=F*cn,on+=F*hi,_n+=F*Gn,In+=F*Ei,rr+=F*yt,pr+=F*io,Vt+=F*Li,jr+=F*Ui,Pr+=F*yo,Lr+=F*vo,Wr+=F*Lo,$n+=F*ko,Zn+=F*So,di+=F*Kn,F=Ie[15],Sr+=F*_t,Kr+=F*fi,on+=F*cn,_n+=F*hi,In+=F*Gn,rr+=F*Ei,pr+=F*yt,Vt+=F*io,jr+=F*Li,Pr+=F*Ui,Lr+=F*yo,Wr+=F*vo,$n+=F*Lo,Zn+=F*ko,di+=F*So,ai+=F*Kn,Qt+=38*Kr,or+=38*on,Br+=38*_n,Hr+=38*In,kn+=38*rr,un+=38*pr,gt+=38*Vt,W+=38*jr,ge+=38*Pr,Pe+=38*Lr,tt+=38*Wr,st+=38*$n,yr+=38*Zn,lr+=38*di,Or+=38*ai,Ne=1,F=Qt+Ne+65535,Ne=Math.floor(F/65536),Qt=F-Ne*65536,F=or+Ne+65535,Ne=Math.floor(F/65536),or=F-Ne*65536,F=Br+Ne+65535,Ne=Math.floor(F/65536),Br=F-Ne*65536,F=Hr+Ne+65535,Ne=Math.floor(F/65536),Hr=F-Ne*65536,F=kn+Ne+65535,Ne=Math.floor(F/65536),kn=F-Ne*65536,F=un+Ne+65535,Ne=Math.floor(F/65536),un=F-Ne*65536,F=gt+Ne+65535,Ne=Math.floor(F/65536),gt=F-Ne*65536,F=W+Ne+65535,Ne=Math.floor(F/65536),W=F-Ne*65536,F=ge+Ne+65535,Ne=Math.floor(F/65536),ge=F-Ne*65536,F=Pe+Ne+65535,Ne=Math.floor(F/65536),Pe=F-Ne*65536,F=tt+Ne+65535,Ne=Math.floor(F/65536),tt=F-Ne*65536,F=st+Ne+65535,Ne=Math.floor(F/65536),st=F-Ne*65536,F=yr+Ne+65535,Ne=Math.floor(F/65536),yr=F-Ne*65536,F=lr+Ne+65535,Ne=Math.floor(F/65536),lr=F-Ne*65536,F=Or+Ne+65535,Ne=Math.floor(F/65536),Or=F-Ne*65536,F=Sr+Ne+65535,Ne=Math.floor(F/65536),Sr=F-Ne*65536,Qt+=Ne-1+37*(Ne-1),Ne=1,F=Qt+Ne+65535,Ne=Math.floor(F/65536),Qt=F-Ne*65536,F=or+Ne+65535,Ne=Math.floor(F/65536),or=F-Ne*65536,F=Br+Ne+65535,Ne=Math.floor(F/65536),Br=F-Ne*65536,F=Hr+Ne+65535,Ne=Math.floor(F/65536),Hr=F-Ne*65536,F=kn+Ne+65535,Ne=Math.floor(F/65536),kn=F-Ne*65536,F=un+Ne+65535,Ne=Math.floor(F/65536),un=F-Ne*65536,F=gt+Ne+65535,Ne=Math.floor(F/65536),gt=F-Ne*65536,F=W+Ne+65535,Ne=Math.floor(F/65536),W=F-Ne*65536,F=ge+Ne+65535,Ne=Math.floor(F/65536),ge=F-Ne*65536,F=Pe+Ne+65535,Ne=Math.floor(F/65536),Pe=F-Ne*65536,F=tt+Ne+65535,Ne=Math.floor(F/65536),tt=F-Ne*65536,F=st+Ne+65535,Ne=Math.floor(F/65536),st=F-Ne*65536,F=yr+Ne+65535,Ne=Math.floor(F/65536),yr=F-Ne*65536,F=lr+Ne+65535,Ne=Math.floor(F/65536),lr=F-Ne*65536,F=Or+Ne+65535,Ne=Math.floor(F/65536),Or=F-Ne*65536,F=Sr+Ne+65535,Ne=Math.floor(F/65536),Sr=F-Ne*65536,Qt+=Ne-1+37*(Ne-1),le[0]=Qt,le[1]=or,le[2]=Br,le[3]=Hr,le[4]=kn,le[5]=un,le[6]=gt,le[7]=W,le[8]=ge,le[9]=Pe,le[10]=tt,le[11]=st,le[12]=yr,le[13]=lr,le[14]=Or,le[15]=Sr}function Xt(le,Ie){At(le,Ie,Ie)}function vr(le,Ie){var Ee=r(),F;for(F=0;F<16;F++)Ee[F]=Ie[F];for(F=253;F>=0;F--)Xt(Ee,Ee),F!==2&&F!==4&&At(Ee,Ee,Ie);for(F=0;F<16;F++)le[F]=Ee[F]}function Et(le,Ie){var Ee=r(),F;for(F=0;F<16;F++)Ee[F]=Ie[F];for(F=250;F>=0;F--)Xt(Ee,Ee),F!==1&&At(Ee,Ee,Ie);for(F=0;F<16;F++)le[F]=Ee[F]}function St(le,Ie,Ee){var F=new Uint8Array(32),Ne=new Float64Array(80),Qt,or,Br=r(),Hr=r(),kn=r(),un=r(),gt=r(),W=r();for(or=0;or<31;or++)F[or]=Ie[or];for(F[31]=Ie[31]&127|64,F[0]&=248,ze(Ne,Ee),or=0;or<16;or++)Hr[or]=Ne[or],un[or]=Br[or]=kn[or]=0;for(Br[0]=un[0]=1,or=254;or>=0;--or)Qt=F[or>>>3]>>>(or&7)&1,xe(Br,Hr,Qt),xe(kn,un,Qt),ir(gt,Br,kn),Rt(Br,Br,kn),ir(kn,Hr,un),Rt(Hr,Hr,un),Xt(un,gt),Xt(W,Br),At(Br,kn,Br),At(kn,Hr,gt),ir(gt,Br,kn),Rt(Br,Br,kn),Xt(Hr,Br),Rt(kn,un,W),At(Br,kn,u),ir(Br,Br,un),At(kn,kn,Br),At(Br,un,W),At(un,Hr,Ne),Xt(Hr,gt),xe(Br,Hr,Qt),xe(kn,un,Qt);for(or=0;or<16;or++)Ne[or+16]=Br[or],Ne[or+32]=kn[or],Ne[or+48]=Hr[or],Ne[or+64]=un[or];var ge=Ne.subarray(32),Pe=Ne.subarray(16);return vr(ge,ge),At(Pe,Pe,ge),J(le,Pe),0}function xt(le,Ie){return St(le,Ie,o)}function Ut(le,Ie){return i(Ie,32),xt(le,Ie)}function Gt(le,Ie,Ee){var F=new Uint8Array(32);return St(F,Ee,Ie),L(le,a,F,K)}var mr=M,ne=te;function Pt(le,Ie,Ee,F,Ne,Qt){var or=new Uint8Array(32);return Gt(or,Ne,Qt),mr(le,Ie,Ee,F,or)}function Dt(le,Ie,Ee,F,Ne,Qt){var or=new Uint8Array(32);return Gt(or,Ne,Qt),ne(le,Ie,Ee,F,or)}var Te=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Ae(le,Ie,Ee,F){for(var Ne=new Int32Array(16),Qt=new Int32Array(16),or,Br,Hr,kn,un,gt,W,ge,Pe,tt,st,yr,lr,Or,Sr,Kr,on,_n,In,rr,pr,Vt,jr,Pr,Lr,Wr,$n=le[0],Zn=le[1],di=le[2],ai=le[3],_t=le[4],fi=le[5],cn=le[6],hi=le[7],Gn=Ie[0],Ei=Ie[1],yt=Ie[2],io=Ie[3],Li=Ie[4],Ui=Ie[5],yo=Ie[6],vo=Ie[7],Lo=0;F>=128;){for(In=0;In<16;In++)rr=8*In+Lo,Ne[In]=Ee[rr+0]<<24|Ee[rr+1]<<16|Ee[rr+2]<<8|Ee[rr+3],Qt[In]=Ee[rr+4]<<24|Ee[rr+5]<<16|Ee[rr+6]<<8|Ee[rr+7];for(In=0;In<80;In++)if(or=$n,Br=Zn,Hr=di,kn=ai,un=_t,gt=fi,W=cn,ge=hi,Pe=Gn,tt=Ei,st=yt,yr=io,lr=Li,Or=Ui,Sr=yo,Kr=vo,pr=hi,Vt=vo,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=(_t>>>14|Li<<32-14)^(_t>>>18|Li<<32-18)^(Li>>>41-32|_t<<32-(41-32)),Vt=(Li>>>14|_t<<32-14)^(Li>>>18|_t<<32-18)^(_t>>>41-32|Li<<32-(41-32)),jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,pr=_t&fi^~_t&cn,Vt=Li&Ui^~Li&yo,jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,pr=Te[In*2],Vt=Te[In*2+1],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,pr=Ne[In%16],Vt=Qt[In%16],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,on=Lr&65535|Wr<<16,_n=jr&65535|Pr<<16,pr=on,Vt=_n,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=($n>>>28|Gn<<32-28)^(Gn>>>34-32|$n<<32-(34-32))^(Gn>>>39-32|$n<<32-(39-32)),Vt=(Gn>>>28|$n<<32-28)^($n>>>34-32|Gn<<32-(34-32))^($n>>>39-32|Gn<<32-(39-32)),jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,pr=$n&Zn^$n&di^Zn&di,Vt=Gn&Ei^Gn&yt^Ei&yt,jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,ge=Lr&65535|Wr<<16,Kr=jr&65535|Pr<<16,pr=kn,Vt=yr,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=on,Vt=_n,jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,kn=Lr&65535|Wr<<16,yr=jr&65535|Pr<<16,Zn=or,di=Br,ai=Hr,_t=kn,fi=un,cn=gt,hi=W,$n=ge,Ei=Pe,yt=tt,io=st,Li=yr,Ui=lr,yo=Or,vo=Sr,Gn=Kr,In%16===15)for(rr=0;rr<16;rr++)pr=Ne[rr],Vt=Qt[rr],jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=Ne[(rr+9)%16],Vt=Qt[(rr+9)%16],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,on=Ne[(rr+1)%16],_n=Qt[(rr+1)%16],pr=(on>>>1|_n<<32-1)^(on>>>8|_n<<32-8)^on>>>7,Vt=(_n>>>1|on<<32-1)^(_n>>>8|on<<32-8)^(_n>>>7|on<<32-7),jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,on=Ne[(rr+14)%16],_n=Qt[(rr+14)%16],pr=(on>>>19|_n<<32-19)^(_n>>>61-32|on<<32-(61-32))^on>>>6,Vt=(_n>>>19|on<<32-19)^(on>>>61-32|_n<<32-(61-32))^(_n>>>6|on<<32-6),jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,Ne[rr]=Lr&65535|Wr<<16,Qt[rr]=jr&65535|Pr<<16;pr=$n,Vt=Gn,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[0],Vt=Ie[0],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[0]=$n=Lr&65535|Wr<<16,Ie[0]=Gn=jr&65535|Pr<<16,pr=Zn,Vt=Ei,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[1],Vt=Ie[1],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[1]=Zn=Lr&65535|Wr<<16,Ie[1]=Ei=jr&65535|Pr<<16,pr=di,Vt=yt,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[2],Vt=Ie[2],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[2]=di=Lr&65535|Wr<<16,Ie[2]=yt=jr&65535|Pr<<16,pr=ai,Vt=io,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[3],Vt=Ie[3],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[3]=ai=Lr&65535|Wr<<16,Ie[3]=io=jr&65535|Pr<<16,pr=_t,Vt=Li,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[4],Vt=Ie[4],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[4]=_t=Lr&65535|Wr<<16,Ie[4]=Li=jr&65535|Pr<<16,pr=fi,Vt=Ui,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[5],Vt=Ie[5],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[5]=fi=Lr&65535|Wr<<16,Ie[5]=Ui=jr&65535|Pr<<16,pr=cn,Vt=yo,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[6],Vt=Ie[6],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[6]=cn=Lr&65535|Wr<<16,Ie[6]=yo=jr&65535|Pr<<16,pr=hi,Vt=vo,jr=Vt&65535,Pr=Vt>>>16,Lr=pr&65535,Wr=pr>>>16,pr=le[7],Vt=Ie[7],jr+=Vt&65535,Pr+=Vt>>>16,Lr+=pr&65535,Wr+=pr>>>16,Pr+=jr>>>16,Lr+=Pr>>>16,Wr+=Lr>>>16,le[7]=hi=Lr&65535|Wr<<16,Ie[7]=vo=jr&65535|Pr<<16,Lo+=128,F-=128}return F}function ot(le,Ie,Ee){var F=new Int32Array(8),Ne=new Int32Array(8),Qt=new Uint8Array(256),or,Br=Ee;for(F[0]=1779033703,F[1]=3144134277,F[2]=1013904242,F[3]=2773480762,F[4]=1359893119,F[5]=2600822924,F[6]=528734635,F[7]=1541459225,Ne[0]=4089235720,Ne[1]=2227873595,Ne[2]=4271175723,Ne[3]=1595750129,Ne[4]=2917565137,Ne[5]=725511199,Ne[6]=4215389547,Ne[7]=327033209,Ae(F,Ne,Ie,Ee),Ee%=128,or=0;or=0;--Ne)F=Ee[Ne/8|0]>>(Ne&7)&1,tr(le,Ie,F),$t(Ie,le),$t(le,le),tr(le,Ie,F)}function be(le,Ie){var Ee=[r(),r(),r(),r()];ue(Ee[0],g),ue(Ee[1],x),ue(Ee[2],l),At(Ee[3],g,x),br(le,Ee,Ie)}function se(le,Ie,Ee){var F=new Uint8Array(64),Ne=[r(),r(),r(),r()],Qt;for(Ee||i(Ie,32),ot(F,Ie,32),F[0]&=248,F[31]&=127,F[31]|=64,be(Ne,F),Ot(le,Ne),Qt=0;Qt<32;Qt++)Ie[Qt+32]=le[Qt];return 0}var ce=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function $(le,Ie){var Ee,F,Ne,Qt;for(F=63;F>=32;--F){for(Ee=0,Ne=F-32,Qt=F-12;Ne>4)*ce[Ne],Ee=Ie[Ne]>>8,Ie[Ne]&=255;for(Ne=0;Ne<32;Ne++)Ie[Ne]-=Ee*ce[Ne];for(F=0;F<32;F++)Ie[F+1]+=Ie[F]>>8,le[F]=Ie[F]&255}function C(le){var Ie=new Float64Array(64),Ee;for(Ee=0;Ee<64;Ee++)Ie[Ee]=le[Ee];for(Ee=0;Ee<64;Ee++)le[Ee]=0;$(le,Ie)}function R(le,Ie,Ee,F){var Ne=new Uint8Array(64),Qt=new Uint8Array(64),or=new Uint8Array(64),Br,Hr,kn=new Float64Array(64),un=[r(),r(),r(),r()];ot(Ne,F,32),Ne[0]&=248,Ne[31]&=127,Ne[31]|=64;var gt=Ee+64;for(Br=0;Br>7&&Rt(le[0],s,le[0]),At(le[3],le[0],le[1]),0)}function me(le,Ie,Ee,F){var Ne,Qt=new Uint8Array(32),or=new Uint8Array(64),Br=[r(),r(),r(),r()],Hr=[r(),r(),r(),r()];if(Ee<64||Q(Hr,F))return-1;for(Ne=0;Ne=0},t.sign.keyPair=function(){var le=new Uint8Array(qn),Ie=new Uint8Array(Ii);return se(le,Ie),{publicKey:le,secretKey:Ie}},t.sign.keyPair.fromSecretKey=function(le){if(zi(le),le.length!==Ii)throw new Error("bad secret key size");for(var Ie=new Uint8Array(qn),Ee=0;Ee0;)t.push(parseInt(e.slice(0,8),2)),e=e.slice(8);return Buffer.from(t)}Zc.bitsToBytes=vae;var q0={};Object.defineProperty(q0,"__esModule",{value:!0});q0.wordlist=void 0;const bae=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];q0.wordlist=bae;var wae=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.mnemonicFromRandomSeed=Bo.mnemonicIndexesToBytes=Bo.bytesToMnemonics=Bo.bytesToMnemonicIndexes=Bo.mnemonicNew=Bo.mnemonicValidate=Bo.mnemonicToHDSeed=Bo.mnemonicToWalletKey=Bo.mnemonicToPrivateKey=Bo.mnemonicToSeed=Bo.mnemonicToEntropy=void 0;const KU=wae(qw.exports),xae=du,_ae=wu,Kw=V0,q3=Zc,S1=q0,qC=1e5;async function GU(e){const t=await K0(e);return await Sae(t)&&!await GC(t)}function KC(e){return e.map(t=>t.toLowerCase().trim())}async function GC(e){return(await(0,Kw.pbkdf2_sha512)(e,"TON seed version",Math.max(1,Math.floor(qC/256)),64))[0]==0}async function Sae(e){return(await(0,Kw.pbkdf2_sha512)(e,"TON fast seed version",1,64))[0]==1}async function K0(e,t){return await(0,_ae.hmac_sha512)(e.join(" "),t&&t.length>0?t:"")}Bo.mnemonicToEntropy=K0;async function YC(e,t,r){const i=await K0(e,r);return await(0,Kw.pbkdf2_sha512)(i,t,qC,64)}Bo.mnemonicToSeed=YC;async function YU(e,t){e=KC(e);const r=await YC(e,"TON default seed",t);let i=KU.default.sign.keyPair.fromSeed(r.slice(0,32));return{publicKey:Buffer.from(i.publicKey),secretKey:Buffer.from(i.secretKey)}}Bo.mnemonicToPrivateKey=YU;async function Cae(e,t){let i=(await YU(e,t)).secretKey.slice(0,32);const a=KU.default.sign.keyPair.fromSeed(i);return{publicKey:Buffer.from(a.publicKey),secretKey:Buffer.from(a.secretKey)}}Bo.mnemonicToWalletKey=Cae;async function Eae(e,t){return e=KC(e),await YC(e,"TON HD Keys seed",t)}Bo.mnemonicToHDSeed=Eae;async function QU(e,t){e=KC(e);for(let r of e)if(S1.wordlist.indexOf(r)<0)return!1;return t&&t.length>0&&!await GU(e)?!1:await GC(await K0(e,t))}Bo.mnemonicValidate=QU;async function kae(e=24,t){let r=[];for(;;){r=[];for(let i=0;i0&&!await GU(r))&&!!await GC(await K0(r,t)))break}return r}Bo.mnemonicNew=kae;function XU(e,t){let r=(0,q3.bytesToBits)(e),i=[];for(let a=0;a=2028)throw Error("Invalid input");t+=(0,q3.lpad)(r.toString(2),"0",11)}for(;t.length%8!==0;)t=t+"0";return(0,q3.bitsToBytes)(t)}Bo.mnemonicIndexesToBytes=Aae;async function Tae(e,t=24,r){const i=Math.ceil(t*11/8);let a=e;for(;;){let o=await(0,Kw.pbkdf2_sha512)(a,"TON mnemonic seed",Math.max(1,Math.floor(qC/256)),i),s=ZU(o,t);if(await QU(s,r))return s;a=o}}Bo.mnemonicFromRandomSeed=Tae;var is={},Iae=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(is,"__esModule",{value:!0});is.openBox=is.sealBox=is.signVerify=is.sign=is.keyPairFromSeed=is.keyPairFromSecretKey=void 0;const Kh=Iae(qw.exports);function Rae(e){let t=Kh.default.sign.keyPair.fromSecretKey(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}is.keyPairFromSecretKey=Rae;function Pae(e){let t=Kh.default.sign.keyPair.fromSeed(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}is.keyPairFromSeed=Pae;function Mae(e,t){return Buffer.from(Kh.default.sign.detached(new Uint8Array(e),new Uint8Array(t)))}is.sign=Mae;function Oae(e,t,r){return Kh.default.sign.detached.verify(new Uint8Array(e),new Uint8Array(t),new Uint8Array(r))}is.signVerify=Oae;function Bae(e,t,r){return Buffer.from(Kh.default.secretbox(e,t,r))}is.sealBox=Bae;function Uae(e,t,r){let i=Kh.default.secretbox.open(e,t,r);return i?Buffer.from(i):null}is.openBox=Uae;var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.deriveEd25519Path=Jc.deriveED25519HardenedKey=Jc.getED25519MasterKeyFromSeed=void 0;const JU=wu,Dae="ed25519 seed",KT=2147483648;async function e7(e){const t=await(0,JU.hmac_sha512)(Dae,e),r=t.slice(0,32),i=t.slice(32);return{key:r,chainCode:i}}Jc.getED25519MasterKeyFromSeed=e7;async function t7(e,t){if(t>=KT)throw Error("Key index must be less than offset");const r=Buffer.alloc(4);r.writeUInt32BE(t+KT,0);const i=Buffer.concat([Buffer.alloc(1,0),e.key,r]),a=await(0,JU.hmac_sha512)(e.chainCode,i),o=a.slice(0,32),s=a.slice(32);return{key:o,chainCode:s}}Jc.deriveED25519HardenedKey=t7;async function Lae(e,t){let r=await e7(e),i=[...t];for(;i.length>0;){let a=i[0];i=i.slice(1),r=await t7(r,a)}return r.key}Jc.deriveEd25519Path=Lae;var ed={};Object.defineProperty(ed,"__esModule",{value:!0});ed.deriveSymmetricPath=ed.deriveSymmetricHardenedKey=ed.getSymmetricMasterKeyFromSeed=void 0;const r7=wu,Nae="Symmetric key seed";async function n7(e){const t=await(0,r7.hmac_sha512)(Nae,e),r=t.slice(32),i=t.slice(0,32);return{key:r,chainCode:i}}ed.getSymmetricMasterKeyFromSeed=n7;async function i7(e,t){const r=Buffer.concat([Buffer.alloc(1,0),Buffer.from(t)]),i=await(0,r7.hmac_sha512)(e.chainCode,r),a=i.slice(32),o=i.slice(0,32);return{key:a,chainCode:o}}ed.deriveSymmetricHardenedKey=i7;async function jae(e,t){let r=await n7(e),i=[...t];for(;i.length>0;){let a=i[0];i=i.slice(1),r=await i7(r,a)}return r.key}ed.deriveSymmetricPath=jae;var td={};Object.defineProperty(td,"__esModule",{value:!0});td.deriveMnemonicsPath=td.deriveMnemonicHardenedKey=td.getMnemonicsMasterKeyFromSeed=void 0;const $ae=Bo,o7=wu,GT=2147483648,Fae="TON Mnemonics HD seed";async function a7(e){const t=await(0,o7.hmac_sha512)(Fae,e),r=t.slice(0,32),i=t.slice(32);return{key:r,chainCode:i}}td.getMnemonicsMasterKeyFromSeed=a7;async function s7(e,t){if(t>=GT)throw Error("Key index must be less than offset");const r=Buffer.alloc(4);r.writeUInt32BE(t+GT,0);const i=Buffer.concat([Buffer.alloc(1,0),e.key,r]),a=await(0,o7.hmac_sha512)(e.chainCode,i),o=a.slice(0,32),s=a.slice(32);return{key:o,chainCode:s}}td.deriveMnemonicHardenedKey=s7;async function zae(e,t,r=24,i){let a=await a7(e),o=[...t];for(;o.length>0;){let s=o[0];o=o.slice(1),a=await s7(a,s)}return await(0,$ae.mnemonicFromRandomSeed)(a.key,r,i)}td.deriveMnemonicsPath=zae;var YT;function Gh(){return YT||(YT=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMnemonicsMasterKeyFromSeed=e.deriveMnemonicHardenedKey=e.deriveMnemonicsPath=e.deriveSymmetricPath=e.deriveSymmetricHardenedKey=e.getSymmetricMasterKeyFromSeed=e.deriveEd25519Path=e.deriveED25519HardenedKey=e.getED25519MasterKeyFromSeed=e.signVerify=e.sign=e.keyPairFromSecretKey=e.keyPairFromSeed=e.openBox=e.sealBox=e.mnemonicWordList=e.mnemonicToHDSeed=e.mnemonicToSeed=e.mnemonicToWalletKey=e.mnemonicToPrivateKey=e.mnemonicValidate=e.mnemonicNew=e.newSecurePassphrase=e.newSecureWords=e.getSecureRandomNumber=e.getSecureRandomWords=e.getSecureRandomBytes=e.hmac_sha512=e.pbkdf2_sha512=e.sha512_sync=e.sha512=e.sha256_sync=e.sha256=void 0;var t=Qc;Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return t.sha256}}),Object.defineProperty(e,"sha256_sync",{enumerable:!0,get:function(){return t.sha256_sync}});var r=Xc;Object.defineProperty(e,"sha512",{enumerable:!0,get:function(){return r.sha512}}),Object.defineProperty(e,"sha512_sync",{enumerable:!0,get:function(){return r.sha512_sync}});var i=V0;Object.defineProperty(e,"pbkdf2_sha512",{enumerable:!0,get:function(){return i.pbkdf2_sha512}});var a=wu;Object.defineProperty(e,"hmac_sha512",{enumerable:!0,get:function(){return a.hmac_sha512}});var o=du;Object.defineProperty(e,"getSecureRandomBytes",{enumerable:!0,get:function(){return o.getSecureRandomBytes}}),Object.defineProperty(e,"getSecureRandomWords",{enumerable:!0,get:function(){return o.getSecureRandomWords}}),Object.defineProperty(e,"getSecureRandomNumber",{enumerable:!0,get:function(){return o.getSecureRandomNumber}});var s=Ww;Object.defineProperty(e,"newSecureWords",{enumerable:!0,get:function(){return s.newSecureWords}});var l=hae();Object.defineProperty(e,"newSecurePassphrase",{enumerable:!0,get:function(){return l.newSecurePassphrase}});var u=Bo;Object.defineProperty(e,"mnemonicNew",{enumerable:!0,get:function(){return u.mnemonicNew}}),Object.defineProperty(e,"mnemonicValidate",{enumerable:!0,get:function(){return u.mnemonicValidate}}),Object.defineProperty(e,"mnemonicToPrivateKey",{enumerable:!0,get:function(){return u.mnemonicToPrivateKey}}),Object.defineProperty(e,"mnemonicToWalletKey",{enumerable:!0,get:function(){return u.mnemonicToWalletKey}}),Object.defineProperty(e,"mnemonicToSeed",{enumerable:!0,get:function(){return u.mnemonicToSeed}}),Object.defineProperty(e,"mnemonicToHDSeed",{enumerable:!0,get:function(){return u.mnemonicToHDSeed}});var c=q0;Object.defineProperty(e,"mnemonicWordList",{enumerable:!0,get:function(){return c.wordlist}});var d=is;Object.defineProperty(e,"sealBox",{enumerable:!0,get:function(){return d.sealBox}}),Object.defineProperty(e,"openBox",{enumerable:!0,get:function(){return d.openBox}});var g=is;Object.defineProperty(e,"keyPairFromSeed",{enumerable:!0,get:function(){return g.keyPairFromSeed}}),Object.defineProperty(e,"keyPairFromSecretKey",{enumerable:!0,get:function(){return g.keyPairFromSecretKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return g.sign}}),Object.defineProperty(e,"signVerify",{enumerable:!0,get:function(){return g.signVerify}});var x=Jc;Object.defineProperty(e,"getED25519MasterKeyFromSeed",{enumerable:!0,get:function(){return x.getED25519MasterKeyFromSeed}}),Object.defineProperty(e,"deriveED25519HardenedKey",{enumerable:!0,get:function(){return x.deriveED25519HardenedKey}}),Object.defineProperty(e,"deriveEd25519Path",{enumerable:!0,get:function(){return x.deriveEd25519Path}});var w=ed;Object.defineProperty(e,"getSymmetricMasterKeyFromSeed",{enumerable:!0,get:function(){return w.getSymmetricMasterKeyFromSeed}}),Object.defineProperty(e,"deriveSymmetricHardenedKey",{enumerable:!0,get:function(){return w.deriveSymmetricHardenedKey}}),Object.defineProperty(e,"deriveSymmetricPath",{enumerable:!0,get:function(){return w.deriveSymmetricPath}});var v=td;Object.defineProperty(e,"deriveMnemonicsPath",{enumerable:!0,get:function(){return v.deriveMnemonicsPath}}),Object.defineProperty(e,"deriveMnemonicHardenedKey",{enumerable:!0,get:function(){return v.deriveMnemonicHardenedKey}}),Object.defineProperty(e,"getMnemonicsMasterKeyFromSeed",{enumerable:!0,get:function(){return v.getMnemonicsMasterKeyFromSeed}})}(p_)),p_}Object.defineProperty(Nw,"__esModule",{value:!0});Nw.wonderCalculator=void 0;const Hae=H0(),Yl=Fh,Bg=Vh,Wae=Wh,Vae=zh,qae=Gu,Kae=Gh(),Gae=Hh,Yae=W0;function Qae(e,t,r){let i,a=null;if(e===Yl.CellType.Ordinary){let x=0;for(let w of r)x=x|w.mask.value;i=new Bg.LevelMask(x)}else if(e===Yl.CellType.PrunedBranch)a=(0,Wae.exoticPruned)(t,r),i=new Bg.LevelMask(a.mask);else if(e===Yl.CellType.MerkleProof)(0,Vae.exoticMerkleProof)(t,r),i=new Bg.LevelMask(r[0].mask.value>>1);else if(e===Yl.CellType.MerkleUpdate)(0,Gae.exoticMerkleUpdate)(t,r),i=new Bg.LevelMask((r[0].mask.value|r[1].mask.value)>>1);else if(e===Yl.CellType.Library)(0,Yae.exoticLibrary)(t,r),i=new Bg.LevelMask;else throw new Error("Unsupported exotic type");let o=[],s=[],l=e===Yl.CellType.PrunedBranch?1:i.hashCount,c=i.hashCount-l;for(let x=0,w=0;x<=i.level;x++){if(!i.isSignificant(x))continue;if(w0&&y++;let _=(0,qae.getRepr)(t,v,r,x,e),E=(0,Kae.sha256_sync)(_),A=w-c;o[A]=y,s[A]=E,w++}let d=[],g=[];if(a)for(let x=0;x<4;x++){const{hashIndex:w}=i.apply(x),{hashIndex:v}=i;w!==v?(d.push(a.pruned[w].hash),g.push(a.pruned[w].depth)):(d.push(s[0]),g.push(o[0]))}else for(let x=0;x<4;x++)d.push(s[i.apply(x).hashIndex]),g.push(o[i.apply(x).hashIndex]);return{mask:i,hashes:d,depths:g}}Nw.wonderCalculator=Qae;var Bu={},Gw={};Object.defineProperty(Gw,"__esModule",{value:!0});Gw.topologicalSort=void 0;function Xae(e){let t=[e],r=new Map,i=new Set,a=[];for(;t.length>0;){const c=[...t];t=[];for(let d of c){const g=d.hash().toString("hex");if(!r.has(g)){i.add(g),r.set(g,{cell:d,refs:d.refs.map(x=>x.hash().toString("hex"))});for(let x of d.refs)t.push(x)}}}let o=new Set;function s(c){if(!!i.has(c)){if(o.has(c))throw Error("Not a DAG");o.add(c);for(let d of r.get(c).refs)s(d);a.unshift(c),o.delete(c),i.delete(c)}}for(;i.size>0;){const c=Array.from(i)[0];s(c)}let l=new Map;for(let c=0;cl.get(g))})}return u}Gw.topologicalSort=Xae;var Yw={};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.bitsForNumber=void 0;function Zae(e,t){let r=BigInt(e);if(t==="int")return r===0n||r===-1n?1:(r>0?r:-r).toString(2).length+1;if(t==="uint"){if(r<0)throw Error(`value is negative. Got ${e}`);return r.toString(2).length}else throw Error(`invalid mode. Got ${t}`)}Yw.bitsForNumber=Zae;var G0={};Object.defineProperty(G0,"__esModule",{value:!0});G0.crc32c=void 0;const kc=2197175160;function Jae(e){let t=-1;for(let i=0;i>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1,t=t&1?t>>>1^kc:t>>>1;t=t^4294967295;let r=Buffer.alloc(4);return r.writeInt32LE(t),r}G0.crc32c=Jae;var QT;function ese(){if(QT)return Bu;QT=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.serializeBoc=Bu.deserializeBoc=Bu.parseBoc=void 0;const e=Vl,t=H0(),r=Xf(),i=Gw,a=Yw,o=Mw(),s=Gu,l=zC(),u=G0;function c(E){return d(E&7)}function d(E){let A=0;for(let B=0;B<3;B++)A+=E&1,E=E>>1;return A+1}function g(E,A){const B=E.loadUint(8),U=B%8,L=!!(B&8),K=E.loadUint(8),V=Math.ceil(K/2),H=!!(K%2),z=B>>5,Y=(B&16)!=0,oe=32,q=Y?c(z)*oe:0,ae=Y?c(z)*2:0;E.skip(q*8),E.skip(ae*8);let M=t.BitString.EMPTY;V>0&&(H?M=E.loadPaddedBits(V*8):M=E.loadBits(V*8));let te=[];for(let ue=0;ue=0;K--){if(U[K].result)throw Error("Impossible");let V=[];for(let H of U[K].refs){if(!U[H].result)throw Error("Invalid BOC file");V.push(U[H].result)}U[K].result=new r.Cell({bits:U[K].bits,refs:V,exotic:U[K].exotic})}let L=[];for(let K=0;K{if(this.isExotic&&!U)throw new Error("Exotic cells cannot be parsed");return new o.Slice(new c.BitReader(this.bits),this.refs)},this.hash=(U=3)=>this._hashes[Math.min(this._hashes.length-1,U)],this.depth=(U=3)=>this._depths[Math.min(this._depths.length-1,U)],this.level=()=>this.mask.level,this.equals=U=>this.hash().equals(U.hash()),this[t]=()=>this.toString();let v=i.BitString.EMPTY;w&&w.bits&&(v=w.bits);let y=[];w&&w.refs&&(y=[...w.refs]);let _,E,A,B=a.CellType.Ordinary;if(w&&w.exotic){let U=(0,s.resolveExotic)(v,y),L=(0,l.wonderCalculator)(U.type,v,y);A=L.mask,E=L.depths,_=L.hashes,B=U.type}else{if(y.length>4)throw new Error("Invalid number of references");if(v.length>1023)throw new Error(`Bits overflow: ${v.length} > 1023`);let U=(0,l.wonderCalculator)(a.CellType.Ordinary,v,y);A=U.mask,E=U.depths,_=U.hashes,B=a.CellType.Ordinary}this.type=B,this.bits=v,this.refs=y,this.mask=A,this._depths=E,this._hashes=_,Object.freeze(this),Object.freeze(this.refs),Object.freeze(this.bits),Object.freeze(this.mask),Object.freeze(this._depths),Object.freeze(this._hashes)}get isExotic(){return this.type!==a.CellType.Ordinary}toBoc(w){let v=w&&w.idx!==null&&w.idx!==void 0?w.idx:!1,y=w&&w.crc32!==null&&w.crc32!==void 0?w.crc32:!0;return(0,u.serializeBoc)(this,{idx:v,crc32:y})}toString(w){let v=w||"",y="x";this.isExotic&&(this.type===a.CellType.MerkleProof?y="p":this.type===a.CellType.MerkleUpdate?y="u":this.type===a.CellType.PrunedBranch&&(y="p"));let _=v+(this.isExotic?y:"x")+"{"+this.bits.toString()+"}";for(let E in this.refs){const A=this.refs[E];_+=` -`+A.toString(v+" ")}return _}asSlice(){return this.beginParse()}asBuilder(){return(0,d.beginCell)().storeSlice(this.asSlice())}}return Rg.Cell=g,t=r.default,g.EMPTY=new g,Rg}var ZT;function Ja(){if(ZT)return Bd;ZT=1,Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.Builder=Bd.beginCell=void 0;const e=Mw(),t=Xf(),r=jU();function i(){return new a}Bd.beginCell=i;class a{constructor(){this._bits=new e.BitBuilder,this._refs=[]}get bits(){return this._bits.length}get refs(){return this._refs.length}get availableBits(){return 1023-this.bits}get availableRefs(){return 4-this.refs}storeBit(s){return this._bits.writeBit(s),this}storeBits(s){return this._bits.writeBits(s),this}storeBuffer(s,l){if(l!=null&&s.length!==l)throw Error(`Buffer length ${s.length} is not equal to ${l}`);return this._bits.writeBuffer(s),this}storeMaybeBuffer(s,l){return s!==null?(this.storeBit(1),this.storeBuffer(s,l)):this.storeBit(0),this}storeUint(s,l){return this._bits.writeUint(s,l),this}storeMaybeUint(s,l){return s!=null?(this.storeBit(1),this.storeUint(s,l)):this.storeBit(0),this}storeInt(s,l){return this._bits.writeInt(s,l),this}storeMaybeInt(s,l){return s!=null?(this.storeBit(1),this.storeInt(s,l)):this.storeBit(0),this}storeVarUint(s,l){return this._bits.writeVarUint(s,l),this}storeMaybeVarUint(s,l){return s!=null?(this.storeBit(1),this.storeVarUint(s,l)):this.storeBit(0),this}storeVarInt(s,l){return this._bits.writeVarInt(s,l),this}storeMaybeVarInt(s,l){return s!=null?(this.storeBit(1),this.storeVarInt(s,l)):this.storeBit(0),this}storeCoins(s){return this._bits.writeCoins(s),this}storeMaybeCoins(s){return s!=null?(this.storeBit(1),this.storeCoins(s)):this.storeBit(0),this}storeAddress(s){return this._bits.writeAddress(s),this}storeRef(s){if(this._refs.length>=4)throw new Error("Too many references");if(s instanceof t.Cell)this._refs.push(s);else if(s instanceof a)this._refs.push(s.endCell());else throw new Error("Invalid argument");return this}storeMaybeRef(s){return s?(this.storeBit(1),this.storeRef(s)):this.storeBit(0),this}storeSlice(s){let l=s.clone();for(l.remainingBits>0&&this.storeBits(l.loadBits(l.remainingBits));l.remainingRefs>0;)this.storeRef(l.loadRef());return this}storeMaybeSlice(s){return s?(this.storeBit(1),this.storeSlice(s)):this.storeBit(0),this}storeBuilder(s){return this.storeSlice(s.endCell().beginParse())}storeMaybeBuilder(s){return s?(this.storeBit(1),this.storeBuilder(s)):this.storeBit(0),this}storeWritable(s){return typeof s=="object"?s.writeTo(this):s(this),this}storeMaybeWritable(s){return s?(this.storeBit(1),this.storeWritable(s)):this.storeBit(0),this}store(s){return this.storeWritable(s),this}storeStringTail(s){return(0,r.writeString)(s,this),this}storeMaybeStringTail(s){return s!=null?(this.storeBit(1),(0,r.writeString)(s,this)):this.storeBit(0),this}storeStringRefTail(s){return this.storeRef(i().storeStringTail(s)),this}storeMaybeStringRefTail(s){return s!=null?(this.storeBit(1),this.storeStringRefTail(s)):this.storeBit(0),this}storeDict(s,l,u){return s?s.store(this,l,u):this.storeBit(0),this}storeDictDirect(s,l,u){return s.storeDirect(this,l,u),this}endCell(){return new t.Cell({bits:this._bits.build(),refs:this._refs})}asCell(){return this.endCell()}asSlice(){return this.endCell().beginParse()}}return Bd.Builder=a,Bd}var xu={},Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.SimpleLibraryValue=Yu.storeSimpleLibrary=Yu.loadSimpleLibrary=void 0;function l7(e){return{public:e.loadBit(),root:e.loadRef()}}Yu.loadSimpleLibrary=l7;function u7(e){return t=>{t.storeBit(e.public),t.storeRef(e.root)}}Yu.storeSimpleLibrary=u7;Yu.SimpleLibraryValue={serialize(e,t){u7(e)(t)},parse(e){return l7(e)}};var wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.storeTickTock=wf.loadTickTock=void 0;function tse(e){return{tick:e.loadBit(),tock:e.loadBit()}}wf.loadTickTock=tse;function rse(e){return t=>{t.storeBit(e.tick),t.storeBit(e.tock)}}wf.storeTickTock=rse;Object.defineProperty(xu,"__esModule",{value:!0});xu.storeStateInit=xu.loadStateInit=void 0;const nse=Qf(),ise=Yu,c7=wf;function ose(e){let t;e.loadBit()&&(t=e.loadUint(5));let r;e.loadBit()&&(r=(0,c7.loadTickTock)(e));let i=e.loadMaybeRef(),a=e.loadMaybeRef(),o=e.loadDict(nse.Dictionary.Keys.BigUint(256),ise.SimpleLibraryValue);return o.size===0&&(o=void 0),{splitDepth:t,special:r,code:i,data:a,libraries:o}}xu.loadStateInit=ose;function ase(e){return t=>{e.splitDepth!==null&&e.splitDepth!==void 0?(t.storeBit(!0),t.storeUint(e.splitDepth,5)):t.storeBit(!1),e.special!==null&&e.special!==void 0?(t.storeBit(!0),t.store((0,c7.storeTickTock)(e.special))):t.storeBit(!1),t.storeMaybeRef(e.code),t.storeMaybeRef(e.data),t.storeDict(e.libraries)}}xu.storeStateInit=ase;Object.defineProperty(Pw,"__esModule",{value:!0});Pw.contractAddress=void 0;const sse=Ja(),lse=xu,use=js;function cse(e,t){let r=(0,sse.beginCell)().store((0,lse.storeStateInit)(t)).endCell().hash();return new use.Address(e,r)}Pw.contractAddress=cse;var bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.parseTuple=bh.serializeTuple=void 0;const a0=Ja(),dse=BigInt("-9223372036854775808"),fse=BigInt("9223372036854775807");function d7(e,t){if(e.type==="null")t.storeUint(0,8);else if(e.type==="int")e.value<=fse&&e.value>=dse?(t.storeUint(1,8),t.storeInt(e.value,64)):(t.storeUint(256,15),t.storeInt(e.value,257));else if(e.type==="nan")t.storeInt(767,16);else if(e.type==="cell")t.storeUint(3,8),t.storeRef(e.cell);else if(e.type==="slice")t.storeUint(4,8),t.storeUint(0,10),t.storeUint(e.cell.bits.length,10),t.storeUint(0,3),t.storeUint(e.cell.refs.length,3),t.storeRef(e.cell);else if(e.type==="builder")t.storeUint(5,8),t.storeRef(e.cell);else if(e.type==="tuple"){let r=null,i=null;for(let a=0;a1&&(r=(0,a0.beginCell)().storeRef(i).storeRef(r).endCell());let s=(0,a0.beginCell)();d7(e.items[a],s),i=s.endCell()}t.storeUint(7,8),t.storeUint(e.items.length,16),r&&t.storeRef(r),i&&t.storeRef(i)}else throw Error("Invalid value")}function lm(e){let t=e.loadUint(8);if(t===0)return{type:"null"};if(t===1)return{type:"int",value:e.loadIntBig(64)};if(t===2)return e.loadUint(7)===0?{type:"int",value:e.loadIntBig(257)}:(e.loadBit(),{type:"nan"});if(t===3)return{type:"cell",cell:e.loadRef()};if(t===4){let r=e.loadUint(10),i=e.loadUint(10),a=e.loadUint(3),o=e.loadUint(3),s=e.loadRef().beginParse();s.skip(r);let l=s.loadBits(i-r),u=(0,a0.beginCell)().storeBits(l);if(a1){let a=e.loadRef().beginParse(),o=e.loadRef().beginParse();i.unshift(lm(o));for(let s=0;s0){let r=(0,a0.beginCell)();f7(e.slice(0,e.length-1),r),t.storeRef(r.endCell()),d7(e[e.length-1],t)}}function pse(e){let t=(0,a0.beginCell)();t.storeUint(e.length,24);let r=[...e];return f7(r,t),t.endCell()}bh.serializeTuple=pse;function hse(e){let t=[],r=e.beginParse(),i=r.loadUint(24);for(let a=0;a2)throw Error("Invalid number");let i=r[0],a=r[1];if(i||(i="0"),a||(a="0"),a.length>9)throw Error("Invalid number");for(;a.length<9;)a+="0";let o=BigInt(i)*1000000000n+BigInt(a);return t&&(o=-o),o}}xf.toNano=mse;function yse(e){let t=BigInt(e),r=!1;t<0&&(r=!0,t=-t);let a=(t%1000000000n).toString();for(;a.length<9;)a="0"+a;a=a.match(/^([0-9]*[1-9]|0)(0*)/)[1];let l=`${(t/1000000000n).toString()}${a==="0"?"":`.${a}`}`;return r&&(l="-"+l),l}xf.fromNano=yse;Object.defineProperty(rd,"__esModule",{value:!0});rd.comment=rd.external=rd.internal=void 0;const E1=js,h7=Xf(),g7=Ja(),vse=xf;function bse(e){let t=!0;e.bounce!==null&&e.bounce!==void 0&&(t=e.bounce);let r;if(typeof e.to=="string")r=E1.Address.parse(e.to);else if(E1.Address.isAddress(e.to))r=e.to;else throw new Error(`Invalid address ${e.to}`);let i;typeof e.value=="string"?i=(0,vse.toNano)(e.value):i=e.value;let a=h7.Cell.EMPTY;return typeof e.body=="string"?a=(0,g7.beginCell)().storeUint(0,32).storeStringTail(e.body).endCell():e.body&&(a=e.body),{info:{type:"internal",dest:r,value:{coins:i},bounce:t,ihrDisabled:!0,bounced:!1,ihrFee:0n,forwardFee:0n,createdAt:0,createdLt:0n},init:e.init?{code:e.init.code,data:e.init.data}:void 0,body:a}}rd.internal=bse;function wse(e){let t;if(typeof e.to=="string")t=E1.Address.parse(e.to);else if(E1.Address.isAddress(e.to))t=e.to;else throw new Error(`Invalid address ${e.to}`);return{info:{type:"external-in",dest:t,importFee:0n},init:e.init?{code:e.init.code,data:e.init.data}:void 0,body:e.body||h7.Cell.EMPTY}}rd.external=wse;function xse(e){return(0,g7.beginCell)().storeUint(0,32).storeStringTail(e).endCell()}rd.comment=xse;var _f={},Sf={},Cf={};Object.defineProperty(Cf,"__esModule",{value:!0});Cf.storeAccountState=Cf.loadAccountState=void 0;const m7=xu;function _se(e){return e.loadBit()?{type:"active",state:(0,m7.loadStateInit)(e)}:e.loadBit()?{type:"frozen",stateHash:e.loadUintBig(256)}:{type:"uninit"}}Cf.loadAccountState=_se;function Sse(e){return t=>{e.type==="active"?(t.storeBit(!0),t.store((0,m7.storeStateInit)(e.state))):e.type==="frozen"?(t.storeBit(!1),t.storeBit(!0),t.storeUint(e.stateHash,256)):e.type==="uninit"&&(t.storeBit(!1),t.storeBit(!1))}}Cf.storeAccountState=Sse;var $s={};Object.defineProperty($s,"__esModule",{value:!0});$s.storeCurrencyCollection=$s.loadCurrencyCollection=void 0;const JT=Qf();function Cse(e){const t=e.loadCoins(),r=e.loadDict(JT.Dictionary.Keys.Uint(32),JT.Dictionary.Values.BigVarUint(5));return r.size===0?{coins:t}:{other:r,coins:t}}$s.loadCurrencyCollection=Cse;function Ese(e){return t=>{t.storeCoins(e.coins),e.other?t.storeDict(e.other):t.storeBit(0)}}$s.storeCurrencyCollection=Ese;Object.defineProperty(Sf,"__esModule",{value:!0});Sf.storeAccountStorage=Sf.loadAccountStorage=void 0;const y7=Cf,v7=$s;function kse(e){return{lastTransLt:e.loadUintBig(64),balance:(0,v7.loadCurrencyCollection)(e),state:(0,y7.loadAccountState)(e)}}Sf.loadAccountStorage=kse;function Ase(e){return t=>{t.storeUint(e.lastTransLt,64),t.store((0,v7.storeCurrencyCollection)(e.balance)),t.store((0,y7.storeAccountState)(e.state))}}Sf.storeAccountStorage=Ase;var Ef={},kf={};Object.defineProperty(kf,"__esModule",{value:!0});kf.storeStorageUsed=kf.loadStorageUsed=void 0;function Tse(e){return{cells:e.loadVarUintBig(3),bits:e.loadVarUintBig(3),publicCells:e.loadVarUintBig(3)}}kf.loadStorageUsed=Tse;function Ise(e){return t=>{t.storeVarUint(e.cells,3),t.storeVarUint(e.bits,3),t.storeVarUint(e.publicCells,3)}}kf.storeStorageUsed=Ise;Object.defineProperty(Ef,"__esModule",{value:!0});Ef.storeStorageInfo=Ef.loadStorageInfo=void 0;const b7=kf;function Rse(e){return{used:(0,b7.loadStorageUsed)(e),lastPaid:e.loadUint(32),duePayment:e.loadMaybeCoins()}}Ef.loadStorageInfo=Rse;function Pse(e){return t=>{t.store((0,b7.storeStorageUsed)(e.used)),t.storeUint(e.lastPaid,32),t.storeMaybeCoins(e.duePayment)}}Ef.storeStorageInfo=Pse;Object.defineProperty(_f,"__esModule",{value:!0});_f.storeAccount=_f.loadAccount=void 0;const w7=Sf,x7=Ef;function Mse(e){return{addr:e.loadAddress(),storageStats:(0,x7.loadStorageInfo)(e),storage:(0,w7.loadAccountStorage)(e)}}_f.loadAccount=Mse;function Ose(e){return t=>{t.storeAddress(e.addr),t.store((0,x7.storeStorageInfo)(e.storageStats)),t.store((0,w7.storeAccountStorage)(e.storage))}}_f.storeAccount=Ose;var Af={};Object.defineProperty(Af,"__esModule",{value:!0});Af.storeAccountStatus=Af.loadAccountStatus=void 0;function Bse(e){const t=e.loadUint(2);if(t===0)return"uninitialized";if(t===1)return"frozen";if(t===2)return"active";if(t===3)return"non-existing";throw Error("Invalid data")}Af.loadAccountStatus=Bse;function Use(e){return t=>{if(e==="uninitialized")t.storeUint(0,2);else if(e==="frozen")t.storeUint(1,2);else if(e==="active")t.storeUint(2,2);else if(e==="non-existing")t.storeUint(3,2);else throw Error("Invalid data");return t}}Af.storeAccountStatus=Use;var cd={};Object.defineProperty(cd,"__esModule",{value:!0});cd.storeAccountStatusChange=cd.loadAccountStatusChange=void 0;function Dse(e){return e.loadBit()?e.loadBit()?"frozen":"deleted":"unchanged"}cd.loadAccountStatusChange=Dse;function Lse(e){return t=>{if(e=="unchanged")t.storeBit(0);else if(e==="frozen")t.storeBit(1),t.storeBit(0);else if(e==="deleted")t.storeBit(1),t.storeBit(1);else throw Error("Invalid account status change")}}cd.storeAccountStatusChange=Lse;var Tf={};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.storeCommonMessageInfo=Tf.loadCommonMessageInfo=void 0;const _7=$s;function Nse(e){if(!e.loadBit()){const o=e.loadBit(),s=e.loadBit(),l=e.loadBit(),u=e.loadAddress(),c=e.loadAddress(),d=(0,_7.loadCurrencyCollection)(e),g=e.loadCoins(),x=e.loadCoins(),w=e.loadUintBig(64),v=e.loadUint(32);return{type:"internal",ihrDisabled:o,bounce:s,bounced:l,src:u,dest:c,value:d,ihrFee:g,forwardFee:x,createdLt:w,createdAt:v}}if(!e.loadBit()){const o=e.loadMaybeExternalAddress(),s=e.loadAddress(),l=e.loadCoins();return{type:"external-in",src:o,dest:s,importFee:l}}const t=e.loadAddress(),r=e.loadMaybeExternalAddress(),i=e.loadUintBig(64),a=e.loadUint(32);return{type:"external-out",src:t,dest:r,createdLt:i,createdAt:a}}Tf.loadCommonMessageInfo=Nse;function jse(e){return t=>{if(e.type==="internal")t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,_7.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if(e.type==="external-in")t.storeBit(1),t.storeBit(0),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeCoins(e.importFee);else if(e.type==="external-out")t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw new Error("Unknown CommonMessageInfo type")}}Tf.storeCommonMessageInfo=jse;var If={};Object.defineProperty(If,"__esModule",{value:!0});If.storeCommonMessageInfoRelaxed=If.loadCommonMessageInfoRelaxed=void 0;const S7=$s;function $se(e){if(!e.loadBit()){const o=e.loadBit(),s=e.loadBit(),l=e.loadBit(),u=e.loadMaybeAddress(),c=e.loadAddress(),d=(0,S7.loadCurrencyCollection)(e),g=e.loadCoins(),x=e.loadCoins(),w=e.loadUintBig(64),v=e.loadUint(32);return{type:"internal",ihrDisabled:o,bounce:s,bounced:l,src:u,dest:c,value:d,ihrFee:g,forwardFee:x,createdLt:w,createdAt:v}}if(!e.loadBit())throw Error("External In message is not possible for CommonMessageInfoRelaxed");const t=e.loadMaybeAddress(),r=e.loadMaybeExternalAddress(),i=e.loadUintBig(64),a=e.loadUint(32);return{type:"external-out",src:t,dest:r,createdLt:i,createdAt:a}}If.loadCommonMessageInfoRelaxed=$se;function Fse(e){return t=>{if(e.type==="internal")t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,S7.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if(e.type==="external-out")t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw new Error("Unknown CommonMessageInfo type")}}If.storeCommonMessageInfoRelaxed=Fse;var Rf={};Object.defineProperty(Rf,"__esModule",{value:!0});Rf.storeComputeSkipReason=Rf.loadComputeSkipReason=void 0;function zse(e){let t=e.loadUint(2);if(t===0)return"no-state";if(t===1)return"bad-state";if(t===2)return"no-gas";throw new Error(`Unknown ComputeSkipReason: ${t}`)}Rf.loadComputeSkipReason=zse;function Hse(e){return t=>{if(e==="no-state")t.storeUint(0,2);else if(e==="bad-state")t.storeUint(1,2);else if(e==="no-gas")t.storeUint(2,2);else throw new Error(`Unknown ComputeSkipReason: ${e}`)}}Rf.storeComputeSkipReason=Hse;var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0});Pf.storeDepthBalanceInfo=Pf.loadDepthBalanceInfo=void 0;const C7=$s;function Wse(e){return{splitDepth:e.loadUint(5),balance:(0,C7.loadCurrencyCollection)(e)}}Pf.loadDepthBalanceInfo=Wse;function Vse(e){return t=>{t.storeUint(e.splitDepth,5),t.store((0,C7.storeCurrencyCollection)(e.balance))}}Pf.storeDepthBalanceInfo=Vse;var Mf={};Object.defineProperty(Mf,"__esModule",{value:!0});Mf.storeHashUpdate=Mf.loadHashUpdate=void 0;function qse(e){if(e.loadUint(8)!==114)throw Error("Invalid data");const t=e.loadBuffer(32),r=e.loadBuffer(32);return{oldHash:t,newHash:r}}Mf.loadHashUpdate=qse;function Kse(e){return t=>{t.storeUint(114,8),t.storeBuffer(e.oldHash),t.storeBuffer(e.newHash)}}Mf.storeHashUpdate=Kse;var Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});Y0.loadMasterchainStateExtra=void 0;const y_=Qf(),Gse=$s;function Yse(e){if(e.loadUint(16)!==52262)throw Error("Invalid data");e.loadBit()&&e.loadRef();let t=e.loadUintBig(256),r=y_.Dictionary.load(y_.Dictionary.Keys.Int(32),y_.Dictionary.Values.Cell(),e);const i=(0,Gse.loadCurrencyCollection)(e);return{config:r,configAddress:t,globalBalance:i}}Y0.loadMasterchainStateExtra=Yse;var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0});Qu.MessageValue=Qu.storeMessage=Qu.loadMessage=void 0;const E7=Ja(),k7=Tf,K3=xu;function A7(e){const t=(0,k7.loadCommonMessageInfo)(e);let r=null;e.loadBit()&&(e.loadBit()?r=(0,K3.loadStateInit)(e.loadRef().beginParse()):r=(0,K3.loadStateInit)(e));const i=e.loadBit()?e.loadRef():e.asCell();return{info:t,init:r,body:i}}Qu.loadMessage=A7;function T7(e,t){return r=>{if(r.store((0,k7.storeCommonMessageInfo)(e.info)),e.init){r.storeBit(!0);let a=(0,E7.beginCell)().store((0,K3.storeStateInit)(e.init)),o=!1;t&&t.forceRef?o=!0:r.availableBits-2>=a.bits?o=!1:o=!0,o?(r.storeBit(!0),r.storeRef(a)):(r.storeBit(!1),r.storeBuilder(a))}else r.storeBit(!1);let i=!1;t&&t.forceRef?i=!0:r.availableBits-1>=e.body.bits.length&&r.refs+e.body.refs.length<=4?i=!1:i=!0,i?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}Qu.storeMessage=T7;Qu.MessageValue={serialize(e,t){t.storeRef((0,E7.beginCell)().store(T7(e)))},parse(e){return A7(e.loadRef().beginParse())}};var wh={};Object.defineProperty(wh,"__esModule",{value:!0});wh.storeMessageRelaxed=wh.loadMessageRelaxed=void 0;const Qse=Ja(),I7=If,G3=xu;function Xse(e){const t=(0,I7.loadCommonMessageInfoRelaxed)(e);let r=null;e.loadBit()&&(e.loadBit()?r=(0,G3.loadStateInit)(e.loadRef().beginParse()):r=(0,G3.loadStateInit)(e));const i=e.loadBit()?e.loadRef():e.asCell();return{info:t,init:r,body:i}}wh.loadMessageRelaxed=Xse;function Zse(e,t){return r=>{if(r.store((0,I7.storeCommonMessageInfoRelaxed)(e.info)),e.init){r.storeBit(!0);let a=(0,Qse.beginCell)().store((0,G3.storeStateInit)(e.init)),o=!1;t&&t.forceRef?o=!0:r.availableBits-2>=a.bits?o=!1:o=!0,o?(r.storeBit(!0),r.storeRef(a)):(r.storeBit(!1),r.storeBuilder(a))}else r.storeBit(!1);let i=!1;t&&t.forceRef?i=!0:r.availableBits-1>=e.body.bits.length&&r.refs+e.body.refs.length<=4?i=!1:i=!0,i?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}wh.storeMessageRelaxed=Zse;var R7={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SendMode=void 0,function(t){t[t.CARRY_ALL_REMAINING_BALANCE=128]="CARRY_ALL_REMAINING_BALANCE",t[t.CARRY_ALL_REMAINING_INCOMING_VALUE=64]="CARRY_ALL_REMAINING_INCOMING_VALUE",t[t.DESTROY_ACCOUNT_IF_ZERO=32]="DESTROY_ACCOUNT_IF_ZERO",t[t.PAY_GAS_SEPARATELY=1]="PAY_GAS_SEPARATELY",t[t.IGNORE_ERRORS=2]="IGNORE_ERRORS",t[t.NONE=0]="NONE"}(e.SendMode||(e.SendMode={}))})(R7);var Of={};Object.defineProperty(Of,"__esModule",{value:!0});Of.storeShardAccount=Of.loadShardAccount=void 0;const eI=Ja(),P7=_f;function Jse(e){let t=e.loadRef(),r;if(!t.isExotic){let i=t.beginParse();i.loadBit()&&(r=(0,P7.loadAccount)(i))}return{account:r,lastTransactionHash:e.loadUintBig(256),lastTransactionLt:e.loadUintBig(64)}}Of.loadShardAccount=Jse;function ele(e){return t=>{e.account?t.storeRef((0,eI.beginCell)().storeBit(!0).store((0,P7.storeAccount)(e.account))):t.storeRef((0,eI.beginCell)().storeBit(!1)),t.storeUint(e.lastTransactionHash,256),t.storeUint(e.lastTransactionLt,64)}}Of.storeShardAccount=ele;var QC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.storeShardAccounts=e.loadShardAccounts=e.ShardAccountRefValue=void 0;const t=Qf(),r=Pf,i=Of;e.ShardAccountRefValue={parse:s=>{let l=(0,r.loadDepthBalanceInfo)(s),u=(0,i.loadShardAccount)(s);return{depthBalanceInfo:l,shardAccount:u}},serialize(s,l){l.store((0,r.storeDepthBalanceInfo)(s.depthBalanceInfo)),l.store((0,i.storeShardAccount)(s.shardAccount))}};function a(s){return t.Dictionary.load(t.Dictionary.Keys.BigUint(256),e.ShardAccountRefValue,s)}e.loadShardAccounts=a;function o(s){return l=>{l.storeDict(s)}}e.storeShardAccounts=o})(QC);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0});Bf.storeShardIdent=Bf.loadShardIdent=void 0;function tle(e){if(e.loadUint(2)!==0)throw Error("Invalid data");return{shardPrefixBits:e.loadUint(6),workchainId:e.loadInt(32),shardPrefix:e.loadUintBig(64)}}Bf.loadShardIdent=tle;function rle(e){return t=>{t.storeUint(0,2),t.storeUint(e.shardPrefixBits,6),t.storeInt(e.workchainId,32),t.storeUint(e.shardPrefix,64)}}Bf.storeShardIdent=rle;var Zw={};Object.defineProperty(Zw,"__esModule",{value:!0});Zw.loadShardStateUnsplit=void 0;const nle=Y0,ile=QC,ole=Bf;function ale(e){if(e.loadUint(32)!==2418257890)throw Error("Invalid data");let t=e.loadInt(32),r=(0,ole.loadShardIdent)(e),i=e.loadUint(32),a=e.loadUint(32),o=e.loadUint(32),s=e.loadUintBig(64),l=e.loadUint(32);e.loadRef();let u=e.loadBit(),c=e.loadRef(),d;c.isExotic||(d=(0,ile.loadShardAccounts)(c.beginParse())),e.loadRef();let g=e.loadBit(),x=null;if(g){let w=e.loadRef();w.isExotic||(x=(0,nle.loadMasterchainStateExtra)(w.beginParse()))}return{globalId:t,shardId:r,seqno:i,vertSeqNo:a,genUtime:o,genLt:s,minRefMcSeqno:l,beforeSplit:u,accounts:d,extras:x}}Zw.loadShardStateUnsplit=ale;var Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});Uf.storeSplitMergeInfo=Uf.loadSplitMergeInfo=void 0;function sle(e){let t=e.loadUint(6),r=e.loadUint(6),i=e.loadUintBig(256),a=e.loadUintBig(256);return{currentShardPrefixLength:t,accountSplitDepth:r,thisAddress:i,siblingAddress:a}}Uf.loadSplitMergeInfo=sle;function lle(e){return t=>{t.storeUint(e.currentShardPrefixLength,6),t.storeUint(e.accountSplitDepth,6),t.storeUint(e.thisAddress,256),t.storeUint(e.siblingAddress,256)}}Uf.storeSplitMergeInfo=lle;var dd={};Object.defineProperty(dd,"__esModule",{value:!0});dd.storeStorageUsedShort=dd.loadStorageUsedShort=void 0;function ule(e){let t=e.loadVarUintBig(3),r=e.loadVarUintBig(3);return{cells:t,bits:r}}dd.loadStorageUsedShort=ule;function cle(e){return t=>{t.storeVarUint(e.cells,3),t.storeVarUint(e.bits,3)}}dd.storeStorageUsedShort=cle;var Ud={},Dd={},Df={};Object.defineProperty(Df,"__esModule",{value:!0});Df.storeTransactionActionPhase=Df.loadTransactionActionPhase=void 0;const M7=cd,O7=dd;function dle(e){let t=e.loadBit(),r=e.loadBit(),i=e.loadBit(),a=(0,M7.loadAccountStatusChange)(e),o=e.loadBit()?e.loadCoins():void 0,s=e.loadBit()?e.loadCoins():void 0,l=e.loadInt(32),u=e.loadBit()?e.loadInt(32):void 0,c=e.loadUint(16),d=e.loadUint(16),g=e.loadUint(16),x=e.loadUint(16),w=e.loadUintBig(256),v=(0,O7.loadStorageUsedShort)(e);return{success:t,valid:r,noFunds:i,statusChange:a,totalFwdFees:o,totalActionFees:s,resultCode:l,resultArg:u,totalActions:c,specActions:d,skippedActions:g,messagesCreated:x,actionListHash:w,totalMessageSize:v}}Df.loadTransactionActionPhase=dle;function fle(e){return t=>{t.storeBit(e.success),t.storeBit(e.valid),t.storeBit(e.noFunds),t.store((0,M7.storeAccountStatusChange)(e.statusChange)),t.storeMaybeCoins(e.totalFwdFees),t.storeMaybeCoins(e.totalActionFees),t.storeInt(e.resultCode,32),t.storeMaybeInt(e.resultArg,32),t.storeUint(e.totalActions,16),t.storeUint(e.specActions,16),t.storeUint(e.skippedActions,16),t.storeUint(e.messagesCreated,16),t.storeUint(e.actionListHash,256),t.store((0,O7.storeStorageUsedShort)(e.totalMessageSize))}}Df.storeTransactionActionPhase=fle;var Lf={};Object.defineProperty(Lf,"__esModule",{value:!0});Lf.storeTransactionBouncePhase=Lf.loadTransactionBouncePhase=void 0;const k1=dd;function ple(e){if(e.loadBit()){let t=(0,k1.loadStorageUsedShort)(e),r=e.loadCoins(),i=e.loadCoins();return{type:"ok",messageSize:t,messageFees:r,forwardFees:i}}if(e.loadBit()){let t=(0,k1.loadStorageUsedShort)(e),r=e.loadCoins();return{type:"no-funds",messageSize:t,requiredForwardFees:r}}return{type:"negative-funds"}}Lf.loadTransactionBouncePhase=ple;function hle(e){return t=>{if(e.type==="ok")t.storeBit(!0),t.store((0,k1.storeStorageUsedShort)(e.messageSize)),t.storeCoins(e.messageFees),t.storeCoins(e.forwardFees);else if(e.type==="negative-funds")t.storeBit(!1),t.storeBit(!1);else if(e.type==="no-funds")t.storeBit(!1),t.storeBit(!0),t.store((0,k1.storeStorageUsedShort)(e.messageSize)),t.storeCoins(e.requiredForwardFees);else throw new Error("Invalid TransactionBouncePhase type")}}Lf.storeTransactionBouncePhase=hle;var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.storeTransactionComputePhase=Nf.loadTransactionComputePhase=void 0;const gle=Ja(),B7=Rf;function mle(e){if(!e.loadBit())return{type:"skipped",reason:(0,B7.loadComputeSkipReason)(e)};let t=e.loadBit(),r=e.loadBit(),i=e.loadBit(),a=e.loadCoins();const o=e.loadRef().beginParse();let s=o.loadVarUintBig(3),l=o.loadVarUintBig(3),u=o.loadBit()?o.loadVarUintBig(2):void 0,c=o.loadUint(8),d=o.loadUint(32),g=o.loadBit()?o.loadInt(32):void 0,x=o.loadUint(32),w=o.loadUintBig(256),v=o.loadUintBig(256);return{type:"vm",success:t,messageStateUsed:r,accountActivated:i,gasFees:a,gasUsed:s,gasLimit:l,gasCredit:u,mode:c,exitCode:d,exitArg:g,vmSteps:x,vmInitStateHash:w,vmFinalStateHash:v}}Nf.loadTransactionComputePhase=mle;function yle(e){return t=>{if(e.type==="skipped"){t.storeBit(0),t.store((0,B7.storeComputeSkipReason)(e.reason));return}t.storeBit(1),t.storeBit(e.success),t.storeBit(e.messageStateUsed),t.storeBit(e.accountActivated),t.storeCoins(e.gasFees),t.storeRef((0,gle.beginCell)().storeVarUint(e.gasUsed,3).storeVarUint(e.gasLimit,3).store(r=>e.gasCredit!==void 0&&e.gasCredit!==null?r.storeBit(1).storeVarUint(e.gasCredit,2):r.storeBit(0)).storeUint(e.mode,8).storeUint(e.exitCode,32).store(r=>e.exitArg!==void 0&&e.exitArg!==null?r.storeBit(1).storeInt(e.exitArg,32):r.storeBit(0)).storeUint(e.vmSteps,32).storeUint(e.vmInitStateHash,256).storeUint(e.vmFinalStateHash,256).endCell())}}Nf.storeTransactionComputePhase=yle;var jf={};Object.defineProperty(jf,"__esModule",{value:!0});jf.storeTransactionCreditPhase=jf.loadTransactionCreditPhase=void 0;const U7=$s;function vle(e){const t=e.loadBit()?e.loadCoins():void 0,r=(0,U7.loadCurrencyCollection)(e);return{dueFeesColelcted:t,credit:r}}jf.loadTransactionCreditPhase=vle;function ble(e){return t=>{e.dueFeesColelcted===null||e.dueFeesColelcted===void 0?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.dueFeesColelcted)),t.store((0,U7.storeCurrencyCollection)(e.credit))}}jf.storeTransactionCreditPhase=ble;var $f={};Object.defineProperty($f,"__esModule",{value:!0});$f.storeTransactionsStoragePhase=$f.loadTransactionStoragePhase=void 0;const D7=cd;function wle(e){const t=e.loadCoins();let r;e.loadBit()&&(r=e.loadCoins());const i=(0,D7.loadAccountStatusChange)(e);return{storageFeesCollected:t,storageFeesDue:r,statusChange:i}}$f.loadTransactionStoragePhase=wle;function xle(e){return t=>{t.storeCoins(e.storageFeesCollected),e.storageFeesDue===null||e.storageFeesDue===void 0?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.storageFeesDue)),t.store((0,D7.storeAccountStatusChange)(e.statusChange))}}$f.storeTransactionsStoragePhase=xle;var tI;function L7(){if(tI)return Dd;tI=1,Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.storeTransactionDescription=Dd.loadTransactionDescription=void 0;const e=Ja(),t=Uf,r=N7(),i=Df,a=Lf,o=Nf,s=jf,l=$f;function u(d){let g=d.loadUint(4);if(g===0){const x=d.loadBit();let w;d.loadBit()&&(w=(0,l.loadTransactionStoragePhase)(d));let v;d.loadBit()&&(v=(0,s.loadTransactionCreditPhase)(d));let y=(0,o.loadTransactionComputePhase)(d),_;d.loadBit()&&(_=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));let E=d.loadBit(),A;d.loadBit()&&(A=(0,a.loadTransactionBouncePhase)(d));const B=d.loadBit();return{type:"generic",creditFirst:x,storagePhase:w,creditPhase:v,computePhase:y,actionPhase:_,bouncePhase:A,aborted:E,destroyed:B}}if(g===1)return{type:"storage",storagePhase:(0,l.loadTransactionStoragePhase)(d)};if(g===2||g===3){const x=g===3;let w=(0,l.loadTransactionStoragePhase)(d),v=(0,o.loadTransactionComputePhase)(d),y;d.loadBit()&&(y=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));const _=d.loadBit(),E=d.loadBit();return{type:"tick-tock",isTock:x,storagePhase:w,computePhase:v,actionPhase:y,aborted:_,destroyed:E}}if(g===4){let x=(0,t.loadSplitMergeInfo)(d),w;d.loadBit()&&(w=(0,l.loadTransactionStoragePhase)(d));let v=(0,o.loadTransactionComputePhase)(d),y;d.loadBit()&&(y=(0,i.loadTransactionActionPhase)(d.loadRef().beginParse()));const _=d.loadBit(),E=d.loadBit();return{type:"split-prepare",splitInfo:x,storagePhase:w,computePhase:v,actionPhase:y,aborted:_,destroyed:E}}if(g===5){let x=(0,t.loadSplitMergeInfo)(d),w=(0,r.loadTransaction)(d.loadRef().beginParse());const v=d.loadBit();return{type:"split-install",splitInfo:x,prepareTransaction:w,installed:v}}throw Error(`Unsupported transaction description type ${g}`)}Dd.loadTransactionDescription=u;function c(d){return g=>{if(d.type==="generic")g.storeUint(0,4),g.storeBit(d.creditFirst),d.storagePhase?(g.storeBit(!0),g.store((0,l.storeTransactionsStoragePhase)(d.storagePhase))):g.storeBit(!1),d.creditPhase?(g.storeBit(!0),g.store((0,s.storeTransactionCreditPhase)(d.creditPhase))):g.storeBit(!1),g.store((0,o.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(g.storeBit(!0),g.storeRef((0,e.beginCell)().store((0,i.storeTransactionActionPhase)(d.actionPhase)))):g.storeBit(!1),g.storeBit(d.aborted),d.bouncePhase?(g.storeBit(!0),g.store((0,a.storeTransactionBouncePhase)(d.bouncePhase))):g.storeBit(!1),g.storeBit(d.destroyed);else if(d.type==="storage")g.storeUint(1,4),g.store((0,l.storeTransactionsStoragePhase)(d.storagePhase));else if(d.type==="tick-tock")g.storeUint(d.isTock?3:2,4),g.store((0,l.storeTransactionsStoragePhase)(d.storagePhase)),g.store((0,o.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(g.storeBit(!0),g.storeRef((0,e.beginCell)().store((0,i.storeTransactionActionPhase)(d.actionPhase)))):g.storeBit(!1),g.storeBit(d.aborted),g.storeBit(d.destroyed);else if(d.type==="split-prepare")g.storeUint(4,4),g.store((0,t.storeSplitMergeInfo)(d.splitInfo)),d.storagePhase?(g.storeBit(!0),g.store((0,l.storeTransactionsStoragePhase)(d.storagePhase))):g.storeBit(!1),g.store((0,o.storeTransactionComputePhase)(d.computePhase)),d.actionPhase?(g.storeBit(!0),g.store((0,i.storeTransactionActionPhase)(d.actionPhase))):g.storeBit(!1),g.storeBit(d.aborted),g.storeBit(d.destroyed);else if(d.type==="split-install")g.storeUint(5,4),g.store((0,t.storeSplitMergeInfo)(d.splitInfo)),g.storeRef((0,e.beginCell)().store((0,r.storeTransaction)(d.prepareTransaction))),g.storeBit(d.installed);else throw Error(`Unsupported transaction description type ${d.type}`)}}return Dd.storeTransactionDescription=c,Dd}var rI;function N7(){if(rI)return Ud;rI=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.storeTransaction=Ud.loadTransaction=void 0;const e=Ja(),t=Qf(),r=Af,i=$s,a=Mf,o=Qu,s=L7();function l(c){if(c.loadUint(4)!==7)throw Error("Invalid data");let d=c.loadUintBig(256),g=c.loadUintBig(64),x=c.loadUintBig(256),w=c.loadUintBig(64),v=c.loadUint(32),y=c.loadUint(15),_=(0,r.loadAccountStatus)(c),E=(0,r.loadAccountStatus)(c),B=c.loadRef().beginParse(),U=B.loadBit()?(0,o.loadMessage)(B.loadRef().beginParse()):void 0,L=B.loadDict(t.Dictionary.Keys.Uint(15),o.MessageValue);B.endParse();let K=(0,i.loadCurrencyCollection)(c),V=(0,a.loadHashUpdate)(c.loadRef().beginParse()),H=(0,s.loadTransactionDescription)(c.loadRef().beginParse());return{address:d,lt:g,prevTransactionHash:x,prevTransactionLt:w,now:v,outMessagesCount:y,oldStatus:_,endStatus:E,inMessage:U,outMessages:L,totalFees:K,stateUpdate:V,description:H}}Ud.loadTransaction=l;function u(c){return d=>{d.storeUint(7,4),d.storeUint(c.address,256),d.storeUint(c.lt,64),d.storeUint(c.prevTransactionHash,256),d.storeUint(c.prevTransactionLt,64),d.storeUint(c.now,32),d.storeUint(c.outMessagesCount,15),d.store((0,r.storeAccountStatus)(c.oldStatus)),d.store((0,r.storeAccountStatus)(c.endStatus));let g=(0,e.beginCell)();c.inMessage?(g.storeBit(!0),g.storeRef((0,e.beginCell)().store((0,o.storeMessage)(c.inMessage)))):g.storeBit(!1),g.storeDict(c.outMessages),d.storeRef(g),d.store((0,i.storeCurrencyCollection)(c.totalFees)),d.storeRef((0,e.beginCell)().store((0,a.storeHashUpdate)(c.stateUpdate))),d.storeRef((0,e.beginCell)().store((0,s.storeTransactionDescription)(c.description)))}}return Ud.storeTransaction=u,Ud}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.loadStorageUsedShort=e.storeStorageUsed=e.loadStorageUsed=e.storeStorageInfo=e.loadStorageInfo=e.storeStateInit=e.loadStateInit=e.storeSplitMergeInfo=e.loadSplitMergeInfo=e.storeSimpleLibrary=e.loadSimpleLibrary=e.loadShardStateUnsplit=e.storeShardIdent=e.loadShardIdent=e.storeShardAccounts=e.loadShardAccounts=e.ShardAccountRefValue=e.storeShardAccount=e.loadShardAccount=e.SendMode=e.storeMessageRelaxed=e.loadMessageRelaxed=e.storeMessage=e.loadMessage=e.loadMasterchainStateExtra=e.storeHashUpdate=e.loadHashUpdate=e.storeDepthBalanceInfo=e.loadDepthBalanceInfo=e.storeCurrencyCollection=e.loadCurrencyCollection=e.storeComputeSkipReason=e.loadComputeSkipReason=e.storeCommonMessageInfoRelaxed=e.loadCommonMessageInfoRelaxed=e.storeCommonMessageInfo=e.loadCommonMessageInfo=e.storeAccountStorage=e.loadAccountStorage=e.storeAccountStatusChange=e.loadAccountStatusChange=e.storeAccountStatus=e.loadAccountStatus=e.storeAccountState=e.loadAccountState=e.storeAccount=e.loadAccount=e.comment=e.external=e.internal=void 0,e.storeTransactionsStoragePhase=e.loadTransactionStoragePhase=e.storeTransactionDescription=e.loadTransactionDescription=e.storeTransactionCreditPhase=e.loadTransactionCreditPhase=e.storeTransactionComputePhase=e.loadTransactionComputePhase=e.storeTransactionBouncePhase=e.loadTransactionBouncePhase=e.storeTransactionActionPhase=e.loadTransactionActionPhase=e.storeTransaction=e.loadTransaction=e.storeTickTock=e.loadTickTock=e.storeStorageUsedShort=void 0;var t=rd;Object.defineProperty(e,"internal",{enumerable:!0,get:function(){return t.internal}}),Object.defineProperty(e,"external",{enumerable:!0,get:function(){return t.external}}),Object.defineProperty(e,"comment",{enumerable:!0,get:function(){return t.comment}});var r=_f;Object.defineProperty(e,"loadAccount",{enumerable:!0,get:function(){return r.loadAccount}}),Object.defineProperty(e,"storeAccount",{enumerable:!0,get:function(){return r.storeAccount}});var i=Cf;Object.defineProperty(e,"loadAccountState",{enumerable:!0,get:function(){return i.loadAccountState}}),Object.defineProperty(e,"storeAccountState",{enumerable:!0,get:function(){return i.storeAccountState}});var a=Af;Object.defineProperty(e,"loadAccountStatus",{enumerable:!0,get:function(){return a.loadAccountStatus}}),Object.defineProperty(e,"storeAccountStatus",{enumerable:!0,get:function(){return a.storeAccountStatus}});var o=cd;Object.defineProperty(e,"loadAccountStatusChange",{enumerable:!0,get:function(){return o.loadAccountStatusChange}}),Object.defineProperty(e,"storeAccountStatusChange",{enumerable:!0,get:function(){return o.storeAccountStatusChange}});var s=Sf;Object.defineProperty(e,"loadAccountStorage",{enumerable:!0,get:function(){return s.loadAccountStorage}}),Object.defineProperty(e,"storeAccountStorage",{enumerable:!0,get:function(){return s.storeAccountStorage}});var l=Tf;Object.defineProperty(e,"loadCommonMessageInfo",{enumerable:!0,get:function(){return l.loadCommonMessageInfo}}),Object.defineProperty(e,"storeCommonMessageInfo",{enumerable:!0,get:function(){return l.storeCommonMessageInfo}});var u=If;Object.defineProperty(e,"loadCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return u.loadCommonMessageInfoRelaxed}}),Object.defineProperty(e,"storeCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return u.storeCommonMessageInfoRelaxed}});var c=Rf;Object.defineProperty(e,"loadComputeSkipReason",{enumerable:!0,get:function(){return c.loadComputeSkipReason}}),Object.defineProperty(e,"storeComputeSkipReason",{enumerable:!0,get:function(){return c.storeComputeSkipReason}});var d=$s;Object.defineProperty(e,"loadCurrencyCollection",{enumerable:!0,get:function(){return d.loadCurrencyCollection}}),Object.defineProperty(e,"storeCurrencyCollection",{enumerable:!0,get:function(){return d.storeCurrencyCollection}});var g=Pf;Object.defineProperty(e,"loadDepthBalanceInfo",{enumerable:!0,get:function(){return g.loadDepthBalanceInfo}}),Object.defineProperty(e,"storeDepthBalanceInfo",{enumerable:!0,get:function(){return g.storeDepthBalanceInfo}});var x=Mf;Object.defineProperty(e,"loadHashUpdate",{enumerable:!0,get:function(){return x.loadHashUpdate}}),Object.defineProperty(e,"storeHashUpdate",{enumerable:!0,get:function(){return x.storeHashUpdate}});var w=Y0;Object.defineProperty(e,"loadMasterchainStateExtra",{enumerable:!0,get:function(){return w.loadMasterchainStateExtra}});var v=Qu;Object.defineProperty(e,"loadMessage",{enumerable:!0,get:function(){return v.loadMessage}}),Object.defineProperty(e,"storeMessage",{enumerable:!0,get:function(){return v.storeMessage}});var y=wh;Object.defineProperty(e,"loadMessageRelaxed",{enumerable:!0,get:function(){return y.loadMessageRelaxed}}),Object.defineProperty(e,"storeMessageRelaxed",{enumerable:!0,get:function(){return y.storeMessageRelaxed}});var _=R7;Object.defineProperty(e,"SendMode",{enumerable:!0,get:function(){return _.SendMode}});var E=Of;Object.defineProperty(e,"loadShardAccount",{enumerable:!0,get:function(){return E.loadShardAccount}}),Object.defineProperty(e,"storeShardAccount",{enumerable:!0,get:function(){return E.storeShardAccount}});var A=QC;Object.defineProperty(e,"ShardAccountRefValue",{enumerable:!0,get:function(){return A.ShardAccountRefValue}}),Object.defineProperty(e,"loadShardAccounts",{enumerable:!0,get:function(){return A.loadShardAccounts}}),Object.defineProperty(e,"storeShardAccounts",{enumerable:!0,get:function(){return A.storeShardAccounts}});var B=Bf;Object.defineProperty(e,"loadShardIdent",{enumerable:!0,get:function(){return B.loadShardIdent}}),Object.defineProperty(e,"storeShardIdent",{enumerable:!0,get:function(){return B.storeShardIdent}});var U=Zw;Object.defineProperty(e,"loadShardStateUnsplit",{enumerable:!0,get:function(){return U.loadShardStateUnsplit}});var L=Yu;Object.defineProperty(e,"loadSimpleLibrary",{enumerable:!0,get:function(){return L.loadSimpleLibrary}}),Object.defineProperty(e,"storeSimpleLibrary",{enumerable:!0,get:function(){return L.storeSimpleLibrary}});var K=Uf;Object.defineProperty(e,"loadSplitMergeInfo",{enumerable:!0,get:function(){return K.loadSplitMergeInfo}}),Object.defineProperty(e,"storeSplitMergeInfo",{enumerable:!0,get:function(){return K.storeSplitMergeInfo}});var V=xu;Object.defineProperty(e,"loadStateInit",{enumerable:!0,get:function(){return V.loadStateInit}}),Object.defineProperty(e,"storeStateInit",{enumerable:!0,get:function(){return V.storeStateInit}});var H=Ef;Object.defineProperty(e,"loadStorageInfo",{enumerable:!0,get:function(){return H.loadStorageInfo}}),Object.defineProperty(e,"storeStorageInfo",{enumerable:!0,get:function(){return H.storeStorageInfo}});var z=kf;Object.defineProperty(e,"loadStorageUsed",{enumerable:!0,get:function(){return z.loadStorageUsed}}),Object.defineProperty(e,"storeStorageUsed",{enumerable:!0,get:function(){return z.storeStorageUsed}});var Y=dd;Object.defineProperty(e,"loadStorageUsedShort",{enumerable:!0,get:function(){return Y.loadStorageUsedShort}}),Object.defineProperty(e,"storeStorageUsedShort",{enumerable:!0,get:function(){return Y.storeStorageUsedShort}});var oe=wf;Object.defineProperty(e,"loadTickTock",{enumerable:!0,get:function(){return oe.loadTickTock}}),Object.defineProperty(e,"storeTickTock",{enumerable:!0,get:function(){return oe.storeTickTock}});var q=N7();Object.defineProperty(e,"loadTransaction",{enumerable:!0,get:function(){return q.loadTransaction}}),Object.defineProperty(e,"storeTransaction",{enumerable:!0,get:function(){return q.storeTransaction}});var ae=Df;Object.defineProperty(e,"loadTransactionActionPhase",{enumerable:!0,get:function(){return ae.loadTransactionActionPhase}}),Object.defineProperty(e,"storeTransactionActionPhase",{enumerable:!0,get:function(){return ae.storeTransactionActionPhase}});var M=Lf;Object.defineProperty(e,"loadTransactionBouncePhase",{enumerable:!0,get:function(){return M.loadTransactionBouncePhase}}),Object.defineProperty(e,"storeTransactionBouncePhase",{enumerable:!0,get:function(){return M.storeTransactionBouncePhase}});var te=Nf;Object.defineProperty(e,"loadTransactionComputePhase",{enumerable:!0,get:function(){return te.loadTransactionComputePhase}}),Object.defineProperty(e,"storeTransactionComputePhase",{enumerable:!0,get:function(){return te.storeTransactionComputePhase}});var ue=jf;Object.defineProperty(e,"loadTransactionCreditPhase",{enumerable:!0,get:function(){return ue.loadTransactionCreditPhase}}),Object.defineProperty(e,"storeTransactionCreditPhase",{enumerable:!0,get:function(){return ue.storeTransactionCreditPhase}});var he=L7();Object.defineProperty(e,"loadTransactionDescription",{enumerable:!0,get:function(){return he.loadTransactionDescription}}),Object.defineProperty(e,"storeTransactionDescription",{enumerable:!0,get:function(){return he.storeTransactionDescription}});var xe=$f;Object.defineProperty(e,"loadTransactionStoragePhase",{enumerable:!0,get:function(){return xe.loadTransactionStoragePhase}}),Object.defineProperty(e,"storeTransactionsStoragePhase",{enumerable:!0,get:function(){return xe.storeTransactionsStoragePhase}})})(p7);var Jw={};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.openContract=void 0;const _le=js,nI=Xf();function Sle(e,t){let r,i=null;if(!_le.Address.isAddress(e.address))throw Error("Invalid address");if(r=e.address,e.init){if(!(e.init.code instanceof nI.Cell))throw Error("Invalid init.code");if(!(e.init.data instanceof nI.Cell))throw Error("Invalid init.data");i=e.init}let a=t({address:r,init:i});return new Proxy(e,{get(o,s){const l=o[s];return typeof s=="string"&&(s.startsWith("get")||s.startsWith("send"))&&typeof l=="function"?(...u)=>l.apply(o,[a,...u]):l}})}Jw.openContract=Sle;var e2={};Object.defineProperty(e2,"__esModule",{value:!0});e2.ComputeError=void 0;class XC extends Error{constructor(t,r,i){super(t),this.exitCode=r,this.debugLogs=i&&i.debugLogs?i.debugLogs:null,this.logs=i&&i.logs?i.logs:null,Object.setPrototypeOf(this,XC.prototype)}}e2.ComputeError=XC;var t2={};Object.defineProperty(t2,"__esModule",{value:!0});t2.getMethodId=void 0;const Cle=new Int16Array([0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920]);function Ele(e){e instanceof Buffer||(e=Buffer.from(e));let t=0;for(let r=0;r>8^i)&255]^t<<8)&65535}return t}function kle(e){return Ele(e)&65535|65536}t2.getMethodId=kle;var xh={};Object.defineProperty(xh,"__esModule",{value:!0});xh.safeSignVerify=xh.safeSign=void 0;const ZC=Gh(),Ale=8,Tle=64;function j7(e,t){let r=Buffer.from(t);if(r.length>Tle)throw Error("Seed can be longer than 64 bytes");if(r.length{i!==null?this.cache.set(t+"$$"+r,i):this.cache.delete(t+"$$"+r)},this.get=async(t,r)=>{let i=this.cache.get(t+"$$"+r);return i!==void 0?i:null}}}r2.InMemoryCache=Ple;var Mle=function(){function e(r,i){if(typeof r!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array and returns Promise>, but got: "+r+"."));this._batchLoadFn=r,this._maxBatchSize=Dle(i),this._batchScheduleFn=Lle(i),this._cacheKeyFn=Nle(i),this._cacheMap=jle(i),this._batch=null}var t=e.prototype;return t.load=function(i){if(i==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(i)+"."));var a=Ble(this),o=this._cacheMap,s=this._cacheKeyFn(i);if(o){var l=o.get(s);if(l){var u=a.cacheHits||(a.cacheHits=[]);return new Promise(function(d){u.push(function(){d(l)})})}}a.keys.push(i);var c=new Promise(function(d,g){a.callbacks.push({resolve:d,reject:g})});return o&&o.set(s,c),c},t.loadMany=function(i){if(!$7(i))throw new TypeError("The loader.loadMany() function must be called with Array "+("but got: "+i+"."));for(var a=[],o=0;o and returns Promise>, but the function did "+("not return a Promise: "+String(r)+".")));r.then(function(i){if(!$7(i))throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did "+("not return a Promise of an Array: "+String(i)+"."));if(i.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(` - -Keys: -`+String(t.keys))+(` - -Values: -`+String(i)));Y3(t);for(var a=0;a0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var $le=Mle,JC={exports:{}},e6={exports:{}},F7=function(t,r){return function(){for(var a=new Array(arguments.length),o=0;o"u"}function zle(e){return e!==null&&!Q3(e)&&e.constructor!==null&&!Q3(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function z7(e){return Cd.call(e)==="[object ArrayBuffer]"}function Hle(e){return Cd.call(e)==="[object FormData]"}function Wle(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&z7(e.buffer),t}function Vle(e){return typeof e=="string"}function qle(e){return typeof e=="number"}function H7(e){return e!==null&&typeof e=="object"}function Ov(e){if(Cd.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Kle(e){return Cd.call(e)==="[object Date]"}function Gle(e){return Cd.call(e)==="[object File]"}function Yle(e){return Cd.call(e)==="[object Blob]"}function W7(e){return Cd.call(e)==="[object Function]"}function Qle(e){return H7(e)&&W7(e.pipe)}function Xle(e){return Cd.call(e)==="[object URLSearchParams]"}function Zle(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Jle(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function r6(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),t6(e))for(var r=0,i=e.length;r"u"||(mp.isArray(u)?c=c+"[]":u=[u],mp.forEach(u,function(g){mp.isDate(g)?g=g.toISOString():mp.isObject(g)&&(g=JSON.stringify(g)),o.push(oI(c)+"="+oI(g))}))}),a=o.join("&")}if(a){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t},rue=Ss;function n2(){this.handlers=[]}n2.prototype.use=function(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};n2.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};n2.prototype.forEach=function(t){rue.forEach(this.handlers,function(i){i!==null&&t(i)})};var nue=n2,iue=Ss,oue=function(t,r){iue.forEach(t,function(a,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[o])})},q7=function(t,r,i,a,o){return t.config=r,i&&(t.code=i),t.request=a,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},b_,aI;function K7(){if(aI)return b_;aI=1;var e=q7;return b_=function(r,i,a,o,s){var l=new Error(r);return e(l,i,a,o,s)},b_}var w_,sI;function aue(){if(sI)return w_;sI=1;var e=K7();return w_=function(r,i,a){var o=a.config.validateStatus;!a.status||!o||o(a.status)?r(a):i(e("Request failed with status code "+a.status,a.config,null,a.request,a))},w_}var x_,lI;function sue(){if(lI)return x_;lI=1;var e=Ss;return x_=e.isStandardBrowserEnv()?function(){return{write:function(i,a,o,s,l,u){var c=[];c.push(i+"="+encodeURIComponent(a)),e.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),e.isString(s)&&c.push("path="+s),e.isString(l)&&c.push("domain="+l),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(i){var a=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(i){this.write(i,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),x_}var __,uI;function lue(){return uI||(uI=1,__=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),__}var S_,cI;function uue(){return cI||(cI=1,S_=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),S_}var C_,dI;function cue(){if(dI)return C_;dI=1;var e=lue(),t=uue();return C_=function(i,a){return i&&!e(a)?t(i,a):a},C_}var E_,fI;function due(){if(fI)return E_;fI=1;var e=Ss,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return E_=function(i){var a={},o,s,l;return i&&e.forEach(i.split(` -`),function(c){if(l=c.indexOf(":"),o=e.trim(c.substr(0,l)).toLowerCase(),s=e.trim(c.substr(l+1)),o){if(a[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?a[o]=(a[o]?a[o]:[]).concat([s]):a[o]=a[o]?a[o]+", "+s:s}}),a},E_}var k_,pI;function fue(){if(pI)return k_;pI=1;var e=Ss;return k_=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),a;function o(s){var l=s;return r&&(i.setAttribute("href",l),l=i.href),i.setAttribute("href",l),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return a=o(window.location.href),function(l){var u=e.isString(l)?o(l):l;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}(),k_}var A_,hI;function i2(){if(hI)return A_;hI=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,A_=e,A_}var T_,gI;function mI(){if(gI)return T_;gI=1;var e=Ss,t=aue(),r=sue(),i=V7,a=cue(),o=due(),s=fue(),l=K7(),u=o2(),c=i2();return T_=function(g){return new Promise(function(w,v){var y=g.data,_=g.headers,E=g.responseType,A;function B(){g.cancelToken&&g.cancelToken.unsubscribe(A),g.signal&&g.signal.removeEventListener("abort",A)}e.isFormData(y)&&delete _["Content-Type"];var U=new XMLHttpRequest;if(g.auth){var L=g.auth.username||"",K=g.auth.password?unescape(encodeURIComponent(g.auth.password)):"";_.Authorization="Basic "+btoa(L+":"+K)}var V=a(g.baseURL,g.url);U.open(g.method.toUpperCase(),i(V,g.params,g.paramsSerializer),!0),U.timeout=g.timeout;function H(){if(!!U){var Y="getAllResponseHeaders"in U?o(U.getAllResponseHeaders()):null,oe=!E||E==="text"||E==="json"?U.responseText:U.response,q={data:oe,status:U.status,statusText:U.statusText,headers:Y,config:g,request:U};t(function(M){w(M),B()},function(M){v(M),B()},q),U=null}}if("onloadend"in U?U.onloadend=H:U.onreadystatechange=function(){!U||U.readyState!==4||U.status===0&&!(U.responseURL&&U.responseURL.indexOf("file:")===0)||setTimeout(H)},U.onabort=function(){!U||(v(l("Request aborted",g,"ECONNABORTED",U)),U=null)},U.onerror=function(){v(l("Network Error",g,null,U)),U=null},U.ontimeout=function(){var oe=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded",q=g.transitional||u.transitional;g.timeoutErrorMessage&&(oe=g.timeoutErrorMessage),v(l(oe,g,q.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U)),U=null},e.isStandardBrowserEnv()){var z=(g.withCredentials||s(V))&&g.xsrfCookieName?r.read(g.xsrfCookieName):void 0;z&&(_[g.xsrfHeaderName]=z)}"setRequestHeader"in U&&e.forEach(_,function(oe,q){typeof y>"u"&&q.toLowerCase()==="content-type"?delete _[q]:U.setRequestHeader(q,oe)}),e.isUndefined(g.withCredentials)||(U.withCredentials=!!g.withCredentials),E&&E!=="json"&&(U.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&U.addEventListener("progress",g.onDownloadProgress),typeof g.onUploadProgress=="function"&&U.upload&&U.upload.addEventListener("progress",g.onUploadProgress),(g.cancelToken||g.signal)&&(A=function(Y){!U||(v(!Y||Y&&Y.type?new c("canceled"):Y),U.abort(),U=null)},g.cancelToken&&g.cancelToken.subscribe(A),g.signal&&(g.signal.aborted?A():g.signal.addEventListener("abort",A))),y||(y=null),U.send(y)})},T_}var I_,yI;function o2(){if(yI)return I_;yI=1;var e=Ss,t=oue,r=q7,i={"Content-Type":"application/x-www-form-urlencoded"};function a(u,c){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=c)}function o(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=mI()),u}function s(u,c,d){if(e.isString(u))try{return(c||JSON.parse)(u),e.trim(u)}catch(g){if(g.name!=="SyntaxError")throw g}return(d||JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:o(),transformRequest:[function(c,d){return t(d,"Accept"),t(d,"Content-Type"),e.isFormData(c)||e.isArrayBuffer(c)||e.isBuffer(c)||e.isStream(c)||e.isFile(c)||e.isBlob(c)?c:e.isArrayBufferView(c)?c.buffer:e.isURLSearchParams(c)?(a(d,"application/x-www-form-urlencoded;charset=utf-8"),c.toString()):e.isObject(c)||d&&d["Content-Type"]==="application/json"?(a(d,"application/json"),s(c)):c}],transformResponse:[function(c){var d=this.transitional||l.transitional,g=d&&d.silentJSONParsing,x=d&&d.forcedJSONParsing,w=!g&&this.responseType==="json";if(w||x&&e.isString(c)&&c.length)try{return JSON.parse(c)}catch(v){if(w)throw v.name==="SyntaxError"?r(v,this,"E_JSON_PARSE"):v}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(c){l.headers[c]={}}),e.forEach(["post","put","patch"],function(c){l.headers[c]=e.merge(i)}),I_=l,I_}var pue=Ss,hue=o2(),gue=function(t,r,i){var a=this||hue;return pue.forEach(i,function(s){t=s.call(a,t,r)}),t},R_,vI;function G7(){return vI||(vI=1,R_=function(t){return!!(t&&t.__CANCEL__)}),R_}var bI=Ss,P_=gue,mue=G7(),yue=o2(),vue=i2();function M_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vue("canceled")}var bue=function(t){M_(t),t.headers=t.headers||{},t.data=P_.call(t,t.data,t.headers,t.transformRequest),t.headers=bI.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),bI.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||yue.adapter;return r(t).then(function(a){return M_(t),a.data=P_.call(t,a.data,a.headers,t.transformResponse),a},function(a){return mue(a)||(M_(t),a&&a.response&&(a.response.data=P_.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},Es=Ss,Y7=function(t,r){r=r||{};var i={};function a(d,g){return Es.isPlainObject(d)&&Es.isPlainObject(g)?Es.merge(d,g):Es.isPlainObject(g)?Es.merge({},g):Es.isArray(g)?g.slice():g}function o(d){if(Es.isUndefined(r[d])){if(!Es.isUndefined(t[d]))return a(void 0,t[d])}else return a(t[d],r[d])}function s(d){if(!Es.isUndefined(r[d]))return a(void 0,r[d])}function l(d){if(Es.isUndefined(r[d])){if(!Es.isUndefined(t[d]))return a(void 0,t[d])}else return a(void 0,r[d])}function u(d){if(d in r)return a(t[d],r[d]);if(d in t)return a(void 0,t[d])}var c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u};return Es.forEach(Object.keys(t).concat(Object.keys(r)),function(g){var x=c[g]||o,w=x(g);Es.isUndefined(w)&&x!==u||(i[g]=w)}),i},O_,wI;function Q7(){return wI||(wI=1,O_={version:"0.25.0"}),O_}var wue=Q7().version,n6={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){n6[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var xI={};n6.transitional=function(t,r,i){function a(o,s){return"[Axios v"+wue+"] Transitional option '"+o+"'"+s+(i?". "+i:"")}return function(o,s,l){if(t===!1)throw new Error(a(s," has been removed"+(r?" in "+r:"")));return r&&!xI[s]&&(xI[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,l):!0}};function xue(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var i=Object.keys(e),a=i.length;a-- >0;){var o=i[a],s=t[o];if(s){var l=e[o],u=l===void 0||s(l,o,e);if(u!==!0)throw new TypeError("option "+o+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+o)}}var _ue={assertOptions:xue,validators:n6},X7=Ss,Sue=V7,_I=nue,SI=bue,a2=Y7,Z7=_ue,yp=Z7.validators;function X0(e){this.defaults=e,this.interceptors={request:new _I,response:new _I}}X0.prototype.request=function(t,r){if(typeof t=="string"?(r=r||{},r.url=t):r=t||{},!r.url)throw new Error("Provided config url is not valid");r=a2(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&Z7.assertOptions(i,{silentJSONParsing:yp.transitional(yp.boolean),forcedJSONParsing:yp.transitional(yp.boolean),clarifyTimeoutError:yp.transitional(yp.boolean)},!1);var a=[],o=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(o=o&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});var s=[];this.interceptors.response.forEach(function(w){s.push(w.fulfilled,w.rejected)});var l;if(!o){var u=[SI,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),l=Promise.resolve(r);u.length;)l=l.then(u.shift(),u.shift());return l}for(var c=r;a.length;){var d=a.shift(),g=a.shift();try{c=d(c)}catch(x){g(x);break}}try{l=SI(c)}catch(x){return Promise.reject(x)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};X0.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=a2(this.defaults,t),Sue(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};X7.forEach(["delete","get","head","options"],function(t){X0.prototype[t]=function(r,i){return this.request(a2(i||{},{method:t,url:r,data:(i||{}).data}))}});X7.forEach(["post","put","patch"],function(t){X0.prototype[t]=function(r,i,a){return this.request(a2(a||{},{method:t,url:r,data:i}))}});var Cue=X0,B_,CI;function Eue(){if(CI)return B_;CI=1;var e=i2();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var i;this.promise=new Promise(function(s){i=s});var a=this;this.promise.then(function(o){if(!!a._listeners){var s,l=a._listeners.length;for(s=0;sl;function a(l){}i.assertIs=a;function o(l){throw new Error}i.assertNever=o,i.arrayToEnum=l=>{const u={};for(const c of l)u[c]=c;return u},i.getValidEnumValues=l=>{const u=i.objectKeys(l).filter(d=>typeof l[l[d]]!="number"),c={};for(const d of u)c[d]=l[d];return i.objectValues(c)},i.objectValues=l=>i.objectKeys(l).map(function(u){return l[u]}),i.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const u=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);return u},i.find=(l,u)=>{for(const c of l)if(u(c))return c},i.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&isFinite(l)&&Math.floor(l)===l;function s(l,u=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}i.joinValues=s,i.jsonStringifyReplacer=(l,u)=>typeof u=="bigint"?u.toString():u})(t=e.util||(e.util={})),function(i){i.mergeShapes=(a,o)=>({...a,...o})}(e.objectUtil||(e.objectUtil={})),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=i=>{switch(typeof i){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(i)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(i)?e.ZodParsedType.array:i===null?e.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?e.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?e.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?e.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}};e.getParsedType=r})(Z0);var pu={};Object.defineProperty(pu,"__esModule",{value:!0});pu.ZodError=pu.quotelessJson=pu.ZodIssueCode=void 0;const eD=Z0;pu.ZodIssueCode=eD.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const Pue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");pu.quotelessJson=Pue;class J3 extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},i={_errors:[]},a=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)i._errors.push(r(s));else{let l=i,u=0;for(;ur.message){const r={},i=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):i.push(t(a));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}pu.ZodError=J3;J3.create=e=>new J3(e);Object.defineProperty(s2,"__esModule",{value:!0});const Ld=Z0,Wa=pu,Mue=(e,t)=>{let r;switch(e.code){case Wa.ZodIssueCode.invalid_type:e.received===Ld.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Wa.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ld.util.jsonStringifyReplacer)}`;break;case Wa.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ld.util.joinValues(e.keys,", ")}`;break;case Wa.ZodIssueCode.invalid_union:r="Invalid input";break;case Wa.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ld.util.joinValues(e.options)}`;break;case Wa.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Ld.util.joinValues(e.options)}, received '${e.received}'`;break;case Wa.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Wa.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Wa.ZodIssueCode.invalid_date:r="Invalid date";break;case Wa.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ld.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Wa.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Wa.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Wa.ZodIssueCode.custom:r="Invalid input";break;case Wa.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Wa.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Wa.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ld.util.assertNever(e)}return{message:r}};s2.default=Mue;var Oue=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fu,"__esModule",{value:!0});fu.getErrorMap=fu.setErrorMap=fu.defaultErrorMap=void 0;const tD=Oue(s2);fu.defaultErrorMap=tD.default;let rD=tD.default;function Bue(e){rD=e}fu.setErrorMap=Bue;function Uue(){return rD}fu.getErrorMap=Uue;var o6={};(function(e){var t=xn&&xn.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.addIssueToContext=e.EMPTY_PATH=e.makeIssue=void 0;const r=fu,i=t(s2),a=w=>{const{data:v,path:y,errorMaps:_,issueData:E}=w,A=[...y,...E.path||[]],B={...E,path:A};let U="";const L=_.filter(K=>!!K).slice().reverse();for(const K of L)U=K(B,{data:v,defaultError:U}).message;return{...E,path:A,message:E.message||U}};e.makeIssue=a,e.EMPTY_PATH=[];function o(w,v){const y=(0,e.makeIssue)({issueData:v,data:w.data,path:w.path,errorMaps:[w.common.contextualErrorMap,w.schemaErrorMap,(0,r.getErrorMap)(),i.default].filter(_=>!!_)});w.common.issues.push(y)}e.addIssueToContext=o;class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(v,y){const _=[];for(const E of y){if(E.status==="aborted")return e.INVALID;E.status==="dirty"&&v.dirty(),_.push(E.value)}return{status:v.value,value:_}}static async mergeObjectAsync(v,y){const _=[];for(const E of y)_.push({key:await E.key,value:await E.value});return s.mergeObjectSync(v,_)}static mergeObjectSync(v,y){const _={};for(const E of y){const{key:A,value:B}=E;if(A.status==="aborted"||B.status==="aborted")return e.INVALID;A.status==="dirty"&&v.dirty(),B.status==="dirty"&&v.dirty(),(typeof B.value<"u"||E.alwaysSet)&&(_[A.value]=B.value)}return{status:v.value,value:_}}}e.ParseStatus=s,e.INVALID=Object.freeze({status:"aborted"});const l=w=>({status:"dirty",value:w});e.DIRTY=l;const u=w=>({status:"valid",value:w});e.OK=u;const c=w=>w.status==="aborted";e.isAborted=c;const d=w=>w.status==="dirty";e.isDirty=d;const g=w=>w.status==="valid";e.isValid=g;const x=w=>typeof Promise<"u"&&w instanceof Promise;e.isAsync=x})(o6);var nD={};Object.defineProperty(nD,"__esModule",{value:!0});var iD={},oD={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message}(e.errorUtil||(e.errorUtil={}))})(oD);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=fu,r=oD,i=o6,a=Z0,o=pu;class s{constructor(W,ge,Pe,tt){this._cachedPath=[],this.parent=W,this.data=ge,this._path=Pe,this._key=tt}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l=(gt,W)=>{if((0,i.isValid)(W))return{success:!0,data:W.value};if(!gt.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const ge=new o.ZodError(gt.common.issues);return this._error=ge,this._error}}};function u(gt){if(!gt)return{};const{errorMap:W,invalid_type_error:ge,required_error:Pe,description:tt}=gt;if(W&&(ge||Pe))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return W?{errorMap:W,description:tt}:{errorMap:(yr,lr)=>yr.code!=="invalid_type"?{message:lr.defaultError}:typeof lr.data>"u"?{message:Pe??lr.defaultError}:{message:ge??lr.defaultError},description:tt}}class c{constructor(W){this.spa=this.safeParseAsync,this._def=W,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(W){return(0,a.getParsedType)(W.data)}_getOrReturnCtx(W,ge){return ge||{common:W.parent.common,data:W.data,parsedType:(0,a.getParsedType)(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}_processInputParams(W){return{status:new i.ParseStatus,ctx:{common:W.parent.common,data:W.data,parsedType:(0,a.getParsedType)(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}}_parseSync(W){const ge=this._parse(W);if((0,i.isAsync)(ge))throw new Error("Synchronous parse encountered promise.");return ge}_parseAsync(W){const ge=this._parse(W);return Promise.resolve(ge)}parse(W,ge){const Pe=this.safeParse(W,ge);if(Pe.success)return Pe.data;throw Pe.error}safeParse(W,ge){var Pe;const tt={common:{issues:[],async:(Pe=ge?.async)!==null&&Pe!==void 0?Pe:!1,contextualErrorMap:ge?.errorMap},path:ge?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:(0,a.getParsedType)(W)},st=this._parseSync({data:W,path:tt.path,parent:tt});return l(tt,st)}async parseAsync(W,ge){const Pe=await this.safeParseAsync(W,ge);if(Pe.success)return Pe.data;throw Pe.error}async safeParseAsync(W,ge){const Pe={common:{issues:[],contextualErrorMap:ge?.errorMap,async:!0},path:ge?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:(0,a.getParsedType)(W)},tt=this._parse({data:W,path:Pe.path,parent:Pe}),st=await((0,i.isAsync)(tt)?tt:Promise.resolve(tt));return l(Pe,st)}refine(W,ge){const Pe=tt=>typeof ge=="string"||typeof ge>"u"?{message:ge}:typeof ge=="function"?ge(tt):ge;return this._refinement((tt,st)=>{const yr=W(tt),lr=()=>st.addIssue({code:o.ZodIssueCode.custom,...Pe(tt)});return typeof Promise<"u"&&yr instanceof Promise?yr.then(Or=>Or?!0:(lr(),!1)):yr?!0:(lr(),!1)})}refinement(W,ge){return this._refinement((Pe,tt)=>W(Pe)?!0:(tt.addIssue(typeof ge=="function"?ge(Pe,tt):ge),!1))}_refinement(W){return new Dt({schema:this,typeName:se.ZodEffects,effect:{type:"refinement",refinement:W}})}superRefine(W){return this._refinement(W)}optional(){return Te.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return he.create(this,this._def)}promise(){return Pt.create(this,this._def)}or(W){return ct.create([this,W],this._def)}and(W){return Rt.create(this,W,this._def)}transform(W){return new Dt({...u(this._def),schema:this,typeName:se.ZodEffects,effect:{type:"transform",transform:W}})}default(W){const ge=typeof W=="function"?W:()=>W;return new ot({...u(this._def),innerType:this,defaultValue:ge,typeName:se.ZodDefault})}brand(){return new Ot({typeName:se.ZodBranded,type:this,...u(this._def)})}catch(W){const ge=typeof W=="function"?W:()=>W;return new $t({...u(this._def),innerType:this,catchValue:ge,typeName:se.ZodCatch})}describe(W){const ge=this.constructor;return new ge({...this._def,description:W})}pipe(W){return br.create(this,W)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=c,e.Schema=c,e.ZodSchema=c;const d=/^c[^\s-]{8,}$/i,g=/^[a-z][a-z0-9]*$/,x=/[0-9A-HJKMNP-TV-Z]{26}/,w=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,v=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,y=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,_=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,E=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,A=gt=>gt.precision?gt.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${gt.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${gt.precision}}Z$`):gt.precision===0?gt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):gt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function B(gt,W){return!!((W==="v4"||!W)&&_.test(gt)||(W==="v6"||!W)&&E.test(gt))}class U extends c{constructor(){super(...arguments),this._regex=(W,ge,Pe)=>this.refinement(tt=>W.test(tt),{validation:ge,code:o.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(Pe)}),this.nonempty=W=>this.min(1,r.errorUtil.errToObj(W)),this.trim=()=>new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(W){if(this._def.coerce&&(W.data=String(W.data)),this._getType(W)!==a.ZodParsedType.string){const st=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(st,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.string,received:st.parsedType}),i.INVALID}const Pe=new i.ParseStatus;let tt;for(const st of this._def.checks)if(st.kind==="min")W.data.lengthst.value&&(tt=this._getOrReturnCtx(W,tt),(0,i.addIssueToContext)(tt,{code:o.ZodIssueCode.too_big,maximum:st.value,type:"string",inclusive:!0,exact:!1,message:st.message}),Pe.dirty());else if(st.kind==="length"){const yr=W.data.length>st.value,lr=W.data.length"u"?null:W?.precision,offset:(ge=W?.offset)!==null&&ge!==void 0?ge:!1,...r.errorUtil.errToObj(W?.message)})}regex(W,ge){return this._addCheck({kind:"regex",regex:W,...r.errorUtil.errToObj(ge)})}includes(W,ge){return this._addCheck({kind:"includes",value:W,position:ge?.position,...r.errorUtil.errToObj(ge?.message)})}startsWith(W,ge){return this._addCheck({kind:"startsWith",value:W,...r.errorUtil.errToObj(ge)})}endsWith(W,ge){return this._addCheck({kind:"endsWith",value:W,...r.errorUtil.errToObj(ge)})}min(W,ge){return this._addCheck({kind:"min",value:W,...r.errorUtil.errToObj(ge)})}max(W,ge){return this._addCheck({kind:"max",value:W,...r.errorUtil.errToObj(ge)})}length(W,ge){return this._addCheck({kind:"length",value:W,...r.errorUtil.errToObj(ge)})}get isDatetime(){return!!this._def.checks.find(W=>W.kind==="datetime")}get isEmail(){return!!this._def.checks.find(W=>W.kind==="email")}get isURL(){return!!this._def.checks.find(W=>W.kind==="url")}get isEmoji(){return!!this._def.checks.find(W=>W.kind==="emoji")}get isUUID(){return!!this._def.checks.find(W=>W.kind==="uuid")}get isCUID(){return!!this._def.checks.find(W=>W.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(W=>W.kind==="cuid2")}get isULID(){return!!this._def.checks.find(W=>W.kind==="ulid")}get isIP(){return!!this._def.checks.find(W=>W.kind==="ip")}get minLength(){let W=null;for(const ge of this._def.checks)ge.kind==="min"&&(W===null||ge.value>W)&&(W=ge.value);return W}get maxLength(){let W=null;for(const ge of this._def.checks)ge.kind==="max"&&(W===null||ge.value{var W;return new U({checks:[],typeName:se.ZodString,coerce:(W=gt?.coerce)!==null&&W!==void 0?W:!1,...u(gt)})};function L(gt,W){const ge=(gt.toString().split(".")[1]||"").length,Pe=(W.toString().split(".")[1]||"").length,tt=ge>Pe?ge:Pe,st=parseInt(gt.toFixed(tt).replace(".","")),yr=parseInt(W.toFixed(tt).replace(".",""));return st%yr/Math.pow(10,tt)}class K extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(W){if(this._def.coerce&&(W.data=Number(W.data)),this._getType(W)!==a.ZodParsedType.number){const st=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(st,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.number,received:st.parsedType}),i.INVALID}let Pe;const tt=new i.ParseStatus;for(const st of this._def.checks)st.kind==="int"?a.util.isInteger(W.data)||(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:st.message}),tt.dirty()):st.kind==="min"?(st.inclusive?W.datast.value:W.data>=st.value)&&(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.too_big,maximum:st.value,type:"number",inclusive:st.inclusive,exact:!1,message:st.message}),tt.dirty()):st.kind==="multipleOf"?L(W.data,st.value)!==0&&(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.not_multiple_of,multipleOf:st.value,message:st.message}),tt.dirty()):st.kind==="finite"?Number.isFinite(W.data)||(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.not_finite,message:st.message}),tt.dirty()):a.util.assertNever(st);return{status:tt.value,value:W.data}}gte(W,ge){return this.setLimit("min",W,!0,r.errorUtil.toString(ge))}gt(W,ge){return this.setLimit("min",W,!1,r.errorUtil.toString(ge))}lte(W,ge){return this.setLimit("max",W,!0,r.errorUtil.toString(ge))}lt(W,ge){return this.setLimit("max",W,!1,r.errorUtil.toString(ge))}setLimit(W,ge,Pe,tt){return new K({...this._def,checks:[...this._def.checks,{kind:W,value:ge,inclusive:Pe,message:r.errorUtil.toString(tt)}]})}_addCheck(W){return new K({...this._def,checks:[...this._def.checks,W]})}int(W){return this._addCheck({kind:"int",message:r.errorUtil.toString(W)})}positive(W){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.errorUtil.toString(W)})}negative(W){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.errorUtil.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.errorUtil.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.errorUtil.toString(W)})}multipleOf(W,ge){return this._addCheck({kind:"multipleOf",value:W,message:r.errorUtil.toString(ge)})}finite(W){return this._addCheck({kind:"finite",message:r.errorUtil.toString(W)})}safe(W){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.errorUtil.toString(W)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.errorUtil.toString(W)})}get minValue(){let W=null;for(const ge of this._def.checks)ge.kind==="min"&&(W===null||ge.value>W)&&(W=ge.value);return W}get maxValue(){let W=null;for(const ge of this._def.checks)ge.kind==="max"&&(W===null||ge.valueW.kind==="int"||W.kind==="multipleOf"&&a.util.isInteger(W.value))}get isFinite(){let W=null,ge=null;for(const Pe of this._def.checks){if(Pe.kind==="finite"||Pe.kind==="int"||Pe.kind==="multipleOf")return!0;Pe.kind==="min"?(ge===null||Pe.value>ge)&&(ge=Pe.value):Pe.kind==="max"&&(W===null||Pe.valuenew K({checks:[],typeName:se.ZodNumber,coerce:gt?.coerce||!1,...u(gt)});class V extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(W){if(this._def.coerce&&(W.data=BigInt(W.data)),this._getType(W)!==a.ZodParsedType.bigint){const st=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(st,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.bigint,received:st.parsedType}),i.INVALID}let Pe;const tt=new i.ParseStatus;for(const st of this._def.checks)st.kind==="min"?(st.inclusive?W.datast.value:W.data>=st.value)&&(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.too_big,type:"bigint",maximum:st.value,inclusive:st.inclusive,message:st.message}),tt.dirty()):st.kind==="multipleOf"?W.data%st.value!==BigInt(0)&&(Pe=this._getOrReturnCtx(W,Pe),(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.not_multiple_of,multipleOf:st.value,message:st.message}),tt.dirty()):a.util.assertNever(st);return{status:tt.value,value:W.data}}gte(W,ge){return this.setLimit("min",W,!0,r.errorUtil.toString(ge))}gt(W,ge){return this.setLimit("min",W,!1,r.errorUtil.toString(ge))}lte(W,ge){return this.setLimit("max",W,!0,r.errorUtil.toString(ge))}lt(W,ge){return this.setLimit("max",W,!1,r.errorUtil.toString(ge))}setLimit(W,ge,Pe,tt){return new V({...this._def,checks:[...this._def.checks,{kind:W,value:ge,inclusive:Pe,message:r.errorUtil.toString(tt)}]})}_addCheck(W){return new V({...this._def,checks:[...this._def.checks,W]})}positive(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(W)})}negative(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(W)})}multipleOf(W,ge){return this._addCheck({kind:"multipleOf",value:W,message:r.errorUtil.toString(ge)})}get minValue(){let W=null;for(const ge of this._def.checks)ge.kind==="min"&&(W===null||ge.value>W)&&(W=ge.value);return W}get maxValue(){let W=null;for(const ge of this._def.checks)ge.kind==="max"&&(W===null||ge.value{var W;return new V({checks:[],typeName:se.ZodBigInt,coerce:(W=gt?.coerce)!==null&&W!==void 0?W:!1,...u(gt)})};class H extends c{_parse(W){if(this._def.coerce&&(W.data=Boolean(W.data)),this._getType(W)!==a.ZodParsedType.boolean){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.boolean,received:Pe.parsedType}),i.INVALID}return(0,i.OK)(W.data)}}e.ZodBoolean=H,H.create=gt=>new H({typeName:se.ZodBoolean,coerce:gt?.coerce||!1,...u(gt)});class z extends c{_parse(W){if(this._def.coerce&&(W.data=new Date(W.data)),this._getType(W)!==a.ZodParsedType.date){const st=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(st,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.date,received:st.parsedType}),i.INVALID}if(isNaN(W.data.getTime())){const st=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(st,{code:o.ZodIssueCode.invalid_date}),i.INVALID}const Pe=new i.ParseStatus;let tt;for(const st of this._def.checks)st.kind==="min"?W.data.getTime()st.value&&(tt=this._getOrReturnCtx(W,tt),(0,i.addIssueToContext)(tt,{code:o.ZodIssueCode.too_big,message:st.message,inclusive:!0,exact:!1,maximum:st.value,type:"date"}),Pe.dirty()):a.util.assertNever(st);return{status:Pe.value,value:new Date(W.data.getTime())}}_addCheck(W){return new z({...this._def,checks:[...this._def.checks,W]})}min(W,ge){return this._addCheck({kind:"min",value:W.getTime(),message:r.errorUtil.toString(ge)})}max(W,ge){return this._addCheck({kind:"max",value:W.getTime(),message:r.errorUtil.toString(ge)})}get minDate(){let W=null;for(const ge of this._def.checks)ge.kind==="min"&&(W===null||ge.value>W)&&(W=ge.value);return W!=null?new Date(W):null}get maxDate(){let W=null;for(const ge of this._def.checks)ge.kind==="max"&&(W===null||ge.valuenew z({checks:[],coerce:gt?.coerce||!1,typeName:se.ZodDate,...u(gt)});class Y extends c{_parse(W){if(this._getType(W)!==a.ZodParsedType.symbol){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.symbol,received:Pe.parsedType}),i.INVALID}return(0,i.OK)(W.data)}}e.ZodSymbol=Y,Y.create=gt=>new Y({typeName:se.ZodSymbol,...u(gt)});class oe extends c{_parse(W){if(this._getType(W)!==a.ZodParsedType.undefined){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.undefined,received:Pe.parsedType}),i.INVALID}return(0,i.OK)(W.data)}}e.ZodUndefined=oe,oe.create=gt=>new oe({typeName:se.ZodUndefined,...u(gt)});class q extends c{_parse(W){if(this._getType(W)!==a.ZodParsedType.null){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.null,received:Pe.parsedType}),i.INVALID}return(0,i.OK)(W.data)}}e.ZodNull=q,q.create=gt=>new q({typeName:se.ZodNull,...u(gt)});class ae extends c{constructor(){super(...arguments),this._any=!0}_parse(W){return(0,i.OK)(W.data)}}e.ZodAny=ae,ae.create=gt=>new ae({typeName:se.ZodAny,...u(gt)});class M extends c{constructor(){super(...arguments),this._unknown=!0}_parse(W){return(0,i.OK)(W.data)}}e.ZodUnknown=M,M.create=gt=>new M({typeName:se.ZodUnknown,...u(gt)});class te extends c{_parse(W){const ge=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.never,received:ge.parsedType}),i.INVALID}}e.ZodNever=te,te.create=gt=>new te({typeName:se.ZodNever,...u(gt)});class ue extends c{_parse(W){if(this._getType(W)!==a.ZodParsedType.undefined){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.void,received:Pe.parsedType}),i.INVALID}return(0,i.OK)(W.data)}}e.ZodVoid=ue,ue.create=gt=>new ue({typeName:se.ZodVoid,...u(gt)});class he extends c{_parse(W){const{ctx:ge,status:Pe}=this._processInputParams(W),tt=this._def;if(ge.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:ge.parsedType}),i.INVALID;if(tt.exactLength!==null){const yr=ge.data.length>tt.exactLength.value,lr=ge.data.lengthtt.maxLength.value&&((0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.too_big,maximum:tt.maxLength.value,type:"array",inclusive:!0,exact:!1,message:tt.maxLength.message}),Pe.dirty()),ge.common.async)return Promise.all([...ge.data].map((yr,lr)=>tt.type._parseAsync(new s(ge,yr,ge.path,lr)))).then(yr=>i.ParseStatus.mergeArray(Pe,yr));const st=[...ge.data].map((yr,lr)=>tt.type._parseSync(new s(ge,yr,ge.path,lr)));return i.ParseStatus.mergeArray(Pe,st)}get element(){return this._def.type}min(W,ge){return new he({...this._def,minLength:{value:W,message:r.errorUtil.toString(ge)}})}max(W,ge){return new he({...this._def,maxLength:{value:W,message:r.errorUtil.toString(ge)}})}length(W,ge){return new he({...this._def,exactLength:{value:W,message:r.errorUtil.toString(ge)}})}nonempty(W){return this.min(1,W)}}e.ZodArray=he,he.create=(gt,W)=>new he({type:gt,minLength:null,maxLength:null,exactLength:null,typeName:se.ZodArray,...u(W)});function xe(gt){if(gt instanceof J){const W={};for(const ge in gt.shape){const Pe=gt.shape[ge];W[ge]=Te.create(xe(Pe))}return new J({...gt._def,shape:()=>W})}else return gt instanceof he?new he({...gt._def,type:xe(gt.element)}):gt instanceof Te?Te.create(xe(gt.unwrap())):gt instanceof Ae?Ae.create(xe(gt.unwrap())):gt instanceof At?At.create(gt.items.map(W=>xe(W))):gt}class J extends c{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const W=this._def.shape(),ge=a.util.objectKeys(W);return this._cached={shape:W,keys:ge}}_parse(W){if(this._getType(W)!==a.ZodParsedType.object){const Sr=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Sr,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:Sr.parsedType}),i.INVALID}const{status:Pe,ctx:tt}=this._processInputParams(W),{shape:st,keys:yr}=this._getCached(),lr=[];if(!(this._def.catchall instanceof te&&this._def.unknownKeys==="strip"))for(const Sr in tt.data)yr.includes(Sr)||lr.push(Sr);const Or=[];for(const Sr of yr){const Kr=st[Sr],on=tt.data[Sr];Or.push({key:{status:"valid",value:Sr},value:Kr._parse(new s(tt,on,tt.path,Sr)),alwaysSet:Sr in tt.data})}if(this._def.catchall instanceof te){const Sr=this._def.unknownKeys;if(Sr==="passthrough")for(const Kr of lr)Or.push({key:{status:"valid",value:Kr},value:{status:"valid",value:tt.data[Kr]}});else if(Sr==="strict")lr.length>0&&((0,i.addIssueToContext)(tt,{code:o.ZodIssueCode.unrecognized_keys,keys:lr}),Pe.dirty());else if(Sr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Sr=this._def.catchall;for(const Kr of lr){const on=tt.data[Kr];Or.push({key:{status:"valid",value:Kr},value:Sr._parse(new s(tt,on,tt.path,Kr)),alwaysSet:Kr in tt.data})}}return tt.common.async?Promise.resolve().then(async()=>{const Sr=[];for(const Kr of Or){const on=await Kr.key;Sr.push({key:on,value:await Kr.value,alwaysSet:Kr.alwaysSet})}return Sr}).then(Sr=>i.ParseStatus.mergeObjectSync(Pe,Sr)):i.ParseStatus.mergeObjectSync(Pe,Or)}get shape(){return this._def.shape()}strict(W){return r.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...W!==void 0?{errorMap:(ge,Pe)=>{var tt,st,yr,lr;const Or=(yr=(st=(tt=this._def).errorMap)===null||st===void 0?void 0:st.call(tt,ge,Pe).message)!==null&&yr!==void 0?yr:Pe.defaultError;return ge.code==="unrecognized_keys"?{message:(lr=r.errorUtil.errToObj(W).message)!==null&&lr!==void 0?lr:Or}:{message:Or}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(W){return new J({...this._def,shape:()=>({...this._def.shape(),...W})})}merge(W){return new J({unknownKeys:W._def.unknownKeys,catchall:W._def.catchall,shape:()=>({...this._def.shape(),...W._def.shape()}),typeName:se.ZodObject})}setKey(W,ge){return this.augment({[W]:ge})}catchall(W){return new J({...this._def,catchall:W})}pick(W){const ge={};return a.util.objectKeys(W).forEach(Pe=>{W[Pe]&&this.shape[Pe]&&(ge[Pe]=this.shape[Pe])}),new J({...this._def,shape:()=>ge})}omit(W){const ge={};return a.util.objectKeys(this.shape).forEach(Pe=>{W[Pe]||(ge[Pe]=this.shape[Pe])}),new J({...this._def,shape:()=>ge})}deepPartial(){return xe(this)}partial(W){const ge={};return a.util.objectKeys(this.shape).forEach(Pe=>{const tt=this.shape[Pe];W&&!W[Pe]?ge[Pe]=tt:ge[Pe]=tt.optional()}),new J({...this._def,shape:()=>ge})}required(W){const ge={};return a.util.objectKeys(this.shape).forEach(Pe=>{if(W&&!W[Pe])ge[Pe]=this.shape[Pe];else{let st=this.shape[Pe];for(;st instanceof Te;)st=st._def.innerType;ge[Pe]=st}}),new J({...this._def,shape:()=>ge})}keyof(){return Gt(a.util.objectKeys(this.shape))}}e.ZodObject=J,J.create=(gt,W)=>new J({shape:()=>gt,unknownKeys:"strip",catchall:te.create(),typeName:se.ZodObject,...u(W)}),J.strictCreate=(gt,W)=>new J({shape:()=>gt,unknownKeys:"strict",catchall:te.create(),typeName:se.ZodObject,...u(W)}),J.lazycreate=(gt,W)=>new J({shape:gt,unknownKeys:"strip",catchall:te.create(),typeName:se.ZodObject,...u(W)});class ct extends c{_parse(W){const{ctx:ge}=this._processInputParams(W),Pe=this._def.options;function tt(st){for(const lr of st)if(lr.result.status==="valid")return lr.result;for(const lr of st)if(lr.result.status==="dirty")return ge.common.issues.push(...lr.ctx.common.issues),lr.result;const yr=st.map(lr=>new o.ZodError(lr.ctx.common.issues));return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_union,unionErrors:yr}),i.INVALID}if(ge.common.async)return Promise.all(Pe.map(async st=>{const yr={...ge,common:{...ge.common,issues:[]},parent:null};return{result:await st._parseAsync({data:ge.data,path:ge.path,parent:yr}),ctx:yr}})).then(tt);{let st;const yr=[];for(const Or of Pe){const Sr={...ge,common:{...ge.common,issues:[]},parent:null},Kr=Or._parseSync({data:ge.data,path:ge.path,parent:Sr});if(Kr.status==="valid")return Kr;Kr.status==="dirty"&&!st&&(st={result:Kr,ctx:Sr}),Sr.common.issues.length&&yr.push(Sr.common.issues)}if(st)return ge.common.issues.push(...st.ctx.common.issues),st.result;const lr=yr.map(Or=>new o.ZodError(Or));return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_union,unionErrors:lr}),i.INVALID}}get options(){return this._def.options}}e.ZodUnion=ct,ct.create=(gt,W)=>new ct({options:gt,typeName:se.ZodUnion,...u(W)});const De=gt=>gt instanceof xt?De(gt.schema):gt instanceof Dt?De(gt.innerType()):gt instanceof Ut?[gt.value]:gt instanceof mr?gt.options:gt instanceof ne?Object.keys(gt.enum):gt instanceof ot?De(gt._def.innerType):gt instanceof oe?[void 0]:gt instanceof q?[null]:null;class ze extends c{_parse(W){const{ctx:ge}=this._processInputParams(W);if(ge.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:ge.parsedType}),i.INVALID;const Pe=this.discriminator,tt=ge.data[Pe],st=this.optionsMap.get(tt);return st?ge.common.async?st._parseAsync({data:ge.data,path:ge.path,parent:ge}):st._parseSync({data:ge.data,path:ge.path,parent:ge}):((0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Pe]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(W,ge,Pe){const tt=new Map;for(const st of ge){const yr=De(st.shape[W]);if(!yr)throw new Error(`A discriminator value for key \`${W}\` could not be extracted from all schema options`);for(const lr of yr){if(tt.has(lr))throw new Error(`Discriminator property ${String(W)} has duplicate value ${String(lr)}`);tt.set(lr,st)}}return new ze({typeName:se.ZodDiscriminatedUnion,discriminator:W,options:ge,optionsMap:tt,...u(Pe)})}}e.ZodDiscriminatedUnion=ze;function ir(gt,W){const ge=(0,a.getParsedType)(gt),Pe=(0,a.getParsedType)(W);if(gt===W)return{valid:!0,data:gt};if(ge===a.ZodParsedType.object&&Pe===a.ZodParsedType.object){const tt=a.util.objectKeys(W),st=a.util.objectKeys(gt).filter(lr=>tt.indexOf(lr)!==-1),yr={...gt,...W};for(const lr of st){const Or=ir(gt[lr],W[lr]);if(!Or.valid)return{valid:!1};yr[lr]=Or.data}return{valid:!0,data:yr}}else if(ge===a.ZodParsedType.array&&Pe===a.ZodParsedType.array){if(gt.length!==W.length)return{valid:!1};const tt=[];for(let st=0;st{if((0,i.isAborted)(st)||(0,i.isAborted)(yr))return i.INVALID;const lr=ir(st.value,yr.value);return lr.valid?(((0,i.isDirty)(st)||(0,i.isDirty)(yr))&&ge.dirty(),{status:ge.value,value:lr.data}):((0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return Pe.common.async?Promise.all([this._def.left._parseAsync({data:Pe.data,path:Pe.path,parent:Pe}),this._def.right._parseAsync({data:Pe.data,path:Pe.path,parent:Pe})]).then(([st,yr])=>tt(st,yr)):tt(this._def.left._parseSync({data:Pe.data,path:Pe.path,parent:Pe}),this._def.right._parseSync({data:Pe.data,path:Pe.path,parent:Pe}))}}e.ZodIntersection=Rt,Rt.create=(gt,W,ge)=>new Rt({left:gt,right:W,typeName:se.ZodIntersection,...u(ge)});class At extends c{_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W);if(Pe.parsedType!==a.ZodParsedType.array)return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.array,received:Pe.parsedType}),i.INVALID;if(Pe.data.lengththis._def.items.length&&((0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge.dirty());const st=[...Pe.data].map((yr,lr)=>{const Or=this._def.items[lr]||this._def.rest;return Or?Or._parse(new s(Pe,yr,Pe.path,lr)):null}).filter(yr=>!!yr);return Pe.common.async?Promise.all(st).then(yr=>i.ParseStatus.mergeArray(ge,yr)):i.ParseStatus.mergeArray(ge,st)}get items(){return this._def.items}rest(W){return new At({...this._def,rest:W})}}e.ZodTuple=At,At.create=(gt,W)=>{if(!Array.isArray(gt))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new At({items:gt,typeName:se.ZodTuple,rest:null,...u(W)})};class Xt extends c{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W);if(Pe.parsedType!==a.ZodParsedType.object)return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.object,received:Pe.parsedType}),i.INVALID;const tt=[],st=this._def.keyType,yr=this._def.valueType;for(const lr in Pe.data)tt.push({key:st._parse(new s(Pe,lr,Pe.path,lr)),value:yr._parse(new s(Pe,Pe.data[lr],Pe.path,lr))});return Pe.common.async?i.ParseStatus.mergeObjectAsync(ge,tt):i.ParseStatus.mergeObjectSync(ge,tt)}get element(){return this._def.valueType}static create(W,ge,Pe){return ge instanceof c?new Xt({keyType:W,valueType:ge,typeName:se.ZodRecord,...u(Pe)}):new Xt({keyType:U.create(),valueType:W,typeName:se.ZodRecord,...u(ge)})}}e.ZodRecord=Xt;class vr extends c{_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W);if(Pe.parsedType!==a.ZodParsedType.map)return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.map,received:Pe.parsedType}),i.INVALID;const tt=this._def.keyType,st=this._def.valueType,yr=[...Pe.data.entries()].map(([lr,Or],Sr)=>({key:tt._parse(new s(Pe,lr,Pe.path,[Sr,"key"])),value:st._parse(new s(Pe,Or,Pe.path,[Sr,"value"]))}));if(Pe.common.async){const lr=new Map;return Promise.resolve().then(async()=>{for(const Or of yr){const Sr=await Or.key,Kr=await Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ge.dirty(),lr.set(Sr.value,Kr.value)}return{status:ge.value,value:lr}})}else{const lr=new Map;for(const Or of yr){const Sr=Or.key,Kr=Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ge.dirty(),lr.set(Sr.value,Kr.value)}return{status:ge.value,value:lr}}}}e.ZodMap=vr,vr.create=(gt,W,ge)=>new vr({valueType:W,keyType:gt,typeName:se.ZodMap,...u(ge)});class Et extends c{_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W);if(Pe.parsedType!==a.ZodParsedType.set)return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.set,received:Pe.parsedType}),i.INVALID;const tt=this._def;tt.minSize!==null&&Pe.data.sizett.maxSize.value&&((0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.too_big,maximum:tt.maxSize.value,type:"set",inclusive:!0,exact:!1,message:tt.maxSize.message}),ge.dirty());const st=this._def.valueType;function yr(Or){const Sr=new Set;for(const Kr of Or){if(Kr.status==="aborted")return i.INVALID;Kr.status==="dirty"&&ge.dirty(),Sr.add(Kr.value)}return{status:ge.value,value:Sr}}const lr=[...Pe.data.values()].map((Or,Sr)=>st._parse(new s(Pe,Or,Pe.path,Sr)));return Pe.common.async?Promise.all(lr).then(Or=>yr(Or)):yr(lr)}min(W,ge){return new Et({...this._def,minSize:{value:W,message:r.errorUtil.toString(ge)}})}max(W,ge){return new Et({...this._def,maxSize:{value:W,message:r.errorUtil.toString(ge)}})}size(W,ge){return this.min(W,ge).max(W,ge)}nonempty(W){return this.min(1,W)}}e.ZodSet=Et,Et.create=(gt,W)=>new Et({valueType:gt,minSize:null,maxSize:null,typeName:se.ZodSet,...u(W)});class St extends c{constructor(){super(...arguments),this.validate=this.implement}_parse(W){const{ctx:ge}=this._processInputParams(W);if(ge.parsedType!==a.ZodParsedType.function)return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.function,received:ge.parsedType}),i.INVALID;function Pe(lr,Or){return(0,i.makeIssue)({data:lr,path:ge.path,errorMaps:[ge.common.contextualErrorMap,ge.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:o.ZodIssueCode.invalid_arguments,argumentsError:Or}})}function tt(lr,Or){return(0,i.makeIssue)({data:lr,path:ge.path,errorMaps:[ge.common.contextualErrorMap,ge.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:o.ZodIssueCode.invalid_return_type,returnTypeError:Or}})}const st={errorMap:ge.common.contextualErrorMap},yr=ge.data;return this._def.returns instanceof Pt?(0,i.OK)(async(...lr)=>{const Or=new o.ZodError([]),Sr=await this._def.args.parseAsync(lr,st).catch(_n=>{throw Or.addIssue(Pe(lr,_n)),Or}),Kr=await yr(...Sr);return await this._def.returns._def.type.parseAsync(Kr,st).catch(_n=>{throw Or.addIssue(tt(Kr,_n)),Or})}):(0,i.OK)((...lr)=>{const Or=this._def.args.safeParse(lr,st);if(!Or.success)throw new o.ZodError([Pe(lr,Or.error)]);const Sr=yr(...Or.data),Kr=this._def.returns.safeParse(Sr,st);if(!Kr.success)throw new o.ZodError([tt(Sr,Kr.error)]);return Kr.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...W){return new St({...this._def,args:At.create(W).rest(M.create())})}returns(W){return new St({...this._def,returns:W})}implement(W){return this.parse(W)}strictImplement(W){return this.parse(W)}static create(W,ge,Pe){return new St({args:W||At.create([]).rest(M.create()),returns:ge||M.create(),typeName:se.ZodFunction,...u(Pe)})}}e.ZodFunction=St;class xt extends c{get schema(){return this._def.getter()}_parse(W){const{ctx:ge}=this._processInputParams(W);return this._def.getter()._parse({data:ge.data,path:ge.path,parent:ge})}}e.ZodLazy=xt,xt.create=(gt,W)=>new xt({getter:gt,typeName:se.ZodLazy,...u(W)});class Ut extends c{_parse(W){if(W.data!==this._def.value){const ge=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(ge,{received:ge.data,code:o.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:W.data}}get value(){return this._def.value}}e.ZodLiteral=Ut,Ut.create=(gt,W)=>new Ut({value:gt,typeName:se.ZodLiteral,...u(W)});function Gt(gt,W){return new mr({values:gt,typeName:se.ZodEnum,...u(W)})}class mr extends c{_parse(W){if(typeof W.data!="string"){const ge=this._getOrReturnCtx(W),Pe=this._def.values;return(0,i.addIssueToContext)(ge,{expected:a.util.joinValues(Pe),received:ge.parsedType,code:o.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(W.data)===-1){const ge=this._getOrReturnCtx(W),Pe=this._def.values;return(0,i.addIssueToContext)(ge,{received:ge.data,code:o.ZodIssueCode.invalid_enum_value,options:Pe}),i.INVALID}return(0,i.OK)(W.data)}get options(){return this._def.values}get enum(){const W={};for(const ge of this._def.values)W[ge]=ge;return W}get Values(){const W={};for(const ge of this._def.values)W[ge]=ge;return W}get Enum(){const W={};for(const ge of this._def.values)W[ge]=ge;return W}extract(W){return mr.create(W)}exclude(W){return mr.create(this.options.filter(ge=>!W.includes(ge)))}}e.ZodEnum=mr,mr.create=Gt;class ne extends c{_parse(W){const ge=a.util.getValidEnumValues(this._def.values),Pe=this._getOrReturnCtx(W);if(Pe.parsedType!==a.ZodParsedType.string&&Pe.parsedType!==a.ZodParsedType.number){const tt=a.util.objectValues(ge);return(0,i.addIssueToContext)(Pe,{expected:a.util.joinValues(tt),received:Pe.parsedType,code:o.ZodIssueCode.invalid_type}),i.INVALID}if(ge.indexOf(W.data)===-1){const tt=a.util.objectValues(ge);return(0,i.addIssueToContext)(Pe,{received:Pe.data,code:o.ZodIssueCode.invalid_enum_value,options:tt}),i.INVALID}return(0,i.OK)(W.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ne,ne.create=(gt,W)=>new ne({values:gt,typeName:se.ZodNativeEnum,...u(W)});class Pt extends c{unwrap(){return this._def.type}_parse(W){const{ctx:ge}=this._processInputParams(W);if(ge.parsedType!==a.ZodParsedType.promise&&ge.common.async===!1)return(0,i.addIssueToContext)(ge,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.promise,received:ge.parsedType}),i.INVALID;const Pe=ge.parsedType===a.ZodParsedType.promise?ge.data:Promise.resolve(ge.data);return(0,i.OK)(Pe.then(tt=>this._def.type.parseAsync(tt,{path:ge.path,errorMap:ge.common.contextualErrorMap})))}}e.ZodPromise=Pt,Pt.create=(gt,W)=>new Pt({type:gt,typeName:se.ZodPromise,...u(W)});class Dt extends c{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W),tt=this._def.effect||null;if(tt.type==="preprocess"){const yr=tt.transform(Pe.data);return Pe.common.async?Promise.resolve(yr).then(lr=>this._def.schema._parseAsync({data:lr,path:Pe.path,parent:Pe})):this._def.schema._parseSync({data:yr,path:Pe.path,parent:Pe})}const st={addIssue:yr=>{(0,i.addIssueToContext)(Pe,yr),yr.fatal?ge.abort():ge.dirty()},get path(){return Pe.path}};if(st.addIssue=st.addIssue.bind(st),tt.type==="refinement"){const yr=lr=>{const Or=tt.refinement(lr,st);if(Pe.common.async)return Promise.resolve(Or);if(Or instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return lr};if(Pe.common.async===!1){const lr=this._def.schema._parseSync({data:Pe.data,path:Pe.path,parent:Pe});return lr.status==="aborted"?i.INVALID:(lr.status==="dirty"&&ge.dirty(),yr(lr.value),{status:ge.value,value:lr.value})}else return this._def.schema._parseAsync({data:Pe.data,path:Pe.path,parent:Pe}).then(lr=>lr.status==="aborted"?i.INVALID:(lr.status==="dirty"&&ge.dirty(),yr(lr.value).then(()=>({status:ge.value,value:lr.value}))))}if(tt.type==="transform")if(Pe.common.async===!1){const yr=this._def.schema._parseSync({data:Pe.data,path:Pe.path,parent:Pe});if(!(0,i.isValid)(yr))return yr;const lr=tt.transform(yr.value,st);if(lr instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:ge.value,value:lr}}else return this._def.schema._parseAsync({data:Pe.data,path:Pe.path,parent:Pe}).then(yr=>(0,i.isValid)(yr)?Promise.resolve(tt.transform(yr.value,st)).then(lr=>({status:ge.value,value:lr})):yr);a.util.assertNever(tt)}}e.ZodEffects=Dt,e.ZodTransformer=Dt,Dt.create=(gt,W,ge)=>new Dt({schema:gt,typeName:se.ZodEffects,effect:W,...u(ge)}),Dt.createWithPreprocess=(gt,W,ge)=>new Dt({schema:W,effect:{type:"preprocess",transform:gt},typeName:se.ZodEffects,...u(ge)});class Te extends c{_parse(W){return this._getType(W)===a.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}e.ZodOptional=Te,Te.create=(gt,W)=>new Te({innerType:gt,typeName:se.ZodOptional,...u(W)});class Ae extends c{_parse(W){return this._getType(W)===a.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}e.ZodNullable=Ae,Ae.create=(gt,W)=>new Ae({innerType:gt,typeName:se.ZodNullable,...u(W)});class ot extends c{_parse(W){const{ctx:ge}=this._processInputParams(W);let Pe=ge.data;return ge.parsedType===a.ZodParsedType.undefined&&(Pe=this._def.defaultValue()),this._def.innerType._parse({data:Pe,path:ge.path,parent:ge})}removeDefault(){return this._def.innerType}}e.ZodDefault=ot,ot.create=(gt,W)=>new ot({innerType:gt,typeName:se.ZodDefault,defaultValue:typeof W.default=="function"?W.default:()=>W.default,...u(W)});class $t extends c{_parse(W){const{ctx:ge}=this._processInputParams(W),Pe={...ge,common:{...ge.common,issues:[]}},tt=this._def.innerType._parse({data:Pe.data,path:Pe.path,parent:{...Pe}});return(0,i.isAsync)(tt)?tt.then(st=>({status:"valid",value:st.status==="valid"?st.value:this._def.catchValue({get error(){return new o.ZodError(Pe.common.issues)},input:Pe.data})})):{status:"valid",value:tt.status==="valid"?tt.value:this._def.catchValue({get error(){return new o.ZodError(Pe.common.issues)},input:Pe.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=$t,$t.create=(gt,W)=>new $t({innerType:gt,typeName:se.ZodCatch,catchValue:typeof W.catch=="function"?W.catch:()=>W.catch,...u(W)});class tr extends c{_parse(W){if(this._getType(W)!==a.ZodParsedType.nan){const Pe=this._getOrReturnCtx(W);return(0,i.addIssueToContext)(Pe,{code:o.ZodIssueCode.invalid_type,expected:a.ZodParsedType.nan,received:Pe.parsedType}),i.INVALID}return{status:"valid",value:W.data}}}e.ZodNaN=tr,tr.create=gt=>new tr({typeName:se.ZodNaN,...u(gt)}),e.BRAND=Symbol("zod_brand");class Ot extends c{_parse(W){const{ctx:ge}=this._processInputParams(W),Pe=ge.data;return this._def.type._parse({data:Pe,path:ge.path,parent:ge})}unwrap(){return this._def.type}}e.ZodBranded=Ot;class br extends c{_parse(W){const{status:ge,ctx:Pe}=this._processInputParams(W);if(Pe.common.async)return(async()=>{const st=await this._def.in._parseAsync({data:Pe.data,path:Pe.path,parent:Pe});return st.status==="aborted"?i.INVALID:st.status==="dirty"?(ge.dirty(),(0,i.DIRTY)(st.value)):this._def.out._parseAsync({data:st.value,path:Pe.path,parent:Pe})})();{const tt=this._def.in._parseSync({data:Pe.data,path:Pe.path,parent:Pe});return tt.status==="aborted"?i.INVALID:tt.status==="dirty"?(ge.dirty(),{status:"dirty",value:tt.value}):this._def.out._parseSync({data:tt.value,path:Pe.path,parent:Pe})}}static create(W,ge){return new br({in:W,out:ge,typeName:se.ZodPipeline})}}e.ZodPipeline=br;const be=(gt,W={},ge)=>gt?ae.create().superRefine((Pe,tt)=>{var st,yr;if(!gt(Pe)){const lr=typeof W=="function"?W(Pe):typeof W=="string"?{message:W}:W,Or=(yr=(st=lr.fatal)!==null&&st!==void 0?st:ge)!==null&&yr!==void 0?yr:!0,Sr=typeof lr=="string"?{message:lr}:lr;tt.addIssue({code:"custom",...Sr,fatal:Or})}}):ae.create();e.custom=be,e.late={object:J.lazycreate};var se;(function(gt){gt.ZodString="ZodString",gt.ZodNumber="ZodNumber",gt.ZodNaN="ZodNaN",gt.ZodBigInt="ZodBigInt",gt.ZodBoolean="ZodBoolean",gt.ZodDate="ZodDate",gt.ZodSymbol="ZodSymbol",gt.ZodUndefined="ZodUndefined",gt.ZodNull="ZodNull",gt.ZodAny="ZodAny",gt.ZodUnknown="ZodUnknown",gt.ZodNever="ZodNever",gt.ZodVoid="ZodVoid",gt.ZodArray="ZodArray",gt.ZodObject="ZodObject",gt.ZodUnion="ZodUnion",gt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",gt.ZodIntersection="ZodIntersection",gt.ZodTuple="ZodTuple",gt.ZodRecord="ZodRecord",gt.ZodMap="ZodMap",gt.ZodSet="ZodSet",gt.ZodFunction="ZodFunction",gt.ZodLazy="ZodLazy",gt.ZodLiteral="ZodLiteral",gt.ZodEnum="ZodEnum",gt.ZodEffects="ZodEffects",gt.ZodNativeEnum="ZodNativeEnum",gt.ZodOptional="ZodOptional",gt.ZodNullable="ZodNullable",gt.ZodDefault="ZodDefault",gt.ZodCatch="ZodCatch",gt.ZodPromise="ZodPromise",gt.ZodBranded="ZodBranded",gt.ZodPipeline="ZodPipeline"})(se=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));const ce=(gt,W={message:`Input not instance of ${gt.name}`})=>(0,e.custom)(ge=>ge instanceof gt,W);e.instanceof=ce;const $=U.create;e.string=$;const C=K.create;e.number=C;const R=tr.create;e.nan=R;const Q=V.create;e.bigint=Q;const me=H.create;e.boolean=me;const je=z.create;e.date=je;const lt=Y.create;e.symbol=lt;const ur=oe.create;e.undefined=ur;const Dr=q.create;e.null=Dr;const hr=ae.create;e.any=hr;const Rr=M.create;e.unknown=Rr;const Gr=te.create;e.never=Gr;const Nr=ue.create;e.void=Nr;const Vn=he.create;e.array=Vn;const An=J.create;e.object=An;const Tn=J.strictCreate;e.strictObject=Tn;const ht=ct.create;e.union=ht;const Ci=ze.create;e.discriminatedUnion=Ci;const qn=Rt.create;e.intersection=qn;const Ii=At.create;e.tuple=Ii;const Xi=Xt.create;e.record=Xi;const Ho=vr.create;e.map=Ho;const Zi=Et.create;e.set=Zi;const Ro=St.create;e.function=Ro;const zi=xt.create;e.lazy=zi;const ua=Ut.create;e.literal=ua;const le=mr.create;e.enum=le;const Ie=ne.create;e.nativeEnum=Ie;const Ee=Pt.create;e.promise=Ee;const F=Dt.create;e.effect=F,e.transformer=F;const Ne=Te.create;e.optional=Ne;const Qt=Ae.create;e.nullable=Qt;const or=Dt.createWithPreprocess;e.preprocess=or;const Br=br.create;e.pipeline=Br;const Hr=()=>$().optional();e.ostring=Hr;const kn=()=>C().optional();e.onumber=kn;const un=()=>me().optional();e.oboolean=un,e.coerce={string:gt=>U.create({...gt,coerce:!0}),number:gt=>K.create({...gt,coerce:!0}),boolean:gt=>H.create({...gt,coerce:!0}),bigint:gt=>V.create({...gt,coerce:!0}),date:gt=>z.create({...gt,coerce:!0})},e.NEVER=i.INVALID})(iD);(function(e){var t=xn&&xn.__createBinding||(Object.create?function(i,a,o,s){s===void 0&&(s=o),Object.defineProperty(i,s,{enumerable:!0,get:function(){return a[o]}})}:function(i,a,o,s){s===void 0&&(s=o),i[s]=a[o]}),r=xn&&xn.__exportStar||function(i,a){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&t(a,i,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(fu,e),r(o6,e),r(nD,e),r(Z0,e),r(iD,e),r(pu,e)})(Z3);(function(e){var t=xn&&xn.__createBinding||(Object.create?function(s,l,u,c){c===void 0&&(c=u),Object.defineProperty(s,c,{enumerable:!0,get:function(){return l[u]}})}:function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]}),r=xn&&xn.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),i=xn&&xn.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(l,s,u);return r(l,s),l},a=xn&&xn.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const o=i(Z3);e.z=o,a(Z3,e),e.default=o})(i6);const Due="ton",Lue="13.5.0",Nue="https://github.com/ton-core/ton.git",jue="Whales Corp. ",$ue="MIT",Fue="dist/index.js",zue=["dist"],Hue={docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},Wue={"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},Vue={axios:"^0.25.0",dataloader:"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0",zod:"^3.21.4"},que={"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},Kue={access:"public",registry:"https://registry.npmjs.org/"},Gue="yarn@3.4.1",Yue={name:Due,version:Lue,repository:Nue,author:jue,license:$ue,main:Fue,files:zue,scripts:Hue,devDependencies:Wue,dependencies:Vue,peerDependencies:que,publishConfig:Kue,"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:Gue};var aD=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Q0,"__esModule",{value:!0});Q0.HttpApi=void 0;const Que=r2,TI=aD($le),Xue=aD(JC.exports),sn=i6,Zue=Yue.version,_h=sn.z.object({"@type":sn.z.literal("ton.blockIdExt"),workchain:sn.z.number(),shard:sn.z.string(),seqno:sn.z.number(),root_hash:sn.z.string(),file_hash:sn.z.string()}),Jue=sn.z.object({balance:sn.z.union([sn.z.number(),sn.z.string()]),state:sn.z.union([sn.z.literal("active"),sn.z.literal("uninitialized"),sn.z.literal("frozen")]),data:sn.z.string(),code:sn.z.string(),last_transaction_id:sn.z.object({"@type":sn.z.literal("internal.transactionId"),lt:sn.z.string(),hash:sn.z.string()}),block_id:_h,sync_utime:sn.z.number()}),ece=sn.z.object({"@type":sn.z.literal("ok")}),tce=sn.z.object({"@type":sn.z.literal("query.fees"),source_fees:sn.z.object({"@type":sn.z.literal("fees"),in_fwd_fee:sn.z.number(),storage_fee:sn.z.number(),gas_fee:sn.z.number(),fwd_fee:sn.z.number()})}),rce=sn.z.object({gas_used:sn.z.number(),exit_code:sn.z.number(),stack:sn.z.array(sn.z.unknown())}),nce=sn.z.union([sn.z.object({"@type":sn.z.literal("msg.dataRaw"),body:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataDecryptedText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataEncryptedText"),text:sn.z.string()})]),II=sn.z.object({source:sn.z.string(),destination:sn.z.string(),value:sn.z.string(),fwd_fee:sn.z.string(),ihr_fee:sn.z.string(),created_lt:sn.z.string(),body_hash:sn.z.string(),msg_data:nce}),ice=sn.z.object({data:sn.z.string(),utime:sn.z.number(),transaction_id:sn.z.object({lt:sn.z.string(),hash:sn.z.string()}),fee:sn.z.string(),storage_fee:sn.z.string(),other_fee:sn.z.string(),in_msg:sn.z.union([sn.z.undefined(),II]),out_msgs:sn.z.array(II)}),RI=sn.z.array(ice),oce=sn.z.object({state_root_hash:sn.z.string(),last:_h,init:_h}),ace=sn.z.object({shards:sn.z.array(_h)}),sce=sn.z.object({"@type":sn.z.literal("blocks.shortTxId"),mode:sn.z.number(),account:sn.z.string(),lt:sn.z.string(),hash:sn.z.string()}),PI=sn.z.object({id:_h,req_count:sn.z.number(),incomplete:sn.z.boolean(),transactions:sn.z.array(sce)});class MI{constructor(t,r,i,a){this.namespace=t,this.cache=r,this.codec=i,this.keyEncoder=a}async get(t){let r=await this.cache.get(this.namespace,this.keyEncoder(t));if(r){let i=this.codec.safeParse(JSON.parse(r));if(i.success)return i.data}return null}async set(t,r){r!==null?await this.cache.set(this.namespace,this.keyEncoder(t),JSON.stringify(r)):await this.cache.set(this.namespace,this.keyEncoder(t),null)}}class lce{constructor(t,r){this.endpoint=t,this.cache=new Que.InMemoryCache,this.parameters={timeout:r?.timeout||3e4,apiKey:r?.apiKey},this.shardCache=new MI("ton-shard",this.cache,sn.z.array(_h),i=>i+""),this.shardLoader=new TI.default(async i=>await Promise.all(i.map(async a=>{const o=await this.shardCache.get(a);if(o)return o;let s=(await this.doCall("shards",{seqno:a},ace)).shards;return await this.shardCache.set(a,s),s}))),this.shardTransactionsCache=new MI("ton-shard-tx",this.cache,PI,i=>i.workchain+":"+i.shard+":"+i.seqno),this.shardTransactionsLoader=new TI.default(async i=>await Promise.all(i.map(async a=>{const o=await this.shardTransactionsCache.get(a);if(o)return o;let s=await this.doCall("getBlockTransactions",{workchain:a.workchain,seqno:a.seqno,shard:a.shard},PI);return await this.shardTransactionsCache.set(a,s),s})),{cacheKeyFn:i=>i.workchain+":"+i.shard+":"+i.seqno})}getAddressInformation(t){return this.doCall("getAddressInformation",{address:t.toString()},Jue)}async getTransactions(t,r){const i=r.inclusive;delete r.inclusive;let a;r.hash&&(a=Buffer.from(r.hash,"base64").toString("hex"));let o=r.limit;r.hash&&r.lt&&i!==!0&&o++;let s=await this.doCall("getTransactions",{address:t.toString(),...r,limit:o,hash:a},RI);return s.length>o&&(s=s.slice(0,o)),r.hash&&r.lt&&i!==!0&&s.shift(),s}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},oce)}async getShards(t){return await this.shardLoader.load(t)}async getBlockTransactions(t,r,i){return await this.shardTransactionsLoader.load({workchain:t,seqno:r,shard:i})}async getTransaction(t,r,i){let a=Buffer.from(i,"base64").toString("hex"),s=(await this.doCall("getTransactions",{address:t.toString(),lt:r,hash:a,limit:1},RI)).find(l=>l.transaction_id.lt===r&&l.transaction_id.hash===i);return s||null}async callGetMethod(t,r,i){return await this.doCall("runGetMethod",{address:t.toString(),method:r,stack:uce(i)},rce)}async sendBoc(t){await this.doCall("sendBoc",{boc:t.toString("base64")},ece)}async estimateFee(t,r){return await this.doCall("estimateFee",{address:t.toString(),body:r.body.toBoc().toString("base64"),init_data:r.initData?r.initData.toBoc().toString("base64"):"",init_code:r.initCode?r.initCode.toBoc().toString("base64"):"",ignore_chksig:r.ignoreSignature},tce)}async doCall(t,r,i){let a={"Content-Type":"application/json","X-Ton-Client-Version":Zue};this.parameters.apiKey&&(a["X-API-Key"]=this.parameters.apiKey);let o=await Xue.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:t,params:r}),{headers:a,timeout:this.parameters.timeout});if(o.status!==200||!o.data.ok)throw Error("Received error: "+JSON.stringify(o.data));let s=i.safeParse(o.data.result);if(s.success)return s.data;throw Error("Malformed response: "+s.error.format()._errors.join(", "))}}Q0.HttpApi=lce;function uce(e){let t=[];for(let r of e)if(r.type==="int")t.push(["num",r.value.toString()]);else if(r.type==="cell")t.push(["tvm.Cell",r.cell.toBoc().toString("base64")]);else if(r.type==="slice")t.push(["tvm.Slice",r.cell.toBoc().toString("base64")]);else if(r.type==="builder")t.push(["tvm.Builder",r.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+r.type);return t}var l2={},cce=xn&&xn.__classPrivateFieldSet||function(e,t,r,i,a){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r},Sl=xn&&xn.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},cs;Object.defineProperty(l2,"__esModule",{value:!0});l2.TonClient=void 0;const dce=Q0,ha=uo;class fce{constructor(t){cs.set(this,void 0),this.parameters={endpoint:t.endpoint},cce(this,cs,new dce.HttpApi(this.parameters.endpoint,{timeout:t.timeout,apiKey:t.apiKey,adapter:t.httpAdapter}),"f")}async getBalance(t){return(await this.getContractState(t)).balance}async runMethod(t,r,i=[]){let a=await Sl(this,cs,"f").callGetMethod(t,r,i);if(a.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+a.exit_code);return{gas_used:a.gas_used,stack:OI(a.stack)}}async callGetMethod(t,r,i=[]){return this.runMethod(t,r,i)}async runMethodWithError(t,r,i=[]){let a=await Sl(this,cs,"f").callGetMethod(t,r,i);return{gas_used:a.gas_used,stack:OI(a.stack),exit_code:a.exit_code}}async callGetMethodWithError(t,r,i=[]){return this.runMethodWithError(t,r,i)}async getTransactions(t,r){let i=await Sl(this,cs,"f").getTransactions(t,r),a=[];for(let o of i)a.push((0,ha.loadTransaction)(ha.Cell.fromBoc(Buffer.from(o.data,"base64"))[0].beginParse()));return a}async getTransaction(t,r,i){let a=await Sl(this,cs,"f").getTransaction(t,r,i);return a?(0,ha.loadTransaction)(ha.Cell.fromBoc(Buffer.from(a.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let t=await Sl(this,cs,"f").getMasterchainInfo();return{workchain:t.init.workchain,shard:t.last.shard,initSeqno:t.init.seqno,latestSeqno:t.last.seqno}}async getWorkchainShards(t){return(await Sl(this,cs,"f").getShards(t)).map(i=>({workchain:i.workchain,shard:i.shard,seqno:i.seqno}))}async getShardTransactions(t,r,i){let a=await Sl(this,cs,"f").getBlockTransactions(t,r,i);if(a.incomplete)throw Error("Unsupported");return a.transactions.map(o=>({account:ha.Address.parseRaw(o.account),lt:o.lt,hash:o.hash}))}async sendMessage(t){const r=(0,ha.beginCell)().store((0,ha.storeMessage)(t)).endCell().toBoc();await Sl(this,cs,"f").sendBoc(r)}async sendFile(t){await Sl(this,cs,"f").sendBoc(t)}async estimateExternalMessageFee(t,r){return await Sl(this,cs,"f").estimateFee(t,{body:r.body,initCode:r.initCode,initData:r.initData,ignoreSignature:r.ignoreSignature})}async sendExternalMessage(t,r){if(await this.isContractDeployed(t.address)||!t.init){const i=(0,ha.external)({to:t.address,body:r});await this.sendMessage(i)}else{const i=(0,ha.external)({to:t.address,init:{code:t.init.code,data:t.init.data},body:r});await this.sendMessage(i)}}async isContractDeployed(t){return(await this.getContractState(t)).state==="active"}async getContractState(t){let r=await Sl(this,cs,"f").getAddressInformation(t),i=BigInt(r.balance),a=r.state;return{balance:i,state:a,code:r.code!==""?Buffer.from(r.code,"base64"):null,data:r.data!==""?Buffer.from(r.data,"base64"):null,lastTransaction:r.last_transaction_id.lt!=="0"?{lt:r.last_transaction_id.lt,hash:r.last_transaction_id.hash}:null,blockId:{workchain:r.block_id.workchain,shard:r.block_id.shard,seqno:r.block_id.seqno},timestampt:r.sync_utime}}open(t){return(0,ha.openContract)(t,r=>BI(this,r.address,r.init))}provider(t,r){return BI(this,t,r)}}l2.TonClient=fce;cs=new WeakMap;function OI(e){let t=[];for(let r of e)if(r[0]==="num"){let i=r[1];i.startsWith("-")?t.push({type:"int",value:-BigInt(i.slice(1))}):t.push({type:"int",value:BigInt(i)})}else if(r[0]==="null")t.push({type:"null"});else if(r[0]==="cell")t.push({type:"cell",cell:ha.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="slice")t.push({type:"slice",cell:ha.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="builder")t.push({type:"builder",cell:ha.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+r[0]);return new ha.TupleReader(t)}function BI(e,t,r){return{async getState(){let i=await e.getContractState(t),a=i.balance,o=i.lastTransaction?{lt:BigInt(i.lastTransaction.lt),hash:Buffer.from(i.lastTransaction.hash,"base64")}:null,s;if(i.state==="active")s={type:"active",code:i.code?i.code:null,data:i.data?i.data:null};else if(i.state==="uninitialized")s={type:"uninit"};else if(i.state==="frozen")s={type:"frozen",stateHash:Buffer.alloc(0)};else throw Error("Unsupported state");return{balance:a,last:o,state:s}},async get(i,a){return{stack:(await e.callGetMethod(t,i,a)).stack}},async external(i){let a=null;r&&!await e.isContractDeployed(t)&&(a=r);const o=(0,ha.external)({to:t,init:a?{code:a.code,data:a.data}:null,body:i});let s=(0,ha.beginCell)().store((0,ha.storeMessage)(o)).endCell().toBoc();await e.sendFile(s)},async internal(i,a){let o=null;r&&!await e.isContractDeployed(t)&&(o=r);let s=!0;a.bounce!==null&&a.bounce!==void 0&&(s=a.bounce);let l;typeof a.value=="string"?l=(0,ha.toNano)(a.value):l=a.value;let u=null;typeof a.body=="string"?u=(0,ha.comment)(a.body):a.body&&(u=a.body),await i.send({to:t,value:l,bounce:s,sendMode:a.sendMode,init:o,body:u})}}}var u2={},c2={};Object.defineProperty(c2,"__esModule",{value:!0});c2.toUrlSafe=void 0;function pce(e){for(;e.indexOf("/")>=0;)e=e.replace("/","_");for(;e.indexOf("+")>=0;)e=e.replace("+","-");for(;e.indexOf("=")>=0;)e=e.replace("=","");return e}c2.toUrlSafe=pce;var L_=xn&&xn.__classPrivateFieldSet||function(e,t,r,i,a){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r},so=xn&&xn.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},hce=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ts,Is,Rs;Object.defineProperty(u2,"__esModule",{value:!0});u2.TonClient4=void 0;const Ql=hce(JC.exports),fs=uo,UI=c2,Ir=i6;class gce{constructor(t){Ts.set(this,void 0),Is.set(this,void 0),Rs.set(this,void 0),L_(this,Ts,t.endpoint,"f"),L_(this,Is,t.timeout||5e3,"f"),L_(this,Rs,t.httpAdapter,"f")}async getLastBlock(){let t=await Ql.default.get(so(this,Ts,"f")+"/block/latest",{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),r=mce.safeParse(t.data);if(!r.success)throw Error("Mailformed response: "+r.error.format()._errors.join(", "));return r.data}async getBlock(t){let r=await Ql.default.get(so(this,Ts,"f")+"/block/"+t,{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),i=DI.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getBlockByUtime(t){let r=await Ql.default.get(so(this,Ts,"f")+"/block/utime/"+t,{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),i=DI.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getAccount(t,r){let i=await Ql.default.get(so(this,Ts,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0}),{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),a=yce.safeParse(i.data);if(!a.success)throw Error("Mailformed response");return a.data}async getAccountLite(t,r){let i=await Ql.default.get(so(this,Ts,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/lite",{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),a=vce.safeParse(i.data);if(!a.success)throw Error("Mailformed response");return a.data}async isContractDeployed(t,r){return(await this.getAccountLite(t,r)).account.state.type==="active"}async isAccountChanged(t,r,i){let a=await Ql.default.get(so(this,Ts,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/changed/"+i.toString(10),{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),o=bce.safeParse(a.data);if(!o.success)throw Error("Mailformed response");return o.data}async getAccountTransactions(t,r,i){let a=await Ql.default.get(so(this,Ts,"f")+"/account/"+t.toString({urlSafe:!0})+"/tx/"+r.toString(10)+"/"+(0,UI.toUrlSafe)(i.toString("base64")),{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),o=Sce.safeParse(a.data);if(!o.success)throw Error("Mailformed response");let s=o.data,l=[],u=fs.Cell.fromBoc(Buffer.from(s.boc,"base64"));for(let c=0;c0&&(i="/"+[...r].sort().join(","));let a=await Ql.default.get(so(this,Ts,"f")+"/block/"+t+"/config"+i,{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),o=xce.safeParse(a.data);if(!o.success)throw Error("Mailformed response");return o.data}async runMethod(t,r,i,a){let o=a&&a.length>0?"/"+(0,UI.toUrlSafe)((0,fs.serializeTuple)(a).toBoc({idx:!1,crc32:!1}).toString("base64")):"",s=so(this,Ts,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/run/"+i+o,l=await Ql.default.get(s,{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")}),u=wce.safeParse(l.data);if(!u.success)throw Error("Mailformed response");let c=u.data.resultRaw?(0,fs.parseTuple)(fs.Cell.fromBoc(Buffer.from(u.data.resultRaw,"base64"))[0]):[];return{exitCode:u.data.exitCode,result:c,resultRaw:u.data.resultRaw,block:u.data.block,shardBlock:u.data.shardBlock,reader:new fs.TupleReader(c)}}async sendMessage(t){let r=await Ql.default.post(so(this,Ts,"f")+"/send",{boc:t.toString("base64")},{adapter:so(this,Rs,"f"),timeout:so(this,Is,"f")});if(!_ce.safeParse(r.data).success)throw Error("Mailformed response");return{status:r.data.status}}open(t){return(0,fs.openContract)(t,r=>Zy(this,null,r.address,r.init))}openAt(t,r){return(0,fs.openContract)(r,i=>Zy(this,t,i.address,i.init))}provider(t,r){return Zy(this,null,t,r||null)}providerAt(t,r,i){return Zy(this,t,r,i||null)}}u2.TonClient4=gce;Ts=new WeakMap,Is=new WeakMap,Rs=new WeakMap;function Zy(e,t,r,i){return{async getState(){let a=t;a===null&&(a=(await e.getLastBlock()).last.seqno);let o=await e.getAccount(a,r),s=o.account.last?{lt:BigInt(o.account.last.lt),hash:Buffer.from(o.account.last.hash,"base64")}:null,l;if(o.account.state.type==="active")l={type:"active",code:o.account.state.code?Buffer.from(o.account.state.code,"base64"):null,data:o.account.state.data?Buffer.from(o.account.state.data,"base64"):null};else if(o.account.state.type==="uninit")l={type:"uninit"};else if(o.account.state.type==="frozen")l={type:"frozen",stateHash:Buffer.from(o.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(o.account.balance.coins),last:s,state:l}},async get(a,o){let s=t;s===null&&(s=(await e.getLastBlock()).last.seqno);let l=await e.runMethod(s,r,a,o);if(l.exitCode!==0&&l.exitCode!==1)throw Error("Exit code: "+l.exitCode);return{stack:new fs.TupleReader(l.result)}},async external(a){let o=await e.getLastBlock(),s=null;i&&(await e.getAccountLite(o.last.seqno,r)).account.state.type!=="active"&&(s=i);const l=(0,fs.external)({to:r,init:s?{code:s.code,data:s.data}:null,body:a});let u=(0,fs.beginCell)().store((0,fs.storeMessage)(l)).endCell().toBoc();await e.sendMessage(u)},async internal(a,o){let s=await e.getLastBlock(),l=null;i&&(await e.getAccountLite(s.last.seqno,r)).account.state.type!=="active"&&(l=i);let u=!0;o.bounce!==null&&o.bounce!==void 0&&(u=o.bounce);let c;typeof o.value=="string"?c=(0,fs.toNano)(o.value):c=o.value;let d=null;typeof o.body=="string"?d=(0,fs.comment)(o.body):o.body&&(d=o.body),await a.send({to:r,value:c,bounce:u,sendMode:o.sendMode,init:l,body:d})}}}const mce=Ir.z.object({last:Ir.z.object({seqno:Ir.z.number(),shard:Ir.z.string(),workchain:Ir.z.number(),fileHash:Ir.z.string(),rootHash:Ir.z.string()}),init:Ir.z.object({fileHash:Ir.z.string(),rootHash:Ir.z.string()}),stateRootHash:Ir.z.string(),now:Ir.z.number()}),DI=Ir.z.union([Ir.z.object({exist:Ir.z.literal(!1)}),Ir.z.object({exist:Ir.z.literal(!0),block:Ir.z.object({shards:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string(),transactions:Ir.z.array(Ir.z.object({account:Ir.z.string(),hash:Ir.z.string(),lt:Ir.z.string()}))}))})})]),sD=Ir.z.object({lastPaid:Ir.z.number(),duePayment:Ir.z.union([Ir.z.null(),Ir.z.string()]),used:Ir.z.object({bits:Ir.z.number(),cells:Ir.z.number(),publicCells:Ir.z.number()})}),yce=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),code:Ir.z.union([Ir.z.string(),Ir.z.null()]),data:Ir.z.union([Ir.z.string(),Ir.z.null()])}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),sD])}),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),vce=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),codeHash:Ir.z.string(),dataHash:Ir.z.string()}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),sD])})}),bce=Ir.z.object({changed:Ir.z.boolean(),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),wce=Ir.z.object({exitCode:Ir.z.number(),resultRaw:Ir.z.union([Ir.z.string(),Ir.z.null()]),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()}),shardBlock:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),xce=Ir.z.object({config:Ir.z.object({cell:Ir.z.string(),address:Ir.z.string(),globalBalance:Ir.z.object({coins:Ir.z.string()})})}),_ce=Ir.z.object({status:Ir.z.number()}),Sce=Ir.z.object({blocks:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})),boc:Ir.z.string()});var d2={},Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});Ua.createWalletTransferV4=Ua.createWalletTransferV3=Ua.createWalletTransferV2=Ua.createWalletTransferV1=void 0;const Qa=uo,f2=Gh();function Cce(e){let t=(0,Qa.beginCell)().storeUint(e.seqno,32);e.message&&(t.storeUint(e.sendMode,8),t.storeRef((0,Qa.beginCell)().store((0,Qa.storeMessageRelaxed)(e.message))));let r=(0,f2.sign)(t.endCell().hash(),e.secretKey);return(0,Qa.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Ua.createWalletTransferV1=Cce;function Ece(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,Qa.beginCell)().storeUint(e.seqno,32);if(e.seqno===0)for(let a=0;a<32;a++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);for(let a of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,Qa.beginCell)().store((0,Qa.storeMessageRelaxed)(a)));let r=(0,f2.sign)(t.endCell().hash(),e.secretKey);return(0,Qa.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Ua.createWalletTransferV2=Ece;function kce(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,Qa.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let a=0;a<32;a++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32);for(let a of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,Qa.beginCell)().store((0,Qa.storeMessageRelaxed)(a)));let r=(0,f2.sign)(t.endCell().hash(),e.secretKey);return(0,Qa.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Ua.createWalletTransferV3=kce;function Ace(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,Qa.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let a=0;a<32;a++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32),t.storeUint(0,8);for(let a of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,Qa.beginCell)().store((0,Qa.storeMessageRelaxed)(a)));let r=(0,f2.sign)(t.endCell().hash(),e.secretKey);return(0,Qa.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Ua.createWalletTransferV4=Ace;Object.defineProperty(d2,"__esModule",{value:!0});d2.WalletContractV1R1=void 0;const vp=uo,Tce=Ua;class a6{constructor(t,r){this.workchain=t,this.publicKey=r;let i=vp.Cell.fromBoc(Buffer.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],a=(0,vp.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:a},this.address=(0,vp.contractAddress)(t,{code:i,data:a})}static create(t){return new a6(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){let r=await t.getState();return r.state.type==="active"?vp.Cell.fromBoc(r.state.data)[0].beginParse().loadUint(32):0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=vp.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Tce.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,message:(0,vp.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,o)}}}}d2.WalletContractV1R1=a6;var p2={};Object.defineProperty(p2,"__esModule",{value:!0});p2.WalletContractV1R2=void 0;const Ug=uo,Ice=Ua;class s6{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Ug.Cell.fromBoc(Buffer.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],a=(0,Ug.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:a},this.address=(0,Ug.contractAddress)(t,{code:i,data:a})}static create(t){return new s6(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Ug.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Ice.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,message:(0,Ug.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,o)}}}}p2.WalletContractV1R2=s6;var h2={};Object.defineProperty(h2,"__esModule",{value:!0});h2.WalletContractV1R3=void 0;const Dg=uo,Rce=Ua;class l6{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Dg.Cell.fromBoc(Buffer.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],a=(0,Dg.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:a},this.address=(0,Dg.contractAddress)(t,{code:i,data:a})}static create(t){return new l6(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Dg.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Rce.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,message:(0,Dg.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,o)}}}}h2.WalletContractV1R3=l6;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});g2.WalletContractV2R1=void 0;const Lg=uo,Pce=Ua;class u6{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Lg.Cell.fromBoc(Buffer.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],a=(0,Lg.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:a},this.address=(0,Lg.contractAddress)(t,{code:i,data:a})}static create(t){return new u6(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Lg.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Pce.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,messages:[(0,Lg.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,o)}}}}g2.WalletContractV2R1=u6;var m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.WalletContractV2R2=void 0;const Ng=uo,Mce=Ua;class c6{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Ng.Cell.fromBoc(Buffer.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],a=(0,Ng.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:a},this.address=(0,Ng.contractAddress)(t,{code:i,data:a})}static create(t){return new c6(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Ng.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Mce.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,messages:[(0,Ng.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,o)}}}}m2.WalletContractV2R2=c6;var y2={};Object.defineProperty(y2,"__esModule",{value:!0});y2.WalletContractV3R1=void 0;const jg=uo,Oce=Ua;class d6{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let a=jg.Cell.fromBoc(Buffer.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],o=(0,jg.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:a,data:o},this.address=(0,jg.contractAddress)(t,{code:a,data:o})}static create(t){return new d6(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=jg.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Oce.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,messages:[(0,jg.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,o)}}}}y2.WalletContractV3R1=d6;var v2={};Object.defineProperty(v2,"__esModule",{value:!0});v2.WalletContractV3R2=void 0;const $g=uo,Bce=Ua;class f6{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let a=$g.Cell.fromBoc(Buffer.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],o=(0,$g.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:a,data:o},this.address=(0,$g.contractAddress)(t,{code:a,data:o})}static create(t){return new f6(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=$g.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Bce.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,messages:[(0,$g.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,o)}}}}v2.WalletContractV3R2=f6;var b2={};Object.defineProperty(b2,"__esModule",{value:!0});b2.WalletContractV4=void 0;const Fg=uo,Uce=Ua;class p6{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let a=Fg.Cell.fromBoc(Buffer.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],o=(0,Fg.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:a,data:o},this.address=(0,Fg.contractAddress)(t,{code:a,data:o})}static create(t){return new p6(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Fg.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Uce.createWalletTransferV4)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let a=await this.getSeqno(t),o=this.createTransfer({seqno:a,secretKey:r,sendMode:i.sendMode,messages:[(0,Fg.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,o)}}}}b2.WalletContractV4=p6;var w2={};Object.defineProperty(w2,"__esModule",{value:!0});w2.JettonMaster=void 0;const Dce=uo;class h6{constructor(t){this.address=t}static create(t){return new h6(t)}async getWalletAddress(t,r){return(await t.get("get_wallet_address",[{type:"slice",cell:(0,Dce.beginCell)().storeAddress(r).endCell()}])).stack.readAddress()}async getJettonData(t){let r=await t.get("get_jetton_data",[]),i=r.stack.readBigNumber(),a=r.stack.readBoolean(),o=r.stack.readAddress(),s=r.stack.readCell(),l=r.stack.readCell();return{totalSupply:i,mintable:a,adminAddress:o,content:s,walletCode:l}}}w2.JettonMaster=h6;var x2={};Object.defineProperty(x2,"__esModule",{value:!0});x2.JettonWallet=void 0;class g6{constructor(t){this.address=t}static create(t){return new g6(t)}async getBalance(t){return(await t.getState()).state.type!=="active"?0n:(await t.get("get_wallet_data",[])).stack.readBigNumber()}}x2.JettonWallet=g6;var J0={};Object.defineProperty(J0,"__esModule",{value:!0});J0.MultisigOrder=void 0;const LI=Gh(),Jy=uo;class A1{constructor(t){this.signatures={},this.payload=t}static fromCell(t){let r=t.beginParse(),i=r.loadMaybeRef()?.beginParse();const a=r.asCell();let o=new A1(a);if(i){for(;i.remainingBits>0;){const s=i.loadBuffer(64),l=i.loadUint(8);o.signatures[l]=s,i.remainingRefs>0?i=i.loadRef().asSlice():i.skip(1)}i.endParse()}return o}static fromPayload(t){return new A1(t)}addSignature(t,r,i){const a=this.payload.hash();if(!(0,LI.signVerify)(a,r,i.owners.get(t).slice(0,-1)))throw Error("invalid signature");this.signatures[t]=r}sign(t,r){const i=this.payload.hash();return this.signatures[t]=(0,LI.sign)(i,r),i}unionSignatures(t){this.signatures=Object.assign({},this.signatures,t.signatures)}clearSignatures(){this.signatures={}}toCell(t){let r=(0,Jy.beginCell)().storeBit(0);for(const i in this.signatures){const a=this.signatures[i];r=(0,Jy.beginCell)().storeBit(1).storeRef((0,Jy.beginCell)().storeBuffer(a).storeUint(parseInt(i),8).storeBuilder(r).endCell())}return(0,Jy.beginCell)().storeUint(t,8).storeBuilder(r).storeBuilder(this.payload.asBuilder()).endCell()}}J0.MultisigOrder=A1;var _2={};Object.defineProperty(_2,"__esModule",{value:!0});_2.MultisigOrderBuilder=void 0;const zg=uo,Lce=J0;class Nce{constructor(t,r){this.messages=(0,zg.beginCell)(),this.queryId=0n,this.walletId=t,this.queryOffset=r||7200}addMessage(t,r){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(r,8),this.messages.storeRef((0,zg.beginCell)().store((0,zg.storeMessageRelaxed)(t)).endCell())}clearMessages(){this.messages=(0,zg.beginCell)()}build(){return Lce.MultisigOrder.fromPayload((0,zg.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){const t=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=t<<32n}}_2.MultisigOrderBuilder=Nce;var S2={};Object.defineProperty(S2,"__esModule",{value:!0});S2.MultisigWallet=void 0;const NI=Gh(),Ys=uo,jce=Ys.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ==");class m6{constructor(t,r,i,a,o){this.provider=null,this.owners=Ys.Dictionary.empty(),this.workchain=r,this.walletId=i,this.k=a;for(let s=0;s{t&&i&&a!==t&&e(`/${a}`,{replace:!0})},[t]),{contractAddress:a,contractAddressHex:o,isAddressEmpty:!t}}function lD(e){let t=!0;try{Qn.Address.parse(e??"")}catch{t=!1}return t}function jI(e,t){for(var r=0;r=0)&&(r[a]=e[a]);return r}function $I(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var uD=Us.createContext(),zce={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},Uu={view:{default:20,dense:4},snackbar:{default:6,dense:2}},ef={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:lU,transitionDuration:{enter:225,exit:195}},km=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Hce=function(t){return""+km(t.vertical)+km(t.horizontal)},Wce=function(t){return Object.keys(t).filter(function(r){return!zce.container[r]}).reduce(function(r,i){var a;return Oo({},r,(a={},a[i]=t[i],a))},{})},Bc={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},Uv={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var r=t.vertical,i=t.horizontal;return"anchorOrigin"+km(r)+km(i)},toVariant:function(t){return"variant"+km(t)}},ev=function(t){return!!t||t===0},FI=function(t){return typeof t=="number"||t===null},Vce=function(t,r,i){return function(a){return a==="autoHideDuration"?FI(t.autoHideDuration)?t.autoHideDuration:FI(r.autoHideDuration)?r.autoHideDuration:ef.autoHideDuration:t[a]||r[a]||i[a]}};function N_(e,t,r){return e===void 0&&(e={}),t===void 0&&(t={}),r===void 0&&(r={}),Oo({},r,{},t,{},e)}var qce="SnackbarContent",cD={root:qce+"-root"},Kce=ar("div")(function(e){var t,r,i=e.theme;return r={},r["&."+cD.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[i.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),r}),Gce=Z.exports.forwardRef(function(e,t){var r=e.className,i=nd(e,["className"]);return N(Kce,{...Object.assign({ref:t,className:dn(cD.root,r)},i)})}),zI={right:"left",left:"right",bottom:"up",top:"down"},Yce=function(t){return t.horizontal!=="center"?zI[t.horizontal]:zI[t.vertical]},Qce=function(t){return N(gh,{...Object.assign({},t),children:N("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})},Xce=function(t){return N(gh,{...Object.assign({},t),children:N("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})},Zce=function(t){return N(gh,{...Object.assign({},t),children:N("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})},Jce=function(t){return N(gh,{...Object.assign({},t),children:N("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})},tv={fontSize:20,marginInlineEnd:8},ede={default:void 0,success:N(Qce,{style:tv}),warning:N(Xce,{style:tv}),error:N(Zce,{style:tv}),info:N(Jce,{style:tv})};function Am(e,t){return e.reduce(function(r,i){return i==null?r:function(){for(var o=arguments.length,s=new Array(o),l=0;l .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},$_=16,Nd="SnackbarContainer",kl={root:Nd+"-root",rootDense:Nd+"-rootDense",top:Nd+"-top",bottom:Nd+"-bottom",left:Nd+"-left",right:Nd+"-right",center:Nd+"-center"},ode=ar("div")(function(e){var t,r,i,a,o,s,l=e.theme;return s={},s["&."+kl.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:l.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[j_.container]={pointerEvents:"all"},t[j_.wrapper]={padding:Uu.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+Uu.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+$_*2+"px)"},t),s["&."+kl.rootDense]=(r={},r[j_.wrapper]={padding:Uu.snackbar.dense+"px 0px"},r),s["&."+kl.top]={top:Uu.view.default-Uu.snackbar.default,flexDirection:"column"},s["&."+kl.bottom]={bottom:Uu.view.default-Uu.snackbar.default,flexDirection:"column-reverse"},s["&."+kl.left]=(i={left:Uu.view.default},i[l.breakpoints.up("sm")]={alignItems:"flex-start"},i[l.breakpoints.down("sm")]={left:$_+"px"},i),s["&."+kl.right]=(a={right:Uu.view.default},a[l.breakpoints.up("sm")]={alignItems:"flex-end"},a[l.breakpoints.down("sm")]={right:$_+"px"},a),s["&."+kl.center]=(o={left:"50%",transform:"translateX(-50%)"},o[l.breakpoints.up("sm")]={alignItems:"center"},o),s}),ade=function(t){var r=t.className,i=t.anchorOrigin,a=t.dense,o=nd(t,["className","anchorOrigin","dense"]),s=dn(kl[i.vertical],kl[i.horizontal],kl.root,r,a&&kl.rootDense);return N(ode,{...Object.assign({className:s},o)})},sde=Us.memo(ade),lde=function(e){Fce(t,e);function t(i){var a;return a=e.call(this,i)||this,a.enqueueSnackbar=function(o,s){s===void 0&&(s={});var l=s,u=l.key,c=l.preventDuplicate,d=nd(l,["key","preventDuplicate"]),g=ev(u),x=g?u:new Date().getTime()+Math.random(),w=Vce(d,a.props,ef),v=Oo({key:x},d,{message:o,open:!0,entered:!1,requestClose:!1,variant:w("variant"),anchorOrigin:w("anchorOrigin"),autoHideDuration:w("autoHideDuration")});return d.persist&&(v.autoHideDuration=void 0),a.setState(function(y){if(c===void 0&&a.props.preventDuplicate||c){var _=function(U){return g?U.key===u:U.message===o},E=y.queue.findIndex(_)>-1,A=y.snacks.findIndex(_)>-1;if(E||A)return y}return a.handleDisplaySnack(Oo({},y,{queue:[].concat(y.queue,[v])}))}),x},a.handleDisplaySnack=function(o){var s=o.snacks;return s.length>=a.maxSnack?a.handleDismissOldest(o):a.processQueue(o)},a.processQueue=function(o){var s=o.queue,l=o.snacks;return s.length>0?Oo({},o,{snacks:[].concat(l,[s[0]]),queue:s.slice(1,s.length)}):o},a.handleDismissOldest=function(o){if(o.snacks.some(function(d){return!d.open||d.requestClose}))return o;var s=!1,l=!1,u=o.snacks.reduce(function(d,g){return d+(g.open&&g.persist?1:0)},0);u===a.maxSnack&&(l=!0);var c=o.snacks.map(function(d){return!s&&(!d.persist||l)?(s=!0,d.entered?(d.onClose&&d.onClose(null,Bc.MAXSNACK,d.key),a.props.onClose&&a.props.onClose(null,Bc.MAXSNACK,d.key),Oo({},d,{open:!1})):Oo({},d,{requestClose:!0})):Oo({},d)});return Oo({},o,{snacks:c})},a.handleEnteredSnack=function(o,s,l){if(!ev(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");a.setState(function(u){var c=u.snacks;return{snacks:c.map(function(d){return d.key===l?Oo({},d,{entered:!0}):Oo({},d)})}})},a.handleCloseSnack=function(o,s,l){if(a.props.onClose&&a.props.onClose(o,s,l),s!==Bc.CLICKAWAY){var u=l===void 0;a.setState(function(c){var d=c.snacks,g=c.queue;return{snacks:d.map(function(x){return!u&&x.key!==l?Oo({},x):x.entered?Oo({},x,{open:!1}):Oo({},x,{requestClose:!0})}),queue:g.filter(function(x){return x.key!==l})}})}},a.closeSnackbar=function(o){var s=a.state.snacks.find(function(l){return l.key===o});ev(o)&&s&&s.onClose&&s.onClose(null,Bc.INSTRUCTED,o),a.handleCloseSnack(null,Bc.INSTRUCTED,o)},a.handleExitedSnack=function(o,s,l){var u=s||l;if(!ev(u))throw new Error("handleExitedSnack Cannot be called with undefined key");a.setState(function(c){var d=a.processQueue(Oo({},c,{snacks:c.snacks.filter(function(g){return g.key!==u})}));return d.queue.length===0?d:a.handleDismissOldest(d)})},a.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:a.enqueueSnackbar.bind($I(a)),closeSnackbar:a.closeSnackbar.bind($I(a))}},a}var r=t.prototype;return r.render=function(){var a=this,o=this.state.contextValue,s=this.props,l=s.iconVariant,u=s.dense,c=u===void 0?ef.dense:u,d=s.hideIconVariant,g=d===void 0?ef.hideIconVariant:d,x=s.domRoot,w=s.children,v=s.classes,y=v===void 0?{}:v,_=nd(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),E=this.state.snacks.reduce(function(B,U){var L,K=Hce(U.anchorOrigin),V=B[K]||[];return Oo({},B,(L={},L[K]=[].concat(V,[U]),L))},{}),A=Object.keys(E).map(function(B){var U=E[B];return N(sde,{dense:c,anchorOrigin:U[0].anchorOrigin,className:dn(y.containerRoot,y[Uv.toContainerAnchorOrigin(B)]),children:U.map(function(L){return N(ide,{...Object.assign({},_,{key:L.key,snack:L,dense:c,iconVariant:l,hideIconVariant:g,classes:Wce(y),onClose:a.handleCloseSnack,onExited:Am([a.handleExitedSnack,a.props.onExited]),onEntered:Am([a.handleEnteredSnack,a.props.onEntered])})})})},B)});return Bt(uD.Provider,{value:o,children:[w,x?il.exports.createPortal(A,x):A]})},$ce(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||ef.maxSnack}}]),t}(Z.exports.Component),ude=function(){return Z.exports.useContext(uD)},y6={},C2={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(C2);var F_={};const cde=lb(FX);var WI;function v6(){return WI||(WI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=cde}(F_)),F_}const b6=lb(ZW);var dde=C2.exports;Object.defineProperty(y6,"__esModule",{value:!0});var dD=y6.default=void 0,fde=dde(v6()),pde=b6,hde=(0,fde.default)((0,pde.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");dD=y6.default=hde;const gde=ar(aa)({"& &":{color:"white"},"& a":{color:"white"}});function ey(){const{enqueueSnackbar:e,closeSnackbar:t}=ude();return{showNotification:Z.exports.useCallback((i,a,o,s)=>{const l=e(N(gde,{children:i}),{variant:a,autoHideDuration:s||5e3,onClose:o,onClick:()=>t(l),action:()=>N(qs,{children:N(dD,{sx:{color:"#fff",stroke:"#fff",width:20,height:20}})})})},[t,e])}}const VI=e=>{let t;const r=new Set,i=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const g=t;t=c??typeof d!="object"?d:Object.assign({},t,d),r.forEach(x=>x(t,g))}},a=()=>t,l={setState:i,getState:a,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_VERIFIER_REGISTRY:"EQDS0AW7NV1w3nFwx-mmryfpH4OGQ3PXnoFGOJA_8PTHuLrw",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_VERIFIER_REGISTRY_TESTNET:"EQB--CRXUbqYbqJKScEWeOrnk0TKJxB071M-WwvMpMEvq6Ed",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return t=e(i,a,l),l},mde=e=>e?VI(e):VI;var fD={exports:{}},pD={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var E2=Z.exports,yde=V4.exports;function vde(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bde=typeof Object.is=="function"?Object.is:vde,wde=yde.useSyncExternalStore,xde=E2.useRef,_de=E2.useEffect,Sde=E2.useMemo,Cde=E2.useDebugValue;pD.useSyncExternalStoreWithSelector=function(e,t,r,i,a){var o=xde(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Sde(function(){function u(w){if(!c){if(c=!0,d=w,w=i(w),a!==void 0&&s.hasValue){var v=s.value;if(a(v,w))return g=v}return g=w}if(v=g,bde(d,w))return v;var y=i(w);return a!==void 0&&a(v,y)?v:(d=w,g=y)}var c=!1,d,g,x=r===void 0?null:r;return[function(){return u(t())},x===null?void 0:function(){return u(x())}]},[t,r,i,a]);var l=wde(e,o[0],o[1]);return _de(function(){s.hasValue=!0,s.value=l},[l]),Cde(l),l};(function(e){e.exports=pD})(fD);const Ede=sb(fD.exports),{useSyncExternalStoreWithSelector:kde}=Ede;function Ade(e,t=e.getState,r){const i=kde(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return Z.exports.useDebugValue(i),i}const qI=e=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_VERIFIER_REGISTRY:"EQDS0AW7NV1w3nFwx-mmryfpH4OGQ3PXnoFGOJA_8PTHuLrw",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_VERIFIER_REGISTRY_TESTNET:"EQB--CRXUbqYbqJKScEWeOrnk0TKJxB071M-WwvMpMEvq6Ed",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof e!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const t=typeof e=="function"?mde(e):e,r=(i,a)=>Ade(t,i,a);return Object.assign(r,t),r},Yh=e=>e?qI(e):qI;var ty=e=>(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_VERIFIER_REGISTRY:"EQDS0AW7NV1w3nFwx-mmryfpH4OGQ3PXnoFGOJA_8PTHuLrw",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_VERIFIER_REGISTRY_TESTNET:"EQB--CRXUbqYbqJKScEWeOrnk0TKJxB071M-WwvMpMEvq6Ed",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] default export is deprecated, instead import { create } from'zustand'"),Yh(e));const Tde=ty(e=>({value:"",active:!1,setValue:t=>e({value:t}),setActive:t=>e({active:t})}));function w6(){const{showNotification:e}=ey(),t=fc(),{value:r,setValue:i,active:a,setActive:o}=Tde(u=>u),s=Z.exports.useCallback(()=>{i("")},[]);return{onSubmit:()=>{if(!lD(r)){e("Invalid address","error");return}i(""),o(!1),t(`/${r}`)},onClear:s,setActive:o,setValue:i,active:a,value:r}}function Ide(e){let t;try{t=e()}catch{return}return{getItem:i=>{var a;const o=l=>l===null?null:JSON.parse(l),s=(a=t.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>t.setItem(i,JSON.stringify(a)),removeItem:i=>t.removeItem(i)}}const s0=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return s0(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return s0(i)(r)}}}},Rde=(e,t)=>(r,i,a)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,E)=>({...E,..._}),...t},s=!1;const l=new Set,u=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(..._)},i,a);const d=s0(o.serialize),g=()=>{const _=o.partialize({...i()});let E;const A=d({state:_,version:o.version}).then(B=>c.setItem(o.name,B)).catch(B=>{E=B});if(E)throw E;return A},x=a.setState;a.setState=(_,E)=>{x(_,E),g()};const w=e((..._)=>{r(..._),g()},i,a);let v;const y=()=>{var _;if(!c)return;s=!1,l.forEach(A=>A(i()));const E=((_=o.onRehydrateStorage)==null?void 0:_.call(o,i()))||void 0;return s0(c.getItem.bind(c))(o.name).then(A=>{if(A)return o.deserialize(A)}).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==o.version){if(o.migrate)return o.migrate(A.state,A.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return A.state}).then(A=>{var B;return v=o.merge(A,(B=i())!=null?B:w),r(v,!0),g()}).then(()=>{E?.(v,void 0),s=!0,u.forEach(A=>A(v))}).catch(A=>{E?.(void 0,A)})};return a.persist={setOptions:_=>{o={...o,..._},_.getStorage&&(c=_.getStorage())},clearStorage:()=>{c?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:_=>(l.add(_),()=>{l.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},y(),v||w},Pde=(e,t)=>(r,i,a)=>{let o={storage:Ide(()=>localStorage),partialize:y=>y,version:0,merge:(y,_)=>({..._,...y}),...t},s=!1;const l=new Set,u=new Set;let c=o.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...y)},i,a);const d=()=>{const y=o.partialize({...i()});return c.setItem(o.name,{state:y,version:o.version})},g=a.setState;a.setState=(y,_)=>{g(y,_),d()};const x=e((...y)=>{r(...y),d()},i,a);let w;const v=()=>{var y;if(!c)return;s=!1,l.forEach(E=>E(i()));const _=((y=o.onRehydrateStorage)==null?void 0:y.call(o,i()))||void 0;return s0(c.getItem.bind(c))(o.name).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==o.version){if(o.migrate)return o.migrate(E.state,E.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return E.state}).then(E=>{var A;return w=o.merge(E,(A=i())!=null?A:x),r(w,!0),d()}).then(()=>{_?.(w,void 0),s=!0,u.forEach(E=>E(w))}).catch(E=>{_?.(void 0,E)})};return a.persist={setOptions:y=>{o={...o,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},v(),w||x},Mde=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_VERIFIER_REGISTRY:"EQDS0AW7NV1w3nFwx-mmryfpH4OGQ3PXnoFGOJA_8PTHuLrw",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_VERIFIER_REGISTRY_TESTNET:"EQB--CRXUbqYbqJKScEWeOrnk0TKJxB071M-WwvMpMEvq6Ed",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),Rde(e,t)):Pde(e,t),Ode=Mde,Bde=ty()(Ode((e,t)=>({addresses:[],addAddress:r=>e({addresses:[r,...t().addresses.filter(i=>i!==r)].slice(0,20)}),clear:()=>e({addresses:[]}),removeItem:r=>{const{addresses:i}=t(),a=i.filter(o=>o!==r);e({addresses:a})}}),{name:"addressHistory",getStorage:()=>localStorage}));function hD(){const e=fc(),{setValue:t,setActive:r}=w6(),{addresses:i,addAddress:a,clear:o,removeItem:s}=Bde(),{contractAddress:l}=ku(),u=Z.exports.useCallback(()=>{o()},[o]),c=Z.exports.useCallback(g=>{t(""),r(!1),e(`/${g}`)},[]),d=Z.exports.useCallback((g,x)=>{g.stopPropagation(),s(x)},[s]);return Z.exports.useEffect(()=>{l&&a(l)},[l]),{onHistoryClear:u,onItemClick:c,onItemDelete:d,addressHistory:i,addAddress:a}}const Ude=ar(Cn)({display:"flex",alignItems:"center",height:48,background:"#F7F9FB",borderRadius:40,border:"0.5px solid rgba(114, 138, 150, 0.16)",padding:"0 10px 0 20px",zIndex:9}),Dde=ar("input")(({theme:e})=>({flex:1,marginLeft:10,width:"100%",height:48,fontSize:16,fontWeight:500,outline:"unset",fontFamily:"Mulish",color:"#000",border:"none",background:"transparent",caretColor:"#728A96","&::placeholder":{color:"#728A96",fontWeight:500},[e.breakpoints.down("sm")]:{fontSize:16}}));function Lde(){const{onSubmit:e,onClear:t,setActive:r,setValue:i,active:a,value:o}=w6(),{onItemDelete:s,onItemClick:l,onHistoryClear:u,addressHistory:c}=hD(),[d]=Pb(),g=d.get("devExamples")!==null;return N(bC,{onClickAway:()=>r(!1),children:Bt(Eo,{children:[Bt(Cn,{sx:{position:"relative",maxWidth:1160,width:"100%",zIndex:3},children:[Bt(Ude,{children:[N("img",{width:24,height:24,src:HY,alt:"Search icon"}),N(Dde,{onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),e())},placeholder:"Contract address",value:o,onChange:x=>i(x.target.value),onSubmit:e,onFocus:()=>r(!0),spellCheck:!1}),N(z0,{in:!!o,timeout:Vie,children:Bt(jn,{children:[N(qs,{onClick:t,children:N("img",{src:vC,width:16,height:16,alt:"Close icon"})}),N(La,{height:34,width:40,textColor:"#fff",background:"rgb(0, 136, 204)",hoverBackground:"rgb(0, 95, 142)",fontWeight:600,onClick:e,children:"Go"})]})})]}),a&&!!c?.length&&N(Qie,{searchResults:c,onItemClick:l,onItemDelete:s,onHistoryClear:u}),(g||!1)&&a&&N(Jie,{})]}),N(Cw,{sx:{color:"#fff",zIndex:1,overflow:"hidden"},invisible:!c?.length,open:a,onClick:()=>r(!1)})]})})}const Nde=250,KI=188,jde=ar(Cn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",minHeight:t.isMobile?80:KI,height:t.showExpanded&&!t.isMobile?Nde:t.isMobile?80:KI,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"})),gD=ar(jn)(()=>({gap:10})),Ff=ar(Ku)(()=>({display:"flex",alignItems:"center",gap:10,color:"#000",textDecoration:"none",cursor:"pointer"})),mD=ar(jn)(({theme:e})=>({margin:"auto",maxWidth:PU,height:100,width:"100%",justifyContent:"space-between",gap:10})),k2=ar("h4")(({theme:e})=>({color:"#000",fontSize:20,fontWeight:800,[e.breakpoints.down("sm")]:{fontSize:16}})),x6=ar("h5")(()=>({color:"#000",fontWeight:700,fontSize:18})),$de=ar("h3")(({theme:e})=>({color:"#000",fontSize:26,marginTop:0,textAlign:"center",fontWeight:800})),Fde=ar(jn)({margin:"auto",maxWidth:PU,width:"100%"});var _6={},zde=C2.exports;Object.defineProperty(_6,"__esModule",{value:!0});var yD=_6.default=void 0,Hde=zde(v6()),Wde=b6,Vde=(0,Hde.default)((0,Wde.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"}),"MenuRounded");yD=_6.default=Vde;var S6={},qde=C2.exports;Object.defineProperty(S6,"__esModule",{value:!0});var C6=S6.default=void 0,Kde=qde(v6()),Gde=b6,Yde=(0,Kde.default)((0,Gde.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");C6=S6.default=Yde;var vD={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())})(xn,function(){var t={};function r(i){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(i))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(i){if(typeof i!="string")throw new TypeError("expected string");var a,o=unescape(encodeURIComponent(i)),s=new Uint8Array(o.length);for(a=0;a"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(i){return Buffer.from(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(Buffer.from(i,"base64"),0))}):(t.encodeBase64=function(i){return new Buffer(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(new Buffer(i,"base64"),0))}):(t.encodeBase64=function(i){var a,o=[],s=i.length;for(a=0;a=e.length)throw new Error("Index is out of buffer");const r=e.slice(0,t),i=e.slice(t);return[r,i]}function z_(e){let t="";return e.forEach(r=>{t+=("0"+(r&255).toString(16)).slice(-2)}),t}function T1(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let r=0;r{this.eventSource.onerror=a,this.eventSource.onopen=()=>{this.eventSource.onerror=this.errorsHandler.bind(this),this.eventSource.onmessage=this.messagesHandler.bind(this),i()}})})}send(t,r,i,a){return Ai(this,void 0,void 0,function*(){const o=new URL(JI(this.bridgeUrl,this.postPath));o.searchParams.append("client_id",this.sessionId),o.searchParams.append("to",r),o.searchParams.append("ttl",(a||this.defaultTtl).toString()),o.searchParams.append("topic",i),yield fetch(o,{method:"post",body:E6.encode(t)})})}pause(){var t;(t=this.eventSource)===null||t===void 0||t.close()}unPause(){return this.registerSession()}close(){var t;this.isClosed=!0,(t=this.eventSource)===null||t===void 0||t.close()}setListener(t){this.listener=t}setErrorsListener(t){this.errorsListener=t}errorsHandler(t){var r,i;if(!this.isClosed){if(((r=this.eventSource)===null||r===void 0?void 0:r.readyState)===EventSource.CLOSED){this.eventSource.close(),this.registerSession();return}if(((i=this.eventSource)===null||i===void 0?void 0:i.readyState)===EventSource.CONNECTING){console.debug("[TON_CONNET_SDK_ERROR]: Bridge error",JSON.stringify(t));return}this.errorsListener(t)}}messagesHandler(t){return Ai(this,void 0,void 0,function*(){if(t.data!==this.heartbeatMessage&&(yield this.bridgeGatewayStorage.storeLastEventId(t.lastEventId),!this.isClosed)){let r;try{r=JSON.parse(t.data)}catch(i){throw new co(`Bridge message parse failed, message ${i.data}`)}this.listener(r)}})}}class c0{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return Ai(this,void 0,void 0,function*(){if(t.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(t));const r={sessionKeyPair:t.session.sessionCrypto.stringifyKeypair(),walletPublicKey:t.session.walletPublicKey,bridgeUrl:t.session.bridgeUrl},i={type:"http",connectEvent:t.connectEvent,session:r,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(i))})}removeConnection(){return Ai(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return Ai(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);if(!t)return null;const r=JSON.parse(t);if(r.type==="injected")return r;const i=new bD(r.session.sessionKeyPair);return{type:"http",connectEvent:r.connectEvent,lastWalletEventId:r.lastWalletEventId,nextRpcRequestId:r.nextRpcRequestId,session:{sessionCrypto:i,bridgeUrl:r.session.bridgeUrl,walletPublicKey:r.session.walletPublicKey}}})}getHttpConnection(){return Ai(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new co("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new co("Trying to read HTTP connection source while injected connection is stored");return t})}getInjectedConnection(){return Ai(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new co("Trying to read Injected bridge connection source while nothing is stored");if(t?.type==="http")throw new co("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return Ai(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return Ai(this,void 0,void 0,function*(){const r=yield this.getConnection();if(r&&r.type==="http")return r.lastWalletEventId=t,this.storeConnection(r)})}getLastWalletEventId(){return Ai(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return Ai(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t){const r=t.nextRpcRequestId||0;return t.nextRpcRequestId=r+1,this.storeConnection(t)}})}getNextRpcRequestId(){return Ai(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&t.nextRpcRequestId||0})}}const wD=2;function Xs(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch{}}function Dv(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch{}}function cfe(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch{}}class P1{constructor(t,r){this.storage=t,this.walletConnectionSource=r,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.connectionStorage=new c0(t)}static fromStorage(t){return Ai(this,void 0,void 0,function*(){const i=yield new c0(t).getHttpConnection();return new P1(t,{bridgeUrl:i.session.bridgeUrl})})}connect(t){this.closeGateways();const r=new bD;let i="",a=this.standardUniversalLink;return Array.isArray(this.walletConnectionSource)?(this.pendingGateways=this.walletConnectionSource.map(o=>{const s=new H_(this.storage,o.bridgeUrl,r.sessionId,()=>{},l=>{console.error(l)});return s.setListener(l=>this.pendingGatewaysListener(s,o.bridgeUrl,l)),s}),this.pendingGateways.forEach(o=>o.registerSession())):(i=this.walletConnectionSource.bridgeUrl,this.walletConnectionSource.universalLink&&(a=this.walletConnectionSource.universalLink),this.gateway=new H_(this.storage,this.walletConnectionSource.bridgeUrl,r.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),this.gateway.registerSession()),this.session={sessionCrypto:r,bridgeUrl:i},this.generateUniversalLink(a,t)}restoreConnection(){return Ai(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource))throw new co("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");this.closeGateways();const t=yield this.connectionStorage.getHttpConnection();!t||(this.session=t.session,this.gateway=new H_(this.storage,this.walletConnectionSource.bridgeUrl,t.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession(),this.listeners.forEach(r=>r(t.connectEvent)))})}sendRequest(t,r){return new Promise((i,a)=>Ai(this,void 0,void 0,function*(){if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new co("Trying to send bridge request without session");const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Xs("Send http-bridge request:",Object.assign(Object.assign({},t),{id:o}));const s=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{id:o})),T1(this.session.walletPublicKey));this.gateway.send(s,this.session.walletPublicKey,t.method).catch(a),this.pendingRequests.set(o.toString(),i),r?.()}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(){return Ai(this,void 0,void 0,function*(){return new Promise(t=>Ai(this,void 0,void 0,function*(){let r=!1;const i=()=>{r=!0,this.removeBridgeAndSession().then(t)};try{yield this.sendRequest({method:"disconnect",params:[]},i)}catch(a){console.debug(a),r||this.removeBridgeAndSession().then(t)}}))})}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(r=>r!==t)}pause(){var t;(t=this.gateway)===null||t===void 0||t.pause(),this.pendingGateways.forEach(r=>r.pause())}unPause(){return Ai(this,void 0,void 0,function*(){const t=this.pendingGateways.map(r=>r.unPause());this.gateway&&t.push(this.gateway.unPause()),yield Promise.all(t)})}pendingGatewaysListener(t,r,i){return Ai(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(t)){t.close();return}return this.closeGateways({except:t}),this.session.bridgeUrl=r,this.gateway=t,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(i)})}gatewayListener(t){return Ai(this,void 0,void 0,function*(){const r=JSON.parse(this.session.sessionCrypto.decrypt(E6.decode(t.message).toUint8Array(),T1(t.from)));if(Xs("Wallet message received:",r),!("event"in r)){const a=r.id.toString(),o=this.pendingRequests.get(a);if(!o){Xs(`Response id ${a} doesn't match any request's id`);return}o(r),this.pendingRequests.delete(a);return}if(r.id!==void 0){const a=yield this.connectionStorage.getLastWalletEventId();if(a!==void 0&&r.id<=a){Dv(`Received event id (=${r.id}) must be greater than stored last wallet event id (=${a}) `);return}r.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(r.id))}const i=this.listeners;r.event==="connect"&&(yield this.updateSession(r,t.from)),r.event==="disconnect"&&(yield this.removeBridgeAndSession()),i.forEach(a=>a(r))})}gatewayErrorsListener(t){return Ai(this,void 0,void 0,function*(){throw new co(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,r){return Ai(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:r});const i=t.payload.items.find(o=>o.name==="ton_addr"),a=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[i]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:a,nextRpcRequestId:0})})}removeBridgeAndSession(){return Ai(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,r){const i=new URL(t);return i.searchParams.append("v",wD.toString()),i.searchParams.append("id",this.session.sessionCrypto.sessionId),i.searchParams.append("r",JSON.stringify(r)),i.toString()}closeGateways(t){var r;(r=this.gateway)===null||r===void 0||r.close(),this.pendingGateways.filter(i=>i!==t?.except).forEach(i=>i.close()),this.pendingGateways=[]}}function eR(e,t){return xD(e,[t])}function xD(e,t){return!e||typeof e!="object"?!1:t.every(r=>r in e)}function dfe(e){try{return!eR(e,"tonconnect")||!eR(e.tonconnect,"walletInfo")?!1:xD(e.tonconnect.walletInfo,["name","image","about_url"])}catch{return!1}}function P6(){if(!(typeof window>"u"))return window}function ffe(){if(!(typeof document>"u"))return document}function pfe(){var e;const t=(e=P6())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}class hs{constructor(t,r){this.injectedWalletKey=r,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const i=hs.window;if(!hs.isWindowContainsWallet(i,r))throw new T6;this.connectionStorage=new c0(t),this.injectedWallet=i[r].tonconnect}static fromStorage(t){return Ai(this,void 0,void 0,function*(){const i=yield new c0(t).getInjectedConnection();return new hs(t,i.jsBridgeKey)})}static isWalletInjected(t){return hs.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return hs.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Object.entries(this.window).filter(([r,i])=>dfe(i)).map(([r,i])=>({name:i.tonconnect.walletInfo.name,aboutUrl:i.tonconnect.walletInfo.about_url,imageUrl:i.tonconnect.walletInfo.image,tondns:i.tonconnect.walletInfo.tondns,jsBridgeKey:r,injected:!0,embedded:i.tonconnect.isWalletBrowser})):[]}static isWindowContainsWallet(t,r){return!!t&&r in t&&typeof t[r]=="object"&&"tonconnect"in t[r]}connect(t){this._connect(wD,t)}restoreConnection(){return Ai(this,void 0,void 0,function*(){try{Xs("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();Xs("Injected Provider restoring connection response",t),t.event==="connect"?(this.makeSubscriptions(),this.listeners.forEach(r=>r(t))):yield this.connectionStorage.removeConnection()}catch(t){yield this.connectionStorage.removeConnection(),console.error(t)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return Ai(this,void 0,void 0,function*(){return new Promise(t=>{const r=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(t)};try{this.injectedWallet.disconnect(),r()}catch(i){Xs(i),this.sendRequest({method:"disconnect",params:[]},r)}})})}closeAllListeners(){var t;this.listenSubscriptions=!1,this.listeners=[],(t=this.unsubscribeCallback)===null||t===void 0||t.call(this)}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(r=>r!==t)}sendRequest(t,r){return Ai(this,void 0,void 0,function*(){const i=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Xs("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:i}));const a=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:i}));return a.then(o=>Xs("Wallet message received:",o)),r?.(),a})}_connect(t,r){return Ai(this,void 0,void 0,function*(){try{Xs(`Injected Provider connect request: protocolVersion: ${t}, message:`,r);const i=yield this.injectedWallet.connect(t,r);Xs("Injected Provider connect response:",i),i.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(a=>a(i))}catch(i){Xs(i);const a={event:"connect_error",payload:{code:0,message:i?.toString()}};this.listeners.forEach(o=>o(a))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{Xs("Wallet message received:",t),this.listenSubscriptions&&this.listeners.forEach(r=>r(t)),t.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}hs.window=P6();class hfe{constructor(){const t=P6();if(!t?.localStorage)throw new I6;this.window=t}getItem(t){return Ai(this,void 0,void 0,function*(){return Promise.resolve(this.window.localStorage.getItem(t))})}removeItem(t){return Ai(this,void 0,void 0,function*(){return this.window.localStorage.removeItem(t),Promise.resolve()})}setItem(t,r){return this.window.localStorage.setItem(t,r),Promise.resolve()}}function M2(e){return gfe(e)&&e.injected}function _D(e){return M2(e)&&e.embedded}function gfe(e){return"jsBridgeKey"in e}function M6(e){return"bridgeUrl"in e}const mfe=[{name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}]},{name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}]},{name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",bridge:[{type:"js",key:"mytonwallet"}]}];class eS{constructor(t){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets.json",t?.walletsListSource&&(this.walletsListSource=t.walletsListSource),t?.cacheTTLMs&&(this.cacheTTLMs=t.cacheTTLMs)}getWallets(){return Ai(this,void 0,void 0,function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then(()=>{this.walletsListCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null})),this.walletsListCache})}getEmbeddedWallet(){return Ai(this,void 0,void 0,function*(){const r=(yield this.getWallets()).filter(_D);return r.length!==1?null:r[0]})}fetchWalletsList(){return Ai(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new R6("Wrong wallets list format, wallets list must be an array.");const a=t.filter(o=>!this.isCorrectWalletConfigDTO(o));a.length&&(Dv(`Wallet(s) ${a.map(o=>o.name).join(", ")} config format is wrong. They were removed from the wallets list.`),t=t.filter(o=>this.isCorrectWalletConfigDTO(o)))}catch(i){Dv(i),t=mfe}let r=[];try{r=hs.getCurrentlyInjectedWallets()}catch(i){Dv(i)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),r)})}walletConfigDTOListToWalletConfigList(t){return t.map(r=>{const i={name:r.name,imageUrl:r.image,aboutUrl:r.about_url,tondns:r.tondns};return r.bridge.forEach(a=>{if(a.type==="sse"&&(i.bridgeUrl=a.url,i.universalLink=r.universal_url,i.deepLink=r.deepLink),a.type==="js"){const o=a.key;i.jsBridgeKey=o,i.injected=hs.isWalletInjected(o),i.embedded=hs.isInsideWalletBrowser(o)}}),i})}mergeWalletsLists(t,r){return[...new Set(t.concat(r).map(a=>a.name)).values()].map(a=>{const o=t.find(l=>l.name===a),s=r.find(l=>l.name===a);return Object.assign(Object.assign({},o&&Object.assign({},o)),s&&Object.assign({},s))})}isCorrectWalletConfigDTO(t){if(!t||typeof t!="object")return!1;const r="name"in t,i="image"in t,a="about_url"in t;if(!r||!i||!a||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const o=t.bridge;if(o.some(u=>!u||typeof u!="object"||!("type"in u)))return!1;const s=o.find(u=>u.type==="sse");if(s&&(!("url"in s)||!s.url||!t.universal_url))return!1;const l=o.find(u=>u.type==="js");return!(l&&(!("key"in l)||!l.key))}}class M1 extends co{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,M1.prototype)}}function yfe(e,t){const r=e.includes("SendTransaction"),i=e.find(a=>a&&typeof a=="object"&&a.name==="SendTransaction");if(!r&&!i)throw new M1("Wallet doesn't support SendTransaction feature.");if(i&&i.maxMessages!==void 0){if(i.maxMessagesr(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(t,r){return this.statusChangeSubscriptions.push(t),r&&this.statusChangeErrorSubscriptions.push(r),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(i=>i!==t),r&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(i=>i!==r))}}connect(t,r){var i;if(this.connected)throw new A6;return(i=this.provider)===null||i===void 0||i.closeConnection(),this.provider=this.createProvider(t),this.provider.connect(this.createConnectRequest(r))}restoreConnection(){return Ai(this,void 0,void 0,function*(){const[t,r]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);try{switch(t){case"http":this.provider=yield P1.fromStorage(this.dappSettings.storage);break;case"injected":this.provider=yield hs.fromStorage(this.dappSettings.storage);break;default:if(r)this.provider=yield this.createProvider(r);else return}}catch{yield this.bridgeConnectionStorage.removeConnection(),this.provider=null;return}return this.provider.listen(this.walletEventsListener.bind(this)),this.provider.restoreConnection()})}sendTransaction(t){return Ai(this,void 0,void 0,function*(){this.checkConnection(),yfe(this.wallet.device.features,{requiredMessagesNumber:t.messages.length});const{validUntil:r}=t,i=rfe(t,["validUntil"]),a=t.from||this.account.address,o=t.network||this.account.chain,s=yield this.provider.sendRequest(rv.convertToRpcRequest(Object.assign(Object.assign({},i),{valid_until:r,from:a,network:o})));return rv.isError(s)?rv.parseAndThrowError(s):rv.convertFromRpcResponse(s)})}disconnect(){return Ai(this,void 0,void 0,function*(){if(!this.connected)throw new I1;yield this.provider.disconnect(),this.onWalletDisconnected()})}pauseConnection(){var t;((t=this.provider)===null||t===void 0?void 0:t.type)==="http"&&this.provider.pause()}unPauseConnection(){var t;return((t=this.provider)===null||t===void 0?void 0:t.type)!=="http"?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const t=ffe();if(!!t)try{t.addEventListener("visibilitychange",()=>{t.hidden?this.pauseConnection():this.unPauseConnection()})}catch(r){console.error("Cannot subscribe to the document.visibilitychange: ",r)}}createProvider(t){let r;return!Array.isArray(t)&&nfe(t)?r=new hs(this.dappSettings.storage,t.jsBridgeKey):r=new P1(this.dappSettings.storage,t),r.listen(this.walletEventsListener.bind(this)),r}walletEventsListener(t){switch(t.event){case"connect":this.onWalletConnected(t.payload);break;case"connect_error":this.onWalletConnectError(t.payload);break;case"disconnect":this.onWalletDisconnected()}}onWalletConnected(t){const r=t.items.find(o=>o.name==="ton_addr"),i=t.items.find(o=>o.name==="ton_proof");if(!r)throw new co("ton_addr connection item was not found");const a={device:t.device,provider:this.provider.type,account:{address:r.address,chain:r.network,walletStateInit:r.walletStateInit,publicKey:r.publicKey}};i&&(a.connectItems={tonProof:i}),this.wallet=a}onWalletConnectError(t){const r=ofe.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(i=>i(r)),console.debug(r),r instanceof T2||r instanceof A2)throw console.error(r),r}onWalletDisconnected(){this.wallet=null}checkConnection(){if(!this.connected)throw new I1}createConnectRequest(t){const r=[{name:"ton_addr"}];return t?.tonProof&&r.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:r}}}zf.walletsList=new eS;zf.isWalletInjected=e=>hs.isWalletInjected(e);zf.isInsideWalletBrowser=e=>hs.isInsideWalletBrowser(e);const vfe=17,bfe=128;function O6(e,t=!1){const{wc:r,hex:i}=wfe(e);let a=vfe;t&&(a|=bfe);const o=new Int8Array(34);o[0]=a,o[1]=r,o.set(i,2);const s=new Uint8Array(36);return s.set(o),s.set(xfe(o),34),E6.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}function wfe(e){if(!e.includes(":"))throw new $p(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new $p(`Wrong address ${e}. Address must include ":" only once.`);const r=parseInt(t[0]);if(r!==0&&r!==-1)throw new $p(`Wrong address ${e}. WC must be eq 0 or -1, but ${r} received.`);const i=t[1];if(i?.length!==64)throw new $p(`Wrong address ${e}. Hex part must be 64bytes length, but ${i?.length} received.`);return{wc:r,hex:_fe(i)}}function xfe(e){let r=0;const i=new Uint8Array(e.length+2);i.set(e);for(let a of i){let o=128;for(;o>0;)r<<=1,a&o&&(r+=1),o>>=1,r>65535&&(r&=65535,r^=4129)}return new Uint8Array([Math.floor(r/256),r%256])}const tS={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),tS[t]=e}function _fe(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new R1("Hex string must have length a multiple of 2: "+e);const r=t/2,i=new Uint8Array(r);for(let a=0;at in e?Lfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qo=(e,t)=>{for(var r in t||(t={}))$fe.call(t,r)&&nS(e,r,t[r]);if(rR)for(var r of rR(t))Ffe.call(t,r)&&nS(e,r,t[r]);return e},pd=(e,t)=>Nfe(e,jfe(t)),Ps=(e,t,r)=>(nS(e,typeof t!="symbol"?t+"":t,r),r),Zs=(e,t,r)=>new Promise((i,a)=>{var o=u=>{try{l(r.next(u))}catch(c){a(c)}},s=u=>{try{l(r.throw(u))}catch(c){a(c)}},l=u=>u.done?i(u.value):Promise.resolve(u.value).then(o,s);l((r=r.apply(e,t)).next())});const Fo={};function zfe(e){Fo.context=e}const Hfe=(e,t)=>e===t,jl=Symbol("solid-proxy"),iS=Symbol("solid-track"),O1={equals:Hfe};let ED=PD;const pc=1,B1=2,kD={owned:null,cleanups:null,context:null,owner:null},W_={};var va=null;let sf=null,Ko=null,Xa=null,Xu=null,B6=0;function Tm(e,t){const r=Ko,i=va,a=e.length===0,o=a?kD:{owned:null,cleanups:null,context:null,owner:t===void 0?i:t},s=a?e:()=>e(()=>ja(()=>D2(o)));va=o,Ko=null;try{return hd(s,!0)}finally{Ko=r,va=i}}function Fi(e,t){t=t?Object.assign({},O1,t):O1;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=a=>(typeof a=="function"&&(a=a(r.value)),RD(r,a));return[ID.bind(r),i]}function U1(e,t,r){const i=U2(e,t,!0,pc);Qh(i)}function na(e,t,r){const i=U2(e,t,!1,pc);Qh(i)}function cl(e,t,r){ED=Xfe;const i=U2(e,t,!1,pc);i.user=!0,Xu?Xu.push(i):Qh(i)}function Ti(e,t,r){r=r?Object.assign({},O1,r):O1;const i=U2(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=r.equals||void 0,Qh(i),ID.bind(i)}function Wfe(e,t,r){let i,a,o;arguments.length===2&&typeof t=="object"||arguments.length===1?(i=!0,a=e,o=t||{}):(i=e,a=t,o=r||{});let s=null,l=W_,u=null,c=!1,d="initialValue"in o,g=typeof i=="function"&&Ti(i);const x=new Set,[w,v]=(o.storage||Fi)(o.initialValue),[y,_]=Fi(void 0),[E,A]=Fi(void 0,{equals:!1}),[B,U]=Fi(d?"ready":"unresolved");if(Fo.context){u=`${Fo.context.id}${Fo.context.count++}`;let z;o.ssrLoadFrom==="initial"?l=o.initialValue:Fo.load&&(z=Fo.load(u))&&(l=z[0])}function L(z,Y,oe,q){return s===z&&(s=null,d=!0,(z===l||Y===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(q,{value:Y})),l=W_,K(Y,oe)),Y}function K(z,Y){hd(()=>{Y===void 0&&v(()=>z),U(Y!==void 0?"errored":"ready"),_(Y);for(const oe of x.keys())oe.decrement();x.clear()},!1)}function V(){const z=Gfe,Y=w(),oe=y();if(oe!==void 0&&!s)throw oe;return Ko&&!Ko.user&&z&&U1(()=>{E(),s&&(z.resolved||x.has(z)||(z.increment(),x.add(z)))}),Y}function H(z=!0){if(z!==!1&&c)return;c=!1;const Y=g?g():i;if(Y==null||Y===!1){L(s,ja(w));return}const oe=l!==W_?l:ja(()=>a(Y,{value:w(),refetching:z}));return typeof oe!="object"||!(oe&&"then"in oe)?(L(s,oe,void 0,Y),oe):(s=oe,c=!0,queueMicrotask(()=>c=!1),hd(()=>{U(d?"refreshing":"pending"),A()},!1),oe.then(q=>L(oe,q,void 0,Y),q=>L(oe,void 0,OD(q),Y)))}return Object.defineProperties(V,{state:{get:()=>B()},error:{get:()=>y()},loading:{get(){const z=B();return z==="pending"||z==="refreshing"}},latest:{get(){if(!d)return V();const z=y();if(z&&!s)throw z;return w()}}}),g?U1(()=>H(!1)):H(!1),[V,{refetch:H,mutate:v}]}function AD(e){return hd(e,!1)}function ja(e){if(Ko===null)return e();const t=Ko;Ko=null;try{return e()}finally{Ko=t}}function Vfe(e,t,r){const i=Array.isArray(e);let a,o=r&&r.defer;return s=>{let l;if(i){l=Array(e.length);for(let c=0;ct(l,a,s));return a=l,u}}function qfe(e){cl(()=>ja(e))}function sc(e){return va===null||(va.cleanups===null?va.cleanups=[e]:va.cleanups.push(e)),e}function TD(){return Ko}function Kfe(){return va}function O2(e,t){const r=Symbol("context");return{id:r,Provider:Zfe(r),defaultValue:e}}function $l(e){let t;return(t=UD(va,e.id))!==void 0?t:e.defaultValue}function B2(e){const t=Ti(e),r=Ti(()=>oS(t()));return r.toArray=()=>{const i=r();return Array.isArray(i)?i:i!=null?[i]:[]},r}let Gfe;function ID(){const e=sf;if(this.sources&&(this.state||e))if(this.state===pc||e)Qh(this);else{const t=Xa;Xa=null,hd(()=>L1(this),!1),Xa=t}if(Ko){const t=this.observers?this.observers.length:0;Ko.sources?(Ko.sources.push(this),Ko.sourceSlots.push(t)):(Ko.sources=[this],Ko.sourceSlots=[t]),this.observers?(this.observers.push(Ko),this.observerSlots.push(Ko.sources.length-1)):(this.observers=[Ko],this.observerSlots=[Ko.sources.length-1])}return this.value}function RD(e,t,r){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&hd(()=>{for(let a=0;a1e6)throw Xa=[],new Error},!1)),t}function Qh(e){if(!e.fn)return;D2(e);const t=va,r=Ko,i=B6;Ko=va=e,Yfe(e,e.value,i),Ko=r,va=t}function Yfe(e,t,r){let i;try{i=e.fn(t)}catch(a){e.pure&&(e.state=pc,e.owned&&e.owned.forEach(D2),e.owned=null),BD(a)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?RD(e,i):e.value=i,e.updatedAt=r)}function U2(e,t,r,i=pc,a){const o={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:va,context:null,pure:r};return va===null||va!==kD&&(va.owned?va.owned.push(o):va.owned=[o]),o}function D1(e){const t=sf;if(e.state===0||t)return;if(e.state===B1||t)return L1(e);if(e.suspense&&ja(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;i--)if(e=r[i],e.state===pc||t)Qh(e);else if(e.state===B1||t){const a=Xa;Xa=null,hd(()=>L1(e,r[0]),!1),Xa=a}}function hd(e,t){if(Xa)return e();let r=!1;t||(Xa=[]),Xu?r=!0:Xu=[],B6++;try{const i=e();return Qfe(r),i}catch(i){r||(Xu=null),Xa=null,BD(i)}}function Qfe(e){if(Xa&&(PD(Xa),Xa=null),e)return;const t=Xu;Xu=null,t.length&&hd(()=>ED(t),!1)}function PD(e){for(let t=0;ta=ja(()=>(va.context={[e]:i.value},B2(()=>i.children))),void 0),a}}const Jfe=Symbol("fallback");function nR(e){for(let t=0;t1?[]:null;return sc(()=>nR(o)),()=>{let u=e()||[],c,d;return u[iS],ja(()=>{let x=u.length,w,v,y,_,E,A,B,U,L;if(x===0)s!==0&&(nR(o),o=[],i=[],a=[],s=0,l&&(l=[])),r.fallback&&(i=[Jfe],a[0]=Tm(K=>(o[0]=K,r.fallback())),s=1);else if(s===0){for(a=new Array(x),d=0;d=A&&U>=A&&i[B]===u[U];B--,U--)y[U]=a[B],_[U]=o[B],l&&(E[U]=l[B]);for(w=new Map,v=new Array(U+1),d=U;d>=A;d--)L=u[d],c=w.get(L),v[d]=c===void 0?-1:c,w.set(L,d);for(c=A;c<=B;c++)L=i[c],d=w.get(L),d!==void 0&&d!==-1?(y[d]=a[c],_[d]=o[c],l&&(E[d]=l[c]),d=v[d],w.set(L,d)):o[c]();for(d=A;de(t||{}))}function nv(){return!0}const aS={get(e,t,r){return t===jl?r:e.get(t)},has(e,t){return t===jl?!0:e.has(t)},set:nv,deleteProperty:nv,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:nv,deleteProperty:nv}},ownKeys(e){return e.keys()}};function V_(e){return(e=typeof e=="function"?e():e)?e:{}}function hu(...e){let t=!1;for(let i=0;i=0;a--){const o=V_(e[a])[i];if(o!==void 0)return o}},has(i){for(let a=e.length-1;a>=0;a--)if(i in V_(e[a]))return!0;return!1},keys(){const i=[];for(let a=0;a=0;i--)if(e[i]){const a=Object.getOwnPropertyDescriptors(e[i]);for(const o in a)o in r||Object.defineProperty(r,o,{enumerable:!0,get(){for(let s=e.length-1;s>=0;s--){const l=(e[s]||{})[o];if(l!==void 0)return l}}})}return r}function U6(e,...t){const r=new Set(t.flat());if(jl in e){const a=t.map(o=>new Proxy({get(s){return o.includes(s)?e[s]:void 0},has(s){return o.includes(s)&&s in e},keys(){return o.filter(s=>s in e)}},aS));return a.push(new Proxy({get(o){return r.has(o)?void 0:e[o]},has(o){return r.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!r.has(o))}},aS)),a}const i=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(i).filter(a=>!r.has(a))),t.map(a=>{const o={};for(let s=0;se.fallback};return Ti(epe(()=>e.each,e.children,t||void 0))}function po(e){let t=!1;const r=e.keyed,i=Ti(()=>e.when,void 0,{equals:(a,o)=>t?a===o:!a==!o});return Ti(()=>{const a=i();if(a){const o=e.children,s=typeof o=="function"&&o.length>0;return t=r||s,s?ja(()=>o(a)):o}return e.fallback},void 0,void 0)}function N2(e){let t=!1,r=!1;const i=(s,l)=>s[0]===l[0]&&(t?s[1]===l[1]:!s[1]==!l[1])&&s[2]===l[2],a=B2(()=>e.children),o=Ti(()=>{let s=a();Array.isArray(s)||(s=[s]);for(let l=0;l{const[s,l,u]=o();if(s<0)return e.fallback;const c=u.children,d=typeof c=="function"&&c.length>0;return t=r||d,d?ja(()=>c(l)):c},void 0,void 0)}function gu(e){return e}const tpe=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],rpe=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...tpe]),npe=new Set(["innerHTML","textContent","innerText","children"]),ipe=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),iR=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),ope=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ape=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),spe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function lpe(e,t,r){let i=r.length,a=t.length,o=i,s=0,l=0,u=t[a-1].nextSibling,c=null;for(;sd-l){const v=t[s];for(;l{a=o,t===document?e():Aa(t,e(),t.firstChild?null:void 0,r)},i.owner),()=>{a(),t.textContent=""}}function la(e,t,r){if(typeof window>"u")return null;const i=document.createElement("template");i.innerHTML=e;let a=i.content.firstChild;return r&&(a=a.firstChild),a}function cpe(e,t=window.document){const r=t[oR]||(t[oR]=new Set);for(let i=0,a=e.length;ia.call(e,r[1],o))}else e.addEventListener(t,r)}function ppe(e,t,r={}){const i=Object.keys(t||{}),a=Object.keys(r);let o,s;for(o=0,s=a.length;oa.children=Ch(e,t.children,a.children)),na(()=>t.ref&&t.ref(e)),na(()=>gpe(e,t,r,!0,a,!0)),a}function N1(e,t,r){return ja(()=>e(t,r))}function Aa(e,t,r,i){if(r!==void 0&&!i&&(i=[]),typeof t!="function")return Ch(e,t,i,r);na(a=>Ch(e,t(),a,r),i)}function gpe(e,t,r,i,a={},o=!1){t||(t={});for(const s in a)if(!(s in t)){if(s==="children")continue;a[s]=sR(e,s,null,a[s],r,o)}for(const s in t){if(s==="children"){i||Ch(e,t.children);continue}const l=t[s];a[s]=sR(e,s,l,a[s],r,o)}}function mpe(e){let t,r;return!Fo.context||!(t=Fo.registry.get(r=bpe()))?e.cloneNode(!0):(Fo.completed&&Fo.completed.add(t),Fo.registry.delete(r),t)}function ype(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function aR(e,t,r){const i=t.trim().split(/\s+/);for(let a=0,o=i.length;a-1&&spe[t.split(":")[0]];c?dpe(e,c,t,r):Uo(e,ipe[t]||t,r)}return r}function vpe(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),Fo.registry&&!Fo.done&&(Fo.done=!0,document.querySelectorAll("[id^=pl-]").forEach(i=>{for(;i&&i.nodeType!==8&&i.nodeValue!=="pl-"+e;){let a=i.nextSibling;i.remove(),i=a}i&&i.remove()}));r;){const i=r[t];if(i&&!r.disabled){const a=r[`${t}Data`];if(a!==void 0?i.call(r,a,e):i.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function Ch(e,t,r,i,a){for(Fo.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,s=i!==void 0;if(e=s&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(Fo.context)return r;if(o==="number"&&(t=t.toString()),s){let l=r[0];l&&l.nodeType===3?l.data=t:l=document.createTextNode(t),r=bp(e,r,i,l)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(Fo.context)return r;r=bp(e,r,i)}else{if(o==="function")return na(()=>{let l=t();for(;typeof l=="function";)l=l();r=Ch(e,l,r,i)}),()=>r;if(Array.isArray(t)){const l=[],u=r&&Array.isArray(r);if(sS(l,t,r,a))return na(()=>r=Ch(e,l,r,i,!0)),()=>r;if(Fo.context){if(!l.length)return r;for(let c=0;c=0;s--){const l=t[s];if(a!==l){const u=l.parentNode===e;!o&&!s?u?e.replaceChild(a,l):e.insertBefore(a,r):u&&l.remove()}else o=!0}}else e.insertBefore(a,r);return[a]}function bpe(){const e=Fo.context;return`${e.id}${e.count++}`}const wpe="http://www.w3.org/2000/svg";function LD(e,t=!1){return t?document.createElementNS(wpe,e):document.createElement(e)}function ND(e){const{useShadow:t}=e,r=document.createTextNode(""),i=e.mount||document.body;function a(){if(Fo.context){const[o,s]=Fi(!1);return queueMicrotask(()=>s(!0)),()=>o()&&e.children}else return()=>e.children}if(i instanceof HTMLHeadElement){const[o,s]=Fi(!1),l=()=>s(!0);Tm(u=>Aa(i,()=>o()?u():a()(),null)),sc(()=>{Fo.context?queueMicrotask(l):l()})}else{const o=LD(e.isSVG?"g":"div",e.isSVG),s=t&&o.attachShadow?o.attachShadow({mode:"open"}):o;Object.defineProperty(o,"_$host",{get(){return r.parentNode},configurable:!0}),Aa(s,a()),i.appendChild(o),e.ref&&e.ref(o),sc(()=>i.removeChild(o))}return r}function L6(e){const[t,r]=U6(e,["component"]),i=Ti(()=>t.component);return Ti(()=>{const a=i();switch(typeof a){case"function":return ja(()=>a(r));case"string":const o=ape.has(a),s=Fo.context?mpe():LD(a,o);return DD(s,r,o),s}})}const[xpe,lS]=Fi(!1),[_pe,Ol]=Fi(null),[Ep,Fp]=Fi(null);let Spe={data:""},Cpe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Spe,Epe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kpe=/\/\*[^]*?\*\/| +/g,uR=/\n+/g,qd=(e,t)=>{let r="",i="",a="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+s+";":i+=o[1]=="f"?qd(s,o):o+"{"+qd(s,o[1]=="k"?"":t)+"}":typeof s=="object"?i+=qd(s,t?t.replace(/([^,])+/g,l=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,l):l?l+" "+u:u)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=qd.p?qd.p(o,s):o+":"+s+";")}return r+(t&&a?t+"{"+a+"}":a)+i},Lu={},jD=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+jD(e[r]);return t}return e},Ape=(e,t,r,i,a)=>{let o=jD(e),s=Lu[o]||(Lu[o]=(u=>{let c=0,d=11;for(;c>>0;return"go"+d})(o));if(!Lu[s]){let u=o!==e?e:(c=>{let d,g,x=[{}];for(;d=Epe.exec(c.replace(kpe,""));)d[4]?x.shift():d[3]?(g=d[3].replace(uR," ").trim(),x.unshift(x[0][g]=x[0][g]||{})):x[0][d[1]]=d[2].replace(uR," ").trim();return x[0]})(e);Lu[s]=qd(a?{["@keyframes "+s]:u}:u,r?"":"."+s)}let l=r&&Lu.g?Lu.g:null;return r&&(Lu.g=Lu[s]),((u,c,d,g)=>{g?c.data=c.data.replace(g,u):c.data.indexOf(u)===-1&&(c.data=d?u+c.data:c.data+u)})(Lu[s],t,i,l),s},Tpe=(e,t,r)=>e.reduce((i,a,o)=>{let s=t[o];if(s&&s.call){let l=s(r),u=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=u?"."+u:l&&typeof l=="object"?l.props?"":qd(l,""):l===!1?"":l}return i+a+(s??"")},"");function lc(e){let t=this||{},r=e.call?e(t.p):e;return Ape(r.unshift?r.raw?Tpe(r,[].slice.call(arguments,1),t.p):r.reduce((i,a)=>Object.assign(i,a&&a.call?a(t.p):a),{}):r,Cpe(t.target),t.g,t.o,t.k)}lc.bind({g:1});let Ipe=lc.bind({k:1});const N6=O2();function Rpe(e){return jt(N6.Provider,{value:e.theme,get children(){return e.children}})}function Ks(){return $l(N6)}function $D(e){let t=this||{};return(...r)=>{const i=a=>{const o=$l(N6),s=hu(a,{theme:o}),l=hu(s,{get class(){const w=s.class,v="class"in s&&/^go[0-9]+/.test(w);let y=lc.apply({target:t.target,o:v,p:s,g:t.g},r);return[w,y].filter(Boolean).join(" ")}}),[u,c]=U6(l,["as","theme"]),d=c,g=u.as||e;let x;return typeof g=="function"?x=g(d):t.g==1?(x=document.createElement(g),DD(x,d)):x=L6(hu({component:g},d)),x};return i.class=a=>ja(()=>lc.apply({target:t.target,p:a,g:t.g},r)),i}}const bn=new Proxy($D,{get(e,t){return e(t)}});function Ppe(){const e=$D.call({g:1},"div").apply(null,arguments);return function(r){return e(r),null}}const Mpe={close:"Close",get:"GET",learnMore:"Learn more",openExtension:"Open Extension",copyLink:"Copy Link",copied:"Copied!",yourWallet:"your wallet"},Ope={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},Bpe={confirm:{header:"Open {{ name }} to\xA0confirm the\xA0transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction\xA0will be\xA0processed in\xA0a\xA0few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},Upe={loading:"Loading wallets",qrCode:"QR Code",wallets:"Wallets",universalQRModal:{scanQR:"Scan the\xA0code below with a camera in your TON wallet.",openWallet:"Open Wallet",openInstalledWallet:"Open Wallet",dontHave:"Explore TON wallets"},desktopSelectWalletModal:{selectWallet:"Select a\xA0wallet to\xA0connect."},mobileSelectWalletModal:{connectWallet:"Connect a\xA0Wallet",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Installed Wallet"},qrCodeModal:{connectWith:"Connect with\xA0{{ name }}",scan:"Scan the\xA0code below.",openWallet:"Open {{ name }}",openExtension:"Open Extension",dontHave:"Don't have {{ name }}?"}},Dpe={confirmTransaction:{header:"Confirm the\xA0transaction in\xA0{{ name }}",text:"It will only take a\xA0moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},Lpe={common:Mpe,button:Ope,notifications:Bpe,walletModal:Upe,actionModal:Dpe},Npe={close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",get:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",learnMore:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435",openExtension:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435",copyLink:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443",copied:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!",yourWallet:"\u0432\u0430\u0448\u0435\u043C \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0435"},jpe={connectWallet:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",dropdown:{copy:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0430\u0434\u0440\u0435\u0441",copied:"\u0410\u0434\u0440\u0435\u0441 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D!",disconnect:"\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A"}},$pe={confirm:{header:"\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 {{ name }}, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044E."},transactionSent:{header:"\u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430",text:"\u0412\u0430\u0448\u0430 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F\xA0\u0431\u0443\u0434\u0435\u0442 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u0430 \u0447\u0435\u0440\u0435\u0437\xA0\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434."},transactionCanceled:{header:"\u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430",text:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043E \u0441\u0447\u0451\u0442\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F."}},Fpe={loading:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u043E\u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F",qrCode:"QR-\u043A\u043E\u0434",wallets:"\u041A\u043E\u0448\u0435\u043B\u044C\u043A\u0438",universalQRModal:{scanQR:"\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u043A\u043E\u0434 \u043D\u0438\u0436\u0435 \u0441\xA0\u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u0430\u043C\u0435\u0440\u044B \u0432 \u0432\u0430\u0448\u0435\u043C TON-\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0435.",openWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",openInstalledWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A",dontHave:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u043E\xA0TON\xA0\u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430\u0445"},desktopSelectWalletModal:{selectWallet:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0434\u043B\u044F\xA0\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F."},mobileSelectWalletModal:{connectWallet:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043A\u043E\u0448\u0435\u043B\u0451\u043A",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A"},qrCodeModal:{connectWith:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F \u0447\u0435\u0440\u0435\u0437\xA0{{ name }}",scan:"\u041E\u0442\u0441\u043A\u0430\u043D\u0438\u0440\u0443\u0439\u0442\u0435 \u043A\u043E\u0434 \u043D\u0438\u0436\u0435.",openWallet:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C {{ name }}",openExtension:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435",dontHave:"\u0423 \u0432\u0430\u0441 \u043D\u0435\u0442 {{ name }}?"}},zpe={confirmTransaction:{header:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\xA0{{ name }}",text:"\u042D\u0442\u043E \u0437\u0430\u0439\u043C\u0435\u0442 \u043F\u0430\u0440\u0443 \u0441\u0435\u043A\u0443\u043D\u0434."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},Hpe={common:Npe,button:jpe,notifications:$pe,walletModal:Fpe,actionModal:zpe},Wpe={en:cR(Lpe),ru:cR(Hpe)};function cR(e){const t="$",r=i=>{Object.entries(i).forEach(([a,o])=>{if(typeof o=="object"&&o)return r(o);if(typeof o=="string"){if(o[0]===t){const s=o.slice(1).split(".");let l=e;s.forEach(u=>{if(u in l)l=l[u];else throw new Error(`Cannot parse translations: there is no property ${u} in translation`)}),i[a]=l}o.slice(0,2)===`\\${t}`&&(i[a]=o.slice(1))}})};return r(e),e}const j2=O2(),uS=Symbol("store-raw"),f0=Symbol("store-node"),Vpe=Symbol("store-name");function FD(e,t){let r=e[jl];if(!r&&(Object.defineProperty(e,jl,{value:r=new Proxy(e,Gpe)}),!Array.isArray(e))){const i=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let o=0,s=i.length;oe[jl][t]),r}function zD(e){if(TD()){const t=j6(e);(t._||(t._=HD()))()}}function Kpe(e){return zD(e),Reflect.ownKeys(e)}function HD(e){const[t,r]=Fi(e,{equals:!1,internal:!0});return t.$=r,t}const Gpe={get(e,t,r){if(t===uS)return e;if(t===jl)return r;if(t===iS)return zD(e),r;const i=j6(e),a=i.hasOwnProperty(t);let o=a?i[t]():e[t];if(t===f0||t==="__proto__")return o;if(!a){const s=Object.getOwnPropertyDescriptor(e,t);TD()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(o=cS(i,t,o)())}return j1(o)?FD(o):o},has(e,t){return t===uS||t===jl||t===iS||t===f0||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Kpe,getOwnPropertyDescriptor:qpe};function $1(e,t,r,i=!1){if(!i&&e[t]===r)return;const a=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let s=j6(e),l;(l=cS(s,t,a))&&l.$(()=>r),Array.isArray(e)&&e.length!==o&&(l=cS(s,"length",o))&&l.$(e.length),(l=s._)&&l.$()}function WD(e,t){const r=Object.keys(t);for(let i=0;i1){i=t.shift();const s=typeof i,l=Array.isArray(e);if(Array.isArray(i)){for(let u=0;u1){um(e[i],t,[i].concat(r));return}a=e[i],r=[i].concat(r)}let o=t[0];typeof o=="function"&&(o=o(a,r),o===a)||i===void 0&&o==null||(o=Eh(o),i===void 0||j1(a)&&j1(o)&&!Array.isArray(o)?WD(a,o):$1(e,i,o))}function $6(...[e,t]){const r=Eh(e||{}),i=Array.isArray(r),a=FD(r);function o(...s){AD(()=>{i&&s.length===1?Ype(r,s[0]):um(r,s)})}return[a,o]}var ta=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(ta||{});const VD={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#31A6F5",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},Qpe={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#E5E5EA",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function dR(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xpe(e){var t,r;return dR(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(dR(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function id(e,t){return e?Dfe(t,e,{arrayMerge:(i,a,o)=>a,isMergeableObject:Xpe}):t}const[Zpe,F6]=$6({theme:ta.LIGHT,colors:VD,borderRadius:"m"}),qD={[ta.LIGHT]:VD,[ta.DARK]:Qpe},ou={[ta.LIGHT]:void 0,[ta.DARK]:void 0};function q_(e,t){t&&(ou[ta.DARK]=id(t[ta.DARK],ou[ta.DARK]),ou[ta.LIGHT]=id(t[ta.LIGHT],ou[ta.LIGHT])),F6({theme:e,colors:id(ou[e],qD[e])})}function Jpe(e){F6({borderRadius:e})}function ehe(e){ou[ta.DARK]=id(e[ta.DARK],ou[ta.DARK]),ou[ta.LIGHT]=id(e[ta.LIGHT],ou[ta.LIGHT]),F6(t=>({colors:id(ou[t.theme],qD[t.theme])}))}const Fu="tc-root",z6="tc-disable-scroll",K_="tc-using-mouse",the=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(K_)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(K_)});const e=Ppe` - ${Fu} * { - margin: 0; - padding: 0; - box-sizing: border-box; - - font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: transparent; - } - - ${Fu} img { - -webkit-user-select: none; - -webkit-touch-callout: none; - } - - ${Fu} *:focus { - outline: #08f auto 2px; - } - - ${Fu} li { - list-style: none; - } - - ${Fu} button { - outline: none; - } - - body.${z6} { - position: fixed; - overflow-y: scroll; - right: 0; - left: 0; - } - - body.${K_} ${Fu} *:focus { - outline: none; - } -`;return jt(e,{})},rhe=bn.div` - background-color: ${e=>e.theme.colors.background.secondary}; -`,H6=e=>{let t;const[r,i]=Fi(null);return cl(()=>{const a=new window.Image;return a.src=e.src,a.alt=e.alt||"",a.setAttribute("draggable","false"),e.class&&a.classList.add(e.class),a.complete?i(a):(a.addEventListener("load",()=>i(a)),()=>a.removeEventListener("load",()=>i(a)))}),[jt(po,{get when(){return r()},get children(){return r()}}),jt(po,{get when(){return!r()},get children(){return jt(rhe,{get class(){return e.class},ref(a){const o=t;typeof o=="function"?o(a):t=a}})}})]};function nhe(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),r=t>>16&255,i=t>>8&255,a=t&255;return[r,i,a].join(",")}function $2(e,t){return e[0]==="#"&&(e=nhe(e)),`rgba(${e}, ${t})`}function mu(e){return e.toString()+"px"}class tu extends co{constructor(...t){super(...t),Object.setPrototypeOf(this,tu.prototype)}}function p0(e,t="_self"){return window.open(e,t,"noreferrer noopener")}function W6(e){p0(e,"_blank")}function ihe(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?ta.LIGHT:ta.DARK}function ohe(e){const t=r=>e(r.matches?ta.DARK:ta.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function ahe(e,t,r){const i=new URL(e);return i.searchParams.append(t,r),i.toString()}function h0(e,t){return ahe(e,"ret",t)}function she(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=mu(-document.documentElement.scrollTop),document.body.classList.add(z6))}function lhe(){document.body.classList.remove(z6),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function uhe(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function che(){customElements.define(Fu,class extends HTMLDivElement{},{extends:"div"})}function dhe(e){e.forEach(t=>{const r=new window.Image;r.src=t})}function KD(){if(typeof localStorage>"u")throw new tu("window.localStorage is undefined. localStorage is required for TonConnectUI")}function GD(){if(typeof window<"u")return window}function fhe(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}const jc={mobile:440,tablet:1020};function zp(e){const t=GD();if(!t)return e==="desktop";const r=t.innerWidth;switch(e){case"desktop":return r>jc.tablet;case"tablet":return r>jc.mobile;default:case"mobile":return r<=jc.mobile}}function hc(e){switch(e){case"mobile":return`@media (max-width: ${jc.mobile}px)`;case"tablet":return`@media (max-width: ${jc.tablet}px) (min-width: ${jc.mobile}px)`;default:case"desktop":return`@media (min-width: ${jc.tablet}px)`}}const F2="@media (hover: none)",z2="@media not all and (hover: none)",phe={m:"100vh",s:"8px",none:"0"},G_={s:.02,m:.04},hhe=bn.button` - background-color: ${e=>e.appearance==="flat"?"transparent":$2(e.theme.colors.accent,.12)}; - color: ${e=>e.theme.colors.accent}; - - padding: ${e=>e.appearance==="flat"?"0":"9px 16px"}; - border: none; - border-radius: ${e=>phe[e.theme.borderRadius]}; - cursor: ${e=>e.disabled?"not-allowed":"pointer"}; - - font-size: 14px; - font-weight: 590; - line-height: 18px; - - transition: transform 0.125s ease-in-out; - - ${z2} { - &:hover { - transform: ${e=>e.disabled?"unset":`scale(${1+G_[e.scale]})`}; - } - } - - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-G_[e.scale]})`}; - } - - ${F2} { - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-G_[e.scale]*2})`}; - } - } -`;function ry(e){const t=ja(()=>Object.keys(e).filter(i=>i.startsWith("data-"))),[r]=U6(e,t);return r}const Au=e=>{const t=ry(e);return jt(hhe,hu({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:r=>{var i;return(i=e.onClick)==null?void 0:i.call(e,r)},onMouseEnter:r=>{var i;return(i=e.onMouseEnter)==null?void 0:i.call(e,r)},onMouseLeave:r=>{var i;return(i=e.onMouseLeave)==null?void 0:i.call(e,r)},ref(r){const i=e.ref;typeof i=="function"?i(r):e.ref=r},get disabled(){return e.disabled},get scale(){return e.scale||"m"},"data-tc-button":"true"},t,{get children(){return e.children}}))};function F1(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const H2=e=>{let t,r=!0;const[i,a]=Fi(),[o,s]=Fi(),l=B2(()=>e.children),{onBeforeEnter:u,onEnter:c,onAfterEnter:d,onBeforeExit:g,onExit:x,onAfterExit:w}=e,v=Ti(()=>{const E=e.name||"s";return{enterActiveClass:e.enterActiveClass||E+"-enter-active",enterClass:e.enterClass||E+"-enter",enterToClass:e.enterToClass||E+"-enter-to",exitActiveClass:e.exitActiveClass||E+"-exit-active",exitClass:e.exitClass||E+"-exit",exitToClass:e.exitToClass||E+"-exit-to"}});function y(E,A){if(!r||e.appear){let B=function(V){E&&(!V||V.target===E)&&(E.removeEventListener("transitionend",B),E.removeEventListener("animationend",B),E.classList.remove(...L),E.classList.remove(...K),AD(()=>{i()!==E&&a(E),o()===E&&s(void 0)}),d&&d(E),e.mode==="inout"&&_(E,A))};const U=v().enterClass.split(" "),L=v().enterActiveClass.split(" "),K=v().enterToClass.split(" ");u&&u(E),E.classList.add(...U),E.classList.add(...L),F1(()=>{E.classList.remove(...U),E.classList.add(...K),c&&c(E,()=>B()),(!c||c.length<2)&&(E.addEventListener("transitionend",B),E.addEventListener("animationend",B))})}A&&!e.mode?s(E):a(E)}function _(E,A){const B=v().exitClass.split(" "),U=v().exitActiveClass.split(" "),L=v().exitToClass.split(" ");if(!A.parentNode)return K();g&&g(A),A.classList.add(...B),A.classList.add(...U),F1(()=>{A.classList.remove(...B),A.classList.add(...L)}),x&&x(A,()=>K()),(!x||x.length<2)&&(A.addEventListener("transitionend",K),A.addEventListener("animationend",K));function K(V){(!V||V.target===A)&&(A.removeEventListener("transitionend",K),A.removeEventListener("animationend",K),A.classList.remove(...U),A.classList.remove(...L),i()===A&&a(void 0),w&&w(A),e.mode==="outin"&&y(E,A))}}return U1(E=>{for(t=l();typeof t=="function";)t=t();return ja(()=>(t&&t!==E&&(e.mode!=="outin"?y(t,E):r&&a(t)),E&&E!==t&&e.mode!=="inout"&&_(t,E),r=!1,t))}),[i,o]};function iv(e){const{top:t,bottom:r,left:i,right:a,width:o,height:s}=e.getBoundingClientRect(),l=e.parentNode.getBoundingClientRect();return{top:t-l.top,bottom:r,left:i-l.left,right:a,width:o,height:s}}const ghe=e=>{const t=B2(()=>e.children),r=Ti(()=>{const w=e.name||"s";return{enterActiveClass:e.enterActiveClass||w+"-enter-active",enterClass:e.enterClass||w+"-enter",enterToClass:e.enterToClass||w+"-enter-to",exitActiveClass:e.exitActiveClass||w+"-exit-active",exitClass:e.exitClass||w+"-exit",exitToClass:e.exitToClass||w+"-exit-to",moveClass:e.moveClass||w+"-move"}}),{onBeforeEnter:i,onEnter:a,onAfterEnter:o,onBeforeExit:s,onExit:l,onAfterExit:u}=e,[c,d]=Fi();let g=[],x=!0;return U1(()=>{const w=t(),v=[...w],y=new Set(w),_=new Set(g),E=r().enterClass.split(" "),A=r().enterActiveClass.split(" "),B=r().enterToClass.split(" "),U=r().exitClass.split(" "),L=r().exitActiveClass.split(" "),K=r().exitToClass.split(" ");for(let V=0;V{H.classList.remove(...E),H.classList.add(...B),a&&a(H,()=>z()),(!a||a.length<2)&&(H.addEventListener("transitionend",z),H.addEventListener("animationend",z))})}}for(let V=0;Voe!==H),d(g))};v.splice(V,0,H),s&&s(H),H.classList.add(...U),H.classList.add(...L),F1(()=>{H.classList.remove(...U),H.classList.add(...K)}),l&&l(H,()=>z()),(!l||l.length<2)&&(H.addEventListener("transitionend",z),H.addEventListener("animationend",z))}}g=v,d(v)}),cl(w=>{const v=c();return v.forEach(y=>{let _;(_=w.get(y))?_.new&&(_.new=!1,_.newPos=iv(y)):w.set(y,_={pos:iv(y),new:!x}),_.new&&y.addEventListener("transitionend",()=>{_.new=!1,y.parentNode&&(_.newPos=iv(y))},{once:!0}),_.newPos&&(_.pos=_.newPos),_.newPos=iv(y)}),x?(x=!1,w):(v.forEach(y=>{const _=w.get(y),E=_.pos,A=_.newPos,B=E.left-A.left,U=E.top-A.top;if(B||U){_.moved=!0;const L=y.style;L.transform=`translate(${B}px,${U}px)`,L.transitionDuration="0s"}}),document.body.offsetHeight,v.forEach(y=>{const _=w.get(y);if(_.moved){let E=function(U){U&&U.target!==y||!y.parentNode||(!U||/transform$/.test(U.propertyName))&&(y.removeEventListener("transitionend",E),y.classList.remove(...B))};_.moved=!1;const A=y.style,B=r().moveClass.split(" ");y.classList.add(...B),A.transform=A.transitionDuration="",y.addEventListener("transitionend",E)}}),w)},new Map),c};function mhe(e,t){const r=i=>{var a;return!e.contains(i.target)&&((a=t())==null?void 0:a())};document.body.addEventListener("click",r),sc(()=>document.body.removeEventListener("click",r))}function yhe(e,t){const r=i=>{var a,o;i.key==="Escape"&&((a=document.activeElement)==null||a.blur(),(o=t())==null||o())};document.body.addEventListener("keydown",r),sc(()=>document.body.removeEventListener("keydown",r))}const vhe=la('',4,!0),bhe={left:0,top:90,right:180,bottom:270},YD=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.secondary,i=()=>e.direction||"left",a=bn("svg")` - transform: rotate(${o=>bhe[o.svgDirection]}deg); - transition: transform 0.1s ease-in-out; - `;return jt(a,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",get svgDirection(){return i()},get children(){const o=vhe.cloneNode(!0);return na(()=>Uo(o,"stroke",r())),o}})},whe=la(''),xhe=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const i=whe.cloneNode(!0),a=i.firstChild;return na(()=>Uo(a,"stroke",r())),i})()},_he=bn.button` - padding: 0; - display: flex; - justify-content: center; - align-items: center; - width: 32px; - height: 32px; - border-radius: 50%; - background-color: ${e=>e.theme.colors.background.secondary}; - border: none; - cursor: pointer; - - transition: transform 0.125s ease-in-out; - - ${z2} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${F2} { - &:active { - transform: scale(0.92); - } - } -`,QD=e=>{const t=ry(e),r=()=>e.icon||"close";return jt(_he,hu({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[jt(po,{get when(){return!!e.children},get children(){return e.children}}),jt(po,{get when(){return!e.children},get children(){return jt(N2,{get children(){return[jt(gu,{get when(){return r()==="close"},get children(){return jt(xhe,{get fill(){return e.fill}})}}),jt(gu,{get when(){return r()==="arrow"},get children(){return jt(YD,{get fill(){return e.fill}})}})]}})}})]}}))},She=bn.div` - display: flex; - align-items: center; - justify-content: center; - position: fixed; - z-index: 1000; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: rgba(0, 0, 0, 0.4); - - ${hc("mobile")} { - align-items: flex-end; - } - - @media (min-width: ${jc.mobile.toString()}px) and (max-height: 600px) { - padding: 48px 0; - align-items: flex-start; - overflow: scroll; - } -`,Che=lc` - position: relative; - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16); - min-height: 100px; - width: 440px; - padding: 44px 56px 24px; - - ${hc("mobile")} { - width: 100%; - } -`,Ehe=bn(QD)` - position: absolute; - right: 16px; - top: 16px; -`,khe=la("
    "),Ahe=mhe,The=yhe,Y_={m:"24px",s:"16px",none:"0"},XD=e=>{const t=Ks(),r=ry(e);return cl(()=>{e.opened?she():lhe()}),jt(H2,{onBeforeEnter:i=>{const a=zp("mobile")?200:100;i.animate([{opacity:0},{opacity:1}],{duration:a}),zp("mobile")&&i.firstElementChild.animate([{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:a})},onExit:(i,a)=>{const o=zp("mobile")?200:100,s=i.animate([{opacity:1},{opacity:0}],{duration:o});if(zp("mobile")){const l=i.firstElementChild.animate([{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:o});Promise.all([s.finished,l.finished]).then(a)}else s.finished.then(a)},get children(){return jt(po,{get when(){return e.opened},get children(){return jt(She,hu({"data-tc-modal":"true"},r,{get children(){const i=khe.cloneNode(!0);return N1(The,i,()=>()=>e.onClose()),N1(Ahe,i,()=>()=>e.onClose()),Aa(i,jt(Ehe,{icon:"close",onClick:()=>e.onClose()}),null),Aa(i,()=>e.children,null),na(()=>D6(i,rS(Che,e.class,lc` - background-color: ${t.colors.background.primary}; - border-radius: ${Y_[t.borderRadius]}; - - ${hc("mobile")} { - border-radius: ${Y_[t.borderRadius]} - ${Y_[t.borderRadius]} 0 0; - } - `))),i}}))}})}})},Ihe={m:"22px",s:"12px",none:"0"},Rhe={m:"18px",s:"8px",none:"0"},Phe=bn.div` - display: grid; - grid-template: 1fr / 1fr 1fr; - width: fit-content; - justify-items: center; - gap: 4px; - - position: relative; - padding: 4px; - border-radius: ${e=>Ihe[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.secondary}; -`,Mhe=bn.div` - position: absolute; - top: 4px; - left: 4px; - - height: calc(100% - 8px); - width: calc(50% - 4px); - - border-radius: ${e=>Rhe[e.theme.borderRadius]}; - background-color: ${e=>e.theme.colors.background.segment}; - - transform: ${e=>e.right?"translateX(100%)":"translateX(0)"}; - - transition: transform 0.13s ease-in-out; -`,fR=bn.input` - display: none; -`,pR=bn.label` - padding: 9px 12px; - z-index: 1; - - cursor: ${e=>e.isActive?"default":"pointer"}; - - transition: transform 0.13s ease-in-out; - - &:hover { - transform: ${e=>e.isActive?"none":"scale(1.025)"}; - } - - > * { - ${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`} - } -`,Ohe=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return jt(Phe,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[jt(Mhe,{get right(){return e.selectedTabIndex===1}}),jt(pR,{get isActive(){return e.selectedTabIndex===0},get children(){return[jt(fR,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,0)}}),Ti(()=>e.tab1)]}}),jt(pR,{get isActive(){return e.selectedTabIndex===1},get children(){return[jt(fR,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,1)}}),Ti(()=>e.tab2)]}})]}})},Bhe={m:"16px",s:"8px",none:"0"},ZD=256,dS=60,hR=48,gR=24,Uhe=bn.div` - display: flex; - align-items: center; - position: relative; - background-color: ${e=>e.theme.colors.background.secondary}; - border-radius: ${e=>Bhe[e.theme.borderRadius]}; - padding: ${mu(gR)} 0; - height: ${mu(ZD+gR*2)}; - width: 100%; - - overflow: hidden; -`,Dhe=bn.div` - position: relative; - - width: fit-content; - margin: 0 auto; - - > div:first-child { - display: flex; - align-items: center; - justify-content: center; - } - - rect { - fill: transparent; - } - - path { - fill: ${e=>e.theme.colors.text.primary}; - } -`,Lhe=bn.div` - position: absolute; - width: ${mu(dS)}; - height: ${mu(dS)}; - background: ${e=>e.theme.colors.background.secondary}; - - display: flex; - align-items: center; - justify-content: center; -`,Nhe=bn(H6)` - width: ${e=>mu(e.size)}; - height: ${e=>mu(e.size)}; - border-radius: 12px; -`,jhe=bn(Au)` - filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); - position: absolute; - bottom: 14px; - left: 50%; - - transform: translate(-50%, 0); - - background-color: ${e=>e.theme.colors.background.segment}; - color: ${e=>e.theme.colors.text.primary}; - - &:hover { - transform: translate(-50%, 0) scale(1.04); - } - - &:active { - transform: translate(-50%, 0) scale(0.96); - } -`;var JD={exports:{}};(function(e,t){var r=function(){var i=function(L,K){var V=236,H=17,z=L,Y=o[K],oe=null,q=0,ae=null,M=[],te={},ue=function(Et,St){q=z*4+17,oe=function(xt){for(var Ut=new Array(xt),Gt=0;Gt=7&&De(Et),ae==null&&(ae=At(z,Y,M)),ir(ae,St)},he=function(Et,St){for(var xt=-1;xt<=7;xt+=1)if(!(Et+xt<=-1||q<=Et+xt))for(var Ut=-1;Ut<=7;Ut+=1)St+Ut<=-1||q<=St+Ut||(0<=xt&&xt<=6&&(Ut==0||Ut==6)||0<=Ut&&Ut<=6&&(xt==0||xt==6)||2<=xt&&xt<=4&&2<=Ut&&Ut<=4?oe[Et+xt][St+Ut]=!0:oe[Et+xt][St+Ut]=!1)},xe=function(){for(var Et=0,St=0,xt=0;xt<8;xt+=1){ue(!0,xt);var Ut=l.getLostPoint(te);(xt==0||Et>Ut)&&(Et=Ut,St=xt)}return St},J=function(){for(var Et=8;Et>xt&1)==1;oe[Math.floor(xt/3)][xt%3+q-8-3]=Ut}for(var xt=0;xt<18;xt+=1){var Ut=!Et&&(St>>xt&1)==1;oe[xt%3+q-8-3][Math.floor(xt/3)]=Ut}},ze=function(Et,St){for(var xt=Y<<3|St,Ut=l.getBCHTypeInfo(xt),Gt=0;Gt<15;Gt+=1){var mr=!Et&&(Ut>>Gt&1)==1;Gt<6?oe[Gt][8]=mr:Gt<8?oe[Gt+1][8]=mr:oe[q-15+Gt][8]=mr}for(var Gt=0;Gt<15;Gt+=1){var mr=!Et&&(Ut>>Gt&1)==1;Gt<8?oe[8][q-Gt-1]=mr:Gt<9?oe[8][15-Gt-1+1]=mr:oe[8][15-Gt-1]=mr}oe[q-8][8]=!Et},ir=function(Et,St){for(var xt=-1,Ut=q-1,Gt=7,mr=0,ne=l.getMaskFunction(St),Pt=q-1;Pt>0;Pt-=2)for(Pt==6&&(Pt-=1);;){for(var Dt=0;Dt<2;Dt+=1)if(oe[Ut][Pt-Dt]==null){var Te=!1;mr>>Gt&1)==1);var Ae=ne(Ut,Pt-Dt);Ae&&(Te=!Te),oe[Ut][Pt-Dt]=Te,Gt-=1,Gt==-1&&(mr+=1,Gt=7)}if(Ut+=xt,Ut<0||q<=Ut){Ut-=xt,xt=-xt;break}}},Rt=function(Et,St){for(var xt=0,Ut=0,Gt=0,mr=new Array(St.length),ne=new Array(St.length),Pt=0;Pt=0?tr.getAt(Ot):0}}for(var br=0,Ae=0;AePt*8)throw"code length overflow. ("+Gt.getLengthInBits()+">"+Pt*8+")";for(Gt.getLengthInBits()+4<=Pt*8&&Gt.put(0,4);Gt.getLengthInBits()%8!=0;)Gt.putBit(!1);for(;!(Gt.getLengthInBits()>=Pt*8||(Gt.put(V,8),Gt.getLengthInBits()>=Pt*8));)Gt.put(H,8);return Rt(Gt,Ut)};te.addData=function(Et,St){St=St||"Byte";var xt=null;switch(St){case"Numeric":xt=x(Et);break;case"Alphanumeric":xt=w(Et);break;case"Byte":xt=v(Et);break;case"Kanji":xt=y(Et);break;default:throw"mode:"+St}M.push(xt),ae=null},te.isDark=function(Et,St){if(Et<0||q<=Et||St<0||q<=St)throw Et+","+St;return oe[Et][St]},te.getModuleCount=function(){return q},te.make=function(){if(z<1){for(var Et=1;Et<40;Et++){for(var St=d.getRSBlocks(Et,Y),xt=g(),Ut=0;Ut"u"?Et*4:St;var xt="";xt+='";for(var Gt=0;Gt';xt+=""}return xt+="",xt+="
    ",xt},te.createSvgTag=function(Et,St,xt,Ut){var Gt={};typeof arguments[0]=="object"&&(Gt=arguments[0],Et=Gt.cellSize,St=Gt.margin,xt=Gt.alt,Ut=Gt.title),Et=Et||2,St=typeof St>"u"?Et*4:St,xt=typeof xt=="string"?{text:xt}:xt||{},xt.text=xt.text||null,xt.id=xt.text?xt.id||"qrcode-description":null,Ut=typeof Ut=="string"?{text:Ut}:Ut||{},Ut.text=Ut.text||null,Ut.id=Ut.text?Ut.id||"qrcode-title":null;var mr=te.getModuleCount()*Et+St*2,ne,Pt,Dt,Te,Ae="",ot;for(ot="l"+Et+",0 0,"+Et+" -"+Et+",0 0,-"+Et+"z ",Ae+=''+Xt(Ut.text)+"":"",Ae+=xt.text?''+Xt(xt.text)+"":"",Ae+='',Ae+='"u"?Et*4:St;var xt=te.getModuleCount()*Et+St*2,Ut=St,Gt=xt-St;return U(xt,xt,function(mr,ne){if(Ut<=mr&&mr"u"?Et*4:St;var Ut=te.getModuleCount()*Et+St*2,Gt="";return Gt+="",Gt};var Xt=function(Et){for(var St="",xt=0;xt":St+=">";break;case"&":St+="&";break;case'"':St+=""";break;default:St+=Ut;break}}return St},vr=function(Et){var St=1;Et=typeof Et>"u"?St*2:Et;var xt=te.getModuleCount()*St+Et*2,Ut=Et,Gt=xt-Et,mr,ne,Pt,Dt,Te,Ae={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},ot={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},$t="";for(mr=0;mr=Gt?ot[Te]:Ae[Te];$t+=` -`}return xt%2&&Et>0?$t.substring(0,$t.length-xt-1)+Array(xt+1).join("\u2580"):$t.substring(0,$t.length-1)};return te.createASCII=function(Et,St){if(Et=Et||1,Et<2)return vr(St);Et-=1,St=typeof St>"u"?Et*2:St;var xt=te.getModuleCount()*Et+St*2,Ut=St,Gt=xt-St,mr,ne,Pt,Dt,Te=Array(Et+1).join("\u2588\u2588"),Ae=Array(Et+1).join(" "),ot="",$t="";for(mr=0;mr>>8),Y.push(ae&255)):Y.push(H)}}return Y}};var a={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},o={L:1,M:0,Q:3,H:2},s={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},l=function(){var L=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],K=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,V=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,H=1<<14|1<<12|1<<10|1<<4|1<<1,z={},Y=function(oe){for(var q=0;oe!=0;)q+=1,oe>>>=1;return q};return z.getBCHTypeInfo=function(oe){for(var q=oe<<10;Y(q)-Y(K)>=0;)q^=K<=0;)q^=V<5&&(ae+=3+ue-5)}for(var M=0;M=256;)z-=255;return L[z]},H}();function c(L,K){if(typeof L.length>"u")throw L.length+"/"+K;var V=function(){for(var z=0;z"u")throw"bad rs block @ typeNumber:"+z+"/errorCorrectionLevel:"+Y;for(var q=oe.length/3,ae=[],M=0;M>>7-H%8&1)==1},V.put=function(H,z){for(var Y=0;Y>>z-Y-1&1)==1)},V.getLengthInBits=function(){return K},V.putBit=function(H){var z=Math.floor(K/8);L.length<=z&&L.push(0),H&&(L[z]|=128>>>K%8),K+=1},V},x=function(L){var K=a.MODE_NUMBER,V=L,H={};H.getMode=function(){return K},H.getLength=function(oe){return V.length},H.write=function(oe){for(var q=V,ae=0;ae+2>>8&255)*192+(ae&255),Y.put(ae,13),q+=2}if(q>>8)},K.writeBytes=function(V,H,z){H=H||0,z=z||V.length;for(var Y=0;Y0&&(V+=","),V+=L[H];return V+="]",V},K},E=function(){var L=0,K=0,V=0,H="",z={},Y=function(q){H+=String.fromCharCode(oe(q&63))},oe=function(q){if(!(q<0)){if(q<26)return 65+q;if(q<52)return 97+(q-26);if(q<62)return 48+(q-52);if(q==62)return 43;if(q==63)return 47}throw"n:"+q};return z.writeByte=function(q){for(L=L<<8|q&255,K+=8,V+=1;K>=6;)Y(L>>>K-6),K-=6},z.flush=function(){if(K>0&&(Y(L<<6-K),L=0,K=0),V%3!=0)for(var q=3-V%3,ae=0;ae=K.length){if(z==0)return-1;throw"unexpected end of file./"+z}var q=K.charAt(V);if(V+=1,q=="=")return z=0,-1;if(q.match(/^\s$/))continue;H=H<<6|oe(q.charCodeAt(0)),z+=6}var ae=H>>>z-8&255;return z-=8,ae};var oe=function(q){if(65<=q&&q<=90)return q-65;if(97<=q&&q<=122)return q-97+26;if(48<=q&&q<=57)return q-48+52;if(q==43)return 62;if(q==47)return 63;throw"c:"+q};return Y},B=function(L,K){var V=L,H=K,z=new Array(L*K),Y={};Y.setPixel=function(M,te,ue){z[te*V+M]=ue},Y.write=function(M){M.writeString("GIF87a"),M.writeShort(V),M.writeShort(H),M.writeByte(128),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(255),M.writeByte(255),M.writeByte(255),M.writeString(","),M.writeShort(0),M.writeShort(0),M.writeShort(V),M.writeShort(H),M.writeByte(0);var te=2,ue=q(te);M.writeByte(te);for(var he=0;ue.length-he>255;)M.writeByte(255),M.writeBytes(ue,he,255),he+=255;M.writeByte(ue.length-he),M.writeBytes(ue,he,ue.length-he),M.writeByte(0),M.writeString(";")};var oe=function(M){var te=M,ue=0,he=0,xe={};return xe.write=function(J,ct){if(J>>>ct!=0)throw"length over";for(;ue+ct>=8;)te.writeByte(255&(J<>>=8-ue,he=0,ue=0;he=J<0&&te.writeByte(he)},xe},q=function(M){for(var te=1<>6,128|u&63):u<55296||u>=57344?s.push(224|u>>12,128|u>>6&63,128|u&63):(l++,u=65536+((u&1023)<<10|o.charCodeAt(l)&1023),s.push(240|u>>18,128|u>>12&63,128|u>>6&63,128|u&63))}return s}return a(i)}})(),function(i){e.exports=i()}(function(){return r})})(JD);const $he=JD.exports;function eL(e){return navigator?.clipboard?navigator.clipboard.writeText(e):(Fhe(e),Promise.resolve())}function Fhe(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}var fS=(e,t,r)=>{const i=t.trim().split(".").reduce((a,o)=>a?a[o]:void 0,e);return i!==void 0?i:r},zhe=(e,t,r=/{{(.*?)}}/g)=>e.replace(r,(i,a)=>fS(t,a,"")),Hhe=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[r,i]=Fi(t),[a,o]=$6(e);return[(u,c,d)=>{const g=fS(a[r()],u,d||"");return typeof g=="function"?g(c):typeof g=="string"?zhe(g,c||{}):g},{add(u,c){o(u,d=>Object.assign(d||{},c))},locale:u=>u?i(u):r(),dict:u=>fS(a,u)}]},tL=O2({}),Ed=()=>$l(tL);const Bl=e=>{const[t]=Ed();return Ti(()=>{var r;return t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString())})},Whe=la("
    "),Q_={translationKey:"common.copyLink",text:"Copy Link"},Vhe={translationKey:"common.copied",text:"Copied!"},rL=e=>{let t,r,i;const[a,o]=Fi(!1),[s,l]=Fi(!1),[u,c]=Fi(!1),[d,g]=Fi(Q_),[x,w]=Fi(hR);cl(()=>o(s()||u())),cl(()=>!a()&&g(Q_)),cl(()=>{const A=$he(0,"L");A.addData(e.sourceUrl),A.make(),t.innerHTML=A.createSvgTag(4,0);const B=t.firstElementChild.clientWidth,U=Math.round(ZD/B*1e5)/1e5;if(i){const L=Math.ceil(dS/(U*4))*4,K=mu(Math.ceil((B-L)/(2*4))*4);i.style.top=K,i.style.left=K,i.style.height=mu(L),i.style.width=mu(L),w(Math.round(hR/U))}r.style.transform=`scale(${U})`});let v=null;const y=()=>{eL(e.sourceUrl),g(Vhe),v!=null&&clearTimeout(v),v=setTimeout(()=>g(Q_),3e3)};return jt(Uhe,{get class(){return e.class},get children(){return[jt(Dhe,{ref(_){const E=r;typeof E=="function"?E(_):r=_},onMouseEnter:()=>c(!0),onMouseLeave:()=>setTimeout(()=>c(!1)),get children(){return[(()=>{const _=Whe.cloneNode(!0),E=t;return typeof E=="function"?N1(E,_):t=_,_})(),jt(po,{get when(){return e.imageUrl},get children(){return jt(Lhe,{ref(_){const E=i;typeof E=="function"?E(_):i=_},get children(){return jt(Nhe,{get src(){return e.imageUrl},alt:"",get size(){return x()}})}})}})]}}),jt(H2,{onBeforeEnter:_=>{_.animate([{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:200})},onExit:(_,E)=>{_.animate([{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:200}).finished.then(()=>{E()})},get children(){return jt(po,{get when(){return a()&&!e.disableCopy},get children(){return jt(jhe,{onClick:y,onMouseEnter:()=>a()&&l(!0),onMouseLeave:()=>setTimeout(()=>l(!1)),get children(){return jt(Bl,{get translationKey(){return d().translationKey},get children(){return d().text}})}})}})}})]}})},qhe=bn.div` - font-style: normal; - font-weight: ${e=>e.fontWeight}; - font-size: ${e=>e.fontSize}; - line-height: ${e=>e.lineHeight}; - - color: ${e=>e.color}; -`,Fl=e=>{const t=Ks(),[r]=Ed();let i;const a=()=>e.color||t.colors.text.primary,o=hu({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return cl(()=>{!i||o.cursor!=="unset"&&getComputedStyle(i).cursor!=="pointer"&&(i.style.cursor="default")}),jt(qhe,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return a()},get class(){return o.class},ref(s){const l=i;typeof l=="function"?l(s):i=s},"data-tc-text":"true",get children(){var s;return Ti(()=>!!o.translationKey)()?r(o.translationKey,o.translationValues,(s=o.children)==null?void 0:s.toString()):o.children}})},Khe=bn.button` - cursor: pointer; - border: none; - background-color: unset; - padding: 12px 8px 8px; - height: 94px; - width: 92px; - display: flex; - flex-direction: column; - align-items: center; - - transition: transform 0.125s ease-in-out; - - ${z2} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${hc("mobile")} { - padding: 8px 4px; - height: 124px; - width: 82px; - } - - ${F2} { - &:active { - transform: scale(0.92); - } - } -`,Ghe=bn(H6)` - width: 48px; - height: 48px; - border-radius: 12px; - - margin-bottom: 8px; - - ${hc("mobile")} { - width: 64px; - height: 64px; - border-radius: 16px; - } -`,Yhe=bn(Fl)` - font-weight: 590; - max-width: 76px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -`,nL=e=>jt(Khe,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[jt(Ghe,{get src(){return e.iconUrl},alt:""}),jt(Yhe,{get children(){return e.name}})]}}),Qhe=bn.h1` - font-style: normal; - font-weight: 700; - font-size: 24px; - line-height: 30px; - - text-align: center; - - color: ${e=>e.theme.colors.text.primary}; - - margin-top: 0; - margin-bottom: 6px; - - cursor: default; -`,W2=e=>{const[t]=Ed();return jt(Qhe,{get class(){return e.class},"data-tc-h1":"true",get children(){var r;return Ti(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},Xhe=bn.h2` - font-style: normal; - font-weight: 510; - font-size: 16px; - line-height: 20px; - - text-align: center; - - color: ${e=>e.theme.colors.text.secondary}; - - margin-top: 0; - margin-bottom: 32px; - - cursor: default; -`,V2=e=>{const[t]=Ed();return jt(Xhe,{get class(){return e.class},"data-tc-h2":"true",get children(){var r;return Ti(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},Zhe=bn.h3` - font-style: normal; - font-weight: 590; - font-size: 15px; - line-height: 20px; - - color: ${e=>e.theme.colors.text.primary}; - - margin-top: 0; - margin-bottom: 0; - - cursor: default; -`,Jhe=e=>{const[t]=Ed();return jt(Zhe,{"data-tc-h3":"true",get children(){var r;return Ti(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},ege=la(''),tge=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const i=ege.cloneNode(!0),a=i.firstChild;return na(()=>Uo(a,"stroke",r())),i})()},rge=la(''),nge=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=rge.cloneNode(!0),a=i.firstChild;return na(()=>Uo(a,"fill",r())),i})()},ige=la(''),oge=la(''),iL=e=>{const t=Ks(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.success;return Ti((()=>{const a=Ti(()=>r()==="s");return()=>a()?(()=>{const o=ige.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return na(u=>{const c=e.class,d=i(),g=t.colors.constant.white;return c!==u._v$&&Uo(o,"class",u._v$=c),d!==u._v$2&&Uo(s,"fill",u._v$2=d),g!==u._v$3&&Uo(l,"fill",u._v$3=g),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=oge.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return na(u=>{const c=e.class,d=i(),g=t.colors.constant.white;return c!==u._v$4&&Uo(o,"class",u._v$4=c),d!==u._v$5&&Uo(s,"fill",u._v$5=d),g!==u._v$6&&Uo(l,"fill",u._v$6=g),u},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()})())},age=la(''),sge=la(''),oL=e=>{const t=Ks(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.error;return Ti((()=>{const a=Ti(()=>r()==="s");return()=>a()?(()=>{const o=age.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return na(u=>{const c=e.class,d=i(),g=t.colors.constant.white;return c!==u._v$&&Uo(o,"class",u._v$=c),d!==u._v$2&&Uo(s,"fill",u._v$2=d),g!==u._v$3&&Uo(l,"fill",u._v$3=g),u},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=sge.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return na(u=>{const c=e.class,d=i(),g=t.colors.constant.white;return c!==u._v$4&&Uo(o,"class",u._v$4=c),d!==u._v$5&&Uo(s,"fill",u._v$5=d),g!==u._v$6&&Uo(l,"fill",u._v$6=g),u},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()})())},lge=la(''),uge=la(''),q2=e=>{const t=Ks(),r=()=>e.size||"s",i=()=>e.fill||t.colors.icon.tertiary,a=Ipe` - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - `,o=lc` - animation: ${a} 1s linear infinite; - `;return Ti((()=>{const s=Ti(()=>r()==="s");return()=>s()?(()=>{const l=lge.cloneNode(!0),u=l.firstChild;return na(c=>{const d=rS(o,e.class),g=i();return d!==c._v$&&Uo(l,"class",c._v$=d),g!==c._v$2&&Uo(u,"fill",c._v$2=g),c},{_v$:void 0,_v$2:void 0}),l})():(()=>{const l=uge.cloneNode(!0),u=l.firstChild;return na(c=>{const d=rS(o,e.class),g=i();return d!==c._v$3&&Uo(l,"class",c._v$3=d),g!==c._v$4&&Uo(u,"stroke",c._v$4=g),c},{_v$3:void 0,_v$4:void 0}),l})()})())},Xh=O2(),cge=la(''),dge=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=cge.cloneNode(!0),a=i.firstChild;return na(()=>Uo(a,"fill",r())),i})()},fge=la(''),pge=e=>{const t=Ks(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const i=fge.cloneNode(!0),a=i.firstChild,o=a.nextSibling;return na(s=>{const l=r(),u=r();return l!==s._v$&&Uo(a,"fill",s._v$=l),u!==s._v$2&&Uo(o,"fill",s._v$2=u),s},{_v$:void 0,_v$2:void 0}),i})()},hge={m:"8px",s:"4px",none:"0"},gge={m:"16px",s:"8px",none:"0"},mge=bn.div` - width: 256px; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>gge[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.primary} - - color: ${e=>e.theme.colors.text.primary} -`,yge=bn.ul` - background-color: ${e=>e.theme.colors.background.primary}; - padding: 8px; -`,mR=bn.button` - display: flex; - align-items: center; - gap: 8px; - height: 40px; - padding-left: 8px; - width: 100%; - - background-color: ${e=>e.theme.colors.background.primary}; - border: none; - border-radius: ${e=>hge[e.theme.borderRadius]}; - cursor: pointer; - - transition: background-color, transform 0.1s ease-in-out; - - &:hover { - background-color: ${e=>e.theme.colors.background.secondary}; - } - - &:active { - transform: scale(0.96); - } -`,yR=la("
  • "),X_=e=>jt(Fl,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),vge=e=>{const t=$l(Xh),[r,i]=Fi(!1),a=()=>Zs(void 0,null,function*(){const s=O6(t.account.address,t.account.chain===u0.TESTNET);yield eL(s),i(!0),setTimeout(()=>i(!1),1e3)}),o=()=>{t.disconnect(),e.onClose()};return jt(mge,{ref(s){const l=e.ref;typeof l=="function"?l(s):e.ref=s},get class(){return e.class},"data-tc-dropdown":"true",get children(){return jt(yge,{get children(){return[(()=>{const s=yR.cloneNode(!0);return Aa(s,jt(mR,{onClick:()=>a(),get children(){return[jt(dge,{}),jt(po,{get when(){return!r()},get children(){return jt(X_,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),jt(po,{get when(){return r()},get children(){return jt(X_,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),s})(),(()=>{const s=yR.cloneNode(!0);return Aa(s,jt(mR,{onClick:()=>o(),get children(){return[jt(pge,{}),jt(X_,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),s})()]}})}})},bge={m:"16px",s:"8px",none:"0"},wge=bn.div` - width: 256px; - padding: 12px 16px; - display: flex; - gap: 9px; - - background-color: ${e=>e.theme.colors.background.primary}; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>bge[e.theme.borderRadius]}; -`,xge=bn.div` - width: 192px; -`,_ge=bn(Fl)` - margin-top: 4px; - color: ${e=>e.theme.colors.text.secondary}; -`,V6=e=>{const t=ry(e);return jt(wge,hu({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[jt(xge,{get children(){return[jt(Jhe,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),jt(po,{get when(){return e.text},get children(){return jt(_ge,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),Ti(()=>e.icon)]}}))},Sge=bn(q2)` - align-self: center; -`,Cge=e=>{var t;const r=$l(Xh),[i]=Ed(),a=((t=r.wallet)==null?void 0:t.name)||i("common.yourWallet",{},"your wallet");return jt(V6,{header:{translationKey:"notifications.confirm.header",translationValues:{name:a}},get class(){return e.class},get icon(){return jt(Sge,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Ege=bn(oL)` - margin-top: 2px; -`,kge=e=>jt(V6,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return jt(Ege,{})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),Age=bn(iL)` - margin-top: 2px; -`,Tge=e=>jt(V6,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return jt(Age,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),Z_=lc` - transform: translateY(-8px); - margin-bottom: 12px; -`,Ige=la('
    '),Rge=e=>{const t=[],[r,i]=Fi([]);let a=-1;const o=4500;return cl(Vfe(Ep,s=>{if(s&&s.showNotification){a++;const l=a;i(u=>u.filter(c=>c.action!=="confirm-transaction").concat({id:l,action:s.name})),t.push(setTimeout(()=>i(u=>u.filter(c=>c.id!==l)),o))}})),sc(()=>{t.forEach(clearTimeout)}),(()=>{const s=Ige.cloneNode(!0);return Aa(s,jt(ghe,{onBeforeEnter:l=>{l.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(l,u)=>{l.animate([{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(u)},get children(){return jt(L2,{get each(){return r()},children:l=>jt(N2,{get children(){return[jt(gu,{get when(){return l.action==="transaction-sent"},get children(){return jt(Tge,{class:Z_})}}),jt(gu,{get when(){return l.action==="transaction-canceled"},get children(){return jt(kge,{class:Z_})}}),jt(gu,{get when(){return l.action==="confirm-transaction"},get children(){return jt(Cge,{class:Z_})}})]}})})}})),na(()=>D6(s,e.class)),s})()},aL=bn(Au)` - background-color: ${e=>e.theme.colors.connectButton.background}; - color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${$2(e.theme.colors.constant.black,.16)}`}; - padding: 8px 16px 8px 12px; - - display: flex; - align-items: center; - gap: 4px; - height: 40px; -`,Pge=bn(aL)` - padding: 12px 16px; - min-width: 148px; - justify-content: center; - background-color: ${e=>e.theme.colors.background.primary}; -`,Mge=bn(Au)` - min-width: 148px; - height: 40px; - - background-color: ${e=>e.theme.colors.background.primary}; - color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${$2(e.theme.colors.constant.black,.16)}`}; - - display: flex; - align-items: center; - justify-content: center; -`,Oge=bn(q2)` - height: 18px; - width: 18px; -`,Bge=bn.div` - width: fit-content; - display: flex; - flex-direction: column; - align-items: flex-end; -`,Uge=bn(vge)` - box-sizing: border-box; - overflow: hidden; - margin-top: 12px; -`,Dge=bn(Rge)` - > div:first-child { - margin-top: 20px; - } -`;function sL(e){return e.split("-")[0]}function Lge(e){return e.split("-")[1]}function Nge(e){return["top","bottom"].includes(sL(e))?"x":"y"}function jge(e){return e==="y"?"height":"width"}function vR(e,t,r){let{reference:i,floating:a}=e;const o=i.x+i.width/2-a.width/2,s=i.y+i.height/2-a.height/2,l=Nge(t),u=jge(l),c=i[u]/2-a[u]/2,d=sL(t),g=l==="x";let x;switch(d){case"top":x={x:o,y:i.y-a.height};break;case"bottom":x={x:o,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:s};break;case"left":x={x:i.x-a.width,y:s};break;default:x={x:i.x,y:i.y}}switch(Lge(t)){case"start":x[l]-=c*(r&&g?-1:1);break;case"end":x[l]+=c*(r&&g?-1:1);break}return x}const $ge=(e,t,r)=>Zs(void 0,null,function*(){const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:s}=r,l=o.filter(Boolean),u=yield s.isRTL==null?void 0:s.isRTL(t);if({}.NODE_ENV!=="production"){if(s==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),l.filter(y=>{let{name:_}=y;return _==="autoPlacement"||_==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));(!e||!t)&&console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:g}=vR(c,i,u),x=i,w={},v=0;for(let y=0;y50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),L&&v<=50){v++,typeof L=="object"&&(L.placement&&(x=L.placement),L.rects&&(c=L.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:a}):L.rects),{x:d,y:g}=vR(c,x,u)),y=-1;continue}}return{x:d,y:g,placement:x,strategy:a,middlewareData:w}});function bR(e){return pd(qo({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function gc(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _u(e){return gc(e).getComputedStyle(e)}function gd(e){return uL(e)?(e.nodeName||"").toLowerCase():""}let ov;function lL(){if(ov)return ov;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(ov=e.brands.map(t=>t.brand+"/"+t.version).join(" "),ov):navigator.userAgent}function Su(e){return e instanceof gc(e).HTMLElement}function dl(e){return e instanceof gc(e).Element}function uL(e){return e instanceof gc(e).Node}function wR(e){if(typeof ShadowRoot>"u")return!1;const t=gc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function K2(e){const{overflow:t,overflowX:r,overflowY:i,display:a}=_u(e);return/auto|scroll|overlay|hidden/.test(t+i+r)&&!["inline","contents"].includes(a)}function Fge(e){return["table","td","th"].includes(gd(e))}function q6(e){const t=/firefox/i.test(lL()),r=_u(e),i=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||(i?i!=="none":!1)||t&&r.willChange==="filter"||t&&(r.filter?r.filter!=="none":!1)||["transform","perspective"].some(a=>r.willChange.includes(a))||["paint","layout","strict","content"].some(a=>{const o=r.contain;return o!=null?o.includes(a):!1})}function cL(){return!/^((?!chrome|android).)*safari/i.test(lL())}function K6(e){return["html","body","#document"].includes(gd(e))}const xR=Math.min,Im=Math.max,_R=Math.round,pS={x:1,y:1};function g0(e){const t=!dl(e)&&e.contextElement?e.contextElement:dl(e)?e:null;if(!t)return pS;const r=t.getBoundingClientRect(),i=_u(t);if(i.boxSizing!=="border-box")return Su(t)?{x:t.offsetWidth>0&&_R(r.width)/t.offsetWidth||1,y:t.offsetHeight>0&&_R(r.height)/t.offsetHeight||1}:pS;let a=r.width/parseFloat(i.width),o=r.height/parseFloat(i.height);return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function md(e,t,r,i){var a,o,s,l;t===void 0&&(t=!1),r===void 0&&(r=!1);const u=e.getBoundingClientRect();let c=pS;t&&(i?dl(i)&&(c=g0(i)):c=g0(e));const d=dl(e)?gc(e):window,g=!cL()&&r,x=(u.left+(g&&(a=(o=d.visualViewport)==null?void 0:o.offsetLeft)!=null?a:0))/c.x,w=(u.top+(g&&(s=(l=d.visualViewport)==null?void 0:l.offsetTop)!=null?s:0))/c.y,v=u.width/c.x,y=u.height/c.y;return{width:v,height:y,top:w,right:x+v,bottom:w+y,left:x,x,y:w}}function kd(e){return((uL(e)?e.ownerDocument:e.document)||window.document).documentElement}function G2(e){return dl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dL(e){return md(kd(e)).left+G2(e).scrollLeft}function zge(e,t,r){const i=Su(t),a=kd(t),o=md(e,!0,r==="fixed",t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(i||!i&&r!=="fixed")if((gd(t)!=="body"||K2(a))&&(s=G2(t)),Su(t)){const u=md(t,!0);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else a&&(l.x=dL(a));return{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function m0(e){if(gd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(wR(e)?e.host:null)||kd(e);return wR(t)?t.host:t}function SR(e){return!Su(e)||_u(e).position==="fixed"?null:e.offsetParent}function Hge(e){let t=m0(e);for(;Su(t)&&!K6(t);){if(q6(t))return t;t=m0(t)}return null}function CR(e){const t=gc(e);let r=SR(e);for(;r&&Fge(r)&&_u(r).position==="static";)r=SR(r);return r&&(gd(r)==="html"||gd(r)==="body"&&_u(r).position==="static"&&!q6(r))?t:r||Hge(e)||t}function Wge(e){if(Su(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=md(e);return{width:t.width,height:t.height}}function Vge(e){let{rect:t,offsetParent:r,strategy:i}=e;const a=Su(r),o=kd(r);if(r===o)return t;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((a||!a&&i!=="fixed")&&((gd(r)!=="body"||K2(o))&&(s=G2(r)),Su(r))){const c=md(r);l=g0(r),u.x=c.x+r.clientLeft,u.y=c.y+r.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-s.scrollLeft*l.x+u.x,y:t.y*l.y-s.scrollTop*l.y+u.y}}function qge(e,t){const r=gc(e),i=kd(e),a=r.visualViewport;let o=i.clientWidth,s=i.clientHeight,l=0,u=0;if(a){o=a.width,s=a.height;const c=cL();(c||!c&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}return{width:o,height:s,x:l,y:u}}function Kge(e){var t;const r=kd(e),i=G2(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=Im(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=Im(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let l=-i.scrollLeft+dL(e);const u=-i.scrollTop;return _u(a||r).direction==="rtl"&&(l+=Im(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:s,x:l,y:u}}function fL(e){const t=m0(e);return K6(t)?e.ownerDocument.body:Su(t)&&K2(t)?t:fL(t)}function Rm(e,t){var r;t===void 0&&(t=[]);const i=fL(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=gc(i);return a?t.concat(o,o.visualViewport||[],K2(i)?i:[]):t.concat(i,Rm(i))}function Gge(e,t){const r=md(e,!0,t==="fixed"),i=r.top+e.clientTop,a=r.left+e.clientLeft,o=Su(e)?g0(e):{x:1,y:1},s=e.clientWidth*o.x,l=e.clientHeight*o.y,u=a*o.x,c=i*o.y;return{top:c,left:u,right:u+s,bottom:c+l,x:u,y:c,width:s,height:l}}function ER(e,t,r){return t==="viewport"?bR(qge(e,r)):dl(t)?Gge(t,r):bR(Kge(kd(e)))}function Yge(e,t){const r=t.get(e);if(r)return r;let i=Rm(e).filter(l=>dl(l)&&gd(l)!=="body"),a=null;const o=_u(e).position==="fixed";let s=o?m0(e):e;for(;dl(s)&&!K6(s);){const l=_u(s),u=q6(s);(o?!u&&!a:!u&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position))?i=i.filter(d=>d!==s):a=l,s=m0(s)}return t.set(e,i),i}function Qge(e){let{element:t,boundary:r,rootBoundary:i,strategy:a}=e;const s=[...r==="clippingAncestors"?Yge(t,this._c):[].concat(r),i],l=s[0],u=s.reduce((c,d)=>{const g=ER(t,d,a);return c.top=Im(g.top,c.top),c.right=xR(g.right,c.right),c.bottom=xR(g.bottom,c.bottom),c.left=Im(g.left,c.left),c},ER(t,l,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const Xge={getClippingRect:Qge,convertOffsetParentRelativeRectToViewportRelativeRect:Vge,isElement:dl,getDimensions:Wge,getOffsetParent:CR,getDocumentElement:kd,getScale:g0,getElementRects(e){return Zs(this,null,function*(){let{reference:t,floating:r,strategy:i}=e;const a=this.getOffsetParent||CR,o=this.getDimensions;return{reference:zge(t,yield a(r),i),floating:qo({x:0,y:0},yield o(r))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>_u(e).direction==="rtl"};function Zge(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:l=!1}=i,u=a&&!l,c=u||o?[...dl(e)?Rm(e):e.contextElement?Rm(e.contextElement):[],...Rm(t)]:[];c.forEach(v=>{u&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});let d=null;if(s){let v=!0;d=new ResizeObserver(()=>{v||r(),v=!1}),dl(e)&&!l&&d.observe(e),!dl(e)&&e.contextElement&&!l&&d.observe(e.contextElement),d.observe(t)}let g,x=l?md(e):null;l&&w();function w(){const v=md(e);x&&(v.x!==x.x||v.y!==x.y||v.width!==x.width||v.height!==x.height)&&r(),x=v,g=requestAnimationFrame(w)}return r(),()=>{var v;c.forEach(y=>{u&&y.removeEventListener("scroll",r),o&&y.removeEventListener("resize",r)}),(v=d)==null||v.disconnect(),d=null,l&&cancelAnimationFrame(g)}}const Jge=(e,t,r)=>{const i=new Map,a=qo({platform:Xge},r),o=pd(qo({},a.platform),{_c:i});return $ge(e,t,pd(qo({},a),{platform:o}))};function eme(e,t,r){let i=()=>{var g;return(g=r?.placement)!=null?g:"bottom"},a=()=>{var g;return(g=r?.strategy)!=null?g:"absolute"},[o,s]=Fi({x:null,y:null,placement:i(),strategy:a(),middlewareData:{}}),[l,u]=Fi();cl(()=>{let g=l();if(g)throw g.value});let c=Ti(()=>(e(),t(),{}));function d(){let g=e(),x=t();if(g&&x){let w=c();Jge(g,x,{middleware:r?.middleware,placement:i(),strategy:a()}).then(v=>{w===c()&&s(v)},v=>{u(v)})}}return cl(()=>{let g=e(),x=t();if(r?.middleware,i(),a(),g&&x)if(r!=null&&r.whileElementsMounted){let w=r.whileElementsMounted(g,x,d);w&&sc(w)}else d()}),{get x(){return o().x},get y(){return o().y},get placement(){return o().placement},get strategy(){return o().strategy},get middlewareData(){return o().middlewareData},update:d}}const tme=la(''),rme=()=>{const e=Ks(),t=$l(j2),r=$l(Xh),[i,a]=Fi(!1),[o,s]=Fi(t.account),[l,u]=Fi(!0);let c;const[d,g]=Fi(),[x,w]=Fi(),v=eme(x,d,{whileElementsMounted:Zge,placement:"bottom-end"}),y=()=>{const A=o();if(A){const B=O6(A.address,A.chain===u0.TESTNET);return B.slice(0,4)+"\u2026"+B.slice(-4)}return""};r.connectionRestored.then(()=>u(!1));const _=t.onStatusChange(A=>{if(!A){a(!1),s(null);return}s(A.account)}),E=A=>{if(!o()||!i())return;const B=x().contains(A.target),U=c.contains(A.target);!B&&!U&&a(!1)};return qfe(()=>{document.body.addEventListener("click",E)}),sc(()=>{document.body.removeEventListener("click",E),_()}),jt(L6,{component:Fu,get children(){return[jt(po,{get when(){return l()},get children(){return jt(Mge,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return jt(Oge,{})}})}}),jt(po,{get when(){return!l()},get children(){return[jt(po,{get when(){return!o()},get children(){return jt(aL,{onClick:()=>r.connectWallet(),"data-tc-connect-button":"true",get children(){return[jt(nge,{get fill(){return e.colors.connectButton.foreground}}),jt(Fl,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),jt(po,{get when(){return o()},get children(){return jt(Bge,{get children(){return[jt(Pge,{onClick:()=>a(A=>!A),ref:w,"data-tc-dropdown-button":"true",get children(){return[jt(Fl,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return y()}}),jt(YD,{direction:"bottom"})]}}),jt(ND,{get children(){const A=ja(()=>document.importNode(tme,!0));return N1(g,A),A.style.setProperty("z-index","999"),A._$owner=Kfe(),Aa(A,jt(H2,{onBeforeEnter:B=>{B.animate([{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(B,U)=>{B.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(U)},get children(){return jt(po,{get when(){return i()},get children(){return jt(Uge,{get hidden(){return!i()},onClose:()=>a(!1),ref(B){const U=c;typeof U=="function"?U(B):c=B}})}})}}),null),Aa(A,jt(Dge,{}),null),na(B=>{var U,L;const K=v.strategy,V=`${(U=v.y)!=null?U:0}px`,H=`${(L=v.x)!=null?L:0}px`;return K!==B._v$&&A.style.setProperty("position",B._v$=K),V!==B._v$2&&A.style.setProperty("top",B._v$2=V),H!==B._v$3&&A.style.setProperty("left",B._v$3=H),B},{_v$:void 0,_v$2:void 0,_v$3:void 0}),A}})]}})}})]}})]}})},nme={m:"16px",s:"8px",none:"0"},ime=bn.div` - ${hc("mobile")} { - padding: 10px 16px 0 16px; - } -`,ome=bn(W2)` - max-width: 320px; - margin: 0 auto 6px; -`,ame=bn(QD)` - position: absolute; - top: 16px; - left: 16px; -`,sme=bn(rL)` - margin-bottom: 16px; -`,lme=bn.div` - display: flex; - gap: 16px; - height: 56px; - margin-bottom: 24px; -`,kR=bn(Au)` - padding: 0 16px; - height: 56px; - font-size: 16px; - line-height: 20px; - width: 100%; - border-radius: ${e=>nme[e.theme.borderRadius]}; -`,ume=bn.div` - display: flex; - justify-content: space-between; - align-items: center; -`,cme=bn(Fl)` - padding-left: 8px; - color: ${e=>e.theme.colors.text.secondary}; - font-size: 16px; -`,[Ba,av]=$6({buttonRootId:null,language:"en",returnStrategy:"back",walletsListConfiguration:{}}),dme=bn.a` - display: block; - text-decoration: unset; -`,Y2=e=>jt(dme,hu({get href(){return e.href},get target(){return e.blank?"_blank":"_self"}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),fme=e=>{const t=$l(j2),r=Ti(()=>t.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest));return jt(ime,{"data-tc-wallet-qr-modal-desktop":"true",get children(){return[jt(ame,{icon:"arrow",onClick:()=>e.onBackClick()}),jt(ome,{translationKey:"walletModal.qrCodeModal.connectWith",get translationValues(){return{name:e.wallet.name}},get children(){return["Connect with ",Ti(()=>e.wallet.name)]}}),jt(V2,{translationKey:"walletModal.qrCodeModal.scan",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan QR code with your phone\u2019s or ",Ti(()=>e.wallet.name),"\u2019s camera."]}}),jt(sme,{disableCopy:!1,get sourceUrl(){return r()},get imageUrl(){return e.wallet.imageUrl}}),jt(lme,{get children(){return[jt(kR,{scale:"s",onClick:()=>{Ol(pd(qo({},e.wallet),{openMethod:"universal-link"})),W6(h0(r(),Ba.returnStrategy))},get children(){return jt(Bl,{translationKey:"walletModal.qrCodeModal.openWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Open ",Ti(()=>e.wallet.name)]}})}}),jt(po,{get when(){return M2(e.wallet)},get children(){return jt(kR,{scale:"s",onClick:()=>{Ol(e.wallet),t.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest)},get children(){return jt(Bl,{translationKey:"common.openExtension",children:"Open Extension"})}})}})]}}),jt(ume,{get children(){return[jt(cme,{translationKey:"walletModal.qrCodeModal.dontHave",get translationValues(){return{name:e.wallet.name}},get children(){return["Don't have ",Ti(()=>e.wallet.name),"?"]}}),jt(Y2,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return jt(Au,{get children(){return jt(Bl,{translationKey:"common.get",children:"GET"})}})}})]}})]}})},pme=bn(XD)` - padding-left: 24px; - padding-right: 24px; - - ${hc("mobile")} { - padding-left: 0; - padding-right: 0; - - min-height: 364px; - } -`,hme=bn(W2)` - margin-top: 12px; - - ${hc("mobile")} { - padding: 0 10px; - } -`,gme=bn.div` - margin: 30px 0; - width: 100%; - display: flex; - justify-content: center; - - ${hc("mobile")} { - height: 160px; - align-items: center; - } -`,AR=bn(Fl)` - min-width: 84px; - text-align: center; - font-weight: 590; -`,mme=bn(Ohe)` - margin: 0 auto 22px; -`;function yme(e){return[...new Set(e)]}function vme(e,t,r){return t.map(i=>{const a=r.find(o=>o[e]===i[e]);return r=r.filter(o=>o[e]!==i[e]),a===void 0?i:a}).concat(r)}function bme(e){return"jsBridgeKey"in e?pd(qo({},e),{injected:zf.isWalletInjected(e.jsBridgeKey),embedded:zf.isInsideWalletBrowser(e.jsBridgeKey)}):e}function pL(e,t){var r;return t&&(r=t.includeWallets)!=null&&r.length&&(e=vme("name",e,t.includeWallets.map(bme))),e}const[TR,wme]=Fi(zp("mobile"));GD()&&window.addEventListener("resize",()=>wme(zp("mobile")));const xme=bn.ul` - display: flex; - margin: 0 auto 24px; - width: fit-content; - min-height: 124px; - max-width: 100%; - overflow-x: auto; - overflow-y: hidden; - padding: 0 24px; - - &&::-webkit-scrollbar { - display: none; - } - - -ms-overflow-style: none; - scrollbar-width: none; -`,_me=bn.li` - width: 82px; - min-width: 82px; - height: 124px; - display: flex; - flex-direction: column; - align-items: center; - padding: 8px 4px; - - text-align: center; - cursor: pointer; - - transition: transform 0.1s ease-in-out; - - ${z2} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${F2} { - &:active { - transform: scale(0.92); - } - } -`,Sme=bn.div` - width: 1px; - margin: 0 10px; - height: 24px; - position: relative; - top: 30px; - - background-color: ${e=>e.theme.colors.icon.tertiary}; -`,Cme=bn.div` - width: 64px; - height: 64px; - border-radius: 16px; - display: flex; - align-items: center; - justify-content: center; - - background-color: ${e=>$2(e.theme.colors.accent,.12)}; - color: ${e=>e.theme.colors.accent}; - - margin-bottom: 8px; -`,Eme=bn(V2)` - margin-bottom: 24px; - padding: 0 24px; - min-height: 44px; -`,kme=bn(Au)` - display: block; - margin: 0 auto; -`,G6={LEARN_MORE:"https://ton.org/wallets"},Ame=la('
    '),Tme=la("
  • "),Ime=e=>{const t=Ba.connector,r=Ks(),i=o=>{if(!fhe())return e.onSelect(o);if("universalLink"in o){Ol(pd(qo({},o),{openMethod:"universal-link"}));const s=t.connect({universalLink:o.universalLink,bridgeUrl:o.bridgeUrl},e.additionalRequest);p0(h0(s,Ba.returnStrategy));return}W6(o.aboutUrl)},a=()=>{const o=t.connect(e.walletsList.filter(M6).map(s=>({bridgeUrl:s.bridgeUrl,universalLink:s.universalLink})),e.additionalRequest);Ol({openMethod:"universal-link"}),p0(h0(o,Ba.returnStrategy))};return(()=>{const o=Ame.cloneNode(!0);return Aa(o,jt(W2,{translationKey:"walletModal.mobileSelectWalletModal.connectWallet",children:"Connect a wallet"}),null),Aa(o,jt(Eme,{translationKey:"walletModal.mobileSelectWalletModal.selectWallet",children:"Select your wallet from the options to get started."}),null),Aa(o,jt(xme,{get children(){return[jt(_me,{onClick:a,get children(){return[jt(Cme,{get children(){return jt(tge,{get fill(){return r.colors.accent}})}}),jt(Fl,{fontWeight:590,translationKey:"walletModal.mobileSelectWalletModal.installedWallet",children:"Installed wallet"})]}}),jt(Sme,{children:"\xA0"}),jt(L2,{get each(){return e.walletsList.filter(s=>"bridgeUrl"in s)},children:s=>(()=>{const l=Tme.cloneNode(!0);return Aa(l,jt(nL,{get iconUrl(){return s.imageUrl},get name(){return s.name},onClick:()=>i(s)})),l})()})]}}),null),Aa(o,jt(Y2,{get href(){return G6.LEARN_MORE},blank:!0,get children(){return jt(kme,{get children(){return jt(Bl,{translationKey:"common.learnMore",children:"Learn more"})}})}}),null),o})()},hL={m:"16px",s:"8px",none:"0"},Rme={m:"8px",s:"4px",none:"0"},Pme=bn.div` - display: flex; - flex-direction: column; - align-items: center; -`,Mme=bn(V2)` - max-width: 320px; - margin-bottom: 24px; -`,Ome=bn(rL)` - margin-bottom: 16px; -`,Bme=bn.div` - display: flex; - gap: 16px; - width: 100%; -`,IR=bn(Au)` - position: relative; - font-size: 16px; - line-height: 20px; - width: 100%; - padding: 0 16px; - height: 56px; - border-radius: ${e=>hL[e.theme.borderRadius]}; - - &:hover { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } - - &:active { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } -`,Ume=bn.ul` - position: absolute; - bottom: 100%; - left: 0; - margin: 0; - padding: 8px; - width: 188px; - transform: translateY(-16px); - - background-color: ${e=>e.theme.colors.background.primary}; - border-radius: ${e=>hL[e.theme.borderRadius]}; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); -`,Dme=bn.li` - padding: 8px; - - display: flex; - align-items: center; - gap: 8px; - - cursor: pointer; - border-radius: ${e=>Rme[e.theme.borderRadius]}; - - transition: background-color, transform 0.1s ease-in-out; - - &:hover { - background-color: ${e=>e.theme.colors.background.secondary}; - } - - &:active { - transform: scale(0.96); - } -`,Lme=bn(H6)` - width: 24px; - height: 24px; - - border-radius: 6px; -`,Nme=bn.div` - margin-top: 23px; - margin-bottom: 1px; - width: 100%; - display: flex; - justify-content: center; - align-items: center; -`;bn(Fl)` - color: ${e=>e.theme.colors.text.secondary}; - font-size: 16px; -`;const jme=e=>{const[t,r]=Fi(!1),i=Ba.connector,a=e.walletsList.filter(M6).map(d=>({bridgeUrl:d.bridgeUrl,universalLink:d.universalLink})),o=e.walletsList.filter(M2);Ol({openMethod:"qrcode"});const s=Ti(()=>i.connect(a,e.additionalRequest)),l=()=>{let d=!1;function g(){d=!0,Ol({openMethod:"universal-link"}),window.removeEventListener("blur",g)}window.addEventListener("blur",g),p0(h0(s(),Ba.returnStrategy)),setTimeout(()=>{d||e.openWalletFallback(),window.removeEventListener("blur",g)},200)},u=d=>{if(d.stopPropagation(),o.length===1){const g=o[0];Ol(g),i.connect({jsBridgeKey:g.jsBridgeKey},e.additionalRequest);return}r(g=>!g)},c=d=>{Ol(d),i.connect({jsBridgeKey:d.jsBridgeKey},e.additionalRequest)};return jt(Pme,{onClick:()=>r(!1),"data-tc-universal-qr-desktop":"true",get children(){return[jt(Mme,{translationKey:"walletModal.universalQRModal.scanQR",children:"Scan QR code with a TON Connect compatible wallet."}),jt(Ome,{get sourceUrl(){return s()},get disableCopy(){return t()}}),jt(Bme,{get children(){return[jt(IR,{onClick:l,scale:"s",get children(){return[jt(po,{get when(){return o.length},get children(){return jt(Bl,{translationKey:"walletModal.universalQRModal.openWallet",children:"Open Wallet"})}}),jt(po,{get when(){return!o.length},get children(){return jt(Bl,{translationKey:"walletModal.universalQRModal.openInstalledWallet",children:"Open Installed Wallet"})}})]}}),jt(po,{get when(){return o.length},get children(){return jt(IR,{onClick:u,get disableEventsAnimation(){return t()},scale:"s",get children(){return[jt(H2,{onBeforeEnter:d=>{d.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-16px)"}],{duration:150})},onExit:(d,g)=>{d.animate([{opacity:1,transform:"translateY(-16px)"},{opacity:0,transform:"translateY(0)"}],{duration:150}).finished.then(g)},get children(){return jt(po,{get when(){return t()},get children(){return jt(Ume,{get children(){return jt(L2,{each:o,children:d=>jt(Dme,{onClick:()=>c(d),get children(){return[jt(Lme,{get src(){return d.imageUrl},alt:""}),jt(Fl,{fontWeight:590,get children(){return d.name}})]}})})}})}})}}),jt(Bl,{translationKey:"common.openExtension",children:"Open Extension"})]}})}})]}}),jt(po,{get when(){return!o.length},get children(){return jt(Nme,{get children(){return jt(Y2,{get href(){return G6.LEARN_MORE},blank:!0,get children(){return jt(Au,{appearance:"flat",class:lc` - font-size: 15px; - `,get children(){return jt(Bl,{translationKey:"common.learnMore",children:"Learn more"})}})}})}})}})]}})},$me=bn.div` - display: flex; - flex-direction: column; - align-items: center; -`,Fme=bn(V2)` - margin-bottom: 26px; -`,zme=bn.ul` - display: grid; - grid-template-columns: repeat(auto-fit, 92px); - justify-content: center; - row-gap: 8px; - overflow-y: auto; - max-height: 410px; - width: calc(100% + 12px); - margin-bottom: 30px; - padding: 10px 0; - align-self: flex-start; - - &&::-webkit-scrollbar { - width: 8px; - } - - &&::-webkit-scrollbar-track { - background: transparent; - } - - &&::-webkit-scrollbar-thumb { - background: #cacaca; - border-radius: 12px; - } -`,Hme=bn(Au)` - display: block; - margin: 0 auto 1px; - font-size: 15px; -`,Wme=la("
  • "),Vme=e=>jt($me,{"data-tc-select-wallet-desktop":"true",get children(){return[jt(Fme,{translationKey:"walletModal.desktopSelectWalletModal.selectWallet",children:"Choose your preferred wallet from the options to get started."}),jt(zme,{get children(){return jt(L2,{get each(){return e.walletsList},children:t=>(()=>{const r=Wme.cloneNode(!0);return Aa(r,jt(nL,{get iconUrl(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),r})()})}}),jt(Y2,{get href(){return G6.LEARN_MORE},blank:!0,get children(){return jt(Hme,{appearance:"flat",get children(){return jt(Bl,{translationKey:"common.learnMore",children:"Learn more"})}})}})]}}),qme=la('
    '),Kme=()=>{const{locale:e}=Ed()[1];cl(()=>e(Ba.language));const t=$l(j2),r=$l(Xh),[i]=Wfe(()=>r.getWallets()),[a,o]=Fi(null),[s,l]=Fi(0),u=Ti(()=>{if(i.state!=="ready")return null;let v=pL(i(),Ba.walletsListConfiguration);const y=Ba.preferredWalletName,_=v.find(A=>A.name===y),E=v.filter(A=>A.name===y).length>=2;return y&&_&&!E&&(v=[_].concat(v.filter(A=>A.name!==y))),v}),c=()=>{var v;return((v=Ba.connectRequestParameters)==null?void 0:v.state)==="loading"},d=Ti(()=>{var v;if(!c())return(v=Ba.connectRequestParameters)==null?void 0:v.value}),g=()=>{lS(!1),o(null)},x=v=>{if(M2(v)){Ol(v),t.connect({jsBridgeKey:v.jsBridgeKey},d());return}if(M6(v)){Ol(pd(qo({},v),{openMethod:"qrcode"})),o(v);return}W6(v.aboutUrl)},w=t.onStatusChange(v=>{v&&g()});return sc(w),jt(pme,{get opened(){return xpe()},onClose:g,"data-tc-wallets-modal-container":"true",get children(){return[jt(po,{get when(){return c()||!u()},get children(){return[jt(hme,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),jt(gme,{get children(){return jt(q2,{size:"m"})}})]}}),jt(po,{get when(){return Ti(()=>!c())()&&u()},get children(){return[jt(po,{get when(){return Ti(()=>!!TR())()&&!a()},get children(){return jt(Ime,{onSelect:x,get walletsList(){return u()},get additionalRequest(){return d()}})}}),jt(po,{get when(){return!TR()},get children(){return jt(po,{get when(){return!a()},get children(){const v=qme.cloneNode(!0);return Aa(v,jt(mme,{get tab1(){return jt(AR,{translationKey:"walletModal.qrCode",cursor:"unset",children:"QR Code"})},get tab2(){return jt(AR,{translationKey:"walletModal.wallets",cursor:"unset",children:"Wallets"})},get selectedTabIndex(){return s()},onSelectedTabIndexChange:l}),null),Aa(v,jt(N2,{get children(){return[jt(gu,{get when(){return s()===0},get children(){return jt(jme,{get walletsList(){return u()},get additionalRequest(){return d()},openWalletFallback:()=>l(1)})}}),jt(gu,{get when(){return s()===1},get children(){return jt(Vme,{get walletsList(){return u()},onSelect:x})}})]}}),null),v}})}}),jt(po,{get when(){return a()},get children(){return jt(fme,{get additionalRequest(){return d()},get wallet(){return a()},onBackClick:()=>o(null)})}})]}})]}})},Gme=bn.div` - display: flex; - flex-direction: column; - align-items: center; - padding-bottom: 8px; -`,Yme=bn(W2)` - margin-top: 16px; -`,Qme=bn(Fl)` - font-weight: 510; - font-size: 16px; - line-height: 20px; - text-align: center; - max-width: 250px; - - color: ${e=>e.theme.colors.text.secondary}; -`,Xme=bn(Au)` - margin-top: 32px; -`,Y6=e=>{const t=ry(e);return jt(Gme,hu(t,{get children(){return[Ti(()=>e.icon),jt(Yme,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),jt(Qme,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),jt(po,{get when(){return e.showButton!==!1},get children(){return jt(Xme,{onClick:()=>e.onClose(),get children(){return jt(Bl,{translationKey:"common.close",children:"Close"})}})}})]}}))},Zme=e=>{var t;const r=$l(Xh),[i]=Ed(),a=((t=r.wallet)==null?void 0:t.name)||i("common.yourWallet",{},"your wallet");return jt(Y6,{headerTranslationKey:"actionModal.confirmTransaction.header",headerTranslationValues:{name:a},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return jt(q2,{size:"m"})},onClose:()=>e.onClose(),showButton:!1,"data-tc-confirm-modal":"true"})},Jme=e=>jt(Y6,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return jt(oL,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),e0e=e=>jt(Y6,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return jt(iL,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),t0e=()=>jt(XD,{get opened(){var e;return Ti(()=>Ep()!==null)()&&((e=Ep())==null?void 0:e.openModal)===!0},onClose:()=>Fp(null),"data-tc-actions-modal-container":"true",get children(){return jt(N2,{get children(){return[jt(gu,{get when(){return Ep().name==="transaction-sent"},get children(){return jt(e0e,{onClose:()=>Fp(null)})}}),jt(gu,{get when(){return Ep().name==="transaction-canceled"},get children(){return jt(Jme,{onClose:()=>Fp(null)})}}),jt(gu,{get when(){return Ep().name==="confirm-transaction"},get children(){return jt(Zme,{onClose:()=>Fp(null)})}})]}})}}),r0e=e=>{const t=Hhe(Wpe,Ba.language);return che(),uhe(),jt(tL.Provider,{value:t,get children(){return jt(Xh.Provider,{get value(){return e.tonConnectUI},get children(){return jt(j2.Provider,{get value(){return Ba.connector},get children(){return[jt(the,{}),jt(Rpe,{theme:Zpe,get children(){return[jt(po,{get when(){return Ba.buttonRootId},get children(){return jt(ND,{get mount(){return document.getElementById(Ba.buttonRootId)},get children(){return jt(rme,{})}})}}),jt(L6,{component:Fu,get children(){return[jt(Kme,{}),jt(t0e,{})]}})]}})]}})}})}})},jd={openWalletsModal:()=>void setTimeout(()=>lS(!0)),closeWalletsModal:()=>void setTimeout(()=>lS(!1)),setAction:e=>void setTimeout(()=>Fp(e)),clearAction:()=>void setTimeout(()=>Fp(null)),getSelectedWalletInfo:()=>_pe(),renderApp:(e,t)=>upe(()=>jt(r0e,{tonConnectUI:t}),document.getElementById(e))};class n0e{constructor(){Ps(this,"localStorage"),Ps(this,"storageKey","ton-connect-ui_wallet-info"),KD(),this.localStorage=localStorage}setWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class i0e{constructor(){Ps(this,"localStorage"),Ps(this,"storageKey","ton-connect-ui_preferred-wallet"),KD(),this.localStorage=localStorage}setPreferredWalletName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletName(){return this.localStorage.getItem(this.storageKey)||void 0}}class o0e{constructor(t){if(Ps(this,"walletInfoStorage",new n0e),Ps(this,"preferredWalletStorage",new i0e),Ps(this,"connector"),Ps(this,"walletInfo",null),Ps(this,"systemThemeChangeUnsubscribe",null),Ps(this,"actionsConfiguration"),Ps(this,"walletsList"),Ps(this,"connectRequestParametersCallback"),Ps(this,"connectionRestored",Promise.resolve(!1)),t&&"connector"in t&&t.connector)this.connector=t.connector;else if(t&&"manifestUrl"in t&&t.manifestUrl)this.connector=new zf({manifestUrl:t.manifestUrl});else throw new tu("You have to specify a `manifestUrl` or a `connector` in the options.");this.walletsList=this.getWallets(),this.walletsList.then(a=>dhe(yme(a.map(o=>o.imageUrl))));const r=this.normalizeWidgetRoot(t?.widgetRootId);this.subscribeToWalletChange(),t?.restoreConnection!==!1&&(this.connectionRestored=new Promise(a=>Zs(this,null,function*(){yield this.connector.restoreConnection(),this.connector.connected||this.walletInfoStorage.removeWalletInfo(),a(this.connector.connected)}))),this.uiOptions=id(t,{uiPreferences:{theme:"SYSTEM"}});const i=this.preferredWalletStorage.getPreferredWalletName();av({connector:this.connector,preferredWalletName:i}),jd.renderApp(r,this)}static getWallets(){return zf.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return!this.connector.wallet||!this.walletInfo?null:qo(qo({},this.connector.wallet),this.walletInfo)}set uiOptions(t){var r,i,a,o,s;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(r=t.uiPreferences)!=null&&r.theme?((i=t.uiPreferences)==null?void 0:i.theme)!=="SYSTEM"?((a=this.systemThemeChangeUnsubscribe)==null||a.call(this),q_(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(q_(ihe(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=ohe(q_))):(o=t.uiPreferences)!=null&&o.colorsSet&&ehe(t.uiPreferences.colorsSet),(s=t.uiPreferences)!=null&&s.borderRadius&&Jpe(t.uiPreferences.borderRadius),av(l=>{var u;const c=id(qo(qo(qo({},t.language&&{language:t.language}),!!((u=t.actionsConfiguration)!=null&&u.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),Eh(l));return t.buttonRootId!==void 0&&(c.buttonRootId=t.buttonRootId),c})}setConnectRequestParameters(t){var r;av({connectRequestParameters:t}),(t?.state==="ready"||!t)&&((r=this.connectRequestParametersCallback)==null||r.call(this,t?.value))}getWallets(){return Zs(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,r){return this.connector.onStatusChange(i=>Zs(this,null,function*(){if(i){const a=yield this.getSelectedWalletInfo(i);t(qo(qo({},i),a||this.walletInfoStorage.getWalletInfo()))}else t(i)}),r)}connectWallet(){return Zs(this,null,function*(){const r=(yield this.getWallets()).find(_D);if(r){const i=o=>{Ol(r),this.connector.connect({jsBridgeKey:r.jsBridgeKey},o)},a=Ba.connectRequestParameters;a?.state==="loading"?this.connectRequestParametersCallback=i:i(a?.value)}else jd.openWalletsModal();return new Promise((i,a)=>{const o=this.connector.onStatusChange(s=>Zs(this,null,function*(){if(o(),s){const l=yield this.getSelectedWalletInfo(s);i(qo(qo({},s),l||this.walletInfoStorage.getWalletInfo()))}else a(new tu("Wallet was not connected"))}),a)})})}disconnect(){return jd.clearAction(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,r){return Zs(this,null,function*(){if(!this.connected||!this.walletInfo)throw new tu("Connect wallet to send a transaction.");const{notifications:i,modals:a,returnStrategy:o}=this.getModalsAndNotificationsConfiguration(r);"universalLink"in this.walletInfo&&this.walletInfo.openMethod==="universal-link"&&p0(h0(this.walletInfo.universalLink,o)),jd.setAction({name:"confirm-transaction",showNotification:i.includes("before"),openModal:a.includes("before")});try{const s=yield this.connector.sendTransaction(t);return jd.setAction({name:"transaction-sent",showNotification:i.includes("success"),openModal:a.includes("success")}),s}catch(s){throw jd.setAction({name:"transaction-canceled",showNotification:i.includes("error"),openModal:a.includes("error")}),s instanceof co?s:(console.error(s),new tu("Unhandled error:"+s))}})}subscribeToWalletChange(){this.connector.onStatusChange(t=>Zs(this,null,function*(){var r;t?(yield this.updateWalletInfo(t),this.setPreferredWalletName(((r=this.walletInfo)==null?void 0:r.name)||t.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletName(t){this.preferredWalletStorage.setPreferredWalletName(t),av({preferredWalletName:t})}getSelectedWalletInfo(t){return Zs(this,null,function*(){let r=jd.getSelectedWalletInfo();if(!r)return null;let i;if("name"in r)i=r;else{const o=pL(yield this.walletsList,Ba.walletsListConfiguration).find(s=>s.name.toLowerCase()===t.device.appName.toLowerCase());if(!o)throw new tu(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);i=qo(qo({},o),r)}return i})}updateWalletInfo(t){return Zs(this,null,function*(){const r=yield this.getSelectedWalletInfo(t);r?(this.walletInfo=r,this.walletInfoStorage.setWalletInfo(r)):this.walletInfo=this.walletInfoStorage.getWalletInfo()})}normalizeWidgetRoot(t){if(!t||!document.getElementById(t)){t="tc-widget-root";const r=document.createElement("div");r.id=t,document.body.appendChild(r)}return t}checkButtonRootExist(t){if(t!=null&&!document.getElementById(t))throw new tu(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var r,i,a;const o=["before","success","error"];let s=o;((r=this.actionsConfiguration)==null?void 0:r.notifications)&&((i=this.actionsConfiguration)==null?void 0:i.notifications)!=="all"&&(s=this.actionsConfiguration.notifications),t?.notifications&&(t.notifications==="all"?s=o:s=t.notifications);let l=["before"];return(a=this.actionsConfiguration)!=null&&a.modals&&(this.actionsConfiguration.modals==="all"?l=o:l=this.actionsConfiguration.modals),t?.modals&&(t.modals==="all"?l=o:l=t.modals),{notifications:s,modals:l,returnStrategy:t?.returnStrategy||"back"}}}var a0e=Object.defineProperty,z1=Object.getOwnPropertySymbols,gL=Object.prototype.hasOwnProperty,mL=Object.prototype.propertyIsEnumerable,RR=(e,t,r)=>t in e?a0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s0e=(e,t)=>{for(var r in t||(t={}))gL.call(t,r)&&RR(e,r,t[r]);if(z1)for(var r of z1(t))mL.call(t,r)&&RR(e,r,t[r]);return e},l0e=(e,t)=>{var r={};for(var i in e)gL.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&z1)for(var i of z1(e))t.indexOf(i)<0&&mL.call(e,i)&&(r[i]=e[i]);return r},yL={exports:{}},Hg={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var PR;function u0e(){if(PR)return Hg;PR=1;var e=Us,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(l,u,c){var d,g={},x=null,w=null;c!==void 0&&(x=""+c),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(w=u.ref);for(d in u)i.call(u,d)&&!o.hasOwnProperty(d)&&(g[d]=u[d]);if(l&&l.defaultProps)for(d in u=l.defaultProps,u)g[d]===void 0&&(g[d]=u[d]);return{$$typeof:t,type:l,key:x,ref:w,props:g,_owner:a.current}}return Hg.Fragment=r,Hg.jsx=s,Hg.jsxs=s,Hg}(function(e){e.exports=u0e()})(yL);const vL=yL.exports.jsx;function bL(){return typeof window<"u"}function c0e(){return!bL()}const wL=Z.exports.createContext(null);let J_=null;const d0e=e=>{var t=e,{children:r}=t,i=l0e(t,["children"]);return bL()&&!J_&&(J_=new o0e(i)),vL(wL.Provider,{value:J_,children:r})},f0e=Z.exports.memo(d0e);class Q6 extends tu{constructor(...t){super(...t),Object.setPrototypeOf(this,Q6.prototype)}}class X6 extends Q6{constructor(...t){super(...t),Object.setPrototypeOf(this,X6.prototype)}}function p0e(e){if(!e)throw new X6("You should add on the top of the app to use TonConnect");return!0}function Q2(){const e=Z.exports.useContext(wL),t=Z.exports.useCallback(r=>{e&&(e.uiOptions=r)},[e]);return c0e()?[null,()=>{}]:(p0e(e),[e,t])}const MR="ton-connect-button",h0e=({className:e,style:t})=>{const[r,i]=Q2();return Z.exports.useEffect(()=>(i({buttonRootId:MR}),()=>i({buttonRootId:null})),[i]),vL("div",{id:MR,className:e,style:s0e({width:"fit-content"},t)})},g0e=Z.exports.memo(h0e);function m0e(){const[e]=Q2(),[t,r]=Z.exports.useState(e?.wallet||null);return Z.exports.useEffect(()=>{if(e)return e.onStatusChange(i=>{r(i)})},[e]),t}function X2(e=!0){const t=m0e();return t?e?O6(t.account.address,t.account.chain===u0.TESTNET):t.account.address:""}const Z6=ar(g0e)(({theme:e})=>({button:{background:e.palette.primary.main,"*":{color:"white"},svg:{"*":{stroke:"white"}}}}));function y0e({closeMenu:e,showMenu:t}){const r=fc(),i=X2();return N(zee,{anchor:"left",open:t,onClose:e,children:Bt(aa,{p:2,sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"250px",height:"100%"},children:[N(qs,{sx:{alignSelf:"end",padding:.3},onClick:e,children:N(C6,{style:{width:25,height:25}})}),Bt(aa,{pt:2,sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center"},children:[N("div",{style:{maxWidth:"250px"},onClick:i?()=>{}:e,children:N(Z6,{})}),Bt(Ff,{href:$C,target:"_blank",children:[N("img",{src:X4,alt:"Github icon",width:20,height:20}),N(x6,{children:"GitHub"})]})]}),Bt(Ff,{onClick:()=>r("/"),children:[N("img",{src:Mb,width:30,height:30,alt:"App icon"}),N(k2,{children:"TON VERIFIER"})]})]})})}function v0e(){const{pathname:e}=B0(),t=sa(),r=fc(),i=ra(t.breakpoints.down("lg")),a=ra(t.breakpoints.down("md")),[o,s]=Z.exports.useState(e.length===1),[l,u]=Z.exports.useState(!1);return Z.exports.useEffect(()=>{s(e.length===1)},[e]),Bt(jde,{px:i?2.4:0,isMobile:a,showExpanded:o,children:[a&&N(qs,{sx:{width:35,height:35,marginRight:2.4},onClick:()=>u(!0),children:N(yD,{sx:{width:35,height:35}})}),!a&&Bt(mD,{mb:5,children:[Bt(Ff,{onClick:()=>r("/"),children:[N("img",{src:Mb,width:30,height:30,alt:"App icon"}),N(k2,{children:"TON VERIFIER"})]}),Bt(gD,{children:[N(jn,{mr:2,children:N(Z6,{})}),Bt(Ff,{href:$C,target:"_blank",children:[N("img",{src:X4,alt:"Github icon",width:20,height:20}),N(x6,{children:"GitHub"})]})]})]}),e.length<2&&!a&&N($de,{children:"Smart Contract Verifier"}),N(Fde,{children:N(Lde,{})}),N(y0e,{closeMenu:()=>u(!1),showMenu:l})]})}var J6={},eE={exports:{}};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */(function(e){var t,r,i,a,o,s,l,u,c,d,g,x,w,v,y,_,E,A,B,U,L,K,V;(function(H){var z=typeof xn=="object"?xn:typeof self=="object"?self:typeof this=="object"?this:{};H(Y(z,Y(e.exports)));function Y(oe,q){return oe!==z&&(typeof Object.create=="function"?Object.defineProperty(oe,"__esModule",{value:!0}):oe.__esModule=!0),function(ae,M){return oe[ae]=q?q(ae,M):M}}})(function(H){var z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,oe){Y.__proto__=oe}||function(Y,oe){for(var q in oe)oe.hasOwnProperty(q)&&(Y[q]=oe[q])};t=function(Y,oe){z(Y,oe);function q(){this.constructor=Y}Y.prototype=oe===null?Object.create(oe):(q.prototype=oe.prototype,new q)},r=Object.assign||function(Y){for(var oe,q=1,ae=arguments.length;q=0;he--)(ue=Y[he])&&(te=(M<3?ue(te):M>3?ue(oe,q,te):ue(oe,q))||te);return M>3&&te&&Object.defineProperty(oe,q,te),te},o=function(Y,oe){return function(q,ae){oe(q,ae,Y)}},s=function(Y,oe){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Y,oe)},l=function(Y,oe,q,ae){function M(te){return te instanceof q?te:new q(function(ue){ue(te)})}return new(q||(q=Promise))(function(te,ue){function he(ct){try{J(ae.next(ct))}catch(De){ue(De)}}function xe(ct){try{J(ae.throw(ct))}catch(De){ue(De)}}function J(ct){ct.done?te(ct.value):M(ct.value).then(he,xe)}J((ae=ae.apply(Y,oe||[])).next())})},u=function(Y,oe){var q={label:0,sent:function(){if(te[0]&1)throw te[1];return te[1]},trys:[],ops:[]},ae,M,te,ue;return ue={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(ue[Symbol.iterator]=function(){return this}),ue;function he(J){return function(ct){return xe([J,ct])}}function xe(J){if(ae)throw new TypeError("Generator is already executing.");for(;q;)try{if(ae=1,M&&(te=J[0]&2?M.return:J[0]?M.throw||((te=M.return)&&te.call(M),0):M.next)&&!(te=te.call(M,J[1])).done)return te;switch(M=0,te&&(J=[J[0]&2,te.value]),J[0]){case 0:case 1:te=J;break;case 4:return q.label++,{value:J[1],done:!1};case 5:q.label++,M=J[1],J=[0];continue;case 7:J=q.ops.pop(),q.trys.pop();continue;default:if(te=q.trys,!(te=te.length>0&&te[te.length-1])&&(J[0]===6||J[0]===2)){q=0;continue}if(J[0]===3&&(!te||J[1]>te[0]&&J[1]=Y.length&&(Y=void 0),{value:Y&&Y[ae++],done:!Y}}};throw new TypeError(oe?"Object is not iterable.":"Symbol.iterator is not defined.")},g=function(Y,oe){var q=typeof Symbol=="function"&&Y[Symbol.iterator];if(!q)return Y;var ae=q.call(Y),M,te=[],ue;try{for(;(oe===void 0||oe-- >0)&&!(M=ae.next()).done;)te.push(M.value)}catch(he){ue={error:he}}finally{try{M&&!M.done&&(q=ae.return)&&q.call(ae)}finally{if(ue)throw ue.error}}return te},x=function(){for(var Y=[],oe=0;oe1||he(ze,ir)})})}function he(ze,ir){try{xe(ae[ze](ir))}catch(Rt){De(te[0][3],Rt)}}function xe(ze){ze.value instanceof v?Promise.resolve(ze.value.v).then(J,ct):De(te[0][2],ze)}function J(ze){he("next",ze)}function ct(ze){he("throw",ze)}function De(ze,ir){ze(ir),te.shift(),te.length&&he(te[0][0],te[0][1])}},_=function(Y){var oe,q;return oe={},ae("next"),ae("throw",function(M){throw M}),ae("return"),oe[Symbol.iterator]=function(){return this},oe;function ae(M,te){oe[M]=Y[M]?function(ue){return(q=!q)?{value:v(Y[M](ue)),done:M==="return"}:te?te(ue):ue}:te}},E=function(Y){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var oe=Y[Symbol.asyncIterator],q;return oe?oe.call(Y):(Y=typeof d=="function"?d(Y):Y[Symbol.iterator](),q={},ae("next"),ae("throw"),ae("return"),q[Symbol.asyncIterator]=function(){return this},q);function ae(te){q[te]=Y[te]&&function(ue){return new Promise(function(he,xe){ue=Y[te](ue),M(he,xe,ue.done,ue.value)})}}function M(te,ue,he,xe){Promise.resolve(xe).then(function(J){te({value:J,done:he})},ue)}},A=function(Y,oe){return Object.defineProperty?Object.defineProperty(Y,"raw",{value:oe}):Y.raw=oe,Y},B=function(Y){if(Y&&Y.__esModule)return Y;var oe={};if(Y!=null)for(var q in Y)Object.hasOwnProperty.call(Y,q)&&(oe[q]=Y[q]);return oe.default=Y,oe},U=function(Y){return Y&&Y.__esModule?Y:{default:Y}},L=function(Y,oe){if(!oe.has(Y))throw new TypeError("attempted to get private field on non-instance");return oe.get(Y)},K=function(Y,oe,q){if(!oe.has(Y))throw new TypeError("attempted to set private field on non-instance");return oe.set(Y,q),q},H("__extends",t),H("__assign",r),H("__rest",i),H("__decorate",a),H("__param",o),H("__metadata",s),H("__awaiter",l),H("__generator",u),H("__exportStar",c),H("__createBinding",V),H("__values",d),H("__read",g),H("__spread",x),H("__spreadArrays",w),H("__await",v),H("__asyncGenerator",y),H("__asyncDelegator",_),H("__asyncValues",E),H("__makeTemplateObject",A),H("__importStar",B),H("__importDefault",U),H("__classPrivateFieldGet",L),H("__classPrivateFieldSet",K)})})(eE);var Wg={},ks={},OR;function xL(){return OR||(OR=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.MAX_HASHABLE_LENGTH=ks.INIT=ks.KEY=ks.DIGEST_LENGTH=ks.BLOCK_SIZE=void 0,ks.BLOCK_SIZE=64,ks.DIGEST_LENGTH=32,ks.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ks.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ks.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),ks}var Vg={},BR;function b0e(){if(BR)return Vg;BR=1,Object.defineProperty(Vg,"__esModule",{value:!0}),Vg.RawSha256=void 0;var e=xL(),t=function(){function r(){this.state=Int32Array.from(e.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(i){if(this.finished)throw new Error("Attempted to update an already finished hash.");var a=0,o=i.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>e.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=i[a++],o--,this.bufferLength===e.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var i=this.bytesHashed*8,a=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(a.setUint8(this.bufferLength++,128),o%e.BLOCK_SIZE>=e.BLOCK_SIZE-8){for(var s=this.bufferLength;s>>24&255,l[s*4+1]=this.state[s]>>>16&255,l[s*4+2]=this.state[s]>>>8&255,l[s*4+3]=this.state[s]>>>0&255;return l},r.prototype.hashBuffer=function(){for(var i=this,a=i.buffer,o=i.state,s=o[0],l=o[1],u=o[2],c=o[3],d=o[4],g=o[5],x=o[6],w=o[7],v=0;v>>17|y<<15)^(y>>>19|y<<13)^y>>>10;y=this.temp[v-15];var E=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;this.temp[v]=(_+this.temp[v-7]|0)+(E+this.temp[v-16]|0)}var A=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&g^~d&x)|0)+(w+(e.KEY[v]+this.temp[v]|0)|0)|0,B=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&l^s&u^l&u)|0;w=x,x=g,g=d,d=c+A|0,c=u,u=l,l=s,s=A+B|0}o[0]+=s,o[1]+=l,o[2]+=u,o[3]+=c,o[4]+=d,o[5]+=g,o[6]+=x,o[7]+=w},r}();return Vg.RawSha256=t,Vg}var e5={},qg={};const w0e=e=>{const t=[];for(let r=0,i=e.length;r>6|192,a&63|128);else if(r+1>18|240,o>>12&63|128,o>>6&63|128,o&63|128)}else t.push(a>>12|224,a>>6&63|128,a&63|128)}return Uint8Array.from(t)},x0e=e=>{let t="";for(let r=0,i=e.length;rl.toString(16)).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((a&15)<<12|(e[++r]&63)<<6|e[++r]&63)}return t};function _0e(e){return new TextEncoder().encode(e)}function S0e(e){return new TextDecoder("utf-8").decode(e)}const C0e=e=>typeof TextEncoder=="function"?_0e(e):w0e(e),E0e=e=>typeof TextDecoder=="function"?S0e(e):x0e(e),k0e=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:C0e,toUtf8:E0e},Symbol.toStringTag,{value:"Module"})),A0e=lb(k0e);var UR;function T0e(){if(UR)return qg;UR=1,Object.defineProperty(qg,"__esModule",{value:!0}),qg.convertToBuffer=void 0;var e=A0e,t=typeof Buffer<"u"&&Buffer.from?function(i){return Buffer.from(i,"utf8")}:e.fromUtf8;function r(i){return i instanceof Uint8Array?i:typeof i=="string"?t(i):ArrayBuffer.isView(i)?new Uint8Array(i.buffer,i.byteOffset,i.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(i)}return qg.convertToBuffer=r,qg}var Kg={},DR;function I0e(){if(DR)return Kg;DR=1,Object.defineProperty(Kg,"__esModule",{value:!0}),Kg.isEmptyData=void 0;function e(t){return typeof t=="string"?t.length===0:t.byteLength===0}return Kg.isEmptyData=e,Kg}var Gg={},LR;function R0e(){if(LR)return Gg;LR=1,Object.defineProperty(Gg,"__esModule",{value:!0}),Gg.numToUint8=void 0;function e(t){return new Uint8Array([(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255])}return Gg.numToUint8=e,Gg}var Yg={},NR;function P0e(){if(NR)return Yg;NR=1,Object.defineProperty(Yg,"__esModule",{value:!0}),Yg.uint32ArrayFrom=void 0;function e(t){if(!Uint32Array.from){for(var r=new Uint32Array(t.length),i=0;it.BLOCK_SIZE){var u=new r.RawSha256;u.update(l),l=u.digest()}var c=new Uint8Array(t.BLOCK_SIZE);return c.set(l),c}return Wg}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=eE.exports;t.__exportStar(O0e(),e)})(J6);var _L={},As={},Qg={},Z2={},J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.Trie=void 0;class FR{constructor(t,r){this.key=t,this.value=r,this.parent=null,this.children={},this.end=!1}getWord(){for(var t=[],r=this;r!==null;)t.unshift(r.key),r=r.parent;return t.join("")}}function SL(e,t,r=-1){if(e.end&&t.unshift(e.getWord()),!(r!==-1&&t.length>=r))for(var i in e.children)SL(e.children[i],t,r)}class B0e{constructor(){this.root=new FR(null,null)}insert(t,r){for(var i=this.root,a=0;a0)throw console.log(i.getWord(),this.find(i.getWord())),new Error("Word cannot start with already used prefix");i.end=!0,i.value=r}}}contains(t){for(var r=this.root,i=0;i({}).DEBUG&&{}.DEBUG.includes("tvm-disassembler");ny._isDebug=L0e;var zR;function N0e(){if(zR)return Qg;zR=1,Object.defineProperty(Qg,"__esModule",{value:!0}),Qg.CP0Auto=void 0;const e=uo,t=CL(),r=Z2,i=ny;function a(s,l,u){let c=(0,e.beginCell)();for(let d=0;d{let l=s.loadUint(4);return l==0?"NOP":`s0 s${l} XCHG`}),o.insertHex("1",4,s=>{let l=s.loadUint(4);if(l===0){let u=s.loadUint(4),c=s.loadUint(4);return`s${u} s${c} XCHG`}return l===1?`s0 s${s.loadUint(8)} XCHG`:`s1 s${l} XCHG`}),o.insertHex("2",4,s=>`s${s.loadUint(4)} PUSH`),o.insertHex("3",4,s=>`s${s.loadUint(4)} POP`),o.insertHex("4",4,s=>{let l=s.loadUint(4),u=s.loadUint(4),c=s.loadUint(4);return`s${l} s${u} s${c} XCHG3`}),o.insertHex("50",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u} XCHG2`}),o.insertHex("51",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u} XCPU`}),o.insertHex("52",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`s${l} s${u-1} PUXC`}),o.insertHex("53",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`s${u} s${c} PUSH2`}),o.insertHex("540",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`s${u} s${c} s${d} XCHG3`}),o.insertHex("541",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} XC2PU`}),o.insertHex("542",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d-1} XCPUXC`}),o.insertHex("543",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} XCPU2`}),o.insertHex("544",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-1} PUXC2`}),o.insertHex("545",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-1} PUXCPU`}),o.insertHex("546",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c-1} ${d-2} PU2XC`}),o.insertHex("547",12,s=>{let l=s.loadUint(12),u=l>>8&15,c=l>>4&15,d=l&15;return`${u} ${c} ${d} PUSH3`}),o.insertHex("55",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`${u+1} ${c+1} BLKSWAP`}),o.insertHex("56",8,s=>`s${s.loadUint(8)} PUSH`),o.insertHex("57",8,s=>`s${s.loadUint(8)} POP`),o.insertHex("58",8,"ROT"),o.insertHex("59",8,"ROTREV"),o.insertHex("5a",8,"2SWAP"),o.insertHex("5b",8,"2DROP"),o.insertHex("5c",8,"2DUP"),o.insertHex("5d",8,"2OVER"),o.insertHex("5e",8,s=>{let l=s.loadUint(8),u=l>>4&15,c=l&15;return`${u+2} ${c} REVERSE`}),o.insertHex("5f",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return l===0?`${u} BLKDROP`:`${l} ${u} BLKPUSH`}),o.insertHex("60",8,"PICK"),o.insertHex("61",8,"ROLL"),o.insertHex("62",8,"ROLLREV"),o.insertHex("63",8,"BLKSWX"),o.insertHex("64",8,"REVX"),o.insertHex("65",8,"DROPX"),o.insertHex("66",8,"TUCK"),o.insertHex("67",8,"XCHGX"),o.insertHex("68",8,"DEPTH"),o.insertHex("69",8,"CHKDEPTH"),o.insertHex("6a",8,"ONLYTOPX"),o.insertHex("6b",8,"ONLYX"),o.insertHex("6c",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} BLKDROP2`}),o.insertHex("6d",8,"PUSHNULL"),o.insertHex("6e",8,"ISNULL"),o.insertHex("6f0",12,s=>{let l=s.loadUint(4);return l===0?"NIL":l===1?"SINGLE":l===2?"PAIR":l===3?"TRIPLE":`${l} TUPLE`}),o.insertHex("6f1",12,s=>`${s.loadUint(4)} INDEX`),o.insertHex("6f2",12,s=>`${s.loadUint(4)} UNTUPLE`),o.insertHex("6f3",12,s=>{let l=s.loadUint(4);return l===0?"CHKTUPLE":`${l} UNPACKFIRST`}),o.insertHex("6f4",12,s=>`${s.loadUint(4)} EXPLODE`),o.insertHex("6f5",12,s=>`${s.loadUint(4)} SETINDEX`),o.insertHex("6f6",12,s=>`${s.loadUint(4)} INDEXQ`),o.insertHex("6f7",12,s=>`${s.loadUint(4)} SETINDEXQ`),o.insertHex("6f80",16,"TUPLEVAR"),o.insertHex("6f81",16,"INDEXVAR"),o.insertHex("6f82",16,"UNTUPLEVAR"),o.insertHex("6f83",16,"UNPACKFIRSTVAR"),o.insertHex("6f84",16,"EXPLODEVAR"),o.insertHex("6f85",16,"SETINDEXVAR"),o.insertHex("6f86",16,"INDEXVARQ"),o.insertHex("6f87",16,"SETINDEXVARQ"),o.insertHex("6f88",16,"TLEN"),o.insertHex("6f89",16,"QTLEN"),o.insertHex("6f8a",16,"ISTUPLE"),o.insertHex("6f8b",16,"LAST"),o.insertHex("6f8c",16,"TPUSH"),o.insertHex("6f8d",16,"TPOP"),o.insertHex("6fa0",16,"NULLSWAPIF"),o.insertHex("6fa1",16,"NULLSWAPIFNOT"),o.insertHex("6fa2",16,"NULLROTRIF"),o.insertHex("6fa3",16,"NULLROTRIFNOT"),o.insertHex("6fa4",16,"NULLSWAPIF2"),o.insertHex("6fa5",16,"NULLSWAPIFNOT2"),o.insertHex("6fa6",16,"NULLROTRIF2"),o.insertHex("6fa7",16,"NULLROTRIFNOT2"),o.insertHex("6fb",12,s=>{let l=s.loadUint(2),u=s.loadUint(2);return`${l} ${u} INDEX2`}),o.insertHex("7",4,s=>`${s.loadInt(4)} PUSHINT`),o.insertHex("80",8,s=>`${s.loadInt(8)} PUSHINT`),o.insertHex("81",8,s=>`${s.loadInt(16)} PUSHINT`),o.insertHex("82",8,s=>{let u=8*s.loadUint(5)+19;return`${s.loadIntBig(u).toString(10)} PUSHINT`}),o.insertHex("83",8,s=>`${s.loadUint(8)+1} PUSHPOW2`),o.insertHex("84",8,s=>`${s.loadUint(8)+1} PUSHPOW2DEC`),o.insertHex("850000",8,s=>`${s.loadUint(8)+1} PUSHNEGPOW2`),o.insertHex("88",8,"PUSHREF"),o.insertHex("89",8,"PUSHREFSLICE"),o.insertHex("8a",8,"PUSHREFCONT"),o.insertHex("8b",8,s=>{let u=8*s.loadUint(4)+4;return a(s,u),"PUSHSLICE"}),o.insertHex("8c0000",8,s=>{let l=s.loadUint(2)+1,u=s.loadUint(5);return a(s,8*u+1,l),"PUSHSLICE"}),o.insertHex("8d",8,s=>{let l=s.loadUint(3),u=s.loadUint(7);return a(s,8*u+6,l),"PUSHSLICE"}),o.insertHex("8E",7,(s,l)=>{let u=s.loadUint(9),c=u>>7&3,d=(u&127)*8,g=a(s,d,c);return`<{ -${(0,t.decompile)(g,l+2)}${new Array(l).fill(" ").join("")}}> PUSHCONT`}),o.insertHex("9",4,(s,l)=>{let u=s.loadUint(4)*8,c=a(s,u);return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> PUSHCONT`}),o.insertHex("a00000",8,"ADD"),o.insertHex("a10000",8,"SUB"),o.insertHex("a20000",8,"SUBR"),o.insertHex("a30000",8,"NEGATE"),o.insertHex("a40000",8,"INC"),o.insertHex("a50000",8,"DEC"),o.insertHex("a60000",8,s=>`${s.loadInt(8)} ADDCONST`),o.insertHex("a70000",8,s=>`${s.loadInt(8)} MULCONST`),o.insertHex("a80000",8,"MUL"),o.insertHex("A9",8,s=>{let l=s.loadBit(),u=s.loadUint(2),c=s.loadBit(),d=s.loadUint(2),g=s.loadUint(2),x="";if(l&&(x+="MUL"),u==0)x+="DIV";else if(u==1?x="RSHIFT":x="LSHIFT",!c)x+=" s0";else{let w=s.loadUint(8)+1;x+=` ${w}`}return d===1?x+=" QOUT":d===2?x+=" REM":d===3&&(x+=" BOTH"),g===1?x+=" R":g==2&&(x+=" C"),x}),o.insertHex("aa",8,s=>`${s.loadUint(8)+1} LSHIFT`),o.insertHex("ab",8,s=>`${s.loadUint(8)+1} RSHIFT`),o.insertHex("ac",8,"LSHIFT"),o.insertHex("ad",8,"RSHIFT"),o.insertHex("ae",8,"POW2"),o.insertHex("b0",8,"AND"),o.insertHex("b1",8,"OR"),o.insertHex("b2",8,"XOR"),o.insertHex("b3",8,"NOT"),o.insertHex("b4",8,s=>`${s.loadUint(8)+1} FITS`),o.insertHex("b5",8,s=>`${s.loadUint(8)+1} UFITS`),o.insertHex("b600",16,"FITSX"),o.insertHex("b601",16,"UFITSX"),o.insertHex("b602",16,"BITSIZE"),o.insertHex("b603",16,"UBITSIZE"),o.insertHex("b608",16,"MIN"),o.insertHex("b609",16,"MAX"),o.insertHex("b60a",16,"MINMAX"),o.insertHex("b60b",16,"ABS"),o.insertHex("b7a0",16,"QADD"),o.insertHex("b7a1",16,"QSUB"),o.insertHex("b7a2",16,"QSUBR"),o.insertHex("b7a3",16,"QNEGATE"),o.insertHex("b7a4",16,"QINC"),o.insertHex("b7a5",16,"QDEC"),o.insertHex("b7a6",16,s=>`${s.loadInt(8)} QADDCONST`),o.insertHex("b7a7",16,s=>`${s.loadInt(8)} QMULCONST`),o.insertHex("b7a8",16,"QMUL"),o.insertHex("b7a9",16,s=>{let l=s.loadBit(),u=s.loadUint(2),c=s.loadBit(),d=s.loadUint(2),g=s.loadUint(2),x="Q";if(l&&(x+="MUL"),u==0)x+="DIV";else if(u==1?x="RSHIFT":x="LSHIFT",!c)x+=" s0";else{let w=s.loadUint(8)+1;x+=` ${w}`}return d===1?x+=" QOUT":d===2?x+=" REM":d===3&&(x+=" BOTH"),g===1?x+=" R":g==2&&(x+=" C"),x}),o.insertHex("b7aa",16,s=>`${s.loadUint(8)+1} QLSHIFT`),o.insertHex("b7ab",16,s=>`${s.loadUint(8)+1} QLSHIFT`),o.insertHex("b7ac",16,"QLSHIFT"),o.insertHex("b7ad",16,"QRSHIFT"),o.insertHex("b7ae",16,"QPOW2"),o.insertHex("b7b0",16,"QAND"),o.insertHex("b7b1",16,"QOR"),o.insertHex("b7b2",16,"QXOR"),o.insertHex("b7b3",16,"QNOT"),o.insertHex("b7b4",16,s=>`${s.loadUint(8)+1} QFITS`),o.insertHex("b7b5",16,s=>`${s.loadUint(8)+1} QUFITS`),o.insertHex("b7b600",24,"QFITSX"),o.insertHex("b7b601",24,"QUFITSX"),o.insertHex("b7b602",24,"QBITSIZE"),o.insertHex("b7b603",24,"QUBITSIZE"),o.insertHex("b7b608",24,"QMIN"),o.insertHex("b7b609",24,"QMAX"),o.insertHex("b7b60a",24,"QMINMAX"),o.insertHex("b7b60b",24,"QABS"),o.insertHex("b7b8",16,"QSGN"),o.insertHex("b7b9",16,"QLESS"),o.insertHex("b7ba",16,"QEQUAL"),o.insertHex("b7bb",16,"QLEQ"),o.insertHex("b7bc",16,"QGREATER"),o.insertHex("b7bd",16,"QNEQ"),o.insertHex("b7be",16,"QGEQ"),o.insertHex("b7bf",16,"QCMP"),o.insertHex("b7c0",16,s=>`${s.loadInt(8)} QEQINT`),o.insertHex("b7c1",16,s=>`${s.loadInt(8)} QLESSINT`),o.insertHex("b7c2",16,s=>`${s.loadInt(8)} QGTINT`),o.insertHex("b7c3",16,s=>`${s.loadInt(8)} QNEQINT`),o.insertHex("b8",8,"SGN"),o.insertHex("b9",8,"LESS"),o.insertHex("ba",8,"EQUAL"),o.insertHex("bb",8,"LEQ"),o.insertHex("bc",8,"GREATER"),o.insertHex("bd",8,"NEQ"),o.insertHex("be",8,"GEQ"),o.insertHex("bf",8,"CMP"),o.insertHex("c0",8,s=>`${s.loadInt(8)} EQINT`),o.insertHex("c1",8,s=>`${s.loadInt(8)} LESSINT`),o.insertHex("c2",8,s=>`${s.loadInt(8)} GTINT`),o.insertHex("c3",8,s=>`${s.loadInt(8)} NEQINT`),o.insertHex("c4",8,"ISNAN"),o.insertHex("c5",8,"CHKNAN"),o.insertHex("c700",16,"SEMPTY"),o.insertHex("c701",16,"SDEMPTY"),o.insertHex("c702",16,"SREMPTY"),o.insertHex("c703",16,"SDFIRST"),o.insertHex("c704",16,"SDLEXCMP"),o.insertHex("c705",16,"SDEQ"),o.insertHex("c708",16,"SDPFX"),o.insertHex("c709",16,"SDPFXREV"),o.insertHex("c70a",16,"SDPPFX"),o.insertHex("c70b",16,"SDPPFXREV"),o.insertHex("c70c",16,"SDSFX"),o.insertHex("c70d",16,"SDSFXREV"),o.insertHex("c70e",16,"SDPSFX"),o.insertHex("c70f",16,"SDPSFXREV"),o.insertHex("c710",16,"SDCNTLEAD0"),o.insertHex("c711",16,"SDCNTLEAD1"),o.insertHex("c712",16,"SDCNTTRAIL0"),o.insertHex("c713",16,"SDCNTTRAIL1"),o.insertHex("c8",8,"NEWC"),o.insertHex("c9",8,"ENDC"),o.insertHex("ca",8,s=>`${s.loadUint(8)+1} STI`),o.insertHex("cb",8,s=>`${s.loadUint(8)+1} STU`),o.insertHex("cc",8,"STREF"),o.insertHex("cd",8,"ENDCST"),o.insertHex("ce",8,"STSLICE"),o.insertHex("cf00",13,s=>{let l=s.loadUint(3),u=!(l&1),c="ST";return c+=u?"I":"U",c+="X",l&2&&(c+="R"),l&4&&(c+="Q"),c}),o.insertHex("cf08",13,s=>{let l=s.loadUint(11),u=(l&255)+1,c=!(l&256),d="ST";return d+=c?"I":"U",l&512&&(d+="R"),l&1024&&(d+="Q"),`${u} ${d}`}),o.insertHex("cf10",16,"STREF"),o.insertHex("cf11",16,"STBREF"),o.insertHex("cf12",16,"STSLICE"),o.insertHex("cf13",16,"STB"),o.insertHex("cf14",16,"STREFR"),o.insertHex("cf15",16,"STBREFR"),o.insertHex("cf16",16,"STSLICER"),o.insertHex("cf17",16,"STBR"),o.insertHex("cf18",16,"STREFQ"),o.insertHex("cf19",16,"STBREFQ"),o.insertHex("cf1a",16,"STSLICEQ"),o.insertHex("cf1b",16,"STBQ"),o.insertHex("cf1c",16,"STREFRQ"),o.insertHex("cf1d",16,"STBREFRQ"),o.insertHex("cf1e",16,"STSLICERQ"),o.insertHex("cf1f",16,"STBRQ"),o.insertHex("cf20",15,s=>s.loadUint(1)===0?"STREFCONST":"STREF2CONST"),o.insertHex("cf23",16,"ENDXC"),o.insertHex("cf28",14,s=>{let l=s.loadUint(2);return`ST${!(l&1)?"I":"U"}LE${l&2?"8":"4"}`}),o.insertHex("cf30",16,"BDEPTH"),o.insertHex("cf31",16,"BBITS"),o.insertHex("cf32",16,"BREFS"),o.insertHex("cf33",16,"BBITREFS"),o.insertHex("cf35",16,"BREMBITS"),o.insertHex("cf36",16,"BREMREFS"),o.insertHex("cf37",16,"BREMBITREFS"),o.insertHex("cf38",16,s=>`${s.loadUint(8)+1} BCHKBITS`),o.insertHex("cf39",16,"BCHKBITS"),o.insertHex("cf3a",16,"BCHKREFS"),o.insertHex("cf3b",16,"BCHKBITREFS"),o.insertHex("cf3c",16,s=>`${s.loadUint(8)+1} BCHKBITSQ`),o.insertHex("cf3d",16,"BCHKBITSQ"),o.insertHex("cf3e",16,"BCHKREFSQ"),o.insertHex("cf3f",16,"BCHKBITREFSQ"),o.insertHex("cf40",16,"STZEROES"),o.insertHex("cf41",16,"STONES"),o.insertHex("cf42",16,"STSAME"),o.insertHex("cf8",9,s=>{let l=s.loadUint(2),u=s.loadUint(3)*8+1;return a(s,u,l),"STSLICECONST"}),o.insertHex("d0",8,"CTOS"),o.insertHex("d1",8,"ENDS"),o.insertHex("d2",8,s=>`${s.loadUint(8)+1} LDI`),o.insertHex("d3",8,s=>`${s.loadUint(8)+1} LDU`),o.insertHex("d4",8,"LDREF"),o.insertHex("d5",8,"LDREFRTOS"),o.insertHex("d6",8,s=>`${s.loadUint(8)+1} LDSLICE`),o.insertHex("d70",12,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit();return`${l?s.loadUint(8)+1+" ":""}${c?"PLD":"LD"}${d?"U":"I"}${u?"Q":""}`}),o.insertHex("d710",13,s=>`${32*(s.loadUint(3)+1+1)} PLDUZ`),o.insertHex("d718",14,s=>{let l=s.loadBit();return`${s.loadBit()?"PLD":"LD"}SLICEX${l?"Q":""}`}),o.insertHex("d71c",14,s=>{let l=s.loadBit(),u=s.loadBit();return`${s.loadUint(8)+1} ${u?"PLD":"LD"}SLICEX${l?"Q":""}`}),o.insertHex("d720",16,"SDCUTFIRST"),o.insertHex("d721",16,"SDSKIPFIRST"),o.insertHex("d722",16,"SDCUTLAST"),o.insertHex("d723",16,"SDSKIPLAST"),o.insertHex("d724",16,"SDSUBSTR"),o.insertHex("d726",16,"SDBEGINSX"),o.insertHex("d727",16,"SDBEGINSXQ"),o.insertHex("d728",13,s=>(s.loadUint(8),"SDBEGINS")),o.insertHex("d730",16,"SCUTFIRST"),o.insertHex("d731",16,"SSKIPFIRST"),o.insertHex("d732",16,"SCUTLAST"),o.insertHex("d733",16,"SSKIPLAST"),o.insertHex("d734",16,"SUBSLICE"),o.insertHex("d736",16,"SPLIT"),o.insertHex("d737",16,"SPLITQ"),o.insertHex("d739",16,"XCTOS"),o.insertHex("d73a",16,"XLOAD"),o.insertHex("d73b",16,"XLOADQ"),o.insertHex("d741",16,"SCHKBITS"),o.insertHex("d742",16,"SCHKREFS"),o.insertHex("d743",16,"SCHKBITREFS"),o.insertHex("d745",16,"SCHKBITSQ"),o.insertHex("d746",16,"SCHKREFSQ"),o.insertHex("d747",16,"SCHKBITREFSQ"),o.insertHex("d748",16,"PLDREFVAR"),o.insertHex("d749",16,"SBITS"),o.insertHex("d74a",16,"SREFS"),o.insertHex("d74b",16,"SBITREFS"),o.insertHex("d74c",14,s=>`${s.loadUint(2)} PLDREFIDX`),o.insertHex("d750",12,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit();return`${u?"PLD":"LD"}${d?"U":"I"}LE${c?"8":"4"}${l?"Q":""}`}),o.insertHex("d760",16,"LDZEROES"),o.insertHex("d761",16,"LDONES"),o.insertHex("d762",16,"LDSAME"),o.insertHex("d764",16,"SDEPTH"),o.insertHex("d765",16,"CDEPTH"),o.insertHex("d8",8,"EXECUTE"),o.insertHex("d9",8,"JMPX"),o.insertHex("da",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} CALLXARGS`}),o.insertHex("db0",12,s=>`${s.loadUint(4)} CALLXARGS`),o.insertHex("db1",12,s=>`${s.loadUint(4)} JMPXARGS`),o.insertHex("db2",12,s=>`${s.loadUint(4)} RETARGS`),o.insertHex("db30",16,"RET"),o.insertHex("db31",16,"RETALT"),o.insertHex("db32",16,"RETBOOL"),o.insertHex("db34",16,"CALLCC"),o.insertHex("db35",16,"JMPXDATA"),o.insertHex("db36",16,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l} ${u} CALLCCARGS`}),o.insertHex("db38",16,"CALLXVARARGS"),o.insertHex("db39",16,"RETVARARGS"),o.insertHex("db3a",16,"JMPXVARARGS"),o.insertHex("db3b",16,"CALLCCVARARGS"),o.insertHex("db3c",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> CALLREF`}),o.insertHex("db3d",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> JMPREF`}),o.insertHex("db3e",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> JMPREFDATA`}),o.insertHex("db3f",16,"RETDATA"),o.insertHex("dc",8,"IFRET"),o.insertHex("dd",8,"IFNOTRET"),o.insertHex("de",8,"IF"),o.insertHex("df",8,"IFNOT"),o.insertHex("e0",8,"IFJMP"),o.insertHex("e1",8,"IFNOTJMP"),o.insertHex("e2",8,"IFELSE"),o.insertHex("e300",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREF`}),o.insertHex("e301",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFNOTREF`}),o.insertHex("e302",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFJMPREF`}),o.insertHex("e303",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFNOTJMPREF`}),o.insertHex("e304",16,"CONDSEL"),o.insertHex("e305",16,"CONDSELCHK"),o.insertHex("e308",16,"IFRETALT"),o.insertHex("e309",16,"IFNOTRETALT"),o.insertHex("e30d",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREFELSE`}),o.insertHex("e30e",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFELSEREF`}),o.insertHex("e30f",16,(s,l)=>{let u=s.loadRef().beginParse();return`<{ -${(0,t.decompile)(u,l+2)}${new Array(l).fill(" ").join("")}}> IFREFELSEREF`}),o.insertHex("e314",16,"REPEATBRK"),o.insertHex("e315",16,"REPEATENDBRK"),o.insertHex("e316",16,"UNTILBRK"),o.insertHex("e317",16,"UNTILENDBRK"),o.insertHex("e318",16,"WHILEBRK"),o.insertHex("e319",16,"WHILEENDBRK"),o.insertHex("e31a",16,"AGAINBRK"),o.insertHex("e31b",16,"AGAINENDBRK"),o.insertHex("e38",10,s=>(s.loadUint(6),"(FIXED 879)")),o.insertHex("e3c",10,s=>(s.loadUint(6),"(EXT)")),o.insertHex("e4",8,"REPEAT"),o.insertHex("e5",8,"REPEATEND"),o.insertHex("e6",8,"UNTIL"),o.insertHex("e7",8,"UNTILEND"),o.insertHex("e8",8,"WHILE"),o.insertHex("e9",8,"WHILEEND"),o.insertHex("ea",8,"AGAIN"),o.insertHex("eb",8,"AGAINEND"),o.insertHex("ec",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l}, ${u} SETCONTARGS`}),o.insertHex("ed0",12,s=>`${s.loadUint(4)} RETURNARGS`),o.insertHex("ed10",16,"RETURNVARARGS"),o.insertHex("ed11",16,"SETCONTVARARGS"),o.insertHex("ed12",16,"SETNUMVARARGS"),o.insertHex("ed1e",16,"BLESS"),o.insertHex("ed1f",16,"BLESSVARARGS"),o.insertHex("ed4",12,s=>`c${s.loadUint(4)} PUSH`),o.insertHex("ed5",12,s=>`c${s.loadUint(4)} POP`),o.insertHex("ed6",12,s=>`c${s.loadUint(4)} SETCONT`),o.insertHex("ed7",12,s=>`c${s.loadUint(4)} SETRETCTR`),o.insertHex("ed8",12,s=>`c${s.loadUint(4)} SETALTCTR`),o.insertHex("ed9",12,s=>`c${s.loadUint(4)} POPSAVE`),o.insertHex("eda",12,s=>`c${s.loadUint(4)} SAVE`),o.insertHex("edb",12,s=>`c${s.loadUint(4)} SAVEALT`),o.insertHex("edc",12,s=>`c${s.loadUint(4)} SAVEBOTH`),o.insertHex("ede0",16,"PUSHCTRX"),o.insertHex("ede1",16,"POPCTRX"),o.insertHex("ede2",16,"SETCONTCTRX"),o.insertHex("edf0",16,"BOOLAND"),o.insertHex("edf1",16,"BOOLOR"),o.insertHex("edf2",16,"COMPOSBOTH"),o.insertHex("edf3",16,"ATEXIT"),o.insertHex("edf4",16,"ATEXITALT"),o.insertHex("edf5",16,"SETEXITALT"),o.insertHex("edf6",16,"THENRET"),o.insertHex("edf7",16,"THENRETALT"),o.insertHex("edf8",16,"INVERT"),o.insertHex("edf9",16,"BOOLEVAL"),o.insertHex("edfa",16,"SAMEALT"),o.insertHex("edfb",16,"SAMEALTSAVE"),o.insertHex("ee",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l},${u} BLESSARGS`}),o.insertHex("f0",8,s=>`${s.loadUint(8)} CALLDICT`),o.insertHex("f10",10,s=>`${s.loadUint(14)} CALL`),o.insertHex("f14",10,s=>`${s.loadUint(14)} JMP`),o.insertHex("f18",10,s=>`${s.loadUint(14)} PREPARE`),o.insertHex("f20",10,s=>`${s.loadUint(6)} THROW`),o.insertHex("F24",10,s=>`${s.loadUintBig(6)} THROWIF`),o.insertHex("F28",10,s=>`${s.loadUintBig(6)} THROWIFNOT`),o.insertHex("f2c0",13,s=>`${s.loadUint(11)} THROW`),o.insertHex("f2c8",13,s=>`${s.loadUint(11)} THROWARG`),o.insertHex("f2d0",13,s=>`${s.loadUint(11)} THROWIF`),o.insertHex("f2e0",13,s=>`${s.loadUint(11)} THROWIFNOT`),o.insertHex("f2f0",13,s=>{let l=s.loadBit(),u=s.loadBit();return`THROW${s.loadBit()?"ARG":""}ANY${u||l?"IF":""}${l?"NOT":""}`}),o.insertHex("f2ff",16,"TRY"),o.insertHex("f3",8,s=>{let l=s.loadUint(4),u=s.loadUint(4);return`${l},${u} TRYARGS`}),o.insertHex("f400",16,"STDICT"),o.insertHex("f401",16,"SKIPDICT"),o.insertHex("f402",16,"LDDICTS"),o.insertHex("f403",16,"PLDDICTS"),o.insertHex("f404",16,"LDDICT"),o.insertHex("f405",16,"PLDDICT"),o.insertHex("f406",16,"LDDICTQ"),o.insertHex("f407",16,"PLDDICTQ"),o.insertHex("f40a",16,"DICTGET"),o.insertHex("f40b",16,"DICTGETREF"),o.insertHex("f40c",16,"DICTIGET"),o.insertHex("f40d",16,"DICTIGETREF"),o.insertHex("f40e",16,"DICTUGET"),o.insertHex("f40f",16,"DICTUGETREF"),o.insertHex("f412",16,"DICTSET"),o.insertHex("f413",16,"DICTSETREF"),o.insertHex("f414",16,"DICTISET"),o.insertHex("f415",16,"DICTISETREF"),o.insertHex("f416",16,"DICTUSET"),o.insertHex("f417",16,"DICTUSETREF"),o.insertHex("f41a",16,"DICTSETGET"),o.insertHex("F41B",16,"DICTSETGETREF"),o.insertHex("F41C",16,"DICTISETGET"),o.insertHex("F41D",16,"DICTISETGETREF"),o.insertHex("F41E",16,"DICTUSETGET"),o.insertHex("F41F",16,"DICTUSETGETREF"),o.insertHex("f420",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}REPLACE${c?"REF":""}`}),o.insertHex("f42a",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}REPLACEGET${c?"REF":""}`}),o.insertHex("f432",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}ADD${c?"REF":""}`}),o.insertHex("f43a",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}ADDGET${c?"REF":""}`}),o.insertHex("f441",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}SETB`}),o.insertHex("f445",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}SETGETB`}),o.insertHex("f449",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}REPLACEB`}),o.insertHex("f44d",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}REPLACEGETB`}),o.insertHex("f451",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}ADDB`}),o.insertHex("f455",14,s=>{let l=s.loadBit(),u=s.loadBit();return`DICT${l?u?"U":"I":""}ADDGETB`}),o.insertHex("f459",16,"DICTDEL"),o.insertHex("f45A",16,"DICTIDEL"),o.insertHex("f45B",16,"DICTUDEL"),o.insertHex("f462",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`DICT${d}DELGET${c?"REF":""}`}),o.insertHex("f469",16,"DICTGETOPTREF"),o.insertHex("f46A",16,"DICTIGETOPTREF"),o.insertHex("f46B",16,"DICTUGETOPTREF"),o.insertHex("f46d",16,"DICTSETGETOPTREF"),o.insertHex("f46e",16,"DICTISETGETOPTREF"),o.insertHex("f46f",16,"DICTUSETGETOPTREF"),o.insertHex("f47",12,s=>{let l=s.loadUint(4);return l===0?"PFXDICTSET":l===1?"PFXDICTREPLACE":l===2?"PFXDICTADD":l===3?"PFXDICTDEL":`DICT${l&4?"U":"I"}GET${l&2?"PREV":"NEXT"}${l&1?"EQ":""}`}),o.insertHex("f48",11,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d=s.loadBit(),g=s.loadBit(),x="";return c&&!d?x="I":c&&d&&(x="U"),`DICT${x}${l?"REM":""}${u?"MAX":"MIN"}${g?"REF":""}`}),o.insertHex("f4a0",13,(s,l)=>{if(s.loadBit()){let g=a(s,0,1),x=s.loadUint(10),w;try{w=(0,t.decompileMethodsMap)(g.preloadRef().beginParse(),x,l)}catch(v){(0,i._isDebug)()&&console.error(v),w=g.asCell().toString(" ".repeat(l))}return`${w} ${x} DICTPUSHCONST`}let c=s.loadBit();return`DICT${s.loadBit()?"U":"I"}GET${c?"EXEC":"JMP"}`}),o.insertHex("f4a8",16,"PFXDICTGETQ"),o.insertHex("f4a9",16,"PFXDICTGET"),o.insertHex("f4aa",16,"PFXDICTGETJMP"),o.insertHex("f4ab",16,"PFXDICTGETEXEC"),o.insertHex("f4b1",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`SUBDICT${d}GET${c?"REF":""}`}),o.insertHex("f4b5",13,s=>{let l=s.loadBit(),u=s.loadBit(),c=s.loadBit(),d="";return l&&!u?d="I":l&&u&&(d="U"),`SUBDICT${d}RPGET${c?"REF":""}`}),o.insertHex("f4bc",14,s=>{let l=s.loadBit();return`DICT${s.loadBit()?"U":"I"}GET${l?"EXEC":"JMP"}Z`}),o.insertHex("f800",16,"ACCEPT"),o.insertHex("f801",16,"SETGASLIMIT"),o.insertHex("f80f",16,"COMMIT"),o.insertHex("f810",16,"RANDU256"),o.insertHex("f811",16,"RAND"),o.insertHex("f814",16,"SETRAND"),o.insertHex("f815",16,"ADDRAND"),o.insertHex("f82",12,s=>{let l=s.loadUint(4);return l==3?"NOW":l==4?"BLOCKLT":l==5?"LTIME":l==6?"RANDSEED":l==7?"BALANCE":l==8?"MYADDR":l==9?"CONFIGROOT":`${l} GETPARAM`}),o.insertHex("f830",16,"CONFIGDICT"),o.insertHex("f832",16,"CONFIGPARAM"),o.insertHex("f833",16,"CONFIGOPTPARAM"),o.insertHex("f841",11,s=>`${s.loadUint(5)} GETGLOBVAR`),o.insertHex("f861",11,s=>`${s.loadUint(5)} SETGLOBVAR`),o.insertHex("f900",16,"HASHCU"),o.insertHex("f901",16,"HASHSU"),o.insertHex("f902",16,"SHA256U"),o.insertHex("f910",16,"CHKSIGNU"),o.insertHex("f911",16,"CHKSIGNS"),o.insertHex("f940",16,"CDATASIZEQ"),o.insertHex("f941",16,"CDATASIZE"),o.insertHex("f942",16,"SDATASIZEQ"),o.insertHex("f943",16,"SDATASIZE"),o.insertHex("fa00",16,"LDGRAMS"),o.insertHex("fa01",16,"LDVARINT16"),o.insertHex("fa02",16,"STGRAMS"),o.insertHex("fa03",16,"STVARINT16"),o.insertHex("fa04",16,"LDVARUINT32"),o.insertHex("fa05",16,"LDVARINT32"),o.insertHex("fa06",16,"STVARUINT32"),o.insertHex("fa07",16,"STVARINT32"),o.insertHex("fa40",16,"LDMSGADDR"),o.insertHex("fa41",16,"LDMSGADDRQ"),o.insertHex("fa42",16,"PARSEMSGADDR"),o.insertHex("fa43",16,"PARSEMSGADDRQ"),o.insertHex("fa44",16,"REWRITESTDADDR"),o.insertHex("fa45",16,"REWRITESTDADDRQ"),o.insertHex("fa46",16,"REWRITEVARADDR"),o.insertHex("fa47",16,"REWRITEVARADDRQ"),o.insertHex("fb00",16,"SENDRAWMSG"),o.insertHex("fb02",16,"RAWRESERVE"),o.insertHex("fb03",16,"RAWRESERVEX"),o.insertHex("fb04",16,"SETCODE"),o.insertHex("fb06",16,"SETLIBCODE"),o.insertHex("fb07",16,"CHANGELIB"),o.insertHex("fe",8,s=>{let l=s.loadUint(8);if((l&240)==240){let u=l&15;return`"${s.loadBuffer(u+1).toString("utf-8")}" DEBUGSTR`}return`${l} DEBUG`}),o.insertHex("ff",8,s=>{let l=s.loadUint(8);if((l&240)==240){let u=l&15;if(u==0)return"SETCPX";l=u-16}return`${l} SETCP`}),Qg}var ex={};Object.defineProperty(ex,"__esModule",{value:!0});ex.KnownMethods=void 0;ex.KnownMethods={[0]:"recv_internal",[-1]:"recv_external",[-2]:"run_ticktock",[66763]:"get_full_domain",[68445]:"get_nft_content",[69506]:"get_telemint_token_name",[72748]:"get_sale_data",[76407]:"is_plugin_installed",[78748]:"get_public_key",[80293]:"get_owner",[80697]:"get_auction_info",[81467]:"get_subwallet_id",[82320]:"get_version",[83229]:"owner",[85143]:"seqno",[85719]:"royalty_params",[90228]:"get_editor",[91689]:"get_marketplace_address",[92067]:"get_nft_address_by_index",[93270]:"get_reveal_data",[97026]:"get_wallet_data",[102351]:"get_nft_data",[102491]:"get_collection_data",[103289]:"get_wallet_address",[106029]:"get_jetton_data",[107279]:"get_offer_data",[107653]:"get_plugin_list",[110449]:"get_is_closed",[116695]:"get_reveal_mode",[118054]:"get_username",[122498]:"get_telemint_auction_state",[123660]:"dnsresolve",[128411]:"get_royalty_params",[129619]:"get_telemint_auction_config"};var HR;function CL(){if(HR)return As;HR=1,Object.defineProperty(As,"__esModule",{value:!0}),As.fromBoc=As.fromCode=As.decompileMethodsMap=As.decompile=As.setCodepage=void 0;const e=uo,t=N0e(),r=ex,i=ny;let a=t.CP0Auto;function o(g){a=g}As.setCodepage=o;function s(g,x){let w="";const v=_=>{if(_ instanceof e.Cell){w+=_.toString(" ".repeat(x||0));return}if(x)for(let E=0;E0;){let _=g.loadBit();y+=_?"1":"0";let E=a.find(y,2);if(E.length>1||E.length==1&&y.length!==E[0].length)continue;if(E.length==0){let B=(0,e.beginCell)();for(let U of Array.from(y).map(L=>L!="0"))B.storeBit(U);B.storeSlice(g),v(B.asCell());continue}let A=a.getOp(y);if(y="",typeof A=="string")v(A);else if(typeof A=="function"){let B=A(g,x||0);v(B)}g.remainingBits===0&&g.remainingRefs>0&&(g=g.loadRef().beginParse())}return w}As.decompile=s;function l(){return{serialize:(g,x)=>{x.storeSlice(g)},parse:g=>g}}function u(g,x,w){var v;let y=g.loadDictDirect(e.Dictionary.Keys.Int(x),l()),_=new Map;for(let[B,U]of y)try{_.set(B,s(U,(w||0)+4))}catch(L){(0,i._isDebug)()&&console.error(L),_.set(B,U.asCell().toString(" ".repeat((w||0)+4)))}let E="";const A=B=>{if(w)for(let U=0;U-1};function iy(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function tE(e){return typeof e!="string"&&(e=String(e)),e}function rE(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return ds.iterable&&(t[Symbol.iterator]=function(){return t}),t}function wa(e){this.map={},e instanceof wa?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}wa.prototype.append=function(e,t){e=iy(e),t=tE(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};wa.prototype.delete=function(e){delete this.map[iy(e)]};wa.prototype.get=function(e){return e=iy(e),this.has(e)?this.map[e]:null};wa.prototype.has=function(e){return this.map.hasOwnProperty(iy(e))};wa.prototype.set=function(e,t){this.map[iy(e)]=tE(t)};wa.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)};wa.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),rE(e)};wa.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),rE(e)};wa.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),rE(e)};ds.iterable&&(wa.prototype[Symbol.iterator]=wa.prototype.entries);function t5(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function EL(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function z0e(e){var t=new FileReader,r=EL(t);return t.readAsArrayBuffer(e),r}function H0e(e){var t=new FileReader,r=EL(t);return t.readAsText(e),r}function W0e(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i-1?t:e}function Hf(e,t){if(!(this instanceof Hf))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof Hf){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new wa(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new wa(t.headers)),this.method=q0e(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+new Date().getTime());else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Hf.prototype.clone=function(){return new Hf(this,{body:this._bodyInit})};function K0e(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var i=r.split("="),a=i.shift().replace(/\+/g," "),o=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}}),t}function G0e(e){var t=new wa,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(i){return i.indexOf(` -`)===0?i.substr(1,i.length):i}).forEach(function(i){var a=i.split(":"),o=a.shift().trim();if(o){var s=a.join(":").trim();t.append(o,s)}}),t}kL.call(Hf.prototype);function Cu(e,t){if(!(this instanceof Cu))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new wa(t.headers),this.url=t.url||"",this._initBody(e)}kL.call(Cu.prototype);Cu.prototype.clone=function(){return new Cu(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new wa(this.headers),url:this.url})};Cu.error=function(){var e=new Cu(null,{status:0,statusText:""});return e.type="error",e};var Y0e=[301,302,303,307,308];Cu.redirect=function(e,t){if(Y0e.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Cu(null,{status:t,headers:{location:e}})};var Kd=Ga.DOMException;try{new Kd}catch{Kd=function(t,r){this.message=t,this.name=r;var i=Error(t);this.stack=i.stack},Kd.prototype=Object.create(Error.prototype),Kd.prototype.constructor=Kd}function AL(e,t){return new Promise(function(r,i){var a=new Hf(e,t);if(a.signal&&a.signal.aborted)return i(new Kd("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var u={status:o.status,statusText:o.statusText,headers:G0e(o.getAllResponseHeaders()||"")};u.url="responseURL"in o?o.responseURL:u.headers.get("X-Request-URL");var c="response"in o?o.response:o.responseText;setTimeout(function(){r(new Cu(c,u))},0)},o.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){i(new Kd("Aborted","AbortError"))},0)};function l(u){try{return u===""&&Ga.location.href?Ga.location.href:u}catch{return u}}o.open(a.method,l(a.url),!0),a.credentials==="include"?o.withCredentials=!0:a.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(ds.blob?o.responseType="blob":ds.arrayBuffer&&a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof wa)?Object.getOwnPropertyNames(t.headers).forEach(function(u){o.setRequestHeader(u,tE(t.headers[u]))}):a.headers.forEach(function(u,c){o.setRequestHeader(c,u)}),a.signal&&(a.signal.addEventListener("abort",s),o.onreadystatechange=function(){o.readyState===4&&a.signal.removeEventListener("abort",s)}),o.send(typeof a._bodyInit>"u"?null:a._bodyInit)})}AL.polyfill=!0;Ga.fetch||(Ga.fetch=AL,Ga.Headers=wa,Ga.Request=Hf,Ga.Response=Cu);self.fetch.bind(self);var Q0e=xn&&xn.__awaiter||function(e,t,r,i){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(d){try{c(i.next(d))}catch(g){s(g)}}function u(d){try{c(i.throw(d))}catch(g){s(g)}}function c(d){d.done?o(d.value):a(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(tx,"__esModule",{value:!0});tx.Nodes=void 0;const X0e=2*60*1e3;class Z0e{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(t){return Q0e(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let r=[];try{r=yield(yield fetch(t)).json()}catch(i){throw new Error(`exception in fetch(${t}): ${i}`)}for(const i of r)i.Healthy==="1"&&this.topology.push(i);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(t){var r;const i=[];for(const a of this.topology)this.initTime-a.Mngr.successTS0&&((r=a.Mngr)===null||r===void 0?void 0:r.health[t])&&i.push(a);return i}}tx.Nodes=Z0e;const J0e="@orbs-network/ton-access",eye="2.3.0",tye="Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",rye="lib/index.js",nye="lib/index.js",iye="lib/index.d.ts",oye=["lib/**/*"],aye={test:"env mocha -r ts-node/register test/**/*.ts","test:v2":"env mocha -r ts-node/register test/ton-v2.ts","test:v4":"env mocha -r ts-node/register test/ton-v4.ts",cleanup:"rimraf ./lib","build:web:reg":"esbuild ./lib/web.js --bundle --sourcemap --target=es2015 --outfile=./dist/index.js","build:web:min":"esbuild ./lib/web.js --bundle --minify --target=es2015 --outfile=./dist/index.min.js","build:web":"rimraf ./dist && npm run build:web:reg && npm run build:web:min",build:"npm run lint && rimraf ./lib && tsc && npm run build:web",format:'prettier --write "src/**/*.ts"',lint:"tslint -p tsconfig.json",prepare:"npm run build",prepublishOnly:"npm test && npm run lint",preversion:"npm run lint",version:"npm run format && git add -A src",postversion:"git push && git push --tags"},sye={type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},lye="yuval@orbs.com",uye="MIT",cye={url:"https://github.com/orbs-network/ton-access/issues"},dye="https://github.com/orbs-network/ton-access#readme",fye={"isomorphic-fetch":"^3.0.0"},pye={"@types/bn.js":"^5.1.1","@types/chai":"^4.3.4","@types/isomorphic-fetch":"^0.0.36","@types/mocha":"^10.0.0",buffer:"^6.0.3",chai:"^4.3.7",esbuild:"^0.15.14",mocha:"^10.1.0",prettier:"^2.7.1",rimraf:"^3.0.2",ton:"^12.1.3","ton-lite-client":"npm:@truecarry/ton-lite-client@^1.6.1",tonweb:"^0.0.58","ts-node":"^10.9.1",tslib:"^2.4.0",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0"},hye={name:J0e,version:eye,description:tye,source:rye,main:nye,types:iye,files:oye,scripts:aye,repository:sye,author:lye,license:uye,bugs:cye,homepage:dye,dependencies:fye,devDependencies:pye};var Zh=xn&&xn.__awaiter||function(e,t,r,i){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(d){try{c(i.next(d))}catch(g){s(g)}}function u(d){try{c(i.throw(d))}catch(g){s(g)}}function c(d){d.done?o(d.value):a(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.getHttpV4Endpoint=Pl.getHttpV4Endpoints=PL=Pl.getHttpEndpoint=Pl.getHttpEndpoints=Pl.Access=void 0;const gye=tx;class TL{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new gye.Nodes}init(){return Zh(this,void 0,void 0,function*(){const t=hye;yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${t.version}`)})}makeProtonet(t,r){let i="";switch(t){case"toncenter-api-v2":i+="v2-";break;case"ton-api-v4":i+="v4-";break}return i+=r,i}weightedRandom(t){let r=0;for(const o of t)r+=o.Weight;const i=Math.floor(Math.random()*r);let a=0;for(const o of t){if(i>=a&&i{if(!e)return null;const a=await Zf(),o=Qn.Address.parse(e);let{code:s,data:l}=await a.getContractState(o),u=Qn.Cell.fromBoc(s)[0],c=Qn.Cell.fromBoc(l)[0];const d=await a.getBalance(o);let g;try{g=_L.fromCode(u)}catch(v){g=v?.toString()}const x=u.hash(),w=c.hash();return{codeCellHash:{base64:x.toString("base64"),hex:x.toString("hex")},dataCellHash:{base64:w.toString("base64"),hex:w.toString("hex")},decompiled:g,balance:Qn.fromNano(d)}});return{isLoading:t,error:r,data:i}}(()=>{var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(n=>typeof Tl<"u"?Tl:typeof Proxy<"u"?new Proxy(n,{get:(p,m)=>(typeof Tl<"u"?Tl:p)[m]}):n)(function(n){if(typeof Tl<"u")return Tl.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')}),l=(n,p)=>()=>(n&&(p=n(n=0)),p),u=(n,p)=>()=>(p||n((p={exports:{}}).exports,p),p.exports),c=(n,p)=>{for(var m in p)t(n,m,{get:p[m],enumerable:!0})},d=(n,p,m,S)=>{if(p&&typeof p=="object"||typeof p=="function")for(let f of i(p))!o.call(n,f)&&f!==m&&t(n,f,{get:()=>p[f],enumerable:!(S=r(p,f))||S.enumerable});return n},g=(n,p,m)=>(m=n!=null?e(a(n)):{},d(p||!n||!n.__esModule?t(m,"default",{value:n,enumerable:!0}):m,n)),x=n=>d(t({},"__esModule",{value:!0}),n),w,v=l(()=>{w=globalThis}),y=l(()=>{}),_=l(()=>{}),E={};c(E,{addListener:()=>mr,argv:()=>vr,binding:()=>oe,browser:()=>At,chdir:()=>ae,config:()=>Ut,cwd:()=>q,default:()=>Ot,emit:()=>Ae,env:()=>Xt,hrtime:()=>te,nextTick:()=>H,off:()=>Pt,on:()=>Gt,once:()=>ne,platform:()=>Rt,release:()=>xt,removeAllListeners:()=>Te,removeListener:()=>Dt,title:()=>ir,umask:()=>M,uptime:()=>ue,version:()=>Et,versions:()=>St});function A(){throw new Error("setTimeout has not been defined")}function B(){throw new Error("clearTimeout has not been defined")}function U(n){if(he===setTimeout)return setTimeout(n,0);if((he===A||!he)&&setTimeout)return he=setTimeout,setTimeout(n,0);try{return he(n,0)}catch{try{return he.call(null,n,0)}catch{return he.call(this,n,0)}}}function L(n){if(xe===clearTimeout)return clearTimeout(n);if((xe===B||!xe)&&clearTimeout)return xe=clearTimeout,clearTimeout(n);try{return xe(n)}catch{try{return xe.call(null,n)}catch{return xe.call(this,n)}}}function K(){!ct||!De||(ct=!1,De.length?J=De.concat(J):ze=-1,J.length&&V())}function V(){if(!ct){var n=U(K);ct=!0;for(var p=J.length;p;){for(De=J,J=[];++ze1)for(var m=1;m{v(),y(),_(),yt(),be(),he=A,xe=B,typeof w.setTimeout=="function"&&(he=setTimeout),typeof w.clearTimeout=="function"&&(xe=clearTimeout),J=[],ct=!1,ze=-1,z.prototype.run=function(){this.fun.apply(null,this.array)},ir="browser",Rt="browser",At=!0,Xt={},vr=[],Et="",St={},xt={},Ut={},Gt=Y,mr=Y,ne=Y,Pt=Y,Dt=Y,Te=Y,Ae=Y,ot=w.performance||{},$t=ot.now||ot.mozNow||ot.msNow||ot.oNow||ot.webkitNow||function(){return new Date().getTime()},tr=new Date,Ot={nextTick:H,title:ir,browser:At,env:Xt,argv:vr,version:Et,versions:St,on:Gt,addListener:mr,once:ne,off:Pt,removeListener:Dt,removeAllListeners:Te,emit:Ae,binding:oe,cwd:q,chdir:ae,umask:M,hrtime:te,platform:Rt,release:xt,config:Ut,uptime:ue}}),be=l(()=>{br()});function se(){lt=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,m=n.length;p0)throw new Error("Invalid string. Length must be a multiple of 4");h=n[I-2]==="="?2:n[I-1]==="="?1:0,b=new je(I*3/4-h),S=h>0?I-4:I;var O=0;for(p=0,m=0;p>16&255,b[O++]=f>>8&255,b[O++]=f&255;return h===2?(f=me[n.charCodeAt(p)]<<2|me[n.charCodeAt(p+1)]>>4,b[O++]=f&255):h===1&&(f=me[n.charCodeAt(p)]<<10|me[n.charCodeAt(p+1)]<<4|me[n.charCodeAt(p+2)]>>2,b[O++]=f>>8&255,b[O++]=f&255),b}function $(n){return Q[n>>18&63]+Q[n>>12&63]+Q[n>>6&63]+Q[n&63]}function C(n,p,m){for(var S,f=[],h=p;hO?O:I+b));return S===1?(p=n[m-1],f+=Q[p>>2],f+=Q[p<<4&63],f+="=="):S===2&&(p=(n[m-2]<<8)+n[m-1],f+=Q[p>>10],f+=Q[p>>4&63],f+=Q[p<<2&63],f+="="),h.push(f),h.join("")}var Q,me,je,lt,ur=l(()=>{v(),y(),_(),yt(),be(),Q=[],me=[],je=typeof Uint8Array<"u"?Uint8Array:Array,lt=!1});function Dr(n,p,m,S,f){var h,b,I=f*8-S-1,O=(1<>1,D=-7,T=m?f-1:0,ee=m?-1:1,we=n[p+T];for(T+=ee,h=we&(1<<-D)-1,we>>=-D,D+=I;D>0;h=h*256+n[p+T],T+=ee,D-=8);for(b=h&(1<<-D)-1,h>>=-D,D+=S;D>0;b=b*256+n[p+T],T+=ee,D-=8);if(h===0)h=1-P;else{if(h===O)return b?NaN:(we?-1:1)*(1/0);b=b+Math.pow(2,S),h=h-P}return(we?-1:1)*b*Math.pow(2,h-S)}function hr(n,p,m,S,f,h){var b,I,O,P=h*8-f-1,D=(1<>1,ee=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,we=S?0:h-1,Se=S?1:-1,He=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(I=isNaN(p)?1:0,b=D):(b=Math.floor(Math.log(p)/Math.LN2),p*(O=Math.pow(2,-b))<1&&(b--,O*=2),b+T>=1?p+=ee/O:p+=ee*Math.pow(2,1-T),p*O>=2&&(b++,O/=2),b+T>=D?(I=0,b=D):b+T>=1?(I=(p*O-1)*Math.pow(2,f),b=b+T):(I=p*Math.pow(2,T-1)*Math.pow(2,f),b=0));f>=8;n[m+we]=I&255,we+=Se,I/=256,f-=8);for(b=b<0;n[m+we]=b&255,we+=Se,b/=256,P-=8);n[m+we-Se]|=He*128}var Rr=l(()=>{v(),y(),_(),yt(),be()}),Gr,Nr,Vn=l(()=>{v(),y(),_(),yt(),be(),Gr={}.toString,Nr=Array.isArray||function(n){return Gr.call(n)=="[object Array]"}});function An(){return ht.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tn(n,p){if(An()=An())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+An().toString(16)+" bytes");return n|0}function le(n){return!!(n!=null&&n._isBuffer)}function Ie(n,p){if(le(n))return n.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var m=n.length;if(m===0)return 0;for(var S=!1;;)switch(p){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":case void 0:return Pr(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return $n(n).length;default:if(S)return Pr(n).length;p=(""+p).toLowerCase(),S=!0}}function Ee(n,p,m){var S=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,p>>>=0,m<=p))return"";for(n||(n="utf8");;)switch(n){case"hex":return yr(this,p,m);case"utf8":case"utf-8":return ge(this,p,m);case"ascii":return tt(this,p,m);case"latin1":case"binary":return st(this,p,m);case"base64":return W(this,p,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lr(this,p,m);default:if(S)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),S=!0}}function F(n,p,m){var S=n[p];n[p]=n[m],n[m]=S}function Ne(n,p,m,S,f){if(n.length===0)return-1;if(typeof m=="string"?(S=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,isNaN(m)&&(m=f?0:n.length-1),m<0&&(m=n.length+m),m>=n.length){if(f)return-1;m=n.length-1}else if(m<0)if(f)m=0;else return-1;if(typeof p=="string"&&(p=ht.from(p,S)),le(p))return p.length===0?-1:Qt(n,p,m,S,f);if(typeof p=="number")return p=p&255,ht.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(n,p,m):Uint8Array.prototype.lastIndexOf.call(n,p,m):Qt(n,[p],m,S,f);throw new TypeError("val must be string, number or Buffer")}function Qt(n,p,m,S,f){var h=1,b=n.length,I=p.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(n.length<2||p.length<2)return-1;h=2,b/=2,I/=2,m/=2}function O(we,Se){return h===1?we[Se]:we.readUInt16BE(Se*h)}var P;if(f){var D=-1;for(P=m;Pb&&(m=b-I),P=m;P>=0;P--){for(var T=!0,ee=0;eef&&(S=f)):S=f;var h=p.length;if(h%2!==0)throw new TypeError("Invalid hex string");S>h/2&&(S=h/2);for(var b=0;b239?4:h>223?3:h>191?2:1;if(f+I<=m){var O,P,D,T;switch(I){case 1:h<128&&(b=h);break;case 2:O=n[f+1],(O&192)===128&&(T=(h&31)<<6|O&63,T>127&&(b=T));break;case 3:O=n[f+1],P=n[f+2],(O&192)===128&&(P&192)===128&&(T=(h&15)<<12|(O&63)<<6|P&63,T>2047&&(T<55296||T>57343)&&(b=T));break;case 4:O=n[f+1],P=n[f+2],D=n[f+3],(O&192)===128&&(P&192)===128&&(D&192)===128&&(T=(h&15)<<18|(O&63)<<12|(P&63)<<6|D&63,T>65535&&T<1114112&&(b=T))}}b===null?(b=65533,I=1):b>65535&&(b-=65536,S.push(b>>>10&1023|55296),b=56320|b&1023),S.push(b),f+=I}return Pe(S)}function Pe(n){var p=n.length;if(p<=hi)return String.fromCharCode.apply(String,n);for(var m="",S=0;SS)&&(m=S);for(var f="",h=p;hm)throw new RangeError("Trying to access beyond buffer length")}function Sr(n,p,m,S,f,h){if(!le(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>f||pn.length)throw new RangeError("Index out of range")}function Kr(n,p,m,S){p<0&&(p=65535+p+1);for(var f=0,h=Math.min(n.length-m,2);f>>(S?f:1-f)*8}function on(n,p,m,S){p<0&&(p=4294967295+p+1);for(var f=0,h=Math.min(n.length-m,4);f>>(S?f:3-f)*8&255}function _n(n,p,m,S,f,h){if(m+S>n.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function In(n,p,m,S,f){return f||_n(n,p,m,4),hr(n,p,m,S,23,4),m+4}function rr(n,p,m,S,f){return f||_n(n,p,m,8),hr(n,p,m,S,52,8),m+8}function pr(n){if(n=Vt(n).replace(Gn,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function Vt(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function jr(n){return n<16?"0"+n.toString(16):n.toString(16)}function Pr(n,p){p=p||1/0;for(var m,S=n.length,f=null,h=[],b=0;b55295&&m<57344){if(!f){if(m>56319){(p-=3)>-1&&h.push(239,191,189);continue}else if(b+1===S){(p-=3)>-1&&h.push(239,191,189);continue}f=m;continue}if(m<56320){(p-=3)>-1&&h.push(239,191,189),f=m;continue}m=(f-55296<<10|m-56320)+65536}else f&&(p-=3)>-1&&h.push(239,191,189);if(f=null,m<128){if((p-=1)<0)break;h.push(m)}else if(m<2048){if((p-=2)<0)break;h.push(m>>6|192,m&63|128)}else if(m<65536){if((p-=3)<0)break;h.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((p-=4)<0)break;h.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return h}function Lr(n){for(var p=[],m=0;m>8,f=m%256,h.push(f),h.push(S);return h}function $n(n){return ce(pr(n))}function Zn(n,p,m,S){for(var f=0;f=p.length||f>=n.length);++f)p[f+m]=n[f];return f}function di(n){return n!==n}function ai(n){return n!=null&&(!!n._isBuffer||_t(n)||fi(n))}function _t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function fi(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&_t(n.slice(0,0))}var cn,hi,Gn,Ei=l(()=>{v(),y(),_(),yt(),be(),ur(),Rr(),Vn(),cn=50,ht.TYPED_ARRAY_SUPPORT=w.TYPED_ARRAY_SUPPORT!==void 0?w.TYPED_ARRAY_SUPPORT:!0,An(),ht.poolSize=8192,ht._augment=function(n){return n.__proto__=ht.prototype,n},ht.from=function(n,p,m){return Ci(null,n,p,m)},ht.TYPED_ARRAY_SUPPORT&&(ht.prototype.__proto__=Uint8Array.prototype,ht.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ht[Symbol.species]),ht.alloc=function(n,p,m){return Ii(null,n,p,m)},ht.allocUnsafe=function(n){return Xi(null,n)},ht.allocUnsafeSlow=function(n){return Xi(null,n)},ht.isBuffer=ai,ht.compare=function(n,p){if(!le(n)||!le(p))throw new TypeError("Arguments must be Buffers");if(n===p)return 0;for(var m=n.length,S=p.length,f=0,h=Math.min(m,S);f0&&(n=this.toString("hex",0,p).match(/.{2}/g).join(" "),this.length>p&&(n+=" ... ")),""},ht.prototype.compare=function(n,p,m,S,f){if(!le(n))throw new TypeError("Argument must be a Buffer");if(p===void 0&&(p=0),m===void 0&&(m=n?n.length:0),S===void 0&&(S=0),f===void 0&&(f=this.length),p<0||m>n.length||S<0||f>this.length)throw new RangeError("out of range index");if(S>=f&&p>=m)return 0;if(S>=f)return-1;if(p>=m)return 1;if(p>>>=0,m>>>=0,S>>>=0,f>>>=0,this===n)return 0;for(var h=f-S,b=m-p,I=Math.min(h,b),O=this.slice(S,f),P=n.slice(p,m),D=0;Df)&&(m=f),n.length>0&&(m<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var h=!1;;)switch(S){case"hex":return or(this,n,p,m);case"utf8":case"utf-8":return Br(this,n,p,m);case"ascii":return Hr(this,n,p,m);case"latin1":case"binary":return kn(this,n,p,m);case"base64":return un(this,n,p,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,n,p,m);default:if(h)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),h=!0}},ht.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},hi=4096,ht.prototype.slice=function(n,p){var m=this.length;n=~~n,p=p===void 0?m:~~p,n<0?(n+=m,n<0&&(n=0)):n>m&&(n=m),p<0?(p+=m,p<0&&(p=0)):p>m&&(p=m),p0&&(f*=256);)S+=this[n+--p]*f;return S},ht.prototype.readUInt8=function(n,p){return p||Or(n,1,this.length),this[n]},ht.prototype.readUInt16LE=function(n,p){return p||Or(n,2,this.length),this[n]|this[n+1]<<8},ht.prototype.readUInt16BE=function(n,p){return p||Or(n,2,this.length),this[n]<<8|this[n+1]},ht.prototype.readUInt32LE=function(n,p){return p||Or(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},ht.prototype.readUInt32BE=function(n,p){return p||Or(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},ht.prototype.readIntLE=function(n,p,m){n=n|0,p=p|0,m||Or(n,p,this.length);for(var S=this[n],f=1,h=0;++h=f&&(S-=Math.pow(2,8*p)),S},ht.prototype.readIntBE=function(n,p,m){n=n|0,p=p|0,m||Or(n,p,this.length);for(var S=p,f=1,h=this[n+--S];S>0&&(f*=256);)h+=this[n+--S]*f;return f*=128,h>=f&&(h-=Math.pow(2,8*p)),h},ht.prototype.readInt8=function(n,p){return p||Or(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},ht.prototype.readInt16LE=function(n,p){p||Or(n,2,this.length);var m=this[n]|this[n+1]<<8;return m&32768?m|4294901760:m},ht.prototype.readInt16BE=function(n,p){p||Or(n,2,this.length);var m=this[n+1]|this[n]<<8;return m&32768?m|4294901760:m},ht.prototype.readInt32LE=function(n,p){return p||Or(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},ht.prototype.readInt32BE=function(n,p){return p||Or(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},ht.prototype.readFloatLE=function(n,p){return p||Or(n,4,this.length),Dr(this,n,!0,23,4)},ht.prototype.readFloatBE=function(n,p){return p||Or(n,4,this.length),Dr(this,n,!1,23,4)},ht.prototype.readDoubleLE=function(n,p){return p||Or(n,8,this.length),Dr(this,n,!0,52,8)},ht.prototype.readDoubleBE=function(n,p){return p||Or(n,8,this.length),Dr(this,n,!1,52,8)},ht.prototype.writeUIntLE=function(n,p,m,S){if(n=+n,p=p|0,m=m|0,!S){var f=Math.pow(2,8*m)-1;Sr(this,n,p,m,f,0)}var h=1,b=0;for(this[p]=n&255;++b=0&&(b*=256);)this[p+h]=n/b&255;return p+m},ht.prototype.writeUInt8=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,1,255,0),ht.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[p]=n&255,p+1},ht.prototype.writeUInt16LE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,2,65535,0),ht.TYPED_ARRAY_SUPPORT?(this[p]=n&255,this[p+1]=n>>>8):Kr(this,n,p,!0),p+2},ht.prototype.writeUInt16BE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,2,65535,0),ht.TYPED_ARRAY_SUPPORT?(this[p]=n>>>8,this[p+1]=n&255):Kr(this,n,p,!1),p+2},ht.prototype.writeUInt32LE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,4,4294967295,0),ht.TYPED_ARRAY_SUPPORT?(this[p+3]=n>>>24,this[p+2]=n>>>16,this[p+1]=n>>>8,this[p]=n&255):on(this,n,p,!0),p+4},ht.prototype.writeUInt32BE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,4,4294967295,0),ht.TYPED_ARRAY_SUPPORT?(this[p]=n>>>24,this[p+1]=n>>>16,this[p+2]=n>>>8,this[p+3]=n&255):on(this,n,p,!1),p+4},ht.prototype.writeIntLE=function(n,p,m,S){if(n=+n,p=p|0,!S){var f=Math.pow(2,8*m-1);Sr(this,n,p,m,f-1,-f)}var h=0,b=1,I=0;for(this[p]=n&255;++h>0)-I&255;return p+m},ht.prototype.writeIntBE=function(n,p,m,S){if(n=+n,p=p|0,!S){var f=Math.pow(2,8*m-1);Sr(this,n,p,m,f-1,-f)}var h=m-1,b=1,I=0;for(this[p+h]=n&255;--h>=0&&(b*=256);)n<0&&I===0&&this[p+h+1]!==0&&(I=1),this[p+h]=(n/b>>0)-I&255;return p+m},ht.prototype.writeInt8=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,1,127,-128),ht.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[p]=n&255,p+1},ht.prototype.writeInt16LE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,2,32767,-32768),ht.TYPED_ARRAY_SUPPORT?(this[p]=n&255,this[p+1]=n>>>8):Kr(this,n,p,!0),p+2},ht.prototype.writeInt16BE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,2,32767,-32768),ht.TYPED_ARRAY_SUPPORT?(this[p]=n>>>8,this[p+1]=n&255):Kr(this,n,p,!1),p+2},ht.prototype.writeInt32LE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,4,2147483647,-2147483648),ht.TYPED_ARRAY_SUPPORT?(this[p]=n&255,this[p+1]=n>>>8,this[p+2]=n>>>16,this[p+3]=n>>>24):on(this,n,p,!0),p+4},ht.prototype.writeInt32BE=function(n,p,m){return n=+n,p=p|0,m||Sr(this,n,p,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),ht.TYPED_ARRAY_SUPPORT?(this[p]=n>>>24,this[p+1]=n>>>16,this[p+2]=n>>>8,this[p+3]=n&255):on(this,n,p,!1),p+4},ht.prototype.writeFloatLE=function(n,p,m){return In(this,n,p,!0,m)},ht.prototype.writeFloatBE=function(n,p,m){return In(this,n,p,!1,m)},ht.prototype.writeDoubleLE=function(n,p,m){return rr(this,n,p,!0,m)},ht.prototype.writeDoubleBE=function(n,p,m){return rr(this,n,p,!1,m)},ht.prototype.copy=function(n,p,m,S){if(m||(m=0),!S&&S!==0&&(S=this.length),p>=n.length&&(p=n.length),p||(p=0),S>0&&S=this.length)throw new RangeError("sourceStart out of bounds");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),n.length-p=0;--h)n[h+p]=this[h+m];else if(f<1e3||!ht.TYPED_ARRAY_SUPPORT)for(h=0;h>>0,m=m===void 0?this.length:m>>>0,n||(n=0);var h;if(typeof n=="number")for(h=p;h{Ei()}),io=u((n,p)=>{v(),y(),_(),yt(),be();var m=Symbol.for("nodejs.util.inspect.custom");p.exports=m}),Li=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.crc16=void 0;function p(m){let S=0,f=ht.alloc(m.length+2);f.set(m);for(let h of f){let b=128;for(;b>0;)S<<=1,h&b&&(S+=1),b>>=1,S>65535&&(S&=65535,S^=4129)}return ht.from([Math.floor(S/256),S%256])}n.crc16=p}),Ui=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__importDefault||function(T){return T&&T.__esModule?T:{default:T}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.Address=void 0;var S=p(io()),f=Li(),h=17,b=81,I=128;function O(T){let ee=ht.isBuffer(T)?T:ht.from(T,"base64");if(ee.length!==36)throw new Error("Unknown address type: byte length is not equal to 36");let we=ee.subarray(0,34),Se=ee.subarray(34,36),He=(0,f.crc16)(we);if(!(He[0]===Se[0]&&He[1]===Se[1]))throw new Error("Invalid checksum: "+T);let We=we[0],Re=!1,Ge=!1;if(We&I&&(Re=!0,We=We^I),We!==h&&We!==b)throw"Unknown address tag";Ge=We===h;let Ze=null;we[1]===255?Ze=-1:Ze=we[1];let vt=we.subarray(2,34);return{isTestOnly:Re,isBounceable:Ge,workchain:Ze,hashPart:vt}}var P=class{static isAddress(T){return T instanceof P}static isFriendly(T){return T.indexOf(":")<0}static normalize(T){return typeof T=="string"?P.parse(T).toString():T.toString()}static parse(T){return P.isFriendly(T)?this.parseFriendly(T).address:this.parseRaw(T)}static parseRaw(T){let ee=parseInt(T.split(":")[0]),we=ht.from(T.split(":")[1],"hex");return new P(ee,we)}static parseFriendly(T){if(ht.isBuffer(T)){let ee=O(T);return{isBounceable:ee.isBounceable,isTestOnly:ee.isTestOnly,address:new P(ee.workchain,ee.hashPart)}}else{let ee=T.replace(/\-/g,"+").replace(/_/g,"/"),we=O(ee);return{isBounceable:we.isBounceable,isTestOnly:we.isTestOnly,address:new P(we.workchain,we.hashPart)}}}constructor(T,ee){this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{let we=ht.alloc(36);return we.set(this.hash),we.set([this.workChain,this.workChain,this.workChain,this.workChain],32),we},this.toStringBuffer=we=>{let Se=we&&we.testOnly!==void 0?we.testOnly:!1,He=!(we&&we.bounceable!==void 0)||we.bounceable?h:b;Se&&(He|=I);let We=ht.alloc(34);We[0]=He,We[1]=this.workChain,We.set(this.hash,2);let Re=ht.alloc(36);return Re.set(We),Re.set((0,f.crc16)(We),34),Re},this.toString=we=>{let Se=we&&we.urlSafe!==void 0?we.urlSafe:!0,He=this.toStringBuffer(we);return Se?He.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):He.toString("base64")},this[m]=()=>this.toString(),this.workChain=T,this.hash=ee,Object.freeze(this)}equals(T){return T.workChain!==this.workChain?!1:T.hash.equals(this.hash)}};n.Address=P,m=S.default;function D(T){return P.parse(T)}n.address=D}),yo=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__importDefault||function(h){return h&&h.__esModule?h:{default:h}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.ExternalAddress=void 0;var S=p(io()),f=class{static isAddress(h){return h instanceof f}constructor(h,b){this[m]=()=>this.toString(),this.value=h,this.bits=b}toString(){return`External<${this.bits}:${this.value}>`}};n.ExternalAddress=f,m=S.default}),vo=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.base32Decode=n.base32Encode=void 0;var p="abcdefghijklmnopqrstuvwxyz234567";function m(h){let b=h.byteLength,I=0,O=0,P="";for(let D=0;D=5;)P+=p[O>>>I-5&31],I-=5;return I>0&&(P+=p[O<<5-I&31]),P}n.base32Encode=m;function S(h,b){let I=h.indexOf(b);if(I===-1)throw new Error("Invalid character found: "+b);return I}function f(h){let b;b=h.toLowerCase();let{length:I}=b,O=0,P=0,D=0,T=ht.alloc(I*5/8|0);for(let ee=0;ee=8&&(T[D++]=P>>>O-8&255,O-=8);return T}n.base32Decode=f}),Lo=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__importDefault||function(I){return I&&I.__esModule?I:{default:I}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.ADNLAddress=void 0;var S=p(io()),f=vo(),h=Li(),b=class{static parseFriendly(I){if(I.length!==55)throw Error("Invalid address");I="f"+I;let O=(0,f.base32Decode)(I);if(O[0]!==45)throw Error("Invalid address");let P=O.slice(33);if(!(0,h.crc16)(O.slice(0,33)).equals(P))throw Error("Invalid address");return new b(O.slice(1,33))}static parseRaw(I){let O=ht.from(I,"base64");return new b(O)}constructor(I){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let O=ht.concat([ht.from([45]),this.address]),P=(0,h.crc16)(O);return O=ht.concat([O,P]),(0,f.base32Encode)(O).slice(1)},this[m]=()=>this.toString(),I.length!==32)throw Error("Invalid address");this.address=I}equals(I){return this.address.equals(I.address)}};n.ADNLAddress=b,m=S.default}),ko=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.bitsToPaddedBuffer=void 0;var p=Kn();function m(S){let f=new p.BitBuilder(Math.ceil(S.length/8)*8);f.writeBits(S);let h=Math.ceil(S.length/8)*8-S.length;for(let b=0;b{v(),y(),_(),yt(),be();var p=n&&n.__importDefault||function(b){return b&&b.__esModule?b:{default:b}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.BitString=void 0;var S=ko(),f=p(io()),h=class{constructor(b,I,O){if(this[m]=()=>this.toString(),O<0)throw new Error(`Length ${O} is out of bounds`);this._length=O,this._data=b,this._offset=I}get length(){return this._length}at(b){if(b>=this._length)throw new Error(`Index ${b} > ${this._length} is out of bounds`);if(b<0)throw new Error(`Index ${b} < 0 is out of bounds`);let I=this._offset+b>>3,O=7-(this._offset+b)%8;return(this._data[I]&1<=this._length)throw new Error(`Offset(${b}) > ${this._length} is out of bounds`);if(b<0)throw new Error(`Offset(${b}) < 0 is out of bounds`);if(b+I>this._length)throw new Error(`Offset ${b} + Length ${I} > ${this._length} is out of bounds`);return new h(this._data,this._offset+b,I)}subbuffer(b,I){if(b>=this._length)throw new Error(`Offset ${b} is out of bounds`);if(b<0)throw new Error(`Offset ${b} is out of bounds`);if(b+I>this._length)throw new Error(`Offset + Lenght = ${b+I} is out of bounds`);if(I%8!==0||(this._offset+b)%8!==0)return null;let O=this._offset+b>>3,P=O+(I>>3);return this._data.subarray(O,P)}equals(b){if(this._length!==b._length)return!1;for(let I=0;I{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.BitBuilder=void 0;var p=Ui(),m=yo(),S=So(),f=class{constructor(h=1023){this._buffer=ht.alloc(Math.ceil(h/8)),this._length=0}get length(){return this._length}writeBit(h){let b=this._length;if(b>this._buffer.length*8)throw new Error("BitBuilder overflow");(h===!0||h>0)&&(this._buffer[b/8|0]|=1<<7-b%8),this._length++}writeBits(h){for(let b=0;bthis._buffer.length*8)throw new Error("BitBuilder overflow");h.copy(this._buffer,this._length/8),this._length+=h.length*8}else for(let b=0;b255||!Number.isSafeInteger(D))throw Error(`value is out of range for ${b} bits. Got ${h}`);this._buffer[this._length/8]=Number(h),this._length+=8;return}if(b===16&&this._length%8===0){let D=Number(h);if(D<0||D>65536||!Number.isSafeInteger(D))throw Error(`value is out of range for ${b} bits. Got ${h}`);this._buffer[this._length/8]=D>>8,this._buffer[this._length/8+1]=D&255,this._length+=16;return}let I=BigInt(h);if(b<0||!Number.isSafeInteger(b))throw Error(`invalid bit length. Got ${b}`);if(b===0){if(h!==0n)throw Error(`value is not zero for ${b} bits. Got ${h}`);return}let O=1n<=O)throw Error(`bitLength is too small for a value ${h}. Got ${b}`);let P=[];for(;I>0;)P.push(I%2n===1n),I/=2n;for(let D=0;D=O)throw Error(`value is out of range for ${b} bits. Got ${h}`);I<0?(this.writeBit(!0),I=(1n<0?I:-I,P=1+Math.ceil(O.toString(2).length/8),D=P*8;this.writeUint(P,b),this.writeInt(I,D)}writeCoins(h){this.writeVarUint(h,4)}writeAddress(h){if(h==null){this.writeUint(0,2);return}if(p.Address.isAddress(h)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(h.workChain,8),this.writeBuffer(h.hash);return}if(m.ExternalAddress.isAddress(h)){this.writeUint(1,2),this.writeUint(h.bits,9),this.writeUint(h.value,h.bits);return}throw Error(`Invalid address. Got ${h}`)}build(){return new S.BitString(this._buffer,0,this._length)}buffer(){if(this._length%8!==0)throw new Error("BitBuilder buffer is not byte aligned");return this._buffer.subarray(0,this._length/8)}};n.BitBuilder=f}),No=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.CellType=void 0,function(p){p[p.Ordinary=-1]="Ordinary",p[p.PrunedBranch=1]="PrunedBranch",p[p.Library=2]="Library",p[p.MerkleProof=3]="MerkleProof",p[p.MerkleUpdate=4]="MerkleUpdate"}(n.CellType||(n.CellType={}))}),xa=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.parseDict=void 0;function p(f){let h=0;for(;f.loadBit();)h++;return h}function m(f,h,b,I,O){let P=h.loadBit()?1:0,D=0,T=f;if(P===0){D=p(h);for(let ee=0;ee{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.findCommonPrefix=void 0;function p(m){if(m.length===0)return"";if(m.length===1)return m[0];let S=[...m].sort(),f=0;for(let h=0;h{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.serializeDict=n.detectLabelType=n.writeLabelSame=n.writeLabelLong=n.writeLabelShort=n.buildTree=void 0;var p=$a(),m=Ad();function S(Oe,Fe){for(;Oe.length{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.deserializeInternalKey=n.serializeInternalKey=void 0;var p=Ui();function m(f){if(typeof f=="number"){if(!Number.isSafeInteger(f))throw Error("Invalid key type: not a safe integer: "+f);return"n:"+f.toString(10)}else{if(typeof f=="bigint")return"b:"+f.toString(10);if(p.Address.isAddress(f))return"a:"+f.toString();if(ht.isBuffer(f))return"f:"+f.toString("hex");throw Error("Invalid key type")}}n.serializeInternalKey=m;function S(f){let h=f.slice(0,2),b=f.slice(2);if(h==="n:")return parseInt(b,10);if(h==="b:")return BigInt(b);if(h==="a:")return p.Address.parse(b);if(h==="f:")return ht.from(b,"hex");throw Error("Invalid key type: "+h)}n.deserializeInternalKey=S}),Ru=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.Dictionary=void 0;var p=Ui(),m=$a(),S=Rd(),f=xa(),h=bl(),b=Td(),I=class{static empty(Xe,Me){return Xe&&Me?new I(new Map,Xe,Me):new I(new Map,null,null)}static load(Xe,Me,_e){let Le;if(_e instanceof S.Cell){if(_e.isExotic)return I.empty(Xe,Me);Le=_e.beginParse()}else Le=_e;let pt=Le.loadMaybeRef();return pt&&!pt.isExotic?I.loadDirect(Xe,Me,pt.beginParse()):I.empty(Xe,Me)}static loadDirect(Xe,Me,_e){if(!_e)return I.empty(Xe,Me);let Le;_e instanceof S.Cell?Le=_e.beginParse():Le=_e;let pt=(0,f.parseDict)(Le,Xe.bits,Me.parse),Lt=new Map;for(let[fr,Cr]of pt)Lt.set((0,b.serializeInternalKey)(Xe.parse(fr)),Cr);return new I(Lt,Xe,Me)}constructor(Xe,Me,_e){this._key=Me,this._value=_e,this._map=Xe}get size(){return this._map.size}get(Xe){return this._map.get((0,b.serializeInternalKey)(Xe))}has(Xe){return this._map.has((0,b.serializeInternalKey)(Xe))}set(Xe,Me){return this._map.set((0,b.serializeInternalKey)(Xe),Me),this}delete(Xe){let Me=(0,b.serializeInternalKey)(Xe);return this._map.delete(Me)}clear(){this._map.clear()}*[Symbol.iterator](){for(let[Xe,Me]of this._map)yield[(0,b.deserializeInternalKey)(Xe),Me]}keys(){return Array.from(this._map.keys()).map(Xe=>(0,b.deserializeInternalKey)(Xe))}values(){return Array.from(this._map.values())}store(Xe,Me,_e){if(this._map.size===0)Xe.storeBit(0);else{let Le=this._key;Me!=null&&(Le=Me);let pt=this._value;if(_e!=null&&(pt=_e),!Le)throw Error("Key serializer is not defined");if(!pt)throw Error("Value serializer is not defined");let Lt=new Map;for(let[Cr,qr]of this._map)Lt.set(Le.serialize((0,b.deserializeInternalKey)(Cr)),qr);Xe.storeBit(1);let fr=(0,m.beginCell)();(0,h.serializeDict)(Lt,Le.bits,pt.serialize,fr),Xe.storeRef(fr.endCell())}}storeDirect(Xe,Me,_e){if(this._map.size===0)throw Error("Cannot store empty dictionary directly");let Le=this._key;Me!=null&&(Le=Me);let pt=this._value;if(_e!=null&&(pt=_e),!Le)throw Error("Key serializer is not defined");if(!pt)throw Error("Value serializer is not defined");let Lt=new Map;for(let[fr,Cr]of this._map)Lt.set(Le.serialize((0,b.deserializeInternalKey)(fr)),Cr);(0,h.serializeDict)(Lt,Le.bits,pt.serialize,Xe)}};n.Dictionary=I,I.Keys={Address:()=>O(),BigInt:Xe=>P(Xe),Int:Xe=>D(Xe),BigUint:Xe=>T(Xe),Uint:Xe=>ee(Xe),Buffer:Xe=>we(Xe)},I.Values={BigInt:Xe=>He(Xe),Int:Xe=>Se(Xe),BigVarInt:Xe=>We(Xe),BigUint:Xe=>Ze(Xe),Uint:Xe=>Ge(Xe),BigVarUint:Xe=>Re(Xe),Bool:()=>vt(),Address:()=>Oe(),Cell:()=>Fe(),Buffer:Xe=>ft(Xe),Dictionary:(Xe,Me)=>dt(Xe,Me)};function O(){return{bits:267,serialize:Xe=>{if(!p.Address.isAddress(Xe))throw Error("Key is not an address");return(0,m.beginCell)().storeAddress(Xe).endCell().beginParse().preloadUintBig(267)},parse:Xe=>(0,m.beginCell)().storeUint(Xe,267).endCell().beginParse().loadAddress()}}function P(Xe){return{bits:Xe,serialize:Me=>{if(typeof Me!="bigint")throw Error("Key is not a bigint");return(0,m.beginCell)().storeInt(Me,Xe).endCell().beginParse().loadUintBig(Xe)},parse:Me=>(0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadIntBig(Xe)}}function D(Xe){return{bits:Xe,serialize:Me=>{if(typeof Me!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(Me))throw Error("Key is not a safe integer: "+Me);return(0,m.beginCell)().storeInt(Me,Xe).endCell().beginParse().loadUintBig(Xe)},parse:Me=>(0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadInt(Xe)}}function T(Xe){return{bits:Xe,serialize:Me=>{if(typeof Me!="bigint")throw Error("Key is not a bigint");if(Me<0)throw Error("Key is negative: "+Me);return(0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadUintBig(Xe)},parse:Me=>(0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadUintBig(Xe)}}function ee(Xe){return{bits:Xe,serialize:Me=>{if(typeof Me!="number")throw Error("Key is not a number");if(!Number.isSafeInteger(Me))throw Error("Key is not a safe integer: "+Me);if(Me<0)throw Error("Key is negative: "+Me);return(0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadUintBig(Xe)},parse:Me=>Number((0,m.beginCell)().storeUint(Me,Xe).endCell().beginParse().loadUint(Xe))}}function we(Xe){return{bits:Xe*8,serialize:Me=>{if(!ht.isBuffer(Me))throw Error("Key is not a buffer");return(0,m.beginCell)().storeBuffer(Me).endCell().beginParse().loadUintBig(Xe*8)},parse:Me=>(0,m.beginCell)().storeUint(Me,Xe*8).endCell().beginParse().loadBuffer(Xe)}}function Se(Xe){return{serialize:(Me,_e)=>{_e.storeInt(Me,Xe)},parse:Me=>Me.loadInt(Xe)}}function He(Xe){return{serialize:(Me,_e)=>{_e.storeInt(Me,Xe)},parse:Me=>Me.loadIntBig(Xe)}}function We(Xe){return{serialize:(Me,_e)=>{_e.storeVarInt(Me,Xe)},parse:Me=>Me.loadVarIntBig(Xe)}}function Re(Xe){return{serialize:(Me,_e)=>{_e.storeVarUint(Me,Xe)},parse:Me=>Me.loadVarUintBig(Xe)}}function Ge(Xe){return{serialize:(Me,_e)=>{_e.storeUint(Me,Xe)},parse:Me=>Me.loadUint(Xe)}}function Ze(Xe){return{serialize:(Me,_e)=>{_e.storeUint(Me,Xe)},parse:Me=>Me.loadUintBig(Xe)}}function vt(){return{serialize:(Xe,Me)=>{Me.storeBit(Xe)},parse:Xe=>Xe.loadBit()}}function Oe(){return{serialize:(Xe,Me)=>{Me.storeAddress(Xe)},parse:Xe=>Xe.loadAddress()}}function Fe(){return{serialize:(Xe,Me)=>{Me.storeRef(Xe)},parse:Xe=>Xe.loadRef()}}function dt(Xe,Me){return{serialize:(_e,Le)=>{_e.store(Le)},parse:_e=>I.load(Xe,Me,_e)}}function ft(Xe){return{serialize:(Me,_e)=>{if(Me.length!==Xe)throw Error("Invalid buffer size");_e.storeBuffer(Me)},parse:Me=>Me.loadBuffer(Xe)}}}),fy=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.writeString=n.stringToCell=n.readString=void 0;var p=$a();function m(I){if(I.remainingBits%8!==0)throw new Error(`Invalid string length: ${I.remainingBits}`);if(I.remainingRefs!==0&&I.remainingRefs!==1)throw new Error(`invalid number of refs: ${I.remainingRefs}`);if(I.remainingRefs===1&&1023-I.remainingBits>7)throw new Error(`invalid string length: ${I.remainingBits/8}`);let O;return I.remainingBits===0?O=ht.alloc(0):O=I.loadBuffer(I.remainingBits/8),I.remainingRefs===1&&(O=ht.concat([O,m(I.loadRef().beginParse())])),O}function S(I){return m(I).toString()}n.readString=S;function f(I,O){if(I.length>0){let P=Math.floor(O.availableBits/8);if(I.length>P){let D=I.subarray(0,P),T=I.subarray(P);O=O.storeBuffer(D);let ee=(0,p.beginCell)();f(T,ee),O=O.storeRef(ee.endCell())}else O=O.storeBuffer(I)}}function h(I){let O=(0,p.beginCell)();return f(ht.from(I),O),O.endCell()}n.stringToCell=h;function b(I,O){f(ht.from(I),O)}n.writeString=b}),qe=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__importDefault||function(O){return O&&O.__esModule?O:{default:O}},m;Object.defineProperty(n,"__esModule",{value:!0}),n.Slice=void 0;var S=p(io()),f=Ru(),h=$a(),b=fy(),I=class{constructor(O,P){this[m]=()=>this.toString(),this._reader=O.clone(),this._refs=[...P]}get remainingBits(){return this._reader.remaining}get remainingRefs(){return this._refs.length}skip(O){return this._reader.skip(O),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(O){return this._reader.loadBits(O)}preloadBits(O){return this._reader.preloadBits(O)}loadUint(O){return this._reader.loadUint(O)}loadUintBig(O){return this._reader.loadUintBig(O)}preloadUint(O){return this._reader.preloadUint(O)}preloadUintBig(O){return this._reader.preloadUintBig(O)}loadMaybeUint(O){return this.loadBit()?this.loadUint(O):null}loadMaybeUintBig(O){return this.loadBit()?this.loadUintBig(O):null}loadInt(O){return this._reader.loadInt(O)}loadIntBig(O){return this._reader.loadIntBig(O)}preloadInt(O){return this._reader.preloadInt(O)}preloadIntBig(O){return this._reader.preloadIntBig(O)}loadMaybeInt(O){return this.loadBit()?this.loadInt(O):null}loadMaybeIntBig(O){return this.loadBit()?this.loadIntBig(O):null}loadVarUint(O){return this._reader.loadVarUint(O)}loadVarUintBig(O){return this._reader.loadVarUintBig(O)}preloadVarUint(O){return this._reader.preloadVarUint(O)}preloadVarUintBig(O){return this._reader.preloadVarUintBig(O)}loadVarInt(O){return this._reader.loadVarInt(O)}loadVarIntBig(O){return this._reader.loadVarIntBig(O)}preloadVarInt(O){return this._reader.preloadVarInt(O)}preloadVarIntBig(O){return this._reader.preloadVarIntBig(O)}loadCoins(){return this._reader.loadCoins()}preloadCoins(){return this._reader.preloadCoins()}loadMaybeCoins(){return this._reader.loadBit()?this._reader.loadCoins():null}loadAddress(){return this._reader.loadAddress()}loadMaybeAddress(){return this._reader.loadMaybeAddress()}loadExternalAddress(){return this._reader.loadExternalAddress()}loadMaybeExternalAddress(){return this._reader.loadMaybeExternalAddress()}loadAddressAny(){return this._reader.loadAddressAny()}loadRef(){if(this._refs.length===0)throw new Error("No more references");return this._refs.shift()}preloadRef(){if(this._refs.length===0)throw new Error("No more references");return this._refs[0]}loadMaybeRef(){return this.loadBit()?this.loadRef():null}preloadMaybeRef(){return this.preloadBit()?this.preloadRef():null}loadBuffer(O){return this._reader.loadBuffer(O)}preloadBuffer(O){return this._reader.preloadBuffer(O)}loadStringTail(){return(0,b.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,b.readString)(this):null}loadStringRefTail(){return(0,b.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){let O=this.loadMaybeRef();return O?(0,b.readString)(O.beginParse()):null}loadDict(O,P){return f.Dictionary.load(O,P,this)}loadDictDirect(O,P){return f.Dictionary.loadDirect(O,P,this)}endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw new Error("Slice is not empty")}asCell(){return(0,h.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,h.beginCell)().storeSlice(this)}clone(){return new I(this._reader,this._refs)}toString(){return this.asCell().toString()}};n.Slice=I,m=S.default}),Ce=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.BitReader=void 0;var p=Ui(),m=yo(),S=class{constructor(f,h=0){this._checkpoints=[],this._bits=f,this._offset=h}get remaining(){return this._bits.length-this._offset}skip(f){if(f<0||this._offset+f>this._bits.length)throw new Error(`Index ${this._offset+f} is out of bounds`);this._offset+=f}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let f=this._bits.at(this._offset);return this._offset++,f}preloadBit(){return this._bits.at(this._offset)}loadBits(f){let h=this._bits.substring(this._offset,f);return this._offset+=f,h}preloadBits(f){return this._bits.substring(this._offset,f)}loadBuffer(f){let h=this._preloadBuffer(f,this._offset);return this._offset+=f*8,h}preloadBuffer(f){return this._preloadBuffer(f,this._offset)}loadUint(f){return Number(this.loadUintBig(f))}loadUintBig(f){let h=this.preloadUintBig(f);return this._offset+=f,h}preloadUint(f){return Number(this._preloadUint(f,this._offset))}preloadUintBig(f){return this._preloadUint(f,this._offset)}loadInt(f){let h=this._preloadInt(f,this._offset);return this._offset+=f,Number(h)}loadIntBig(f){let h=this._preloadInt(f,this._offset);return this._offset+=f,h}preloadInt(f){return Number(this._preloadInt(f,this._offset))}preloadIntBig(f){return this._preloadInt(f,this._offset)}loadVarUint(f){let h=Number(this.loadUint(f));return Number(this.loadUintBig(h*8))}loadVarUintBig(f){let h=Number(this.loadUint(f));return this.loadUintBig(h*8)}preloadVarUint(f){let h=Number(this._preloadUint(f,this._offset));return Number(this._preloadUint(h*8,this._offset+f))}preloadVarUintBig(f){let h=Number(this._preloadUint(f,this._offset));return this._preloadUint(h*8,this._offset+f)}loadVarInt(f){let h=Number(this.loadUint(f));return Number(this.loadIntBig(h*8))}loadVarIntBig(f){let h=Number(this.loadUint(f));return this.loadIntBig(h*8)}preloadVarInt(f){let h=Number(this._preloadUint(f,this._offset));return Number(this._preloadInt(h*8,this._offset+f))}preloadVarIntBig(f){let h=Number(this._preloadUint(f,this._offset));return this._preloadInt(h*8,this._offset+f)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===2)return this._loadInternalAddress();throw new Error("Invalid address: "+f)}loadMaybeAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===2)return this._loadInternalAddress();throw new Error("Invalid address")}loadExternalAddress(){if(Number(this._preloadUint(2,this._offset))===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadMaybeExternalAddress(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadAddressAny(){let f=Number(this._preloadUint(2,this._offset));if(f===0)return this._offset+=2,null;if(f===2)return this._loadInternalAddress();if(f===1)return this._loadExternalAddress();throw Error(f===3?"Unsupported":"Unreachable")}loadPaddedBits(f){if(f%8!==0)throw new Error("Invalid number of bits");let h=f;for(;;)if(this._bits.at(this._offset+h-1)){h--;break}else h--;let b=this._bits.substring(this._offset,h);return this._offset+=f,b}clone(){return new S(this._bits,this._offset)}_preloadInt(f,h){if(f==0)return 0n;let b=this._bits.at(h),I=0n;for(let O=0;O{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticLibrary=void 0;var p=Ce();function m(S,f){let h=new p.BitReader(S),b=8+256;if(S.length!==b)throw new Error(`Library cell must have exactly (8 + 256) bits, got "${S.length}"`);let I=h.loadUint(8);if(I!==2)throw new Error(`Library cell must have type 2, got "${I}"`);return{}}n.exoticLibrary=m}),Ft=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticMerkleProof=void 0;var p=Ce();function m(S,f){let h=new p.BitReader(S),b=8+256+16;if(S.length!==b)throw new Error(`Merkle Proof cell must have exactly (8 + 256 + 16) bits, got "${S.length}"`);if(f.length!==1)throw new Error(`Merkle Proof cell must have exactly 1 ref, got "${f.length}"`);let I=h.loadUint(8);if(I!==3)throw new Error(`Merkle Proof cell must have type 3, got "${I}"`);let O=h.loadBuffer(32),P=h.loadUint(16),D=f[0].hash(0),T=f[0].depth(0);if(P!==T)throw new Error(`Merkle Proof cell ref depth must be exactly "${P}", got "${T}"`);if(!O.equals(D))throw new Error(`Merkle Proof cell ref hash must be exactly "${O.toString("hex")}", got "${D.toString("hex")}"`);return{proofDepth:P,proofHash:O}}n.exoticMerkleProof=m}),nr=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticMerkleUpdate=void 0;var p=Ce();function m(S,f){let h=new p.BitReader(S),b=8+2*(256+16);if(S.length!==b)throw new Error(`Merkle Update cell must have exactly (8 + (2 * (256 + 16))) bits, got "${S.length}"`);if(f.length!==2)throw new Error(`Merkle Update cell must have exactly 2 refs, got "${f.length}"`);let I=h.loadUint(8);if(I!==4)throw new Error(`Merkle Update cell type must be exactly 4, got "${I}"`);let O=h.loadBuffer(32),P=h.loadBuffer(32),D=h.loadUint(16),T=h.loadUint(16);if(D!==f[0].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${D}", got "${f[0].depth(0)}"`);if(!O.equals(f[0].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${O.toString("hex")}", got "${f[0].hash(0).toString("hex")}"`);if(T!==f[1].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${T}", got "${f[1].depth(0)}"`);if(!P.equals(f[1].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${P.toString("hex")}", got "${f[1].hash(0).toString("hex")}"`);return{proofDepth1:D,proofDepth2:T,proofHash1:O,proofHash2:P}}n.exoticMerkleUpdate=m}),Er=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.LevelMask=void 0;var p=class{constructor(S=0){this._mask=0,this._mask=S,this._hashIndex=m(this._mask),this._hashCount=this._hashIndex+1}get value(){return this._mask}get level(){return 32-Math.clz32(this._mask)}get hashIndex(){return this._hashIndex}get hashCount(){return this._hashCount}apply(S){return new p(this._mask&(1<>S-1)%2!==0}};n.LevelMask=p;function m(S){return S=S-(S>>1&1431655765),S=(S&858993459)+(S>>2&858993459),(S+(S>>4)&252645135)*16843009>>24}}),$r=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.exoticPruned=void 0;var p=Ce(),m=Er();function S(f,h){let b=new p.BitReader(f),I=b.loadUint(8);if(I!==1)throw new Error(`Pruned branch cell must have type 1, got "${I}"`);if(h.length!==0)throw new Error(`Pruned Branch cell can't has refs, got "${h.length}"`);let O;if(f.length===280)O=new m.LevelMask(1);else{if(O=new m.LevelMask(b.loadUint(8)),O.level<1||O.level>3)throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${O.level}/${O.value}"`);let ee=8+8+O.apply(O.level-1).hashCount*(256+16);if(f.length!==ee)throw new Error(`Pruned branch cell must have exactly ${ee} bits, got "${f.length}"`)}let P=[],D=[],T=[];for(let ee=0;ee{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.resolveExotic=void 0;var p=Ce(),m=No(),S=Ye(),f=Ft(),h=nr(),b=$r(),I=Er();function O(we,Se){let He=(0,b.exoticPruned)(we,Se),We=[],Re=[],Ge=new I.LevelMask(He.mask);for(let Ze=0;Ze>1);return{type:m.CellType.MerkleProof,depths:He,hashes:We,mask:Re}}function T(we,Se){(0,h.exoticMerkleUpdate)(we,Se);let He=[],We=[],Re=new I.LevelMask((Se[0].level()|Se[1].level())>>1);return{type:m.CellType.MerkleUpdate,depths:He,hashes:We,mask:Re}}function ee(we,Se){let He=new p.BitReader(we).preloadUint(8);if(He===1)return O(we,Se);if(He===2)return P(we,Se);if(He===3)return D(we,Se);if(He===4)return T(we,Se);throw Error("Invalid exotic cell type: "+He)}n.resolveExotic=ee}),fn=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.getRepr=n.getBitsDescriptor=n.getRefsDescriptor=void 0;var p=No(),m=ko();function S(b,I,O){return b.length+(O!==p.CellType.Ordinary?1:0)*8+I*32}n.getRefsDescriptor=S;function f(b){let I=b.length;return Math.ceil(I/8)+Math.floor(I/8)}n.getBitsDescriptor=f;function h(b,I,O,P){let D=Math.ceil(b.length/8),T=ht.alloc(2+D+(2+32)*I.length),ee=0;T[ee++]=S(I,O,P),T[ee++]=f(b),(0,m.bitsToPaddedBuffer)(b).copy(T,ee),ee+=D;for(let we of I){let Se;P==p.CellType.MerkleProof||P==p.CellType.MerkleUpdate?Se=we.depth(O+1):Se=we.depth(O),T[ee++]=Math.floor(Se/256),T[ee++]=Se%256}for(let we of I){let Se;P==p.CellType.MerkleProof||P==p.CellType.MerkleUpdate?Se=we.hash(O+1):Se=we.hash(O),Se.copy(T,ee),ee+=32}return T}n.getRepr=h}),gi=u((n,p)=>{v(),y(),_(),yt(),be(),function(m,S){typeof n=="object"&&typeof p<"u"?p.exports=S():(m=typeof globalThis<"u"?globalThis:m||self).jsSHA=S()}(n,function(){var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function S(Mt,$e,wt,It){var Ht,rt,ut,Qe=$e||[0],kt=(wt=wt||0)>>>3,et=It===-1?3:0;for(Ht=0;Ht>>2,Qe.length<=rt&&Qe.push(0),Qe[rt]|=Mt[Ht]<<8*(et+It*(ut%4));return{value:Qe,binLen:8*Mt.length+wt}}function f(Mt,$e,wt){switch($e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(Mt){case"HEX":return function(It,Ht,rt){return function(ut,Qe,kt,et){var Yt,sr,wr,zr;if(ut.length%2!=0)throw new Error("String of HEX type must be in byte increments");var mt=Qe||[0],Nt=(kt=kt||0)>>>3,kr=et===-1?3:0;for(Yt=0;Yt>>1)+Nt)>>>2;mt.length<=wr;)mt.push(0);mt[wr]|=sr<<8*(kr+et*(zr%4))}return{value:mt,binLen:4*ut.length+kt}}(It,Ht,rt,wt)};case"TEXT":return function(It,Ht,rt){return function(ut,Qe,kt,et,Yt){var sr,wr,zr,mt,Nt,kr,an,On,ji=0,ii=kt||[0],li=(et=et||0)>>>3;if(Qe==="UTF8")for(an=Yt===-1?3:0,zr=0;zr(sr=ut.charCodeAt(zr))?wr.push(sr):2048>sr?(wr.push(192|sr>>>6),wr.push(128|63&sr)):55296>sr||57344<=sr?wr.push(224|sr>>>12,128|sr>>>6&63,128|63&sr):(zr+=1,sr=65536+((1023&sr)<<10|1023&ut.charCodeAt(zr)),wr.push(240|sr>>>18,128|sr>>>12&63,128|sr>>>6&63,128|63&sr)),mt=0;mt>>2;ii.length<=Nt;)ii.push(0);ii[Nt]|=wr[mt]<<8*(an+Yt*(kr%4)),ji+=1}else for(an=Yt===-1?2:0,On=Qe==="UTF16LE"&&Yt!==1||Qe!=="UTF16LE"&&Yt===1,zr=0;zr>>8),Nt=(kr=ji+li)>>>2;ii.length<=Nt;)ii.push(0);ii[Nt]|=sr<<8*(an+Yt*(kr%4)),ji+=2}return{value:ii,binLen:8*ji+et}}(It,$e,Ht,rt,wt)};case"B64":return function(It,Ht,rt){return function(ut,Qe,kt,et){var Yt,sr,wr,zr,mt,Nt,kr=0,an=Qe||[0],On=(kt=kt||0)>>>3,ji=et===-1?3:0,ii=ut.indexOf("=");if(ut.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(ut=ut.replace(/=/g,""),ii!==-1&&ii0;){var T=P[D],ee=I[T];if(ee){var we=b[T],Se=we===void 0||ee(we,T,b);if(Se!==!0)throw new TypeError("option "+T+" must be "+Se);continue}if(O!==!0)throw Error("Unknown option "+T)}}p.exports={assertOptions:h,validators:S}}),f$=u((n,p)=>{v(),y(),_(),yt(),be();var m=us(),S=mk(),f=e$(),h=c$(),b=xk(),I=d$(),O=I.validators;function P(D){this.defaults=D,this.interceptors={request:new f,response:new f}}P.prototype.request=function(D,T){if(typeof D=="string"?(T=T||{},T.url=D):T=D||{},!T.url)throw new Error("Provided config url is not valid");T=b(this.defaults,T),T.method?T.method=T.method.toLowerCase():this.defaults.method?T.method=this.defaults.method.toLowerCase():T.method="get";var ee=T.transitional;ee!==void 0&&I.assertOptions(ee,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var we=[],Se=!0;this.interceptors.request.forEach(function(Oe){typeof Oe.runWhen=="function"&&Oe.runWhen(T)===!1||(Se=Se&&Oe.synchronous,we.unshift(Oe.fulfilled,Oe.rejected))});var He=[];this.interceptors.response.forEach(function(Oe){He.push(Oe.fulfilled,Oe.rejected)});var We;if(!Se){var Re=[h,void 0];for(Array.prototype.unshift.apply(Re,we),Re=Re.concat(He),We=Promise.resolve(T);Re.length;)We=We.then(Re.shift(),Re.shift());return We}for(var Ge=T;we.length;){var Ze=we.shift(),vt=we.shift();try{Ge=Ze(Ge)}catch(Oe){vt(Oe);break}}try{We=h(Ge)}catch(Oe){return Promise.reject(Oe)}for(;He.length;)We=We.then(He.shift(),He.shift());return We},P.prototype.getUri=function(D){if(!D.url)throw new Error("Provided config url is not valid");return D=b(this.defaults,D),S(D.url,D.params,D.paramsSerializer).replace(/^\?/,"")},m.forEach(["delete","get","head","options"],function(D){P.prototype[D]=function(T,ee){return this.request(b(ee||{},{method:D,url:T,data:(ee||{}).data}))}}),m.forEach(["post","put","patch"],function(D){P.prototype[D]=function(T,ee,we){return this.request(b(we||{},{method:D,url:T,data:ee}))}}),p.exports=P}),p$=u((n,p)=>{v(),y(),_(),yt(),be();var m=by();function S(f){if(typeof f!="function")throw new TypeError("executor must be a function.");var h;this.promise=new Promise(function(I){h=I});var b=this;this.promise.then(function(I){if(b._listeners){var O,P=b._listeners.length;for(O=0;O{v(),y(),_(),yt(),be(),p.exports=function(m){return function(S){return m.apply(null,S)}}}),g$=u((n,p)=>{v(),y(),_(),yt(),be();var m=us();p.exports=function(S){return m.isObject(S)&&S.isAxiosError===!0}}),m$=u((n,p)=>{v(),y(),_(),yt(),be();var m=us(),S=gk(),f=f$(),h=xk(),b=wy();function I(P){var D=new f(P),T=S(f.prototype.request,D);return m.extend(T,f.prototype,D),m.extend(T,D),T.create=function(ee){return I(h(P,ee))},T}var O=I(b);O.Axios=f,O.Cancel=by(),O.CancelToken=p$(),O.isCancel=wk(),O.VERSION=_k().version,O.all=function(P){return Promise.all(P)},O.spread=h$(),O.isAxiosError=g$(),p.exports=O,p.exports.default=O}),Sk=u((n,p)=>{v(),y(),_(),yt(),be(),p.exports=m$()}),y$=u((n,p)=>{p.exports={name:"ton",version:"13.4.1",repository:"https://github.com/ton-core/ton.git",author:"Whales Corp. ",license:"MIT",main:"dist/index.js",files:["dist"],scripts:{docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},devDependencies:{"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},dependencies:{axios:"^0.25.0",dataloader:"^2.0.0","fp-ts":"^2.11.1","io-ts":"^2.2.16","io-ts-reporters":"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0"},peerDependencies:{"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:"yarn@3.4.1"}}),Ck=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__createBinding||(Object.create?function(Le,pt,Lt,fr){fr===void 0&&(fr=Lt),Object.defineProperty(Le,fr,{enumerable:!0,get:function(){return pt[Lt]}})}:function(Le,pt,Lt,fr){fr===void 0&&(fr=Lt),Le[fr]=pt[Lt]}),m=n&&n.__setModuleDefault||(Object.create?function(Le,pt){Object.defineProperty(Le,"default",{enumerable:!0,value:pt})}:function(Le,pt){Le.default=pt}),S=n&&n.__importStar||function(Le){if(Le&&Le.__esModule)return Le;var pt={};if(Le!=null)for(var Lt in Le)Lt!=="default"&&Object.prototype.hasOwnProperty.call(Le,Lt)&&p(pt,Le,Lt);return m(pt,Le),pt},f=n&&n.__importDefault||function(Le){return Le&&Le.__esModule?Le:{default:Le}};Object.defineProperty(n,"__esModule",{value:!0}),n.HttpApi=void 0;var h=S(mx()),b=gx(),I=f(Xj()),O=Zj(),P=f(Jj()),D=f(Sk()),T=y$().version,ee=h.type({"@type":h.literal("ton.blockIdExt"),workchain:h.number,shard:h.string,seqno:h.number,root_hash:h.string,file_hash:h.string}),we=h.type({balance:h.union([h.number,h.string]),state:h.union([h.literal("active"),h.literal("uninitialized"),h.literal("frozen")]),data:h.string,code:h.string,last_transaction_id:h.type({"@type":h.literal("internal.transactionId"),lt:h.string,hash:h.string}),block_id:ee,sync_utime:h.number}),Se=h.type({"@type":h.literal("ok")}),He=h.type({"@type":h.literal("query.fees"),source_fees:h.type({"@type":h.literal("fees"),in_fwd_fee:h.number,storage_fee:h.number,gas_fee:h.number,fwd_fee:h.number})}),We=h.type({gas_used:h.number,exit_code:h.number,stack:h.array(h.unknown)}),Re=h.union([h.type({"@type":h.literal("msg.dataRaw"),body:h.string}),h.type({"@type":h.literal("msg.dataText"),text:h.string}),h.type({"@type":h.literal("msg.dataDecryptedText"),text:h.string}),h.type({"@type":h.literal("msg.dataEncryptedText"),text:h.string})]),Ge=h.type({source:h.string,destination:h.string,value:h.string,fwd_fee:h.string,ihr_fee:h.string,created_lt:h.string,body_hash:h.string,msg_data:Re}),Ze=h.type({data:h.string,utime:h.number,transaction_id:h.type({lt:h.string,hash:h.string}),fee:h.string,storage_fee:h.string,other_fee:h.string,in_msg:h.union([h.undefined,Ge]),out_msgs:h.array(Ge)}),vt=h.array(Ze),Oe=h.type({state_root_hash:h.string,last:ee,init:ee}),Fe=h.type({shards:h.array(ee)}),dt=h.type({"@type":h.literal("blocks.shortTxId"),mode:h.number,account:h.string,lt:h.string,hash:h.string}),ft=h.type({id:ee,req_count:h.number,incomplete:h.boolean,transactions:h.array(dt)}),Xe=class{constructor(Le,pt,Lt,fr){this.namespace=Le,this.cache=pt,this.codec=Lt,this.keyEncoder=fr}async get(Le){let pt=await this.cache.get(this.namespace,this.keyEncoder(Le));if(pt){let Lt=this.codec.decode(JSON.parse(pt));if((0,b.isRight)(Lt))return Lt.right}return null}async set(Le,pt){pt!==null?await this.cache.set(this.namespace,this.keyEncoder(Le),JSON.stringify(pt)):await this.cache.set(this.namespace,this.keyEncoder(Le),null)}},Me=class{constructor(Le,pt){this.endpoint=Le,this.cache=new O.InMemoryCache,this.parameters={timeout:pt?.timeout||3e4,apiKey:pt?.apiKey},this.shardCache=new Xe("ton-shard",this.cache,h.array(ee),Lt=>Lt+""),this.shardLoader=new P.default(async Lt=>await Promise.all(Lt.map(async fr=>{let Cr=await this.shardCache.get(fr);if(Cr)return Cr;let qr=(await this.doCall("shards",{seqno:fr},Fe)).shards;return await this.shardCache.set(fr,qr),qr}))),this.shardTransactionsCache=new Xe("ton-shard-tx",this.cache,ft,Lt=>Lt.workchain+":"+Lt.shard+":"+Lt.seqno),this.shardTransactionsLoader=new P.default(async Lt=>await Promise.all(Lt.map(async fr=>{let Cr=await this.shardTransactionsCache.get(fr);if(Cr)return Cr;let qr=await this.doCall("getBlockTransactions",{workchain:fr.workchain,seqno:fr.seqno,shard:fr.shard},ft);return await this.shardTransactionsCache.set(fr,qr),qr})),{cacheKeyFn:Lt=>Lt.workchain+":"+Lt.shard+":"+Lt.seqno})}getAddressInformation(Le){return this.doCall("getAddressInformation",{address:Le.toString()},we)}async getTransactions(Le,pt){let Lt=pt.inclusive;delete pt.inclusive;let fr;pt.hash&&(fr=ht.from(pt.hash,"base64").toString("hex"));let Cr=pt.limit;pt.hash&&pt.lt&&Lt!==!0&&Cr++;let qr=await this.doCall("getTransactions",{address:Le.toString(),...pt,limit:Cr,hash:fr},vt);return qr.length>Cr&&(qr=qr.slice(0,Cr)),pt.hash&&pt.lt&&Lt!==!0&&qr.shift(),qr}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},Oe)}async getShards(Le){return await this.shardLoader.load(Le)}async getBlockTransactions(Le,pt,Lt){return await this.shardTransactionsLoader.load({workchain:Le,seqno:pt,shard:Lt})}async getTransaction(Le,pt,Lt){let fr=ht.from(Lt,"base64").toString("hex");return(await this.doCall("getTransactions",{address:Le.toString(),lt:pt,hash:fr,limit:1},vt)).find(qr=>qr.transaction_id.lt===pt&&qr.transaction_id.hash===Lt)||null}async callGetMethod(Le,pt,Lt){return await this.doCall("runGetMethod",{address:Le.toString(),method:pt,stack:_e(Lt)},We)}async sendBoc(Le){await this.doCall("sendBoc",{boc:Le.toString("base64")},Se)}async estimateFee(Le,pt){return await this.doCall("estimateFee",{address:Le.toString(),body:pt.body.toBoc().toString("base64"),init_data:pt.initData?pt.initData.toBoc().toString("base64"):"",init_code:pt.initCode?pt.initCode.toBoc().toString("base64"):"",ignore_chksig:pt.ignoreSignature},He)}async doCall(Le,pt,Lt){let fr={"Content-Type":"application/json","X-Ton-Client-Version":T};this.parameters.apiKey&&(fr["X-API-Key"]=this.parameters.apiKey);let Cr=await D.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:Le,params:pt}),{headers:fr,timeout:this.parameters.timeout});if(Cr.status!==200||!Cr.data.ok)throw Error("Received error: "+JSON.stringify(Cr.data));let qr=Lt.decode(Cr.data.result);if((0,b.isRight)(qr))return qr.right;throw Error("Malformed response: "+I.default.report(qr).join(", "))}};n.HttpApi=Me;function _e(Le){let pt=[];for(let Lt of Le)if(Lt.type==="int")pt.push(["num",Lt.value.toString()]);else if(Lt.type==="cell")pt.push(["tvm.Cell",Lt.cell.toBoc().toString("base64")]);else if(Lt.type==="slice")pt.push(["tvm.Slice",Lt.cell.toBoc().toString("base64")]);else if(Lt.type==="builder")pt.push(["tvm.Builder",Lt.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+Lt.type);return pt}}),v$=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__classPrivateFieldSet||function(P,D,T,ee,we){if(ee==="m")throw new TypeError("Private method is not writable");if(ee==="a"&&!we)throw new TypeError("Private accessor was defined without a setter");if(typeof D=="function"?P!==D||!we:!D.has(P))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ee==="a"?we.call(P,T):we?we.value=T:D.set(P,T),T},m=n&&n.__classPrivateFieldGet||function(P,D,T,ee){if(T==="a"&&!ee)throw new TypeError("Private accessor was defined without a getter");if(typeof D=="function"?P!==D||!ee:!D.has(P))throw new TypeError("Cannot read private member from an object whose class did not declare it");return T==="m"?ee:T==="a"?ee.call(P):ee?ee.value:D.get(P)},S;Object.defineProperty(n,"__esModule",{value:!0}),n.TonClient=void 0;var f=Ck(),h=Fa(),b=class{constructor(P){S.set(this,void 0),this.parameters={endpoint:P.endpoint},p(this,S,new f.HttpApi(this.parameters.endpoint,{timeout:P.timeout,apiKey:P.apiKey,adapter:P.httpAdapter}),"f")}async getBalance(P){return(await this.getContractState(P)).balance}async runMethod(P,D,T=[]){let ee=await m(this,S,"f").callGetMethod(P,D,T);if(ee.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+ee.exit_code);return{gas_used:ee.gas_used,stack:I(ee.stack)}}async callGetMethod(P,D,T=[]){return this.runMethod(P,D,T)}async runMethodWithError(P,D,T=[]){let ee=await m(this,S,"f").callGetMethod(P,D,T);return{gas_used:ee.gas_used,stack:I(ee.stack),exit_code:ee.exit_code}}async callGetMethodWithError(P,D,T=[]){return this.runMethodWithError(P,D,T)}async getTransactions(P,D){let T=await m(this,S,"f").getTransactions(P,D),ee=[];for(let we of T)ee.push((0,h.loadTransaction)(h.Cell.fromBoc(ht.from(we.data,"base64"))[0].beginParse()));return ee}async getTransaction(P,D,T){let ee=await m(this,S,"f").getTransaction(P,D,T);return ee?(0,h.loadTransaction)(h.Cell.fromBoc(ht.from(ee.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let P=await m(this,S,"f").getMasterchainInfo();return{workchain:P.init.workchain,shard:P.last.shard,initSeqno:P.init.seqno,latestSeqno:P.last.seqno}}async getWorkchainShards(P){return(await m(this,S,"f").getShards(P)).map(D=>({workchain:D.workchain,shard:D.shard,seqno:D.seqno}))}async getShardTransactions(P,D,T){let ee=await m(this,S,"f").getBlockTransactions(P,D,T);if(ee.incomplete)throw Error("Unsupported");return ee.transactions.map(we=>({account:h.Address.parseRaw(we.account),lt:we.lt,hash:we.hash}))}async sendMessage(P){let D=(0,h.beginCell)().store((0,h.storeMessage)(P)).endCell().toBoc();await m(this,S,"f").sendBoc(D)}async sendFile(P){await m(this,S,"f").sendBoc(P)}async estimateExternalMessageFee(P,D){return await m(this,S,"f").estimateFee(P,{body:D.body,initCode:D.initCode,initData:D.initData,ignoreSignature:D.ignoreSignature})}async sendExternalMessage(P,D){if(await this.isContractDeployed(P.address)||!P.init){let T=(0,h.external)({to:P.address,body:D});await this.sendMessage(T)}else{let T=(0,h.external)({to:P.address,init:{code:P.init.code,data:P.init.data},body:D});await this.sendMessage(T)}}async isContractDeployed(P){return(await this.getContractState(P)).state==="active"}async getContractState(P){let D=await m(this,S,"f").getAddressInformation(P),T=BigInt(D.balance),ee=D.state;return{balance:T,state:ee,code:D.code!==""?ht.from(D.code,"base64"):null,data:D.data!==""?ht.from(D.data,"base64"):null,lastTransaction:D.last_transaction_id.lt!=="0"?{lt:D.last_transaction_id.lt,hash:D.last_transaction_id.hash}:null,blockId:{workchain:D.block_id.workchain,shard:D.block_id.shard,seqno:D.block_id.seqno},timestampt:D.sync_utime}}open(P){return(0,h.openContract)(P,D=>O(this,D.address,D.init))}provider(P,D){return O(this,P,D)}};n.TonClient=b,S=new WeakMap;function I(P){let D=[];for(let T of P)if(T[0]==="num"){let ee=T[1];ee.startsWith("-")?D.push({type:"int",value:-BigInt(ee.slice(1))}):D.push({type:"int",value:BigInt(ee)})}else if(T[0]==="null")D.push({type:"null"});else if(T[0]==="cell")D.push({type:"cell",cell:h.Cell.fromBoc(ht.from(T[1].bytes,"base64"))[0]});else if(T[0]==="slice")D.push({type:"slice",cell:h.Cell.fromBoc(ht.from(T[1].bytes,"base64"))[0]});else if(T[0]==="builder")D.push({type:"builder",cell:h.Cell.fromBoc(ht.from(T[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+T[0]);return new h.TupleReader(D)}function O(P,D,T){return{async getState(){let ee=await P.getContractState(D),we=ee.balance,Se=ee.lastTransaction?{lt:BigInt(ee.lastTransaction.lt),hash:ht.from(ee.lastTransaction.hash,"base64")}:null,He;if(ee.state==="active")He={type:"active",code:ee.code?ee.code:null,data:ee.data?ee.data:null};else if(ee.state==="uninitialized")He={type:"uninit"};else if(ee.state==="frozen")He={type:"frozen",stateHash:ht.alloc(0)};else throw Error("Unsupported state");return{balance:we,last:Se,state:He}},async get(ee,we){return{stack:(await P.callGetMethod(D,ee,we)).stack}},async external(ee){let we=null;T&&!await P.isContractDeployed(D)&&(we=T);let Se=(0,h.external)({to:D,init:we?{code:we.code,data:we.data}:null,body:ee}),He=(0,h.beginCell)().store((0,h.storeMessage)(Se)).endCell().toBoc();await P.sendFile(He)},async internal(ee,we){let Se=null;T&&!await P.isContractDeployed(D)&&(Se=T);let He=!0;we.bounce!==null&&we.bounce!==void 0&&(He=we.bounce);let We;typeof we.value=="string"?We=(0,h.toNano)(we.value):We=we.value;let Re=null;typeof we.body=="string"?Re=(0,h.comment)(we.body):we.body&&(Re=we.body),await ee.send({to:D,value:We,bounce:He,sendMode:we.sendMode,init:Se,body:Re})}}}}),b$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUrlSafe=void 0;function p(m){for(;m.indexOf("/")>=0;)m=m.replace("/","_");for(;m.indexOf("+")>=0;)m=m.replace("+","-");for(;m.indexOf("=")>=0;)m=m.replace("=","");return m}n.toUrlSafe=p}),w$=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__createBinding||(Object.create?function(_e,Le,pt,Lt){Lt===void 0&&(Lt=pt),Object.defineProperty(_e,Lt,{enumerable:!0,get:function(){return Le[pt]}})}:function(_e,Le,pt,Lt){Lt===void 0&&(Lt=pt),_e[Lt]=Le[pt]}),m=n&&n.__setModuleDefault||(Object.create?function(_e,Le){Object.defineProperty(_e,"default",{enumerable:!0,value:Le})}:function(_e,Le){_e.default=Le}),S=n&&n.__importStar||function(_e){if(_e&&_e.__esModule)return _e;var Le={};if(_e!=null)for(var pt in _e)pt!=="default"&&Object.prototype.hasOwnProperty.call(_e,pt)&&p(Le,_e,pt);return m(Le,_e),Le},f=n&&n.__classPrivateFieldSet||function(_e,Le,pt,Lt,fr){if(Lt==="m")throw new TypeError("Private method is not writable");if(Lt==="a"&&!fr)throw new TypeError("Private accessor was defined without a setter");if(typeof Le=="function"?_e!==Le||!fr:!Le.has(_e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return Lt==="a"?fr.call(_e,pt):fr?fr.value=pt:Le.set(_e,pt),pt},h=n&&n.__classPrivateFieldGet||function(_e,Le,pt,Lt){if(pt==="a"&&!Lt)throw new TypeError("Private accessor was defined without a getter");if(typeof Le=="function"?_e!==Le||!Lt:!Le.has(_e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return pt==="m"?Lt:pt==="a"?Lt.call(_e):Lt?Lt.value:Le.get(_e)},b=n&&n.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}},I,O,P;Object.defineProperty(n,"__esModule",{value:!0}),n.TonClient4=void 0;var D=b(Sk()),T=S(mx()),ee=Fa(),we=b$(),Se=class{constructor(_e){I.set(this,void 0),O.set(this,void 0),P.set(this,void 0),f(this,I,_e.endpoint,"f"),f(this,O,_e.timeout||5e3,"f"),f(this,P,_e.httpAdapter,"f")}async getLastBlock(){let _e=await D.default.get(h(this,I,"f")+"/block/latest",{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!We.is(_e.data))throw Error("Mailformed response");return _e.data}async getBlock(_e){let Le=await D.default.get(h(this,I,"f")+"/block/"+_e,{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Re.is(Le.data))throw Error("Mailformed response");if(!Le.data.exist)throw Error("Block is out of scope");return Le.data.block}async getBlockByUtime(_e){let Le=await D.default.get(h(this,I,"f")+"/block/utime/"+_e,{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Re.is(Le.data))throw Error("Mailformed response");if(!Le.data.exist)throw Error("Block is out of scope");return Le.data.block}async getAccount(_e,Le){let pt=await D.default.get(h(this,I,"f")+"/block/"+_e+"/"+Le.toString({urlSafe:!0}),{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Ze.is(pt.data))throw Error("Mailformed response");return pt.data}async getAccountLite(_e,Le){let pt=await D.default.get(h(this,I,"f")+"/block/"+_e+"/"+Le.toString({urlSafe:!0})+"/lite",{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!vt.is(pt.data))throw Error("Mailformed response");return pt.data}async isContractDeployed(_e,Le){return(await this.getAccountLite(_e,Le)).account.state.type==="active"}async isAccountChanged(_e,Le,pt){let Lt=await D.default.get(h(this,I,"f")+"/block/"+_e+"/"+Le.toString({urlSafe:!0})+"/changed/"+pt.toString(10),{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Oe.is(Lt.data))throw Error("Mailformed response");return Lt.data}async getTransaction(_e,Le,pt){let Lt=Le.toString({urlSafe:!0}),fr=`/block/${_e}/${Lt}/tx/${pt.toString(10)}`,Cr=await D.default.get(new URL(fr,h(this,I,"f")).href,{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Me.is(Cr.data))throw Error("Mailformed response");let qr=ee.Cell.fromBoc(ht.from(Cr.data.boc,"base64"))[0];return{tx:(0,ee.loadTransaction)(qr.beginParse()),...Cr.data}}async getAccountTransactions(_e,Le,pt){let Lt=await D.default.get(h(this,I,"f")+"/account/"+_e.toString({urlSafe:!0})+"/tx/"+Le.toString(10)+"/"+(0,we.toUrlSafe)(pt.toString("base64")),{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Xe.is(Lt.data))throw Error("Mailformed response");let fr=Lt.data,Cr=[],qr=ee.Cell.fromBoc(ht.from(fr.boc,"base64"));for(let Nn=0;Nn0&&(pt="/"+[...Le].sort().join(","));let Lt=await D.default.get(h(this,I,"f")+"/block/"+_e+"/config"+pt,{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!dt.is(Lt.data))throw Error("Mailformed response");return Lt.data}async runMethod(_e,Le,pt,Lt){let fr=Lt&&Lt.length>0?"/"+(0,we.toUrlSafe)((0,ee.serializeTuple)(Lt).toBoc({idx:!1,crc32:!1}).toString("base64")):"",Cr=h(this,I,"f")+"/block/"+_e+"/"+Le.toString({urlSafe:!0})+"/run/"+pt+fr,qr=await D.default.get(Cr,{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!Fe.is(qr.data))throw Error("Mailformed response");let Nn=qr.data.resultRaw?(0,ee.parseTuple)(ee.Cell.fromBoc(ht.from(qr.data.resultRaw,"base64"))[0]):[];return{exitCode:qr.data.exitCode,result:Nn,resultRaw:qr.data.resultRaw,block:qr.data.block,shardBlock:qr.data.shardBlock,reader:new ee.TupleReader(Nn)}}async sendMessage(_e){let Le=await D.default.post(h(this,I,"f")+"/send",{boc:_e.toString("base64")},{adapter:h(this,P,"f"),timeout:h(this,O,"f")});if(!ft.is(Le.data))throw Error("Mailformed response");return{status:Le.data.status}}open(_e){return(0,ee.openContract)(_e,Le=>He(this,null,Le.address,Le.init))}openAt(_e,Le){return(0,ee.openContract)(Le,pt=>He(this,_e,pt.address,pt.init))}provider(_e,Le){return He(this,null,_e,Le||null)}providerAt(_e,Le,pt){return He(this,_e,Le,pt||null)}};n.TonClient4=Se,I=new WeakMap,O=new WeakMap,P=new WeakMap;function He(_e,Le,pt,Lt){return{async getState(){let fr=Le;fr===null&&(fr=(await _e.getLastBlock()).last.seqno);let Cr=await _e.getAccount(fr,pt),qr=Cr.account.last?{lt:BigInt(Cr.account.last.lt),hash:ht.from(Cr.account.last.hash,"base64")}:null,Nn;if(Cr.account.state.type==="active")Nn={type:"active",code:Cr.account.state.code?ht.from(Cr.account.state.code,"base64"):null,data:Cr.account.state.data?ht.from(Cr.account.state.data,"base64"):null};else if(Cr.account.state.type==="uninit")Nn={type:"uninit"};else if(Cr.account.state.type==="frozen")Nn={type:"frozen",stateHash:ht.from(Cr.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(Cr.account.balance.coins),last:qr,state:Nn}},async get(fr,Cr){let qr=Le;qr===null&&(qr=(await _e.getLastBlock()).last.seqno);let Nn=await _e.runMethod(qr,pt,fr,Cr);if(Nn.exitCode!==0&&Nn.exitCode!==1)throw Error("Exit code: "+Nn.exitCode);return{stack:new ee.TupleReader(Nn.result)}},async external(fr){let Cr=await _e.getLastBlock(),qr=null;Lt&&(await _e.getAccountLite(Cr.last.seqno,pt)).account.state.type!=="active"&&(qr=Lt);let Nn=(0,ee.external)({to:pt,init:qr?{code:qr.code,data:qr.data}:null,body:fr}),qt=(0,ee.beginCell)().store((0,ee.storeMessage)(Nn)).endCell().toBoc();await _e.sendMessage(qt)},async internal(fr,Cr){let qr=await _e.getLastBlock(),Nn=null;Lt&&(await _e.getAccountLite(qr.last.seqno,pt)).account.state.type!=="active"&&(Nn=Lt);let qt=!0;Cr.bounce!==null&&Cr.bounce!==void 0&&(qt=Cr.bounce);let Jn;typeof Cr.value=="string"?Jn=(0,ee.toNano)(Cr.value):Jn=Cr.value;let ti=null;typeof Cr.body=="string"?ti=(0,ee.comment)(Cr.body):Cr.body&&(ti=Cr.body),await fr.send({to:pt,value:Jn,bounce:qt,sendMode:Cr.sendMode,init:Nn,body:ti})}}}var We=T.type({last:T.type({seqno:T.number,shard:T.string,workchain:T.number,fileHash:T.string,rootHash:T.string}),init:T.type({fileHash:T.string,rootHash:T.string}),stateRootHash:T.string,now:T.number}),Re=T.union([T.type({exist:T.literal(!1)}),T.type({exist:T.literal(!0),block:T.type({shards:T.array(T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string,transactions:T.array(T.type({account:T.string,hash:T.string,lt:T.string}))}))})})]),Ge=T.type({lastPaid:T.number,duePayment:T.union([T.null,T.string]),used:T.type({bits:T.number,cells:T.number,publicCells:T.number})}),Ze=T.type({account:T.type({state:T.union([T.type({type:T.literal("uninit")}),T.type({type:T.literal("active"),code:T.union([T.string,T.null]),data:T.union([T.string,T.null])}),T.type({type:T.literal("frozen"),stateHash:T.string})]),balance:T.type({coins:T.string}),last:T.union([T.null,T.type({lt:T.string,hash:T.string})]),storageStat:T.union([T.null,Ge])}),block:T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string})}),vt=T.type({account:T.type({state:T.union([T.type({type:T.literal("uninit")}),T.type({type:T.literal("active"),codeHash:T.string,dataHash:T.string}),T.type({type:T.literal("frozen"),stateHash:T.string})]),balance:T.type({coins:T.string}),last:T.union([T.null,T.type({lt:T.string,hash:T.string})]),storageStat:T.union([T.null,Ge])})}),Oe=T.type({changed:T.boolean,block:T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string})}),Fe=T.type({exitCode:T.number,resultRaw:T.union([T.string,T.null]),block:T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string}),shardBlock:T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string})}),dt=T.type({config:T.type({cell:T.string,address:T.string,globalBalance:T.type({coins:T.string})})}),ft=T.type({status:T.number}),Xe=T.type({blocks:T.array(T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string,fileHash:T.string})),boc:T.string}),Me=T.type({block:T.type({workchain:T.number,seqno:T.number,shard:T.string,rootHash:T.string}),boc:T.string,proof:T.string})}),xc=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.createWalletTransferV4=n.createWalletTransferV3=n.createWalletTransferV2=n.createWalletTransferV1=void 0;var p=Fa(),m=ip();function S(I){let O=(0,p.beginCell)().storeUint(I.seqno,32);I.message&&(O.storeUint(I.sendMode,8),O.storeRef((0,p.beginCell)().store((0,p.storeMessageRelaxed)(I.message))));let P=(0,m.sign)(O.endCell().hash(),I.secretKey);return(0,p.beginCell)().storeBuffer(P).storeBuilder(O).endCell()}n.createWalletTransferV1=S;function f(I){if(I.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,p.beginCell)().storeUint(I.seqno,32);if(I.seqno===0)for(let D=0;D<32;D++)O.storeBit(1);else O.storeUint(I.timeout||Math.floor(Date.now()/1e3)+60,32);for(let D of I.messages)O.storeUint(I.sendMode,8),O.storeRef((0,p.beginCell)().store((0,p.storeMessageRelaxed)(D)));let P=(0,m.sign)(O.endCell().hash(),I.secretKey);return(0,p.beginCell)().storeBuffer(P).storeBuilder(O).endCell()}n.createWalletTransferV2=f;function h(I){if(I.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,p.beginCell)().storeUint(I.walletId,32);if(I.seqno===0)for(let D=0;D<32;D++)O.storeBit(1);else O.storeUint(I.timeout||Math.floor(Date.now()/1e3)+60,32);O.storeUint(I.seqno,32);for(let D of I.messages)O.storeUint(I.sendMode,8),O.storeRef((0,p.beginCell)().store((0,p.storeMessageRelaxed)(D)));let P=(0,m.sign)(O.endCell().hash(),I.secretKey);return(0,p.beginCell)().storeBuffer(P).storeBuilder(O).endCell()}n.createWalletTransferV3=h;function b(I){if(I.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,p.beginCell)().storeUint(I.walletId,32);if(I.seqno===0)for(let D=0;D<32;D++)O.storeBit(1);else O.storeUint(I.timeout||Math.floor(Date.now()/1e3)+60,32);O.storeUint(I.seqno,32),O.storeUint(0,8);for(let D of I.messages)O.storeUint(I.sendMode,8),O.storeRef((0,p.beginCell)().store((0,p.storeMessageRelaxed)(D)));let P=(0,m.sign)(O.endCell().hash(),I.secretKey);return(0,p.beginCell)().storeBuffer(P).storeBuilder(O).endCell()}n.createWalletTransferV4=b}),x$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R1=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h){this.workchain=f,this.publicKey=h;let b=p.Cell.fromBoc(ht.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],I=(0,p.beginCell)().storeUint(0,32).storeBuffer(h).endCell();this.init={code:b,data:I},this.address=(0,p.contractAddress)(f,{code:b,data:I})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){let h=await f.getState();return h.state.type==="active"?p.Cell.fromBoc(h.state.data)[0].beginParse().loadUint(32):0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,message:f.message})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,message:(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})});await this.send(f,O)}}}};n.WalletContractV1R1=S}),_$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R2=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h){this.workchain=f,this.publicKey=h;let b=p.Cell.fromBoc(ht.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],I=(0,p.beginCell)().storeUint(0,32).storeBuffer(h).endCell();this.init={code:b,data:I},this.address=(0,p.contractAddress)(f,{code:b,data:I})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,message:f.message})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,message:(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})});await this.send(f,O)}}}};n.WalletContractV1R2=S}),S$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV1R3=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h){this.workchain=f,this.publicKey=h;let b=p.Cell.fromBoc(ht.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],I=(0,p.beginCell)().storeUint(0,32).storeBuffer(h).endCell();this.init={code:b,data:I},this.address=(0,p.contractAddress)(f,{code:b,data:I})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV1)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,message:f.message})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,message:(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})});await this.send(f,O)}}}};n.WalletContractV1R3=S}),C$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV2R1=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h){this.workchain=f,this.publicKey=h;let b=p.Cell.fromBoc(ht.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],I=(0,p.beginCell)().storeUint(0,32).storeBuffer(h).endCell();this.init={code:b,data:I},this.address=(0,p.contractAddress)(f,{code:b,data:I})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV2)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,messages:[(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})]});await this.send(f,O)}}}};n.WalletContractV2R1=S}),E$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV2R2=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h){this.workchain=f,this.publicKey=h;let b=p.Cell.fromBoc(ht.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],I=(0,p.beginCell)().storeUint(0,32).storeBuffer(h).endCell();this.init={code:b,data:I},this.address=(0,p.contractAddress)(f,{code:b,data:I})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV2)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,messages:[(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})]});await this.send(f,O)}}}};n.WalletContractV2R2=S}),k$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV3R1=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h,b){this.workchain=f,this.publicKey=h,b!=null?this.walletId=b:this.walletId=698983191+f;let I=p.Cell.fromBoc(ht.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],O=(0,p.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(h).endCell();this.init={code:I,data:O},this.address=(0,p.contractAddress)(f,{code:I,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV3)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,messages:[(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})]});await this.send(f,O)}}}};n.WalletContractV3R1=S}),A$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV3R2=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h,b){this.workchain=f,this.publicKey=h,b!=null?this.walletId=b:this.walletId=698983191+f;let I=p.Cell.fromBoc(ht.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],O=(0,p.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(h).endCell();this.init={code:I,data:O},this.address=(0,p.contractAddress)(f,{code:I,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV3)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,messages:[(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})]});await this.send(f,O)}}}};n.WalletContractV3R2=S}),T$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.WalletContractV4=void 0;var p=Fa(),m=xc(),S=class{constructor(f,h,b){this.workchain=f,this.publicKey=h,b!=null?this.walletId=b:this.walletId=698983191+f;let I=p.Cell.fromBoc(ht.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],O=(0,p.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:I,data:O},this.address=(0,p.contractAddress)(f,{code:I,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,h){await f.external(h)}async sendTransfer(f,h){let b=this.createTransfer(h);await this.send(f,b)}createTransfer(f){let h=p.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(h=f.sendMode),(0,m.createWalletTransferV4)({seqno:f.seqno,sendMode:h,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,h){return{send:async b=>{let I=await this.getSeqno(f),O=this.createTransfer({seqno:I,secretKey:h,sendMode:b.sendMode,messages:[(0,p.internal)({to:b.to,value:b.value,init:b.init,body:b.body,bounce:b.bounce})]});await this.send(f,O)}}}};n.WalletContractV4=S}),I$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.JettonMaster=void 0;var p=Fa(),m=class{constructor(S){this.address=S}static create(S){return new m(S)}async getWalletAddress(S,f){return(await S.get("get_wallet_address",[{type:"slice",cell:(0,p.beginCell)().storeAddress(f).endCell()}])).stack.readAddress()}async getJettonData(S){let f=await S.get("get_jetton_data",[]),h=f.stack.readBigNumber(),b=f.stack.readBoolean(),I=f.stack.readAddress(),O=f.stack.readCell(),P=f.stack.readCell();return{totalSupply:h,mintable:b,adminAddress:I,content:O,walletCode:P}}};n.JettonMaster=m}),R$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.JettonWallet=void 0;var p=class{constructor(m){this.address=m}static create(m){return new p(m)}async getBalance(m){return(await m.getState()).state.type!=="active"?0n:(await m.get("get_wallet_data",[])).stack.readBigNumber()}};n.JettonWallet=p}),Ek=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigOrder=void 0;var p=ip(),m=Fa(),S=class{constructor(f){this.signatures={},this.payload=f}static fromCell(f){let h=f.beginParse(),b=h.loadMaybeRef()?.beginParse(),I=h.asCell(),O=new S(I);if(b){for(;b.remainingBits>0;){let P=b.loadBuffer(64),D=b.loadUint(8);O.signatures[D]=P,b.remainingRefs>0?b=b.loadRef().asSlice():b.skip(1)}b.endParse()}return O}static fromPayload(f){return new S(f)}addSignature(f,h,b){let I=this.payload.hash();if(!(0,p.signVerify)(I,h,b.owners.get(f).slice(0,-1)))throw Error("invalid signature");this.signatures[f]=h}sign(f,h){let b=this.payload.hash();return this.signatures[f]=(0,p.sign)(b,h),b}unionSignatures(f){this.signatures=Object.assign({},this.signatures,f.signatures)}clearSignatures(){this.signatures={}}toCell(f){let h=(0,m.beginCell)().storeBit(0);for(let b in this.signatures){let I=this.signatures[b];h=(0,m.beginCell)().storeBit(1).storeRef((0,m.beginCell)().storeBuffer(I).storeUint(parseInt(b),8).storeBuilder(h).endCell())}return(0,m.beginCell)().storeUint(f,8).storeBuilder(h).storeBuilder(this.payload.asBuilder()).endCell()}};n.MultisigOrder=S}),P$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigOrderBuilder=void 0;var p=Fa(),m=Ek(),S=class{constructor(f,h){this.messages=(0,p.beginCell)(),this.queryId=0n,this.walletId=f,this.queryOffset=h||7200}addMessage(f,h){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(h,8),this.messages.storeRef((0,p.beginCell)().store((0,p.storeMessageRelaxed)(f)).endCell())}clearMessages(){this.messages=(0,p.beginCell)()}build(){return m.MultisigOrder.fromPayload((0,p.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){let f=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=f<<32n}};n.MultisigOrderBuilder=S}),M$=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigWallet=void 0;var p=ip(),m=Fa(),S=m.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ=="),f=class{constructor(h,b,I,O,P){this.provider=null,this.owners=m.Dictionary.empty(),this.workchain=b,this.walletId=I,this.k=O;for(let D=0;D{v(),y(),_(),yt(),be();var p=n&&n.__createBinding||(Object.create?function(Ze,vt,Oe,Fe){Fe===void 0&&(Fe=Oe),Object.defineProperty(Ze,Fe,{enumerable:!0,get:function(){return vt[Oe]}})}:function(Ze,vt,Oe,Fe){Fe===void 0&&(Fe=Oe),Ze[Fe]=vt[Oe]}),m=n&&n.__exportStar||function(Ze,vt){for(var Oe in Ze)Oe!=="default"&&!Object.prototype.hasOwnProperty.call(vt,Oe)&&p(vt,Ze,Oe)};Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigWallet=n.MultisigOrderBuilder=n.MultisigOrder=n.JettonWallet=n.JettonMaster=n.WalletContractV4=n.WalletContractV3R2=n.WalletContractV3R1=n.WalletContractV2R2=n.WalletContractV2R1=n.WalletContractV1R3=n.WalletContractV1R2=n.WalletContractV1R1=n.TonClient4=n.TonClient=n.HttpApi=void 0,m(Fa(),n);var S=Ck();Object.defineProperty(n,"HttpApi",{enumerable:!0,get:function(){return S.HttpApi}});var f=v$();Object.defineProperty(n,"TonClient",{enumerable:!0,get:function(){return f.TonClient}});var h=w$();Object.defineProperty(n,"TonClient4",{enumerable:!0,get:function(){return h.TonClient4}});var b=x$();Object.defineProperty(n,"WalletContractV1R1",{enumerable:!0,get:function(){return b.WalletContractV1R1}});var I=_$();Object.defineProperty(n,"WalletContractV1R2",{enumerable:!0,get:function(){return I.WalletContractV1R2}});var O=S$();Object.defineProperty(n,"WalletContractV1R3",{enumerable:!0,get:function(){return O.WalletContractV1R3}});var P=C$();Object.defineProperty(n,"WalletContractV2R1",{enumerable:!0,get:function(){return P.WalletContractV2R1}});var D=E$();Object.defineProperty(n,"WalletContractV2R2",{enumerable:!0,get:function(){return D.WalletContractV2R2}});var T=k$();Object.defineProperty(n,"WalletContractV3R1",{enumerable:!0,get:function(){return T.WalletContractV3R1}});var ee=A$();Object.defineProperty(n,"WalletContractV3R2",{enumerable:!0,get:function(){return ee.WalletContractV3R2}});var we=T$();Object.defineProperty(n,"WalletContractV4",{enumerable:!0,get:function(){return we.WalletContractV4}});var Se=I$();Object.defineProperty(n,"JettonMaster",{enumerable:!0,get:function(){return Se.JettonMaster}});var He=R$();Object.defineProperty(n,"JettonWallet",{enumerable:!0,get:function(){return He.JettonWallet}});var We=Ek();Object.defineProperty(n,"MultisigOrder",{enumerable:!0,get:function(){return We.MultisigOrder}});var Re=P$();Object.defineProperty(n,"MultisigOrderBuilder",{enumerable:!0,get:function(){return Re.MultisigOrderBuilder}});var Ge=M$();Object.defineProperty(n,"MultisigWallet",{enumerable:!0,get:function(){return Ge.MultisigWallet}})}),B$=u((n,p)=>{v(),y(),_(),yt(),be(),function(m,S){S(typeof n=="object"&&typeof p<"u"?n:m.WHATWGFetch={})}(n,function(m){var S=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof S<"u"&&S,f={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function h(_e){return _e&&DataView.prototype.isPrototypeOf(_e)}if(f.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],I=ArrayBuffer.isView||function(_e){return _e&&b.indexOf(Object.prototype.toString.call(_e))>-1};function O(_e){if(typeof _e!="string"&&(_e=String(_e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(_e)||_e==="")throw new TypeError('Invalid character in header field name: "'+_e+'"');return _e.toLowerCase()}function P(_e){return typeof _e!="string"&&(_e=String(_e)),_e}function D(_e){var Le={next:function(){var pt=_e.shift();return{done:pt===void 0,value:pt}}};return f.iterable&&(Le[Symbol.iterator]=function(){return Le}),Le}function T(_e){this.map={},_e instanceof T?_e.forEach(function(Le,pt){this.append(pt,Le)},this):Array.isArray(_e)?_e.forEach(function(Le){this.append(Le[0],Le[1])},this):_e&&Object.getOwnPropertyNames(_e).forEach(function(Le){this.append(Le,_e[Le])},this)}T.prototype.append=function(_e,Le){_e=O(_e),Le=P(Le);var pt=this.map[_e];this.map[_e]=pt?pt+", "+Le:Le},T.prototype.delete=function(_e){delete this.map[O(_e)]},T.prototype.get=function(_e){return _e=O(_e),this.has(_e)?this.map[_e]:null},T.prototype.has=function(_e){return this.map.hasOwnProperty(O(_e))},T.prototype.set=function(_e,Le){this.map[O(_e)]=P(Le)},T.prototype.forEach=function(_e,Le){for(var pt in this.map)this.map.hasOwnProperty(pt)&&_e.call(Le,this.map[pt],pt,this)},T.prototype.keys=function(){var _e=[];return this.forEach(function(Le,pt){_e.push(pt)}),D(_e)},T.prototype.values=function(){var _e=[];return this.forEach(function(Le){_e.push(Le)}),D(_e)},T.prototype.entries=function(){var _e=[];return this.forEach(function(Le,pt){_e.push([pt,Le])}),D(_e)},f.iterable&&(T.prototype[Symbol.iterator]=T.prototype.entries);function ee(_e){if(_e.bodyUsed)return Promise.reject(new TypeError("Already read"));_e.bodyUsed=!0}function we(_e){return new Promise(function(Le,pt){_e.onload=function(){Le(_e.result)},_e.onerror=function(){pt(_e.error)}})}function Se(_e){var Le=new FileReader,pt=we(Le);return Le.readAsArrayBuffer(_e),pt}function He(_e){var Le=new FileReader,pt=we(Le);return Le.readAsText(_e),pt}function We(_e){for(var Le=new Uint8Array(_e),pt=new Array(Le.length),Lt=0;Lt-1?Le:_e}function Oe(_e,Le){if(!(this instanceof Oe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Le=Le||{};var pt=Le.body;if(_e instanceof Oe){if(_e.bodyUsed)throw new TypeError("Already read");this.url=_e.url,this.credentials=_e.credentials,Le.headers||(this.headers=new T(_e.headers)),this.method=_e.method,this.mode=_e.mode,this.signal=_e.signal,!pt&&_e._bodyInit!=null&&(pt=_e._bodyInit,_e.bodyUsed=!0)}else this.url=String(_e);if(this.credentials=Le.credentials||this.credentials||"same-origin",(Le.headers||!this.headers)&&(this.headers=new T(Le.headers)),this.method=vt(Le.method||this.method||"GET"),this.mode=Le.mode||this.mode||null,this.signal=Le.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&pt)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(pt),(this.method==="GET"||this.method==="HEAD")&&(Le.cache==="no-store"||Le.cache==="no-cache")){var Lt=/([?&])_=[^&]*/;if(Lt.test(this.url))this.url=this.url.replace(Lt,"$1_="+new Date().getTime());else{var fr=/\?/;this.url+=(fr.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Oe.prototype.clone=function(){return new Oe(this,{body:this._bodyInit})};function Fe(_e){var Le=new FormData;return _e.trim().split("&").forEach(function(pt){if(pt){var Lt=pt.split("="),fr=Lt.shift().replace(/\+/g," "),Cr=Lt.join("=").replace(/\+/g," ");Le.append(decodeURIComponent(fr),decodeURIComponent(Cr))}}),Le}function dt(_e){var Le=new T,pt=_e.replace(/\r?\n[\t ]+/g," ");return pt.split("\r").map(function(Lt){return Lt.indexOf(` -`)===0?Lt.substr(1,Lt.length):Lt}).forEach(function(Lt){var fr=Lt.split(":"),Cr=fr.shift().trim();if(Cr){var qr=fr.join(":").trim();Le.append(Cr,qr)}}),Le}Ge.call(Oe.prototype);function ft(_e,Le){if(!(this instanceof ft))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Le||(Le={}),this.type="default",this.status=Le.status===void 0?200:Le.status,this.ok=this.status>=200&&this.status<300,this.statusText=Le.statusText===void 0?"":""+Le.statusText,this.headers=new T(Le.headers),this.url=Le.url||"",this._initBody(_e)}Ge.call(ft.prototype),ft.prototype.clone=function(){return new ft(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new T(this.headers),url:this.url})},ft.error=function(){var _e=new ft(null,{status:0,statusText:""});return _e.type="error",_e};var Xe=[301,302,303,307,308];ft.redirect=function(_e,Le){if(Xe.indexOf(Le)===-1)throw new RangeError("Invalid status code");return new ft(null,{status:Le,headers:{location:_e}})},m.DOMException=S.DOMException;try{new m.DOMException}catch{m.DOMException=function(_e,Le){this.message=_e,this.name=Le;var pt=Error(_e);this.stack=pt.stack},m.DOMException.prototype=Object.create(Error.prototype),m.DOMException.prototype.constructor=m.DOMException}function Me(_e,Le){return new Promise(function(pt,Lt){var fr=new Oe(_e,Le);if(fr.signal&&fr.signal.aborted)return Lt(new m.DOMException("Aborted","AbortError"));var Cr=new XMLHttpRequest;function qr(){Cr.abort()}Cr.onload=function(){var qt={status:Cr.status,statusText:Cr.statusText,headers:dt(Cr.getAllResponseHeaders()||"")};qt.url="responseURL"in Cr?Cr.responseURL:qt.headers.get("X-Request-URL");var Jn="response"in Cr?Cr.response:Cr.responseText;setTimeout(function(){pt(new ft(Jn,qt))},0)},Cr.onerror=function(){setTimeout(function(){Lt(new TypeError("Network request failed"))},0)},Cr.ontimeout=function(){setTimeout(function(){Lt(new TypeError("Network request failed"))},0)},Cr.onabort=function(){setTimeout(function(){Lt(new m.DOMException("Aborted","AbortError"))},0)};function Nn(qt){try{return qt===""&&S.location.href?S.location.href:qt}catch{return qt}}Cr.open(fr.method,Nn(fr.url),!0),fr.credentials==="include"?Cr.withCredentials=!0:fr.credentials==="omit"&&(Cr.withCredentials=!1),"responseType"in Cr&&(f.blob?Cr.responseType="blob":f.arrayBuffer&&fr.headers.get("Content-Type")&&fr.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Cr.responseType="arraybuffer")),Le&&typeof Le.headers=="object"&&!(Le.headers instanceof T)?Object.getOwnPropertyNames(Le.headers).forEach(function(qt){Cr.setRequestHeader(qt,P(Le.headers[qt]))}):fr.headers.forEach(function(qt,Jn){Cr.setRequestHeader(Jn,qt)}),fr.signal&&(fr.signal.addEventListener("abort",qr),Cr.onreadystatechange=function(){Cr.readyState===4&&fr.signal.removeEventListener("abort",qr)}),Cr.send(typeof fr._bodyInit>"u"?null:fr._bodyInit)})}Me.polyfill=!0,S.fetch||(S.fetch=Me,S.Headers=T,S.Request=Oe,S.Response=ft),m.Headers=T,m.Request=Oe,m.Response=ft,m.fetch=Me,Object.defineProperty(m,"__esModule",{value:!0})})}),U$=u((n,p)=>{v(),y(),_(),yt(),be(),B$(),p.exports=self.fetch.bind(self)}),D$=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__awaiter||function(f,h,b,I){function O(P){return P instanceof b?P:new b(function(D){D(P)})}return new(b||(b=Promise))(function(P,D){function T(Se){try{we(I.next(Se))}catch(He){D(He)}}function ee(Se){try{we(I.throw(Se))}catch(He){D(He)}}function we(Se){Se.done?P(Se.value):O(Se.value).then(T,ee)}we((I=I.apply(f,h||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Nodes=void 0,U$();var m=2*60*1e3,S=class{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(f){return p(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let h=[];try{h=yield(yield fetch(f)).json()}catch(b){throw new Error(`exception in fetch(${f}): ${b}`)}for(let b of h)b.Healthy==="1"&&this.topology.push(b);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(f){var h;let b=[];for(let I of this.topology)this.initTime-I.Mngr.successTS0&&!((h=I.Mngr)===null||h===void 0)&&h.health[f]&&b.push(I);return b}};n.Nodes=S}),L$=u((n,p)=>{p.exports={name:"@orbs-network/ton-access",version:"2.3.0",description:"Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",source:"lib/index.js",main:"lib/index.js",types:"lib/index.d.ts",files:["lib/**/*"],scripts:{test:"env mocha -r ts-node/register test/**/*.ts","test:v2":"env mocha -r ts-node/register test/ton-v2.ts","test:v4":"env mocha -r ts-node/register test/ton-v4.ts",cleanup:"rimraf ./lib","build:web:reg":"esbuild ./lib/web.js --bundle --sourcemap --target=es2015 --outfile=./dist/index.js","build:web:min":"esbuild ./lib/web.js --bundle --minify --target=es2015 --outfile=./dist/index.min.js","build:web":"rimraf ./dist && npm run build:web:reg && npm run build:web:min",build:"npm run lint && rimraf ./lib && tsc && npm run build:web",format:'prettier --write "src/**/*.ts"',lint:"tslint -p tsconfig.json",prepare:"npm run build",prepublishOnly:"npm test && npm run lint",preversion:"npm run lint",version:"npm run format && git add -A src",postversion:"git push && git push --tags"},repository:{type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},author:"yuval@orbs.com",license:"MIT",bugs:{url:"https://github.com/orbs-network/ton-access/issues"},homepage:"https://github.com/orbs-network/ton-access#readme",dependencies:{"isomorphic-fetch":"^3.0.0"},devDependencies:{"@types/bn.js":"^5.1.1","@types/chai":"^4.3.4","@types/isomorphic-fetch":"^0.0.36","@types/mocha":"^10.0.0",buffer:"^6.0.3",chai:"^4.3.7",esbuild:"^0.15.14",mocha:"^10.1.0",prettier:"^2.7.1",rimraf:"^3.0.2",ton:"^12.1.3","ton-lite-client":"npm:@truecarry/ton-lite-client@^1.6.1",tonweb:"^0.0.58","ts-node":"^10.9.1",tslib:"^2.4.0",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0"}}}),N$=u(n=>{v(),y(),_(),yt(),be();var p=n&&n.__awaiter||function(P,D,T,ee){function we(Se){return Se instanceof T?Se:new T(function(He){He(Se)})}return new(T||(T=Promise))(function(Se,He){function We(Ze){try{Ge(ee.next(Ze))}catch(vt){He(vt)}}function Re(Ze){try{Ge(ee.throw(Ze))}catch(vt){He(vt)}}function Ge(Ze){Ze.done?Se(Ze.value):we(Ze.value).then(We,Re)}Ge((ee=ee.apply(P,D||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.getHttpV4Endpoint=n.getHttpV4Endpoints=n.getHttpEndpoint=n.getHttpEndpoints=n.Access=void 0;var m=D$(),S=class{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new m.Nodes}init(){return p(this,void 0,void 0,function*(){let P=L$();yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${P.version}`)})}makeProtonet(P,D){let T="";switch(P){case"toncenter-api-v2":T+="v2-";break;case"ton-api-v4":T+="v4-";break}return T+=D,T}weightedRandom(P){let D=0;for(let we of P)D+=we.Weight;let T=Math.floor(Math.random()*D),ee=0;for(let we of P){if(T>=ee&&T_y,__asyncDelegator:()=>X$,__asyncGenerator:()=>Q$,__asyncValues:()=>Z$,__await:()=>lg,__awaiter:()=>W$,__classPrivateFieldGet:()=>rF,__classPrivateFieldSet:()=>nF,__createBinding:()=>q$,__decorate:()=>F$,__exportStar:()=>K$,__extends:()=>j$,__generator:()=>V$,__importDefault:()=>tF,__importStar:()=>eF,__makeTemplateObject:()=>J$,__metadata:()=>H$,__param:()=>z$,__read:()=>kk,__rest:()=>$$,__spread:()=>G$,__spreadArrays:()=>Y$,__values:()=>xx});function j$(n,p){xy(n,p);function m(){this.constructor=n}n.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}function $$(n,p){var m={};for(var S in n)Object.prototype.hasOwnProperty.call(n,S)&&p.indexOf(S)<0&&(m[S]=n[S]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,S=Object.getOwnPropertySymbols(n);f=0;I--)(b=n[I])&&(h=(f<3?b(h):f>3?b(p,m,h):b(p,m))||h);return f>3&&h&&Object.defineProperty(p,m,h),h}function z$(n,p){return function(m,S){p(m,S,n)}}function H$(n,p){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,p)}function W$(n,p,m,S){function f(h){return h instanceof m?h:new m(function(b){b(h)})}return new(m||(m=Promise))(function(h,b){function I(D){try{P(S.next(D))}catch(T){b(T)}}function O(D){try{P(S.throw(D))}catch(T){b(T)}}function P(D){D.done?h(D.value):f(D.value).then(I,O)}P((S=S.apply(n,p||[])).next())})}function V$(n,p){var m={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},S,f,h,b;return b={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(b[Symbol.iterator]=function(){return this}),b;function I(P){return function(D){return O([P,D])}}function O(P){if(S)throw new TypeError("Generator is already executing.");for(;m;)try{if(S=1,f&&(h=P[0]&2?f.return:P[0]?f.throw||((h=f.return)&&h.call(f),0):f.next)&&!(h=h.call(f,P[1])).done)return h;switch(f=0,h&&(P=[P[0]&2,h.value]),P[0]){case 0:case 1:h=P;break;case 4:return m.label++,{value:P[1],done:!1};case 5:m.label++,f=P[1],P=[0];continue;case 7:P=m.ops.pop(),m.trys.pop();continue;default:if(h=m.trys,!(h=h.length>0&&h[h.length-1])&&(P[0]===6||P[0]===2)){m=0;continue}if(P[0]===3&&(!h||P[1]>h[0]&&P[1]=n.length&&(n=void 0),{value:n&&n[S++],done:!n}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")}function kk(n,p){var m=typeof Symbol=="function"&&n[Symbol.iterator];if(!m)return n;var S=m.call(n),f,h=[],b;try{for(;(p===void 0||p-- >0)&&!(f=S.next()).done;)h.push(f.value)}catch(I){b={error:I}}finally{try{f&&!f.done&&(m=S.return)&&m.call(S)}finally{if(b)throw b.error}}return h}function G$(){for(var n=[],p=0;p1||I(ee,we)})})}function I(ee,we){try{O(S[ee](we))}catch(Se){T(h[0][3],Se)}}function O(ee){ee.value instanceof lg?Promise.resolve(ee.value.v).then(P,D):T(h[0][2],ee)}function P(ee){I("next",ee)}function D(ee){I("throw",ee)}function T(ee,we){ee(we),h.shift(),h.length&&I(h[0][0],h[0][1])}}function X$(n){var p,m;return p={},S("next"),S("throw",function(f){throw f}),S("return"),p[Symbol.iterator]=function(){return this},p;function S(f,h){p[f]=n[f]?function(b){return(m=!m)?{value:lg(n[f](b)),done:f==="return"}:h?h(b):b}:h}}function Z$(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var p=n[Symbol.asyncIterator],m;return p?p.call(n):(n=typeof xx=="function"?xx(n):n[Symbol.iterator](),m={},S("next"),S("throw"),S("return"),m[Symbol.asyncIterator]=function(){return this},m);function S(h){m[h]=n[h]&&function(b){return new Promise(function(I,O){b=n[h](b),f(I,O,b.done,b.value)})}}function f(h,b,I,O){Promise.resolve(O).then(function(P){h({value:P,done:I})},b)}}function J$(n,p){return Object.defineProperty?Object.defineProperty(n,"raw",{value:p}):n.raw=p,n}function eF(n){if(n&&n.__esModule)return n;var p={};if(n!=null)for(var m in n)Object.hasOwnProperty.call(n,m)&&(p[m]=n[m]);return p.default=n,p}function tF(n){return n&&n.__esModule?n:{default:n}}function rF(n,p){if(!p.has(n))throw new TypeError("attempted to get private field on non-instance");return p.get(n)}function nF(n,p,m){if(!p.has(n))throw new TypeError("attempted to set private field on non-instance");return p.set(n,m),m}var xy,_y,Ak=l(()=>{v(),y(),_(),yt(),be(),xy=function(n,p){return xy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,S){m.__proto__=S}||function(m,S){for(var f in S)S.hasOwnProperty(f)&&(m[f]=S[f])},xy(n,p)},_y=function(){return _y=Object.assign||function(n){for(var p,m=1,S=arguments.length;m{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_HASHABLE_LENGTH=n.INIT=n.KEY=n.DIGEST_LENGTH=n.BLOCK_SIZE=void 0,n.BLOCK_SIZE=64,n.DIGEST_LENGTH=32,n.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),n.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],n.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1}),iF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.RawSha256=void 0;var p=Tk(),m=function(){function S(){this.state=Int32Array.from(p.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return S.prototype.update=function(f){if(this.finished)throw new Error("Attempted to update an already finished hash.");var h=0,b=f.byteLength;if(this.bytesHashed+=b,this.bytesHashed*8>p.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;b>0;)this.buffer[this.bufferLength++]=f[h++],b--,this.bufferLength===p.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},S.prototype.digest=function(){if(!this.finished){var f=this.bytesHashed*8,h=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),b=this.bufferLength;if(h.setUint8(this.bufferLength++,128),b%p.BLOCK_SIZE>=p.BLOCK_SIZE-8){for(var I=this.bufferLength;I>>24&255,O[I*4+1]=this.state[I]>>>16&255,O[I*4+2]=this.state[I]>>>8&255,O[I*4+3]=this.state[I]>>>0&255;return O},S.prototype.hashBuffer=function(){for(var f=this,h=f.buffer,b=f.state,I=b[0],O=b[1],P=b[2],D=b[3],T=b[4],ee=b[5],we=b[6],Se=b[7],He=0;He>>17|We<<15)^(We>>>19|We<<13)^We>>>10;We=this.temp[He-15];var Ge=(We>>>7|We<<25)^(We>>>18|We<<14)^We>>>3;this.temp[He]=(Re+this.temp[He-7]|0)+(Ge+this.temp[He-16]|0)}var Ze=(((T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7))+(T&ee^~T&we)|0)+(Se+(p.KEY[He]+this.temp[He]|0)|0)|0,vt=((I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10))+(I&O^I&P^O&P)|0;Se=we,we=ee,ee=T,T=D+Ze|0,D=P,P=O,O=I,I=Ze+vt|0}b[0]+=I,b[1]+=O,b[2]+=P,b[3]+=D,b[4]+=T,b[5]+=ee,b[6]+=we,b[7]+=Se},S}();n.RawSha256=m}),oF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;var p=S=>{let f=[];for(let h=0,b=S.length;h>6|192,I&63|128);else if(h+1>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else f.push(I>>12|224,I>>6&63|128,I&63|128)}return Uint8Array.from(f)};n.fromUtf8=p;var m=S=>{let f="";for(let h=0,b=S.length;hP.toString(16)).join("%");f+=decodeURIComponent(O)}else f+=String.fromCharCode((I&15)<<12|(S[++h]&63)<<6|S[++h]&63)}return f};n.toUtf8=m}),aF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;function p(S){return new TextEncoder().encode(S)}n.fromUtf8=p;function m(S){return new TextDecoder("utf-8").decode(S)}n.toUtf8=m}),sF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.toUtf8=n.fromUtf8=void 0;var p=oF(),m=aF(),S=h=>typeof TextEncoder=="function"?(0,m.fromUtf8)(h):(0,p.fromUtf8)(h);n.fromUtf8=S;var f=h=>typeof TextDecoder=="function"?(0,m.toUtf8)(h):(0,p.toUtf8)(h);n.toUtf8=f}),lF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.convertToBuffer=void 0;var p=sF(),m=typeof ht<"u"&&ht.from?function(f){return ht.from(f,"utf8")}:p.fromUtf8;function S(f){return f instanceof Uint8Array?f:typeof f=="string"?m(f):ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(f)}n.convertToBuffer=S}),uF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.isEmptyData=void 0;function p(m){return typeof m=="string"?m.length===0:m.byteLength===0}n.isEmptyData=p}),cF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.numToUint8=void 0;function p(m){return new Uint8Array([(m&4278190080)>>24,(m&16711680)>>16,(m&65280)>>8,m&255])}n.numToUint8=p}),dF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.uint32ArrayFrom=void 0;function p(m){if(!Uint32Array.from){for(var S=new Uint32Array(m.length),f=0;f{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.uint32ArrayFrom=n.numToUint8=n.isEmptyData=n.convertToBuffer=void 0;var p=lF();Object.defineProperty(n,"convertToBuffer",{enumerable:!0,get:function(){return p.convertToBuffer}});var m=uF();Object.defineProperty(n,"isEmptyData",{enumerable:!0,get:function(){return m.isEmptyData}});var S=cF();Object.defineProperty(n,"numToUint8",{enumerable:!0,get:function(){return S.numToUint8}});var f=dF();Object.defineProperty(n,"uint32ArrayFrom",{enumerable:!0,get:function(){return f.uint32ArrayFrom}})}),pF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0}),n.Sha256=void 0;var p=(Ak(),x(wx)),m=Tk(),S=iF(),f=fF(),h=function(){function I(O){if(this.hash=new S.RawSha256,O){this.outer=new S.RawSha256;var P=b(O),D=new Uint8Array(m.BLOCK_SIZE);D.set(P);for(var T=0;Tm.BLOCK_SIZE){var P=new S.RawSha256;P.update(O),O=P.digest()}var D=new Uint8Array(m.BLOCK_SIZE);return D.set(O),D}}),hF=u(n=>{v(),y(),_(),yt(),be(),Object.defineProperty(n,"__esModule",{value:!0});var p=(Ak(),x(wx));p.__exportStar(pF(),n)}),gF=u((n,p)=>{v(),y(),_(),yt(),be();var m={exports:{}};function S(Je){return Je instanceof Map?Je.clear=Je.delete=Je.set=function(){throw new Error("map is read-only")}:Je instanceof Set&&(Je.add=Je.clear=Je.delete=function(){throw new Error("set is read-only")}),Object.freeze(Je),Object.getOwnPropertyNames(Je).forEach(function(Ur){var hn=Je[Ur];typeof hn=="object"&&!Object.isFrozen(hn)&&S(hn)}),Je}m.exports=S,m.exports.default=S;var f=class{constructor(Je){Je.data===void 0&&(Je.data={}),this.data=Je.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function h(Je){return Je.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function b(Je,...Ur){let hn=Object.create(null);for(let Fn in Je)hn[Fn]=Je[Fn];return Ur.forEach(function(Fn){for(let Ct in Fn)hn[Ct]=Fn[Ct]}),hn}var I="
    ",O=Je=>!!Je.scope||Je.sublanguage&&Je.language,P=(Je,{prefix:Ur})=>{if(Je.includes(".")){let hn=Je.split(".");return[`${Ur}${hn.shift()}`,...hn.map((Fn,Ct)=>`${Fn}${"_".repeat(Ct+1)}`)].join(" ")}return`${Ur}${Je}`},D=class{constructor(Je,Ur){this.buffer="",this.classPrefix=Ur.classPrefix,Je.walk(this)}addText(Je){this.buffer+=h(Je)}openNode(Je){if(!O(Je))return;let Ur="";Je.sublanguage?Ur=`language-${Je.language}`:Ur=P(Je.scope,{prefix:this.classPrefix}),this.span(Ur)}closeNode(Je){O(Je)&&(this.buffer+=I)}value(){return this.buffer}span(Je){this.buffer+=``}},T=(Je={})=>{let Ur={children:[]};return Object.assign(Ur,Je),Ur},ee=class{constructor(){this.rootNode=T(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Je){this.top.children.push(Je)}openNode(Je){let Ur=T({scope:Je});this.add(Ur),this.stack.push(Ur)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Je){return this.constructor._walk(Je,this.rootNode)}static _walk(Je,Ur){return typeof Ur=="string"?Je.addText(Ur):Ur.children&&(Je.openNode(Ur),Ur.children.forEach(hn=>this._walk(Je,hn)),Je.closeNode(Ur)),Je}static _collapse(Je){typeof Je!="string"&&Je.children&&(Je.children.every(Ur=>typeof Ur=="string")?Je.children=[Je.children.join("")]:Je.children.forEach(Ur=>{ee._collapse(Ur)}))}},we=class extends ee{constructor(Je){super(),this.options=Je}addKeyword(Je,Ur){Je!==""&&(this.openNode(Ur),this.addText(Je),this.closeNode())}addText(Je){Je!==""&&this.add(Je)}addSublanguage(Je,Ur){let hn=Je.root;hn.sublanguage=!0,hn.language=Ur,this.add(hn)}toHTML(){return new D(this,this.options).value()}finalize(){return!0}};function Se(Je){return Je?typeof Je=="string"?Je:Je.source:null}function He(Je){return Ge("(?=",Je,")")}function We(Je){return Ge("(?:",Je,")*")}function Re(Je){return Ge("(?:",Je,")?")}function Ge(...Je){return Je.map(Ur=>Se(Ur)).join("")}function Ze(Je){let Ur=Je[Je.length-1];return typeof Ur=="object"&&Ur.constructor===Object?(Je.splice(Je.length-1,1),Ur):{}}function vt(...Je){return"("+(Ze(Je).capture?"":"?:")+Je.map(Ur=>Se(Ur)).join("|")+")"}function Oe(Je){return new RegExp(Je.toString()+"|").exec("").length-1}function Fe(Je,Ur){let hn=Je&&Je.exec(Ur);return hn&&hn.index===0}var dt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ft(Je,{joinWith:Ur}){let hn=0;return Je.map(Fn=>{hn+=1;let Ct=hn,Tt=Se(Fn),zt="";for(;Tt.length>0;){let G=dt.exec(Tt);if(!G){zt+=Tt;break}zt+=Tt.substring(0,G.index),Tt=Tt.substring(G.index+G[0].length),G[0][0]==="\\"&&G[1]?zt+="\\"+String(Number(G[1])+Ct):(zt+=G[0],G[0]==="("&&hn++)}return zt}).map(Fn=>`(${Fn})`).join(Ur)}var Xe=/\b\B/,Me="[a-zA-Z]\\w*",_e="[a-zA-Z_]\\w*",Le="\\b\\d+(\\.\\d+)?",pt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Lt="\\b(0b[01]+)",fr="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Cr=(Je={})=>{let Ur=/^#![ ]*\//;return Je.binary&&(Je.begin=Ge(Ur,/.*\b/,Je.binary,/\b.*/)),b({scope:"meta",begin:Ur,end:/$/,relevance:0,"on:begin":(hn,Fn)=>{hn.index!==0&&Fn.ignoreMatch()}},Je)},qr={begin:"\\\\[\\s\\S]",relevance:0},Nn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qr]},qt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qr]},Jn={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ti=function(Je,Ur,hn={}){let Fn=b({scope:"comment",begin:Je,end:Ur,contains:[]},hn);Fn.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let Ct=vt("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Fn.contains.push({begin:Ge(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Fn},wi=ti("//","$"),xi=ti("/\\*","\\*/"),ei=ti("#","$"),si={scope:"number",begin:Le,relevance:0},wn={scope:"number",begin:pt,relevance:0},_i={scope:"number",begin:Lt,relevance:0},Ji={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[qr,{begin:/\[/,end:/\]/,relevance:0,contains:[qr]}]}]},Mi={scope:"title",begin:Me,relevance:0},Jt={scope:"title",begin:_e,relevance:0},Tr={begin:"\\.\\s*"+_e,relevance:0},ln=function(Je){return Object.assign(Je,{"on:begin":(Ur,hn)=>{hn.data._beginMatch=Ur[1]},"on:end":(Ur,hn)=>{hn.data._beginMatch!==Ur[1]&&hn.ignoreMatch()}})},Hn=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Xe,IDENT_RE:Me,UNDERSCORE_IDENT_RE:_e,NUMBER_RE:Le,C_NUMBER_RE:pt,BINARY_NUMBER_RE:Lt,RE_STARTERS_RE:fr,SHEBANG:Cr,BACKSLASH_ESCAPE:qr,APOS_STRING_MODE:Nn,QUOTE_STRING_MODE:qt,PHRASAL_WORDS_MODE:Jn,COMMENT:ti,C_LINE_COMMENT_MODE:wi,C_BLOCK_COMMENT_MODE:xi,HASH_COMMENT_MODE:ei,NUMBER_MODE:si,C_NUMBER_MODE:wn,BINARY_NUMBER_MODE:_i,REGEXP_MODE:Ji,TITLE_MODE:Mi,UNDERSCORE_TITLE_MODE:Jt,METHOD_GUARD:Tr,END_SAME_AS_BEGIN:ln});function Oi(Je,Ur){Je.input[Je.index-1]==="."&&Ur.ignoreMatch()}function Vi(Je,Ur){Je.className!==void 0&&(Je.scope=Je.className,delete Je.className)}function ni(Je,Ur){Ur&&Je.beginKeywords&&(Je.begin="\\b("+Je.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Je.__beforeBegin=Oi,Je.keywords=Je.keywords||Je.beginKeywords,delete Je.beginKeywords,Je.relevance===void 0&&(Je.relevance=0))}function bi(Je,Ur){Array.isArray(Je.illegal)&&(Je.illegal=vt(...Je.illegal))}function mi(Je,Ur){if(Je.match){if(Je.begin||Je.end)throw new Error("begin & end are not supported with match");Je.begin=Je.match,delete Je.match}}function eo(Je,Ur){Je.relevance===void 0&&(Je.relevance=1)}var Bi=(Je,Ur)=>{if(!Je.beforeMatch)return;if(Je.starts)throw new Error("beforeMatch cannot be used with starts");let hn=Object.assign({},Je);Object.keys(Je).forEach(Fn=>{delete Je[Fn]}),Je.keywords=hn.keywords,Je.begin=Ge(hn.beforeMatch,He(hn.begin)),Je.starts={relevance:0,contains:[Object.assign(hn,{endsParent:!0})]},Je.relevance=0,delete hn.beforeMatch},to=["of","and","for","in","not","or","if","then","parent","list","value"],ro="keyword";function qi(Je,Ur,hn=ro){let Fn=Object.create(null);return typeof Je=="string"?Ct(hn,Je.split(" ")):Array.isArray(Je)?Ct(hn,Je):Object.keys(Je).forEach(function(Tt){Object.assign(Fn,qi(Je[Tt],Ur,Tt))}),Fn;function Ct(Tt,zt){Ur&&(zt=zt.map(G=>G.toLowerCase())),zt.forEach(function(G){let pe=G.split("|");Fn[pe[0]]=[Tt,wo(pe[0],pe[1])]})}}function wo(Je,Ur){return Ur?Number(Ur):Mt(Je)?0:1}function Mt(Je){return to.includes(Je.toLowerCase())}var $e={},wt=Je=>{console.error(Je)},It=(Je,...Ur)=>{console.log(`WARN: ${Je}`,...Ur)},Ht=(Je,Ur)=>{$e[`${Je}/${Ur}`]||(console.log(`Deprecated as of ${Je}. ${Ur}`),$e[`${Je}/${Ur}`]=!0)},rt=new Error;function ut(Je,Ur,{key:hn}){let Fn=0,Ct=Je[hn],Tt={},zt={};for(let G=1;G<=Ur.length;G++)zt[G+Fn]=Ct[G],Tt[G+Fn]=!0,Fn+=Oe(Ur[G-1]);Je[hn]=zt,Je[hn]._emit=Tt,Je[hn]._multi=!0}function Qe(Je){if(Array.isArray(Je.begin)){if(Je.skip||Je.excludeBegin||Je.returnBegin)throw wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),rt;if(typeof Je.beginScope!="object"||Je.beginScope===null)throw wt("beginScope must be object"),rt;ut(Je,Je.begin,{key:"beginScope"}),Je.begin=ft(Je.begin,{joinWith:""})}}function kt(Je){if(Array.isArray(Je.end)){if(Je.skip||Je.excludeEnd||Je.returnEnd)throw wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),rt;if(typeof Je.endScope!="object"||Je.endScope===null)throw wt("endScope must be object"),rt;ut(Je,Je.end,{key:"endScope"}),Je.end=ft(Je.end,{joinWith:""})}}function et(Je){Je.scope&&typeof Je.scope=="object"&&Je.scope!==null&&(Je.beginScope=Je.scope,delete Je.scope)}function Yt(Je){et(Je),typeof Je.beginScope=="string"&&(Je.beginScope={_wrap:Je.beginScope}),typeof Je.endScope=="string"&&(Je.endScope={_wrap:Je.endScope}),Qe(Je),kt(Je)}function sr(Je){function Ur(zt,G){return new RegExp(Se(zt),"m"+(Je.case_insensitive?"i":"")+(Je.unicodeRegex?"u":"")+(G?"g":""))}class hn{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(G,pe){pe.position=this.position++,this.matchIndexes[this.matchAt]=pe,this.regexes.push([pe,G]),this.matchAt+=Oe(G)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let G=this.regexes.map(pe=>pe[1]);this.matcherRe=Ur(ft(G,{joinWith:"|"}),!0),this.lastIndex=0}exec(G){this.matcherRe.lastIndex=this.lastIndex;let pe=this.matcherRe.exec(G);if(!pe)return null;let ve=pe.findIndex((ie,j)=>j>0&&ie!==void 0),k=this.matchIndexes[ve];return pe.splice(0,ve),Object.assign(pe,k)}}class Fn{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(G){if(this.multiRegexes[G])return this.multiRegexes[G];let pe=new hn;return this.rules.slice(G).forEach(([ve,k])=>pe.addRule(ve,k)),pe.compile(),this.multiRegexes[G]=pe,pe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(G,pe){this.rules.push([G,pe]),pe.type==="begin"&&this.count++}exec(G){let pe=this.getMatcher(this.regexIndex);pe.lastIndex=this.lastIndex;let ve=pe.exec(G);if(this.resumingScanAtSamePosition()&&!(ve&&ve.index===this.lastIndex)){let k=this.getMatcher(0);k.lastIndex=this.lastIndex+1,ve=k.exec(G)}return ve&&(this.regexIndex+=ve.position+1,this.regexIndex===this.count&&this.considerAll()),ve}}function Ct(zt){let G=new Fn;return zt.contains.forEach(pe=>G.addRule(pe.begin,{rule:pe,type:"begin"})),zt.terminatorEnd&&G.addRule(zt.terminatorEnd,{type:"end"}),zt.illegal&&G.addRule(zt.illegal,{type:"illegal"}),G}function Tt(zt,G){let pe=zt;if(zt.isCompiled)return pe;[Vi,mi,Yt,Bi].forEach(k=>k(zt,G)),Je.compilerExtensions.forEach(k=>k(zt,G)),zt.__beforeBegin=null,[ni,bi,eo].forEach(k=>k(zt,G)),zt.isCompiled=!0;let ve=null;return typeof zt.keywords=="object"&&zt.keywords.$pattern&&(zt.keywords=Object.assign({},zt.keywords),ve=zt.keywords.$pattern,delete zt.keywords.$pattern),ve=ve||/\w+/,zt.keywords&&(zt.keywords=qi(zt.keywords,Je.case_insensitive)),pe.keywordPatternRe=Ur(ve,!0),G&&(zt.begin||(zt.begin=/\B|\b/),pe.beginRe=Ur(pe.begin),!zt.end&&!zt.endsWithParent&&(zt.end=/\B|\b/),zt.end&&(pe.endRe=Ur(pe.end)),pe.terminatorEnd=Se(pe.end)||"",zt.endsWithParent&&G.terminatorEnd&&(pe.terminatorEnd+=(zt.end?"|":"")+G.terminatorEnd)),zt.illegal&&(pe.illegalRe=Ur(zt.illegal)),zt.contains||(zt.contains=[]),zt.contains=[].concat(...zt.contains.map(function(k){return zr(k==="self"?zt:k)})),zt.contains.forEach(function(k){Tt(k,pe)}),zt.starts&&Tt(zt.starts,G),pe.matcher=Ct(pe),pe}if(Je.compilerExtensions||(Je.compilerExtensions=[]),Je.contains&&Je.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Je.classNameAliases=b(Je.classNameAliases||{}),Tt(Je)}function wr(Je){return Je?Je.endsWithParent||wr(Je.starts):!1}function zr(Je){return Je.variants&&!Je.cachedVariants&&(Je.cachedVariants=Je.variants.map(function(Ur){return b(Je,{variants:null},Ur)})),Je.cachedVariants?Je.cachedVariants:wr(Je)?b(Je,{starts:Je.starts?b(Je.starts):null}):Object.isFrozen(Je)?b(Je):Je}var mt="11.6.0",Nt=class extends Error{constructor(Je,Ur){super(Je),this.name="HTMLInjectionError",this.html=Ur}},kr=h,an=b,On=Symbol("nomatch"),ji=7,ii=function(Je){let Ur=Object.create(null),hn=Object.create(null),Fn=[],Ct=!0,Tt="Could not find the language '{}', did you forget to load/include a language module?",zt={disableAutodetect:!0,name:"Plain text",contains:[]},G={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:we};function pe(cr){return G.noHighlightRe.test(cr)}function ve(cr){let Wt=cr.className+" ";Wt+=cr.parentNode?cr.parentNode.className:"";let er=G.languageDetectRe.exec(Wt);if(er){let Ar=pn(er[1]);return Ar||(It(Tt.replace("{}",er[1])),It("Falling back to no-highlight mode for this block.",cr)),Ar?er[1]:"no-highlight"}return Wt.split(/\s+/).find(Ar=>pe(Ar)||pn(Ar))}function k(cr,Wt,er){let Ar="",_r="";typeof Wt=="object"?(Ar=cr,er=Wt.ignoreIllegals,_r=Wt.language):(Ht("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ht("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),_r=cr,Ar=Wt),er===void 0&&(er=!0);let Mr={code:Ar,language:_r};Sn("before:highlight",Mr);let Fr=Mr.result?Mr.result:ie(Mr.language,Mr.code,er);return Fr.code=Mr.code,Sn("after:highlight",Fr),Fr}function ie(cr,Wt,er,Ar){let _r=Object.create(null);function Mr(En,zn){return En.keywords[zn]}function Fr(){if(!Mn.keywords){ki.addText(ui);return}let En=0;Mn.keywordPatternRe.lastIndex=0;let zn=Mn.keywordPatternRe.exec(ui),Si="";for(;zn;){Si+=ui.substring(En,zn.index);let ao=Ki.case_insensitive?zn[0].toLowerCase():zn[0],Ca=Mr(Mn,ao);if(Ca){let[Be,Ke]=Ca;if(ki.addText(Si),Si="",_r[ao]=(_r[ao]||0)+1,_r[ao]<=ji&&(Po+=Ke),Be.startsWith("_"))Si+=zn[0];else{let bt=Ki.classNameAliases[Be]||Be;ki.addKeyword(zn[0],bt)}}else Si+=zn[0];En=Mn.keywordPatternRe.lastIndex,zn=Mn.keywordPatternRe.exec(ui)}Si+=ui.substring(En),ki.addText(Si)}function Dn(){if(ui==="")return;let En=null;if(typeof Mn.subLanguage=="string"){if(!Ur[Mn.subLanguage]){ki.addText(ui);return}En=ie(Mn.subLanguage,ui,!0,Co[Mn.subLanguage]),Co[Mn.subLanguage]=En._top}else En=re(ui,Mn.subLanguage.length?Mn.subLanguage:null);Mn.relevance>0&&(Po+=En.relevance),ki.addSublanguage(En._emitter,En.language)}function Ln(){Mn.subLanguage!=null?Dn():Fr(),ui=""}function Ve(En,zn){let Si=1,ao=zn.length-1;for(;Si<=ao;){if(!En._emit[Si]){Si++;continue}let Ca=Ki.classNameAliases[En[Si]]||En[Si],Be=zn[Si];Ca?ki.addKeyword(Be,Ca):(ui=Be,Fr(),ui=""),Si++}}function at(En,zn){return En.scope&&typeof En.scope=="string"&&ki.openNode(Ki.classNameAliases[En.scope]||En.scope),En.beginScope&&(En.beginScope._wrap?(ki.addKeyword(ui,Ki.classNameAliases[En.beginScope._wrap]||En.beginScope._wrap),ui=""):En.beginScope._multi&&(Ve(En.beginScope,zn),ui="")),Mn=Object.create(En,{parent:{value:Mn}}),Mn}function ye(En,zn,Si){let ao=Fe(En.endRe,Si);if(ao){if(En["on:end"]){let Ca=new f(En);En["on:end"](zn,Ca),Ca.isMatchIgnored&&(ao=!1)}if(ao){for(;En.endsParent&&En.parent;)En=En.parent;return En}}if(En.endsWithParent)return ye(En.parent,zn,Si)}function dr(En){return Mn.matcher.regexIndex===0?(ui+=En[0],1):(cg=!0,0)}function Jr(En){let zn=En[0],Si=En.rule,ao=new f(Si),Ca=[Si.__beforeBegin,Si["on:begin"]];for(let Be of Ca)if(Be&&(Be(En,ao),ao.isMatchIgnored))return dr(zn);return Si.skip?ui+=zn:(Si.excludeBegin&&(ui+=zn),Ln(),!Si.returnBegin&&!Si.excludeBegin&&(ui=zn)),at(Si,En),Si.returnBegin?0:zn.length}function rn(En){let zn=En[0],Si=Wt.substring(En.index),ao=ye(Mn,En,Si);if(!ao)return On;let Ca=Mn;Mn.endScope&&Mn.endScope._wrap?(Ln(),ki.addKeyword(zn,Mn.endScope._wrap)):Mn.endScope&&Mn.endScope._multi?(Ln(),Ve(Mn.endScope,En)):Ca.skip?ui+=zn:(Ca.returnEnd||Ca.excludeEnd||(ui+=zn),Ln(),Ca.excludeEnd&&(ui=zn));do Mn.scope&&ki.closeNode(),!Mn.skip&&!Mn.subLanguage&&(Po+=Mn.relevance),Mn=Mn.parent;while(Mn!==ao.parent);return ao.starts&&at(ao.starts,En),Ca.returnEnd?0:zn.length}function Yn(){let En=[];for(let zn=Mn;zn!==Ki;zn=zn.parent)zn.scope&&En.unshift(zn.scope);En.forEach(zn=>ki.openNode(zn))}let yi={};function Ri(En,zn){let Si=zn&&zn[0];if(ui+=En,Si==null)return Ln(),0;if(yi.type==="begin"&&zn.type==="end"&&yi.index===zn.index&&Si===""){if(ui+=Wt.slice(zn.index,zn.index+1),!Ct){let ao=new Error(`0 width match regex (${cr})`);throw ao.languageName=cr,ao.badRule=yi.rule,ao}return 1}if(yi=zn,zn.type==="begin")return Jr(zn);if(zn.type==="illegal"&&!er){let ao=new Error('Illegal lexeme "'+Si+'" for mode "'+(Mn.scope||"")+'"');throw ao.mode=Mn,ao}else if(zn.type==="end"){let ao=rn(zn);if(ao!==On)return ao}if(zn.type==="illegal"&&Si==="")return 1;if(ug>1e5&&ug>zn.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ui+=Si,Si.length}let Ki=pn(cr);if(!Ki)throw wt(Tt.replace("{}",cr)),new Error('Unknown language: "'+cr+'"');let Hi=sr(Ki),xo="",Mn=Ar||Hi,Co={},ki=new G.__emitter(G);Yn();let ui="",Po=0,Ao=0,ug=0,cg=!1;try{for(Mn.matcher.considerAll();;){ug++,cg?cg=!1:Mn.matcher.considerAll(),Mn.matcher.lastIndex=Ao;let En=Mn.matcher.exec(Wt);if(!En)break;let zn=Wt.substring(Ao,En.index),Si=Ri(zn,En);Ao=En.index+Si}return Ri(Wt.substring(Ao)),ki.closeAllNodes(),ki.finalize(),xo=ki.toHTML(),{language:cr,value:xo,relevance:Po,illegal:!1,_emitter:ki,_top:Mn}}catch(En){if(En.message&&En.message.includes("Illegal"))return{language:cr,value:kr(Wt),illegal:!0,relevance:0,_illegalBy:{message:En.message,index:Ao,context:Wt.slice(Ao-100,Ao+100),mode:En.mode,resultSoFar:xo},_emitter:ki};if(Ct)return{language:cr,value:kr(Wt),illegal:!1,relevance:0,errorRaised:En,_emitter:ki,_top:Mn};throw En}}function j(cr){let Wt={value:kr(cr),illegal:!1,relevance:0,_top:zt,_emitter:new G.__emitter(G)};return Wt._emitter.addText(cr),Wt}function re(cr,Wt){Wt=Wt||G.languages||Object.keys(Ur);let er=j(cr),Ar=Wt.filter(pn).filter(en).map(Ln=>ie(Ln,cr,!1));Ar.unshift(er);let _r=Ar.sort((Ln,Ve)=>{if(Ln.relevance!==Ve.relevance)return Ve.relevance-Ln.relevance;if(Ln.language&&Ve.language){if(pn(Ln.language).supersetOf===Ve.language)return 1;if(pn(Ve.language).supersetOf===Ln.language)return-1}return 0}),[Mr,Fr]=_r,Dn=Mr;return Dn.secondBest=Fr,Dn}function de(cr,Wt,er){let Ar=Wt&&hn[Wt]||er;cr.classList.add("hljs"),cr.classList.add(`language-${Ar}`)}function X(cr){let Wt=null,er=ve(cr);if(pe(er))return;if(Sn("before:highlightElement",{el:cr,language:er}),cr.children.length>0&&(G.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(cr)),G.throwUnescapedHTML))throw new Nt("One of your code blocks includes unescaped HTML.",cr.innerHTML);Wt=cr;let Ar=Wt.textContent,_r=er?k(Ar,{language:er,ignoreIllegals:!0}):re(Ar);cr.innerHTML=_r.value,de(cr,er,_r.language),cr.result={language:_r.language,re:_r.relevance,relevance:_r.relevance},_r.secondBest&&(cr.secondBest={language:_r.secondBest.language,relevance:_r.secondBest.relevance}),Sn("after:highlightElement",{el:cr,result:_r,text:Ar})}function fe(cr){G=an(G,cr)}let ke=()=>{Kt(),Ht("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function it(){Kt(),Ht("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let nt=!1;function Kt(){if(document.readyState==="loading"){nt=!0;return}document.querySelectorAll(G.cssSelector).forEach(X)}function xr(){nt&&Kt()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",xr,!1);function Yr(cr,Wt){let er=null;try{er=Wt(Je)}catch(Ar){if(wt("Language definition for '{}' could not be registered.".replace("{}",cr)),Ct)wt(Ar);else throw Ar;er=zt}er.name||(er.name=cr),Ur[cr]=er,er.rawDefinition=Wt.bind(null,Je),er.aliases&&Rn(er.aliases,{languageName:cr})}function Qr(cr){delete Ur[cr];for(let Wt of Object.keys(hn))hn[Wt]===cr&&delete hn[Wt]}function Zr(){return Object.keys(Ur)}function pn(cr){return cr=(cr||"").toLowerCase(),Ur[cr]||Ur[hn[cr]]}function Rn(cr,{languageName:Wt}){typeof cr=="string"&&(cr=[cr]),cr.forEach(er=>{hn[er.toLowerCase()]=Wt})}function en(cr){let Wt=pn(cr);return Wt&&!Wt.disableAutodetect}function gn(cr){cr["before:highlightBlock"]&&!cr["before:highlightElement"]&&(cr["before:highlightElement"]=Wt=>{cr["before:highlightBlock"](Object.assign({block:Wt.el},Wt))}),cr["after:highlightBlock"]&&!cr["after:highlightElement"]&&(cr["after:highlightElement"]=Wt=>{cr["after:highlightBlock"](Object.assign({block:Wt.el},Wt))})}function yn(cr){gn(cr),Fn.push(cr)}function Sn(cr,Wt){let er=cr;Fn.forEach(function(Ar){Ar[er]&&Ar[er](Wt)})}function Pn(cr){return Ht("10.7.0","highlightBlock will be removed entirely in v12.0"),Ht("10.7.0","Please use highlightElement now."),X(cr)}Object.assign(Je,{highlight:k,highlightAuto:re,highlightAll:Kt,highlightElement:X,highlightBlock:Pn,configure:fe,initHighlighting:ke,initHighlightingOnLoad:it,registerLanguage:Yr,unregisterLanguage:Qr,listLanguages:Zr,getLanguage:pn,registerAliases:Rn,autoDetection:en,inherit:an,addPlugin:yn}),Je.debugMode=function(){Ct=!1},Je.safeMode=function(){Ct=!0},Je.versionString=mt,Je.regex={concat:Ge,lookahead:He,either:vt,optional:Re,anyNumberOfTimes:We};for(let cr in Hn)typeof Hn[cr]=="object"&&m.exports(Hn[cr]);return Object.assign(Je,Hn),Je},li=ii({});p.exports=li,li.HighlightJS=li,li.default=li}),mF=u((n,p)=>{p.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"}),yF=u((n,p)=>{p.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"});v(),y(),_(),yt(),be(),v(),y(),_(),yt(),be();var ap=g(O$()),vF=g(N$()),bF=g(hF()),wF=ap.Address.parse("EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"),xF=ap.Address.parse("EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8");function _F(n){let p=new bF.Sha256;return p.update(n),ht.from(p.digestSync())}function SF(n,p){return n.replace("ipfs://",`https://tonsource${p?"-testnet":""}.infura-ipfs.io/ipfs/`)}function Ik(n){return BigInt(`0x${n.toString("hex")}`)}var CF={async getSourcesJsonUrl(n,p){let m=new ap.TonClient4({endpoint:p?.httpApiEndpointV4??await(0,vF.getHttpV4Endpoint)({network:p.testnet?"testnet":"mainnet"})}),{last:{seqno:S}}=await m.getLastBlock(),f=new ap.TupleBuilder;f.writeNumber(Ik(_F(p?.verifier??"orbs.com"))),f.writeNumber(Ik(ht.from(n,"base64")));let{result:h}=await m.runMethod(S,p.testnet?xF:wF,"get_source_item_address",f.build()),b=new ap.TupleReader(h),I=b.readAddress();if(await m.isContractDeployed(S,I)){let{result:O}=await m.runMethod(S,I,"get_source_item_data");b=new ap.TupleReader(O);let P=b.skip(3).readCell().beginParse();if(P.loadUint(8)!==1)throw new Error("Unsupported version");return P.loadStringTail()}return null},async getSourcesData(n,p){let m=p.ipfsConverter??SF,S=m(n,!!p.testnet),f=await(await fetch(m(n,!!p.testnet))).json();return{files:(await Promise.all(f.sources.map(async h=>{let b=m(h.url,!!p.testnet),I=await fetch(b).then(O=>O.text());return{name:h.filename,content:I,isEntrypoint:h.isEntrypoint}}))).reverse().sort((h,b)=>Number(b.isEntrypoint)-Number(h.isEntrypoint)),verificationDate:new Date(f.verificationDate),compilerSettings:f.compilerSettings,compiler:f.compiler,ipfsHttpLink:S}}};v(),y(),_(),yt(),be(),v(),y(),_(),yt(),be();var EF=g(gF(),1),Rk=EF.default;v(),y(),_(),yt(),be(),v(),y(),_(),yt(),be();var Pk='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',Mk=/\"[^\n\"]+\"[Hhcusa]?/,_x;try{_x=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,//,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,//,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1</,/0=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1</,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:n.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}v(),y(),_(),yt(),be();var Bk=/[a-zA-Z_][0-9a-zA-Z_]*/;function TF(n){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},{scope:"symbol",match:n.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function IF(n){n.registerLanguage("fift",AF),n.registerLanguage("func",kF),n.registerLanguage("tlb",TF)}v(),y(),_(),yt(),be();var _c=(n,...p)=>Dk("div",n,...p),Uk=(n,...p)=>Dk("img",n,...p);function RF(n,p){for(let m of p)if(m)switch(typeof m){case"string":let S=document.createTextNode(m);n.appendChild(S);break;default:n.appendChild(m);break}}function PF(n,p){typeof p=="string"?n.setAttribute("style",p):Object.assign(n.style,p)}function MF(n,p){p.split(/\s/).forEach(m=>{m&&n.classList.add(m)})}function OF(n,p){let m=/^on([a-z]+)$/i;for(let S in p)if(S)if(S==="style")PF(n,p[S]);else if(S==="className")MF(n,p[S]);else if(m.test(S)){let f=S.replace(m,"$1").toLowerCase();n.addEventListener(f,p[S])}else n.setAttribute(S,p[S])}function Dk(n,p,...m){if(typeof n=="function")return n(p);{let S=document.createElement(n);return p&&typeof p=="object"&&OF(S,p),m&&RF(S,m),S}}v(),y(),_(),yt(),be();var BF=` - - - - - - - - - - -`,UF=` - - - - - - - - - - -`,DF=` - - -`,LF=` - - -`,NF=` - - -`,jF=` - - -`,Sy={dark:{file:BF,folder:{open:NF,closed:DF}},light:{file:UF,folder:{open:jF,closed:LF}}},Cx=n=>`data:image/svg+xml;base64,${ht.from(n,"utf8").toString("base64")}`,$F=({name:n},p)=>_c({className:`${xl.FILE} ${xl.TREE_ITEM}`},Uk({src:Cx(Sy[p].file)}),_c(null,n));function FF(n,p){let m=p.target.classList.contains("folder-header")?p.target:p.target.parentElement,S=m.getAttribute("opened")!=="true";m.children[0].attributes.src.value=Cx(S?Sy[n].folder.open:Sy[n].folder.closed);try{let f=m.nextElementSibling;S?f.classList.remove("hide"):f.classList.add("hide")}catch{console.warn(`No sibling of elem ${m} found ...`)}m.setAttribute("opened",S)}var zF=(n,p,...m)=>{let S=n.opened||!1,f=Sy[p].folder[S?"open":"closed"],h=n.name||"unknown";return _c({className:xl.FOLDER_CONTAINER},_c({onClick:FF.bind(void 0,p),className:`folder-header ${xl.FOLDER} ${xl.TREE_ITEM}`,opened:S},Uk({src:Cx(f)}),_c(null,h)),_c({className:`${S?"":"hide"} folder-content`},...m))},HF=`.contract-verifier-container { - display: flex; - height: 100%; -} - -.contract-verifier-code { - text-align: left; - overflow: auto; - height: 100%; - width: 100%; -} - -.contract-verifier-code.dark { - background: #232222; -} - -.contract-verifier-code code { - display: flex; - padding: 0.5em; -} - -.contract-verifier-code code div { - background: transparent; -} - -.contract-verifier-code code .contract-verifier-code-lines { - padding: 0 20px 0 0; - text-align: right; - display: none; -} - -.contract-verifier-container.lineNumbers .contract-verifier-code-lines { - display: initial; -} - -.contract-verifier-code code.dark .contract-verifier-code-lines { - color: #7e7e7e; -} - -.contract-verifier-code code.light .contract-verifier-code-lines { - color: #728a96; -} - -.contract-verifier-code pre { - margin: 0; -} - -.contract-verifier-files { - text-align: left; - flex-shrink: 0; - display: flex; - flex-direction: column; - width: 200px; - overflow-y: auto; -} - -.contract-verifier-files.dark { - background: #28292d; - color: white; -} - -.contract-verifier-files.light { - background: #fff; -} - -.contract-verifier-tree-item { - padding: 10px 6px; - cursor: pointer; - display: flex; - gap: 4px; - user-select: none; -} - -.contract-verifier-files.dark .contract-verifier-tree-item:hover { - filter: brightness(0.8); -} - -.contract-verifier-files.light .contract-verifier-tree-item:hover { - background-color: #f6f6f6; -} - -.contract-verifier-files.dark .contract-verifier-file.active { - background: #232222; -} - -.contract-verifier-files.light .contract-verifier-file.active { - background: #f2f2f2; -} - -.contract-verifier-files .hide { - display: none; -} - -.contract-verifier-folder-container > .folder-content { - padding-left: 12px; -} -`;IF(Rk);var xl={CONTAINER:"contract-verifier-container",FILES:"contract-verifier-files",FILE:"contract-verifier-file",FOLDER:"contract-verifier-folder",TREE_ITEM:"contract-verifier-tree-item",FOLDER_CONTAINER:"contract-verifier-folder-container",CODE_CONTAINER:"contract-verifier-code",CODE_LINES:"contract-verifier-code-lines",CODE_CONTENT:"contract-verifier-code-content"},Lk={_stylesPopulated:{internal:!1},_populateStyle(n){if(!this._stylesPopulated[n]){this._stylesPopulated[n]=!0;let p=document.createElement("style");p.innerHTML=`${n==="light"?mF().toString():yF().toString()}`,document.head.appendChild(p)}if(!this._stylesPopulated.internal){this._stylesPopulated.internal=!0;let p=document.createElement("style");p.innerHTML=HF,document.head.appendChild(p)}},_populateCode(n,p){let m=document.querySelector(n);m.classList.add(xl.CODE_CONTAINER),m.classList.add(p),m.innerHTML=`
    `},_setCode({name:n,content:p},m,S,f){if(f?.classList.contains("active"))return;m.scrollTo(0,0),p=p.trim();let h=m.querySelector("code");h.innerHTML="",h.appendChild(_c({className:xl.CODE_LINES},p.split(` -`).map((I,O)=>O+1).join(` -`)));let b=_c({className:xl.CODE_CONTENT},p);h.appendChild(b),n.match(/\.fif(t)?$/)?b.classList.add("language-fift"):b.classList.add("language-func"),Rk.highlightElement(b),S?.querySelector(`.${xl.FILE}.active`)?.classList.remove("active"),f?.classList.add("active")},setCode(n,p){this._setCode({name:"",content:p},document.querySelector(n))},_populateFiles(n,p,m,S){let f=document.querySelector(n);f.innerHTML="",f.classList.add(S),f.classList.add(xl.FILES);let h={type:"root",children:[]};m.forEach(I=>{let O=Array.from(I.name.matchAll(/(?:\/|^)([^\/\n]+)/g)).map(T=>T[1]),P=O.length>1?O.slice(0,O.length-1):[],D=h;P.forEach(T=>{let ee=D.children.find(we=>we.type==="folder"&&we.name===T);if(!ee){let we={type:"folder",name:T,children:[]};D.children.push(we),ee=we}D=ee}),D.children.push({type:"file",name:O[O.length-1],content:I.content})});function b(I){return I.children.filter(O=>O.type==="file").map(O=>{let P=$F({name:O.name},S);return P.onclick=()=>{Lk._setCode({name:O.name,content:O.content},document.querySelector(p),document.querySelector(n),P)},P}).concat(I.children.filter(O=>O.type==="folder").map(O=>zF({name:O.name,opened:!0},S,...b(O))))}b(h).forEach(I=>f.appendChild(I))},_populateContainer(n,p){let m=document.querySelector(n);m.classList.add(xl.CONTAINER),p||m.classList.add("lineNumbers")},loadSourcesData(n,p){this._populateContainer(p.containerSelector,!!p.hideLineNumbers),p.fileListSelector&&this._populateFiles(p.fileListSelector,p.contentSelector,n.files,p.theme),this._populateStyle(p.theme),this._populateCode(p.contentSelector,p.theme),this._setCode(n.files[0],document.querySelector(p.contentSelector),document.querySelector(p.fileListSelector),document.querySelector(`${p.fileListSelector} .contract-verifier-file`))}};window.ContractVerifier=CF,window.ContractVerifierUI=Lk})();function Ml(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i3?t.i-4:t.i:Array.isArray(e)?1:nE(e)?2:iE(e)?3:0}function hS(e,t){return Jh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _ye(e,t){return Jh(e)===2?e.get(t):e[t]}function OL(e,t,r){var i=Jh(e);i===2?e.set(t,r):i===3?(e.delete(t),e.add(r)):e[t]=r}function Sye(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function nE(e){return Aye&&e instanceof Map}function iE(e){return Tye&&e instanceof Set}function Wd(e){return e.o||e.t}function oE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Rye(e);delete t[Fs];for(var r=uE(t),i=0;i1&&(e.set=e.add=e.clear=e.delete=Cye),Object.freeze(e),t&&y0(e,function(r,i){return aE(i,!0)},!0)),e}function Cye(){Ml(2)}function sE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function yu(e){var t=Pye[e];return t||Ml(18,e),t}function VR(){return v0}function r5(e,t){t&&(yu("Patches"),e.u=[],e.s=[],e.v=t)}function H1(e){gS(e),e.p.forEach(Eye),e.p=null}function gS(e){e===v0&&(v0=e.l)}function qR(e){return v0={p:[],l:v0,h:e,m:!0,_:0}}function Eye(e){var t=e[Fs];t.i===0||t.i===1?t.j():t.O=!0}function n5(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.g||yu("ES5").S(t,e,i),i?(r[Fs].P&&(H1(t),Ml(4)),Wf(e)&&(e=W1(t,e),t.l||V1(t,e)),t.u&&yu("Patches").M(r[Fs].t,e,t.u,t.s)):e=W1(t,r,[]),H1(t),t.u&&t.v(t.u,t.s),e!==BL?e:void 0}function W1(e,t,r){if(sE(t))return t;var i=t[Fs];if(!i)return y0(t,function(o,s){return KR(e,i,t,o,s,r)},!0),t;if(i.A!==e)return t;if(!i.P)return V1(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var a=i.i===4||i.i===5?i.o=oE(i.k):i.o;y0(i.i===3?new Set(a):a,function(o,s){return KR(e,i,a,o,s,r)}),V1(e,a,!1),r&&e.u&&yu("Patches").N(i,r,e.u,e.s)}return i.o}function KR(e,t,r,i,a,o){if(kh(a)){var s=W1(e,a,o&&t&&t.i!==3&&!hS(t.R,i)?o.concat(i):void 0);if(OL(r,i,s),!kh(s))return;e.m=!1}if(Wf(a)&&!sE(a)){if(!e.h.D&&e._<1)return;W1(e,a),t&&t.A.l||V1(e,a)}}function V1(e,t,r){r===void 0&&(r=!1),e.h.D&&e.m&&aE(t,r)}function i5(e,t){var r=e[Fs];return(r?Wd(r):e)[t]}function GR(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function mS(e){e.P||(e.P=!0,e.l&&mS(e.l))}function o5(e){e.o||(e.o=oE(e.t))}function yS(e,t,r){var i=nE(t)?yu("MapSet").F(t,r):iE(t)?yu("MapSet").T(t,r):e.g?function(a,o){var s=Array.isArray(a),l={i:s?1:0,A:o?o.A:VR(),P:!1,I:!1,R:{},l:o,t:a,k:null,o:null,j:null,C:!1},u=l,c=vS;s&&(u=[l],c=cm);var d=Proxy.revocable(u,c),g=d.revoke,x=d.proxy;return l.k=x,l.j=g,x}(t,r):yu("ES5").J(t,r);return(r?r.A:VR()).p.push(i),i}function kye(e){return kh(e)||Ml(22,e),function t(r){if(!Wf(r))return r;var i,a=r[Fs],o=Jh(r);if(a){if(!a.P&&(a.i<4||!yu("ES5").K(a)))return a.t;a.I=!0,i=YR(r,o),a.I=!1}else i=YR(r,o);return y0(i,function(s,l){a&&_ye(a.t,s)===l||OL(i,s,t(l))}),o===3?new Set(i):i}(e)}function YR(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return oE(e)}var QR,v0,lE=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Aye=typeof Map<"u",Tye=typeof Set<"u",XR=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",BL=lE?Symbol.for("immer-nothing"):((QR={})["immer-nothing"]=!0,QR),ZR=lE?Symbol.for("immer-draftable"):"__$immer_draftable",Fs=lE?Symbol.for("immer-state"):"__$immer_state",Iye=""+Object.prototype.constructor,uE=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Rye=Object.getOwnPropertyDescriptors||function(e){var t={};return uE(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Pye={},vS={get:function(e,t){if(t===Fs)return e;var r=Wd(e);if(!hS(r,t))return function(a,o,s){var l,u=GR(o,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var i=r[t];return e.I||!Wf(i)?i:i===i5(e.t,t)?(o5(e),e.o[t]=yS(e.A.h,i,e)):i},has:function(e,t){return t in Wd(e)},ownKeys:function(e){return Reflect.ownKeys(Wd(e))},set:function(e,t,r){var i=GR(Wd(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var a=i5(Wd(e),t),o=a?.[Fs];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Sye(r,a)&&(r!==void 0||hS(e.t,t)))return!0;o5(e),mS(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return i5(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,o5(e),mS(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Wd(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){Ml(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ml(12)}},cm={};y0(vS,function(e,t){cm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),cm.deleteProperty=function(e,t){return cm.set.call(this,e,t,void 0)},cm.set=function(e,t,r){return vS.set.call(this,e[0],t,r,e[0])};var Mye=function(){function e(r){var i=this;this.g=XR,this.D=!0,this.produce=function(a,o,s){if(typeof a=="function"&&typeof o!="function"){var l=o;o=a;var u=i;return function(y){var _=this;y===void 0&&(y=l);for(var E=arguments.length,A=Array(E>1?E-1:0),B=1;B1?d-1:0),x=1;x=0;a--){var o=i[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(i=i.slice(a+1));var s=yu("Patches").$;return kh(r)?s(r,i):this.produce(r,function(l){return s(l,i)})},e}(),zs=new Mye,Oye=zs.produce;zs.produceWithPatches.bind(zs);zs.setAutoFreeze.bind(zs);zs.setUseProxies.bind(zs);zs.applyPatches.bind(zs);zs.createDraft.bind(zs);zs.finishDraft.bind(zs);const Bye=e=>(t,r,i)=>(i.setState=(a,o,...s)=>{const l=typeof a=="function"?Oye(a):a;return t(l,o,...s)},e(i.setState,r,i)),rx=Bye;var UL={},DL={},LL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(){for(var a=arguments.length,o=new Array(a),s=0;s"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(l=window).gtag.apply(l,o)}},r=t;e.default=r})(LL);var NL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function r(l){return l.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(u,c,d){return c>0&&c+u.length!==d.length&&u.search(t)>-1&&d.charAt(c-2)!==":"&&(d.charAt(c+u.length)!=="-"||d.charAt(c-1)==="-")&&d.charAt(c-1).search(/[^\s-]/)<0?u.toLowerCase():u.substr(1).search(/[A-Z]|\../)>-1?u:u.charAt(0).toUpperCase()+u.substr(1)})}function i(l){return typeof l=="string"&&l.indexOf("@")!==-1}var a="REDACTED (Potential Email Address)";function o(l){return i(l)?(console.warn("This arg looks like an email address, redacting."),a):l}function s(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=l||"";return u&&(d=r(l)),c&&(d=o(d)),d}})(NL);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=l(LL),r=l(NL),i=["eventCategory","eventAction","eventLabel","eventValue","hitType"],a=["title","location"],o=["page","hitType"],s=["action","category","label","value","nonInteraction","transport"];function l(ae){return ae&&ae.__esModule?ae:{default:ae}}function u(ae,M){if(ae==null)return{};var te=c(ae,M),ue,he;if(Object.getOwnPropertySymbols){var xe=Object.getOwnPropertySymbols(ae);for(he=0;he=0)&&(!Object.prototype.propertyIsEnumerable.call(ae,ue)||(te[ue]=ae[ue]))}return te}function c(ae,M){if(ae==null)return{};var te={},ue=Object.keys(ae),he,xe;for(xe=0;xe=0)&&(te[he]=ae[he]);return te}function d(ae){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(te){return typeof te}:d=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},d(ae)}function g(ae){return v(ae)||w(ae)||B(ae)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(ae){if(typeof Symbol<"u"&&ae[Symbol.iterator]!=null||ae["@@iterator"]!=null)return Array.from(ae)}function v(ae){if(Array.isArray(ae))return U(ae)}function y(ae,M){var te=Object.keys(ae);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ae);M&&(ue=ue.filter(function(he){return Object.getOwnPropertyDescriptor(ae,he).enumerable})),te.push.apply(te,ue)}return te}function _(ae){for(var M=1;Mae.length)&&(M=ae.length);for(var te=0,ue=new Array(M);te"u"||typeof document>"u")&&!M._hasLoadedGA){var he=document.createElement("script");he.async=!0,he.src="https://www.googletagmanager.com/gtag/js?id=".concat(te),ue&&he.setAttribute("nonce",ue),document.body.appendChild(he),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},M._hasLoadedGA=!0}}),Y(this,"_toGtagOptions",function(te){if(!!te){var ue={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},he=Object.entries(te).reduce(function(xe,J){var ct=E(J,2),De=ct[0],ze=ct[1];return ue[De]?xe[ue[De]]=ze:xe[De]=ze,xe},{});return he}}),Y(this,"initialize",function(te){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!te)throw new Error("Require GA_MEASUREMENT_ID");var he=typeof te=="string"?[{trackingId:te}]:te;M._currentMeasurementId=he[0].trackingId;var xe=ue.gaOptions,J=ue.gtagOptions,ct=ue.legacyDimensionMetric,De=ct===void 0?!0:ct,ze=ue.nonce,ir=ue.testMode,Rt=ir===void 0?!1:ir;if(M._testMode=Rt,Rt||M._loadGA(M._currentMeasurementId,ze),M.isInitialized||(M._gtag("js",new Date),he.forEach(function(vr){var Et=M._appendCustomMap(_(_(_({send_page_view:!1},M._toGtagOptions(_(_({},xe),vr.gaOptions))),J),vr.gtagOptions),De);M._gtag("config",vr.trackingId,Et)})),M.isInitialized=!0,!Rt){var At=g(M._queueGtag);for(M._queueGtag=[],M._isQueuing=!1;At.length;){var Xt=At.shift();M._gtag.apply(M,g(Xt)),Xt[0]==="get"&&(M._isQueuing=!0)}}}),Y(this,"set",function(te){if(!te){console.warn("`fieldsObject` is required in .set()");return}if(d(te)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(te).length===0&&console.warn("empty `fieldsObject` given to .set()"),M._gaCommand("set",te)}),Y(this,"_gaCommandSendEvent",function(te,ue,he,xe,J){M._gtag("event",ue,_(_({event_category:te,event_label:he,value:xe},J&&{non_interaction:J.nonInteraction}),M._toGtagOptions(J)))}),Y(this,"_gaCommandSendEventParameters",function(){for(var te=arguments.length,ue=new Array(te),he=0;he1?ue-1:0),xe=1;xe1&&arguments[1]!==void 0?arguments[1]:!0;if(!ue)return te;te.custom_map||(te.custom_map={});for(var he=1;he<=200;he++)te.custom_map["dimension".concat(he)]||(te.custom_map["dimension".concat(he)]="dimension".concat(he)),te.custom_map["metric".concat(he)]||(te.custom_map["metric".concat(he)]="metric".concat(he));return te}},{key:"outboundLink",value:function(te,ue){var he=te.label;if(typeof ue!="function"){console.warn("hitCallback function is required");return}if(!he){console.warn("args.label is required in outboundLink()");return}var xe={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:(0,r.default)(he)},J=!1,ct=function(){J=!0,ue()},De=setTimeout(ct,250),ze=function(){clearTimeout(De),J||ue()};xe.hitCallback=ze,this._gaCommand("send",xe)}}]),ae}();e.GA4=oe;var q=new oe;e.default=q})(DL);(function(e){function t(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(c){return typeof c}:t=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var r=a(DL);function i(l){if(typeof WeakMap!="function")return null;var u=new WeakMap,c=new WeakMap;return(i=function(g){return g?c:u})(l)}function a(l,u){if(!u&&l&&l.__esModule)return l;if(l===null||t(l)!=="object"&&typeof l!="function")return{default:l};var c=i(u);if(c&&c.has(l))return c.get(l);var d={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in l)if(x!=="default"&&Object.prototype.hasOwnProperty.call(l,x)){var w=g?Object.getOwnPropertyDescriptor(l,x):null;w&&(w.get||w.set)?Object.defineProperty(d,x,w):d[x]=l[x]}return d.default=l,c&&c.set(l,d),d}var o=r.GA4;e.ReactGAImplementation=o;var s=r.default;e.default=s})(UL);const q1=sb(UL);var ca=(e=>(e.ADD_FILE="ADD_FILE",e.CONNECT_WALLET_POPUP="CONNECT_WALLET_POPUP",e.WALLET_CONNECTED="WALLET_CONNECTED",e.SELECT_WALLET="SELECT_WALLET",e.COMPILE_SUBMIT="COMPILE_SUBMIT",e.COMPILE_SERVER_ERROR="COMPILE_SERVER_ERROR",e.SIGN_SERVER_ERROR="SIGN_SERVER_ERROR",e.SIGN_SERVER_SUCCESS="SIGN_SERVER_SUCCESS",e.COMPILE_HASHES_NOT_SIMILAR="COMPILE_HASHES_NOT_SIMILAR",e.COMPILE_COMPILATION_ERROR="COMPILE_COMPILATION_ERROR",e.COMPILE_SUCCESS_HASHES_MATCH="COMPILE_SUCCESS_HASHES_MATCH",e.PUBLISH_CLICK="PUBLISH_CLICK",e.TRANSACTION_ISSUED="TRANSACTION_ISSUED",e.TRANSACTION_REJECTED="TRANSACTION_REJECTED",e.TRANSACTION_ERROR="TRANSACTION_ERROR",e.TRANSACTION_EXPIRED="TRANSACTION_EXPIRED",e.CONTRACT_DEPLOYED="CONTRACT_DEPLOYED",e.IN_BROWSER_COMPILE_ERROR="IN_BROWSER_COMPILE_ERROR",e.IN_BROWSER_COMPILE_START="IN_BROWSER_COMPILE_START",e.IN_BROWSER_COMPILE_SUCCESS="IN_BROWSER_COMPILE_SUCCESS",e.GETTER_PARSE_START="GETTER_PARSE_START",e.RUN_GETTER="RUN_GETTER",e))(ca||{});const ma=(e,t="")=>{if(!!q1.isInitialized)try{q1.event({category:"VERIFIER",action:e,label:t})}catch(r){console.log(r)}},Uye=()=>{try{q1.initialize("G-2TB9KYGCFR"),q1.send(window.location.pathname+window.location.search)}catch{}};let K1=["fc","func","pkg"];({}).VITE_ALLOW_FIFT&&K1.push("fift");const Tu=Yh(rx((e,t)=>({files:[],hasFiles:()=>t().files.length>0,addFiles:async r=>{const i=await Promise.all(r.map(async a=>{const o=await a.text(),s=a.path?.split("/").filter(l=>l)??[];return{fileObj:a,includeInCommand:!0,folder:s.slice(0,s.length-1).join("/"),hasIncludeDirectives:o.includes("#include"),isEntrypoint:/\(\)\s*(recv_internal|main)\s*\(/.test(o),isStdlib:/stdlib.(fc|func)/i.test(a.name)}}));e(a=>{const o=i.filter(s=>s.fileObj.name.match(new RegExp(`.*.(${K1.join("|")})$`))&&!a.files.find(l=>l.fileObj.name===s.fileObj.name));o&&(ma(ca.ADD_FILE),a.files.push(...o))})},setInclueInCommand:(r,i)=>{e(a=>{a.files.find(o=>o.fileObj.name===r).includeInCommand=i})},setDirectory:(r,i)=>{e(a=>{a.files.find(o=>o.fileObj.name===r).folder=i})},removeFile:r=>{e(i=>{i.files=i.files.filter(a=>a.fileObj.name!==r)})},reorderFiles:(r,i)=>{e(a=>{const o=a.files,s=o.findIndex(c=>c.fileObj.name===r),l=o.findIndex(c=>c.fileObj.name===i),[u]=o.splice(s,1);o.splice(l,0,u)})},reset:()=>{e(r=>{r.files=[]})}}))),Dye="https://raw.githubusercontent.com/ton-community/contract-verifier-config/main/config.json";function cE(){const[e,t]=Z.exports.useState(!0);return nc(["remoteConfig"],async()=>{const{funcVersions:r,tactVersions:i}=await(await fetch(Dye)).json();return t(!1),{funcVersions:r,tactVersions:i}},{enabled:e,initialData:{funcVersions:[],tactVersions:[]}})}const Lye=Yh(rx((e,t)=>({compiler:"func",compilerSettings:{funcVersion:"",commandLine:""},_defaultFuncVersion:"",initialize:r=>{e(i=>{i._defaultFuncVersion=r,i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}})},setCompilerSettings:r=>{e(i=>{i.compilerSettings=r})},setOverrideCommandLine:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.overrideCommandLine=r})},setFuncCliVersion:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.funcVersion=r})},setTactCliVersion:r=>{e(i=>{if(i.compiler!=="tact")throw new Error("not tact compiler");i.compilerSettings={tactVersion:r}})},setCompiler:r=>{e(i=>{i.compiler=r,r==="func"?i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}:r==="tact"&&(i.compilerSettings={tactVersion:""})})}})));function dE(){const{files:e,setInclueInCommand:t}=Tu(),r=Lye(),{data:{tactVersions:i}}=cE();function a(){const s=e.filter(l=>l.includeInCommand).map(l=>(l.folder?l.folder+"/":"")+l.fileObj.name).join(" ");return e?`-SPA ${s}`:""}Z.exports.useEffect(()=>{const s=e.find(l=>l.fileObj.name.endsWith(".pkg"));(async()=>{if(!s)return;const l=await s.fileObj.text(),u=JSON.parse(l);if(r.setCompiler("tact"),!i.includes(u.compiler.version))throw new Error("Unsupported tact version "+u.compiler.version);r.setCompilerSettings({tactVersion:u.compiler.version})})()},[e]);const o={};return r.compiler==="func"&&(o.commandLine=r.compilerSettings.overrideCommandLine??a()),{...r,compilerSettings:{...r.compilerSettings,...o}}}const Nye=(e,t,r)=>{const i=()=>{a.invalidateQueries(["CustomMutation",e]),a.invalidateQueries(["CustomMutationError",e])},a=Tb(),o=nc(["CustomMutation",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),s=nc(["CustomMutationError",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),l=ZB(e,async(...c)=>(i(),a.setQueryData(["CustomMutationError",e],!1),await t(...c)),{...r,onSuccess:(c,d,g)=>{a.setQueryData(["CustomMutation",e],c),r?.onSuccess&&r.onSuccess(c,d,g)},onError:(c,d,g)=>{a.setQueryData(["CustomMutationError",e],c),r?.onError&&r.onError(c,d,g)}}),u=fV(e);return{...l,data:o.data,isLoading:!!u,error:s.data,isError:!!s.data,invalidate:i}};function jye(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}class fE{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new fE(t)}async sendInternalMessage(t,r,i,a){await t.internal(r,{value:a,sendMode:uo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i){await t.internal(r,{value:i,sendMode:uo.SendMode.PAY_GAS_SEPARATELY,body:uo.beginCell().endCell()})}async getVerifier(t,r){let i=await t.get("get_verifier",[{type:"int",value:r}]);const a=i.stack.readCell(),o=i.stack.readCellOpt();return i.stack.readNumber()==0?{admin:null,settings:null}:{admin:a.beginParse().loadAddress(),settings:o}}async getVerifiersNum(t){return(await t.get("get_verifiers_num",[])).stack.readNumber()}async getVerifiers(t){const o=(await t.get("get_verifiers",[])).stack.readCell().beginParse().loadDict(uo.Dictionary.Keys.BigUint(256),jye());return Array.from(o.values()).map(s=>{const l=s.loadAddress(),u=s.loadUint(8),c=s.loadDict(uo.Dictionary.Keys.BigUint(256),uo.Dictionary.Values.Uint(32));return{admin:l,quorum:u,pubKeyEndpoints:new Map(Array.from(c).map(([d,g])=>[d,g])),name:s.loadRef().beginParse().loadStringTail(),url:s.loadRef().beginParse().loadStringTail()}})}}function oy(){const e=Qn.Address.parse(window.verifierRegistryAddress);return nc(["verifierRegistry",e],async()=>await(await Zf()).open(fE.createFromAddress(e)).getVerifiers())}function jL(e){return e[Math.floor(Math.random()*e.length)]}function $ye(e){return new Blob([JSON.stringify(e)],{type:"application/json"})}const Lv=window.isTestnet?"https://ton-source-prod-testnet-1.herokuapp.com".split(","):"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com".split(","),Fye=ty(e=>({status:null,setStatus:t=>e({status:t}),clear:()=>e({status:null})}));function Iu(){const{contractAddress:e}=ku(),{data:t}=Jf(),{hasFiles:r,files:i}=Tu(),{compiler:a,compilerSettings:o}=dE(),s=X2(),{clear:l,setStatus:u,status:c}=Fye(),{data:d}=oy(),g=d?.find(w=>w.name===window.verifierId);return{...Nye(["submitSources"],async()=>{if(!e||!t?.codeCellHash.base64||!r()||!g)return;if(!s)throw new Error("Wallet is not connected");l();const w=g.quorum;let v=w,y;ma(ca.COMPILE_SUBMIT);const _=new FormData;for(const K of i)_.append((K.folder?K.folder+"/":"")+K.fileObj.name,K.fileObj);_.append("json",$ye({compiler:a,compilerSettings:o,knownContractAddress:e,knownContractHash:t.codeCellHash.base64,sources:i.map(K=>({includeInCommand:K.includeInCommand,isEntrypoint:K.isEntrypoint,isStdLib:K.isStdlib,hasIncludeDirectives:K.hasIncludeDirectives,folder:K.folder})),senderAddress:s}));const E=Lv[Math.floor(Math.random()*Lv.length)],A=await fetch(`${E}/source`,{method:"POST",body:_});if(A.status!==200)throw ma(ca.COMPILE_SERVER_ERROR),new Error(`Error compiling on ${E} ${await A.text()}`);const B=await A.json(),U=[];["unknown_error","compile_error"].includes(B.compileResult.result)&&(ma(ca.COMPILE_COMPILATION_ERROR),i.some(K=>K.isStdlib)?i[0].isStdlib||U.push(Ma.STDLIB_ORDER):Ma.STDLIB_MISSING,i.some(K=>K.isEntrypoint)||U.push(Ma.ENTRYPOINT_MISSING),U.push(Ma.COMPILER_VERSION),U.push(Ma.REQUIRED_FILES),U.push(Ma.FILE_ORDER)),B.compileResult.result==="not_similar"&&(ma(ca.COMPILE_HASHES_NOT_SIMILAR),U.push(Ma.NOT_SIMILAR)),B.compileResult.result!=="similar"&&U.push(Ma.SUPPORT_GROUP),B.compileResult.result==="similar"&&ma(ca.COMPILE_SUCCESS_HASHES_MATCH);let L;if(B.msgCell){v--;const K=new Set([E]);for(y=B.msgCell;v;){u(`Compile successful. Collected ${w-v}/${w}`);const H=jL(Lv.filter(oe=>!K.has(oe)));if(!H)throw new Error("Not enough backends to collect signatures");console.log("Backends used: "+[...K],"; next backend",H);const z=await fetch(`${H}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messageCell:y})});if(z.status!==200)throw ma(ca.SIGN_SERVER_ERROR),new Error(`Error collecting signatures from ${H} ${await z.text()}`);ma(ca.SIGN_SERVER_SUCCESS),y=(await z.json()).msgCell,v--}u(`Compile successful. Collected ${w-v}/${w}`),L=Qn.Cell.fromBoc(Buffer.from(B.msgCell))[0].beginParse().loadUint(64)}return{result:{...B,msgCell:y},hints:U,queryId:L,status:c}}),compileStatus:c}}var Ma=(e=>(e[e.STDLIB_ORDER=0]="STDLIB_ORDER",e[e.STDLIB_MISSING=1]="STDLIB_MISSING",e[e.NOT_SIMILAR=2]="NOT_SIMILAR",e[e.COMPILER_VERSION=3]="COMPILER_VERSION",e[e.REQUIRED_FILES=4]="REQUIRED_FILES",e[e.FILE_ORDER=5]="FILE_ORDER",e[e.ENTRYPOINT_MISSING=6]="ENTRYPOINT_MISSING",e[e.SUPPORT_GROUP=7]="SUPPORT_GROUP",e))(Ma||{});const pE=()=>{const[e]=Q2();return async(t,r,i,a)=>{try{let o;if(a){const l=Qn.beginCell();Qn.storeStateInit(a)(l),o=l.asCell()}const s={validUntil:Date.now()+5*60*1e3,messages:[{address:t,amount:r.toString(),stateInit:o?o.toBoc().toString("base64"):void 0,payload:i?.toBoc().toString("base64")}]};return await e.sendTransaction(s),"issued"}catch(o){return console.error(o),"rejected"}}},zye=ty((e,t)=>({txns:{},updateTxn:(r,i)=>{e(a=>({txns:{...t().txns,[r]:i}}))}}));function $L(e,t){const r=pE(),{updateTxn:i,txns:a}=zye();return Z.exports.useEffect(()=>{a[e]||i(e,"initial")},[]),{sendTXN:async(o,s,l,u)=>{i(e,"pending");const c=await r(o.toString(),s,l,u);let d=1;if(c==="issued"){i(e,"issued");const g=setInterval(async()=>{const x=await t(d);d++,i(e,x),x!=="issued"&&clearInterval(g)},2e3)}else c==="rejected"&&i(e,"rejected")},data:{status:a[e]},clearTXN:()=>{i(e,"initial")}}}function FL(){const{data:e}=Iu(),{data:t}=Jf(),{sendTXN:r,data:i,clearTXN:a}=$L("publishProof",async o=>{const s=await hE(t.codeCellHash.base64);return o>20?"error":s?"success":"issued"});return Z.exports.useEffect(()=>{switch(i.status){case"pending":ma(ca.PUBLISH_CLICK);break;case"issued":ma(ca.TRANSACTION_ISSUED);break;case"rejected":ma(ca.TRANSACTION_REJECTED);break;case"error":ma(ca.TRANSACTION_ERROR);break;case"expired":ma(ca.TRANSACTION_EXPIRED);break;case"success":ma(ca.CONTRACT_DEPLOYED);break}},[i.status]),{sendTXN:()=>{r(Qn.Address.parse(window.verifierRegistryAddress),Qn.toNano("0.5"),Qn.Cell.fromBoc(Buffer.from(e.result.msgCell))[0])},status:i.status,clearTXN:a}}const Hye=e=>{const t=new J6.Sha256;return t.update(e),Buffer.from(t.digestSync())};async function hE(e){return ContractVerifier.getSourcesJsonUrl(e,{verifier:window.verifierId,testnet:window.isTestnet})}function mc(){const{contractAddress:e}=ku(),{data:t,error:r}=Jf(),{status:i}=FL(),{isLoading:a,error:o,data:s,refetch:l}=nc([e,"proof"],async()=>{if(!e)return{hasOnchainProof:!1};const u=await hE(t.codeCellHash.base64);return u?{hasOnchainProof:!0,...await ContractVerifier.getSourcesData(u,{testnet:window.isTestnet})}:{hasOnchainProof:!1,ipfsLink:u}},{enabled:!!e&&!!t?.codeCellHash.base64&&i==="initial",retry:2});return{isLoading:a,error:o??r,data:s,refetch:l}}function Wye(){const{data:e}=mc();return Z.exports.useEffect(()=>{!e?.files||ContractVerifierUI.loadSourcesData(e,{containerSelector:"#myVerifierContainer",fileListSelector:"#myVerifierFiles",contentSelector:"#myVerifierContent",theme:"light"})},[e?.files]),{hasOnchainProof:e?.hasOnchainProof}}function Vye({button:e}){return Wye(),Bt("div",{id:"myVerifierContainer",style:{color:"black"},children:[N("div",{id:"myVerifierFiles"}),Bt("div",{style:{position:"relative",overflow:"hidden",width:"100%"},children:[N("div",{id:"myVerifierContent"}),N("div",{style:{position:"absolute",top:-73,right:-24,zIndex:3},children:e})]})]})}var gE={exports:{}};function mE(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r=="object"&&!Object.isFrozen(r)&&mE(r)}),e}gE.exports=mE;gE.exports.default=mE;class JR{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function zL(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $c(e,...t){const r=Object.create(null);for(const i in e)r[i]=e[i];return t.forEach(function(i){for(const a in i)r[a]=i[a]}),r}const qye="
    ",eP=e=>!!e.scope||e.sublanguage&&e.language,Kye=(e,{prefix:t})=>{if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((i,a)=>`${i}${"_".repeat(a+1)}`)].join(" ")}return`${t}${e}`};class Gye{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=zL(t)}openNode(t){if(!eP(t))return;let r="";t.sublanguage?r=`language-${t.language}`:r=Kye(t.scope,{prefix:this.classPrefix}),this.span(r)}closeNode(t){!eP(t)||(this.buffer+=qye)}value(){return this.buffer}span(t){this.buffer+=``}}const tP=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class yE{constructor(){this.rootNode=tP(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=tP({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(i=>this._walk(t,i)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{yE._collapse(r)})))}}class Yye extends yE{constructor(t){super(),this.options=t}addKeyword(t,r){t!==""&&(this.openNode(r),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,r){const i=t.root;i.sublanguage=!0,i.language=r,this.add(i)}toHTML(){return new Gye(this,this.options).value()}finalize(){return!0}}function b0(e){return e?typeof e=="string"?e:e.source:null}function HL(e){return ep("(?=",e,")")}function Qye(e){return ep("(?:",e,")*")}function Xye(e){return ep("(?:",e,")?")}function ep(...e){return e.map(r=>b0(r)).join("")}function Zye(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function vE(...e){return"("+(Zye(e).capture?"":"?:")+e.map(i=>b0(i)).join("|")+")"}function WL(e){return new RegExp(e.toString()+"|").exec("").length-1}function Jye(e,t){const r=e&&e.exec(t);return r&&r.index===0}const eve=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function bE(e,{joinWith:t}){let r=0;return e.map(i=>{r+=1;const a=r;let o=b0(i),s="";for(;o.length>0;){const l=eve.exec(o);if(!l){s+=o;break}s+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+a):(s+=l[0],l[0]==="("&&r++)}return s}).map(i=>`(${i})`).join(t)}const tve=/\b\B/,VL="[a-zA-Z]\\w*",wE="[a-zA-Z_]\\w*",qL="\\b\\d+(\\.\\d+)?",KL="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",GL="\\b(0b[01]+)",rve="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",nve=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ep(t,/.*\b/,e.binary,/\b.*/)),$c({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,i)=>{r.index!==0&&i.ignoreMatch()}},e)},w0={begin:"\\\\[\\s\\S]",relevance:0},ive={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[w0]},ove={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[w0]},ave={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},nx=function(e,t,r={}){const i=$c({scope:"comment",begin:e,end:t,contains:[]},r);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=vE("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:ep(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},sve=nx("//","$"),lve=nx("/\\*","\\*/"),uve=nx("#","$"),cve={scope:"number",begin:qL,relevance:0},dve={scope:"number",begin:KL,relevance:0},fve={scope:"number",begin:GL,relevance:0},pve={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[w0,{begin:/\[/,end:/\]/,relevance:0,contains:[w0]}]}]},hve={scope:"title",begin:VL,relevance:0},gve={scope:"title",begin:wE,relevance:0},mve={begin:"\\.\\s*"+wE,relevance:0},yve=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var sv=Object.freeze({__proto__:null,MATCH_NOTHING_RE:tve,IDENT_RE:VL,UNDERSCORE_IDENT_RE:wE,NUMBER_RE:qL,C_NUMBER_RE:KL,BINARY_NUMBER_RE:GL,RE_STARTERS_RE:rve,SHEBANG:nve,BACKSLASH_ESCAPE:w0,APOS_STRING_MODE:ive,QUOTE_STRING_MODE:ove,PHRASAL_WORDS_MODE:ave,COMMENT:nx,C_LINE_COMMENT_MODE:sve,C_BLOCK_COMMENT_MODE:lve,HASH_COMMENT_MODE:uve,NUMBER_MODE:cve,C_NUMBER_MODE:dve,BINARY_NUMBER_MODE:fve,REGEXP_MODE:pve,TITLE_MODE:hve,UNDERSCORE_TITLE_MODE:gve,METHOD_GUARD:mve,END_SAME_AS_BEGIN:yve});function vve(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function bve(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function wve(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=vve,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function xve(e,t){!Array.isArray(e.illegal)||(e.illegal=vE(...e.illegal))}function _ve(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Sve(e,t){e.relevance===void 0&&(e.relevance=1)}const Cve=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=r.keywords,e.begin=ep(r.beforeMatch,HL(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},Eve=["of","and","for","in","not","or","if","then","parent","list","value"],kve="keyword";function YL(e,t,r=kve){const i=Object.create(null);return typeof e=="string"?a(r,e.split(" ")):Array.isArray(e)?a(r,e):Object.keys(e).forEach(function(o){Object.assign(i,YL(e[o],t,o))}),i;function a(o,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const u=l.split("|");i[u[0]]=[o,Ave(u[0],u[1])]})}}function Ave(e,t){return t?Number(t):Tve(e)?0:1}function Tve(e){return Eve.includes(e.toLowerCase())}const rP={},lf=e=>{console.error(e)},nP=(e,...t)=>{console.log(`WARN: ${e}`,...t)},wp=(e,t)=>{rP[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),rP[`${e}/${t}`]=!0)},G1=new Error;function QL(e,t,{key:r}){let i=0;const a=e[r],o={},s={};for(let l=1;l<=t.length;l++)s[l+i]=a[l],o[l+i]=!0,i+=WL(t[l-1]);e[r]=s,e[r]._emit=o,e[r]._multi=!0}function Ive(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw lf("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),G1;if(typeof e.beginScope!="object"||e.beginScope===null)throw lf("beginScope must be object"),G1;QL(e,e.begin,{key:"beginScope"}),e.begin=bE(e.begin,{joinWith:""})}}function Rve(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw lf("skip, excludeEnd, returnEnd not compatible with endScope: {}"),G1;if(typeof e.endScope!="object"||e.endScope===null)throw lf("endScope must be object"),G1;QL(e,e.end,{key:"endScope"}),e.end=bE(e.end,{joinWith:""})}}function Pve(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Mve(e){Pve(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Ive(e),Rve(e)}function Ove(e){function t(s,l){return new RegExp(b0(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=WL(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=t(bE(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((g,x)=>x>0&&g!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new r;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function a(s){const l=new i;return s.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function o(s,l){const u=s;if(s.isCompiled)return u;[bve,_ve,Mve,Cve].forEach(d=>d(s,l)),e.compilerExtensions.forEach(d=>d(s,l)),s.__beforeBegin=null,[wve,xve,Sve].forEach(d=>d(s,l)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=YL(s.keywords,e.case_insensitive)),u.keywordPatternRe=t(c,!0),l&&(s.begin||(s.begin=/\B|\b/),u.beginRe=t(u.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(u.endRe=t(u.end)),u.terminatorEnd=b0(u.end)||"",s.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(u.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(d){return Bve(d==="self"?s:d)})),s.contains.forEach(function(d){o(d,u)}),s.starts&&o(s.starts,l),u.matcher=a(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=$c(e.classNameAliases||{}),o(e)}function XL(e){return e?e.endsWithParent||XL(e.starts):!1}function Bve(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return $c(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:XL(e)?$c(e,{starts:e.starts?$c(e.starts):null}):Object.isFrozen(e)?$c(e):e}var Uve="11.6.0";class Dve extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const a5=zL,iP=$c,oP=Symbol("nomatch"),Lve=7,Nve=function(e){const t=Object.create(null),r=Object.create(null),i=[];let a=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Yye};function u(ue){return l.noHighlightRe.test(ue)}function c(ue){let he=ue.className+" ";he+=ue.parentNode?ue.parentNode.className:"";const xe=l.languageDetectRe.exec(he);if(xe){const J=z(xe[1]);return J||(nP(o.replace("{}",xe[1])),nP("Falling back to no-highlight mode for this block.",ue)),J?xe[1]:"no-highlight"}return he.split(/\s+/).find(J=>u(J)||z(J))}function d(ue,he,xe){let J="",ct="";typeof he=="object"?(J=ue,xe=he.ignoreIllegals,ct=he.language):(wp("10.7.0","highlight(lang, code, ...args) has been deprecated."),wp("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),ct=ue,J=he),xe===void 0&&(xe=!0);const De={code:J,language:ct};M("before:highlight",De);const ze=De.result?De.result:g(De.language,De.code,xe);return ze.code=De.code,M("after:highlight",ze),ze}function g(ue,he,xe,J){const ct=Object.create(null);function De(se,ce){return se.keywords[ce]}function ze(){if(!Te.keywords){ot.addText($t);return}let se=0;Te.keywordPatternRe.lastIndex=0;let ce=Te.keywordPatternRe.exec($t),$="";for(;ce;){$+=$t.substring(se,ce.index);const C=ne.case_insensitive?ce[0].toLowerCase():ce[0],R=De(Te,C);if(R){const[Q,me]=R;if(ot.addText($),$="",ct[C]=(ct[C]||0)+1,ct[C]<=Lve&&(tr+=me),Q.startsWith("_"))$+=ce[0];else{const je=ne.classNameAliases[Q]||Q;ot.addKeyword(ce[0],je)}}else $+=ce[0];se=Te.keywordPatternRe.lastIndex,ce=Te.keywordPatternRe.exec($t)}$+=$t.substring(se),ot.addText($)}function ir(){if($t==="")return;let se=null;if(typeof Te.subLanguage=="string"){if(!t[Te.subLanguage]){ot.addText($t);return}se=g(Te.subLanguage,$t,!0,Ae[Te.subLanguage]),Ae[Te.subLanguage]=se._top}else se=w($t,Te.subLanguage.length?Te.subLanguage:null);Te.relevance>0&&(tr+=se.relevance),ot.addSublanguage(se._emitter,se.language)}function Rt(){Te.subLanguage!=null?ir():ze(),$t=""}function At(se,ce){let $=1;const C=ce.length-1;for(;$<=C;){if(!se._emit[$]){$++;continue}const R=ne.classNameAliases[se[$]]||se[$],Q=ce[$];R?ot.addKeyword(Q,R):($t=Q,ze(),$t=""),$++}}function Xt(se,ce){return se.scope&&typeof se.scope=="string"&&ot.openNode(ne.classNameAliases[se.scope]||se.scope),se.beginScope&&(se.beginScope._wrap?(ot.addKeyword($t,ne.classNameAliases[se.beginScope._wrap]||se.beginScope._wrap),$t=""):se.beginScope._multi&&(At(se.beginScope,ce),$t="")),Te=Object.create(se,{parent:{value:Te}}),Te}function vr(se,ce,$){let C=Jye(se.endRe,$);if(C){if(se["on:end"]){const R=new JR(se);se["on:end"](ce,R),R.isMatchIgnored&&(C=!1)}if(C){for(;se.endsParent&&se.parent;)se=se.parent;return se}}if(se.endsWithParent)return vr(se.parent,ce,$)}function Et(se){return Te.matcher.regexIndex===0?($t+=se[0],1):(be=!0,0)}function St(se){const ce=se[0],$=se.rule,C=new JR($),R=[$.__beforeBegin,$["on:begin"]];for(const Q of R)if(!!Q&&(Q(se,C),C.isMatchIgnored))return Et(ce);return $.skip?$t+=ce:($.excludeBegin&&($t+=ce),Rt(),!$.returnBegin&&!$.excludeBegin&&($t=ce)),Xt($,se),$.returnBegin?0:ce.length}function xt(se){const ce=se[0],$=he.substring(se.index),C=vr(Te,se,$);if(!C)return oP;const R=Te;Te.endScope&&Te.endScope._wrap?(Rt(),ot.addKeyword(ce,Te.endScope._wrap)):Te.endScope&&Te.endScope._multi?(Rt(),At(Te.endScope,se)):R.skip?$t+=ce:(R.returnEnd||R.excludeEnd||($t+=ce),Rt(),R.excludeEnd&&($t=ce));do Te.scope&&ot.closeNode(),!Te.skip&&!Te.subLanguage&&(tr+=Te.relevance),Te=Te.parent;while(Te!==C.parent);return C.starts&&Xt(C.starts,se),R.returnEnd?0:ce.length}function Ut(){const se=[];for(let ce=Te;ce!==ne;ce=ce.parent)ce.scope&&se.unshift(ce.scope);se.forEach(ce=>ot.openNode(ce))}let Gt={};function mr(se,ce){const $=ce&&ce[0];if($t+=se,$==null)return Rt(),0;if(Gt.type==="begin"&&ce.type==="end"&&Gt.index===ce.index&&$===""){if($t+=he.slice(ce.index,ce.index+1),!a){const C=new Error(`0 width match regex (${ue})`);throw C.languageName=ue,C.badRule=Gt.rule,C}return 1}if(Gt=ce,ce.type==="begin")return St(ce);if(ce.type==="illegal"&&!xe){const C=new Error('Illegal lexeme "'+$+'" for mode "'+(Te.scope||"")+'"');throw C.mode=Te,C}else if(ce.type==="end"){const C=xt(ce);if(C!==oP)return C}if(ce.type==="illegal"&&$==="")return 1;if(br>1e5&&br>ce.index*3)throw new Error("potential infinite loop, way more iterations than matches");return $t+=$,$.length}const ne=z(ue);if(!ne)throw lf(o.replace("{}",ue)),new Error('Unknown language: "'+ue+'"');const Pt=Ove(ne);let Dt="",Te=J||Pt;const Ae={},ot=new l.__emitter(l);Ut();let $t="",tr=0,Ot=0,br=0,be=!1;try{for(Te.matcher.considerAll();;){br++,be?be=!1:Te.matcher.considerAll(),Te.matcher.lastIndex=Ot;const se=Te.matcher.exec(he);if(!se)break;const ce=he.substring(Ot,se.index),$=mr(ce,se);Ot=se.index+$}return mr(he.substring(Ot)),ot.closeAllNodes(),ot.finalize(),Dt=ot.toHTML(),{language:ue,value:Dt,relevance:tr,illegal:!1,_emitter:ot,_top:Te}}catch(se){if(se.message&&se.message.includes("Illegal"))return{language:ue,value:a5(he),illegal:!0,relevance:0,_illegalBy:{message:se.message,index:Ot,context:he.slice(Ot-100,Ot+100),mode:se.mode,resultSoFar:Dt},_emitter:ot};if(a)return{language:ue,value:a5(he),illegal:!1,relevance:0,errorRaised:se,_emitter:ot,_top:Te};throw se}}function x(ue){const he={value:a5(ue),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return he._emitter.addText(ue),he}function w(ue,he){he=he||l.languages||Object.keys(t);const xe=x(ue),J=he.filter(z).filter(oe).map(Rt=>g(Rt,ue,!1));J.unshift(xe);const ct=J.sort((Rt,At)=>{if(Rt.relevance!==At.relevance)return At.relevance-Rt.relevance;if(Rt.language&&At.language){if(z(Rt.language).supersetOf===At.language)return 1;if(z(At.language).supersetOf===Rt.language)return-1}return 0}),[De,ze]=ct,ir=De;return ir.secondBest=ze,ir}function v(ue,he,xe){const J=he&&r[he]||xe;ue.classList.add("hljs"),ue.classList.add(`language-${J}`)}function y(ue){let he=null;const xe=c(ue);if(u(xe))return;if(M("before:highlightElement",{el:ue,language:xe}),ue.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ue)),l.throwUnescapedHTML))throw new Dve("One of your code blocks includes unescaped HTML.",ue.innerHTML);he=ue;const J=he.textContent,ct=xe?d(J,{language:xe,ignoreIllegals:!0}):w(J);ue.innerHTML=ct.value,v(ue,xe,ct.language),ue.result={language:ct.language,re:ct.relevance,relevance:ct.relevance},ct.secondBest&&(ue.secondBest={language:ct.secondBest.language,relevance:ct.secondBest.relevance}),M("after:highlightElement",{el:ue,result:ct,text:J})}function _(ue){l=iP(l,ue)}const E=()=>{U(),wp("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function A(){U(),wp("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let B=!1;function U(){if(document.readyState==="loading"){B=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function L(){B&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",L,!1);function K(ue,he){let xe=null;try{xe=he(e)}catch(J){if(lf("Language definition for '{}' could not be registered.".replace("{}",ue)),a)lf(J);else throw J;xe=s}xe.name||(xe.name=ue),t[ue]=xe,xe.rawDefinition=he.bind(null,e),xe.aliases&&Y(xe.aliases,{languageName:ue})}function V(ue){delete t[ue];for(const he of Object.keys(r))r[he]===ue&&delete r[he]}function H(){return Object.keys(t)}function z(ue){return ue=(ue||"").toLowerCase(),t[ue]||t[r[ue]]}function Y(ue,{languageName:he}){typeof ue=="string"&&(ue=[ue]),ue.forEach(xe=>{r[xe.toLowerCase()]=he})}function oe(ue){const he=z(ue);return he&&!he.disableAutodetect}function q(ue){ue["before:highlightBlock"]&&!ue["before:highlightElement"]&&(ue["before:highlightElement"]=he=>{ue["before:highlightBlock"](Object.assign({block:he.el},he))}),ue["after:highlightBlock"]&&!ue["after:highlightElement"]&&(ue["after:highlightElement"]=he=>{ue["after:highlightBlock"](Object.assign({block:he.el},he))})}function ae(ue){q(ue),i.push(ue)}function M(ue,he){const xe=ue;i.forEach(function(J){J[xe]&&J[xe](he)})}function te(ue){return wp("10.7.0","highlightBlock will be removed entirely in v12.0"),wp("10.7.0","Please use highlightElement now."),y(ue)}Object.assign(e,{highlight:d,highlightAuto:w,highlightAll:U,highlightElement:y,highlightBlock:te,configure:_,initHighlighting:E,initHighlightingOnLoad:A,registerLanguage:K,unregisterLanguage:V,listLanguages:H,getLanguage:z,registerAliases:Y,autoDetection:oe,inherit:iP,addPlugin:ae}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=Uve,e.regex={concat:ep,lookahead:HL,either:vE,optional:Xye,anyNumberOfTimes:Qye};for(const ue in sv)typeof sv[ue]=="object"&&gE.exports(sv[ue]);return Object.assign(e,sv),e};var x0=Nve({}),jve=x0;x0.HighlightJS=x0;x0.default=x0;const ZL=jve,aP='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',sP=/\"[^\n\"]+\"[Hhcusa]?/;let bS;try{bS=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,//,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,//,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1</,/0=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1</,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:e.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}const uP=/[a-zA-Z_][0-9a-zA-Z_]*/;function zve(e){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},{scope:"symbol",match:e.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function Hve(e){e.registerLanguage("fift",Fve),e.registerLanguage("func",$ve),e.registerLanguage("tlb",zve)}Hve(ZL);function Wve({button:e}){const{data:t}=Jf(),r=sa(),i=ra(r.breakpoints.down("lg")),a=Z.exports.useRef(null);return Z.exports.useEffect(()=>{ZL.highlightElement(a.current)},[t?.decompiled,a.current]),Bt("pre",{style:{overflow:"auto",height:800,marginTop:0,lineHeight:"25px",fontSize:14,paddingTop:"0.5em",fontFamily:"monospace"},children:[Bt("code",{className:"language-fift",style:{background:"#fff",display:"flex"},children:[N("div",{style:{textAlign:"right",color:"#728a96",paddingLeft:i?0:20},children:t?.decompiled?.trim().split(` -`).map((o,s)=>s+1).join(` -`)}),N("div",{style:{background:"transparent",paddingLeft:20},ref:a,children:t?.decompiled})]}),e]})}const Vve="/assets/verified-light.2c74da9f.svg",qve="/assets/download.62d50798.svg",ix="/assets/copy.da496d78.svg";var JL={exports:{}};/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(i,a,o){function s(c,d){if(!a[c]){if(!i[c]){var g=typeof Tl=="function"&&Tl;if(!d&&g)return g(c,!0);if(l)return l(c,!0);var x=new Error("Cannot find module '"+c+"'");throw x.code="MODULE_NOT_FOUND",x}var w=a[c]={exports:{}};i[c][0].call(w.exports,function(v){var y=i[c][1][v];return s(y||v)},w,w.exports,r,i,a,o)}return a[c].exports}for(var l=typeof Tl=="function"&&Tl,u=0;u>2,w=(3&c)<<4|d>>4,v=1>6:64,y=2>4,d=(15&x)<<4|(w=l.indexOf(u.charAt(y++)))>>2,g=(3&w)<<6|(v=l.indexOf(u.charAt(y++))),A[_++]=c,w!==64&&(A[_++]=d),v!==64&&(A[_++]=g);return A}},{"./support":30,"./utils":32}],2:[function(r,i,a){var o=r("./external"),s=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),u=r("./stream/DataLengthProbe");function c(d,g,x,w,v){this.compressedSize=d,this.uncompressedSize=g,this.crc32=x,this.compression=w,this.compressedContent=v}c.prototype={getContentWorker:function(){var d=new s(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),g=this;return d.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,g,x){return d.pipe(new l).pipe(new u("uncompressedSize")).pipe(g.compressWorker(x)).pipe(new u("compressedSize")).withStreamInfo("compression",g)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,i,a){var o=r("./stream/GenericWorker");a.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},a.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,i,a){var o=r("./utils"),s=function(){for(var l,u=[],c=0;c<256;c++){l=c;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;u[c]=l}return u}();i.exports=function(l,u){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(c,d,g,x){var w=s,v=x+g;c^=-1;for(var y=x;y>>8^w[255&(c^d[y])];return-1^c}(0|u,l,l.length,0):function(c,d,g,x){var w=s,v=x+g;c^=-1;for(var y=x;y>>8^w[255&(c^d.charCodeAt(y))];return-1^c}(0|u,l,l.length,0):0}},{"./utils":32}],5:[function(r,i,a){a.base64=!1,a.binary=!1,a.dir=!1,a.createFolders=!0,a.date=null,a.compression=null,a.compressionOptions=null,a.comment=null,a.unixPermissions=null,a.dosPermissions=null},{}],6:[function(r,i,a){var o=null;o=typeof Promise<"u"?Promise:r("lie"),i.exports={Promise:o}},{lie:37}],7:[function(r,i,a){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),l=r("./utils"),u=r("./stream/GenericWorker"),c=o?"uint8array":"array";function d(g,x){u.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=x,this.meta={}}a.magic="\b\0",l.inherits(d,u),d.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(c,g.data),!1)},d.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(x){g.push({data:x,meta:g.meta})}},a.compressWorker=function(g){return new d("Deflate",g)},a.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,i,a){function o(w,v){var y,_="";for(y=0;y>>=8;return _}function s(w,v,y,_,E,A){var B,U,L=w.file,K=w.compression,V=A!==c.utf8encode,H=l.transformTo("string",A(L.name)),z=l.transformTo("string",c.utf8encode(L.name)),Y=L.comment,oe=l.transformTo("string",A(Y)),q=l.transformTo("string",c.utf8encode(Y)),ae=z.length!==L.name.length,M=q.length!==Y.length,te="",ue="",he="",xe=L.dir,J=L.date,ct={crc32:0,compressedSize:0,uncompressedSize:0};v&&!y||(ct.crc32=w.crc32,ct.compressedSize=w.compressedSize,ct.uncompressedSize=w.uncompressedSize);var De=0;v&&(De|=8),V||!ae&&!M||(De|=2048);var ze=0,ir=0;xe&&(ze|=16),E==="UNIX"?(ir=798,ze|=function(At,Xt){var vr=At;return At||(vr=Xt?16893:33204),(65535&vr)<<16}(L.unixPermissions,xe)):(ir=20,ze|=function(At){return 63&(At||0)}(L.dosPermissions)),B=J.getUTCHours(),B<<=6,B|=J.getUTCMinutes(),B<<=5,B|=J.getUTCSeconds()/2,U=J.getUTCFullYear()-1980,U<<=4,U|=J.getUTCMonth()+1,U<<=5,U|=J.getUTCDate(),ae&&(ue=o(1,1)+o(d(H),4)+z,te+="up"+o(ue.length,2)+ue),M&&(he=o(1,1)+o(d(oe),4)+q,te+="uc"+o(he.length,2)+he);var Rt="";return Rt+=` -\0`,Rt+=o(De,2),Rt+=K.magic,Rt+=o(B,2),Rt+=o(U,2),Rt+=o(ct.crc32,4),Rt+=o(ct.compressedSize,4),Rt+=o(ct.uncompressedSize,4),Rt+=o(H.length,2),Rt+=o(te.length,2),{fileRecord:g.LOCAL_FILE_HEADER+Rt+H+te,dirRecord:g.CENTRAL_FILE_HEADER+o(ir,2)+Rt+o(oe.length,2)+"\0\0\0\0"+o(ze,4)+o(_,4)+H+te+oe}}var l=r("../utils"),u=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),g=r("../signature");function x(w,v,y,_){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=y,this.encodeFileName=_,this.streamFiles=w,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(x,u),x.prototype.push=function(w){var v=w.meta.percent||0,y=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(w):(this.bytesWritten+=w.data.length,u.prototype.push.call(this,{data:w.data,meta:{currentFile:this.currentFile,percent:y?(v+100*(y-_-1))/y:100}}))},x.prototype.openedSource=function(w){this.currentSourceOffset=this.bytesWritten,this.currentFile=w.file.name;var v=this.streamFiles&&!w.file.dir;if(v){var y=s(w,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(w){this.accumulate=!1;var v=this.streamFiles&&!w.file.dir,y=s(w,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),v)this.push({data:function(_){return g.DATA_DESCRIPTOR+o(_.crc32,4)+o(_.compressedSize,4)+o(_.uncompressedSize,4)}(w),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var w=this.bytesWritten,v=0;v=this.index;u--)c=(c<<8)+this.byteAt(u);return this.index+=l,c},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},i.exports=s},{"../utils":32}],19:[function(r,i,a){var o=r("./Uint8ArrayReader");function s(l){o.call(this,l)}r("../utils").inherits(s,o),s.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,i,a){var o=r("./DataReader");function s(l){o.call(this,l)}r("../utils").inherits(s,o),s.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},s.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},s.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},s.prototype.readData=function(l){this.checkOffset(l);var u=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,i,a){var o=r("./ArrayReader");function s(l){o.call(this,l)}r("../utils").inherits(s,o),s.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,u},i.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,i,a){var o=r("../utils"),s=r("../support"),l=r("./ArrayReader"),u=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");i.exports=function(g){var x=o.getTypeOf(g);return o.checkSupport(x),x!=="string"||s.uint8array?x==="nodebuffer"?new c(g):s.uint8array?new d(o.transformTo("uint8array",g)):new l(o.transformTo("array",g)):new u(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,i,a){a.LOCAL_FILE_HEADER="PK",a.CENTRAL_FILE_HEADER="PK",a.CENTRAL_DIRECTORY_END="PK",a.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",a.ZIP64_CENTRAL_DIRECTORY_END="PK",a.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,i,a){var o=r("./GenericWorker"),s=r("../utils");function l(u){o.call(this,"ConvertWorker to "+u),this.destType=u}s.inherits(l,o),l.prototype.processChunk=function(u){this.push({data:s.transformTo(this.destType,u.data),meta:u.meta})},i.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,i,a){var o=r("./GenericWorker"),s=r("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(l,o),l.prototype.processChunk=function(u){this.streamInfo.crc32=s(u.data,this.streamInfo.crc32||0),this.push(u)},i.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,i,a){var o=r("../utils"),s=r("./GenericWorker");function l(u){s.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}o.inherits(l,s),l.prototype.processChunk=function(u){if(u){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+u.data.length}s.prototype.processChunk.call(this,u)},i.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,i,a){var o=r("../utils"),s=r("./GenericWorker");function l(u){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=o.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}o.inherits(l,s),l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,c);break;case"uint8array":u=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":u=this.data.slice(this.index,c)}return this.index=c,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,i,a){function o(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,l){return this._listeners[s].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,l){if(this._listeners[s])for(var u=0;u "+s:s}},i.exports=o},{}],29:[function(r,i,a){var o=r("../utils"),s=r("./ConvertWorker"),l=r("./GenericWorker"),u=r("../base64"),c=r("../support"),d=r("../external"),g=null;if(c.nodestream)try{g=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(v,y){return new d.Promise(function(_,E){var A=[],B=v._internalType,U=v._outputType,L=v._mimeType;v.on("data",function(K,V){A.push(K),y&&y(V)}).on("error",function(K){A=[],E(K)}).on("end",function(){try{var K=function(V,H,z){switch(V){case"blob":return o.newBlob(o.transformTo("arraybuffer",H),z);case"base64":return u.encode(H);default:return o.transformTo(V,H)}}(U,function(V,H){var z,Y=0,oe=null,q=0;for(z=0;z"u")a.blob=!1;else{var o=new ArrayBuffer(0);try{a.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(o),a.blob=s.getBlob("application/zip").size===0}catch{a.blob=!1}}}try{a.nodestream=!!r("readable-stream").Readable}catch{a.nodestream=!1}},{"readable-stream":16}],31:[function(r,i,a){for(var o=r("./utils"),s=r("./support"),l=r("./nodejsUtils"),u=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function g(){u.call(this,"utf-8 decode"),this.leftOver=null}function x(){u.call(this,"utf-8 encode")}a.utf8encode=function(w){return s.nodebuffer?l.newBufferFrom(w,"utf-8"):function(v){var y,_,E,A,B,U=v.length,L=0;for(A=0;A>>6:(_<65536?y[B++]=224|_>>>12:(y[B++]=240|_>>>18,y[B++]=128|_>>>12&63),y[B++]=128|_>>>6&63),y[B++]=128|63&_);return y}(w)},a.utf8decode=function(w){return s.nodebuffer?o.transformTo("nodebuffer",w).toString("utf-8"):function(v){var y,_,E,A,B=v.length,U=new Array(2*B);for(y=_=0;y>10&1023,U[_++]=56320|1023&E)}return U.length!==_&&(U.subarray?U=U.subarray(0,_):U.length=_),o.applyFromCharCode(U)}(w=o.transformTo(s.uint8array?"uint8array":"array",w))},o.inherits(g,u),g.prototype.processChunk=function(w){var v=o.transformTo(s.uint8array?"uint8array":"array",w.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var y=v;(v=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),v.set(y,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var _=function(A,B){var U;for((B=B||A.length)>A.length&&(B=A.length),U=B-1;0<=U&&(192&A[U])==128;)U--;return U<0||U===0?B:U+c[A[U]]>B?U:B}(v),E=v;_!==v.length&&(s.uint8array?(E=v.subarray(0,_),this.leftOver=v.subarray(_,v.length)):(E=v.slice(0,_),this.leftOver=v.slice(_,v.length))),this.push({data:a.utf8decode(E),meta:w.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:a.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},a.Utf8DecodeWorker=g,o.inherits(x,u),x.prototype.processChunk=function(w){this.push({data:a.utf8encode(w.data),meta:w.meta})},a.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,i,a){var o=r("./support"),s=r("./base64"),l=r("./nodejsUtils"),u=r("./external");function c(y){return y}function d(y,_){for(var E=0;E>8;this.dir=!!(16&this.externalFileAttributes),w==0&&(this.dosPermissions=63&this.externalFileAttributes),w==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var w=o(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=w.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=w.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=w.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=w.readInt(4))}},readExtraFields:function(w){var v,y,_,E=w.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});w.index+4>>6:(w<65536?x[_++]=224|w>>>12:(x[_++]=240|w>>>18,x[_++]=128|w>>>12&63),x[_++]=128|w>>>6&63),x[_++]=128|63&w);return x},a.buf2binstring=function(g){return d(g,g.length)},a.binstring2buf=function(g){for(var x=new o.Buf8(g.length),w=0,v=x.length;w>10&1023,A[v++]=56320|1023&y)}return d(A,v)},a.utf8border=function(g,x){var w;for((x=x||g.length)>g.length&&(x=g.length),w=x-1;0<=w&&(192&g[w])==128;)w--;return w<0||w===0?x:w+u[g[w]]>x?w:x}},{"./common":41}],43:[function(r,i,a){i.exports=function(o,s,l,u){for(var c=65535&o|0,d=o>>>16&65535|0,g=0;l!==0;){for(l-=g=2e3>>1:s>>>1;l[u]=s}return l}();i.exports=function(s,l,u,c){var d=o,g=c+u;s^=-1;for(var x=c;x>>8^d[255&(s^l[x])];return-1^s}},{}],46:[function(r,i,a){var o,s=r("../utils/common"),l=r("./trees"),u=r("./adler32"),c=r("./crc32"),d=r("./messages"),g=0,x=4,w=0,v=-2,y=-1,_=4,E=2,A=8,B=9,U=286,L=30,K=19,V=2*U+1,H=15,z=3,Y=258,oe=Y+z+1,q=42,ae=113,M=1,te=2,ue=3,he=4;function xe(ne,Pt){return ne.msg=d[Pt],Pt}function J(ne){return(ne<<1)-(4ne.avail_out&&(Dt=ne.avail_out),Dt!==0&&(s.arraySet(ne.output,Pt.pending_buf,Pt.pending_out,Dt,ne.next_out),ne.next_out+=Dt,Pt.pending_out+=Dt,ne.total_out+=Dt,ne.avail_out-=Dt,Pt.pending-=Dt,Pt.pending===0&&(Pt.pending_out=0))}function ze(ne,Pt){l._tr_flush_block(ne,0<=ne.block_start?ne.block_start:-1,ne.strstart-ne.block_start,Pt),ne.block_start=ne.strstart,De(ne.strm)}function ir(ne,Pt){ne.pending_buf[ne.pending++]=Pt}function Rt(ne,Pt){ne.pending_buf[ne.pending++]=Pt>>>8&255,ne.pending_buf[ne.pending++]=255&Pt}function At(ne,Pt){var Dt,Te,Ae=ne.max_chain_length,ot=ne.strstart,$t=ne.prev_length,tr=ne.nice_match,Ot=ne.strstart>ne.w_size-oe?ne.strstart-(ne.w_size-oe):0,br=ne.window,be=ne.w_mask,se=ne.prev,ce=ne.strstart+Y,$=br[ot+$t-1],C=br[ot+$t];ne.prev_length>=ne.good_match&&(Ae>>=2),tr>ne.lookahead&&(tr=ne.lookahead);do if(br[(Dt=Pt)+$t]===C&&br[Dt+$t-1]===$&&br[Dt]===br[ot]&&br[++Dt]===br[ot+1]){ot+=2,Dt++;do;while(br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&br[++ot]===br[++Dt]&&otOt&&--Ae!=0);return $t<=ne.lookahead?$t:ne.lookahead}function Xt(ne){var Pt,Dt,Te,Ae,ot,$t,tr,Ot,br,be,se=ne.w_size;do{if(Ae=ne.window_size-ne.lookahead-ne.strstart,ne.strstart>=se+(se-oe)){for(s.arraySet(ne.window,ne.window,se,se,0),ne.match_start-=se,ne.strstart-=se,ne.block_start-=se,Pt=Dt=ne.hash_size;Te=ne.head[--Pt],ne.head[Pt]=se<=Te?Te-se:0,--Dt;);for(Pt=Dt=se;Te=ne.prev[--Pt],ne.prev[Pt]=se<=Te?Te-se:0,--Dt;);Ae+=se}if(ne.strm.avail_in===0)break;if($t=ne.strm,tr=ne.window,Ot=ne.strstart+ne.lookahead,br=Ae,be=void 0,be=$t.avail_in,br=z)for(ot=ne.strstart-ne.insert,ne.ins_h=ne.window[ot],ne.ins_h=(ne.ins_h<=z&&(ne.ins_h=(ne.ins_h<=z)if(Te=l._tr_tally(ne,ne.strstart-ne.match_start,ne.match_length-z),ne.lookahead-=ne.match_length,ne.match_length<=ne.max_lazy_match&&ne.lookahead>=z){for(ne.match_length--;ne.strstart++,ne.ins_h=(ne.ins_h<=z&&(ne.ins_h=(ne.ins_h<=z&&ne.match_length<=ne.prev_length){for(Ae=ne.strstart+ne.lookahead-z,Te=l._tr_tally(ne,ne.strstart-1-ne.prev_match,ne.prev_length-z),ne.lookahead-=ne.prev_length-1,ne.prev_length-=2;++ne.strstart<=Ae&&(ne.ins_h=(ne.ins_h<ne.pending_buf_size-5&&(Dt=ne.pending_buf_size-5);;){if(ne.lookahead<=1){if(Xt(ne),ne.lookahead===0&&Pt===g)return M;if(ne.lookahead===0)break}ne.strstart+=ne.lookahead,ne.lookahead=0;var Te=ne.block_start+Dt;if((ne.strstart===0||ne.strstart>=Te)&&(ne.lookahead=ne.strstart-Te,ne.strstart=Te,ze(ne,!1),ne.strm.avail_out===0)||ne.strstart-ne.block_start>=ne.w_size-oe&&(ze(ne,!1),ne.strm.avail_out===0))return M}return ne.insert=0,Pt===x?(ze(ne,!0),ne.strm.avail_out===0?ue:he):(ne.strstart>ne.block_start&&(ze(ne,!1),ne.strm.avail_out),M)}),new St(4,4,8,4,vr),new St(4,5,16,8,vr),new St(4,6,32,32,vr),new St(4,4,16,16,Et),new St(8,16,32,32,Et),new St(8,16,128,128,Et),new St(8,32,128,256,Et),new St(32,128,258,1024,Et),new St(32,258,258,4096,Et)],a.deflateInit=function(ne,Pt){return mr(ne,Pt,A,15,8,0)},a.deflateInit2=mr,a.deflateReset=Gt,a.deflateResetKeep=Ut,a.deflateSetHeader=function(ne,Pt){return ne&&ne.state?ne.state.wrap!==2?v:(ne.state.gzhead=Pt,w):v},a.deflate=function(ne,Pt){var Dt,Te,Ae,ot;if(!ne||!ne.state||5>8&255),ir(Te,Te.gzhead.time>>16&255),ir(Te,Te.gzhead.time>>24&255),ir(Te,Te.level===9?2:2<=Te.strategy||Te.level<2?4:0),ir(Te,255&Te.gzhead.os),Te.gzhead.extra&&Te.gzhead.extra.length&&(ir(Te,255&Te.gzhead.extra.length),ir(Te,Te.gzhead.extra.length>>8&255)),Te.gzhead.hcrc&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending,0)),Te.gzindex=0,Te.status=69):(ir(Te,0),ir(Te,0),ir(Te,0),ir(Te,0),ir(Te,0),ir(Te,Te.level===9?2:2<=Te.strategy||Te.level<2?4:0),ir(Te,3),Te.status=ae);else{var $t=A+(Te.w_bits-8<<4)<<8;$t|=(2<=Te.strategy||Te.level<2?0:Te.level<6?1:Te.level===6?2:3)<<6,Te.strstart!==0&&($t|=32),$t+=31-$t%31,Te.status=ae,Rt(Te,$t),Te.strstart!==0&&(Rt(Te,ne.adler>>>16),Rt(Te,65535&ne.adler)),ne.adler=1}if(Te.status===69)if(Te.gzhead.extra){for(Ae=Te.pending;Te.gzindex<(65535&Te.gzhead.extra.length)&&(Te.pending!==Te.pending_buf_size||(Te.gzhead.hcrc&&Te.pending>Ae&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),De(ne),Ae=Te.pending,Te.pending!==Te.pending_buf_size));)ir(Te,255&Te.gzhead.extra[Te.gzindex]),Te.gzindex++;Te.gzhead.hcrc&&Te.pending>Ae&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),Te.gzindex===Te.gzhead.extra.length&&(Te.gzindex=0,Te.status=73)}else Te.status=73;if(Te.status===73)if(Te.gzhead.name){Ae=Te.pending;do{if(Te.pending===Te.pending_buf_size&&(Te.gzhead.hcrc&&Te.pending>Ae&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),De(ne),Ae=Te.pending,Te.pending===Te.pending_buf_size)){ot=1;break}ot=Te.gzindexAe&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),ot===0&&(Te.gzindex=0,Te.status=91)}else Te.status=91;if(Te.status===91)if(Te.gzhead.comment){Ae=Te.pending;do{if(Te.pending===Te.pending_buf_size&&(Te.gzhead.hcrc&&Te.pending>Ae&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),De(ne),Ae=Te.pending,Te.pending===Te.pending_buf_size)){ot=1;break}ot=Te.gzindexAe&&(ne.adler=c(ne.adler,Te.pending_buf,Te.pending-Ae,Ae)),ot===0&&(Te.status=103)}else Te.status=103;if(Te.status===103&&(Te.gzhead.hcrc?(Te.pending+2>Te.pending_buf_size&&De(ne),Te.pending+2<=Te.pending_buf_size&&(ir(Te,255&ne.adler),ir(Te,ne.adler>>8&255),ne.adler=0,Te.status=ae)):Te.status=ae),Te.pending!==0){if(De(ne),ne.avail_out===0)return Te.last_flush=-1,w}else if(ne.avail_in===0&&J(Pt)<=J(Dt)&&Pt!==x)return xe(ne,-5);if(Te.status===666&&ne.avail_in!==0)return xe(ne,-5);if(ne.avail_in!==0||Te.lookahead!==0||Pt!==g&&Te.status!==666){var tr=Te.strategy===2?function(Ot,br){for(var be;;){if(Ot.lookahead===0&&(Xt(Ot),Ot.lookahead===0)){if(br===g)return M;break}if(Ot.match_length=0,be=l._tr_tally(Ot,0,Ot.window[Ot.strstart]),Ot.lookahead--,Ot.strstart++,be&&(ze(Ot,!1),Ot.strm.avail_out===0))return M}return Ot.insert=0,br===x?(ze(Ot,!0),Ot.strm.avail_out===0?ue:he):Ot.last_lit&&(ze(Ot,!1),Ot.strm.avail_out===0)?M:te}(Te,Pt):Te.strategy===3?function(Ot,br){for(var be,se,ce,$,C=Ot.window;;){if(Ot.lookahead<=Y){if(Xt(Ot),Ot.lookahead<=Y&&br===g)return M;if(Ot.lookahead===0)break}if(Ot.match_length=0,Ot.lookahead>=z&&0Ot.lookahead&&(Ot.match_length=Ot.lookahead)}if(Ot.match_length>=z?(be=l._tr_tally(Ot,1,Ot.match_length-z),Ot.lookahead-=Ot.match_length,Ot.strstart+=Ot.match_length,Ot.match_length=0):(be=l._tr_tally(Ot,0,Ot.window[Ot.strstart]),Ot.lookahead--,Ot.strstart++),be&&(ze(Ot,!1),Ot.strm.avail_out===0))return M}return Ot.insert=0,br===x?(ze(Ot,!0),Ot.strm.avail_out===0?ue:he):Ot.last_lit&&(ze(Ot,!1),Ot.strm.avail_out===0)?M:te}(Te,Pt):o[Te.level].func(Te,Pt);if(tr!==ue&&tr!==he||(Te.status=666),tr===M||tr===ue)return ne.avail_out===0&&(Te.last_flush=-1),w;if(tr===te&&(Pt===1?l._tr_align(Te):Pt!==5&&(l._tr_stored_block(Te,0,0,!1),Pt===3&&(ct(Te.head),Te.lookahead===0&&(Te.strstart=0,Te.block_start=0,Te.insert=0))),De(ne),ne.avail_out===0))return Te.last_flush=-1,w}return Pt!==x?w:Te.wrap<=0?1:(Te.wrap===2?(ir(Te,255&ne.adler),ir(Te,ne.adler>>8&255),ir(Te,ne.adler>>16&255),ir(Te,ne.adler>>24&255),ir(Te,255&ne.total_in),ir(Te,ne.total_in>>8&255),ir(Te,ne.total_in>>16&255),ir(Te,ne.total_in>>24&255)):(Rt(Te,ne.adler>>>16),Rt(Te,65535&ne.adler)),De(ne),0=Dt.w_size&&(ot===0&&(ct(Dt.head),Dt.strstart=0,Dt.block_start=0,Dt.insert=0),br=new s.Buf8(Dt.w_size),s.arraySet(br,Pt,be-Dt.w_size,Dt.w_size,0),Pt=br,be=Dt.w_size),$t=ne.avail_in,tr=ne.next_in,Ot=ne.input,ne.avail_in=be,ne.next_in=0,ne.input=Pt,Xt(Dt);Dt.lookahead>=z;){for(Te=Dt.strstart,Ae=Dt.lookahead-(z-1);Dt.ins_h=(Dt.ins_h<>>=z=H>>>24,B-=z,(z=H>>>16&255)===0)te[d++]=65535&H;else{if(!(16&z)){if((64&z)==0){H=U[(65535&H)+(A&(1<>>=z,B-=z),B<15&&(A+=M[u++]<>>=z=H>>>24,B-=z,!(16&(z=H>>>16&255))){if((64&z)==0){H=L[(65535&H)+(A&(1<>>=z,B-=z,(z=d-g)>3,A&=(1<<(B-=Y<<3))-1,o.next_in=u,o.next_out=d,o.avail_in=u>>24&255)+(q>>>8&65280)+((65280&q)<<8)+((255&q)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function B(q){var ae;return q&&q.state?(ae=q.state,q.total_in=q.total_out=ae.total=0,q.msg="",ae.wrap&&(q.adler=1&ae.wrap),ae.mode=v,ae.last=0,ae.havedict=0,ae.dmax=32768,ae.head=null,ae.hold=0,ae.bits=0,ae.lencode=ae.lendyn=new o.Buf32(y),ae.distcode=ae.distdyn=new o.Buf32(_),ae.sane=1,ae.back=-1,x):w}function U(q){var ae;return q&&q.state?((ae=q.state).wsize=0,ae.whave=0,ae.wnext=0,B(q)):w}function L(q,ae){var M,te;return q&&q.state?(te=q.state,ae<0?(M=0,ae=-ae):(M=1+(ae>>4),ae<48&&(ae&=15)),ae&&(ae<8||15=he.wsize?(o.arraySet(he.window,ae,M-he.wsize,he.wsize,0),he.wnext=0,he.whave=he.wsize):(te<(ue=he.wsize-he.wnext)&&(ue=te),o.arraySet(he.window,ae,M-te,ue,he.wnext),(te-=ue)?(o.arraySet(he.window,ae,M-te,te,0),he.wnext=te,he.whave=he.wsize):(he.wnext+=ue,he.wnext===he.wsize&&(he.wnext=0),he.whave>>8&255,M.check=l(M.check,ot,2,0),ze=De=0,M.mode=2;break}if(M.flags=0,M.head&&(M.head.done=!1),!(1&M.wrap)||(((255&De)<<8)+(De>>8))%31){q.msg="incorrect header check",M.mode=30;break}if((15&De)!=8){q.msg="unknown compression method",M.mode=30;break}if(ze-=4,ne=8+(15&(De>>>=4)),M.wbits===0)M.wbits=ne;else if(ne>M.wbits){q.msg="invalid window size",M.mode=30;break}M.dmax=1<>8&1),512&M.flags&&(ot[0]=255&De,ot[1]=De>>>8&255,M.check=l(M.check,ot,2,0)),ze=De=0,M.mode=3;case 3:for(;ze<32;){if(J===0)break e;J--,De+=te[he++]<>>8&255,ot[2]=De>>>16&255,ot[3]=De>>>24&255,M.check=l(M.check,ot,4,0)),ze=De=0,M.mode=4;case 4:for(;ze<16;){if(J===0)break e;J--,De+=te[he++]<>8),512&M.flags&&(ot[0]=255&De,ot[1]=De>>>8&255,M.check=l(M.check,ot,2,0)),ze=De=0,M.mode=5;case 5:if(1024&M.flags){for(;ze<16;){if(J===0)break e;J--,De+=te[he++]<>>8&255,M.check=l(M.check,ot,2,0)),ze=De=0}else M.head&&(M.head.extra=null);M.mode=6;case 6:if(1024&M.flags&&(J<(At=M.length)&&(At=J),At&&(M.head&&(ne=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),o.arraySet(M.head.extra,te,he,At,ne)),512&M.flags&&(M.check=l(M.check,te,At,he)),J-=At,he+=At,M.length-=At),M.length))break e;M.length=0,M.mode=7;case 7:if(2048&M.flags){if(J===0)break e;for(At=0;ne=te[he+At++],M.head&&ne&&M.length<65536&&(M.head.name+=String.fromCharCode(ne)),ne&&At>9&1,M.head.done=!0),q.adler=M.check=0,M.mode=12;break;case 10:for(;ze<32;){if(J===0)break e;J--,De+=te[he++]<>>=7&ze,ze-=7&ze,M.mode=27;break}for(;ze<3;){if(J===0)break e;J--,De+=te[he++]<>>=1)){case 0:M.mode=14;break;case 1:if(Y(M),M.mode=20,ae!==6)break;De>>>=2,ze-=2;break e;case 2:M.mode=17;break;case 3:q.msg="invalid block type",M.mode=30}De>>>=2,ze-=2;break;case 14:for(De>>>=7&ze,ze-=7&ze;ze<32;){if(J===0)break e;J--,De+=te[he++]<>>16^65535)){q.msg="invalid stored block lengths",M.mode=30;break}if(M.length=65535&De,ze=De=0,M.mode=15,ae===6)break e;case 15:M.mode=16;case 16:if(At=M.length){if(J>>=5,ze-=5,M.ndist=1+(31&De),De>>>=5,ze-=5,M.ncode=4+(15&De),De>>>=4,ze-=4,286>>=3,ze-=3}for(;M.have<19;)M.lens[$t[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,Dt={bits:M.lenbits},Pt=c(0,M.lens,0,19,M.lencode,0,M.work,Dt),M.lenbits=Dt.bits,Pt){q.msg="invalid code lengths set",M.mode=30;break}M.have=0,M.mode=19;case 19:for(;M.have>>16&255,xt=65535&Ae,!((Et=Ae>>>24)<=ze);){if(J===0)break e;J--,De+=te[he++]<>>=Et,ze-=Et,M.lens[M.have++]=xt;else{if(xt===16){for(Te=Et+2;ze>>=Et,ze-=Et,M.have===0){q.msg="invalid bit length repeat",M.mode=30;break}ne=M.lens[M.have-1],At=3+(3&De),De>>>=2,ze-=2}else if(xt===17){for(Te=Et+3;ze>>=Et)),De>>>=3,ze-=3}else{for(Te=Et+7;ze>>=Et)),De>>>=7,ze-=7}if(M.have+At>M.nlen+M.ndist){q.msg="invalid bit length repeat",M.mode=30;break}for(;At--;)M.lens[M.have++]=ne}}if(M.mode===30)break;if(M.lens[256]===0){q.msg="invalid code -- missing end-of-block",M.mode=30;break}if(M.lenbits=9,Dt={bits:M.lenbits},Pt=c(d,M.lens,0,M.nlen,M.lencode,0,M.work,Dt),M.lenbits=Dt.bits,Pt){q.msg="invalid literal/lengths set",M.mode=30;break}if(M.distbits=6,M.distcode=M.distdyn,Dt={bits:M.distbits},Pt=c(g,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,Dt),M.distbits=Dt.bits,Pt){q.msg="invalid distances set",M.mode=30;break}if(M.mode=20,ae===6)break e;case 20:M.mode=21;case 21:if(6<=J&&258<=ct){q.next_out=xe,q.avail_out=ct,q.next_in=he,q.avail_in=J,M.hold=De,M.bits=ze,u(q,Rt),xe=q.next_out,ue=q.output,ct=q.avail_out,he=q.next_in,te=q.input,J=q.avail_in,De=M.hold,ze=M.bits,M.mode===12&&(M.back=-1);break}for(M.back=0;St=(Ae=M.lencode[De&(1<>>16&255,xt=65535&Ae,!((Et=Ae>>>24)<=ze);){if(J===0)break e;J--,De+=te[he++]<>Ut)])>>>16&255,xt=65535&Ae,!(Ut+(Et=Ae>>>24)<=ze);){if(J===0)break e;J--,De+=te[he++]<>>=Ut,ze-=Ut,M.back+=Ut}if(De>>>=Et,ze-=Et,M.back+=Et,M.length=xt,St===0){M.mode=26;break}if(32&St){M.back=-1,M.mode=12;break}if(64&St){q.msg="invalid literal/length code",M.mode=30;break}M.extra=15&St,M.mode=22;case 22:if(M.extra){for(Te=M.extra;ze>>=M.extra,ze-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=23;case 23:for(;St=(Ae=M.distcode[De&(1<>>16&255,xt=65535&Ae,!((Et=Ae>>>24)<=ze);){if(J===0)break e;J--,De+=te[he++]<>Ut)])>>>16&255,xt=65535&Ae,!(Ut+(Et=Ae>>>24)<=ze);){if(J===0)break e;J--,De+=te[he++]<>>=Ut,ze-=Ut,M.back+=Ut}if(De>>>=Et,ze-=Et,M.back+=Et,64&St){q.msg="invalid distance code",M.mode=30;break}M.offset=xt,M.extra=15&St,M.mode=24;case 24:if(M.extra){for(Te=M.extra;ze>>=M.extra,ze-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){q.msg="invalid distance too far back",M.mode=30;break}M.mode=25;case 25:if(ct===0)break e;if(At=Rt-ct,M.offset>At){if((At=M.offset-At)>M.whave&&M.sane){q.msg="invalid distance too far back",M.mode=30;break}Xt=At>M.wnext?(At-=M.wnext,M.wsize-At):M.wnext-At,At>M.length&&(At=M.length),vr=M.window}else vr=ue,Xt=xe-M.offset,At=M.length;for(ctV?(z=Xt[vr+_[ae]],ze[ir+_[ae]]):(z=96,0),A=1<>xe)+(B-=A)]=H<<24|z<<16|Y|0,B!==0;);for(A=1<>=1;if(A!==0?(De&=A-1,De+=A):De=0,ae++,--Rt[q]==0){if(q===te)break;q=g[x+_[ae]]}if(ue>>7)]}function ir(Ae,ot){Ae.pending_buf[Ae.pending++]=255&ot,Ae.pending_buf[Ae.pending++]=ot>>>8&255}function Rt(Ae,ot,$t){Ae.bi_valid>E-$t?(Ae.bi_buf|=ot<>E-Ae.bi_valid,Ae.bi_valid+=$t-E):(Ae.bi_buf|=ot<>>=1,$t<<=1,0<--ot;);return $t>>>1}function vr(Ae,ot,$t){var tr,Ot,br=new Array(_+1),be=0;for(tr=1;tr<=_;tr++)br[tr]=be=be+$t[tr-1]<<1;for(Ot=0;Ot<=ot;Ot++){var se=Ae[2*Ot+1];se!==0&&(Ae[2*Ot]=Xt(br[se]++,se))}}function Et(Ae){var ot;for(ot=0;ot>1;1<=$t;$t--)Ut(Ae,br,$t);for(Ot=ce;$t=Ae.heap[1],Ae.heap[1]=Ae.heap[Ae.heap_len--],Ut(Ae,br,1),tr=Ae.heap[1],Ae.heap[--Ae.heap_max]=$t,Ae.heap[--Ae.heap_max]=tr,br[2*Ot]=br[2*$t]+br[2*tr],Ae.depth[Ot]=(Ae.depth[$t]>=Ae.depth[tr]?Ae.depth[$t]:Ae.depth[tr])+1,br[2*$t+1]=br[2*tr+1]=Ot,Ae.heap[1]=Ot++,Ut(Ae,br,1),2<=Ae.heap_len;);Ae.heap[--Ae.heap_max]=Ae.heap[1],function(C,R){var Q,me,je,lt,ur,Dr,hr=R.dyn_tree,Rr=R.max_code,Gr=R.stat_desc.static_tree,Nr=R.stat_desc.has_stree,Vn=R.stat_desc.extra_bits,An=R.stat_desc.extra_base,Tn=R.stat_desc.max_length,ht=0;for(lt=0;lt<=_;lt++)C.bl_count[lt]=0;for(hr[2*C.heap[C.heap_max]+1]=0,Q=C.heap_max+1;Q>=7;Ot>>=1)if(1&$&&se.dyn_ltree[2*ce]!==0)return s;if(se.dyn_ltree[18]!==0||se.dyn_ltree[20]!==0||se.dyn_ltree[26]!==0)return l;for(ce=32;ce>>3,(br=Ae.static_len+3+7>>>3)<=Ot&&(Ot=br)):Ot=br=$t+5,$t+4<=Ot&&ot!==-1?Te(Ae,ot,$t,tr):Ae.strategy===4||br===Ot?(Rt(Ae,2+(tr?1:0),3),Gt(Ae,oe,q)):(Rt(Ae,4+(tr?1:0),3),function(se,ce,$,C){var R;for(Rt(se,ce-257,5),Rt(se,$-1,5),Rt(se,C-4,4),R=0;R>>8&255,Ae.pending_buf[Ae.d_buf+2*Ae.last_lit+1]=255&ot,Ae.pending_buf[Ae.l_buf+Ae.last_lit]=255&$t,Ae.last_lit++,ot===0?Ae.dyn_ltree[2*$t]++:(Ae.matches++,ot--,Ae.dyn_ltree[2*(M[$t]+g+1)]++,Ae.dyn_dtree[2*ze(ot)]++),Ae.last_lit===Ae.lit_bufsize-1},a._tr_align=function(Ae){Rt(Ae,2,3),At(Ae,B,oe),function(ot){ot.bi_valid===16?(ir(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)}(Ae)}},{"../utils/common":41}],53:[function(r,i,a){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,i,a){(function(o){(function(s,l){if(!s.setImmediate){var u,c,d,g,x=1,w={},v=!1,y=s.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(s);_=_&&_.setTimeout?_:s,u={}.toString.call(s.process)==="[object process]"?function(U){process.nextTick(function(){A(U)})}:function(){if(s.postMessage&&!s.importScripts){var U=!0,L=s.onmessage;return s.onmessage=function(){U=!1},s.postMessage("","*"),s.onmessage=L,U}}()?(g="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",B,!1):s.attachEvent("onmessage",B),function(U){s.postMessage(g+U,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(U){A(U.data)},function(U){d.port2.postMessage(U)}):y&&"onreadystatechange"in y.createElement("script")?(c=y.documentElement,function(U){var L=y.createElement("script");L.onreadystatechange=function(){A(U),L.onreadystatechange=null,c.removeChild(L),L=null},c.appendChild(L)}):function(U){setTimeout(A,0,U)},_.setImmediate=function(U){typeof U!="function"&&(U=new Function(""+U));for(var L=new Array(arguments.length-1),K=0;K"u"?o===void 0?this:o:self)}).call(this,typeof xn<"u"?xn:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(JL);const Kve=JL.exports;var eN={exports:{}};(function(e,t){(function(r,i){i()})(xn,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,d,g){var x=new XMLHttpRequest;x.open("GET",c),x.responseType="blob",x.onload=function(){u(x.response,d,g)},x.onerror=function(){console.error("could not download file")},x.send()}function a(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function o(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof xn=="object"&&xn.global===xn?xn:void 0,l=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(c,d,g){var x=s.URL||s.webkitURL,w=document.createElement("a");d=d||c.name||"download",w.download=d,w.rel="noopener",typeof c=="string"?(w.href=c,w.origin===location.origin?o(w):a(w.href)?i(c,d,g):o(w,w.target="_blank")):(w.href=x.createObjectURL(c),setTimeout(function(){x.revokeObjectURL(w.href)},4e4),setTimeout(function(){o(w)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,g){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,g),d);else if(a(c))i(c,d,g);else{var x=document.createElement("a");x.href=c,x.target="_blank",setTimeout(function(){o(x)})}}:function(c,d,g,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof c=="string")return i(c,d,g);var w=c.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||w&&v||l)&&typeof FileReader<"u"){var _=new FileReader;_.onloadend=function(){var B=_.result;B=y?B:B.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=B:location=B,x=null},_.readAsDataURL(c)}else{var E=s.URL||s.webkitURL,A=E.createObjectURL(c);x?x.location=A:location.href=A,x=null,setTimeout(function(){E.revokeObjectURL(A)},4e4)}});s.saveAs=u.saveAs=u,e.exports=u})})(eN);const Gve=eN.exports;function Yve(e){const t=new Kve;e.map(r=>t.file(r.name,r.content)),t.generateAsync({type:"blob"}).then(function(r){Gve.saveAs(r,"sources.zip")})}const Qve=ar(Io)({fontSize:14,fontWeight:700}),Xve=ar(Io)({fontSize:12,color:"#949597"}),tN=ar(Cn)({border:"1px solid #D9D9D988",overflow:"hidden",borderRadius:14,width:"100%",paddingBottom:6}),uc=ar(Cn)({display:"flex",flexDirection:"column"}),ox=ar(Cn)({display:"flex",flexDirection:"row",alignItems:"center"}),rN=ar(ox)({background:"#F7F9FB",padding:"14px 20px"}),nN=ar(uc)({fontSize:14}),l5=ar(jC)({padding:"10px 6px",borderBottom:0}),iN=ar(Cn)({border:"1px solid #D8D8D8",background:"white",borderRadius:6,padding:"0px 10px",fontSize:12,textAlign:"center",display:"inline-block","&:hover":{border:"1px solid #b0b0b0"}}),Zve=ar(Cn)({borderRadius:10,padding:"10px 14px",whiteSpace:"break-spaces",wordBreak:"break-all","&:hover":{background:"#f8f8f8"}}),Jve=ar("input")({display:"flex",alignItems:"center",paddingLeft:10,width:"100%",boxSizing:"border-box",height:40,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),e1e=ar("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}});var oN={exports:{}};(function(e,t){var r=r!==void 0?r:{},i=function(){var a,o=typeof window=="object"?{currentScript:window.document.currentScript}:null;class s{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(u){return a||(r=Object.assign({},r,u),a=new Promise(c=>{var d,g={};for(d in r)r.hasOwnProperty(d)&&(g[d]=r[d]);var x,w,v=[],y="./this.program",_=function(qe,Ce){throw Ce},E=!1,A=!1;E=typeof window=="object",A=typeof importScripts=="function",x=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",w=!E&&!x&&!A;var B,U,L,K,V,H="";x?(H=A?sm.dirname(H)+"/":__dirname+"/",B=function(qe,Ce){return K||(K=sm),V||(V=sm),qe=V.normalize(qe),K.readFileSync(qe,Ce?null:"utf8")},L=function(qe){var Ce=B(qe,!0);return Ce.buffer||(Ce=new Uint8Array(Ce)),De(Ce.buffer),Ce},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),v=process.argv.slice(2),e.exports=r,_=function(qe){process.exit(qe)},r.inspect=function(){return"[Emscripten Module object]"}):w?(typeof read<"u"&&(B=function(qe){return read(qe)}),L=function(qe){var Ce;return typeof readbuffer=="function"?new Uint8Array(readbuffer(qe)):(De(typeof(Ce=read(qe,"binary"))=="object"),Ce)},typeof scriptArgs<"u"?v=scriptArgs:arguments!==void 0&&(v=arguments),typeof quit=="function"&&(_=function(qe){quit(qe)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(E||A)&&(A?H=self.location.href:o!==void 0&&o.currentScript&&(H=o.currentScript.src),H=H.indexOf("blob:")!==0?H.substr(0,H.lastIndexOf("/")+1):"",B=function(qe){var Ce=new XMLHttpRequest;return Ce.open("GET",qe,!1),Ce.send(null),Ce.responseText},A&&(L=function(qe){var Ce=new XMLHttpRequest;return Ce.open("GET",qe,!1),Ce.responseType="arraybuffer",Ce.send(null),new Uint8Array(Ce.response)}),U=function(qe,Ce,Ye){var Ft=new XMLHttpRequest;Ft.open("GET",qe,!0),Ft.responseType="arraybuffer",Ft.onload=function(){Ft.status==200||Ft.status==0&&Ft.response?Ce(Ft.response):Ye()},Ft.onerror=Ye,Ft.send(null)}),r.print||console.log.bind(console);var z=r.printErr||console.warn.bind(console);for(d in g)g.hasOwnProperty(d)&&(r[d]=g[d]);g=null,r.arguments&&(v=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(_=r.quit);var Y=16,oe,q=[];function ae(qe,Ce){if(!oe){oe=new WeakMap;for(var Ye=0;Ye>0]=Ce;break;case"i16":Xt[qe>>1]=Ce;break;case"i32":vr[qe>>2]=Ce;break;case"i64":je=[Ce>>>0,(me=Ce,+Math.abs(me)>=1?me>0?(0|Math.min(+Math.floor(me/4294967296),4294967295))>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],vr[qe>>2]=je[0],vr[qe+4>>2]=je[1];break;case"float":Et[qe>>2]=Ce;break;case"double":St[qe>>3]=Ce;break;default:R("invalid type for setValue: "+Ye)}}function J(qe,Ce,Ye){switch((Ce=Ce||"i8").charAt(Ce.length-1)==="*"&&(Ce="i32"),Ce){case"i1":case"i8":return Rt[qe>>0];case"i16":return Xt[qe>>1];case"i32":case"i64":return vr[qe>>2];case"float":return Et[qe>>2];case"double":return St[qe>>3];default:R("invalid type for getValue: "+Ce)}return null}typeof WebAssembly!="object"&&R("no native wasm support detected");var ct=!1;function De(qe,Ce){qe||R("Assertion failed: "+Ce)}var ze=1,ir,Rt,At,Xt,vr,Et,St,xt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ut(qe,Ce,Ye){for(var Ft=Ce+Ye,nr=Ce;qe[nr]&&!(nr>=Ft);)++nr;if(nr-Ce>16&&qe.subarray&&xt)return xt.decode(qe.subarray(Ce,nr));for(var Er="";Ce>10,56320|1023&gi)}}else Er+=String.fromCharCode((31&$r)<<6|Vr)}else Er+=String.fromCharCode($r)}return Er}function Gt(qe,Ce){return qe?Ut(At,qe,Ce):""}function mr(qe,Ce,Ye,Ft){if(!(Ft>0))return 0;for(var nr=Ye,Er=Ye+Ft-1,$r=0;$r=55296&&Vr<=57343&&(Vr=65536+((1023&Vr)<<10)|1023&qe.charCodeAt(++$r)),Vr<=127){if(Ye>=Er)break;Ce[Ye++]=Vr}else if(Vr<=2047){if(Ye+1>=Er)break;Ce[Ye++]=192|Vr>>6,Ce[Ye++]=128|63&Vr}else if(Vr<=65535){if(Ye+2>=Er)break;Ce[Ye++]=224|Vr>>12,Ce[Ye++]=128|Vr>>6&63,Ce[Ye++]=128|63&Vr}else{if(Ye+3>=Er)break;Ce[Ye++]=240|Vr>>18,Ce[Ye++]=128|Vr>>12&63,Ce[Ye++]=128|Vr>>6&63,Ce[Ye++]=128|63&Vr}}return Ce[Ye]=0,Ye-nr}function ne(qe,Ce,Ye){return mr(qe,At,Ce,Ye)}function Pt(qe){for(var Ce=0,Ye=0;Ye=55296&&Ft<=57343&&(Ft=65536+((1023&Ft)<<10)|1023&qe.charCodeAt(++Ye)),Ft<=127?++Ce:Ce+=Ft<=2047?2:Ft<=65535?3:4}return Ce}function Dt(qe){var Ce=Pt(qe)+1,Ye=lr(Ce);return mr(qe,Rt,Ye,Ce),Ye}function Te(qe){ir=qe,r.HEAP8=Rt=new Int8Array(qe),r.HEAP16=Xt=new Int16Array(qe),r.HEAP32=vr=new Int32Array(qe),r.HEAPU8=At=new Uint8Array(qe),r.HEAPU16=new Uint16Array(qe),r.HEAPU32=new Uint32Array(qe),r.HEAPF32=Et=new Float32Array(qe),r.HEAPF64=St=new Float64Array(qe)}var Ae=r.INITIAL_MEMORY||33554432;(ue=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:Ae/65536,maximum:32768}))&&(ir=ue.buffer),Ae=ir.byteLength,Te(ir);var ot=new WebAssembly.Table({initial:20,element:"anyfunc"}),$t=[],tr=[],Ot=[],br=[],be=!1,se=0,ce=null;function $(qe){se++,r.monitorRunDependencies&&r.monitorRunDependencies(se)}function C(qe){if(se--,r.monitorRunDependencies&&r.monitorRunDependencies(se),se==0&&ce){var Ce=ce;ce=null,Ce()}}function R(qe){throw r.onAbort&&r.onAbort(qe),z(qe+=""),ct=!0,qe="abort("+qe+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(qe)}r.preloadedImages={},r.preloadedAudios={},r.preloadedWasm={};var Q,me,je,lt="data:application/octet-stream;base64,";function ur(qe){return qe.startsWith(lt)}function Dr(qe){return qe.startsWith("file://")}function hr(qe){try{if(qe==Q&&M)return new Uint8Array(M);if(L)return L(qe);throw"both async and sync fetching of the wasm failed"}catch(Ce){R(Ce)}}ur(Q="tree-sitter.wasm")||(Q=function(qe){return r.locateFile?r.locateFile(qe,H):H+qe}(Q));var Rr={},Gr={get:function(qe,Ce){return Rr[Ce]||(Rr[Ce]=new WebAssembly.Global({value:"i32",mutable:!0})),Rr[Ce]}};function Nr(qe){for(;qe.length>0;){var Ce=qe.shift();if(typeof Ce!="function"){var Ye=Ce.func;typeof Ye=="number"?Ce.arg===void 0?ot.get(Ye)():ot.get(Ye)(Ce.arg):Ye(Ce.arg===void 0?null:Ce.arg)}else Ce(r)}}function Vn(qe){var Ce=0;function Ye(){for(var Wn=0,vi=1;;){var oo=qe[Ce++];if(Wn+=(127&oo)*vi,vi*=128,!(128&oo))break}return Wn}if(qe instanceof WebAssembly.Module){var Ft=WebAssembly.Module.customSections(qe,"dylink");De(Ft.length!=0,"need dylink section"),qe=new Int8Array(Ft[0])}else De(new Uint32Array(new Uint8Array(qe.subarray(0,24)).buffer)[0]==1836278016,"need to see wasm magic number"),De(qe[8]===0,"need the dylink section to be first"),Ce=9,Ye(),De(qe[Ce]===6),De(qe[++Ce]==="d".charCodeAt(0)),De(qe[++Ce]==="y".charCodeAt(0)),De(qe[++Ce]==="l".charCodeAt(0)),De(qe[++Ce]==="i".charCodeAt(0)),De(qe[++Ce]==="n".charCodeAt(0)),De(qe[++Ce]==="k".charCodeAt(0)),Ce++;var nr={};nr.memorySize=Ye(),nr.memoryAlign=Ye(),nr.tableSize=Ye(),nr.tableAlign=Ye();var Er=Ye();nr.neededDynlibs=[];for(var $r=0;$r0}function ht(qe){return qe.indexOf("dynCall_")==0||["stackAlloc","stackSave","stackRestore"].includes(qe)?qe:"_"+qe}function Ci(qe,Ce){for(var Ye in qe)if(qe.hasOwnProperty(Ye)){ge.hasOwnProperty(Ye)||(ge[Ye]=qe[Ye]);var Ft=ht(Ye);r.hasOwnProperty(Ft)||(r[Ft]=qe[Ye])}}var qn={nextHandle:1,loadedLibs:{},loadedLibNames:{}};function Ii(qe,Ce,Ye){return qe.includes("j")?function(Ft,nr,Er){var $r=r["dynCall_"+Ft];return Er&&Er.length?$r.apply(null,[nr].concat(Er)):$r.call(null,nr)}(qe,Ce,Ye):ot.get(Ce).apply(null,Ye)}var Xi=5251072;function Ho(qe){return["__cpp_exception","__wasm_apply_data_relocs","__dso_handle","__set_stack_limits"].includes(qe)}function Zi(qe,Ce){var Ye={};for(var Ft in qe){var nr=qe[Ft];typeof nr=="object"&&(nr=nr.value),typeof nr=="number"&&(nr+=Ce),Ye[Ft]=nr}return function(Er){for(var $r in Er)if(!Ho($r)){var Vr=!1,fn=Er[$r];$r.startsWith("orig$")&&($r=$r.split("$")[1],Vr=!0),Rr[$r]||(Rr[$r]=new WebAssembly.Global({value:"i32",mutable:!0})),(Vr||Rr[$r].value==0)&&(typeof fn=="function"?Rr[$r].value=ae(fn):typeof fn=="number"?Rr[$r].value=fn:z("unhandled export type for `"+$r+"`: "+typeof fn))}}(Ye),Ye}function Ro(qe,Ce){var Ye,Ft;return Ce&&(Ye=ge["orig$"+qe]),Ye||(Ye=ge[qe]),Ye||(Ye=r[ht(qe)]),!Ye&&qe.startsWith("invoke_")&&(Ft=qe.split("_")[1],Ye=function(){var nr=st();try{return Ii(Ft,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Er){if(yr(nr),Er!==Er+0&&Er!=="longjmp")throw Er;Or(1,0)}}),Ye}function zi(qe,Ce){var Ye=Vn(qe);function Ft(){var nr=Math.pow(2,Ye.memoryAlign);nr=Math.max(nr,Y);var Er,$r,Vr,fn=(Er=function(Pi){if(be)return Pe(Pi);var Ni=Xi,Bn=Ni+Pi+15&-16;return Xi=Bn,Rr.__heap_base.value=Bn,Ni}(Ye.memorySize+nr),($r=nr)||($r=Y),Math.ceil(Er/$r)*$r),gi=ot.length;ot.grow(Ye.tableSize);for(var Wn=fn;Wn>2]=Ft,-1;Ye=Ie()}return vr[Ce>>2]=Ye/1e3|0,vr[Ce+4>>2]=Ye%1e3*1e3*1e3|0,0}function or(qe){try{return ue.grow(qe-ir.byteLength+65535>>>16),Te(ue.buffer),1}catch{}}function Br(qe){_n(qe)}Qt.sig="iii",Br.sig="vi";var Hr={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(qe,Ce,Ye){if(Ce[0]==="/")return Ce;var Ft;if(qe===-100)Ft=FS.cwd();else{var nr=FS.getStream(qe);if(!nr)throw new FS.ErrnoError(8);Ft=nr.path}if(Ce.length==0){if(!Ye)throw new FS.ErrnoError(44);return Ft}return PATH.join2(Ft,Ce)},doStat:function(qe,Ce,Ye){try{var Ft=qe(Ce)}catch(nr){if(nr&&nr.node&&PATH.normalize(Ce)!==PATH.normalize(FS.getPath(nr.node)))return-54;throw nr}return vr[Ye>>2]=Ft.dev,vr[Ye+4>>2]=0,vr[Ye+8>>2]=Ft.ino,vr[Ye+12>>2]=Ft.mode,vr[Ye+16>>2]=Ft.nlink,vr[Ye+20>>2]=Ft.uid,vr[Ye+24>>2]=Ft.gid,vr[Ye+28>>2]=Ft.rdev,vr[Ye+32>>2]=0,je=[Ft.size>>>0,(me=Ft.size,+Math.abs(me)>=1?me>0?(0|Math.min(+Math.floor(me/4294967296),4294967295))>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],vr[Ye+40>>2]=je[0],vr[Ye+44>>2]=je[1],vr[Ye+48>>2]=4096,vr[Ye+52>>2]=Ft.blocks,vr[Ye+56>>2]=Ft.atime.getTime()/1e3|0,vr[Ye+60>>2]=0,vr[Ye+64>>2]=Ft.mtime.getTime()/1e3|0,vr[Ye+68>>2]=0,vr[Ye+72>>2]=Ft.ctime.getTime()/1e3|0,vr[Ye+76>>2]=0,je=[Ft.ino>>>0,(me=Ft.ino,+Math.abs(me)>=1?me>0?(0|Math.min(+Math.floor(me/4294967296),4294967295))>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],vr[Ye+80>>2]=je[0],vr[Ye+84>>2]=je[1],0},doMsync:function(qe,Ce,Ye,Ft,nr){var Er=At.slice(qe,qe+Ye);FS.msync(Ce,Er,nr,Ye,Ft)},doMkdir:function(qe,Ce){return(qe=PATH.normalize(qe))[qe.length-1]==="/"&&(qe=qe.substr(0,qe.length-1)),FS.mkdir(qe,Ce,0),0},doMknod:function(qe,Ce,Ye){switch(61440&Ce){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(qe,Ce,Ye),0},doReadlink:function(qe,Ce,Ye){if(Ye<=0)return-28;var Ft=FS.readlink(qe),nr=Math.min(Ye,Pt(Ft)),Er=Rt[Ce+nr];return ne(Ft,Ce,Ye+1),Rt[Ce+nr]=Er,nr},doAccess:function(qe,Ce){if(-8&Ce)return-28;var Ye;if(!(Ye=FS.lookupPath(qe,{follow:!0}).node))return-44;var Ft="";return 4&Ce&&(Ft+="r"),2&Ce&&(Ft+="w"),1&Ce&&(Ft+="x"),Ft&&FS.nodePermissions(Ye,Ft)?-2:0},doDup:function(qe,Ce,Ye){var Ft=FS.getStream(Ye);return Ft&&FS.close(Ft),FS.open(qe,Ce,0,Ye,Ye).fd},doReadv:function(qe,Ce,Ye,Ft){for(var nr=0,Er=0;Er>2],Vr=vr[Ce+(8*Er+4)>>2],fn=FS.read(qe,Rt,$r,Vr,Ft);if(fn<0)return-1;if(nr+=fn,fn>2],Vr=vr[Ce+(8*Er+4)>>2],fn=FS.write(qe,Rt,$r,Vr,Ft);if(fn<0)return-1;nr+=fn}return nr},varargs:void 0,get:function(){return Hr.varargs+=4,vr[Hr.varargs-4>>2]},getStr:function(qe){return Gt(qe)},getStreamFromFD:function(qe){var Ce=FS.getStream(qe);if(!Ce)throw new FS.ErrnoError(8);return Ce},get64:function(qe,Ce){return qe}};function kn(qe){try{var Ce=Hr.getStreamFromFD(qe);return FS.close(Ce),0}catch(Ye){return typeof FS<"u"&&Ye instanceof FS.ErrnoError||R(Ye),Ye.errno}}function un(qe,Ce,Ye,Ft){try{var nr=Hr.getStreamFromFD(qe),Er=Hr.doWritev(nr,Ce,Ye);return vr[Ft>>2]=Er,0}catch($r){return typeof FS<"u"&&$r instanceof FS.ErrnoError||R($r),$r.errno}}function gt(qe){}kn.sig="ii",un.sig="iiiii",gt.sig="vi";var W,ge={__heap_base:Xi,__indirect_function_table:ot,__memory_base:1024,__stack_pointer:Ee,__table_base:1,abort:F,clock_gettime:Qt,emscripten_memcpy_big:function(qe,Ce,Ye){At.copyWithin(qe,Ce,Ce+Ye)},emscripten_resize_heap:function(qe){var Ce,Ye,Ft=At.length;if((qe>>>=0)>2147483648)return!1;for(var nr=1;nr<=4;nr*=2){var Er=Ft*(1+.2/nr);if(Er=Math.min(Er,qe+100663296),or(Math.min(2147483648,((Ce=Math.max(qe,Er))%(Ye=65536)>0&&(Ce+=Ye-Ce%Ye),Ce))))return!0}return!1},exit:Br,fd_close:kn,fd_seek:function(qe,Ce,Ye,Ft,nr){try{var Er=Hr.getStreamFromFD(qe),$r=4294967296*Ye+(Ce>>>0);return $r<=-9007199254740992||$r>=9007199254740992?-61:(FS.llseek(Er,$r,Ft),je=[Er.position>>>0,(me=Er.position,+Math.abs(me)>=1?me>0?(0|Math.min(+Math.floor(me/4294967296),4294967295))>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],vr[nr>>2]=je[0],vr[nr+4>>2]=je[1],Er.getdents&&$r===0&&Ft===0&&(Er.getdents=null),0)}catch(Vr){return typeof FS<"u"&&Vr instanceof FS.ErrnoError||R(Vr),Vr.errno}},fd_write:un,memory:ue,setTempRet0:gt,tree_sitter_log_callback:function(qe,Ce){if(Gn){const Ye=Gt(Ce);Gn(Ye,qe!==0)}},tree_sitter_parse_callback:function(qe,Ce,Ye,Ft,nr){var Er=hi(Ce,{row:Ye,column:Ft});typeof Er=="string"?(xe(nr,Er.length,"i32"),function($r,Vr,fn){if(fn===void 0&&(fn=2147483647),fn<2)return 0;for(var gi=(fn-=2)<2*$r.length?fn/2:$r.length,Wn=0;Wn>1]=vi,Vr+=2}Xt[Vr>>1]=0}(Er,qe,10240)):xe(nr,0,"i32")}},Pe=(function(){var qe={env:ge,wasi_snapshot_preview1:ge,"GOT.mem":new Proxy(ge,Gr),"GOT.func":new Proxy(ge,Gr)};function Ce(nr,Er){var $r=nr.exports;$r=Zi($r,1024),r.asm=$r;var Vr,fn=Vn(Er);fn.neededDynlibs&&(te=fn.neededDynlibs.concat(te)),Ci($r),Vr=r.asm.__wasm_call_ctors,tr.unshift(Vr),C()}function Ye(nr){Ce(nr.instance,nr.module)}function Ft(nr){return function(){if(!M&&(E||A)){if(typeof fetch=="function"&&!Dr(Q))return fetch(Q,{credentials:"same-origin"}).then(function(Er){if(!Er.ok)throw"failed to load wasm binary file at '"+Q+"'";return Er.arrayBuffer()}).catch(function(){return hr(Q)});if(U)return new Promise(function(Er,$r){U(Q,function(Vr){Er(new Uint8Array(Vr))},$r)})}return Promise.resolve().then(function(){return hr(Q)})}().then(function(Er){return WebAssembly.instantiate(Er,qe)}).then(nr,function(Er){z("failed to asynchronously prepare wasm: "+Er),R(Er)})}if($(),r.instantiateWasm)try{return r.instantiateWasm(qe,Ce)}catch(nr){return z("Module.instantiateWasm callback failed with error: "+nr),!1}M||typeof WebAssembly.instantiateStreaming!="function"||ur(Q)||Dr(Q)||typeof fetch!="function"?Ft(Ye):fetch(Q,{credentials:"same-origin"}).then(function(nr){return WebAssembly.instantiateStreaming(nr,qe).then(Ye,function(Er){return z("wasm streaming compile failed: "+Er),z("falling back to ArrayBuffer instantiation"),Ft(Ye)})})}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r._malloc=function(){return(Pe=r._malloc=r.asm.malloc).apply(null,arguments)}),tt=(r._calloc=function(){return(r._calloc=r.asm.calloc).apply(null,arguments)},r._realloc=function(){return(r._realloc=r.asm.realloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},r._ts_language_symbol_count=function(){return(r._ts_language_symbol_count=r.asm.ts_language_symbol_count).apply(null,arguments)},r._ts_language_version=function(){return(r._ts_language_version=r.asm.ts_language_version).apply(null,arguments)},r._ts_language_field_count=function(){return(r._ts_language_field_count=r.asm.ts_language_field_count).apply(null,arguments)},r._ts_language_symbol_name=function(){return(r._ts_language_symbol_name=r.asm.ts_language_symbol_name).apply(null,arguments)},r._ts_language_symbol_for_name=function(){return(r._ts_language_symbol_for_name=r.asm.ts_language_symbol_for_name).apply(null,arguments)},r._ts_language_symbol_type=function(){return(r._ts_language_symbol_type=r.asm.ts_language_symbol_type).apply(null,arguments)},r._ts_language_field_name_for_id=function(){return(r._ts_language_field_name_for_id=r.asm.ts_language_field_name_for_id).apply(null,arguments)},r._memcpy=function(){return(r._memcpy=r.asm.memcpy).apply(null,arguments)},r._ts_parser_delete=function(){return(r._ts_parser_delete=r.asm.ts_parser_delete).apply(null,arguments)},r._ts_parser_reset=function(){return(r._ts_parser_reset=r.asm.ts_parser_reset).apply(null,arguments)},r._ts_parser_set_language=function(){return(r._ts_parser_set_language=r.asm.ts_parser_set_language).apply(null,arguments)},r._ts_parser_timeout_micros=function(){return(r._ts_parser_timeout_micros=r.asm.ts_parser_timeout_micros).apply(null,arguments)},r._ts_parser_set_timeout_micros=function(){return(r._ts_parser_set_timeout_micros=r.asm.ts_parser_set_timeout_micros).apply(null,arguments)},r._memmove=function(){return(r._memmove=r.asm.memmove).apply(null,arguments)},r._memcmp=function(){return(r._memcmp=r.asm.memcmp).apply(null,arguments)},r._ts_query_new=function(){return(r._ts_query_new=r.asm.ts_query_new).apply(null,arguments)},r._ts_query_delete=function(){return(r._ts_query_delete=r.asm.ts_query_delete).apply(null,arguments)},r._iswspace=function(){return(r._iswspace=r.asm.iswspace).apply(null,arguments)},r._iswalnum=function(){return(r._iswalnum=r.asm.iswalnum).apply(null,arguments)},r._ts_query_pattern_count=function(){return(r._ts_query_pattern_count=r.asm.ts_query_pattern_count).apply(null,arguments)},r._ts_query_capture_count=function(){return(r._ts_query_capture_count=r.asm.ts_query_capture_count).apply(null,arguments)},r._ts_query_string_count=function(){return(r._ts_query_string_count=r.asm.ts_query_string_count).apply(null,arguments)},r._ts_query_capture_name_for_id=function(){return(r._ts_query_capture_name_for_id=r.asm.ts_query_capture_name_for_id).apply(null,arguments)},r._ts_query_string_value_for_id=function(){return(r._ts_query_string_value_for_id=r.asm.ts_query_string_value_for_id).apply(null,arguments)},r._ts_query_predicates_for_pattern=function(){return(r._ts_query_predicates_for_pattern=r.asm.ts_query_predicates_for_pattern).apply(null,arguments)},r._ts_tree_copy=function(){return(r._ts_tree_copy=r.asm.ts_tree_copy).apply(null,arguments)},r._ts_tree_delete=function(){return(r._ts_tree_delete=r.asm.ts_tree_delete).apply(null,arguments)},r._ts_init=function(){return(r._ts_init=r.asm.ts_init).apply(null,arguments)},r._ts_parser_new_wasm=function(){return(r._ts_parser_new_wasm=r.asm.ts_parser_new_wasm).apply(null,arguments)},r._ts_parser_enable_logger_wasm=function(){return(r._ts_parser_enable_logger_wasm=r.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},r._ts_parser_parse_wasm=function(){return(r._ts_parser_parse_wasm=r.asm.ts_parser_parse_wasm).apply(null,arguments)},r._ts_language_type_is_named_wasm=function(){return(r._ts_language_type_is_named_wasm=r.asm.ts_language_type_is_named_wasm).apply(null,arguments)},r._ts_language_type_is_visible_wasm=function(){return(r._ts_language_type_is_visible_wasm=r.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},r._ts_tree_root_node_wasm=function(){return(r._ts_tree_root_node_wasm=r.asm.ts_tree_root_node_wasm).apply(null,arguments)},r._ts_tree_edit_wasm=function(){return(r._ts_tree_edit_wasm=r.asm.ts_tree_edit_wasm).apply(null,arguments)},r._ts_tree_get_changed_ranges_wasm=function(){return(r._ts_tree_get_changed_ranges_wasm=r.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},r._ts_tree_cursor_new_wasm=function(){return(r._ts_tree_cursor_new_wasm=r.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},r._ts_tree_cursor_delete_wasm=function(){return(r._ts_tree_cursor_delete_wasm=r.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},r._ts_tree_cursor_reset_wasm=function(){return(r._ts_tree_cursor_reset_wasm=r.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_first_child_wasm=function(){return(r._ts_tree_cursor_goto_first_child_wasm=r.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_next_sibling_wasm=function(){return(r._ts_tree_cursor_goto_next_sibling_wasm=r.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},r._ts_tree_cursor_goto_parent_wasm=function(){return(r._ts_tree_cursor_goto_parent_wasm=r.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_type_id_wasm=function(){return(r._ts_tree_cursor_current_node_type_id_wasm=r.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_is_named_wasm=function(){return(r._ts_tree_cursor_current_node_is_named_wasm=r.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_is_missing_wasm=function(){return(r._ts_tree_cursor_current_node_is_missing_wasm=r.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_id_wasm=function(){return(r._ts_tree_cursor_current_node_id_wasm=r.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},r._ts_tree_cursor_start_position_wasm=function(){return(r._ts_tree_cursor_start_position_wasm=r.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},r._ts_tree_cursor_end_position_wasm=function(){return(r._ts_tree_cursor_end_position_wasm=r.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},r._ts_tree_cursor_start_index_wasm=function(){return(r._ts_tree_cursor_start_index_wasm=r.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},r._ts_tree_cursor_end_index_wasm=function(){return(r._ts_tree_cursor_end_index_wasm=r.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},r._ts_tree_cursor_current_field_id_wasm=function(){return(r._ts_tree_cursor_current_field_id_wasm=r.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},r._ts_tree_cursor_current_node_wasm=function(){return(r._ts_tree_cursor_current_node_wasm=r.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},r._ts_node_symbol_wasm=function(){return(r._ts_node_symbol_wasm=r.asm.ts_node_symbol_wasm).apply(null,arguments)},r._ts_node_child_count_wasm=function(){return(r._ts_node_child_count_wasm=r.asm.ts_node_child_count_wasm).apply(null,arguments)},r._ts_node_named_child_count_wasm=function(){return(r._ts_node_named_child_count_wasm=r.asm.ts_node_named_child_count_wasm).apply(null,arguments)},r._ts_node_child_wasm=function(){return(r._ts_node_child_wasm=r.asm.ts_node_child_wasm).apply(null,arguments)},r._ts_node_named_child_wasm=function(){return(r._ts_node_named_child_wasm=r.asm.ts_node_named_child_wasm).apply(null,arguments)},r._ts_node_child_by_field_id_wasm=function(){return(r._ts_node_child_by_field_id_wasm=r.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},r._ts_node_next_sibling_wasm=function(){return(r._ts_node_next_sibling_wasm=r.asm.ts_node_next_sibling_wasm).apply(null,arguments)},r._ts_node_prev_sibling_wasm=function(){return(r._ts_node_prev_sibling_wasm=r.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},r._ts_node_next_named_sibling_wasm=function(){return(r._ts_node_next_named_sibling_wasm=r.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},r._ts_node_prev_named_sibling_wasm=function(){return(r._ts_node_prev_named_sibling_wasm=r.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},r._ts_node_parent_wasm=function(){return(r._ts_node_parent_wasm=r.asm.ts_node_parent_wasm).apply(null,arguments)},r._ts_node_descendant_for_index_wasm=function(){return(r._ts_node_descendant_for_index_wasm=r.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},r._ts_node_named_descendant_for_index_wasm=function(){return(r._ts_node_named_descendant_for_index_wasm=r.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},r._ts_node_descendant_for_position_wasm=function(){return(r._ts_node_descendant_for_position_wasm=r.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},r._ts_node_named_descendant_for_position_wasm=function(){return(r._ts_node_named_descendant_for_position_wasm=r.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},r._ts_node_start_point_wasm=function(){return(r._ts_node_start_point_wasm=r.asm.ts_node_start_point_wasm).apply(null,arguments)},r._ts_node_end_point_wasm=function(){return(r._ts_node_end_point_wasm=r.asm.ts_node_end_point_wasm).apply(null,arguments)},r._ts_node_start_index_wasm=function(){return(r._ts_node_start_index_wasm=r.asm.ts_node_start_index_wasm).apply(null,arguments)},r._ts_node_end_index_wasm=function(){return(r._ts_node_end_index_wasm=r.asm.ts_node_end_index_wasm).apply(null,arguments)},r._ts_node_to_string_wasm=function(){return(r._ts_node_to_string_wasm=r.asm.ts_node_to_string_wasm).apply(null,arguments)},r._ts_node_children_wasm=function(){return(r._ts_node_children_wasm=r.asm.ts_node_children_wasm).apply(null,arguments)},r._ts_node_named_children_wasm=function(){return(r._ts_node_named_children_wasm=r.asm.ts_node_named_children_wasm).apply(null,arguments)},r._ts_node_descendants_of_type_wasm=function(){return(r._ts_node_descendants_of_type_wasm=r.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},r._ts_node_is_named_wasm=function(){return(r._ts_node_is_named_wasm=r.asm.ts_node_is_named_wasm).apply(null,arguments)},r._ts_node_has_changes_wasm=function(){return(r._ts_node_has_changes_wasm=r.asm.ts_node_has_changes_wasm).apply(null,arguments)},r._ts_node_has_error_wasm=function(){return(r._ts_node_has_error_wasm=r.asm.ts_node_has_error_wasm).apply(null,arguments)},r._ts_node_is_missing_wasm=function(){return(r._ts_node_is_missing_wasm=r.asm.ts_node_is_missing_wasm).apply(null,arguments)},r._ts_query_matches_wasm=function(){return(r._ts_query_matches_wasm=r.asm.ts_query_matches_wasm).apply(null,arguments)},r._ts_query_captures_wasm=function(){return(r._ts_query_captures_wasm=r.asm.ts_query_captures_wasm).apply(null,arguments)},r._iswdigit=function(){return(r._iswdigit=r.asm.iswdigit).apply(null,arguments)},r._iswalpha=function(){return(r._iswalpha=r.asm.iswalpha).apply(null,arguments)},r._iswlower=function(){return(r._iswlower=r.asm.iswlower).apply(null,arguments)},r._towupper=function(){return(r._towupper=r.asm.towupper).apply(null,arguments)},r.___errno_location=function(){return(tt=r.___errno_location=r.asm.__errno_location).apply(null,arguments)}),st=(r._memchr=function(){return(r._memchr=r.asm.memchr).apply(null,arguments)},r._strlen=function(){return(r._strlen=r.asm.strlen).apply(null,arguments)},r.stackSave=function(){return(st=r.stackSave=r.asm.stackSave).apply(null,arguments)}),yr=r.stackRestore=function(){return(yr=r.stackRestore=r.asm.stackRestore).apply(null,arguments)},lr=r.stackAlloc=function(){return(lr=r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},Or=r._setThrew=function(){return(Or=r._setThrew=r.asm.setThrew).apply(null,arguments)};r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},r.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(r.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=r.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(r.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=r.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=r.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(r.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=r.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},r.__Znwm=function(){return(r.__Znwm=r.asm._Znwm).apply(null,arguments)},r.__ZdlPv=function(){return(r.__ZdlPv=r.asm._ZdlPv).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r._orig$ts_parser_timeout_micros=function(){return(r._orig$ts_parser_timeout_micros=r.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},r._orig$ts_parser_set_timeout_micros=function(){return(r._orig$ts_parser_set_timeout_micros=r.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)};function Sr(qe){this.name="ExitStatus",this.message="Program terminated with exit("+qe+")",this.status=qe}r.allocate=function(qe,Ce){var Ye;return Ye=Ce==ze?lr(qe.length):Pe(qe.length),qe.subarray||qe.slice?At.set(qe,Ye):At.set(new Uint8Array(qe),Ye),Ye},ce=function qe(){W||on(),W||(ce=qe)};var Kr=!1;function on(qe){function Ce(){W||(W=!0,r.calledRun=!0,ct||(be=!0,Nr(tr),Nr(Ot),r.onRuntimeInitialized&&r.onRuntimeInitialized(),In&&function(Ye){var Ft=r._main;if(Ft){var nr=(Ye=Ye||[]).length+1,Er=lr(4*(nr+1));vr[Er>>2]=Dt(y);for(var $r=1;$r>2)+$r]=Dt(Ye[$r-1]);vr[(Er>>2)+nr]=0;try{_n(Ft(nr,Er),!0)}catch(fn){if(fn instanceof Sr||fn=="unwind")return;var Vr=fn;fn&&typeof fn=="object"&&fn.stack&&(Vr=[fn,fn.stack]),z("exception thrown: "+Vr),_(1,fn)}finally{}}}(qe),function(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Ye=r.postRun.shift(),br.unshift(Ye);var Ye;Nr(br)}()))}qe=qe||v,se>0||!Kr&&(function(){if(te.length){if(!L)return $(),void te.reduce(function(Ye,Ft){return Ye.then(function(){return ua(Ft,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){C(),le()});te.forEach(function(Ye){ua(Ye,{global:!0,nodelete:!0,allowUndefined:!0})}),le()}else le()}(),Kr=!0,se>0)||(function(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Ye=r.preRun.shift(),$t.unshift(Ye);var Ye;Nr($t)}(),se>0||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),Ce()},1)):Ce()))}function _n(qe,Ce){Ce&&Tn()&&qe===0||(Tn()||(r.onExit&&r.onExit(qe),ct=!0),_(qe,new Sr(qe)))}if(r.run=on,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();var In=!0;r.noInitialRun&&(In=!1),on();const rr=r,pr={},Vt=4,jr=5*Vt,Pr=2*Vt,Lr=2*Vt+2*Pr,Wr={row:0,column:0},$n=/[\w-.]*/g,Zn=1,di=2,ai=/^_?tree_sitter_\w+/;var _t,fi,cn,hi,Gn;class Ei{static init(){cn=rr._ts_init(),_t=J(cn,"i32"),fi=J(cn+Vt,"i32")}initialize(){rr._ts_parser_new_wasm(),this[0]=J(cn,"i32"),this[1]=J(cn+Vt,"i32")}delete(){rr._ts_parser_delete(this[0]),rr._free(this[1]),this[0]=0,this[1]=0}setLanguage(Ce){let Ye;if(Ce){if(Ce.constructor!==Ui)throw new Error("Argument must be a Language");{Ye=Ce[0];const Ft=rr._ts_language_version(Ye);if(FtCe.slice(fn,Wn);else{if(typeof Ce!="function")throw new Error("Argument must be a string or a function");hi=Ce}this.logCallback?(Gn=this.logCallback,rr._ts_parser_enable_logger_wasm(this[0],1)):(Gn=null,rr._ts_parser_enable_logger_wasm(this[0],0));let nr=0,Er=0;if(Ft&&Ft.includedRanges){nr=Ft.includedRanges.length;let fn=Er=rr._calloc(nr,Lr);for(let gi=0;gi0){let Er=Ft;for(let $r=0;$r0){let Ft=Ye;for(let nr=0;nr0){let Ft=Ye;for(let nr=0;nr0){let Wn=fn;for(let vi=0;vi>0];if(!Er)return nr;nr+=String.fromCharCode(Er)}}(Ce);return rr._free(Ce),Ye}}class Li{constructor(Ce,Ye){ko(Ce),this.tree=Ye,Ad(this)}delete(){xa(this),rr._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(Ce){Kn(Ce),xa(this,cn+jr),rr._ts_tree_cursor_reset_wasm(this.tree[0]),Ad(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return xa(this),rr._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return xa(this),rr._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return xa(this),rr._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return xa(this),rr._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){xa(this);const Ce=rr._ts_tree_cursor_start_index_wasm(this.tree[0]),Ye=rr._ts_tree_cursor_end_index_wasm(this.tree[0]);return vo(this.tree,Ce,Ye)}get startPosition(){return xa(this),rr._ts_tree_cursor_start_position_wasm(this.tree[0]),Td(cn)}get endPosition(){return xa(this),rr._ts_tree_cursor_end_position_wasm(this.tree[0]),Td(cn)}get startIndex(){return xa(this),rr._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return xa(this),rr._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return xa(this),rr._ts_tree_cursor_current_node_wasm(this.tree[0]),No(this.tree)}currentFieldId(){return xa(this),rr._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){xa(this);const Ce=rr._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return Ad(this),Ce===1}gotoNextSibling(){xa(this);const Ce=rr._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return Ad(this),Ce===1}gotoParent(){xa(this);const Ce=rr._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return Ad(this),Ce===1}}class Ui{constructor(Ce,Ye){ko(Ce),this[0]=Ye,this.types=new Array(rr._ts_language_symbol_count(this[0]));for(let Ft=0,nr=this.types.length;Ft0){if(Bn[0].type!=="string")throw new Error("Predicates must begin with a literal value");const Id=Bn[0].value;let yc=!0;switch(Id){case"not-eq?":yc=!1;case"eq?":if(Bn.length!==3)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${Bn.length-1}`);if(Bn[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${Bn[1].value}"`);if(Bn[2].type==="capture"){const wl=Bn[1].name,Pu=Bn[2].name;_a[ri].push(function(rp){let Mu,og;for(const np of rp)np.name===wl&&(Mu=np.node),np.name===Pu&&(og=np.node);return Mu===void 0||og===void 0||Mu.text===og.text===yc})}else{const wl=Bn[1].name,Pu=Bn[2].value;_a[ri].push(function(rp){for(const Mu of rp)if(Mu.name===wl)return Mu.node.text===Pu===yc;return!0})}break;case"not-match?":yc=!1;case"match?":if(Bn.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${Bn.length-1}.`);if(Bn[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${Bn[1].value}".`);if(Bn[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${Bn[2].value}.`);const gy=Bn[1].name,fx=new RegExp(Bn[2].value);_a[ri].push(function(wl){for(const Pu of wl)if(Pu.name===gy)return fx.test(Pu.node.text)===yc;return!0});break;case"set!":if(Bn.length<2||Bn.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${Bn.length-1}.`);if(Bn.some(wl=>wl.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');Wn[ri]||(Wn[ri]={}),Wn[ri][Bn[1].value]=Bn[2]?Bn[2].value:null;break;case"is?":case"is-not?":if(Bn.length<2||Bn.length>3)throw new Error(`Wrong number of arguments to \`#${Id}\` predicate. Expected 1 or 2. Got ${Bn.length-1}.`);if(Bn.some(wl=>wl.type!=="string"))throw new Error(`Arguments to \`#${Id}\` predicate must be a strings.".`);const tp=Id==="is?"?vi:oo;tp[ri]||(tp[ri]={}),tp[ri][Bn[1].value]=Bn[2]?Bn[2].value:null;break;default:Wo[ri].push({operator:Id,operands:Bn.slice(1)})}Bn.length=0}}Object.freeze(Wn[ri]),Object.freeze(vi[ri]),Object.freeze(oo[ri])}return rr._free(Ft),new yo(pr,nr,fn,_a,Wo,Object.freeze(Wn),Object.freeze(vi),Object.freeze(oo))}static load(Ce){let Ye;if(Ce instanceof Uint8Array)Ye=Promise.resolve(Ce);else{const nr=Ce;if(typeof process<"u"&&process.versions&&process.versions.node){const Er=sm;Ye=Promise.resolve(Er.readFileSync(nr))}else Ye=fetch(nr).then(Er=>Er.arrayBuffer().then($r=>{if(Er.ok)return new Uint8Array($r);{const Vr=new TextDecoder("utf-8").decode($r);throw new Error(`Language.load failed with status ${Er.status}. - -${Vr}`)}}))}const Ft=typeof loadSideModule=="function"?loadSideModule:zi;return Ye.then(nr=>Ft(nr,{loadAsync:!0})).then(nr=>{const Er=Object.keys(nr),$r=Er.find(fn=>ai.test(fn)&&!fn.includes("external_scanner_"));$r||console.log(`Couldn't find language function in WASM file. Symbols: -${JSON.stringify(Er,null,2)}`);const Vr=nr[$r]();return new Ui(pr,Vr)})}}class yo{constructor(Ce,Ye,Ft,nr,Er,$r,Vr,fn){ko(Ce),this[0]=Ye,this.captureNames=Ft,this.textPredicates=nr,this.predicates=Er,this.setProperties=$r,this.assertedProperties=Vr,this.refutedProperties=fn,this.exceededMatchLimit=!1}delete(){rr._ts_query_delete(this[0]),this[0]=0}matches(Ce,Ye,Ft,nr){Ye||(Ye=Wr),Ft||(Ft=Wr),nr||(nr={});let Er=nr.matchLimit;if(Er===void 0)Er=0;else if(typeof Er!="number")throw new Error("Arguments must be numbers");Kn(Ce),rr._ts_query_matches_wasm(this[0],Ce.tree[0],Ye.row,Ye.column,Ft.row,Ft.column,Er);const $r=J(cn,"i32"),Vr=J(cn+Vt,"i32"),fn=J(cn+2*Vt,"i32"),gi=new Array($r);this.exceededMatchLimit=!!fn;let Wn=0,vi=Vr;for(let oo=0;oo<$r;oo++){const Wo=J(vi,"i32"),_a=J(vi+=Vt,"i32");vi+=Vt;const ri=new Array(_a);if(vi=Lo(this,Ce.tree,vi,ri),this.textPredicates[Wo].every(Pi=>Pi(ri))){gi[Wn++]={pattern:Wo,captures:ri};const Pi=this.setProperties[Wo];Pi&&(gi[oo].setProperties=Pi);const Ni=this.assertedProperties[Wo];Ni&&(gi[oo].assertedProperties=Ni);const Bn=this.refutedProperties[Wo];Bn&&(gi[oo].refutedProperties=Bn)}}return gi.length=Wn,rr._free(Vr),gi}captures(Ce,Ye,Ft,nr){Ye||(Ye=Wr),Ft||(Ft=Wr),nr||(nr={});let Er=nr.matchLimit;if(Er===void 0)Er=0;else if(typeof Er!="number")throw new Error("Arguments must be numbers");Kn(Ce),rr._ts_query_captures_wasm(this[0],Ce.tree[0],Ye.row,Ye.column,Ft.row,Ft.column,Er);const $r=J(cn,"i32"),Vr=J(cn+Vt,"i32"),fn=J(cn+2*Vt,"i32"),gi=[];this.exceededMatchLimit=!!fn;const Wn=[];let vi=Vr;for(let oo=0;oo<$r;oo++){const Wo=J(vi,"i32"),_a=J(vi+=Vt,"i32"),ri=J(vi+=Vt,"i32");if(vi+=Vt,Wn.length=_a,vi=Lo(this,Ce.tree,vi,Wn),this.textPredicates[Wo].every(Pi=>Pi(Wn))){const Pi=Wn[ri],Ni=this.setProperties[Wo];Ni&&(Pi.setProperties=Ni);const Bn=this.assertedProperties[Wo];Bn&&(Pi.assertedProperties=Bn);const bo=this.refutedProperties[Wo];bo&&(Pi.refutedProperties=bo),gi.push(Pi)}}return rr._free(Vr),gi}predicatesForPattern(Ce){return this.predicates[Ce]}didExceedMatchLimit(){return this.exceededMatchLimit}}function vo(qe,Ce,Ye){const Ft=Ye-Ce;let nr=qe.textCallback(Ce,null,Ye);for(Ce+=nr.length;Ce0))break;Ce+=Er.length,nr+=Er}return Ce>Ye&&(nr=nr.slice(0,Ft)),nr}function Lo(qe,Ce,Ye,Ft){for(let nr=0,Er=Ft.length;nr{Ei.init(),c()}}))}}return s}();e.exports=i})(oN);const wS=oN.exports,aN=()=>(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch{}return!1})(),t1e=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";let xS;const r1e=async(e,t)=>{if(xS)return;const r={locateFile(){return e}};await wS.init(r),xS=await wS.Language.load(t)},n1e=()=>{const e=new wS;return e.setLanguage(xS),e.setTimeoutMicros(1e3*1e3),e};async function i1e(e){return aN()?(ma(ca.GETTER_PARSE_START),await r1e("./tree-sitter.wasm","./tree-sitter-func.wasm"),n1e().parse(e).rootNode.children.filter(o=>o.type==="function_definition"&&o.children.find(s=>s.type==="specifiers_list")?.text.includes("method_id")).map(o=>{const s=o.children[0].children.filter(c=>!c.type.match(/[,()]/)).map(c=>c.text),l=o.children.find(c=>c.type==="function_name").text,u=o.children.find(c=>c.type==="parameter_list").children.filter(c=>c.type==="parameter_declaration").map(c=>({type:c.child(0).text,name:c.child(1).text}));return{returnTypes:s,name:l,parameters:u}})):[]}const o1e=Yh(rx((e,t)=>({name:"",setName:r=>{e(i=>{i.name=r})},parameters:[],addParameter:()=>{e(r=>{const i=Math.random();r.parameters.push({name:"",_id:i,possibleTypes:["int","slice","address"],selectedTypeIdx:0,setValue:a=>r.parameters.find(o=>o._id===i).value=a,setName:a=>{e(o=>{o.parameters.find(s=>s._id===i).name=a})},toggleNextType:()=>{e(a=>{const o=a.parameters.find(s=>s._id===i);o.selectedTypeIdx=(o.selectedTypeIdx+1)%o.possibleTypes.length})},type:()=>{const a=t().parameters.find(o=>o._id===i);return a.possibleTypes[a.selectedTypeIdx]},originalType:()=>t().parameters.find(o=>o._id===i).possibleTypes[0],value:""})})},returnTypes:[],removeParameter:()=>{e(r=>{r.parameters.pop()})},clear:()=>{e(r=>{r.name="",r.parameters=[]})}})));function sN(){return o1e()}const lv=(e,t,r)=>e.find(i=>i.name===t).parameters.find(i=>i.name===r),lN=Yh(rx((e,t)=>({getters:[],setGetters:r=>{e(i=>{const a=r.map(o=>({name:o.name,parameters:o.parameters.map(s=>{const l=[s.type];return["cell","slice"].includes(s.type)&&l.push("address"),{name:s.name,value:"",possibleTypes:l,selectedTypeIdx:0,toggleNextType:()=>{e(u=>{const c=lv(u.getters,o.name,s.name);c.selectedTypeIdx=(c.selectedTypeIdx+1)%c.possibleTypes.length})},type:()=>{const u=lv(t().getters,o.name,s.name);return u.possibleTypes[u.selectedTypeIdx]},originalType:()=>lv(t().getters,o.name,s.name).possibleTypes[0],setValue:u=>{e(c=>{const d=lv(c.getters,o.name,s.name);d.value=u})}}}),returnTypes:o.returnTypes}));i.getters=a})}})));function xE(){const{getters:e}=lN();return{getters:e}}function a1e(){const{data:e}=mc(),{setGetters:t}=lN(),{clear:r}=sN(),{contractAddress:i}=ku();Z.exports.useEffect(()=>{t([]),r()},[i]),Z.exports.useEffect(()=>{(async()=>{const a=[];for(const o of e?.files??[])!o.name.match(/\.(fc|func)/)||a.push(...await i1e(o.content));t(a),r()})()},[e?.files])}function s1e(e=[]){const t=new Qn.TupleBuilder;return e.forEach(r=>{if(r instanceof Qn.Cell)t.writeSlice(r);else if(typeof r=="bigint")t.writeNumber(r);else throw new Error("unknown type!")}),t.build()}function l1e(e){const t=[];for(;e.remaining;){const r=e.pop();switch(r.type){case"int":{t.push(r.value);break}case"cell":{t.push(r.cell);break}case"tuple":{if(r.items.length===0)t.push(null);else throw new Error("list parsing not supported");break}default:throw new Error(`unknown type: ${r.type}`)}}return t}async function u1e(e,t,r,i,a){const{stack:o}=await a.runMethod(e,t,s1e(r));return i(l1e(o))}function uN(e){const{contractAddress:t}=ku(),{getters:r}=xE();return ZB([t,"getter",e.name],async()=>{const i=await Zf();return!t||!r?void 0:(ma(ca.RUN_GETTER),u1e(Qn.Address.parse(t),e.name,e.parameters.map(o=>{switch(o.possibleTypes[o.selectedTypeIdx]){case"int":return BigInt(o.value);case"address":return Qn.beginCell().storeAddress(Qn.Address.parse(o.value)).endCell();default:return Qn.Cell.fromBoc(Buffer.from(o.value,"base64"))[0]}}),o=>o.map(s=>{const l=[];if(s instanceof Qn.Cell){try{s.beginParse().remainingBits===267&&l.push({type:"address",value:s.beginParse().loadAddress().toString()})}catch{}l.push({type:"base64",value:s.toBoc().toString("base64")}),l.push({type:"boc",value:s.toString()})}else typeof s=="bigint"?(l.push({type:"int",value:s.toString()}),l.push({type:"coins",value:Qn.fromNano(s)}),l.push({type:"hex",value:s.toString(16)}),l.push({type:"base64",value:Buffer.from(s.toString(16),"hex").toString("base64")})):l.push({type:"raw",value:String(s)});return l}),i))})}var os=(e=>(e.ERROR="Error",e.HINT="Hint",e.SUCCESS="Success",e.INFO="Info",e))(os||{});const c1e=Qi(aa)(e=>({padding:`${e.singleLine?0:15}px 25px`,marginBottom:e.noBottomMargin?0:24,marginTop:e.noTopMargin?0:24,background:e.backgroundColor||"",border:`1px solid ${e.borderColor||"#D8D8D8"}`,borderRadius:12}));function gs({title:e,type:t,notificationBody:r,singleLine:i,noBottomMargin:a,noTopMargin:o}){let s,l;switch(t){case"Info":l="rgba(216, 216, 216, 0.2);";break;case"Error":s="rgba(252, 86, 86, 0.42);",l="rgba(252, 86, 86, 0.08);";break;case"Hint":l="rgba(94, 117, 232, 0.1);";break;case"Success":l="#D6FFCE";break}return Bt(c1e,{singleLine:i,borderColor:s,backgroundColor:l,noBottomMargin:a,noTopMargin:o,children:[e,r]})}function d1e({parameter:e}){return Bt(uc,{sx:{gap:1},children:[Bt(uc,{sx:{gap:.5,flexDirection:"row"},children:[N(Cn,{children:e.name}),N(iN,{sx:{cursor:e.possibleTypes.length>1?"pointer":"inherit"},onClick:()=>{e.toggleNextType()},children:e.type()})]}),N(Jve,{onChange:t=>{e.setValue(t.target.value)}})]})}function cN({getter:e}){return Bt(Cn,{children:[N(Cn,{sx:{mb:1},children:N("b",{children:"Request"})}),Bt(uc,{sx:{gap:2},children:[e.parameters.map((t,r)=>N(d1e,{parameter:t},t.name)),(e.parameters.length??0)===0&&N(Cn,{sx:{color:"#949597"},children:"(No params)"})]})]})}function f1e({value:e}){const[t,r]=Z.exports.useState(0);return{onClick:()=>{r((t+1)%e.length)},type:e[t]?.type??"unknown",value:e[t].value}}function p1e({type:e,value:t}){const{type:r,value:i,onClick:a}=f1e({value:t}),{showNotification:o}=ey();return Bt(ac,{sx:{gap:1,cursor:t.length>1?"pointer":"initial"},onClick:a,children:[N(l5,{children:N(iN,{children:r})}),N(l5,{width:"100%",children:N(Zve,{children:i})}),N(l5,{children:N(qs,{sx:{padding:0,opacity:.8},onClick:s=>{s.stopPropagation(),navigator.clipboard.writeText(i),o("Copied to clipboard!","success")},children:N("img",{src:ix,alt:"Copy icon",width:15,height:15})})})]})}function dN({returnTypes:e,values:t,isLoading:r}){return Bt(Eo,{children:[(t.length>0||r)&&N(Cn,{children:N("b",{children:"Response"})}),t.length>0&&N(uc,{sx:{gap:1.5},children:N(LC,{children:N(NC,{children:t.map((i,a)=>N(p1e,{type:e[a],value:i}))})})}),t.length===0&&r&&N(uc,{sx:{gap:1},children:e.map(i=>N(qa,{variant:"rounded",height:20}))})]})}function h1e({getter:e}){const{data:t,isLoading:r,mutate:i,error:a}=uN(e);return Bt(tN,{children:[Bt(rN,{children:[Bt(Cn,{sx:{flexGrow:1},children:[Bt(Qve,{children:[e.name,"(",e.parameters.map(o=>o.originalType()).join(", "),")"]}),Bt(Xve,{children:[N("b",{children:"returns"})," ",e.returnTypes.join(", ")]})]}),N(Cn,{children:N(La,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Bt(nN,{sx:{padding:"10px 20px",gap:2},children:[N(cN,{getter:e}),N(dN,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!a&&N(gs,{noBottomMargin:!0,noTopMargin:!0,title:N(Cn,{children:a.toString()}),type:os.ERROR,notificationBody:N(Cn,{})})]})]})}function g1e({getter:e}){const{data:t,isLoading:r,mutate:i,error:a}=uN(e);return Bt(tN,{children:[Bt(rN,{children:[N(Cn,{sx:{flexGrow:1},children:N(e1e,{value:e.name,placeholder:"Get method name",onChange:o=>e.setName(o.target.value)})}),N(Cn,{children:N(La,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Bt(nN,{sx:{padding:"10px 20px",gap:2},children:[N(cN,{getter:e}),Bt("div",{style:{width:300,display:"flex",gap:10},children:[N(La,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.addParameter()},children:"Add parameter"}),N(La,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.removeParameter()},children:"Remove parameter"})]}),N(dN,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!a&&N(gs,{noBottomMargin:!0,noTopMargin:!0,title:N(Cn,{children:a.toString()}),type:os.ERROR,notificationBody:N(Cn,{})})]})]})}function m1e(){const{getters:e}=xE(),t=sN();return Bt(Cn,{sx:{display:"flex",gap:4,flexDirection:"column",mt:2},children:[e?.map(r=>N(h1e,{getter:r})),N(g1e,{getter:t})]})}const y1e=Qi(jn)({justifyContent:"space-between",width:"100%"}),v1e=Qi(Cn)({position:"relative"}),b1e=Qi(Cn)({position:"absolute",top:"80px",right:"40px",zIndex:3}),w1e=Qi(RU)({borderBottom:"1px solid #E8E8E8","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function x1e(){const{data:e}=mc(),[t,r]=Z.exports.useState(void 0),i=ra("(max-width: 450px)"),a=ra("(max-width: 600px)"),{showNotification:o}=ey(),s=(c,d)=>{r(d)},l=Z.exports.useCallback(async c=>{const d=document.querySelector(c===1?"#myVerifierContent > pre > code > .contract-verifier-code-content":"pre > code > div.hljs.language-fift");navigator.clipboard.writeText(d?.innerText),o("Copied to clipboard!","success")},[]);Z.exports.useEffect(()=>{r(e?.hasOnchainProof?0:1)},[e?.hasOnchainProof]);const{getters:u}=xE();return Bt(Cn,{sx:{border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",borderRadius:"20px",position:"relative"},children:[N(Iw,{mb:1,children:Bt(y1e,{children:[Bt(jn,{mb:i?2:0,sx:{width:"100%"},children:[N(Lh,{children:N("img",{src:Vve,alt:"Block icon",width:41,height:41})}),Bt(Sd,{children:[!!e?.hasOnchainProof&&"Verified"," Source ",i&&N("br",{})," ","Code"]})]}),t===0&&N(Cn,{sx:{alignSelf:"baseline",position:"relative",top:a?"5px":"3px"},children:Bt(La,{fontSize:12,fontWeight:500,hoverBackground:"#F5F5F5",background:"#F2F2F2",height:a?30:37,width:a?30:167,onClick:()=>{e?.files?.length&&Yve(e.files)},children:[N("img",{src:qve,alt:"Download icon",width:19,height:19}),a?"":"Download sources"]})})]})}),Bt(v1e,{p:3,children:[Bt(w1e,{value:t,onChange:s,children:[N(d_,{sx:{textTransform:"none"},disabled:!e?.hasOnchainProof,label:"Sources"}),N(d_,{sx:{textTransform:"none"},label:"Disassembled"}),N(d_,{sx:{textTransform:"none"},label:`Getters (${u?.length??0})`})]}),N(Cn,{sx:{display:t===0?"block":"none"},children:N(Vye,{button:N(cP,{onCopy:l,copyText:1})})}),N(Cn,{sx:{display:t===1?"block":"none"},children:N(Wve,{button:N(cP,{onCopy:l,copyText:0})})}),N(Cn,{sx:{display:t===2?"block":"none"},children:N(m1e,{})})]})]})}const cP=({copyText:e,onCopy:t})=>N(b1e,{children:N(qs,{onClick:()=>t(e),children:N("img",{alt:"Copy Icon",src:ix,width:16,height:16})})});var ay={};Object.defineProperty(ay,"__esModule",{value:!0});function _1e(e){{const t=Buffer.from(e);t.reverse();const r=t.toString("hex");return r.length===0?BigInt(0):BigInt(`0x${r}`)}}ay.toBigIntLE=_1e;function S1e(e){{const t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}}var Y1=ay.toBigIntBE=S1e;function C1e(e,t){{const r=e.toString(16),i=Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex");return i.reverse(),i}}ay.toBufferLE=C1e;function E1e(e,t){{const r=e.toString(16);return Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex")}}ay.toBufferBE=E1e;const k1e=e=>{const t=new J6.Sha256;return t.update(e),Buffer.from(t.digestSync())};class ax{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new ax(t)}async sendInternalMessage(t,r,i,a){await t.internal(r,{value:a,sendMode:uo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i,a=!0){await t.internal(r,{value:i,sendMode:uo.SendMode.PAY_GAS_SEPARATELY,body:uo.beginCell().endCell(),bounce:a})}async getChildAddressFromChain(t,r,i){return(await t.get("get_source_item_address",[{type:"int",value:Y1(k1e(r))},{type:"int",value:Y1(Buffer.from(i,"base64"))}])).stack.readCell().beginParse().loadAddress()}async getVerifierRegistryAddress(t){return(await t.get("get_verifier_registry_address",[])).stack.readCell().beginParse().loadAddress()}async getAdminAddress(t){return(await t.get("get_admin_address",[])).stack.readCell().beginParse().loadMaybeAddress()}async getCodeOpt(t){const r=await t.getState();return r.state.type!="active"?null:r.state.code}async getDeploymentCosts(t){const r=await t.get("get_deployment_costs",[]),i=r.stack.readBigNumber(),a=r.stack.readBigNumber();return{min:uo.fromNano(i),max:uo.fromNano(a)}}}async function fN(e,t){return(await t.open(ax.createFromAddress(e)).getAdminAddress())?.toString()}function A1e(){const{contractAddress:e}=ku(),t=X2(),[r]=Pb(),[i,a]=Z.exports.useState(!1);return Z.exports.useEffect(()=>{(async()=>{if(!(!t||!e)){if(r.get("override")!==null){const o=await Zf();if(await fN(Qn.Address.parse(window.sourcesRegistryAddress),o)===t){a(!0);return}}a(!1)}})()},[t,e]),i}const Zu={COMPILE:"COMPILE",PUBLISH:"PUBLISH"},Vu={SOURCES:"SOURCES",PUBLISH:"PUBLISH"},dP=()=>({step:Zu.COMPILE,currentSection:Vu.SOURCES}),T1e=e=>({...dP(),proceedToPublish:()=>{e({step:Zu.PUBLISH,currentSection:Vu.PUBLISH})},toggleSection:t=>{e({currentSection:t})},reset:()=>{e(dP())}}),sx=ty(T1e),pN=Yh(e=>({isPreloaded:!1,markPreloaded:()=>{e({isPreloaded:!0})},clearPreloaded:()=>{e({isPreloaded:!1})}}));function I1e(){const{contractAddress:e}=ku(),t=Iu(),{reset:r}=Tu(),{reset:i}=sx(),{isPreloaded:a,clearPreloaded:o}=pN();Z.exports.useEffect(()=>{a?o():r(),i(),t.invalidate()},[e])}const _E="/assets/contract.ff46c407.svg",R1e=Qi(Dh)({minWidth:100}),P1e=Qi(Cn)(e=>({display:e.isShrinked&&!e.isExtraSmallScreen?"flex":"inherit",flexWrap:e.isShrinked&&!e.isExtraSmallScreen?"wrap":"inherit",columnGap:e.isShrinked&&!e.isExtraSmallScreen?30:"",padding:e.isShrinked&&!e.isExtraSmallScreen?"0 30px":"","&>*:last-child":{borderBottom:e.isShrinked?"":"none !important"},"&:last-child":{marginBottom:3}})),M1e=Qi(jn)(e=>({boxSizing:e.isShrinked?"border-box":"inherit",flex:e.isShrinked?"40%":"inherit",width:e.isShrinked&&!e.isExtraSmallScreen?0:e.isShrinked&&e.isExtraSmallScreen?"100%":"",minHeight:38,padding:"10px 24px",transition:"background .15s",borderTop:"1px solid rgba(114, 138, 150, 0.2)"})),hN=Qi(Io)({fontSize:14,color:"#000",minWidth:90,fontWeight:800}),gN=Qi(Io)({width:"100%",wordBreak:"break-word",fontSize:14,color:"#728A96"}),O1e=Qi(jn)({minWidth:25,justifyContent:"flex-end"}),B1e=(e,t,r,i)=>Bt(({children:s})=>r?N(AU,{placement:"top-start",title:e,children:N("span",{children:s})}):N(Eo,{children:s}),{children:[N(({children:s})=>t&&!!e?N(Ku,{target:"_blank",href:t,sx:{textDecoration:"none",cursor:"pointer"},children:s}):N(Eo,{children:s}),{children:e??"-"}),N(Cn,{sx:{fontSize:12,opacity:.8},children:i??""})]});function SE({isFlexibleWrapper:e,icon:t,title:r,dataRows:i,isLoading:a}){const o=e?R1e:Dh,{showNotification:s}=ey(),l=ra("(max-width: 500px)"),u=Z.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Bt(o,{pb:e?0:2,children:[Bt(Iw,{mb:1,children:[N(Lh,{children:N("img",{src:t,alt:"Block icon",width:41,height:41})}),N(Sd,{children:r})]}),N(P1e,{mt:2.5,isShrinked:!e,isExtraSmallScreen:l,children:i.map(({title:c,value:d,showIcon:g,color:x,customLink:w,tooltip:v,onClick:y,subtitle:_})=>Bt(M1e,{isExtraSmallScreen:l,isShrinked:!e,children:[N(hN,{children:c}),N(gN,{sx:{cursor:y?"pointer":"initial"},onClick:y,children:B1e(d,w,v,_)}),g&&N(O1e,{children:d&&N(qs,{sx:{padding:0},onClick:()=>u(d),children:N("img",{src:ix,alt:"Copy icon",width:15,height:15})})})]},c))})]})}function mN(e){try{const t=Qn.Address.parse(e);switch(t.workChain){case-1:return"Masterchain (-1)";case 0:return"Basic Workchain (0)";default:return`${t.workChain}`}}catch{return""}}const U1e=new Intl.NumberFormat("en-US",{minimumFractionDigits:4});function u5(e,t){const[r,i]=Z.exports.useState(e);return Z.exports.useEffect(()=>{i(e)},[e,t]),[r,()=>{i(r===e?t:e)}]}function D1e(){const{contractAddress:e,contractAddressHex:t}=ku(),{data:r,isLoading:i}=Jf(),{data:a}=mc(),o=[],[s,l]=u5(e,t),[u,c]=u5(r?.codeCellHash.base64,r?.codeCellHash.hex),[d,g]=u5(r?.dataCellHash.base64,r?.dataCellHash.hex);return r&&(o.push({title:"Address",value:s??"",showIcon:!0,onClick:()=>{l()},tooltip:!0,subtitle:mN(e||"")}),o.push({title:"Balance",value:`${U1e.format(parseFloat(r.balance))} TON`}),o.push({title:"Code Hash",value:u??"",showIcon:!0,onClick:()=>{c()},tooltip:!0}),o.push({title:"Data Hash",value:d??"",showIcon:!0,onClick:()=>{g()},tooltip:!0})),N(SE,{title:"Contract",icon:_E,dataRows:o,isLoading:i,isFlexibleWrapper:!!a?.hasOnchainProof})}const L1e="/assets/compiler.05d3a143.svg";var yN="en",CE={},_S={};function vN(){return yN}function N1e(e){yN=e}function j1e(e){return CE[e]}function $1e(e){if(!e)throw new Error("No locale data passed");CE[e.locale]=e,_S[e.locale.toLowerCase()]=e.locale}function fP(e){if(CE[e])return e;if(_S[e.toLowerCase()])return _S[e.toLowerCase()]}function bN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.localeMatcher||"lookup";switch(r){case"lookup":return pP(e);case"best fit":return pP(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function pP(e){var t=fP(e);if(t)return t;for(var r=e.split("-");e.length>1;){r.pop(),e=r.join("-");var i=fP(e);if(i)return i}}var Zt={af:function(t){return t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var r=String(t).split("."),i=Number(r[0])==t,a=i&&r[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":a>=3&&a<=10?"few":a>=11&&a<=99?"many":"other"},ast:function(t){var r=String(t).split("."),i=!r[1];return t==1&&i?"one":"other"},be:function(t){var r=String(t).split("."),i=Number(r[0])==t,a=i&&r[0].slice(-1),o=i&&r[0].slice(-2);return a==1&&o!=11?"one":a>=2&&a<=4&&(o<12||o>14)?"few":i&&a==0||a>=5&&a<=9||o>=11&&o<=14?"many":"other"},br:function(t){var r=String(t).split("."),i=Number(r[0])==t,a=i&&r[0].slice(-1),o=i&&r[0].slice(-2),s=i&&r[0].slice(-6);return a==1&&o!=11&&o!=71&&o!=91?"one":a==2&&o!=12&&o!=72&&o!=92?"two":(a==3||a==4||a==9)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":t!=0&&i&&s==0?"many":"other"},bs:function(t){var r=String(t).split("."),i=r[0],a=r[1]||"",o=!r[1],s=i.slice(-1),l=i.slice(-2),u=a.slice(-1),c=a.slice(-2);return o&&s==1&&l!=11||u==1&&c!=11?"one":o&&s>=2&&s<=4&&(l<12||l>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-6);return t==1&&a?"one":i!=0&&o==0&&a?"many":"other"},ceb:function(t){var r=String(t).split("."),i=r[0],a=r[1]||"",o=!r[1],s=i.slice(-1),l=a.slice(-1);return o&&(i==1||i==2||i==3)||o&&s!=4&&s!=6&&s!=9||!o&&l!=4&&l!=6&&l!=9?"one":"other"},cs:function(t){var r=String(t).split("."),i=r[0],a=!r[1];return t==1&&a?"one":i>=2&&i<=4&&a?"few":a?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var r=String(t).split("."),i=r[0],a=Number(r[0])==t;return t==1||!a&&(i==0||i==1)?"one":"other"},dsb:function(t){var r=String(t).split("."),i=r[0],a=r[1]||"",o=!r[1],s=i.slice(-2),l=a.slice(-2);return o&&s==1||l==1?"one":o&&s==2||l==2?"two":o&&(s==3||s==4)||l==3||l==4?"few":"other"},dz:function(t){return"other"},es:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-6);return t==1?"one":i!=0&&o==0&&a?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-6);return t>=0&&t<2?"one":i!=0&&o==0&&a?"many":"other"},ga:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1?"one":t==2?"two":i&&t>=3&&t<=6?"few":i&&t>=7&&t<=10?"many":"other"},gd:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1||t==11?"one":t==2||t==12?"two":i&&t>=3&&t<=10||i&&t>=13&&t<=19?"few":"other"},he:function(t){var r=String(t).split("."),i=r[0],a=!r[1];return i==1&&a||i==0&&!a?"one":i==2&&a?"two":"other"},is:function(t){var r=String(t).split("."),i=r[0],a=(r[1]||"").replace(/0+$/,""),o=Number(r[0])==t,s=i.slice(-1),l=i.slice(-2);return o&&s==1&&l!=11||a%10==1&&a%100!=11?"one":"other"},ksh:function(t){return t==0?"zero":t==1?"one":"other"},lt:function(t){var r=String(t).split("."),i=r[1]||"",a=Number(r[0])==t,o=a&&r[0].slice(-1),s=a&&r[0].slice(-2);return o==1&&(s<11||s>19)?"one":o>=2&&o<=9&&(s<11||s>19)?"few":i!=0?"many":"other"},lv:function(t){var r=String(t).split("."),i=r[1]||"",a=i.length,o=Number(r[0])==t,s=o&&r[0].slice(-1),l=o&&r[0].slice(-2),u=i.slice(-2),c=i.slice(-1);return o&&s==0||l>=11&&l<=19||a==2&&u>=11&&u<=19?"zero":s==1&&l!=11||a==2&&c==1&&u!=11||a!=2&&c==1?"one":"other"},mk:function(t){var r=String(t).split("."),i=r[0],a=r[1]||"",o=!r[1],s=i.slice(-1),l=i.slice(-2),u=a.slice(-1),c=a.slice(-2);return o&&s==1&&l!=11||u==1&&c!=11?"one":"other"},mt:function(t){var r=String(t).split("."),i=Number(r[0])==t,a=i&&r[0].slice(-2);return t==1?"one":t==2?"two":t==0||a>=3&&a<=10?"few":a>=11&&a<=19?"many":"other"},pa:function(t){return t==0||t==1?"one":"other"},pl:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-1),s=i.slice(-2);return t==1&&a?"one":a&&o>=2&&o<=4&&(s<12||s>14)?"few":a&&i!=1&&(o==0||o==1)||a&&o>=5&&o<=9||a&&s>=12&&s<=14?"many":"other"},pt:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-6);return i==0||i==1?"one":i!=0&&o==0&&a?"many":"other"},ro:function(t){var r=String(t).split("."),i=!r[1],a=Number(r[0])==t,o=a&&r[0].slice(-2);return t==1&&i?"one":!i||t==0||t!=1&&o>=1&&o<=19?"few":"other"},ru:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-1),s=i.slice(-2);return a&&o==1&&s!=11?"one":a&&o>=2&&o<=4&&(s<12||s>14)?"few":a&&o==0||a&&o>=5&&o<=9||a&&s>=11&&s<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var r=String(t).split("."),i=r[0],a=r[1]||"";return t==0||t==1||i==0&&a==1?"one":"other"},sl:function(t){var r=String(t).split("."),i=r[0],a=!r[1],o=i.slice(-2);return a&&o==1?"one":a&&o==2?"two":a&&(o==3||o==4)||!a?"few":"other"}};Zt.as=Zt.am;Zt.az=Zt.af;Zt.bg=Zt.af;Zt.bn=Zt.am;Zt.brx=Zt.af;Zt.ce=Zt.af;Zt.chr=Zt.af;Zt.de=Zt.ast;Zt.ee=Zt.af;Zt.el=Zt.af;Zt.en=Zt.ast;Zt.et=Zt.ast;Zt.eu=Zt.af;Zt.fa=Zt.am;Zt.fi=Zt.ast;Zt.fil=Zt.ceb;Zt.fo=Zt.af;Zt.fur=Zt.af;Zt.fy=Zt.ast;Zt.gl=Zt.ast;Zt.gu=Zt.am;Zt.ha=Zt.af;Zt.hi=Zt.am;Zt.hr=Zt.bs;Zt.hsb=Zt.dsb;Zt.hu=Zt.af;Zt.hy=Zt.ff;Zt.ia=Zt.ast;Zt.id=Zt.dz;Zt.ig=Zt.dz;Zt.it=Zt.ca;Zt.ja=Zt.dz;Zt.jgo=Zt.af;Zt.jv=Zt.dz;Zt.ka=Zt.af;Zt.kea=Zt.dz;Zt.kk=Zt.af;Zt.kl=Zt.af;Zt.km=Zt.dz;Zt.kn=Zt.am;Zt.ko=Zt.dz;Zt.ks=Zt.af;Zt.ku=Zt.af;Zt.ky=Zt.af;Zt.lb=Zt.af;Zt.lkt=Zt.dz;Zt.lo=Zt.dz;Zt.ml=Zt.af;Zt.mn=Zt.af;Zt.mr=Zt.af;Zt.ms=Zt.dz;Zt.my=Zt.dz;Zt.nb=Zt.af;Zt.ne=Zt.af;Zt.nl=Zt.ast;Zt.nn=Zt.af;Zt.no=Zt.af;Zt.or=Zt.af;Zt.pcm=Zt.am;Zt.ps=Zt.af;Zt.rm=Zt.af;Zt.sah=Zt.dz;Zt.sc=Zt.ast;Zt.sd=Zt.af;Zt.sk=Zt.cs;Zt.so=Zt.af;Zt.sq=Zt.af;Zt.sr=Zt.bs;Zt.su=Zt.dz;Zt.sv=Zt.ast;Zt.sw=Zt.ast;Zt.ta=Zt.af;Zt.te=Zt.af;Zt.th=Zt.dz;Zt.ti=Zt.pa;Zt.tk=Zt.af;Zt.to=Zt.dz;Zt.tr=Zt.af;Zt.ug=Zt.af;Zt.uk=Zt.ru;Zt.ur=Zt.ast;Zt.uz=Zt.af;Zt.vi=Zt.dz;Zt.wae=Zt.af;Zt.wo=Zt.dz;Zt.xh=Zt.af;Zt.yi=Zt.ast;Zt.yo=Zt.dz;Zt.yue=Zt.dz;Zt.zh=Zt.dz;Zt.zu=Zt.am;const hP=Zt;function gP(e){return e==="pt-PT"?e:z1e(e)}var F1e=/^([a-z0-9]+)/i;function z1e(e){var t=e.match(F1e);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function H1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mP(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,i=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Q1e(this,e);var i=r.numeric,a=r.style,o=r.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",i!==void 0){if(J1e.indexOf(i)<0)throw new RangeError('Invalid "numeric" option: '.concat(i));this.numeric=i}if(a!==void 0){if(ebe.indexOf(a)<0)throw new RangeError('Invalid "style" option: '.concat(a));this.style=a}if(o!==void 0){if(tbe.indexOf(o)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(o));this.localeMatcher=o}if(typeof t=="string"&&(t=[t]),t.push(vN()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");SS.supportedLocalesOf(this.locale).length>0?this.pluralRules=new SS(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=bN(this.locale,{localeMatcher:this.localeMatcher})}return X1e(e,[{key:"format",value:function(){var r=_P(arguments),i=bP(r,2),a=i[0],o=i[1];return this.getRule(a,o).replace("{0}",this.formatNumber(Math.abs(a)))}},{key:"formatToParts",value:function(){var r=_P(arguments),i=bP(r,2),a=i[0],o=i[1],s=this.getRule(a,o),l=s.indexOf("{0}");if(l<0)return[{type:"literal",value:s}];var u=[];return l>0&&u.push({type:"literal",value:s.slice(0,l)}),u=u.concat(this.formatNumberToParts(Math.abs(a)).map(function(c){return vP(vP({},c),{},{unit:o})})),l+31&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(r){return bN(r,t)})};yd.addLocale=$1e;yd.setDefaultLocale=N1e;yd.getDefaultLocale=vN;yd.PluralRules=SS;var c5='Invalid "unit" argument';function rbe(e){if(CS(e)==="symbol")throw new TypeError(c5);if(typeof e!="string")throw new RangeError("".concat(c5,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),Z1e.indexOf(e)<0)throw new RangeError("".concat(c5,": ").concat(e));return e}var nbe='Invalid "number" argument';function ibe(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(nbe,": ").concat(e));return e}function obe(e){return 1/e===-1/0}function abe(e){return e<0||e===0&&obe(e)}function _P(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[ibe(e[0]),rbe(e[1])]}function Q1(e){return Q1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q1(e)}function sbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SP(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cbe(e,t){if(!!e){if(typeof e=="string")return EP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EP(e,t)}}function EP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r1;)if(o.pop(),a=o.join("-"),t(a))return a}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function fbe(){var e=(typeof Intl>"u"?"undefined":ES(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function kS(e){return kS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kS(e)}function pbe(e){return gbe(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var hbe={}.constructor;function gbe(e){return kS(e)!==void 0&&e!==null&&e.constructor===hbe}var zu=60,X1=60*zu,uf=24*X1,AS=7*uf,TS=30.44*uf,wN=146097/400*uf;function Zp(e){switch(e){case"second":return 1;case"minute":return zu;case"hour":return X1;case"day":return uf;case"week":return AS;case"month":return TS;case"year":return wN}}function xN(e){return e.factor!==void 0?e.factor:Zp(e.unit||e.formatAs)||1}function _0(e){switch(e){case"floor":return Math.floor;default:return Math.round}}function EE(e){switch(e){case"floor":return 1;default:return .5}}function IS(e){return IS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IS(e)}function _N(e,t){var r=t.prevStep,i=t.timestamp,a=t.now,o=t.future,s=t.round,l;return r&&(r.id||r.unit)&&(l=e["threshold_for_".concat(r.id||r.unit)]),l===void 0&&e.threshold!==void 0&&(l=e.threshold,typeof l=="function"&&(l=l(a,o))),l===void 0&&(l=e.minTime),IS(l)==="object"&&(r&&r.id&&l[r.id]!==void 0?l=l[r.id]:l=l.default),typeof l=="function"&&(l=l(i,{future:o,getMinTimeForUnit:function(c,d){return kP(c,d||r&&r.formatAs,{round:s})}})),l===void 0&&e.test&&(e.test(i,{now:a,future:o})?l=0:l=9007199254740991),l===void 0&&(r?e.formatAs&&r.formatAs&&(l=kP(e.formatAs,r.formatAs,{round:s})):l=0),l===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),l}function kP(e,t,r){var i=r.round,a=Zp(e),o;if(t==="now"?o=Zp(e):o=Zp(t),a!==void 0&&o!==void 0)return a-o*(1-EE(i))}function AP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function mbe(e){for(var t=1;t0)return e[s-1]}return l}}}function SN(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=_N(e[i],mbe({prevStep:e[i-1],timestamp:r.now-t*1e3},r));return a===void 0||Math.abs(t)=0:!0})}function xbe(e,t,r){var i=r.now,a=r.round;if(!!Zp(e)){var o=Zp(e)*1e3,s=t>i,l=Math.abs(t-i),u=_0(a)(l/o)*o;return s?u>0?l-u+Sbe(a,o):l-u+1:-(l-u)+_be(a,o)}}function _be(e,t){return EE(e)*t}function Sbe(e,t){return(1-EE(e))*t+1}var Cbe=365*24*60*60*1e3,CN=1e3*Cbe;function Ebe(e,t,r){var i=r.prevStep,a=r.nextStep,o=r.now,s=r.future,l=r.round,u=e.getTime?e.getTime():e,c=function(v){return xbe(v,u,{now:o,round:l})},d=Abe(s?t:a,u,{future:s,now:o,round:l,prevStep:s?i:t});if(d!==void 0){var g;if(t&&(t.getTimeToNextUpdate&&(g=t.getTimeToNextUpdate(u,{getTimeToNextUpdateForUnit:c,getRoundFunction:_0,now:o,future:s,round:l})),g===void 0)){var x=t.unit||t.formatAs;x&&(g=c(x))}return g===void 0?d:Math.min(g,d)}}function kbe(e,t,r){var i=r.now,a=r.future,o=r.round,s=r.prevStep,l=_N(e,{timestamp:t,now:i,future:a,round:o,prevStep:s});if(l!==void 0)return a?t-l*1e3+1:l===0&&t===i?CN:t+l*1e3}function Abe(e,t,r){var i=r.now,a=r.future,o=r.round,s=r.prevStep;if(e){var l=kbe(e,t,{now:i,future:a,round:o,prevStep:s});return l===void 0?void 0:l-i}else return a?t-i+1:CN}var EN={};function Hp(e){return EN[e]}function kN(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");EN[e.locale]=e}const Tbe=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],RS={steps:Tbe,labels:"long"};function TP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function IP(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kbe(e,t){return Qbe(e)||Ybe(e,t)||IN(e,t)||Gbe()}function Gbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IN(e,t){if(!!e){if(typeof e=="string")return WP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WP(e,t)}}function WP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.polyfill;Xbe(this,e),typeof t=="string"&&(t=[t]),this.locale=dbe(t.concat(e.getDefaultLocale()),Hp),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),i===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=yd,this.IntlPluralRules=yd.PluralRules),this.relativeTimeFormatCache=new CP,this.pluralRulesCache=new CP}return Zbe(e,[{key:"format",value:function(r,i,a){a||(i&&!nwe(i)?(a=i,i=void 0):a={}),i||(i=PS),typeof i=="string"&&(i=Vbe(i));var o=Jbe(r),s=this.getLabels(i.flavour||i.labels),l=s.labels,u=s.labelsType,c;i.now!==void 0&&(c=i.now),c===void 0&&a.now!==void 0&&(c=a.now),c===void 0&&(c=Date.now());var d=(c-o)/1e3,g=a.future||d<0,x=rwe(l,Hp(this.locale).now,Hp(this.locale).long,g);if(i.custom){var w=i.custom({now:c,date:new Date(o),time:o,elapsed:d,locale:this.locale});if(w!==void 0)return w}var v=twe(i.units,l,x),y=a.round||i.round,_=vbe(i.gradation||i.steps||PS.steps,d,{now:c,units:v,round:y,future:g,getNextStep:!0}),E=Kbe(_,3),A=E[0],B=E[1],U=E[2],L=this.formatDateForStep(o,B,d,{labels:l,labelsType:u,nowLabel:x,now:c,future:g,round:y})||"";if(a.getTimeToNextUpdate){var K=Ebe(o,B,{nextStep:U,prevStep:A,now:c,future:g,round:y});return[L,K]}return L}},{key:"formatDateForStep",value:function(r,i,a,o){var s=this,l=o.labels,u=o.labelsType,c=o.nowLabel,d=o.now,g=o.future,x=o.round;if(!!i){if(i.format)return i.format(r,this.locale,{formatAs:function(E,A){return s.formatValue(A,E,{labels:l,future:g})},now:d,future:g});var w=i.unit||i.formatAs;if(!w)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(i)));if(w==="now")return c;var v=Math.abs(a)/xN(i);i.granularity&&(v=_0(x)(v/i.granularity)*i.granularity);var y=-1*Math.sign(a)*_0(x)(v);switch(y===0&&(g?y=0:y=-0),u){case"long":case"short":case"narrow":return this.getFormatter(u).format(y,w);default:return this.formatValue(y,w,{labels:l,future:g})}}}},{key:"formatValue",value:function(r,i,a){var o=a.labels,s=a.future;return this.getFormattingRule(o,i,r,{future:s}).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"getFormattingRule",value:function(r,i,a,o){var s=o.future;if(this.locale,r=r[i],typeof r=="string")return r;var l=a===0?s?"future":"past":a<0?"past":"future",u=r[l]||r;if(typeof u=="string")return u;var c=this.getPluralRules().select(Math.abs(a));return u[c]||u.other}},{key:"formatNumber",value:function(r){return this.numberFormat?this.numberFormat.format(r):String(r)}},{key:"getFormatter",value:function(r){return this.relativeTimeFormatCache.get(this.locale,r)||this.relativeTimeFormatCache.put(this.locale,r,new this.IntlRelativeTimeFormat(this.locale,{style:r}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof r=="string"&&(r=[r]),r=r.map(function(l){switch(l){case"tiny":case"mini-time":return"mini";default:return l}}),r=r.concat("long");for(var i=Hp(this.locale),a=qbe(r),o;!(o=a()).done;){var s=o.value;if(i[s])return{labelsType:s,labels:i[s]}}}}]),e}(),RN="en";vu.getDefaultLocale=function(){return RN};vu.setDefaultLocale=function(e){return RN=e};vu.addDefaultLocale=function(e){if(qP)return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");qP=!0,vu.setDefaultLocale(e.locale),vu.addLocale(e)};var qP;vu.addLocale=function(e){kN(e),yd.addLocale(e)};vu.locale=vu.addLocale;vu.addLabels=function(e,t,r){var i=Hp(e);i||(kN({locale:e}),i=Hp(e)),i[t]=r};function Jbe(e){if(e.constructor===Date||ewe(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(Z1(e),", ").concat(e))}function ewe(e){return Z1(e)==="object"&&typeof e.getTime=="function"}function twe(e,t,r){var i=Object.keys(t);return r&&i.push("now"),e&&(i=e.filter(function(a){return a==="now"||i.indexOf(a)>=0})),i}function rwe(e,t,r,i){var a=e.now||t&&t.now;if(a)return typeof a=="string"?a:i?a.future:a.past;if(r&&r.second&&r.second.current)return r.second.current}function nwe(e){return typeof e=="string"||pbe(e)}const iwe={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}},owe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/func`,awe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/fift`,swe=e=>`https://github.com/tact-lang/tact/tree/v${e}`;vu.addDefaultLocale(iwe);function lwe(){const{data:e}=mc(),t=e.compilerSettings,r=[];if(e){if(r.push({title:"Compiler",value:`${e.compiler}`}),e.compiler==="func"){const i=t?.funcVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:i&&owe(i)})}else if(e.compiler==="fift"){const i=t?.fiftVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:awe(i)})}else if(e.compiler==="tact"){const i=t?.tactVersion;r.push({title:"Version",value:i,color:"#0088CC",customLink:swe(i)})}e.compiler!=="tact"&&r.push({title:"Command",value:t?.commandLine,showIcon:!0,tooltip:!0}),r.push({title:"Verified on",value:e.verificationDate?.toLocaleDateString()??""})}return N(SE,{title:"Compiler",icon:L1e,dataRows:r,isFlexibleWrapper:!0})}function eg(e,t,r,i){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(d){try{c(i.next(d))}catch(g){s(g)}}function u(d){try{c(i.throw(d))}catch(g){s(g)}}function c(d){d.done?o(d.value):a(d.value).then(l,u)}c((i=i.apply(e,t||[])).next())})}function tg(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(c){return function(d){return u([c,d])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(r=0)),r;)try{if(i=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,a=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)&&!(a=i.next()).done;)o.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return o}function GP(e,t,r){if(r||arguments.length===2)for(var i=0,a=t.length,o;i0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function cwe(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var i=t.split(".").pop().toLowerCase(),a=uwe.get(i);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var dwe=[".DS_Store","Thumbs.db"];function fwe(e){return eg(this,void 0,void 0,function(){return tg(this,function(t){return J1(e)&&pwe(e.dataTransfer)?[2,ywe(e.dataTransfer,e.type)]:hwe(e)?[2,gwe(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,mwe(e)]:[2,[]]})})}function pwe(e){return J1(e)}function hwe(e){return J1(e)&&J1(e.target)}function J1(e){return typeof e=="object"&&e!==null}function gwe(e){return US(e.target.files).map(function(t){return sy(t)})}function mwe(e){return eg(this,void 0,void 0,function(){var t;return tg(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(i){return sy(i)})]}})})}function ywe(e,t){return eg(this,void 0,void 0,function(){var r,i;return tg(this,function(a){switch(a.label){case 0:return e.items?(r=US(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(vwe))]):[3,2];case 1:return i=a.sent(),[2,YP(PN(i))];case 2:return[2,YP(US(e.files).map(function(o){return sy(o)}))]}})})}function YP(e){return e.filter(function(t){return dwe.indexOf(t.name)===-1})}function US(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,i=new Array(t);rr)return[!1,eM(r)];if(e.sizer)return[!1,eM(r)]}return[!0,null]}function Gd(e){return e!=null}function Bwe(e){var t=e.files,r=e.accept,i=e.minSize,a=e.maxSize,o=e.multiple,s=e.maxFiles,l=e.validator;return!o&&t.length>1||o&&s>=1&&t.length>s?!1:t.every(function(u){var c=UN(u,r),d=C0(c,1),g=d[0],x=DN(u,i,a),w=C0(x,1),v=w[0],y=l?l(u):null;return g&&v&&!y})}function eb(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function cv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function rM(e){e.preventDefault()}function Uwe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Dwe(e){return e.indexOf("Edge/")!==-1}function Lwe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Uwe(e)||Dwe(e)}function Xl(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),s=1;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function e2e(e,t){if(e==null)return{};var r={},i=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var kE=Z.exports.forwardRef(function(e,t){var r=e.children,i=tb(e,Hwe),a=FN(i),o=a.open,s=tb(a,Wwe);return Z.exports.useImperativeHandle(t,function(){return{open:o}},[o]),N(Z.exports.Fragment,{children:r(Vo(Vo({},s),{},{open:o}))})});kE.displayName="Dropzone";var $N={disabled:!1,getFilesFromEvent:fwe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};kE.defaultProps=$N;kE.propTypes={children:_o.exports.func,accept:_o.exports.objectOf(_o.exports.arrayOf(_o.exports.string)),multiple:_o.exports.bool,preventDropOnDocument:_o.exports.bool,noClick:_o.exports.bool,noKeyboard:_o.exports.bool,noDrag:_o.exports.bool,noDragEventsBubbling:_o.exports.bool,minSize:_o.exports.number,maxSize:_o.exports.number,maxFiles:_o.exports.number,disabled:_o.exports.bool,getFilesFromEvent:_o.exports.func,onFileDialogCancel:_o.exports.func,onFileDialogOpen:_o.exports.func,useFsAccessApi:_o.exports.bool,autoFocus:_o.exports.bool,onDragEnter:_o.exports.func,onDragLeave:_o.exports.func,onDragOver:_o.exports.func,onDrop:_o.exports.func,onDropAccepted:_o.exports.func,onDropRejected:_o.exports.func,onError:_o.exports.func,validator:_o.exports.func};var jS={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function FN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vo(Vo({},$N),e),r=t.accept,i=t.disabled,a=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,l=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,x=t.onDrop,w=t.onDropAccepted,v=t.onDropRejected,y=t.onFileDialogCancel,_=t.onFileDialogOpen,E=t.useFsAccessApi,A=t.autoFocus,B=t.preventDropOnDocument,U=t.noClick,L=t.noKeyboard,K=t.noDrag,V=t.noDragEventsBubbling,H=t.onError,z=t.validator,Y=Z.exports.useMemo(function(){return $we(r)},[r]),oe=Z.exports.useMemo(function(){return jwe(r)},[r]),q=Z.exports.useMemo(function(){return typeof _=="function"?_:iM},[_]),ae=Z.exports.useMemo(function(){return typeof y=="function"?y:iM},[y]),M=Z.exports.useRef(null),te=Z.exports.useRef(null),ue=Z.exports.useReducer(t2e,jS),he=d5(ue,2),xe=he[0],J=he[1],ct=xe.isFocused,De=xe.isFileDialogActive,ze=Z.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&Nwe()),ir=function(){!ze.current&&De&&setTimeout(function(){if(te.current){var se=te.current.files;se.length||(J({type:"closeDialog"}),ae())}},300)};Z.exports.useEffect(function(){return window.addEventListener("focus",ir,!1),function(){window.removeEventListener("focus",ir,!1)}},[te,De,ae,ze]);var Rt=Z.exports.useRef([]),At=function(se){M.current&&M.current.contains(se.target)||(se.preventDefault(),Rt.current=[])};Z.exports.useEffect(function(){return B&&(document.addEventListener("dragover",rM,!1),document.addEventListener("drop",At,!1)),function(){B&&(document.removeEventListener("dragover",rM),document.removeEventListener("drop",At))}},[M,B]),Z.exports.useEffect(function(){return!i&&A&&M.current&&M.current.focus(),function(){}},[M,A,i]);var Xt=Z.exports.useCallback(function(be){H?H(be):console.error(be)},[H]),vr=Z.exports.useCallback(function(be){be.preventDefault(),be.persist(),$t(be),Rt.current=[].concat(Kwe(Rt.current),[be.target]),cv(be)&&Promise.resolve(a(be)).then(function(se){if(!(eb(be)&&!V)){var ce=se.length,$=ce>0&&Bwe({files:se,accept:Y,minSize:s,maxSize:o,multiple:l,maxFiles:u,validator:z}),C=ce>0&&!$;J({isDragAccept:$,isDragReject:C,isDragActive:!0,type:"setDraggedFiles"}),c&&c(be)}}).catch(function(se){return Xt(se)})},[a,c,Xt,V,Y,s,o,l,u,z]),Et=Z.exports.useCallback(function(be){be.preventDefault(),be.persist(),$t(be);var se=cv(be);if(se&&be.dataTransfer)try{be.dataTransfer.dropEffect="copy"}catch{}return se&&g&&g(be),!1},[g,V]),St=Z.exports.useCallback(function(be){be.preventDefault(),be.persist(),$t(be);var se=Rt.current.filter(function($){return M.current&&M.current.contains($)}),ce=se.indexOf(be.target);ce!==-1&&se.splice(ce,1),Rt.current=se,!(se.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),cv(be)&&d&&d(be))},[M,d,V]),xt=Z.exports.useCallback(function(be,se){var ce=[],$=[];be.forEach(function(C){var R=UN(C,Y),Q=d5(R,2),me=Q[0],je=Q[1],lt=DN(C,s,o),ur=d5(lt,2),Dr=ur[0],hr=ur[1],Rr=z?z(C):null;if(me&&Dr&&!Rr)ce.push(C);else{var Gr=[je,hr];Rr&&(Gr=Gr.concat(Rr)),$.push({file:C,errors:Gr.filter(function(Nr){return Nr})})}}),(!l&&ce.length>1||l&&u>=1&&ce.length>u)&&(ce.forEach(function(C){$.push({file:C,errors:[Owe]})}),ce.splice(0)),J({acceptedFiles:ce,fileRejections:$,type:"setFiles"}),x&&x(ce,$,se),$.length>0&&v&&v($,se),ce.length>0&&w&&w(ce,se)},[J,l,Y,s,o,u,x,w,v,z]),Ut=Z.exports.useCallback(function(be){be.preventDefault(),be.persist(),$t(be),Rt.current=[],cv(be)&&Promise.resolve(a(be)).then(function(se){eb(be)&&!V||xt(se,be)}).catch(function(se){return Xt(se)}),J({type:"reset"})},[a,xt,Xt,V]),Gt=Z.exports.useCallback(function(){if(ze.current){J({type:"openDialog"}),q();var be={multiple:l,types:oe};window.showOpenFilePicker(be).then(function(se){return a(se)}).then(function(se){xt(se,null),J({type:"closeDialog"})}).catch(function(se){Fwe(se)?(ae(se),J({type:"closeDialog"})):zwe(se)?(ze.current=!1,te.current?(te.current.value=null,te.current.click()):Xt(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Xt(se)});return}te.current&&(J({type:"openDialog"}),q(),te.current.value=null,te.current.click())},[J,q,ae,E,xt,Xt,oe,l]),mr=Z.exports.useCallback(function(be){!M.current||!M.current.isEqualNode(be.target)||(be.key===" "||be.key==="Enter"||be.keyCode===32||be.keyCode===13)&&(be.preventDefault(),Gt())},[M,Gt]),ne=Z.exports.useCallback(function(){J({type:"focus"})},[]),Pt=Z.exports.useCallback(function(){J({type:"blur"})},[]),Dt=Z.exports.useCallback(function(){U||(Lwe()?setTimeout(Gt,0):Gt())},[U,Gt]),Te=function(se){return i?null:se},Ae=function(se){return L?null:Te(se)},ot=function(se){return K?null:Te(se)},$t=function(se){V&&se.stopPropagation()},tr=Z.exports.useMemo(function(){return function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=be.refKey,ce=se===void 0?"ref":se,$=be.role,C=be.onKeyDown,R=be.onFocus,Q=be.onBlur,me=be.onClick,je=be.onDragEnter,lt=be.onDragOver,ur=be.onDragLeave,Dr=be.onDrop,hr=tb(be,Vwe);return Vo(Vo(NS({onKeyDown:Ae(Xl(C,mr)),onFocus:Ae(Xl(R,ne)),onBlur:Ae(Xl(Q,Pt)),onClick:Te(Xl(me,Dt)),onDragEnter:ot(Xl(je,vr)),onDragOver:ot(Xl(lt,Et)),onDragLeave:ot(Xl(ur,St)),onDrop:ot(Xl(Dr,Ut)),role:typeof $=="string"&&$!==""?$:"presentation"},ce,M),!i&&!L?{tabIndex:0}:{}),hr)}},[M,mr,ne,Pt,Dt,vr,Et,St,Ut,L,K,i]),Ot=Z.exports.useCallback(function(be){be.stopPropagation()},[]),br=Z.exports.useMemo(function(){return function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=be.refKey,ce=se===void 0?"ref":se,$=be.onChange,C=be.onClick,R=tb(be,qwe),Q=NS({accept:Y,multiple:l,type:"file",style:{display:"none"},onChange:Te(Xl($,Ut)),onClick:Te(Xl(C,Ot)),tabIndex:-1},ce,te);return Vo(Vo({},Q),R)}},[te,r,l,Ut,i]);return Vo(Vo({},xe),{},{isFocused:ct&&!i,getRootProps:tr,getInputProps:br,rootRef:M,inputRef:te,open:Te(Gt)})}function t2e(e,t){switch(t.type){case"focus":return Vo(Vo({},e),{},{isFocused:!0});case"blur":return Vo(Vo({},e),{},{isFocused:!1});case"openDialog":return Vo(Vo({},jS),{},{isFileDialogActive:!0});case"closeDialog":return Vo(Vo({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vo(Vo({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vo(Vo({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vo({},jS);default:return e}}function iM(){}const r2e="/assets/sources.bdd55da1.svg",zN="/assets/verified-bold.54828026.svg",n2e="/assets/upload.c0ad3052.svg",i2e=Qi(jn)({justifyContent:"center",backgroundColor:"#F7F9FB",textAlign:"center",height:148,overflow:"hidden",border:"1px dashed #E3E8EA",color:"#728A96",borderRadius:20,lineHeight:148,cursor:"pointer","&:hover":{border:"1px dashed #9da3a5"}});function o2e(){const{addFiles:e,hasFiles:t}=Tu(),{step:r}=sx(),i=ra("(max-width: 450px)"),{active:a}=w6(),o=c=>{e(c)},{getRootProps:s,getInputProps:l,isDragActive:u}=FN({onDrop:o,accept:{"text/plain":K1.map(c=>`.${c}`)}});return Bt(Eo,{children:[N(Iw,{mb:1,children:Bt(jn,{sx:{justifyContent:"space-between",width:"100%",flexDirection:i?"column":"inherit"},children:[Bt(jn,{mb:i?2:0,sx:{width:"100%"},children:[N(Lh,{children:N("img",{src:r===Zu.PUBLISH?zN:r2e,alt:"Block icon",width:41,height:41})}),N(Sd,{children:"Add sources"})]}),t()&&r!==Zu.PUBLISH&&N("div",{...s(),children:Bt(La,{fontSize:12,fontWeight:700,hoverBackground:"#e3e3e3",background:"#F8F8F8",height:44,width:159,children:[N("img",{src:n2e,alt:"Sources icon",width:19,height:19}),"Upload source"]})})]})}),Bt(Cn,{sx:{padding:"15px 30px"},children:[N(Cn,{sx:{position:"relative",zIndex:a?0:4,transition:a?"":"1.5s z-index"},children:!t()&&Bt(i2e,{...s(),children:["Drop sources (",K1.map(c=>`.${c}`).join(", "),") here"]})}),N("input",{...l(),onClick:c=>{c.target.value=""},style:{display:"none"},id:"fileUpload",type:"file",multiple:!0,accept:".fc,.func,.fif"})]})]})}function a2e(){for(var e=arguments.length,t=new Array(e),r=0;ri=>{t.forEach(a=>a(i))},t)}const lx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rg(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function AE(e){return"nodeType"in e}function Cs(e){var t,r;return e?rg(e)?e:AE(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function TE(e){const{Document:t}=Cs(e);return e instanceof t}function ly(e){return rg(e)?!1:e instanceof Cs(e).HTMLElement}function s2e(e){return e instanceof Cs(e).SVGElement}function ng(e){return e?rg(e)?e.document:AE(e)?TE(e)?e:ly(e)?e.ownerDocument:document:document:document}const zl=lx?Z.exports.useLayoutEffect:Z.exports.useEffect;function IE(e){const t=Z.exports.useRef(e);return zl(()=>{t.current=e}),Z.exports.useCallback(function(){for(var r=arguments.length,i=new Array(r),a=0;a{e.current=setInterval(i,a)},[]),r=Z.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function E0(e,t){t===void 0&&(t=[e]);const r=Z.exports.useRef(e);return zl(()=>{r.current!==e&&(r.current=e)},t),r}function uy(e,t){const r=Z.exports.useRef();return Z.exports.useMemo(()=>{const i=e(r.current);return r.current=i,i},[...t])}function rb(e){const t=IE(e),r=Z.exports.useRef(null),i=Z.exports.useCallback(a=>{a!==r.current&&t?.(a,r.current),r.current=a},[]);return[r,i]}function $S(e){const t=Z.exports.useRef();return Z.exports.useEffect(()=>{t.current=e},[e]),t.current}let f5={};function cy(e,t){return Z.exports.useMemo(()=>{if(t)return t;const r=f5[e]==null?0:f5[e]+1;return f5[e]=r,e+"-"+r},[e,t])}function HN(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a{const l=Object.entries(s);for(const[u,c]of l){const d=o[u];d!=null&&(o[u]=d+e*c)}return o},{...t})}}const Jp=HN(1),k0=HN(-1);function u2e(e){return"clientX"in e&&"clientY"in e}function RE(e){if(!e)return!1;const{KeyboardEvent:t}=Cs(e.target);return t&&e instanceof t}function c2e(e){if(!e)return!1;const{TouchEvent:t}=Cs(e.target);return t&&e instanceof t}function zS(e){if(c2e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return u2e(e)?{x:e.clientX,y:e.clientY}:null}const A0=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[A0.Translate.toString(e),A0.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:i}=e;return t+" "+r+"ms "+i}}}),oM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function d2e(e){return e.matches(oM)?e:e.querySelector(oM)}function f2e(e,t,r){const i={...e};return t.top+e.y<=r.top?i.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(i.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?i.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(i.x=r.left+r.width-t.right),i}const p2e=e=>{let{containerNodeRect:t,draggingNodeRect:r,transform:i}=e;return!r||!t?i:f2e(i,r,t)},h2e=e=>{let{transform:t}=e;return{...t,x:0}},g2e={display:"none"};function m2e(e){let{id:t,value:r}=e;return N("div",{id:t,style:g2e,children:r})}const y2e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function v2e(e){let{id:t,announcement:r}=e;return N("div",{id:t,style:y2e,role:"status","aria-live":"assertive","aria-atomic":!0,children:r})}function b2e(){const[e,t]=Z.exports.useState("");return{announce:Z.exports.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const WN=Z.exports.createContext(null);function w2e(e){const t=Z.exports.useContext(WN);Z.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function x2e(){const[e]=Z.exports.useState(()=>new Set),t=Z.exports.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[Z.exports.useCallback(i=>{let{type:a,event:o}=i;e.forEach(s=>{var l;return(l=s[a])==null?void 0:l.call(s,o)})},[e]),t]}const _2e={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},S2e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function C2e(e){let{announcements:t=S2e,container:r,hiddenTextDescribedById:i,screenReaderInstructions:a=_2e}=e;const{announce:o,announcement:s}=b2e(),l=cy("DndLiveRegion"),[u,c]=Z.exports.useState(!1);if(Z.exports.useEffect(()=>{c(!0)},[]),w2e(Z.exports.useMemo(()=>({onDragStart(g){let{active:x}=g;o(t.onDragStart({active:x}))},onDragMove(g){let{active:x,over:w}=g;t.onDragMove&&o(t.onDragMove({active:x,over:w}))},onDragOver(g){let{active:x,over:w}=g;o(t.onDragOver({active:x,over:w}))},onDragEnd(g){let{active:x,over:w}=g;o(t.onDragEnd({active:x,over:w}))},onDragCancel(g){let{active:x,over:w}=g;o(t.onDragCancel({active:x,over:w}))}}),[o,t])),!u)return null;const d=Bt(Eo,{children:[N(m2e,{id:i,value:a.draggable}),N(v2e,{id:l,announcement:s})]});return r?il.exports.createPortal(d,r):d}var ya;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ya||(ya={}));function nb(){}function p5(e,t){return Z.exports.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function E2e(){for(var e=arguments.length,t=new Array(e),r=0;r[...t].filter(i=>i!=null),[...t])}const Hl=Object.freeze({x:0,y:0});function VN(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function qN(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return r-i}function k2e(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return i-r}function aM(e){let{left:t,top:r,height:i,width:a}=e;return[{x:t,y:r},{x:t+a,y:r},{x:t,y:r+i},{x:t+a,y:r+i}]}function KN(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function sM(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const A2e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const a=sM(t,t.left,t.top),o=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=VN(sM(u),a);o.push({id:l,data:{droppableContainer:s,value:c}})}}return o.sort(qN)},T2e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const a=aM(t),o=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=aM(u),d=a.reduce((x,w,v)=>x+VN(c[v],w),0),g=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:s,value:g}})}}return o.sort(qN)};function I2e(e,t){const r=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=a-i,l=o-r;if(i{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const a=[];for(const o of i){const{id:s}=o,l=r.get(s);if(l){const u=I2e(l,t);u>0&&a.push({id:s,data:{droppableContainer:o,value:u}})}}return a.sort(k2e)};function P2e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function GN(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Hl}function M2e(e){return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const O2e=M2e(1);function B2e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function U2e(e,t,r){const i=B2e(t);if(!i)return e;const{scaleX:a,scaleY:o,x:s,y:l}=i,u=e.left-s-(1-a)*parseFloat(r),c=e.top-l-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=a?e.width/a:e.width,g=o?e.height/o:e.height;return{width:d,height:g,top:c,right:u+d,bottom:c+g,left:u}}const D2e={ignoreTransform:!1};function ig(e,t){t===void 0&&(t=D2e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=Cs(e),{transform:d,transformOrigin:g}=c(e);d&&(r=U2e(r,d,g))}const{top:i,left:a,width:o,height:s,bottom:l,right:u}=r;return{top:i,left:a,width:o,height:s,bottom:l,right:u}}function lM(e){return ig(e,{ignoreTransform:!0})}function L2e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function N2e(e,t){return t===void 0&&(t=Cs(e).getComputedStyle(e)),t.position==="fixed"}function j2e(e,t){t===void 0&&(t=Cs(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const o=t[a];return typeof o=="string"?r.test(o):!1})}function ux(e,t){const r=[];function i(a){if(t!=null&&r.length>=t||!a)return r;if(TE(a)&&a.scrollingElement!=null&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!ly(a)||s2e(a)||r.includes(a))return r;const{getComputedStyle:o}=Cs(a),s=o(a);return a!==e&&j2e(a,s)&&r.push(a),N2e(a,s)?r:i(a.parentNode)}return e?i(e):r}function YN(e){const[t]=ux(e,1);return t??null}function h5(e){return!lx||!e?null:rg(e)?e:AE(e)?TE(e)||e===ng(e).scrollingElement?window:ly(e)?e:null:null}function QN(e){return rg(e)?e.scrollX:e.scrollLeft}function XN(e){return rg(e)?e.scrollY:e.scrollTop}function HS(e){return{x:QN(e),y:XN(e)}}var ka;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ka||(ka={}));function ZN(e){return!lx||!e?!1:e===document.scrollingElement}function JN(e){const t={x:0,y:0},r=ZN(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},a=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:a,isLeft:o,isBottom:s,isRight:l,maxScroll:i,minScroll:t}}const $2e={x:.2,y:.2};function F2e(e,t,r,i,a){let{top:o,left:s,right:l,bottom:u}=r;i===void 0&&(i=10),a===void 0&&(a=$2e);const{isTop:c,isBottom:d,isLeft:g,isRight:x}=JN(e),w={x:0,y:0},v={x:0,y:0},y={height:t.height*a.y,width:t.width*a.x};return!c&&o<=t.top+y.height?(w.y=ka.Backward,v.y=i*Math.abs((t.top+y.height-o)/y.height)):!d&&u>=t.bottom-y.height&&(w.y=ka.Forward,v.y=i*Math.abs((t.bottom-y.height-u)/y.height)),!x&&l>=t.right-y.width?(w.x=ka.Forward,v.x=i*Math.abs((t.right-y.width-l)/y.width)):!g&&s<=t.left+y.width&&(w.x=ka.Backward,v.x=i*Math.abs((t.left+y.width-s)/y.width)),{direction:w,speed:v}}function z2e(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:r,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:r,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function ej(e){return e.reduce((t,r)=>Jp(t,HS(r)),Hl)}function H2e(e){return e.reduce((t,r)=>t+QN(r),0)}function W2e(e){return e.reduce((t,r)=>t+XN(r),0)}function V2e(e,t){if(t===void 0&&(t=ig),!e)return;const{top:r,left:i,bottom:a,right:o}=t(e);!YN(e)||(a<=0||o<=0||r>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const q2e=[["x",["left","right"],H2e],["y",["top","bottom"],W2e]];class PE{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=ux(r),a=ej(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,l]of q2e)for(const u of s)Object.defineProperty(this,u,{get:()=>{const c=l(i),d=a[o]-c;return this.rect[u]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Pm{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...r)})},this.target=t}add(t,r,i){var a;(a=this.target)==null||a.addEventListener(t,r,i),this.listeners.push([t,r,i])}}function K2e(e){const{EventTarget:t}=Cs(e);return e instanceof t?e:ng(e)}function g5(e,t){const r=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+i**2)>t:"x"in t&&"y"in t?r>t.x&&i>t.y:"x"in t?r>t.x:"y"in t?i>t.y:!1}var tl;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(tl||(tl={}));function uM(e){e.preventDefault()}function G2e(e){e.stopPropagation()}var $i;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})($i||($i={}));const tj={start:[$i.Space,$i.Enter],cancel:[$i.Esc],end:[$i.Space,$i.Enter]},Y2e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case $i.Right:return{...r,x:r.x+25};case $i.Left:return{...r,x:r.x-25};case $i.Down:return{...r,y:r.y+25};case $i.Up:return{...r,y:r.y-25}}};class ME{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Pm(ng(r)),this.windowListeners=new Pm(Cs(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tl.Resize,this.handleCancel),this.windowListeners.add(tl.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tl.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,i=t.node.current;i&&V2e(i),r(Hl)}handleKeyDown(t){if(RE(t)){const{active:r,context:i,options:a}=this.props,{keyboardCodes:o=tj,coordinateGetter:s=Y2e,scrollBehavior:l="smooth"}=a,{code:u}=t;if(o.end.includes(u)){this.handleEnd(t);return}if(o.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:Hl;this.referenceCoordinates||(this.referenceCoordinates=d);const g=s(t,{active:r,context:i.current,currentCoordinates:d});if(g){const x=k0(g,d),w={x:0,y:0},{scrollableAncestors:v}=i.current;for(const y of v){const _=t.code,{isTop:E,isRight:A,isLeft:B,isBottom:U,maxScroll:L,minScroll:K}=JN(y),V=z2e(y),H={x:Math.min(_===$i.Right?V.right-V.width/2:V.right,Math.max(_===$i.Right?V.left:V.left+V.width/2,g.x)),y:Math.min(_===$i.Down?V.bottom-V.height/2:V.bottom,Math.max(_===$i.Down?V.top:V.top+V.height/2,g.y))},z=_===$i.Right&&!A||_===$i.Left&&!B,Y=_===$i.Down&&!U||_===$i.Up&&!E;if(z&&H.x!==g.x){const oe=y.scrollLeft+x.x,q=_===$i.Right&&oe<=L.x||_===$i.Left&&oe>=K.x;if(q&&!x.y){y.scrollTo({left:oe,behavior:l});return}q?w.x=y.scrollLeft-oe:w.x=_===$i.Right?y.scrollLeft-L.x:y.scrollLeft-K.x,w.x&&y.scrollBy({left:-w.x,behavior:l});break}else if(Y&&H.y!==g.y){const oe=y.scrollTop+x.y,q=_===$i.Down&&oe<=L.y||_===$i.Up&&oe>=K.y;if(q&&!x.x){y.scrollTo({top:oe,behavior:l});return}q?w.y=y.scrollTop-oe:w.y=_===$i.Down?y.scrollTop-L.y:y.scrollTop-K.y,w.y&&y.scrollBy({top:-w.y,behavior:l});break}}this.handleMove(t,Jp(k0(g,this.referenceCoordinates),w))}}}handleMove(t,r){const{onMove:i}=this.props;t.preventDefault(),i(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ME.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:i=tj,onActivation:a}=t,{active:o}=r;const{code:s}=e.nativeEvent;if(i.start.includes(s)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];function cM(e){return Boolean(e&&"distance"in e)}function dM(e){return Boolean(e&&"delay"in e)}class OE{constructor(t,r,i){var a;i===void 0&&(i=K2e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:s}=o;this.props=t,this.events=r,this.document=ng(s),this.documentListeners=new Pm(this.document),this.listeners=new Pm(i),this.windowListeners=new Pm(Cs(s)),this.initialCoordinates=(a=zS(o))!=null?a:Hl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(tl.Resize,this.handleCancel),this.windowListeners.add(tl.DragStart,uM),this.windowListeners.add(tl.VisibilityChange,this.handleCancel),this.windowListeners.add(tl.ContextMenu,uM),this.documentListeners.add(tl.Keydown,this.handleKeydown),r){if(cM(r))return;if(dM(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(tl.Click,G2e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tl.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:i,initialCoordinates:a,props:o}=this,{onMove:s,options:{activationConstraint:l}}=o;if(!a)return;const u=(r=zS(t))!=null?r:Hl,c=k0(a,u);if(!i&&l){if(dM(l))return g5(c,l.tolerance)?this.handleCancel():void 0;if(cM(l))return l.tolerance!=null&&g5(c,l.tolerance)?this.handleCancel():g5(c,l.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===$i.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Q2e={move:{name:"pointermove"},end:{name:"pointerup"}};class rj extends OE{constructor(t){const{event:r}=t,i=ng(r.target);super(t,Q2e,i)}}rj.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return!r.isPrimary||r.button!==0?!1:(i?.({event:r}),!0)}}];const X2e={move:{name:"mousemove"},end:{name:"mouseup"}};var WS;(function(e){e[e.RightClick=2]="RightClick"})(WS||(WS={}));class nj extends OE{constructor(t){super(t,X2e,ng(t.event.target))}}nj.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return r.button===WS.RightClick?!1:(i?.({event:r}),!0)}}];const m5={move:{name:"touchmove"},end:{name:"touchend"}};class ij extends OE{constructor(t){super(t,m5)}static setup(){return window.addEventListener(m5.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(m5.move.name,t)};function t(){}}}ij.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;const{touches:a}=r;return a.length>1?!1:(i?.({event:r}),!0)}}];var Mm;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mm||(Mm={}));var ib;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ib||(ib={}));function Z2e(e){let{acceleration:t,activator:r=Mm.Pointer,canScroll:i,draggingRect:a,enabled:o,interval:s=5,order:l=ib.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:g,threshold:x}=e;const w=exe({delta:g,disabled:!o}),[v,y]=l2e(),_=Z.exports.useRef({x:0,y:0}),E=Z.exports.useRef({x:0,y:0}),A=Z.exports.useMemo(()=>{switch(r){case Mm.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Mm.DraggableRect:return a}},[r,a,u]),B=Z.exports.useRef(null),U=Z.exports.useCallback(()=>{const K=B.current;if(!K)return;const V=_.current.x*E.current.x,H=_.current.y*E.current.y;K.scrollBy(V,H)},[]),L=Z.exports.useMemo(()=>l===ib.TreeOrder?[...c].reverse():c,[l,c]);Z.exports.useEffect(()=>{if(!o||!c.length||!A){y();return}for(const K of L){if(i?.(K)===!1)continue;const V=c.indexOf(K),H=d[V];if(!H)continue;const{direction:z,speed:Y}=F2e(K,H,A,t,x);for(const oe of["x","y"])w[oe][z[oe]]||(Y[oe]=0,z[oe]=0);if(Y.x>0||Y.y>0){y(),B.current=K,v(U,s),_.current=Y,E.current=z;return}}_.current={x:0,y:0},E.current={x:0,y:0},y()},[t,U,i,y,o,s,JSON.stringify(A),JSON.stringify(w),v,c,L,d,JSON.stringify(x)])}const J2e={x:{[ka.Backward]:!1,[ka.Forward]:!1},y:{[ka.Backward]:!1,[ka.Forward]:!1}};function exe(e){let{delta:t,disabled:r}=e;const i=$S(t);return uy(a=>{if(r||!i||!a)return J2e;const o={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[ka.Backward]:a.x[ka.Backward]||o.x===-1,[ka.Forward]:a.x[ka.Forward]||o.x===1},y:{[ka.Backward]:a.y[ka.Backward]||o.y===-1,[ka.Forward]:a.y[ka.Forward]||o.y===1}}},[r,t,i])}function txe(e,t){const r=t!==null?e.get(t):void 0,i=r?r.node.current:null;return uy(a=>{var o;return t===null?null:(o=i??a)!=null?o:null},[i,t])}function rxe(e,t){return Z.exports.useMemo(()=>e.reduce((r,i)=>{const{sensor:a}=i,o=a.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,i)}));return[...r,...o]},[]),[e,t])}var T0;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(T0||(T0={}));var VS;(function(e){e.Optimized="optimized"})(VS||(VS={}));const fM=new Map;function nxe(e,t){let{dragging:r,dependencies:i,config:a}=t;const[o,s]=Z.exports.useState(null),{frequency:l,measure:u,strategy:c}=a,d=Z.exports.useRef(e),g=_(),x=E0(g),w=Z.exports.useCallback(function(E){E===void 0&&(E=[]),!x.current&&s(A=>A===null?E:A.concat(E.filter(B=>!A.includes(B))))},[x]),v=Z.exports.useRef(null),y=uy(E=>{if(g&&!r)return fM;if(!E||E===fM||d.current!==e||o!=null){const A=new Map;for(let B of e){if(!B)continue;if(o&&o.length>0&&!o.includes(B.id)&&B.rect.current){A.set(B.id,B.rect.current);continue}const U=B.node.current,L=U?new PE(u(U),U):null;B.rect.current=L,L&&A.set(B.id,L)}return A}return E},[e,o,r,g,u]);return Z.exports.useEffect(()=>{d.current=e},[e]),Z.exports.useEffect(()=>{g||w()},[r,g]),Z.exports.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),Z.exports.useEffect(()=>{g||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{w(),v.current=null},l))},[l,g,w,...i]),{droppableRects:y,measureDroppableContainers:w,measuringScheduled:o!=null};function _(){switch(c){case T0.Always:return!1;case T0.BeforeDragging:return r;default:return!r}}}function oj(e,t){return uy(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function ixe(e,t){return oj(e,t)}function oxe(e){let{callback:t,disabled:r}=e;const i=IE(t),a=Z.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(i)},[i,r]);return Z.exports.useEffect(()=>()=>a?.disconnect(),[a]),a}function cx(e){let{callback:t,disabled:r}=e;const i=IE(t),a=Z.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(i)},[r]);return Z.exports.useEffect(()=>()=>a?.disconnect(),[a]),a}function axe(e){return new PE(ig(e),e)}function pM(e,t,r){t===void 0&&(t=axe);const[i,a]=Z.exports.useReducer(l,null),o=oxe({callback(u){if(!!e)for(const c of u){const{type:d,target:g}=c;if(d==="childList"&&g instanceof HTMLElement&&g.contains(e)){a();break}}}}),s=cx({callback:a});return zl(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),i;function l(u){if(!e)return null;if(e.isConnected===!1){var c;return(c=u??r)!=null?c:null}const d=t(e);return JSON.stringify(u)===JSON.stringify(d)?u:d}}function sxe(e){const t=oj(e);return GN(e,t)}const hM=[];function lxe(e){const t=Z.exports.useRef(e),r=uy(i=>e?i&&i!==hM&&e&&t.current&&e.parentNode===t.current.parentNode?i:ux(e):hM,[e]);return Z.exports.useEffect(()=>{t.current=e},[e]),r}function uxe(e){const[t,r]=Z.exports.useState(null),i=Z.exports.useRef(e),a=Z.exports.useCallback(o=>{const s=h5(o.target);!s||r(l=>l?(l.set(s,HS(s)),new Map(l)):null)},[]);return Z.exports.useEffect(()=>{const o=i.current;if(e!==o){s(o);const l=e.map(u=>{const c=h5(u);return c?(c.addEventListener("scroll",a,{passive:!0}),[c,HS(c)]):null}).filter(u=>u!=null);r(l.length?new Map(l):null),i.current=e}return()=>{s(e),s(o)};function s(l){l.forEach(u=>{const c=h5(u);c?.removeEventListener("scroll",a)})}},[a,e]),Z.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Jp(o,s),Hl):ej(e):Hl,[e,t])}function gM(e,t){t===void 0&&(t=[]);const r=Z.exports.useRef(null);return Z.exports.useEffect(()=>{r.current=null},t),Z.exports.useEffect(()=>{const i=e!==Hl;i&&!r.current&&(r.current=e),!i&&r.current&&(r.current=null)},[e]),r.current?k0(e,r.current):Hl}function cxe(e){Z.exports.useEffect(()=>{if(!lx)return;const t=e.map(r=>{let{sensor:i}=r;return i.setup==null?void 0:i.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function dxe(e,t){return Z.exports.useMemo(()=>e.reduce((r,i)=>{let{eventName:a,handler:o}=i;return r[a]=s=>{o(s,t)},r},{}),[e,t])}function aj(e){return Z.exports.useMemo(()=>e?L2e(e):null,[e])}const y5=[];function fxe(e,t){t===void 0&&(t=ig);const[r]=e,i=aj(r?Cs(r):null),[a,o]=Z.exports.useReducer(l,y5),s=cx({callback:o});return e.length>0&&a===y5&&o(),zl(()=>{e.length?e.forEach(u=>s?.observe(u)):(s?.disconnect(),o())},[e]),a;function l(){return e.length?e.map(u=>ZN(u)?i:new PE(t(u),u)):y5}}function pxe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ly(t)?t:e}function hxe(e){let{measure:t}=e;const[r,i]=Z.exports.useState(null),a=Z.exports.useCallback(c=>{for(const{target:d}of c)if(ly(d)){i(g=>{const x=t(d);return g?{...g,width:x.width,height:x.height}:x});break}},[t]),o=cx({callback:a}),s=Z.exports.useCallback(c=>{const d=pxe(c);o?.disconnect(),d&&o?.observe(d),i(d?t(d):null)},[t,o]),[l,u]=rb(s);return Z.exports.useMemo(()=>({nodeRef:l,rect:r,setRef:u}),[r,l,u])}const gxe=[{sensor:rj,options:{}},{sensor:ME,options:{}}],mxe={current:{}},Nv={draggable:{measure:lM},droppable:{measure:lM,strategy:T0.WhileDragging,frequency:VS.Optimized},dragOverlay:{measure:ig}};class Om extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,i;return(r=(i=this.get(t))==null?void 0:i.node.current)!=null?r:void 0}}const yxe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Om,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:nb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nv,measureDroppableContainers:nb,windowRect:null,measuringScheduled:!1},vxe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:nb,draggableNodes:new Map,over:null,measureDroppableContainers:nb},dx=Z.exports.createContext(vxe),sj=Z.exports.createContext(yxe);function bxe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Om}}}function wxe(e,t){switch(t.type){case ya.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ya.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ya.DragEnd:case ya.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ya.RegisterDroppable:{const{element:r}=t,{id:i}=r,a=new Om(e.droppable.containers);return a.set(i,r),{...e,droppable:{...e.droppable,containers:a}}}case ya.SetDroppableDisabled:{const{id:r,key:i,disabled:a}=t,o=e.droppable.containers.get(r);if(!o||i!==o.key)return e;const s=new Om(e.droppable.containers);return s.set(r,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:s}}}case ya.UnregisterDroppable:{const{id:r,key:i}=t,a=e.droppable.containers.get(r);if(!a||i!==a.key)return e;const o=new Om(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function xxe(e){let{disabled:t}=e;const{active:r,activatorEvent:i,draggableNodes:a}=Z.exports.useContext(dx),o=$S(i),s=$S(r?.id);return Z.exports.useEffect(()=>{if(!t&&!i&&o&&s!=null){if(!RE(o)||document.activeElement===o.target)return;const l=a.get(s);if(!l)return;const{activatorNode:u,node:c}=l;if(!u.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[u.current,c.current]){if(!d)continue;const g=d2e(d);if(g){g.focus();break}}})}},[i,t,a,s,o]),null}function _xe(e,t){let{transform:r,...i}=t;return e!=null&&e.length?e.reduce((a,o)=>o({transform:a,...i}),r):r}function Sxe(e){return Z.exports.useMemo(()=>({draggable:{...Nv.draggable,...e?.draggable},droppable:{...Nv.droppable,...e?.droppable},dragOverlay:{...Nv.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Cxe(e){let{activeNode:t,measure:r,initialRect:i,config:a=!0}=e;const o=Z.exports.useRef(!1),{x:s,y:l}=typeof a=="boolean"?{x:a,y:a}:a;zl(()=>{if(!s&&!l||!t){o.current=!1;return}if(o.current||!i)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),g=GN(d,i);if(s||(g.x=0),l||(g.y=0),o.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const x=YN(c);x&&x.scrollBy({top:g.y,left:g.x})}},[t,s,l,i,r])}const lj=Z.exports.createContext({...Hl,scaleX:1,scaleY:1});var Pc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pc||(Pc={}));const Exe=Z.exports.memo(function(t){var r,i,a,o;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=gxe,collisionDetection:g=R2e,measuring:x,modifiers:w,...v}=t;const y=Z.exports.useReducer(wxe,void 0,bxe),[_,E]=y,[A,B]=x2e(),[U,L]=Z.exports.useState(Pc.Uninitialized),K=U===Pc.Initialized,{draggable:{active:V,nodes:H,translate:z},droppable:{containers:Y}}=_,oe=V?H.get(V):null,q=Z.exports.useRef({initial:null,translated:null}),ae=Z.exports.useMemo(()=>{var An;return V!=null?{id:V,data:(An=oe?.data)!=null?An:mxe,rect:q}:null},[V,oe]),M=Z.exports.useRef(null),[te,ue]=Z.exports.useState(null),[he,xe]=Z.exports.useState(null),J=E0(v,Object.values(v)),ct=cy("DndDescribedBy",s),De=Z.exports.useMemo(()=>Y.getEnabled(),[Y]),ze=Sxe(x),{droppableRects:ir,measureDroppableContainers:Rt,measuringScheduled:At}=nxe(De,{dragging:K,dependencies:[z.x,z.y],config:ze.droppable}),Xt=txe(H,V),vr=Z.exports.useMemo(()=>he?zS(he):null,[he]),Et=Vn(),St=ixe(Xt,ze.draggable.measure);Cxe({activeNode:V?H.get(V):null,config:Et.layoutShiftCompensation,initialRect:St,measure:ze.draggable.measure});const xt=pM(Xt,ze.draggable.measure,St),Ut=pM(Xt?Xt.parentElement:null),Gt=Z.exports.useRef({activatorEvent:null,active:null,activeNode:Xt,collisionRect:null,collisions:null,droppableRects:ir,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),mr=Y.getNodeFor((r=Gt.current.over)==null?void 0:r.id),ne=hxe({measure:ze.dragOverlay.measure}),Pt=(i=ne.nodeRef.current)!=null?i:Xt,Dt=K?(a=ne.rect)!=null?a:xt:null,Te=Boolean(ne.nodeRef.current&&ne.rect),Ae=sxe(Te?null:xt),ot=aj(Pt?Cs(Pt):null),$t=lxe(K?mr??Xt:null),tr=fxe($t),Ot=_xe(w,{transform:{x:z.x-Ae.x,y:z.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:he,active:ae,activeNodeRect:xt,containerNodeRect:Ut,draggingNodeRect:Dt,over:Gt.current.over,overlayNodeRect:ne.rect,scrollableAncestors:$t,scrollableAncestorRects:tr,windowRect:ot}),br=vr?Jp(vr,z):null,be=uxe($t),se=gM(be),ce=gM(be,[xt]),$=Jp(Ot,se),C=Dt?O2e(Dt,Ot):null,R=ae&&C?g({active:ae,collisionRect:C,droppableRects:ir,droppableContainers:De,pointerCoordinates:br}):null,Q=KN(R,"id"),[me,je]=Z.exports.useState(null),lt=Te?Ot:Jp(Ot,ce),ur=P2e(lt,(o=me?.rect)!=null?o:null,xt),Dr=Z.exports.useCallback((An,Tn)=>{let{sensor:ht,options:Ci}=Tn;if(M.current==null)return;const qn=H.get(M.current);if(!qn)return;const Ii=An.nativeEvent,Xi=new ht({active:M.current,activeNode:qn,event:Ii,options:Ci,context:Gt,onStart(Zi){const Ro=M.current;if(Ro==null)return;const zi=H.get(Ro);if(!zi)return;const{onDragStart:ua}=J.current,le={active:{id:Ro,data:zi.data,rect:q}};il.exports.unstable_batchedUpdates(()=>{ua?.(le),L(Pc.Initializing),E({type:ya.DragStart,initialCoordinates:Zi,active:Ro}),A({type:"onDragStart",event:le})})},onMove(Zi){E({type:ya.DragMove,coordinates:Zi})},onEnd:Ho(ya.DragEnd),onCancel:Ho(ya.DragCancel)});il.exports.unstable_batchedUpdates(()=>{ue(Xi),xe(An.nativeEvent)});function Ho(Zi){return async function(){const{active:zi,collisions:ua,over:le,scrollAdjustedTranslate:Ie}=Gt.current;let Ee=null;if(zi&&Ie){const{cancelDrop:F}=J.current;Ee={activatorEvent:Ii,active:zi,collisions:ua,delta:Ie,over:le},Zi===ya.DragEnd&&typeof F=="function"&&await Promise.resolve(F(Ee))&&(Zi=ya.DragCancel)}M.current=null,il.exports.unstable_batchedUpdates(()=>{E({type:Zi}),L(Pc.Uninitialized),je(null),ue(null),xe(null);const F=Zi===ya.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const Ne=J.current[F];Ne?.(Ee),A({type:F,event:Ee})}})}}},[H]),hr=Z.exports.useCallback((An,Tn)=>(ht,Ci)=>{const qn=ht.nativeEvent,Ii=H.get(Ci);if(M.current!==null||!Ii||qn.dndKit||qn.defaultPrevented)return;const Xi={active:Ii};An(ht,Tn.options,Xi)===!0&&(qn.dndKit={capturedBy:Tn.sensor},M.current=Ci,Dr(ht,Tn))},[H,Dr]),Rr=rxe(d,hr);cxe(d),zl(()=>{xt&&U===Pc.Initializing&&L(Pc.Initialized)},[xt,U]),Z.exports.useEffect(()=>{const{onDragMove:An}=J.current,{active:Tn,activatorEvent:ht,collisions:Ci,over:qn}=Gt.current;if(!Tn||!ht)return;const Ii={active:Tn,activatorEvent:ht,collisions:Ci,delta:{x:$.x,y:$.y},over:qn};il.exports.unstable_batchedUpdates(()=>{An?.(Ii),A({type:"onDragMove",event:Ii})})},[$.x,$.y]),Z.exports.useEffect(()=>{const{active:An,activatorEvent:Tn,collisions:ht,droppableContainers:Ci,scrollAdjustedTranslate:qn}=Gt.current;if(!An||M.current==null||!Tn||!qn)return;const{onDragOver:Ii}=J.current,Xi=Ci.get(Q),Ho=Xi&&Xi.rect.current?{id:Xi.id,rect:Xi.rect.current,data:Xi.data,disabled:Xi.disabled}:null,Zi={active:An,activatorEvent:Tn,collisions:ht,delta:{x:qn.x,y:qn.y},over:Ho};il.exports.unstable_batchedUpdates(()=>{je(Ho),Ii?.(Zi),A({type:"onDragOver",event:Zi})})},[Q]),zl(()=>{Gt.current={activatorEvent:he,active:ae,activeNode:Xt,collisionRect:C,collisions:R,droppableRects:ir,draggableNodes:H,draggingNode:Pt,draggingNodeRect:Dt,droppableContainers:Y,over:me,scrollableAncestors:$t,scrollAdjustedTranslate:$},q.current={initial:Dt,translated:C}},[ae,Xt,R,C,H,Pt,Dt,ir,Y,me,$t,$]),Z2e({...Et,delta:z,draggingRect:C,pointerCoordinates:br,scrollableAncestors:$t,scrollableAncestorRects:tr});const Gr=Z.exports.useMemo(()=>({active:ae,activeNode:Xt,activeNodeRect:xt,activatorEvent:he,collisions:R,containerNodeRect:Ut,dragOverlay:ne,draggableNodes:H,droppableContainers:Y,droppableRects:ir,over:me,measureDroppableContainers:Rt,scrollableAncestors:$t,scrollableAncestorRects:tr,measuringConfiguration:ze,measuringScheduled:At,windowRect:ot}),[ae,Xt,xt,he,R,Ut,ne,H,Y,ir,me,Rt,$t,tr,ze,At,ot]),Nr=Z.exports.useMemo(()=>({activatorEvent:he,activators:Rr,active:ae,activeNodeRect:xt,ariaDescribedById:{draggable:ct},dispatch:E,draggableNodes:H,over:me,measureDroppableContainers:Rt}),[he,Rr,ae,xt,E,ct,H,me,Rt]);return Bt(WN.Provider,{value:B,children:[Bt(dx.Provider,{value:Nr,children:[N(sj.Provider,{value:Gr,children:N(lj.Provider,{value:ur,children:c})}),N(xxe,{disabled:l?.restoreFocus===!1})]}),N(C2e,{...l,hiddenTextDescribedById:ct})]});function Vn(){const An=te?.autoScrollEnabled===!1,Tn=typeof u=="object"?u.enabled===!1:u===!1,ht=K&&!An&&!Tn;return typeof u=="object"?{...u,enabled:ht}:{enabled:ht}}}),kxe=Z.exports.createContext(null),mM="button",Axe="Droppable";function Txe(e){let{id:t,data:r,disabled:i=!1,attributes:a}=e;const o=cy(Axe),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:g,over:x}=Z.exports.useContext(dx),{role:w=mM,roleDescription:v="draggable",tabIndex:y=0}=a??{},_=u?.id===t,E=Z.exports.useContext(_?lj:kxe),[A,B]=rb(),[U,L]=rb(),K=dxe(s,t),V=E0(r);zl(()=>(g.set(t,{id:t,key:o,node:A,activatorNode:U,data:V}),()=>{const z=g.get(t);z&&z.key===o&&g.delete(t)}),[g,t]);const H=Z.exports.useMemo(()=>({role:w,tabIndex:y,"aria-disabled":i,"aria-pressed":_&&w===mM?!0:void 0,"aria-roledescription":v,"aria-describedby":d.draggable}),[i,w,y,_,v,d.draggable]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:H,isDragging:_,listeners:i?void 0:K,node:A,over:x,setNodeRef:B,setActivatorNodeRef:L,transform:E}}function Ixe(){return Z.exports.useContext(sj)}const Rxe="Droppable",Pxe={timeout:25};function Mxe(e){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:a}=e;const o=cy(Rxe),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=Z.exports.useContext(dx),d=Z.exports.useRef({disabled:r}),g=Z.exports.useRef(!1),x=Z.exports.useRef(null),w=Z.exports.useRef(null),{disabled:v,updateMeasurementsFor:y,timeout:_}={...Pxe,...a},E=E0(y??i),A=Z.exports.useCallback(()=>{if(!g.current){g.current=!0;return}w.current!=null&&clearTimeout(w.current),w.current=setTimeout(()=>{c(Array.isArray(E.current)?E.current:[E.current]),w.current=null},_)},[_]),B=cx({callback:A,disabled:v||!s}),U=Z.exports.useCallback((H,z)=>{!B||(z&&(B.unobserve(z),g.current=!1),H&&B.observe(H))},[B]),[L,K]=rb(U),V=E0(t);return Z.exports.useEffect(()=>{!B||!L.current||(B.disconnect(),g.current=!1,B.observe(L.current))},[L,B]),zl(()=>(l({type:ya.RegisterDroppable,element:{id:i,key:o,disabled:r,node:L,rect:x,data:V}}),()=>l({type:ya.UnregisterDroppable,key:o,id:i})),[i]),Z.exports.useEffect(()=>{r!==d.current.disabled&&(l({type:ya.SetDroppableDisabled,id:i,key:o,disabled:r}),d.current.disabled=r)},[i,o,r,l]),{active:s,rect:x,isOver:u?.id===i,node:L,over:u,setNodeRef:K}}function uj(e,t,r){const i=e.slice();return i.splice(r<0?i.length+r:r,0,i.splice(t,1)[0]),i}function Oxe(e,t){return e.reduce((r,i,a)=>{const o=t.get(i);return o&&(r[a]=o),r},Array(e.length))}function dv(e){return e!==null&&e>=0}function Bxe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r{let{rects:t,activeIndex:r,overIndex:i,index:a}=e;const o=uj(t,i,r),s=t[a],l=o[a];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},fv={scaleX:1,scaleY:1},Dxe=e=>{var t;let{activeIndex:r,activeNodeRect:i,index:a,rects:o,overIndex:s}=e;const l=(t=o[r])!=null?t:i;if(!l)return null;if(a===r){const c=o[s];return c?{x:0,y:rr&&a<=s?{x:0,y:-l.height-u,...fv}:a=s?{x:0,y:l.height+u,...fv}:{x:0,y:0,...fv}};function Lxe(e,t,r){const i=e[t],a=e[t-1],o=e[t+1];return i?ri.map(K=>typeof K=="object"&&"id"in K?K.id:K),[i]),v=s!=null,y=s?w.indexOf(s.id):-1,_=c?w.indexOf(c.id):-1,E=Z.exports.useRef(w),A=!Bxe(w,E.current),B=_!==-1&&y===-1||A,U=Uxe(o);zl(()=>{A&&v&&d(w)},[A,w,v,d]),Z.exports.useEffect(()=>{E.current=w},[w]);const L=Z.exports.useMemo(()=>({activeIndex:y,containerId:g,disabled:U,disableTransforms:B,items:w,overIndex:_,useDragOverlay:x,sortedRects:Oxe(w,u),strategy:a}),[y,g,U.draggable,U.droppable,B,w,_,u,x,a]);return N(fj.Provider,{value:L,children:t})}const jxe=e=>{let{id:t,items:r,activeIndex:i,overIndex:a}=e;return uj(r,i,a).indexOf(t)},$xe=e=>{let{containerId:t,isSorting:r,wasDragging:i,index:a,items:o,newIndex:s,previousItems:l,previousContainerId:u,transition:c}=e;return!c||!i||l!==o&&a===s?!1:r?!0:s!==a&&t===u},Fxe={duration:200,easing:"ease"},pj="transform",zxe=A0.Transition.toString({property:pj,duration:0,easing:"linear"}),Hxe={roleDescription:"sortable"};function Wxe(e){let{disabled:t,index:r,node:i,rect:a}=e;const[o,s]=Z.exports.useState(null),l=Z.exports.useRef(r);return zl(()=>{if(!t&&r!==l.current&&i.current){const u=a.current;if(u){const c=ig(i.current,{ignoreTransform:!0}),d={x:u.left-c.left,y:u.top-c.top,scaleX:u.width/c.width,scaleY:u.height/c.height};(d.x||d.y)&&s(d)}}r!==l.current&&(l.current=r)},[t,r,i,a]),Z.exports.useEffect(()=>{o&&s(null)},[o]),o}function hj(e){let{animateLayoutChanges:t=$xe,attributes:r,disabled:i,data:a,getNewIndex:o=jxe,id:s,strategy:l,resizeObserverConfig:u,transition:c=Fxe}=e;const{items:d,containerId:g,activeIndex:x,disabled:w,disableTransforms:v,sortedRects:y,overIndex:_,useDragOverlay:E,strategy:A}=Z.exports.useContext(fj),B=Vxe(i,w),U=d.indexOf(s),L=Z.exports.useMemo(()=>({sortable:{containerId:g,index:U,items:d},...a}),[g,a,U,d]),K=Z.exports.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:V,node:H,isOver:z,setNodeRef:Y}=Mxe({id:s,data:L,disabled:B.droppable,resizeObserverConfig:{updateMeasurementsFor:K,...u}}),{active:oe,activatorEvent:q,activeNodeRect:ae,attributes:M,setNodeRef:te,listeners:ue,isDragging:he,over:xe,setActivatorNodeRef:J,transform:ct}=Txe({id:s,data:L,attributes:{...Hxe,...r},disabled:B.draggable}),De=a2e(Y,te),ze=Boolean(oe),ir=ze&&!v&&dv(x)&&dv(_),Rt=!E&&he,At=Rt&&ir?ct:null,vr=ir?At??(l??A)({rects:y,activeNodeRect:ae,activeIndex:x,overIndex:_,index:U}):null,Et=dv(x)&&dv(_)?o({id:s,items:d,activeIndex:x,overIndex:_}):U,St=oe?.id,xt=Z.exports.useRef({activeId:St,items:d,newIndex:Et,containerId:g}),Ut=d!==xt.current.items,Gt=t({active:oe,containerId:g,isDragging:he,isSorting:ze,id:s,index:U,items:d,newIndex:xt.current.newIndex,previousItems:xt.current.items,previousContainerId:xt.current.containerId,transition:c,wasDragging:xt.current.activeId!=null}),mr=Wxe({disabled:!Gt,index:U,node:H,rect:V});return Z.exports.useEffect(()=>{ze&&xt.current.newIndex!==Et&&(xt.current.newIndex=Et),g!==xt.current.containerId&&(xt.current.containerId=g),d!==xt.current.items&&(xt.current.items=d)},[ze,Et,g,d]),Z.exports.useEffect(()=>{if(St===xt.current.activeId)return;if(St&&!xt.current.activeId){xt.current.activeId=St;return}const Pt=setTimeout(()=>{xt.current.activeId=St},50);return()=>clearTimeout(Pt)},[St]),{active:oe,activeIndex:x,attributes:M,data:L,rect:V,index:U,newIndex:Et,items:d,isOver:z,isSorting:ze,isDragging:he,listeners:ue,node:H,overIndex:_,over:xe,setNodeRef:De,setActivatorNodeRef:J,setDroppableNodeRef:Y,setDraggableNodeRef:te,transform:mr??vr,transition:ne()};function ne(){if(mr||Ut&&xt.current.newIndex===U)return zxe;if(!(Rt&&!RE(q)||!c)&&(ze||Gt))return A0.Transition.toString({...c,property:pj})}}function Vxe(e,t){var r,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(i=e?.droppable)!=null?i:t.droppable}}function ob(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const qxe=[$i.Down,$i.Right,$i.Up,$i.Left],Kxe=(e,t)=>{let{context:{active:r,collisionRect:i,droppableRects:a,droppableContainers:o,over:s,scrollableAncestors:l}}=t;if(qxe.includes(e.code)){if(e.preventDefault(),!r||!i)return;const u=[];o.getEnabled().forEach(g=>{if(!g||g!=null&&g.disabled)return;const x=a.get(g.id);if(!!x)switch(e.code){case $i.Down:i.topx.top&&u.push(g);break;case $i.Left:i.left>x.left&&u.push(g);break;case $i.Right:i.left1&&(d=c[1].id),d!=null){const g=o.get(r.id),x=o.get(d),w=x?a.get(x.id):null,v=x?.node.current;if(v&&w&&g&&x){const _=ux(v).some((K,V)=>l[V]!==K),E=gj(g,x),A=Gxe(g,x),B=_||!E?{x:0,y:0}:{x:A?i.width-w.width:0,y:A?i.height-w.height:0},U={x:w.left,y:w.top};return B.x&&B.y?U:k0(U,B)}}}};function gj(e,t){return!ob(e)||!ob(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Gxe(e,t){return!ob(e)||!ob(t)||!gj(e,t)?!1:e.data.current.sortable.indext(!0),a=()=>t(!1);return Z.exports.useEffect(()=>{const o=r.current;if(o)return o.addEventListener("mouseover",i),o.addEventListener("mouseout",a),()=>{o.removeEventListener("mouseover",i),o.removeEventListener("mouseout",a)}},[r.current]),{hoverRef:r,isHover:e}}const Qxe="/assets/delete.42fb1897.svg",Xxe="/assets/dnd.dcf4594c.svg",Zxe=Qi("input")({display:"flex",alignItems:"center",width:300,height:44,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",paddingLeft:10,outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),Ya=Qi(jC)({border:"none",padding:0}),kp=Qi(jC)({fontWeight:700}),Il=Qi("hr")({display:"block",width:"100%",height:1,backgroundColor:"#ccc",border:"none"}),Jxe=e=>e.replace(/\/+/g,"/").replace(/^\/[^\/]/,"").replace(/\/$/,"");function yM({file:e,pos:t,isHover:r}){const i=e.fileObj.name,{attributes:a,listeners:o}=hj({id:i}),s=sa(),l=ra(s.breakpoints.down("lg")),{setInclueInCommand:u,setDirectory:c,removeFile:d}=Tu(),{data:g}=Iu(),x=!!g?.result?.msgCell;return Bt(Eo,{children:[N(Ya,{sx:{paddingLeft:1},...a,...o,children:Bt(jn,{sx:{color:"#D8D8D8"},children:[t,".",N(jn,{ml:5,style:{cursor:"pointer",visibility:r?"visible":"hidden"},children:N("img",{src:Xxe,alt:"Drag n drop icon",width:24,height:24})})]})}),N(Ya,{children:N(Zxe,{disabled:x,value:e.folder,onBlur:w=>{c(i,Jxe(w.target.value))},onChange:w=>{c(i,w.target.value)}})}),N(Ya,{sx:{paddingLeft:l?2:0},children:Bt(jn,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"flex-start"},children:[N(Io,{sx:{fontSize:14},children:e.fileObj.name}),Bt(Io,{sx:{fontSize:12,color:"#C1C1C1"},children:[e.fileObj.size," bytes"]})]})}),N(Ya,{children:N(Sne,{disabled:x,checked:e.includeInCommand,onChange:w=>{u(i,w.target.checked)}})}),N(Ya,{align:"right",children:N(qs,{sx:{visibility:r?"visible":"hidden",opacity:.5,cursor:"pointer",marginRight:1},onClick:()=>{d(i)},children:N("img",{src:Qxe,alt:"Delete icon",width:18,height:18})})})]})}function e_e({file:e,pos:t}){const r=e.fileObj.name,{hoverRef:i,isHover:a}=Yxe(),{data:o}=Iu(),s=!!o?.result?.msgCell,{setNodeRef:l,transform:u,transition:c,isDragging:d}=hj({id:r}),g={transform:A0.Transform.toString(u),transition:c};return s?N(ac,{sx:{height:60},children:N(yM,{file:e,pos:t,isDragging:!1,isHover:!1})}):N(ac,{sx:{height:60,transition:".15s all","&:hover":{background:"#FAFAFA"}},ref:x=>{l(x),i.current=x},style:g,children:N(yM,{file:e,pos:t,isDragging:d,isHover:a})},r)}function t_e(){const{files:e,reorderFiles:t}=Tu(),{data:r}=Iu(),i=sa(),a=ra(i.breakpoints.down("lg")),o=!!r?.result?.msgCell,s=E2e(p5(nj,{}),p5(ij,{}),p5(ME,{coordinateGetter:Kxe}));function l(u){const{active:c,over:d}=u;c.id!==d.id&&t(c.id,d.id)}return N(Exe,{sensors:s,collisionDetection:A2e,onDragEnd:l,modifiers:[h2e,p2e],children:N(tie,{children:Bt(LC,{sx:{minWidth:650},children:[Bt(IU,{sx:{"&.MuiTableHead-root th":{border:"none"}},children:[Bt(ac,{sx:{fontWeight:700},children:[N(kp,{sx:{paddingLeft:0,paddingBottom:a?0:2,width:100},children:"Order"}),N(kp,{sx:{paddingLeft:0,paddingBottom:a?0:2},children:"Directory"}),N(kp,{sx:{paddingLeft:a?2:0,width:300,paddingBottom:a?0:2},children:"File"}),N(kp,{sx:{paddingLeft:0,width:150,paddingBottom:a?0:2},children:"Include in command"}),N(kp,{sx:{paddingLeft:0,width:100,paddingBottom:a?0:2}})]}),Bt(ac,{children:[N(Ya,{sx:{paddingBottom:a?0:2},children:N(Il,{})}),N(Ya,{sx:{paddingBottom:a?0:2},children:N(Il,{})}),N(Ya,{sx:{paddingBottom:a?0:2},children:N(Il,{})}),N(Ya,{sx:{paddingBottom:a?0:2},children:N(Il,{})}),N(Ya,{sx:{paddingBottom:a?0:2},children:N(Il,{})})]})]}),N(NC,{children:N(Nxe,{disabled:o,items:e.map(u=>u.fileObj.name),strategy:Dxe,children:e.map((u,c)=>N(e_e,{file:u,pos:c+1},u.fileObj.name))})})]})})})}const v5=Qi(pU)({flexGrow:1}),b5=Qi(kU)(({theme:e})=>({borderRadius:e.spacing(1.2),height:e.spacing(5.3),minWidth:150,".MuiOutlinedInput-notchedOutline":{border:"1px solid #D8D8D8"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #807e7e"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #b0b0b0"}})),pv=Qi(hU)(({theme:e})=>({color:"#000",fontSize:12,marginLeft:e.spacing(1),marginBottom:e.spacing(1)})),r_e=Qi("input")(({theme:e})=>({display:"flex",alignItems:"center",boxSizing:"border-box",width:"100%",flex:2,height:e.spacing(5.3),borderRadius:e.spacing(1.2),border:"1px solid #D8D8D8",outline:"none",padding:"0 40px 0 125px",color:"#000",background:"transparent",fontFamily:"Mulish",fontSize:14,"&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}})),n_e="/assets/undo.944d3e45.svg";function i_e(){const{compilerSettings:e,setOverrideCommandLine:t,setFuncCliVersion:r,setTactCliVersion:i,compiler:a,setCompiler:o}=dE(),{data:s}=Iu(),l=sa(),u=ra(l.breakpoints.down("md")),c=!!s?.result?.msgCell,{data:{funcVersions:d,tactVersions:g}}=cE();return Bt(aa,{mt:4,children:[N(Io,{variant:"h5",style:{fontWeight:800,fontSize:16,marginBottom:16},children:"Compiler"}),Bt(jn,{sx:{gap:1,alignItems:u?"center":"flex-end",flexDirection:u?"column":"inherit"},children:[N(jn,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Bt(v5,{children:[N(pv,{children:"Compiler"}),Bt(b5,{value:a,onChange:x=>{o(x.target.value)},children:[N(kg,{value:"func",children:"func"}),N(kg,{value:"tact",children:"tact"}),{}.VITE_ALLOW_FIFT&&N(kg,{value:"fift",children:"fift"})]})]})}),a==="func"&&Bt(Eo,{children:[N(jn,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Bt(v5,{disabled:c,children:[N(pv,{children:"Version"}),N(b5,{value:e.funcVersion,onChange:x=>{r(x.target.value)},children:d?.map(x=>N(kg,{value:x,children:x},x))})]})}),Bt(aa,{sx:{width:"100%",position:"relative"},children:[N(pv,{sx:{display:"block"},children:"Func command"}),N(r_e,{disabled:c,value:e.commandLine,onChange:x=>{t(x.target.value)}}),N(XZ,{sx:{position:"absolute",left:3,top:28,height:37,background:"#F5F5F5",borderRadius:1.5,color:"#000",fontSize:14},label:"func -o tmp.fif"}),!!e.overrideCommandLine&&N(qs,{sx:{color:"blue",position:"absolute",right:10,top:31},onClick:()=>{t(null)},children:N("img",{src:n_e,alt:"Undo icon",width:15,height:15})})]})]}),a==="tact"&&N(Eo,{children:N(jn,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Bt(v5,{disabled:c,children:[N(pv,{children:"Version"}),N(b5,{value:e.tactVersion,disabled:!0,children:g?.map(x=>N(kg,{value:x,children:x},x))})]})})})]})]})}const o_e="/assets/reorder-hint.5f3a54fb.svg",a_e="/assets/light-bulb.7768be40.svg",mj="/assets/like.af7e7b33.svg",s_e=ar(Cn)({maxWidth:1160,width:"calc(100% - 50px)",margin:"auto"}),l_e=ar(Cn)({display:"flex",justifyContent:"space-between",height:73}),u_e=ar(Cn)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),c_e=ar(Cn)(({theme:e})=>({display:"flex",flexWrap:"wrap",justifyContent:"space-between",marginTop:e.spacing(3),marginBottom:e.spacing(2),color:"#728A96",fontSize:14,[e.breakpoints.down("md")]:{"& > *":{marginBottom:`${e.spacing(1)} !important`}}})),d_e=ar("hr")({height:"1px",backgroundColor:"#e6e6e6",border:"none"}),vM=ar(Ku)(({theme:e})=>({display:"inline-flex",alignItems:"center",color:"inherit",textDecoration:"none",[e.breakpoints.down("md")]:{justifyContent:"flex-end"}})),dy=ar(Cn)({display:"flex",justifyContent:"center",alignItems:"center"}),f_e=ar(dy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"100%",flex:2,order:3}})),yj=ar(dy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"50%"}})),p_e=ar(yj)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"start"},[e.breakpoints.down("sm")]:{minWidth:100}})),h_e=ar(yj)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"end"},[e.breakpoints.down("sm")]:{minWidth:100}})),g_e="/assets/heart.52fe96d0.svg",m_e="/assets/orbs.eb35e74b.svg",y_e="/assets/telegram.bcba2ca3.svg",v_e="/assets/telegram-hover.72b9d3ce.svg",b_e="/assets/github-footer.0bd3bbab.svg",w_e="/assets/github-hover.33daf3ef.svg",bM=ar(Cn)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",width:t.spacing(3),height:t.spacing(3),background:`url(${e.iconUrl})`,"&:hover":{transitionDuration:".25s",background:`url(${e.disabled?e.iconUrl:e.hoveredIconUrl})`,cursor:e.disabled?"cursor":"pointer"}})),wM=({iconUrl:e,hoveredIconUrl:t,link:r})=>r.length?N(Ku,{target:"_blank",href:r,children:N(bM,{iconUrl:e,hoveredIconUrl:t})}):N(bM,{iconUrl:e,hoveredIconUrl:t,disabled:!0});function vj(){const e=Q4(),[t,r]=Pb();return()=>{t.has("testnet")?t.delete("testnet"):t.append("testnet",""),r(t),e(0)}}function BE(){const e=vj();return N(Cn,{sx:{background:"red",color:"white",py:2},children:Bt(ox,{sx:{gap:4,px:4},children:[N(Io,{sx:{fontWeight:"bold",flexGrow:1},children:"Testnet"}),N(Io,{onClick:()=>{e()},sx:{cursor:"pointer"},children:"Switch to mainnet"})]})})}const qS="https://t.me/tonverifier";function ab(){const e=ra("(max-width: 450px)"),t=fc(),r=vj();return Bt(s_e,{children:[Bt(l_e,{mb:e?5:"inherit",sx:{flexDirection:e?"column":"inherit",alignItems:e?"center":"inherit"},children:[N(jn,{children:Bt(Ff,{sx:{color:"#000"},onClick:()=>t("/"),children:[N("img",{src:Mb,alt:"App icon",width:30,height:30}),N(k2,{children:"TON VERIFIER"})]})}),Bt(u_e,{children:[N(wM,{iconUrl:y_e,hoveredIconUrl:v_e,link:qS}),N(wM,{iconUrl:b_e,hoveredIconUrl:w_e,link:"https://github.com/orbs-network/ton-contract-verifier"})]})]}),N(d_e,{}),Bt(c_e,{children:[N(p_e,{children:N(Io,{variant:"body2",children:"\xA9 2023"})}),N(f_e,{children:Bt(jn,{sx:{gap:.1},children:["Contributed with",N(jn,{mx:.4,children:N("img",{src:g_e,alt:"Heart",width:12,height:12})}),"by",N(jn,{mx:.4,children:N("img",{src:m_e,alt:"Orbs logo",width:12,height:12})}),N(vM,{sx:{color:"#5E75E8"},target:"_blank",href:"https://orbs.com/powered-by",children:"Orbs"})]})}),Bt(h_e,{children:[N(vM,{target:"_blank",href:qS,children:N(Io,{variant:"body2",children:"Support"})}),!window.isTestnet&&N(Io,{onClick:()=>{r()},sx:{ml:2,cursor:"pointer"},variant:"body2",children:"Switch to Testnet"})]})]})]})}const x_e=ar("li")({maxWidth:650,fontSize:14,fontWeight:400,marginBottom:10});function __e(e,t){switch(e){case Ma.ENTRYPOINT_MISSING:return"There usually should be at least one file containing an entrypoint (recv_internal, main)";case Ma.STDLIB_ORDER:return"stdlib.fc should usually be the first file in the list (unless it's imported from another file)";case Ma.STDLIB_MISSING:return"You can try to add stdlib.fc to your sources.";case Ma.NOT_SIMILAR:return"Source code compiles correctly but does not match the on-chain contract hash. Make sure you are using the correct compiler version, command line and file order.";case Ma.FILE_ORDER:return"Make sure all files in the command line are in the correct order";case Ma.COMPILER_VERSION:return"Try to use the same compiler version as the contract was compiled with";case Ma.REQUIRED_FILES:return"Make sure all required files are included in the command line";case Ma.SUPPORT_GROUP:return Bt("div",{children:["If you are still facing issues, you can use the"," ",N(Ku,{target:"_blank",href:qS,sx:{textDecoration:"none",cursor:"pointer"},children:"Telegram support group"})]})}}const S_e=({hint:e})=>{const{data:t}=Iu();return N(x_e,{children:__e(e,t?.result.compileResult)})},vd=ar(Io)({fontSize:14,fontWeight:400,marginBottom:"10px"}),xM=ar(Io)({fontSize:14,fontWeight:700}),bj=ar(Io)({fontSize:14,fontWeight:400}),_M=ar(jn)({padding:"20px 30px",paddingLeft:0,"&:hover":{background:"transparent"}}),SM=ar(hN)({minWidth:200,fontSize:14,fontWeight:600}),C_e=ar(aa)({borderBottom:"1px solid rgba(0, 0, 0, 0.2)"}),CM=ar(gN)({color:"#000",fontSize:14,fontWeight:400});function E_e(){const{data:e,error:t}=Iu(),{data:r}=Jf(),i=e?.result?.compileResult,a=e?.hints??[];return Bt(aa,{my:3,children:[["similar"].includes(i?.result??"")&&N(gs,{singleLine:!0,type:os.SUCCESS,title:Bt(jn,{sx:{height:42},children:[N(jn,{mr:1,children:N("img",{src:mj,alt:"Like icon",width:31,height:31})}),Bt(bj,{children:[" ",N("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:N(aa,{})}),["not_similar"].includes(i?.result??"")&&N(gs,{type:os.ERROR,title:Bt(jn,{children:[N(jn,{mr:1,children:N("img",{src:o_e,alt:"Reorder icon",width:39,height:26})}),N(xM,{children:"Hashes are not similar"})]}),notificationBody:Bt(aa,{sx:{display:"flex",flexDirection:"column"},children:[Bt(_M,{children:[N(SM,{children:"Contract hash"}),N(CM,{children:r?.codeCellHash.base64??"-"})]}),N(C_e,{}),Bt(_M,{children:[N(SM,{children:"Compile output hash"}),N(CM,{children:i?.hash??"-"})]})]})}),i?.error&&N(gs,{type:os.ERROR,title:Bt(vd,{children:[N("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:N(aa,{sx:{overflow:"auto",maxHeight:300},children:N("div",{children:N("code",{children:i.error})})})}),!!t&&N(gs,{type:os.ERROR,title:Bt(vd,{children:[N("span",{style:{color:"#FC5656"},children:"Error: "}),"Server error"]}),notificationBody:N(aa,{sx:{overflow:"auto",maxHeight:300},children:N("div",{children:N("code",{children:t.toString()})})})}),a.length>0&&N(gs,{type:os.HINT,title:Bt(jn,{mb:2,children:[N(jn,{mr:1,children:N("img",{src:a_e,alt:"Light bulb icon",width:21,height:22})}),N(xM,{children:"Possible reasons for failure"})]}),notificationBody:N("ul",{style:{paddingLeft:25},children:a.map(o=>N(S_e,{hint:o},o))})})]})}function UE(){const[e]=Q2();return N(La,{background:"#1976d2",hoverBackground:"#156cc2",height:37,fontSize:14,fontWeight:700,textColor:"#fff",type:"button",onClick:()=>e.connectWallet(),children:"Connect wallet"})}const k_e=Qi(aa)({padding:"15px 24px"});function A_e(){const e=X2(),{hasFiles:t}=Tu(),{step:r,proceedToPublish:i,toggleSection:a,currentSection:o}=sx(),{mutate:s,data:l,error:u,isLoading:c,compileStatus:d}=Iu(),g=!!l?.result?.msgCell,x=()=>a(Vu.SOURCES);return Bt(Dh,{children:[N(aa,{sx:{cursor:r===Zu.PUBLISH&&g?"pointer":"inherit"},onClick:x,children:N(o2e,{})}),o===Vu.SOURCES&&N(z0,{in:o===Vu.SOURCES,children:N(k_e,{children:Bt(Eo,{children:[t()&&Bt(Eo,{children:[N(t_e,{}),N(i_e,{})]}),(l||u)&&N(E_e,{}),t()&&N(jn,{sx:{justifyContent:"center"},mt:3,mb:"9px",children:e?l?.result?.msgCell?N(La,{disabled:r===Zu.PUBLISH,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:i,children:"Ready to publish"}):Bt(La,{disabled:!t(),fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(null)},children:[c&&N(Aw,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Compile"]}):N(UE,{})})]})})})]})}const T_e=ar(Ew)({borderRadius:40,fontFamily:"inherit",fontWeight:700,textTransform:"none",background:"#0088CC","&:disabled":{backgroundColor:"#e0e0e0"}});function eh(e){return N(T_e,{disableElevation:!0,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,variant:"contained",disabled:e.disabled,onClick:e.disabled?void 0:e.onClick,...e,children:e.text})}const I_e="/assets/publish.83df630b.svg";function R_e(){const{data:e}=Iu(),{sendTXN:t,status:r,clearTXN:i}=FL(),{step:a,toggleSection:o,currentSection:s}=sx();Tu();const l=!!e?.result?.msgCell;let u;const c=()=>a===Zu.PUBLISH&&l&&o(Vu.PUBLISH);switch(r){case"initial":u=N("span",{children:"To store your contract\u2019s verification proof on-chain, you will need to issue a transaction. This will cost 0.5 TON"});break;case"rejected":u="Transaction rejected, please retry.";break;case"pending":u="Check your wallet for a pending transaction.";break;case"issued":u="Transaction issued, monitoring proof deployment on-chain.";break;case"success":u="Your contract is now verified! Click below to view it.";break;case"expired":u="Transaction expired, please retry.";break;case"error":u="The transaction is taking too long to complete or have failed. Please use a blockchain explorer to monitor it. You can also use our telegram support group."}return Bt(Dh,{mb:6,children:[Bt(jn,{p:s===Vu.PUBLISH?"30px 24px 0 24px":"20px 24px",onClick:c,sx:{opacity:a===Zu.PUBLISH&&l?1:.25,cursor:a===Zu.PUBLISH&&l?"pointer":"inherit"},children:[N(Lh,{children:N("img",{src:r==="success"?zN:I_e,alt:"publish icon",width:41,height:41})}),N(Sd,{children:"Publish"})]}),s===Vu.PUBLISH&&l&&N(z0,{in:s===Vu.PUBLISH,children:Bt(aa,{children:[N(aa,{sx:{padding:"0 30px"},children:N(gs,{type:os.INFO,title:N(Eo,{}),notificationBody:N(jn,{sx:{overflow:"auto",maxHeight:300},children:N(vd,{sx:{marginBottom:0},children:u})})})}),Bt(jn,{mb:3,sx:{justifyContent:"center"},children:[r!=="success"&&Bt(La,{disabled:r==="pending"||r==="issued",fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{t()},children:[(r==="pending"||r==="issued")&&N(Aw,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Publish"]}),r==="success"&&N(eh,{sx:{height:44},text:"View verified contract",onClick:()=>{location.reload()}})]})]})})]})}const P_e="/assets/verification-alert.0ebcec4f.svg",M_e="/assets/verification-binary.d6844d86.svg",O_e="/assets/verification-bomb.3bf48d9c.svg",B_e="/assets/verification-paper.34a39e79.svg",U_e="/assets/show.836c8f4f.svg",D_e="/assets/verification.fbd44dba.svg",L_e=Qi(qs)(()=>({color:"#000"})),N_e=Qi(aa)({display:"flex",alignItems:"center",flexDirection:"column","& .title":{texAlign:"center",fontWeight:500,fontSize:20,marginBottom:20},"& .base-button":{height:40,marginTop:30}});function j_e({open:e,onClose:t,children:r,backgroundColor:i="rgba(48, 48, 48, 0.4)",blur:a=!0,className:o="",maxWidth:s,hideCloseButton:l,paddingTop:u}){return N(BC,{className:`${o} ${a&&"popup-filter"}`,fullWidth:!0,onClose:t,open:e,PaperProps:{style:{maxWidth:s||"unset",width:"100%",borderRadius:"10px",padding:0,overflow:"unset",margin:20}},BackdropProps:{style:{backgroundColor:i}},children:Bt(aa,{sx:{overflow:"scroll","::-webkit-scrollbar":{display:"none"}},children:[!l&&N(aa,{sx:{display:"flex",justifyContent:"end",width:"100%"},children:N(L_e,{onClick:t,children:N(C6,{style:{width:23,height:23}})})}),N(N_e,{px:3,pb:3,pt:u?3:0,children:r})]})})}const $_e="/assets/verification-popup.1a3fc640.svg",F_e=ar(LC)({overflow:"scroll",background:"#F7F9FB",borderRadius:"5px",width:"100%"}),z_e=ar(Cn)({background:"#F7F9FB",borderRadius:"5px",width:"100%"}),H_e=ar(IU)({"&.MuiTableHead-root th":{border:"none",fontSize:13}}),W_e=ar(ac)({fontWeight:700}),xp=ar(kp)({paddingLeft:0,paddingBottom:"2px"}),_p=ar(Ya)({paddingBottom:10}),V_e=ar(jn)({width:59,height:21,background:"#08D088",borderRadius:40,color:"#fff",justifyContent:"space-around",fontSize:12}),Fc=ar(Ya)({paddingBottom:16}),q_e=ar(Ku)({textDecoration:"none",cursor:"pointer",color:"#0088CC"}),K_e=ar(Cn)({width:"100%",display:"flex",justifyContent:"flex-end"}),w5=ar(Io)({color:"#728A96",fontSize:14}),G_e=ar(Sd)({fontSize:18,fontWeight:800,color:"#000",textAlign:"center"}),Y_e=ar(Cn)({display:"inline-flex",alignItems:"center",height:"20px",padding:"0 7px",background:"rgba(146, 146, 146, 0.3)",borderRadius:"10px",color:"#212121",fontWeight:400,fontSize:"14px",fontFamily:"IBM Plex Mono, monospace"});ar(Y_e)({position:"relative",top:5,display:"inline-block",whiteSpace:"nowrap",lineHeight:"20px",width:"100%",maxWidth:600,overflow:"hidden",textOverflow:"ellipsis"});const Q_e="/assets/verified.4e0dc210.svg",Xg=()=>N(qa,{width:"85%",variant:"text",sx:{transform:"none",background:"#e6e8eb"}}),X_e=()=>Bt(H_e,{children:[Bt(W_e,{children:[N(xp,{sx:{width:80,paddingLeft:3},children:"Status"}),N(xp,{sx:{width:370},children:"Public Key"}),N(xp,{sx:{width:35}}),N(xp,{sx:{width:105},children:"IP"}),N(xp,{sx:{width:150},children:"Verification date"}),N(xp,{sx:{width:100},children:"Verifier"})]}),Bt(ac,{children:[N(_p,{children:N(Il,{})}),N(_p,{children:N(Il,{})}),N(_p,{children:N(Il,{})}),N(_p,{children:N(Il,{})}),N(_p,{children:N(Il,{})}),N(_p,{children:N(Il,{})})]})]}),EM=()=>Bt(ac,{children:[N(Ya,{sx:{paddingLeft:3,paddingBottom:2},children:N(Xg,{})}),N(Fc,{children:N(Xg,{})}),N(Fc,{children:N(qa,{width:25,variant:"text",sx:{transform:"none",background:"#e6e8eb"}})}),N(Fc,{children:N(Xg,{})}),N(Fc,{children:N(Xg,{})}),N(Ya,{sx:{paddingRight:3,paddingBottom:2},children:N(Xg,{})})]}),Z_e=({pubKey:e,endpoint:t,name:r,onCopy:i,date:a,url:o})=>Bt(ac,{children:[N(Ya,{sx:{paddingLeft:3,paddingBottom:2},children:Bt(V_e,{px:1,children:[N("img",{src:Q_e,alt:"Verified icon",width:11,height:11}),"Verified"]})}),N(Fc,{children:N(w5,{children:e})}),N(Fc,{children:N(qs,{onClick:()=>i(e),sx:{padding:.5},children:N("img",{src:ix,alt:"Copy icon",width:16,height:16})})}),N(Fc,{children:N(w5,{children:t})}),N(Fc,{children:N(w5,{children:a})}),N(Ya,{sx:{paddingRight:3,paddingBottom:2},children:N(jn,{children:N(q_e,{target:"_blank",href:o,children:r})})})]});function J_e(){const{data:e,isLoading:t,error:r}=mc(),{data:i,isLoading:a,error:o}=oy(),{showNotification:s}=ey(),l=i?.find(c=>c.name===window.verifierId),u=Z.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Bt(Cn,{sx:{overflow:"scroll",borderRadius:"5px","::-webkit-scrollbar":{display:"none"}},children:[Bt(F_e,{sx:{minWidth:900},children:[N(X_e,{}),N(NC,{children:t||a?Bt(Eo,{children:[N(EM,{}),N(EM,{})]}):l&&e&&Object.entries(l.pubKeyEndpoints).map(([c,d])=>N(Z_e,{pubKey:c,onCopy:u,url:l.url,date:e?.verificationDate?.toLocaleDateString()||"",endpoint:d,name:l.name},c))})]}),(!!r||!!o)&&`${r} ${o} (App notification)`]})}const e5e="modulepreload",t5e=function(e){return"/"+e},kM={},Zg=function(t,r,i){if(!r||r.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=t5e(o),o in kM)return;kM[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let d=a.length-1;d>=0;d--){const g=a[d];if(g.href===o&&(!s||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":e5e,s||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),s)return new Promise((d,g)=>{c.addEventListener("load",d),c.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};var jv=(e=>(e.VALID="VALID",e.WASM="WebAssembly is not supported",e.COMPILER="Only FunC contracts can be verified",e.VERSION="FunC version is not supported",e))(jv||{});const r5e=["0.2.0","0.3.0","0.4.0","0.4.1"];function n5e(){const{data:e}=mc(),{data:t}=Jf(),[r,i]=Z.exports.useState(null),[a,o]=Z.exports.useState(!1),[s,l]=Z.exports.useState(null),u=async()=>{ma(ca.IN_BROWSER_COMPILE_START),i(null),o(!0);const{FuncCompiler:g}=await Zg(()=>import("./index.d713f301.js").then(A=>A.i),[]),x=e?.files?.map(A=>({filename:A.name,content:A.content}))??[],w=e?.compilerSettings?.funcVersion;if(!w){i("FunC is not available for in-browser verification"),o(!1);return}let v;switch(w){case"0.2.0":{let{object:A}=await Zg(()=>import("./index.fbca1507.js").then(B=>B.i),[]);v=A;break}case"0.3.0":{let{object:A}=await Zg(()=>import("./index.f65cb428.js").then(B=>B.i),[]);v=A;break}case"0.4.0":{let{object:A}=await Zg(()=>import("./index.fb59a6c3.js").then(B=>B.i),[]);v=A;break}case"0.4.1":{let{object:A}=await Zg(()=>import("./index.bf0da248.js").then(B=>B.i),[]);v=A;break}}let _=await new g(v).compileFunc({sources:x,targets:(e?.compilerSettings).commandLine.split(" ").filter(A=>A.match(/\.(fc|func)$/))});if(_.status==="error"){i(_.message),o(!1),ma(ca.IN_BROWSER_COMPILE_ERROR);return}const E=Qn.Cell.fromBoc(Buffer.from(_.codeBoc,"base64"))[0];o(!1),t?.codeCellHash.base64===E.hash().toString("base64")&&l(E.hash().toString("base64")),ma(ca.IN_BROWSER_COMPILE_SUCCESS)},c=()=>aN()?e?.compiler!=="func"?"Only FunC contracts can be verified":d()?"VALID":"FunC version is not supported":"WebAssembly is not supported",d=()=>r5e.some(g=>g===e?.compilerSettings?.funcVersion);return{verifyContract:u,isVerificationEnabled:c,loading:a,error:r,hash:s}}function i5e(){const{verifyContract:e,isVerificationEnabled:t,error:r,loading:i,hash:a}=n5e(),o=sa(),s=ra(o.breakpoints.down("md"));return Bt(Cn,{p:2,children:[Bt(Io,{sx:{fontSize:14},children:["You are not required to rely on third-party validators. You can now verify this contract by yourself by having your browser download the sources and compile them locally in-browser using"," ",N(Ku,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/func-js",target:"_blank",children:"WASM"}),".",!t1e()&&N(jn,{mt:1,sx:{overflow:"auto",maxHeight:300},children:Bt(vd,{sx:{margin:0},children:["The web page you're looking at is"," ",N(Ku,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/contract-verifier",target:"_blank",children:"open source"}),", you can also fork or run it locally if you wish to have absolute control."]})})]}),t()!==jv.VALID?N(AU,{arrow:!0,title:N(Io,{sx:{fontSize:13},children:t()}),placement:"top",children:N(Cn,{sx:{width:144,margin:"auto"},children:N(La,{onClick:()=>e(),disabled:t()!==jv.VALID||i||!!a,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:"Verify"})})}):Bt(La,{onClick:()=>e(),disabled:t()!==jv.VALID||i||!!a,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:[i&&N(Aw,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Verify"]}),r&&Bt(Eo,{children:[N(gs,{noBottomMargin:!0,type:os.ERROR,title:Bt(vd,{children:[N("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:N(Cn,{sx:{overflow:"auto",maxHeight:300},children:N("div",{children:N("code",{children:r})})})}),Bt(Io,{sx:{marginTop:1,fontSize:13},children:["You can ask for help in our"," ",N(Ku,{sx:{textDecoration:"none",cursor:"pointer",color:"#0088CC"},href:"https://t.me/tonverifier",target:"_blank",children:"Telegram support group"})]})]}),!!a&&N(gs,{noBottomMargin:!0,singleLine:!s,type:os.SUCCESS,title:Bt(jn,{sx:{height:42},children:[N(jn,{mr:1,children:N("img",{src:mj,alt:"Like icon",width:31,height:31})}),Bt(bj,{children:[" ",N("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:N(Cn,{})})]})}function o5e(){const{data:e,isLoading:t}=mc(),{isLoading:r}=oy();return Bt(Cn,{sx:{width:"100%"},children:[e&&!r&&Bt(z_e,{pt:3,pb:1,children:[N(G_e,{children:"Verify manually"}),N(a5e,{})]}),(t||r)&&N(qa,{width:"100%",height:250,sx:{transform:"none",borderRadius:"20px",background:"#e6e8eb"}})]})}Qi(RU)({borderBottom:"none","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function a5e(){return N(Cn,{sx:{width:"100%"},children:N(i5e,{})})}function s5e({onClose:e}){const t=sa(),r=ra(t.breakpoints.down("lg"));return N(j_e,{open:!0,maxWidth:r?"88%":1e3,hideCloseButton:!0,children:N(bC,{onClickAway:e,children:Bt(Cn,{sx:{width:"100%"},children:[N(K_e,{pt:2,children:N(qs,{sx:{padding:0},onClick:e,children:N("img",{src:vC,alt:"Close icon",width:15,height:15})})}),Bt(jn,{mb:4,justifyContent:"center",children:[N("img",{src:$_e,alt:"Popup icon",width:41,height:41}),N(Sd,{pl:2,sx:{fontSize:18,fontWeight:800},children:"Verification Proof"})]}),N(J_e,{}),N(jn,{mt:3,children:N(o5e,{})})]})})})}const l5e=Qi(jn)(({theme:e})=>t=>({flexWrap:t.makeFlexible?"wrap":"inherit",gap:t.makeFlexible?20:"inherit",justifyContent:t.makeFlexible?"center":"space-between",padding:24,[e.breakpoints.down("lg")]:{width:"70%",margin:"auto"}})),u5e=Qi(dy)({boxSizing:"border-box",display:"flex",minWidth:200,maxWidth:260,height:108,background:"#F7F9FB",borderRadius:14,padding:"28px 13px"}),c5e=Qi(Io)({fontSize:14,color:"#000"}),d5e=[{icon:B_e,description:"This source code compiles to the same exact bytecode that is found on-chain."},{icon:O_e,description:"You can review verification proofs and perform your own client-side verification."},{icon:P_e,description:"Variable/function names may not reflect actual usage. compiler may remove unused code."},{icon:M_e,description:"Comments may not be honest and should generally be ignored."}],f5e=()=>{const[e]=Pb(),[t,r]=Us.useState(e.get("showProof")!==null),i=sa(),a=ra(i.breakpoints.down("lg")),o=ra(i.breakpoints.down("md")),s=ra("(max-width: 450px)");return Bt(Dh,{children:[N(Iw,{mb:1,children:Bt(jn,{sx:{justifyContent:"space-between",flexDirection:s?"column":"inherit",width:"100%"},children:[Bt(jn,{mb:s?2:0,sx:{width:"100%"},children:[N(Lh,{children:N("img",{src:D_e,alt:"Verification icon",width:41,height:41})}),N(Sd,{children:"How is this contract verified?"})]}),Bt("div",{children:[Bt(La,{fontSize:12,fontWeight:800,textColor:"#fff",background:"#1976d2",hoverBackground:"#156cc2",height:37,width:132,onClick:()=>{r(!0)},children:[N("img",{src:U_e,alt:"Show icon",width:19,height:19}),"Show Proof"]}),t&&N(s5e,{onClose:()=>r(!1)})]})]})}),N(l5e,{makeFlexible:a,isMobile:o,children:d5e.map(u=>Bt(u5e,{children:[N(dy,{sx:{alignSelf:"flex-start"},mr:1.5,children:N("img",{alt:"Icon",src:u.icon,width:41,height:41})}),N(c5e,{children:u.description})]},u.description))})]})};function p5e(){const e=jL(Lv),{isLoading:t,error:r,data:i}=nc(["latestVerifiedContracts"],async()=>(await(await fetch(`${e}/latestVerified`,{method:"GET"})).json()).slice(0,100));return{isLoading:t,error:r,data:i}}const h5e=ar(Cn)(({theme:e})=>({background:"white",padding:"16px 20px",borderRadius:10,boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",border:"0.5px solid rgba(114, 138, 150, 0.24)",cursor:"pointer",[e.breakpoints.down("sm")]:{width:280}})),g5e=ar(Cn)(({theme:e})=>({maxWidth:1160,width:"calc(100% - 50px)",paddingTop:20,margin:"0 auto"})),m5e=ar(Cn)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,margin:"0 auto",justifyContent:"left",overflow:"auto",marginTop:24,"-webkit-text-size-adjust":"100%"}),y5e=ar(Cn)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,color:"#728A96"}),v5e=ar(Cn)({marginLeft:"auto",fontSize:14,background:"#F0F0F099",color:"#728A9699",padding:"2px 12px",borderRadius:4});function b5e(){const{data:e,isLoading:t}=p5e(),r=fc(),i=Z.exports.useRef(new Array(30).fill(null).map(a=>Math.random()*100));return Bt(g5e,{children:[N(Io,{variant:"h6",children:N("b",{children:"Latest verified contracts"})}),Bt(m5e,{children:[t&&i.current.map(a=>N(qa,{sx:{borderRadius:2},variant:"rectangular",width:400+a,height:70})),e?.map(a=>Bt(h5e,{onClick:o=>{r(`/${a.address}`)},children:[N(y5e,{children:a.address}),Bt("div",{style:{display:"flex",alignItems:"center",marginTop:6.5},children:[N(Io,{sx:{fontSize:14,color:"#728A9699"},children:a.mainFile}),N(v5e,{children:a.compiler})]})]}))]})]})}const wj=Qi(Cn)({maxWidth:1160,margin:"auto"}),xj=Qi(Cn)(e=>({display:e.isMobile?"inherit":"flex",gap:20})),hv=Qi(Cn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,padding:20,color:"#000"});function AM(){const{isLoading:e,data:t,error:r}=mc(),[i,a]=Z.exports.useState(!1),o=sa(),s=A1e(),{contractAddress:l,isAddressEmpty:u}=ku(),{hasFiles:c}=Tu(),d=Z.exports.useRef(),g=ra(o.breakpoints.down("lg")),x=ra(o.breakpoints.down("md")),w=!r&&e&&l;hD(),I1e(),a1e(),Z.exports.useEffect(()=>{window.scrollTo({behavior:"auto",top:d.current?.offsetTop})},[window.location.pathname]);const{initialize:v}=dE(),{data:{funcVersions:y}}=cE();return Z.exports.useEffect(()=>{(y?.length??0)>0&&v(y[0])},[y]),Bt(Cn,{onDragEnter:()=>a(!0),onDrop:()=>a(!1),onClick:()=>a(!1),children:[N(Cw,{sx:{color:"#fff",zIndex:4},open:i,onDragEnd:()=>a(!1)}),N(Cn,{ref:d}),window.isTestnet&&N(BE,{}),N(v0e,{}),l===null&&u&&N(b5e,{}),l===null&&!u&&N(Cn,{m:4,children:N(gs,{singleLine:!0,type:os.ERROR,title:Bt(jn,{sx:{height:42},children:[N("span",{style:{color:"#FC5656",marginRight:4},children:"Error: "}),"Invalid address"]}),notificationBody:N(Cn,{})})}),Bt(wj,{px:g?"20px":0,children:[!!r&&N(Cn,{mt:4,children:N(gs,{type:os.ERROR,title:Bt(vd,{children:[N("span",{style:{color:"#FC5656"},children:"Error: "}),"Unable to fetch contract data"]}),notificationBody:N(Cn,{sx:{overflow:"auto",maxHeight:300},children:N("pre",{children:N("code",{children:r.toString()})})})})}),w&&Bt(hv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Bt(jn,{mb:3,children:[N(qa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),N(qa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),N(qa,{variant:"rectangular",width:"100%",height:250})]}),!e&&Bt(xj,{isMobile:x,children:[N(D1e,{}),t?.hasOnchainProof&&N(lwe,{})]}),w&&Bt(hv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Bt(jn,{mb:3,children:[N(qa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),N(qa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),N(qa,{variant:"rectangular",width:"100%",height:250})]}),!e&&t?.hasOnchainProof&&N(f5e,{}),t&&(!t.hasOnchainProof||s)&&Bt(Eo,{children:[N(A_e,{}),c()&&N(R_e,{})]}),t&&!c()?N(hv,{sx:{padding:0},mb:5,children:N(x1e,{})}):N(Eo,{children:w&&Bt(hv,{sx:{padding:"30px 24px 24px 24px"},mb:5,children:[Bt(jn,{mb:3,children:[N(qa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),N(qa,{variant:"text",sx:{fontSize:"20px",width:250}})]}),N(qa,{variant:"rectangular",width:"100%",height:500})]})}),t&&N(ab,{})]}),!t&&N(dy,{sx:{bottom:0,width:"100%"},children:N(ab,{})})]})}function _j({space:e}){return N("div",{style:{height:e}})}function w5e(){const[e,t]=Z.exports.useState({spec:[],builder:Qn.beginCell()});return Bt("div",{children:[N("h4",{children:"Build the cell"}),N(af,{required:!0,id:"outlined-required",label:"UINT",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const[i,a]=r.target.value.split(",");t(o=>({spec:[...o.spec,{type:"uint"+a,value:i}],builder:o.builder.storeUint(i,a)})),r.target.value=""}}}),N(af,{required:!0,id:"outlined-required",label:"Address",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const i=r.target.value;t(a=>({spec:[...a.spec,{type:"address",value:i}],builder:a.builder.storeAddress(Qn.Address.parse(i))})),r.target.value=""}}}),N("div",{children:JSON.stringify(e.spec)}),N(_j,{space:30}),N(Ew,{variant:"outlined",children:"Send the message"})]})}function x5e(){return Bt("div",{style:{margin:"0 auto",maxWidth:1100,padding:40},children:[N(UE,{}),N(_j,{space:35}),N(af,{required:!0,id:"outlined-required",label:"Contract address",fullWidth:!0}),N(af,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),Bt("div",{children:[N("h3",{children:"OPs"}),N(af,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),N(w5e,{})]})]})}const _5e=yC({typography:{fontFamily:"Mulish"},components:{MuiSwitch:{styleOverrides:{switchBase:{color:"#ccc"},colorPrimary:{"&.Mui-checked":{color:"#fff"}},track:{opacity:1,backgroundColor:"#D1D1D6",".Mui-checked.Mui-checked + &":{opacity:1,backgroundColor:"#0088CC"}},thumb:{background:"#fff",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.16)"}}}}});function Rl({label:e,data:t}){return Bt("div",{className:"InfoPiece",children:[N("div",{className:"InfoPiece-Label",children:e}),N("div",{className:"InfoPiece-Data",children:t})]})}function S5e(){const e=Qn.Address.parse(window.sourcesRegistryAddress);return nc(["sourcesRegistry",e],async()=>{const t=await Zf(),r=await fN(e,t),i=t.open(ax.createFromAddress(e)),a=(await i.getVerifierRegistryAddress()).toString(),o=await i.getDeploymentCosts(),s=Qn.Cell.fromBoc((await t.getContractState(e)).code)[0].hash().toString("base64");return{admin:r,verifierRegistry:a,codeCellHash:s,address:e,deploymentCosts:o}})}function C5e(e){return Qn.beginCell().storeUint(2003,32).storeUint(0,64).storeAddress(e).endCell()}function E5e(e){return Qn.beginCell().storeUint(3004,32).storeUint(0,64).storeAddress(e).endCell()}function k5e(e,t){return Qn.beginCell().storeUint(6007,32).storeUint(0,64).storeCoins(e).storeCoins(t).endCell()}function x5({text:e,action:t,address:r}){const[i,a]=Us.useState(!1),[o,s]=Us.useState(""),l=()=>{a(!1)},u=pE();return Bt(Eo,{children:[N(eh,{text:e,onClick:()=>{a(!0)}}),Bt(BC,{open:i,onClose:l,children:[N(sU,{children:e}),N(aU,{children:N(af,{multiline:!0,autoFocus:!0,margin:"dense",id:"name",label:"Address",fullWidth:!0,variant:"standard",value:o,onChange:c=>{s(c.target.value)}})}),Bt(oU,{children:[N(eh,{text:"Cancel",onClick:l}),N(eh,{text:"DOIT",onClick:()=>{u(r.toString(),Qn.toNano("0.01"),t(o))}})]})]})]})}function A5e(){const{data:e,isLoading:t}=S5e();return Bt("div",{style:{padding:"20px 40px"},children:[N("h1",{children:"Sources Registry"}),t&&N("div",{children:"Loading..."}),e&&Bt(Eo,{children:[N(Rl,{label:"Address",data:e.address.toString()}),N(Rl,{label:"Admin",data:e.admin}),N(Rl,{label:"Verifier Reg.",data:e.verifierRegistry}),N(Rl,{label:"Min Ton",data:e.deploymentCosts.min}),N(Rl,{label:"Max Ton",data:e.deploymentCosts.max}),N(Rl,{label:"Code hash",data:e.codeCellHash}),Bt("div",{style:{marginTop:20,gap:10,display:"flex"},children:[N(x5,{text:"Change Verifier Registry",action:r=>C5e(Qn.Address.parse(r)),address:e.address}),N(x5,{text:"Change Admin",action:r=>E5e(Qn.Address.parse(r)),address:e.address}),N(x5,{text:"Set deployment costs",action:r=>{const[i,a]=r.split(",");return k5e(Qn.toNano(i),Qn.toNano(a))},address:e.address})]})]})]})}const T5e={removeVerifier:435836471,updateVerifier:1610798618,forwardMessage:1965127512};function I5e(e){return Y1(Hye(e))}function R5e(e){let t=e.split(".");return((+t[0]*256+ +t[1])*256+ +t[2])*256+ +t[3]}function P5e(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}function M5e(e){let t=Qn.beginCell();t.storeUint(T5e.updateVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.storeUint(e.quorum,8);let r=Qn.Dictionary.empty(Qn.Dictionary.Keys.BigUint(256),P5e());return e.endpoints.forEach(function(i,a){r.set(a,Qn.beginCell().storeUint(i,32).endCell().beginParse())}),t.storeDict(r),t.storeRef(Qn.beginCell().storeBuffer(Buffer.from(e.name)).endCell()),t.storeRef(Qn.beginCell().storeBuffer(Buffer.from(e.marketingUrl)).endCell()),t.endCell()}function O5e({verifier:e}){const[t,r]=Z.exports.useState(!1),i=pE();oy();const[a,o]=Z.exports.useState(JSON.stringify({quorum:e.quorum,pubKeyEndpoints:e.pubKeyEndpoints,name:e.name,url:e.url},null,3));return Bt(Eo,{children:[N(eh,{style:{marginTop:8},text:"Update config",onClick:()=>{r(!0)}}),Bt(BC,{open:t,onClose:()=>{r(!1)},children:[N(sU,{children:"s"}),N(aU,{sx:{width:1e3},children:N(af,{multiline:!0,autoFocus:!0,margin:"dense",id:"name",label:"JSON",fullWidth:!0,variant:"standard",value:a,onChange:s=>{o(s.target.value)}})}),N(oU,{children:N(eh,{text:"DOIT",onClick:()=>{const s=JSON.parse(a);i(window.verifierRegistryAddress,Qn.toNano("0.01"),M5e({id:I5e(s.name),quorum:s.quorum,endpoints:new Map(Object.entries(s.pubKeyEndpoints).map(([l,u])=>[Y1(Buffer.from(l,"base64")),R5e(u)])),name:s.name,marketingUrl:s.url}))}})})]})]})}function B5e(){const{data:e,isLoading:t}=oy();return Bt("div",{style:{padding:"20px 40px",background:"#00000011"},children:[N("div",{style:{display:"flex",gap:30,alignItems:"center"},children:N("h1",{children:"Verifier Registry"})}),N(Rl,{label:"Address",data:window.verifierRegistryAddress}),Bt(Eo,{children:[t&&"Loading...",e?.map(r=>Bt(Eo,{children:[Bt("div",{style:{background:"#00000011",padding:"2px 20px",marginTop:10},children:[N("h3",{children:r.name}),N(Rl,{label:"Admin",data:r.admin.toString()}),N(Rl,{label:"Quorum",data:String(r.quorum)}),N(Rl,{label:"Url",data:r.url}),N("br",{}),N("div",{children:"Public Key Endpoints"}),Object.entries(r.pubKeyEndpoints).map(([i,a])=>N(Rl,{label:i,data:`${a}`},i))]},r.name),N(O5e,{verifier:r})]}))]})]})}function U5e(){return Bt("div",{children:[window.isTestnet&&N(BE,{}),Bt(ox,{sx:{gap:30,px:4},children:[N("h1",{children:"Admin"}),N(UE,{})]}),N(A5e,{}),N(B5e,{}),N(ab,{})]})}const D5e=ar(Cn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",height:t.isMobile?90:100,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}));function L5e(){const e=sa(),t=ra(e.breakpoints.down("md")),r=ra(e.breakpoints.down("lg"));return N(D5e,{px:r?3.4:0,isMobile:t,children:Bt(mD,{mb:5,children:[Bt(Ff,{children:[N("img",{src:Mb,width:30,height:30,alt:"App icon"}),N(k2,{children:"TACT DEPLOYER"})]}),Bt(gD,{children:[N(jn,{mr:t?0:2,children:N(Z6,{})}),!t&&Bt(Ff,{href:$C,target:"_blank",children:[N("img",{src:X4,alt:"Github icon",width:20,height:20}),N(x6,{children:"GitHub"})]})]})]})})}const N5e=ar("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),j5e=Qn.Cell.fromBoc(Buffer.from("te6cckEBAQEADgAAGJRqmLYAAAAAAAAAAOnNeQ0=","base64"))[0];async function _5(e){const t=`https://tact-deployer${window.isTestnet?"-testnet":""}.infura-ipfs.io`;return fetch(`${t}/ipfs/${e}`)}function DE({workchain:e}){const{ipfsHash:t}=o9(),{data:r,error:i,isLoading:a}=nc(["tactDeploy",t],async()=>{if(!t)return null;const o=await Zf(),s=await _5(t).then(_=>_.json()),l=await _5(s.pkg).then(_=>_.json()),u=await _5(s.dataCell).then(_=>_.arrayBuffer()).then(_=>Qn.Cell.fromBoc(Buffer.from(_))[0]),c=Qn.Cell.fromBoc(Buffer.from(l.code,"base64"))[0],d=Qn.contractAddress(e,{code:c,data:u}),g={code:c,data:u},x=u.hash().toString("base64"),w=c.hash().toString("base64"),v=await o.isContractDeployed(d),y=v&&await hE(w);return{address:d,stateInit:g,pkg:l,codeCellHash:w,dataCellHash:x,isDeployed:v,hasProof:y}});return{data:r,error:i,isLoading:a}}function $5e(e,t,r){const{sendTXN:i,data:a,clearTXN:o}=$L("deployContract",async s=>{if(!r)throw new Error("No address");const l=await Zf();return s>20?"error":await l.isContractDeployed(r)?"success":"issued"});return{sendTXN:()=>{!r||i(r,Qn.toNano(e),j5e,t)},status:a.status,clearTXN:o}}function F5e(){const e=[],{data:t,error:r}=DE({workchain:0});return t&&(e.push({title:"Name",value:t.pkg.name}),e.push({title:"Compiler",value:`Tact ${t.pkg.compiler.version}`}),e.push({title:"Code Hash",value:t.codeCellHash}),e.push({title:"Data Hash",value:t.dataCellHash}),e.push({title:"Workchain",value:mN(t.address.toString())})),N(SE,{title:"Contract",icon:_E,dataRows:e,isLoading:!1,isFlexibleWrapper:!0})}function z5e(){const[e,t]=Z.exports.useState("0.5"),{data:r,error:i}=DE({workchain:0}),{sendTXN:a,status:o}=$5e(e,r?.stateInit,r?.address),{markPreloaded:s}=pN(),l=fc(),u=Tu();let c="";if(i)c=i.toString();else if(r?.isDeployed)c=Bt("div",{children:["Contract is already deployed.",!r.hasProof&&" You can publish its sources to verify it."]});else switch(o){case"initial":c="Contract is ready for deployment";break;case"pending":c="Please approve the transaction in your wallet";break;case"issued":c="Transaction was issued. Monitoring deployment...";break;case"rejected":c="Transaction was rejected. Please retry.";break;case"error":c="Transaction failed. Please retry.";break;case"expired":c="Transaction expired. Please retry.";break;case"success":c="Contract deployed successfully! You can now publish its sources to verify it.";break}let d=Bt(La,{disabled:o==="pending"||o==="issued"||r?.isDeployed,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{a()},children:[(o==="pending"||o==="issued")&&N(Aw,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Deploy"]});return(o==="success"||r?.isDeployed&&!r.hasProof)&&(d=N(La,{fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(),l("/"+r.address.toString()),u.addFiles([new File([JSON.stringify(r.pkg)],r.pkg.name+".pkg",{type:"text/plain"})])},children:"Verify"})),Bt(Dh,{mb:6,children:[Bt(jn,{p:"30px 24px 0 24px",children:[N(Lh,{children:N("img",{src:_E,alt:"publish icon",width:41,height:41})}),N(Sd,{children:"Deploy"})]}),Bt(Cn,{children:[Bt(Cn,{sx:{padding:"0 30px"},children:[Bt(ox,{gap:2,sx:{mt:2},children:[N(uc,{children:N("div",{children:"Value to initialize contract (TON)"})}),N(uc,{children:N(N5e,{disabled:!!r?.isDeployed||o==="issued"||o=="pending",value:e,type:"number",onChange:g=>{t(g.target.value)}})})]}),N(gs,{type:os.HINT,title:N(Eo,{}),notificationBody:N(jn,{sx:{overflow:"auto",maxHeight:300},children:Bt(vd,{sx:{marginBottom:0},children:[N(Cn,{sx:{fontWeight:600},children:"Contract Address"}),N(Cn,{sx:{fontSize:18,fontWeight:700,wordBreak:"break-all"},children:r?.address.toString()})]})})}),N(gs,{type:os.INFO,title:N(Eo,{}),notificationBody:N(jn,{sx:{overflow:"auto",maxHeight:300},children:N(vd,{sx:{marginBottom:0},children:c})})}),d]}),N(jn,{mb:3,sx:{justifyContent:"center"}})]})]})}function H5e(){const e=sa(),t=ra(e.breakpoints.down("md")),r=ra(e.breakpoints.down("lg")),{data:i,error:a,isLoading:o}=DE({workchain:0});return Bt(Cn,{children:[window.isTestnet&&N(BE,{}),N(L5e,{}),Bt(wj,{px:r?"20px":0,children:[o&&Bt(uc,{sx:{marginTop:3},children:[N(qa,{height:330,variant:"rounded",sx:{marginBottom:3}}),N(qa,{height:280,variant:"rounded"})]}),!o&&Bt(Eo,{children:[N(xj,{isMobile:t,children:N(F5e,{})}),N(z5e,{})]})]}),")",N(ab,{})]})}const W5e=new mz({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});Uye();w3.createRoot(document.getElementById("root")).render(N(lde,{maxSnack:3,children:N(nY,{theme:_5e,children:N(JW,{client:W5e,children:N(f0e,{manifestUrl:"https://verifier.ton.org/tonconnect-manifest.json",children:N(fq,{basename:"/",children:Bt(cq,{children:[N(Sp,{path:"/interact",element:N(x5e,{})}),N(Sp,{path:"/admin",element:N(U5e,{})}),N(Sp,{path:"/tactDeployer/:ipfsHash",element:N(H5e,{})}),N(Sp,{path:"/:contractAddress",element:N(AM,{})}),N(Sp,{path:"/",element:N(AM,{})})]})})})})})}));export{sb as g}; diff --git a/index.html b/index.html index 5f15937..7cbc170 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ - +