From 23e123914df1cf68aa722ca67d5b7351d9f2b43c Mon Sep 17 00:00:00 2001 From: EmelyanenkoK Date: Wed, 19 Jul 2023 07:35:13 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ton-bloc?= =?UTF-8?q?kchain/verifier@cf81c42505f88d1c0b8a30135fa02b108ed1f0ad=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 +- assets/index.57844cfa.js | 1242 ++++++++++++++++ .../{index.848c2d4a.js => index.8f2198c1.js} | 2 +- assets/index.f8102222.js | 1247 ----------------- index.html | 2 +- 5 files changed, 1245 insertions(+), 1250 deletions(-) create mode 100644 assets/index.57844cfa.js rename assets/{index.848c2d4a.js => index.8f2198c1.js} (99%) delete mode 100644 assets/index.f8102222.js diff --git a/404.html b/404.html index d0298ef..88ba9ea 100644 --- a/404.html +++ b/404.html @@ -38,7 +38,7 @@ - + diff --git a/assets/index.57844cfa.js b/assets/index.57844cfa.js new file mode 100644 index 0000000..a5f138b --- /dev/null +++ b/assets/index.57844cfa.js @@ -0,0 +1,1242 @@ +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://tonverifier.live/${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.8f2198c1.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://tonverifier.live/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/assets/index.848c2d4a.js b/assets/index.8f2198c1.js similarity index 99% rename from assets/index.848c2d4a.js rename to assets/index.8f2198c1.js index 02ed01f..93a2603 100644 --- a/assets/index.848c2d4a.js +++ b/assets/index.8f2198c1.js @@ -1,4 +1,4 @@ -import{g as HI}from"./index.f8102222.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.f8102222.js b/assets/index.f8102222.js deleted file mode 100644 index 393dfc1..0000000 --- a/assets/index.f8102222.js +++ /dev/null @@ -1,1247 +0,0 @@ -function aX(e,t){for(var r=0;rn[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"]'))n(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"&&n(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 n(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 Ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wu(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var O7={},qw={};qw.byteLength=uX;qw.toByteArray=fX;qw.fromByteArray=pX;var Uu=[],xl=[],sX=typeof Uint8Array<"u"?Uint8Array:Array,I3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ph=0,lX=I3.length;Ph0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function uX(e){var t=B7(e),r=t[0],n=t[1];return(r+n)*3/4-n}function cX(e,t,r){return(t+r)*3/4-r}function fX(e){var t,r=B7(e),n=r[0],a=r[1],o=new sX(cX(e,n,a)),s=0,l=a>0?n-4:n,c;for(c=0;c>16&255,o[s++]=t>>8&255,o[s++]=t&255;return a===2&&(t=xl[e.charCodeAt(c)]<<2|xl[e.charCodeAt(c+1)]>>4,o[s++]=t&255),a===1&&(t=xl[e.charCodeAt(c)]<<10|xl[e.charCodeAt(c+1)]<<4|xl[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function dX(e){return Uu[e>>18&63]+Uu[e>>12&63]+Uu[e>>6&63]+Uu[e&63]}function hX(e,t,r){for(var n,a=[],o=t;ol?l:s+o));return n===1?(t=e[r-1],a.push(Uu[t>>2]+Uu[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(Uu[t>>10]+Uu[t>>4&63]+Uu[t<<2&63]+"=")),a.join("")}var ZS={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ZS.read=function(e,t,r,n,a){var o,s,l=a*8-n-1,c=(1<>1,m=-7,_=r?a-1:0,T=r?-1:1,O=e[t+_];for(_+=T,o=O&(1<<-m)-1,O>>=-m,m+=l;m>0;o=o*256+e[t+_],_+=T,m-=8);for(s=o&(1<<-m)-1,o>>=-m,m+=n;m>0;s=s*256+e[t+_],_+=T,m-=8);if(o===0)o=1-p;else{if(o===c)return s?NaN:(O?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-p}return(O?-1:1)*s*Math.pow(2,o-n)};ZS.write=function(e,t,r,n,a,o){var s,l,c,p=o*8-a-1,m=(1<>1,T=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=n?0:o-1,A=n?1:-1,M=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=m):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+_>=1?t+=T/c:t+=T*Math.pow(2,1-_),t*c>=2&&(s++,c/=2),s+_>=m?(l=0,s=m):s+_>=1?(l=(t*c-1)*Math.pow(2,a),s=s+_):(l=t*Math.pow(2,_-1)*Math.pow(2,a),s=0));a>=8;e[r+O]=l&255,O+=A,l/=256,a-=8);for(s=s<0;e[r+O]=s&255,O+=A,s/=256,p-=8);e[r+O-A]|=M*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(e){const t=qw,r=ZS,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=U,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 Q=new Uint8Array(1),j={foo:function(){return 42}};return Object.setPrototypeOf(j,Uint8Array.prototype),Object.setPrototypeOf(Q,j),Q.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(Q){if(Q>a)throw new RangeError('The value "'+Q+'" is invalid for option "size"');const j=new Uint8Array(Q);return Object.setPrototypeOf(j,l.prototype),j}function l(Q,j,F){if(typeof Q=="number"){if(typeof j=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(Q)}return c(Q,j,F)}l.poolSize=8192;function c(Q,j,F){if(typeof Q=="string")return T(Q,j);if(ArrayBuffer.isView(Q))return A(Q);if(Q==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(Pt(Q,ArrayBuffer)||Q&&Pt(Q.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pt(Q,SharedArrayBuffer)||Q&&Pt(Q.buffer,SharedArrayBuffer)))return M(Q,j,F);if(typeof Q=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ie=Q.valueOf&&Q.valueOf();if(ie!=null&&ie!==Q)return l.from(ie,j,F);const de=B(Q);if(de)return de;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]=="function")return l.from(Q[Symbol.toPrimitive]("string"),j,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}l.from=function(Q,j,F){return c(Q,j,F)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function p(Q){if(typeof Q!="number")throw new TypeError('"size" argument must be of type number');if(Q<0)throw new RangeError('The value "'+Q+'" is invalid for option "size"')}function m(Q,j,F){return p(Q),Q<=0?s(Q):j!==void 0?typeof F=="string"?s(Q).fill(j,F):s(Q).fill(j):s(Q)}l.alloc=function(Q,j,F){return m(Q,j,F)};function _(Q){return p(Q),s(Q<0?0:L(Q)|0)}l.allocUnsafe=function(Q){return _(Q)},l.allocUnsafeSlow=function(Q){return _(Q)};function T(Q,j){if((typeof j!="string"||j==="")&&(j="utf8"),!l.isEncoding(j))throw new TypeError("Unknown encoding: "+j);const F=D(Q,j)|0;let ie=s(F);const de=ie.write(Q,j);return de!==F&&(ie=ie.slice(0,de)),ie}function O(Q){const j=Q.length<0?0:L(Q.length)|0,F=s(j);for(let ie=0;ie=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return Q|0}function U(Q){return+Q!=Q&&(Q=0),l.alloc(+Q)}l.isBuffer=function(j){return j!=null&&j._isBuffer===!0&&j!==l.prototype},l.compare=function(j,F){if(Pt(j,Uint8Array)&&(j=l.from(j,j.offset,j.byteLength)),Pt(F,Uint8Array)&&(F=l.from(F,F.offset,F.byteLength)),!l.isBuffer(j)||!l.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(j===F)return 0;let ie=j.length,de=F.length;for(let pe=0,be=Math.min(ie,de);pede.length?(l.isBuffer(be)||(be=l.from(be)),be.copy(de,pe)):Uint8Array.prototype.set.call(de,be,pe);else if(l.isBuffer(be))be.copy(de,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=be.length}return de};function D(Q,j){if(l.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||Pt(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);const F=Q.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&F===0)return 0;let de=!1;for(;;)switch(j){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Ee(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return st(Q).length;default:if(de)return ie?-1:Ee(Q).length;j=(""+j).toLowerCase(),de=!0}}l.byteLength=D;function Y(Q,j,F){let ie=!1;if((j===void 0||j<0)&&(j=0),j>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,j>>>=0,F<=j))return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return d(this,j,F);case"utf8":case"utf-8":return u(this,j,F);case"ascii":return S(this,j,F);case"latin1":case"binary":return w(this,j,F);case"base64":return v(this,j,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,j,F);default:if(ie)throw new TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),ie=!0}}l.prototype._isBuffer=!0;function q(Q,j,F){const ie=Q[j];Q[j]=Q[F],Q[F]=ie}l.prototype.swap16=function(){const j=this.length;if(j%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;FF&&(j+=" ... "),""},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(j,F,ie,de,pe){if(Pt(j,Uint8Array)&&(j=l.from(j,j.offset,j.byteLength)),!l.isBuffer(j))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof j);if(F===void 0&&(F=0),ie===void 0&&(ie=j?j.length:0),de===void 0&&(de=0),pe===void 0&&(pe=this.length),F<0||ie>j.length||de<0||pe>this.length)throw new RangeError("out of range index");if(de>=pe&&F>=ie)return 0;if(de>=pe)return-1;if(F>=ie)return 1;if(F>>>=0,ie>>>=0,de>>>=0,pe>>>=0,this===j)return 0;let be=pe-de,Gt=ie-F;const Lt=Math.min(be,Gt),Tt=this.slice(de,pe),yr=j.slice(F,ie);for(let zt=0;zt2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,Ut(F)&&(F=de?0:Q.length-1),F<0&&(F=Q.length+F),F>=Q.length){if(de)return-1;F=Q.length-1}else if(F<0)if(de)F=0;else return-1;if(typeof j=="string"&&(j=l.from(j,ie)),l.isBuffer(j))return j.length===0?-1:ee(Q,j,F,ie,de);if(typeof j=="number")return j=j&255,typeof Uint8Array.prototype.indexOf=="function"?de?Uint8Array.prototype.indexOf.call(Q,j,F):Uint8Array.prototype.lastIndexOf.call(Q,j,F):ee(Q,[j],F,ie,de);throw new TypeError("val must be string, number or Buffer")}function ee(Q,j,F,ie,de){let pe=1,be=Q.length,Gt=j.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(Q.length<2||j.length<2)return-1;pe=2,be/=2,Gt/=2,F/=2}function Lt(yr,zt){return pe===1?yr[zt]:yr.readUInt16BE(zt*pe)}let Tt;if(de){let yr=-1;for(Tt=F;Ttbe&&(F=be-Gt),Tt=F;Tt>=0;Tt--){let yr=!0;for(let zt=0;ztde&&(ie=de)):ie=de;const pe=j.length;ie>pe/2&&(ie=pe/2);let be;for(be=0;be>>0,isFinite(ie)?(ie=ie>>>0,de===void 0&&(de="utf8")):(de=ie,ie=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-F;if((ie===void 0||ie>pe)&&(ie=pe),j.length>0&&(ie<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");let be=!1;for(;;)switch(de){case"hex":return V(this,j,F,ie);case"utf8":case"utf-8":return te(this,j,F,ie);case"ascii":case"latin1":case"binary":return R(this,j,F,ie);case"base64":return h(this,j,F,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,j,F,ie);default:if(be)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),be=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function v(Q,j,F){return j===0&&F===Q.length?t.fromByteArray(Q):t.fromByteArray(Q.slice(j,F))}function u(Q,j,F){F=Math.min(Q.length,F);const ie=[];let de=j;for(;de239?4:pe>223?3:pe>191?2:1;if(de+Gt<=F){let Lt,Tt,yr,zt;switch(Gt){case 1:pe<128&&(be=pe);break;case 2:Lt=Q[de+1],(Lt&192)===128&&(zt=(pe&31)<<6|Lt&63,zt>127&&(be=zt));break;case 3:Lt=Q[de+1],Tt=Q[de+2],(Lt&192)===128&&(Tt&192)===128&&(zt=(pe&15)<<12|(Lt&63)<<6|Tt&63,zt>2047&&(zt<55296||zt>57343)&&(be=zt));break;case 4:Lt=Q[de+1],Tt=Q[de+2],yr=Q[de+3],(Lt&192)===128&&(Tt&192)===128&&(yr&192)===128&&(zt=(pe&15)<<18|(Lt&63)<<12|(Tt&63)<<6|yr&63,zt>65535&&zt<1114112&&(be=zt))}}be===null?(be=65533,Gt=1):be>65535&&(be-=65536,ie.push(be>>>10&1023|55296),be=56320|be&1023),ie.push(be),de+=Gt}return y(ie)}const f=4096;function y(Q){const j=Q.length;if(j<=f)return String.fromCharCode.apply(String,Q);let F="",ie=0;for(;ieie)&&(F=ie);let de="";for(let pe=j;peie&&(j=ie),F<0?(F+=ie,F<0&&(F=0)):F>ie&&(F=ie),FF)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(j,F,ie){j=j>>>0,F=F>>>0,ie||$(j,F,this.length);let de=this[j],pe=1,be=0;for(;++be>>0,F=F>>>0,ie||$(j,F,this.length);let de=this[j+--F],pe=1;for(;F>0&&(pe*=256);)de+=this[j+--F]*pe;return de},l.prototype.readUint8=l.prototype.readUInt8=function(j,F){return j=j>>>0,F||$(j,1,this.length),this[j]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(j,F){return j=j>>>0,F||$(j,2,this.length),this[j]|this[j+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(j,F){return j=j>>>0,F||$(j,2,this.length),this[j]<<8|this[j+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(j,F){return j=j>>>0,F||$(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+this[j+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(j,F){return j=j>>>0,F||$(j,4,this.length),this[j]*16777216+(this[j+1]<<16|this[j+2]<<8|this[j+3])},l.prototype.readBigUInt64LE=ye(function(j){j=j>>>0,dr(j,"offset");const F=this[j],ie=this[j+7];(F===void 0||ie===void 0)&&ae(j,this.length-8);const de=F+this[++j]*2**8+this[++j]*2**16+this[++j]*2**24,pe=this[++j]+this[++j]*2**8+this[++j]*2**16+ie*2**24;return BigInt(de)+(BigInt(pe)<>>0,dr(j,"offset");const F=this[j],ie=this[j+7];(F===void 0||ie===void 0)&&ae(j,this.length-8);const de=F*2**24+this[++j]*2**16+this[++j]*2**8+this[++j],pe=this[++j]*2**24+this[++j]*2**16+this[++j]*2**8+ie;return(BigInt(de)<>>0,F=F>>>0,ie||$(j,F,this.length);let de=this[j],pe=1,be=0;for(;++be=pe&&(de-=Math.pow(2,8*F)),de},l.prototype.readIntBE=function(j,F,ie){j=j>>>0,F=F>>>0,ie||$(j,F,this.length);let de=F,pe=1,be=this[j+--de];for(;de>0&&(pe*=256);)be+=this[j+--de]*pe;return pe*=128,be>=pe&&(be-=Math.pow(2,8*F)),be},l.prototype.readInt8=function(j,F){return j=j>>>0,F||$(j,1,this.length),this[j]&128?(255-this[j]+1)*-1:this[j]},l.prototype.readInt16LE=function(j,F){j=j>>>0,F||$(j,2,this.length);const ie=this[j]|this[j+1]<<8;return ie&32768?ie|4294901760:ie},l.prototype.readInt16BE=function(j,F){j=j>>>0,F||$(j,2,this.length);const ie=this[j+1]|this[j]<<8;return ie&32768?ie|4294901760:ie},l.prototype.readInt32LE=function(j,F){return j=j>>>0,F||$(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},l.prototype.readInt32BE=function(j,F){return j=j>>>0,F||$(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},l.prototype.readBigInt64LE=ye(function(j){j=j>>>0,dr(j,"offset");const F=this[j],ie=this[j+7];(F===void 0||ie===void 0)&&ae(j,this.length-8);const de=this[j+4]+this[j+5]*2**8+this[j+6]*2**16+(ie<<24);return(BigInt(de)<>>0,dr(j,"offset");const F=this[j],ie=this[j+7];(F===void 0||ie===void 0)&&ae(j,this.length-8);const de=(F<<24)+this[++j]*2**16+this[++j]*2**8+this[++j];return(BigInt(de)<>>0,F||$(j,4,this.length),r.read(this,j,!0,23,4)},l.prototype.readFloatBE=function(j,F){return j=j>>>0,F||$(j,4,this.length),r.read(this,j,!1,23,4)},l.prototype.readDoubleLE=function(j,F){return j=j>>>0,F||$(j,8,this.length),r.read(this,j,!0,52,8)},l.prototype.readDoubleBE=function(j,F){return j=j>>>0,F||$(j,8,this.length),r.read(this,j,!1,52,8)};function b(Q,j,F,ie,de,pe){if(!l.isBuffer(Q))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>de||jQ.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(j,F,ie,de){if(j=+j,F=F>>>0,ie=ie>>>0,!de){const Gt=Math.pow(2,8*ie)-1;b(this,j,F,ie,Gt,0)}let pe=1,be=0;for(this[F]=j&255;++be>>0,ie=ie>>>0,!de){const Gt=Math.pow(2,8*ie)-1;b(this,j,F,ie,Gt,0)}let pe=ie-1,be=1;for(this[F+pe]=j&255;--pe>=0&&(be*=256);)this[F+pe]=j/be&255;return F+ie},l.prototype.writeUint8=l.prototype.writeUInt8=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,1,255,0),this[F]=j&255,F+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,2,65535,0),this[F]=j&255,this[F+1]=j>>>8,F+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,2,65535,0),this[F]=j>>>8,this[F+1]=j&255,F+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,4,4294967295,0),this[F+3]=j>>>24,this[F+2]=j>>>16,this[F+1]=j>>>8,this[F]=j&255,F+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,4,4294967295,0),this[F]=j>>>24,this[F+1]=j>>>16,this[F+2]=j>>>8,this[F+3]=j&255,F+4};function X(Q,j,F,ie,de){ht(j,ie,de,Q,F,7);let pe=Number(j&BigInt(4294967295));Q[F++]=pe,pe=pe>>8,Q[F++]=pe,pe=pe>>8,Q[F++]=pe,pe=pe>>8,Q[F++]=pe;let be=Number(j>>BigInt(32)&BigInt(4294967295));return Q[F++]=be,be=be>>8,Q[F++]=be,be=be>>8,Q[F++]=be,be=be>>8,Q[F++]=be,F}function we(Q,j,F,ie,de){ht(j,ie,de,Q,F,7);let pe=Number(j&BigInt(4294967295));Q[F+7]=pe,pe=pe>>8,Q[F+6]=pe,pe=pe>>8,Q[F+5]=pe,pe=pe>>8,Q[F+4]=pe;let be=Number(j>>BigInt(32)&BigInt(4294967295));return Q[F+3]=be,be=be>>8,Q[F+2]=be,be=be>>8,Q[F+1]=be,be=be>>8,Q[F]=be,F+8}l.prototype.writeBigUInt64LE=ye(function(j,F=0){return X(this,j,F,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=ye(function(j,F=0){return we(this,j,F,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(j,F,ie,de){if(j=+j,F=F>>>0,!de){const Lt=Math.pow(2,8*ie-1);b(this,j,F,ie,Lt-1,-Lt)}let pe=0,be=1,Gt=0;for(this[F]=j&255;++pe>0)-Gt&255;return F+ie},l.prototype.writeIntBE=function(j,F,ie,de){if(j=+j,F=F>>>0,!de){const Lt=Math.pow(2,8*ie-1);b(this,j,F,ie,Lt-1,-Lt)}let pe=ie-1,be=1,Gt=0;for(this[F+pe]=j&255;--pe>=0&&(be*=256);)j<0&&Gt===0&&this[F+pe+1]!==0&&(Gt=1),this[F+pe]=(j/be>>0)-Gt&255;return F+ie},l.prototype.writeInt8=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,1,127,-128),j<0&&(j=255+j+1),this[F]=j&255,F+1},l.prototype.writeInt16LE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,2,32767,-32768),this[F]=j&255,this[F+1]=j>>>8,F+2},l.prototype.writeInt16BE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,2,32767,-32768),this[F]=j>>>8,this[F+1]=j&255,F+2},l.prototype.writeInt32LE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,4,2147483647,-2147483648),this[F]=j&255,this[F+1]=j>>>8,this[F+2]=j>>>16,this[F+3]=j>>>24,F+4},l.prototype.writeInt32BE=function(j,F,ie){return j=+j,F=F>>>0,ie||b(this,j,F,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),this[F]=j>>>24,this[F+1]=j>>>16,this[F+2]=j>>>8,this[F+3]=j&255,F+4},l.prototype.writeBigInt64LE=ye(function(j,F=0){return X(this,j,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=ye(function(j,F=0){return we(this,j,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(Q,j,F,ie,de,pe){if(F+ie>Q.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function je(Q,j,F,ie,de){return j=+j,F=F>>>0,de||Ae(Q,j,F,4),r.write(Q,j,F,ie,23,4),F+4}l.prototype.writeFloatLE=function(j,F,ie){return je(this,j,F,!0,ie)},l.prototype.writeFloatBE=function(j,F,ie){return je(this,j,F,!1,ie)};function Vt(Q,j,F,ie,de){return j=+j,F=F>>>0,de||Ae(Q,j,F,8),r.write(Q,j,F,ie,52,8),F+8}l.prototype.writeDoubleLE=function(j,F,ie){return Vt(this,j,F,!0,ie)},l.prototype.writeDoubleBE=function(j,F,ie){return Vt(this,j,F,!1,ie)},l.prototype.copy=function(j,F,ie,de){if(!l.isBuffer(j))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),!de&&de!==0&&(de=this.length),F>=j.length&&(F=j.length),F||(F=0),de>0&&de=this.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),j.length-F>>0,ie=ie===void 0?this.length:ie>>>0,j||(j=0);let pe;if(typeof j=="number")for(pe=F;pe2**32?de=wt(String(F)):typeof F=="bigint"&&(de=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(de=wt(de)),de+="n"),ie+=` It must be ${j}. Received ${de}`,ie},RangeError);function wt(Q){let j="",F=Q.length;const ie=Q[0]==="-"?1:0;for(;F>=ie+4;F-=3)j=`_${Q.slice(F-3,F)}${j}`;return`${Q.slice(0,F)}${j}`}function Ke(Q,j,F){dr(j,"offset"),(Q[j]===void 0||Q[j+F]===void 0)&&ae(j,Q.length-(F+1))}function ht(Q,j,F,ie,de,pe){if(Q>F||Q3?j===0||j===BigInt(0)?Gt=`>= 0${be} and < 2${be} ** ${(pe+1)*8}${be}`:Gt=`>= -(2${be} ** ${(pe+1)*8-1}${be}) and < 2 ** ${(pe+1)*8-1}${be}`:Gt=`>= ${j}${be} and <= ${F}${be}`,new De.ERR_OUT_OF_RANGE("value",Gt,Q)}Ke(ie,de,pe)}function dr(Q,j){if(typeof Q!="number")throw new De.ERR_INVALID_ARG_TYPE(j,"number",Q)}function ae(Q,j,F){throw Math.floor(Q)!==Q?(dr(Q,F),new De.ERR_OUT_OF_RANGE(F||"offset","an integer",Q)):j<0?new De.ERR_BUFFER_OUT_OF_BOUNDS:new De.ERR_OUT_OF_RANGE(F||"offset",`>= ${F?1:0} and <= ${j}`,Q)}const Ve=/[^+/0-9A-Za-z-_]/g;function Nt(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(Ve,""),Q.length<2)return"";for(;Q.length%4!==0;)Q=Q+"=";return Q}function Ee(Q,j){j=j||1/0;let F;const ie=Q.length;let de=null;const pe=[];for(let be=0;be55295&&F<57344){if(!de){if(F>56319){(j-=3)>-1&&pe.push(239,191,189);continue}else if(be+1===ie){(j-=3)>-1&&pe.push(239,191,189);continue}de=F;continue}if(F<56320){(j-=3)>-1&&pe.push(239,191,189),de=F;continue}F=(de-55296<<10|F-56320)+65536}else de&&(j-=3)>-1&&pe.push(239,191,189);if(de=null,F<128){if((j-=1)<0)break;pe.push(F)}else if(F<2048){if((j-=2)<0)break;pe.push(F>>6|192,F&63|128)}else if(F<65536){if((j-=3)<0)break;pe.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((j-=4)<0)break;pe.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return pe}function xe(Q){const j=[];for(let F=0;F>8,de=F%256,pe.push(de),pe.push(ie);return pe}function st(Q){return t.toByteArray(Nt(Q))}function _t(Q,j,F,ie){let de;for(de=0;de=j.length||de>=Q.length);++de)j[de+F]=Q[de];return de}function Pt(Q,j){return Q instanceof j||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===j.name}function Ut(Q){return Q!==Q}const ve=function(){const Q="0123456789abcdef",j=new Array(256);for(let F=0;F<16;++F){const ie=F*16;for(let de=0;de<16;++de)j[ie+de]=Q[F]+Q[de]}return j}();function ye(Q){return typeof BigInt>"u"?me:Q}function me(){throw new Error("BigInt not supported")}})(O7);globalThis.Buffer=O7.Buffer;class i0{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 Cm=typeof window>"u"||"Deno"in window;function El(){}function gX(e,t){return typeof e=="function"?e(t):e}function k6(e){return typeof e=="number"&&e>=0&&e!==1/0}function U7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vg(e,t,r){return o0(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function mX(e,t,r){return o0(e)?typeof t=="function"?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function of(e,t,r){return o0(e)?[{...t,queryKey:e},r]:[e||{},t]}function vX(e,t,r){return o0(e)?[{...t,mutationKey:e},r]:[e||{},t]}function xA(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:s,stale:l}=e;if(o0(s)){if(n){if(t.queryHash!==JS(s,t.options))return!1}else if(!xb(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a<"u"&&a!==t.state.fetchStatus||o&&!o(t))}function _A(e,t){const{exact:r,fetching:n,predicate:a,mutationKey:o}=e;if(o0(o)){if(!t.options.mutationKey)return!1;if(r){if(Td(t.options.mutationKey)!==Td(o))return!1}else if(!xb(t.options.mutationKey,o))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||a&&!a(t))}function JS(e,t){return(t?.queryKeyHashFn||Td)(e)}function Td(e){return JSON.stringify(e,(t,r)=>A6(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function xb(e,t){return N7(e,t)}function N7(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!N7(e[r],t[r])):!1}function L7(e,t){if(e===t)return e;const r=SA(e)&&SA(t);if(r||A6(e)&&A6(t)){const n=r?e.length:Object.keys(e).length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{};let l=0;for(let c=0;c"u")return!0;const r=t.prototype;return!(!EA(r)||!r.hasOwnProperty("isPrototypeOf"))}function EA(e){return Object.prototype.toString.call(e)==="[object Object]"}function o0(e){return Array.isArray(e)}function D7(e){return new Promise(t=>{setTimeout(t,e)})}function CA(e){D7(0).then(e)}function yX(){if(typeof AbortController=="function")return new AbortController}function T6(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?L7(e,t):t}class bX extends i0{constructor(){super(),this.setup=t=>{if(!Cm&&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(n=>{typeof n=="boolean"?this.setFocused(n):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 _b=new bX;class wX extends i0{constructor(){super(),this.setup=t=>{if(!Cm&&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(n=>{typeof n=="boolean"?this.setOnline(n):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 Sb=new wX;function xX(e){return Math.min(1e3*2**e,3e4)}function Kw(e){return(e??"online")==="online"?Sb.isOnline():!0}class $7{constructor(t){this.revert=t?.revert,this.silent=t?.silent}}function X1(e){return e instanceof $7}function F7(e){let t=!1,r=0,n=!1,a,o,s;const l=new Promise((B,L)=>{o=B,s=L}),c=B=>{n||(O(new $7(B)),e.abort==null||e.abort())},p=()=>{t=!0},m=()=>{t=!1},_=()=>!_b.isFocused()||e.networkMode!=="always"&&!Sb.isOnline(),T=B=>{n||(n=!0,e.onSuccess==null||e.onSuccess(B),a?.(),o(B))},O=B=>{n||(n=!0,e.onError==null||e.onError(B),a?.(),s(B))},A=()=>new Promise(B=>{a=L=>{if(n||!_())return B(L)},e.onPause==null||e.onPause()}).then(()=>{a=void 0,n||e.onContinue==null||e.onContinue()}),M=()=>{if(n)return;let B;try{B=e.fn()}catch(L){B=Promise.reject(L)}Promise.resolve(B).then(T).catch(L=>{var U,D;if(n)return;const Y=(U=e.retry)!=null?U:3,q=(D=e.retryDelay)!=null?D:xX,Z=typeof q=="function"?q(r,L):q,ee=Y===!0||typeof Y=="number"&&r{if(_())return A()}).then(()=>{t?O(L):M()})})};return Kw(e.networkMode)?M():A().then(M),{promise:l,cancel:c,continue:()=>{a?.()},cancelRetry:p,continueRetry:m}}const eE=console;function _X(){let e=[],t=0,r=m=>{m()},n=m=>{m()};const a=m=>{let _;t++;try{_=m()}finally{t--,t||l()}return _},o=m=>{t?e.push(m):CA(()=>{r(m)})},s=m=>(..._)=>{o(()=>{m(..._)})},l=()=>{const m=e;e=[],m.length&&CA(()=>{n(()=>{m.forEach(_=>{r(_)})})})};return{batch:a,batchCalls:s,schedule:o,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{n=m}}}const sa=_X();class j7{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),k6(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Cm?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class SX extends j7{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||eE,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||EX(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 n=T6(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(t),n?n.then(El).catch(El):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||!U7(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(n=>n.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 n,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 O=this.observers.find(A=>A.options.queryFn);O&&this.setOptions(O.options)}Array.isArray(this.options.queryKey);const s=yX(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};c(l);const p=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),m={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:p};if(c(m),(n=this.options.behavior)==null||n.onFetch(m),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=m.fetchOptions)==null?void 0:a.meta)){var _;this.dispatch({type:"fetch",meta:(_=m.fetchOptions)==null?void 0:_.meta})}const T=O=>{if(X1(O)&&O.silent||this.dispatch({type:"error",error:O}),!X1(O)){var A,M;(A=(M=this.cache.config).onError)==null||A.call(M,O,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=F7({fn:m.fetchFn,abort:s?.abort.bind(s),onSuccess:O=>{var A,M;if(typeof O>"u"){T(new Error("undefined"));return}this.setData(O),(A=(M=this.cache.config).onSuccess)==null||A.call(M,O,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:T,onFail:(O,A)=>{this.dispatch({type:"failed",failureCount:O,error:A})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=n=>{var a,o;switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(a=t.meta)!=null?a:null,fetchStatus:Kw(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:t.data,dataUpdateCount:n.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 X1(s)&&s.revert&&this.revertState?{...this.revertState}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),sa.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function EX(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class CX extends i0{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,n){var a;const o=r.queryKey,s=(a=r.queryHash)!=null?a:JS(o,r);let l=this.get(s);return l||(l=new SX({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(r),state:n,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(n=>n!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){sa.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=of(t,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(a=>xA(n,a))}findAll(t,r){const[n]=of(t,r);return Object.keys(n).length>0?this.queries.filter(a=>xA(n,a)):this.queries}notify(t){sa.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){sa.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){sa.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class MX extends j7{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||eE,this.observers=[],this.state=t.state||W7(),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 D;return this.retryer=F7({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(Y,q)=>{this.dispatch({type:"failed",failureCount:Y,error:q})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,a,o,s,l,c;if(!r){var p,m,_,T;this.dispatch({type:"loading",variables:this.options.variables}),await((p=(m=this.mutationCache.config).onMutate)==null?void 0:p.call(m,this.state.variables,this));const Y=await((_=(T=this.options).onMutate)==null?void 0:_.call(T,this.state.variables));Y!==this.state.context&&this.dispatch({type:"loading",context:Y,variables:this.state.variables})}const D=await t();return await((n=(a=this.mutationCache.config).onSuccess)==null?void 0:n.call(a,D,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,D,this.state.variables,this.state.context)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,D,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:D}),D}catch(D){try{var O,A,M,B,L,U;throw await((O=(A=this.mutationCache.config).onError)==null?void 0:O.call(A,D,this.state.variables,this.state.context,this)),await((M=(B=this.options).onError)==null?void 0:M.call(B,D,this.state.variables,this.state.context)),await((L=(U=this.options).onSettled)==null?void 0:L.call(U,void 0,D,this.state.variables,this.state.context)),D}finally{this.dispatch({type:"error",error:D})}}}dispatch(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Kw(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...n,...t.state}}};this.state=r(this.state),sa.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function W7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class kX extends i0{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const a=new MX({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:n,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(){sa.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=>_A(t,r))}findAll(t){return this.mutations.filter(r=>_A(t,r))}notify(t){sa.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.mutations.filter(r=>r.state.isPaused);return sa.batch(()=>t.reduce((r,n)=>r.then(()=>n.continue().catch(El)),Promise.resolve()))}}function RX(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,a,o,s;const l=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,c=(n=e.fetchOptions)==null||(a=n.meta)==null?void 0:a.fetchMore,p=c?.pageParam,m=c?.direction==="forward",_=c?.direction==="backward",T=((o=e.state.data)==null?void 0:o.pages)||[],O=((s=e.state.data)==null?void 0:s.pageParams)||[];let A=O,M=!1;const B=Z=>{Object.defineProperty(Z,"signal",{enumerable:!0,get:()=>{var ee;if((ee=e.signal)!=null&&ee.aborted)M=!0;else{var V;(V=e.signal)==null||V.addEventListener("abort",()=>{M=!0})}return e.signal}})},L=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),U=(Z,ee,V,te)=>(A=te?[ee,...A]:[...A,ee],te?[V,...Z]:[...Z,V]),D=(Z,ee,V,te)=>{if(M)return Promise.reject("Cancelled");if(typeof V>"u"&&!ee&&Z.length)return Promise.resolve(Z);const R={queryKey:e.queryKey,pageParam:V,meta:e.options.meta};B(R);const h=L(R);return Promise.resolve(h).then(v=>U(Z,V,v,te))};let Y;if(!T.length)Y=D([]);else if(m){const Z=typeof p<"u",ee=Z?p:MA(e.options,T);Y=D(T,Z,ee)}else if(_){const Z=typeof p<"u",ee=Z?p:AX(e.options,T);Y=D(T,Z,ee,!0)}else{A=[];const Z=typeof e.options.getNextPageParam>"u";Y=(l&&T[0]?l(T[0],0,T):!0)?D([],Z,O[0]):Promise.resolve(U([],O[0],T[0]));for(let V=1;V{if(l&&T[V]?l(T[V],V,T):!0){const h=Z?O[V]:MA(e.options,te);return D(te,Z,h)}return Promise.resolve(U(te,O[V],T[V]))})}return Y.then(Z=>({pages:Z,pageParams:A}))}}}}function MA(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function AX(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class TX{constructor(t={}){this.queryCache=t.queryCache||new CX,this.mutationCache=t.mutationCache||new kX,this.logger=t.logger||eE,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=_b.subscribe(()=>{_b.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Sb.subscribe(()=>{Sb.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[n]=of(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state.data}ensureQueryData(t,r,n){const a=Vg(t,r,n),o=this.getQueryData(a.queryKey);return o?Promise.resolve(o):this.fetchQuery(a)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:n})=>{const a=n.data;return[r,a]})}setQueryData(t,r,n){const a=this.queryCache.find(t),o=a?.state.data,s=gX(r,o);if(typeof s>"u")return;const l=Vg(t),c=this.defaultQueryOptions(l);return this.queryCache.build(this,c).setData(s,{...n,manual:!0})}setQueriesData(t,r,n){return sa.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,r,n)]))}getQueryState(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state}removeQueries(t,r){const[n]=of(t,r),a=this.queryCache;sa.batch(()=>{a.findAll(n).forEach(o=>{a.remove(o)})})}resetQueries(t,r,n){const[a,o]=of(t,r,n),s=this.queryCache,l={type:"active",...a};return sa.batch(()=>(s.findAll(a).forEach(c=>{c.reset()}),this.refetchQueries(l,o)))}cancelQueries(t,r,n){const[a,o={}]=of(t,r,n);typeof o.revert>"u"&&(o.revert=!0);const s=sa.batch(()=>this.queryCache.findAll(a).map(l=>l.cancel(o)));return Promise.all(s).then(El).catch(El)}invalidateQueries(t,r,n){const[a,o]=of(t,r,n);return sa.batch(()=>{var s,l;if(this.queryCache.findAll(a).forEach(p=>{p.invalidate()}),a.refetchType==="none")return Promise.resolve();const c={...a,type:(s=(l=a.refetchType)!=null?l:a.type)!=null?s:"active"};return this.refetchQueries(c,o)})}refetchQueries(t,r,n){const[a,o]=of(t,r,n),s=sa.batch(()=>this.queryCache.findAll(a).filter(c=>!c.isDisabled()).map(c=>{var p;return c.fetch(void 0,{...o,cancelRefetch:(p=o?.cancelRefetch)!=null?p:!0,meta:{refetchPage:a.refetchPage}})}));let l=Promise.all(s).then(El);return o!=null&&o.throwOnError||(l=l.catch(El)),l}fetchQuery(t,r,n){const a=Vg(t,r,n),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,n){return this.fetchQuery(t,r,n).then(El).catch(El)}fetchInfiniteQuery(t,r,n){const a=Vg(t,r,n);return a.behavior=RX(),this.fetchQuery(a)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(El).catch(El)}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 n=this.queryDefaults.find(a=>Td(t)===Td(a.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>xb(t,n.queryKey));return r?.defaultOptions}setMutationDefaults(t,r){const n=this.mutationDefaults.find(a=>Td(t)===Td(a.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>xb(t,n.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=JS(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 IX extends i0{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),kA(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return I6(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return I6(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const n=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),R6(n,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=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&RA(this.currentQuery,a,this.options,n)&&this.executeFetch(),this.updateResult(r),o&&(this.currentQuery!==a||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==a||this.options.enabled!==n.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(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),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),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,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(El)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Cm||this.currentResult.isStale||!k6(this.options.staleTime))return;const r=U7(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,!(Cm||this.options.enabled===!1||!k6(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||_b.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 n=this.currentQuery,a=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,c=t!==n,p=c?t.state:this.currentQueryInitialState,m=c?this.currentResult:this.previousQueryResult,{state:_}=t;let{dataUpdatedAt:T,error:O,errorUpdatedAt:A,fetchStatus:M,status:B}=_,L=!1,U=!1,D;if(r._optimisticResults){const V=this.hasListeners(),te=!V&&kA(t,r),R=V&&RA(t,n,r,a);(te||R)&&(M=Kw(t.options.networkMode)?"fetching":"paused",T||(B="loading")),r._optimisticResults==="isRestoring"&&(M="idle")}if(r.keepPreviousData&&!_.dataUpdatedAt&&m!=null&&m.isSuccess&&B!=="error")D=m.data,T=m.dataUpdatedAt,B=m.status,L=!0;else if(r.select&&typeof _.data<"u")if(o&&_.data===s?.data&&r.select===this.selectFn)D=this.selectResult;else try{this.selectFn=r.select,D=r.select(_.data),D=T6(o?.data,D,r),this.selectResult=D,this.selectError=null}catch(V){this.selectError=V}else D=_.data;if(typeof r.placeholderData<"u"&&typeof D>"u"&&B==="loading"){let V;if(o!=null&&o.isPlaceholderData&&r.placeholderData===l?.placeholderData)V=o.data;else if(V=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof V<"u")try{V=r.select(V),this.selectError=null}catch(te){this.selectError=te}typeof V<"u"&&(B="success",D=T6(o?.data,V,r),U=!0)}this.selectError&&(O=this.selectError,D=this.selectResult,A=Date.now(),B="error");const Y=M==="fetching",q=B==="loading",Z=B==="error";return{status:B,fetchStatus:M,isLoading:q,isSuccess:B==="success",isError:Z,isInitialLoading:q&&Y,data:D,dataUpdatedAt:T,error:O,errorUpdatedAt:A,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>p.dataUpdateCount||_.errorUpdateCount>p.errorUpdateCount,isFetching:Y,isRefetching:Y&&!q,isLoadingError:Z&&_.dataUpdatedAt===0,isPaused:M==="paused",isPlaceholderData:U,isPreviousData:L,isRefetchError:Z&&_.dataUpdatedAt!==0,isStale:tE(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,R6(n,r))return;this.currentResult=n;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(c=>{const p=c;return this.currentResult[p]!==r[p]&&l.has(p)})};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"&&!X1(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){sa.batch(()=>{if(t.onSuccess){var r,n,a,o;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(a=(o=this.options).onSettled)==null||a.call(o,this.currentResult.data,null)}else if(t.onError){var s,l,c,p;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(c=(p=this.options).onSettled)==null||c.call(p,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(m=>{m(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function PX(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function kA(e,t){return PX(e,t)||e.state.dataUpdatedAt>0&&I6(e,t,t.refetchOnMount)}function I6(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&tE(e,t)}return!1}function RA(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&tE(e,r)}function tE(e,t){return e.isStaleByTime(t.staleTime)}class OX extends i0{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),R6(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:W7(),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){sa.batch(()=>{if(this.mutateOptions){if(t.onSuccess){var r,n,a,o;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,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,c,p;(s=(l=this.mutateOptions).onError)==null||s.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(p=this.mutateOptions).onSettled)==null||c.call(p,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(m=>{m(this.currentResult)})})}}var Al={exports:{}},dl={},ue={exports:{}},Ki={};/** - * @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 Av=Symbol.for("react.element"),BX=Symbol.for("react.portal"),UX=Symbol.for("react.fragment"),NX=Symbol.for("react.strict_mode"),LX=Symbol.for("react.profiler"),DX=Symbol.for("react.provider"),$X=Symbol.for("react.context"),FX=Symbol.for("react.forward_ref"),jX=Symbol.for("react.suspense"),WX=Symbol.for("react.memo"),zX=Symbol.for("react.lazy"),AA=Symbol.iterator;function HX(e){return e===null||typeof e!="object"?null:(e=AA&&e[AA]||e["@@iterator"],typeof e=="function"?e:null)}var z7={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H7=Object.assign,q7={};function a0(e,t,r){this.props=e,this.context=t,this.refs=q7,this.updater=r||z7}a0.prototype.isReactComponent={};a0.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")};a0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function K7(){}K7.prototype=a0.prototype;function rE(e,t,r){this.props=e,this.context=t,this.refs=q7,this.updater=r||z7}var nE=rE.prototype=new K7;nE.constructor=rE;H7(nE,a0.prototype);nE.isPureReactComponent=!0;var TA=Array.isArray,V7=Object.prototype.hasOwnProperty,iE={current:null},G7={key:!0,ref:!0,__self:!0,__source:!0};function Y7(e,t,r){var n,a={},o=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)V7.call(t,n)&&!G7.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1>>1,b=w[$];if(0>>1;$a(Ae,I))jea(Vt,Ae)?(w[$]=Vt,w[je]=I,$=je):(w[$]=Ae,w[we]=I,$=we);else if(jea(Vt,I))w[$]=Vt,w[je]=I,$=je;else break e}}return d}function a(w,d){var I=w.sortIndex-d.sortIndex;return I!==0?I:w.id-d.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 c=[],p=[],m=1,_=null,T=3,O=!1,A=!1,M=!1,B=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(w){for(var d=r(p);d!==null;){if(d.callback===null)n(p);else if(d.startTime<=w)n(p),d.sortIndex=d.expirationTime,t(c,d);else break;d=r(p)}}function Y(w){if(M=!1,D(w),!A)if(r(c)!==null)A=!0,y(q);else{var d=r(p);d!==null&&S(Y,d.startTime-w)}}function q(w,d){A=!1,M&&(M=!1,L(V),V=-1),O=!0;var I=T;try{for(D(d),_=r(c);_!==null&&(!(_.expirationTime>d)||w&&!h());){var $=_.callback;if(typeof $=="function"){_.callback=null,T=_.priorityLevel;var b=$(_.expirationTime<=d);d=e.unstable_now(),typeof b=="function"?_.callback=b:_===r(c)&&n(c),D(d)}else n(c);_=r(c)}if(_!==null)var X=!0;else{var we=r(p);we!==null&&S(Y,we.startTime-d),X=!1}return X}finally{_=null,T=I,O=!1}}var Z=!1,ee=null,V=-1,te=5,R=-1;function h(){return!(e.unstable_now()-Rw||125$?(w.sortIndex=I,t(p,w),r(c)===null&&w===r(p)&&(M?(L(V),V=-1):M=!0,S(Y,I-$))):(w.sortIndex=b,t(c,w),A||O||(A=!0,y(q))),w},e.unstable_shouldYield=h,e.unstable_wrapCallback=function(w){var d=T;return function(){var I=T;T=d;try{return w.apply(this,arguments)}finally{T=I}}}})(Q7);(function(e){e.exports=Q7})(X7);/** - * @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 Z7=ue.exports,ul=X7.exports;function on(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"),P6=Object.prototype.hasOwnProperty,YX=/^[: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]*$/,PA={},OA={};function XX(e){return P6.call(OA,e)?!0:P6.call(PA,e)?!1:YX.test(e)?OA[e]=!0:(PA[e]=!0,!1)}function QX(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ZX(e,t,r,n){if(t===null||typeof t>"u"||QX(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ps(e,t,r,n,a,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var is={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){is[e]=new Ps(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];is[t]=new Ps(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){is[e]=new Ps(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){is[e]=new Ps(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){is[e]=new Ps(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){is[e]=new Ps(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){is[e]=new Ps(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){is[e]=new Ps(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){is[e]=new Ps(e,5,!1,e.toLowerCase(),null,!1,!1)});var aE=/[\-:]([a-z])/g;function sE(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(aE,sE);is[t]=new Ps(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(aE,sE);is[t]=new Ps(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(aE,sE);is[t]=new Ps(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){is[e]=new Ps(e,1,!1,e.toLowerCase(),null,!1,!1)});is.xlinkHref=new Ps("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){is[e]=new Ps(e,1,!1,e.toLowerCase(),null,!0,!0)});function lE(e,t,r,n){var a=is.hasOwnProperty(t)?is[t]:null;(a!==null?a.type!==0:n||!(2l||a[s]!==o[l]){var c=` -`+a[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{B3=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Gg(e):""}function JX(e){switch(e.tag){case 5:return Gg(e.type);case 16:return Gg("Lazy");case 13:return Gg("Suspense");case 19:return Gg("SuspenseList");case 0:case 2:case 15:return e=U3(e.type,!1),e;case 11:return e=U3(e.type.render,!1),e;case 1:return e=U3(e.type,!0),e;default:return""}}function N6(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 Zh:return"Fragment";case Qh:return"Portal";case O6:return"Profiler";case uE:return"StrictMode";case B6:return"Suspense";case U6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tU:return(e.displayName||"Context")+".Consumer";case eU:return(e._context.displayName||"Context")+".Provider";case cE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fE:return t=e.displayName||null,t!==null?t:N6(e.type)||"Memo";case af:t=e._payload,e=e._init;try{return N6(e(t))}catch{}}return null}function eQ(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 N6(t);case 8:return t===uE?"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 Uf(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nU(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tQ(e){var t=nU(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function u1(e){e._valueTracker||(e._valueTracker=tQ(e))}function iU(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=nU(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Eb(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 L6(e,t){var r=t.checked;return ua({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function UA(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Uf(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function oU(e,t){t=t.checked,t!=null&&lE(e,"checked",t,!1)}function D6(e,t){oU(e,t);var r=Uf(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$6(e,t.type,r):t.hasOwnProperty("defaultValue")&&$6(e,t.type,Uf(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 n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function $6(e,t,r){(t!=="number"||Eb(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Yg=Array.isArray;function pp(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=c1.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function km(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var rm={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},rQ=["Webkit","ms","Moz","O"];Object.keys(rm).forEach(function(e){rQ.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rm[t]=rm[e]})});function uU(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||rm.hasOwnProperty(e)&&rm[e]?(""+t).trim():t+"px"}function cU(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=uU(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var nQ=ua({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 W6(e,t){if(t){if(nQ[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(on(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(on(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(on(61))}if(t.style!=null&&typeof t.style!="object")throw Error(on(62))}}function z6(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 H6=null;function dE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q6=null,gp=null,mp=null;function $A(e){if(e=Pv(e)){if(typeof q6!="function")throw Error(on(280));var t=e.stateNode;t&&(t=Qw(t),q6(e.stateNode,e.type,t))}}function fU(e){gp?mp?mp.push(e):mp=[e]:gp=e}function dU(){if(gp){var e=gp,t=mp;if(mp=gp=null,$A(e),t)for(e=0;e>>=0,e===0?32:31-(pQ(e)/gQ|0)|0}var f1=64,d1=4194304;function Xg(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 Rb(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,o=e.pingedLanes,s=r&268435455;if(s!==0){var l=s&~a;l!==0?n=Xg(l):(o&=s,o!==0&&(n=Xg(o)))}else s=r&~a,s!==0?n=Xg(s):o!==0&&(n=Xg(o));if(n===0)return 0;if(t!==0&&t!==n&&(t&a)===0&&(a=n&-n,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Tv(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lu(t),e[t]=r}function bQ(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=im),GA=String.fromCharCode(32),YA=!1;function PU(e,t){switch(e){case"keyup":return VQ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function OU(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jh=!1;function YQ(e,t){switch(e){case"compositionend":return OU(t);case"keypress":return t.which!==32?null:(YA=!0,GA);case"textInput":return e=t.data,e===GA&&YA?null:e;default:return null}}function XQ(e,t){if(Jh)return e==="compositionend"||!wE&&PU(e,t)?(e=TU(),eb=vE=gf=null,Jh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=JA(r)}}function LU(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LU(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function DU(){for(var e=window,t=Eb();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Eb(e.document)}return t}function xE(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 oZ(e){var t=DU(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&LU(r.ownerDocument.documentElement,r)){if(n!==null&&xE(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,o=Math.min(n.start,a);n=n.end===void 0?o:Math.min(n.end,a),!e.extend&&o>n&&(a=n,n=o,o=a),a=eT(r,o);var s=eT(r,n);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>n?(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,ep=null,Q6=null,am=null,Z6=!1;function tT(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Z6||ep==null||ep!==Eb(n)||(n=ep,"selectionStart"in n&&xE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),am&&Om(am,n)||(am=n,n=Ib(Q6,"onSelect"),0np||(e.current=i4[np],i4[np]=null,np--)}function $o(e,t){np++,i4[np]=e.current,e.current=t}var Nf={},bs=Gf(Nf),zs=Gf(!1),Vd=Nf;function kp(e,t){var r=e.type.contextTypes;if(!r)return Nf;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in r)a[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Hs(e){return e=e.childContextTypes,e!=null}function Ob(){Ko(zs),Ko(bs)}function lT(e,t,r){if(bs.current!==Nf)throw Error(on(168));$o(bs,t),$o(zs,r)}function VU(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(on(108,eQ(e)||"Unknown",a));return ua({},r,n)}function Bb(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nf,Vd=bs.current,$o(bs,e),$o(zs,zs.current),!0}function uT(e,t,r){var n=e.stateNode;if(!n)throw Error(on(169));r?(e=VU(e,t,Vd),n.__reactInternalMemoizedMergedChildContext=e,Ko(zs),Ko(bs),$o(bs,e)):Ko(zs),$o(zs,r)}var mc=null,Zw=!1,Y3=!1;function GU(e){mc===null?mc=[e]:mc.push(e)}function vZ(e){Zw=!0,GU(e)}function Yf(){if(!Y3&&mc!==null){Y3=!0;var e=0,t=So;try{var r=mc;for(So=1;e>=s,a-=s,bc=1<<32-lu(t)+a|r<V?(te=ee,ee=null):te=ee.sibling;var R=T(L,ee,D[V],Y);if(R===null){ee===null&&(ee=te);break}e&&ee&&R.alternate===null&&t(L,ee),U=o(R,U,V),Z===null?q=R:Z.sibling=R,Z=R,ee=te}if(V===D.length)return r(L,ee),Zo&&xd(L,V),q;if(ee===null){for(;VV?(te=ee,ee=null):te=ee.sibling;var h=T(L,ee,R.value,Y);if(h===null){ee===null&&(ee=te);break}e&&ee&&h.alternate===null&&t(L,ee),U=o(h,U,V),Z===null?q=h:Z.sibling=h,Z=h,ee=te}if(R.done)return r(L,ee),Zo&&xd(L,V),q;if(ee===null){for(;!R.done;V++,R=D.next())R=_(L,R.value,Y),R!==null&&(U=o(R,U,V),Z===null?q=R:Z.sibling=R,Z=R);return Zo&&xd(L,V),q}for(ee=n(L,ee);!R.done;V++,R=D.next())R=O(ee,L,V,R.value,Y),R!==null&&(e&&R.alternate!==null&&ee.delete(R.key===null?V:R.key),U=o(R,U,V),Z===null?q=R:Z.sibling=R,Z=R);return e&&ee.forEach(function(g){return t(L,g)}),Zo&&xd(L,V),q}function B(L,U,D,Y){if(typeof D=="object"&&D!==null&&D.type===Zh&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case l1:e:{for(var q=D.key,Z=U;Z!==null;){if(Z.key===q){if(q=D.type,q===Zh){if(Z.tag===7){r(L,Z.sibling),U=a(Z,D.props.children),U.return=L,L=U;break e}}else if(Z.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===af&&mT(q)===Z.type){r(L,Z.sibling),U=a(Z,D.props),U.ref=J0(L,Z,D),U.return=L,L=U;break e}r(L,Z);break}else t(L,Z);Z=Z.sibling}D.type===Zh?(U=Dd(D.props.children,L.mode,Y,D.key),U.return=L,L=U):(Y=lb(D.type,D.key,D.props,null,L.mode,Y),Y.ref=J0(L,U,D),Y.return=L,L=Y)}return s(L);case Qh:e:{for(Z=D.key;U!==null;){if(U.key===Z)if(U.tag===4&&U.stateNode.containerInfo===D.containerInfo&&U.stateNode.implementation===D.implementation){r(L,U.sibling),U=a(U,D.children||[]),U.return=L,L=U;break e}else{r(L,U);break}else t(L,U);U=U.sibling}U=n5(D,L.mode,Y),U.return=L,L=U}return s(L);case af:return Z=D._init,B(L,U,Z(D._payload),Y)}if(Yg(D))return A(L,U,D,Y);if(G0(D))return M(L,U,D,Y);b1(L,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,U!==null&&U.tag===6?(r(L,U.sibling),U=a(U,D),U.return=L,L=U):(r(L,U),U=r5(D,L.mode,Y),U.return=L,L=U),s(L)):r(L,U)}return B}var Ap=rN(!0),nN=rN(!1),Ov={},ju=Gf(Ov),Lm=Gf(Ov),Dm=Gf(Ov);function Od(e){if(e===Ov)throw Error(on(174));return e}function TE(e,t){switch($o(Dm,t),$o(Lm,e),$o(ju,Ov),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:j6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=j6(t,e)}Ko(ju),$o(ju,t)}function Tp(){Ko(ju),Ko(Lm),Ko(Dm)}function iN(e){Od(Dm.current);var t=Od(ju.current),r=j6(t,e.type);t!==r&&($o(Lm,e),$o(ju,r))}function IE(e){Lm.current===e&&(Ko(ju),Ko(Lm))}var aa=Gf(0);function Fb(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 X3=[];function PE(){for(var e=0;er?r:4,e(!0);var n=Q3.transition;Q3.transition={};try{e(!1),t()}finally{So=r,Q3.transition=n}}function wN(){return Dl().memoizedState}function xZ(e,t,r){var n=Rf(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},xN(e))_N(t,r);else if(r=ZU(e,t,r,n),r!==null){var a=As();uu(r,e,n,a),SN(r,t,n)}}function _Z(e,t,r){var n=Rf(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(xN(e))_N(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,fu(l,s)){var c=t.interleaved;c===null?(a.next=a,RE(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=ZU(e,t,a,n),r!==null&&(a=As(),uu(r,e,n,a),SN(r,t,n))}}function xN(e){var t=e.alternate;return e===la||t!==null&&t===la}function _N(e,t){sm=jb=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function SN(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,pE(e,r)}}var Wb={readContext:Ll,useCallback:fs,useContext:fs,useEffect:fs,useImperativeHandle:fs,useInsertionEffect:fs,useLayoutEffect:fs,useMemo:fs,useReducer:fs,useRef:fs,useState:fs,useDebugValue:fs,useDeferredValue:fs,useTransition:fs,useMutableSource:fs,useSyncExternalStore:fs,useId:fs,unstable_isNewReconciler:!1},SZ={readContext:Ll,useCallback:function(e,t){return Iu().memoizedState=[e,t===void 0?null:t],e},useContext:Ll,useEffect:yT,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ib(4194308,4,gN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ib(4194308,4,e,t)},useInsertionEffect:function(e,t){return ib(4,2,e,t)},useMemo:function(e,t){var r=Iu();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Iu();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=xZ.bind(null,la,e),[n.memoizedState,e]},useRef:function(e){var t=Iu();return e={current:e},t.memoizedState=e},useState:vT,useDebugValue:LE,useDeferredValue:function(e){return Iu().memoizedState=e},useTransition:function(){var e=vT(!1),t=e[0];return e=wZ.bind(null,e[1]),Iu().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=la,a=Iu();if(Zo){if(r===void 0)throw Error(on(407));r=r()}else{if(r=t(),Ka===null)throw Error(on(349));(Yd&30)!==0||sN(n,t,r)}a.memoizedState=r;var o={value:r,getSnapshot:t};return a.queue=o,yT(uN.bind(null,n,o,e),[e]),n.flags|=2048,jm(9,lN.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Iu(),t=Ka.identifierPrefix;if(Zo){var r=wc,n=bc;r=(n&~(1<<32-lu(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=$m++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[Nu]=t,e[Nm]=n,PN(e,t,!1,!1),t.stateNode=e;e:{switch(s=z6(r,n),r){case"dialog":zo("cancel",e),zo("close",e),a=n;break;case"iframe":case"object":case"embed":zo("load",e),a=n;break;case"video":case"audio":for(a=0;aPp&&(t.flags|=128,n=!0,eg(o,!1),t.lanes=4194304)}else{if(!n)if(e=Fb(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),eg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Zo)return ds(t),null}else 2*ba()-o.renderingStartTime>Pp&&r!==1073741824&&(t.flags|=128,n=!0,eg(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=ba(),t.sibling=null,r=aa.current,$o(aa,n?r&1|2:r&1),t):(ds(t),null);case 22:case 23:return zE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(rl&1073741824)!==0&&(ds(t),t.subtreeFlags&6&&(t.flags|=8192)):ds(t),null;case 24:return null;case 25:return null}throw Error(on(156,t.tag))}function IZ(e,t){switch(SE(t),t.tag){case 1:return Hs(t.type)&&Ob(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tp(),Ko(zs),Ko(bs),PE(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return IE(t),null;case 13:if(Ko(aa),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(on(340));Rp()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ko(aa),null;case 4:return Tp(),null;case 10:return kE(t.type._context),null;case 22:case 23:return zE(),null;case 24:return null;default:return null}}var x1=!1,gs=!1,PZ=typeof WeakSet=="function"?WeakSet:Set,jn=null;function sp(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ha(e,t,n)}else r.current=null}function m4(e,t,r){try{r()}catch(n){ha(e,t,n)}}var kT=!1;function OZ(e,t){if(J6=Ab,e=DU(),xE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,c=-1,p=0,m=0,_=e,T=null;t:for(;;){for(var O;_!==r||a!==0&&_.nodeType!==3||(l=s+a),_!==o||n!==0&&_.nodeType!==3||(c=s+n),_.nodeType===3&&(s+=_.nodeValue.length),(O=_.firstChild)!==null;)T=_,_=O;for(;;){if(_===e)break t;if(T===r&&++p===a&&(l=s),T===o&&++m===n&&(c=s),(O=_.nextSibling)!==null)break;_=T,T=_.parentNode}_=O}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(e4={focusedElem:e,selectionRange:r},Ab=!1,jn=t;jn!==null;)if(t=jn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jn=e;else for(;jn!==null;){t=jn;try{var A=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var M=A.memoizedProps,B=A.memoizedState,L=t.stateNode,U=L.getSnapshotBeforeUpdate(t.elementType===t.type?M:Zl(t.type,M),B);L.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(on(163))}}catch(Y){ha(t,t.return,Y)}if(e=t.sibling,e!==null){e.return=t.return,jn=e;break}jn=t.return}return A=kT,kT=!1,A}function lm(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&m4(t,r,o)}a=a.next}while(a!==n)}}function t2(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function v4(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 UN(e){var t=e.alternate;t!==null&&(e.alternate=null,UN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nu],delete t[Nm],delete t[n4],delete t[gZ],delete t[mZ])),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 NN(e){return e.tag===5||e.tag===3||e.tag===4}function RT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||NN(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 y4(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Pb));else if(n!==4&&(e=e.child,e!==null))for(y4(e,t,r),e=e.sibling;e!==null;)y4(e,t,r),e=e.sibling}function b4(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(b4(e,t,r),e=e.sibling;e!==null;)b4(e,t,r),e=e.sibling}var Qa=null,Jl=!1;function ef(e,t,r){for(r=r.child;r!==null;)LN(e,t,r),r=r.sibling}function LN(e,t,r){if(Fu&&typeof Fu.onCommitFiberUnmount=="function")try{Fu.onCommitFiberUnmount(Vw,r)}catch{}switch(r.tag){case 5:gs||sp(r,t);case 6:var n=Qa,a=Jl;Qa=null,ef(e,t,r),Qa=n,Jl=a,Qa!==null&&(Jl?(e=Qa,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qa.removeChild(r.stateNode));break;case 18:Qa!==null&&(Jl?(e=Qa,r=r.stateNode,e.nodeType===8?G3(e.parentNode,r):e.nodeType===1&&G3(e,r),Im(e)):G3(Qa,r.stateNode));break;case 4:n=Qa,a=Jl,Qa=r.stateNode.containerInfo,Jl=!0,ef(e,t,r),Qa=n,Jl=a;break;case 0:case 11:case 14:case 15:if(!gs&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var o=a,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&m4(r,t,s),a=a.next}while(a!==n)}ef(e,t,r);break;case 1:if(!gs&&(sp(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){ha(r,t,l)}ef(e,t,r);break;case 21:ef(e,t,r);break;case 22:r.mode&1?(gs=(n=gs)||r.memoizedState!==null,ef(e,t,r),gs=n):ef(e,t,r);break;default:ef(e,t,r)}}function AT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new PZ),t.forEach(function(n){var a=WZ.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Gl(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=s),n&=~o}if(n=a,n=ba()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*UZ(n/1960))-n,10e?16:e,mf===null)var n=!1;else{if(e=mf,mf=null,qb=0,(eo&6)!==0)throw Error(on(331));var a=eo;for(eo|=4,jn=e.current;jn!==null;){var o=jn,s=o.child;if((jn.flags&16)!==0){var l=o.deletions;if(l!==null){for(var c=0;cba()-jE?Ld(e,0):FE|=r),qs(e,t)}function qN(e,t){t===0&&((e.mode&1)===0?t=1:(t=d1,d1<<=1,(d1&130023424)===0&&(d1=4194304)));var r=As();e=Rc(e,t),e!==null&&(Tv(e,t,r),qs(e,r))}function jZ(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),qN(e,r)}function WZ(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(on(314))}n!==null&&n.delete(t),qN(e,r)}var KN;KN=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||zs.current)Ws=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Ws=!1,AZ(e,t,r);Ws=(e.flags&131072)!==0}else Ws=!1,Zo&&(t.flags&1048576)!==0&&YU(t,Nb,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ob(e,t),e=t.pendingProps;var a=kp(t,bs.current);yp(t,r),a=BE(null,t,n,e,a,r);var o=UE();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,Hs(n)?(o=!0,Bb(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,AE(t),a.updater=Jw,t.stateNode=a,a._reactInternals=t,u4(t,n,e,r),t=d4(null,t,n,!0,o,r)):(t.tag=0,Zo&&o&&_E(t),Cs(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ob(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=HZ(n),e=Zl(n,e),a){case 0:t=f4(null,t,n,e,r);break e;case 1:t=ET(null,t,n,e,r);break e;case 11:t=_T(null,t,n,e,r);break e;case 14:t=ST(null,t,n,Zl(n.type,e),r);break e}throw Error(on(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Zl(n,a),f4(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Zl(n,a),ET(e,t,n,a,r);case 3:e:{if(AN(t),e===null)throw Error(on(387));n=t.pendingProps,o=t.memoizedState,a=o.element,JU(e,t),$b(t,n,null,r);var s=t.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ip(Error(on(423)),t),t=CT(e,t,n,r,a);break e}else if(n!==a){a=Ip(Error(on(424)),t),t=CT(e,t,n,r,a);break e}else for(ol=Cf(t.stateNode.containerInfo.firstChild),sl=t,Zo=!0,tu=null,r=nN(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Rp(),n===a){t=Ac(e,t,r);break e}Cs(e,t,n,r)}t=t.child}return t;case 5:return iN(t),e===null&&a4(t),n=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,s=a.children,t4(n,a)?s=null:o!==null&&t4(n,o)&&(t.flags|=32),RN(e,t),Cs(e,t,s,r),t.child;case 6:return e===null&&a4(t),null;case 13:return TN(e,t,r);case 4:return TE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ap(t,null,n,r):Cs(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Zl(n,a),_T(e,t,n,a,r);case 7:return Cs(e,t,t.pendingProps,r),t.child;case 8:return Cs(e,t,t.pendingProps.children,r),t.child;case 12:return Cs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,$o(Lb,n._currentValue),n._currentValue=s,o!==null)if(fu(o.value,s)){if(o.children===a.children&&!zs.current){t=Ac(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 c=l.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=_c(-1,r&-r),c.tag=2;var p=o.updateQueue;if(p!==null){p=p.shared;var m=p.pending;m===null?c.next=c:(c.next=m.next,m.next=c),p.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),s4(o.return,r,t),l.lanes|=r;break}c=c.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(on(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),s4(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}Cs(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,yp(t,r),a=Ll(a),n=n(a),t.flags|=1,Cs(e,t,n,r),t.child;case 14:return n=t.type,a=Zl(n,t.pendingProps),a=Zl(n.type,a),ST(e,t,n,a,r);case 15:return MN(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Zl(n,a),ob(e,t),t.tag=1,Hs(n)?(e=!0,Bb(t)):e=!1,yp(t,r),tN(t,n,a),u4(t,n,a,r),d4(null,t,n,!0,e,r);case 19:return IN(e,t,r);case 22:return kN(e,t,r)}throw Error(on(156,t.tag))};function VN(e,t){return bU(e,t)}function zZ(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(e,t,r,n){return new zZ(e,t,r,n)}function qE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HZ(e){if(typeof e=="function")return qE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cE)return 11;if(e===fE)return 14}return 2}function Af(e,t){var r=e.alternate;return r===null?(r=Tl(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 lb(e,t,r,n,a,o){var s=2;if(n=e,typeof e=="function")qE(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Zh:return Dd(r.children,a,o,t);case uE:s=8,a|=8;break;case O6:return e=Tl(12,r,t,a|2),e.elementType=O6,e.lanes=o,e;case B6:return e=Tl(13,r,t,a),e.elementType=B6,e.lanes=o,e;case U6:return e=Tl(19,r,t,a),e.elementType=U6,e.lanes=o,e;case rU:return n2(r,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case eU:s=10;break e;case tU:s=9;break e;case cE:s=11;break e;case fE:s=14;break e;case af:s=16,n=null;break e}throw Error(on(130,e==null?e:typeof e,""))}return t=Tl(s,r,t,a),t.elementType=e,t.type=n,t.lanes=o,t}function Dd(e,t,r,n){return e=Tl(7,e,n,t),e.lanes=r,e}function n2(e,t,r,n){return e=Tl(22,e,n,t),e.elementType=rU,e.lanes=r,e.stateNode={isHidden:!1},e}function r5(e,t,r){return e=Tl(6,e,null,t),e.lanes=r,e}function n5(e,t,r){return t=Tl(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qZ(e,t,r,n,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=L3(0),this.expirationTimes=L3(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=L3(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function KE(e,t,r,n,a,o,s,l,c){return e=new qZ(e,t,r,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Tl(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},AE(o),e}function KZ(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}t(),e.exports=dl})(Al);const E1=Hw(Al.exports);var XE={exports:{}},QN={};/** - * @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 Op=ue.exports;function QZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ZZ=typeof Object.is=="function"?Object.is:QZ,JZ=Op.useState,eJ=Op.useEffect,tJ=Op.useLayoutEffect,rJ=Op.useDebugValue;function nJ(e,t){var r=t(),n=JZ({inst:{value:r,getSnapshot:t}}),a=n[0].inst,o=n[1];return tJ(function(){a.value=r,a.getSnapshot=t,i5(a)&&o({inst:a})},[e,r,t]),eJ(function(){return i5(a)&&o({inst:a}),e(function(){i5(a)&&o({inst:a})})},[e]),rJ(r),r}function i5(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ZZ(e,r)}catch{return!0}}function iJ(e,t){return t()}var oJ=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?iJ:nJ;QN.useSyncExternalStore=Op.useSyncExternalStore!==void 0?Op.useSyncExternalStore:oJ;(function(e){e.exports=QN})(XE);const QE=XE.exports.useSyncExternalStore;var l2={exports:{}},u2={};/** - * @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 aJ=ue.exports,sJ=Symbol.for("react.element"),lJ=Symbol.for("react.fragment"),uJ=Object.prototype.hasOwnProperty,cJ=aJ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fJ={key:!0,ref:!0,__self:!0,__source:!0};function ZN(e,t,r){var n,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(n in t)uJ.call(t,n)&&!fJ.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:sJ,type:e,key:o,ref:s,props:a,_owner:cJ.current}}u2.Fragment=lJ;u2.jsx=ZN;u2.jsxs=ZN;(function(e){e.exports=u2})(l2);const No=l2.exports.Fragment,ne=l2.exports.jsx,$t=l2.exports.jsxs,dJ=Object.freeze(Object.defineProperty({__proto__:null,Fragment:No,jsx:ne,jsxs:$t},Symbol.toStringTag,{value:"Module"})),LT=ue.exports.createContext(void 0),JN=ue.exports.createContext(!1);function eL(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=LT),window.ReactQueryClientContext):LT)}const c2=({context:e}={})=>{const t=ue.exports.useContext(eL(e,ue.exports.useContext(JN)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hJ=({client:e,children:t,context:r,contextSharing:n=!1})=>{ue.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const a=eL(r,n);return ne(JN.Provider,{value:!r&&n,children:ne(a.Provider,{value:e,children:t})})},tL=ue.exports.createContext(!1),pJ=()=>ue.exports.useContext(tL);tL.Provider;function gJ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const mJ=ue.exports.createContext(gJ()),vJ=()=>ue.exports.useContext(mJ);function rL(e,t){return typeof e=="function"?e(...t):!!e}const yJ=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},bJ=e=>{ue.exports.useEffect(()=>{e.clearReset()},[e])},wJ=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&rL(r,[e.error,n]),xJ=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},_J=(e,t)=>e.isLoading&&e.isFetching&&!t,SJ=(e,t,r)=>e?.suspense&&_J(t,r),EJ=(e,t,r)=>t.fetchOptimistic(e).then(({data:n})=>{e.onSuccess==null||e.onSuccess(n),e.onSettled==null||e.onSettled(n,null)}).catch(n=>{r.clearReset(),e.onError==null||e.onError(n),e.onSettled==null||e.onSettled(void 0,n)});function CJ(e,t){const r=c2({context:e.context}),n=pJ(),a=vJ(),o=r.defaultQueryOptions(e);o._optimisticResults=n?"isRestoring":"optimistic",o.onError&&(o.onError=sa.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=sa.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=sa.batchCalls(o.onSettled)),xJ(o),yJ(o,a),bJ(a);const[s]=ue.exports.useState(()=>new t(r,o)),l=s.getOptimisticResult(o);if(QE(ue.exports.useCallback(c=>n?()=>{}:s.subscribe(sa.batchCalls(c)),[s,n]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),ue.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),SJ(o,l,n))throw EJ(o,s,a);if(wJ({result:l,errorResetBoundary:a,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function Tc(e,t,r){const n=Vg(e,t,r);return CJ(n,IX)}function MJ(e,t,r){const[n,a={}]=vX(e,t,r),o=c2({context:a.context}),s=o.getMutationCache();return QE(ue.exports.useCallback(l=>s.subscribe(sa.batchCalls(l)),[s]),()=>o.isMutating(n),()=>o.isMutating(n))}function nL(e,t,r){const n=mX(e,t,r),a=c2({context:n.context}),[o]=ue.exports.useState(()=>new OX(a,n));ue.exports.useEffect(()=>{o.setOptions(n)},[o,n]);const s=QE(ue.exports.useCallback(c=>o.subscribe(sa.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=ue.exports.useCallback((c,p)=>{o.mutate(c,p).catch(kJ)},[o]);if(s.error&&rL(o.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}function kJ(){}var E4={},DT=Al.exports;E4.createRoot=DT.createRoot,E4.hydrateRoot=DT.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 Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function AJ(){return Math.random().toString(36).substr(2,8)}function FT(e){return{usr:e.state,key:e.key}}function C4(e,t,r,n){return r===void 0&&(r=null),Gb({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?u0(t):t,{state:r,key:t&&t.key||n||AJ()})}function ZE(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function u0(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function TJ(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:ZE(e);return Va(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}function IJ(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,s=a.history,l=vf.Pop,c=null;function p(){l=vf.Pop,c&&c({action:l,location:T.location})}function m(O,A){l=vf.Push;let M=C4(T.location,O,A);r&&r(M,O);let B=FT(M),L=T.createHref(M);try{s.pushState(B,"",L)}catch{a.location.assign(L)}o&&c&&c({action:l,location:T.location})}function _(O,A){l=vf.Replace;let M=C4(T.location,O,A);r&&r(M,O);let B=FT(M),L=T.createHref(M);s.replaceState(B,"",L),o&&c&&c({action:l,location:T.location})}let T={get action(){return l},get location(){return e(a,s)},listen(O){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener($T,p),c=O,()=>{a.removeEventListener($T,p),c=null}},createHref(O){return t(a,O)},encodeLocation(O){let A=TJ(typeof O=="string"?O:ZE(O));return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:_,go(O){return s.go(O)}};return T}var jT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jT||(jT={}));function PJ(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?u0(t):t,a=aL(n.pathname||"/",r);if(a==null)return null;let o=iL(e);OJ(o);let s=null;for(let l=0;s==null&&l{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Va(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let p=$d([n,c.relativePath]),m=r.concat(c);o.children&&o.children.length>0&&(Va(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),iL(o.children,t,m,p)),!(o.path==null&&!o.index)&&t.push({path:p,score:FJ(p,o.index),routesMeta:m})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,s);else for(let c of oL(o.path))a(o,s,c)}),t}function oL(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let s=oL(n.join("/")),l=[];return l.push(...s.map(c=>c===""?o:[o,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function OJ(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:jJ(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const BJ=/^:\w+$/,UJ=3,NJ=2,LJ=1,DJ=10,$J=-2,WT=e=>e==="*";function FJ(e,t){let r=e.split("/"),n=r.length;return r.some(WT)&&(n+=$J),t&&(n+=NJ),r.filter(a=>!WT(a)).reduce((a,o)=>a+(BJ.test(o)?UJ:o===""?LJ:DJ),n)}function jJ(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function WJ(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let s=0;s{if(m==="*"){let T=l[_]||"";s=o.slice(0,o.length-T.length).replace(/(.)\/+$/,"$1")}return p[m]=KJ(l[_]||"",m),p},{}),pathname:o,pathnameBase:s,pattern:e}}function HJ(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),JE(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(n.push(l),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function qJ(e){try{return decodeURI(e)}catch(t){return JE(!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 KJ(e,t){try{return decodeURIComponent(e)}catch(r){return JE(!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 aL(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function JE(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VJ(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?u0(e):e;return{pathname:r?r.startsWith("/")?r:GJ(r,t):t,search:ZJ(n),hash:JJ(a)}}function GJ(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 o5(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function YJ(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function XJ(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=u0(e):(a=Gb({},e),Va(!a.pathname||!a.pathname.includes("?"),o5("?","pathname","search",a)),Va(!a.pathname||!a.pathname.includes("#"),o5("#","pathname","hash",a)),Va(!a.search||!a.search.includes("#"),o5("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,l;if(n||s==null)l=r;else{let _=t.length-1;if(s.startsWith("..")){let T=s.split("/");for(;T[0]==="..";)T.shift(),_-=1;a.pathname=T.join("/")}l=_>=0?t[_]:"/"}let c=VJ(a,l),p=s&&s!=="/"&&s.endsWith("/"),m=(o||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(p||m)&&(c.pathname+="/"),c}const $d=e=>e.join("/").replace(/\/\/+/g,"/"),QJ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ZJ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JJ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class eee{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function tee(e){return e instanceof eee}const ree=["post","put","patch","delete"];[...ree];/** - * 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 M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.value=n,a.getSnapshot=t,a5(a)&&o({inst:a})},[e,n,t]),aee(()=>(a5(a)&&o({inst:a}),e(()=>{a5(a)&&o({inst:a})})),[e]),lee(n),n}function a5(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!iee(r,n)}catch{return!0}}function cee(e,t,r){return t()}const fee=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dee=!fee,hee=dee?cee:uee;"useSyncExternalStore"in Kd&&(e=>e.useSyncExternalStore)(Kd);const sL=ue.exports.createContext(null),lL=ue.exports.createContext(null),eC=ue.exports.createContext(null),f2=ue.exports.createContext(null),c0=ue.exports.createContext({outlet:null,matches:[]}),uL=ue.exports.createContext(null);function d2(){return ue.exports.useContext(f2)!=null}function Bv(){return d2()||Va(!1),ue.exports.useContext(f2).location}function tC(){d2()||Va(!1);let{basename:e,navigator:t}=ue.exports.useContext(eC),{matches:r}=ue.exports.useContext(c0),{pathname:n}=Bv(),a=JSON.stringify(YJ(r).map(l=>l.pathnameBase)),o=ue.exports.useRef(!1);return ue.exports.useEffect(()=>{o.current=!0}),ue.exports.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){t.go(l);return}let p=XJ(l,JSON.parse(a),n,c.relative==="path");e!=="/"&&(p.pathname=p.pathname==="/"?e:$d([e,p.pathname])),(c.replace?t.replace:t.push)(p,c.state,c)},[e,t,a,n])}function cL(){let{matches:e}=ue.exports.useContext(c0),t=e[e.length-1];return t?t.params:{}}function pee(e,t){d2()||Va(!1);let{navigator:r}=ue.exports.useContext(eC),n=ue.exports.useContext(lL),{matches:a}=ue.exports.useContext(c0),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Bv(),p;if(t){var m;let M=typeof t=="string"?u0(t):t;l==="/"||((m=M.pathname)==null?void 0:m.startsWith(l))||Va(!1),p=M}else p=c;let _=p.pathname||"/",T=l==="/"?_:_.slice(l.length)||"/",O=PJ(e,{pathname:T}),A=yee(O&&O.map(M=>Object.assign({},M,{params:Object.assign({},s,M.params),pathname:$d([l,r.encodeLocation?r.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?l:$d([l,r.encodeLocation?r.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),a,n||void 0);return t&&A?ne(f2.Provider,{value:{location:M4({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:vf.Pop},children:A}):A}function gee(){let e=_ee(),t=tee(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n};return $t(No,{children:[ne("h2",{children:"Unhandled Thrown Error!"}),ne("h3",{style:{fontStyle:"italic"},children:t}),r?ne("pre",{style:a,children:r}):null,ne("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),$t("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",ne("code",{style:o,children:"errorElement"})," props on\xA0",ne("code",{style:o,children:""})]})]})}class mee extends ue.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?ne(c0.Provider,{value:this.props.routeContext,children:ne(uL.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function vee(e){let{routeContext:t,match:r,children:n}=e,a=ue.exports.useContext(sL);return a&&a.static&&a.staticContext&&r.route.errorElement&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),ne(c0.Provider,{value:t,children:n})}function yee(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,a=r?.errors;if(a!=null){let o=n.findIndex(s=>s.route.id&&a?.[s.route.id]);o>=0||Va(!1),n=n.slice(0,Math.min(n.length,o+1))}return n.reduceRight((o,s,l)=>{let c=s.route.id?a?.[s.route.id]:null,p=r?s.route.errorElement||ne(gee,{}):null,m=t.concat(n.slice(0,l+1)),_=()=>ne(vee,{match:s,routeContext:{outlet:o,matches:m},children:c?p:s.route.element!==void 0?s.route.element:o});return r&&(s.route.errorElement||l===0)?ne(mee,{location:r.location,component:p,error:c,children:_(),routeContext:{outlet:null,matches:m}}):_()},null)}var zT;(function(e){e.UseRevalidator="useRevalidator"})(zT||(zT={}));var Yb;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Yb||(Yb={}));function bee(e){let t=ue.exports.useContext(lL);return t||Va(!1),t}function wee(e){let t=ue.exports.useContext(c0);return t||Va(!1),t}function xee(e){let t=wee(),r=t.matches[t.matches.length-1];return r.route.id||Va(!1),r.route.id}function _ee(){var e;let t=ue.exports.useContext(uL),r=bee(Yb.UseRouteError),n=xee(Yb.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Vh(e){Va(!1)}function See(e){let{basename:t="/",children:r=null,location:n,navigationType:a=vf.Pop,navigator:o,static:s=!1}=e;d2()&&Va(!1);let l=t.replace(/^\/*/,"/"),c=ue.exports.useMemo(()=>({basename:l,navigator:o,static:s}),[l,o,s]);typeof n=="string"&&(n=u0(n));let{pathname:p="/",search:m="",hash:_="",state:T=null,key:O="default"}=n,A=ue.exports.useMemo(()=>{let M=aL(p,l);return M==null?null:{pathname:M,search:m,hash:_,state:T,key:O}},[l,p,m,_,T,O]);return A==null?null:ne(eC.Provider,{value:c,children:ne(f2.Provider,{children:r,value:{location:A,navigationType:a}})})}function Eee(e){let{children:t,location:r}=e,n=ue.exports.useContext(sL),a=n&&!t?n.router.routes:k4(t);return pee(a,r)}var HT;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(HT||(HT={}));new Promise(()=>{});function k4(e,t){t===void 0&&(t=[]);let r=[];return ue.exports.Children.forEach(e,(n,a)=>{if(!ue.exports.isValidElement(n))return;if(n.type===ue.exports.Fragment){r.push.apply(r,k4(n.props.children,t));return}n.type!==Vh&&Va(!1),!n.props.index||!n.props.children||Va(!1);let o=[...t,a],s={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(s.children=k4(n.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 R4(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 n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Cee(e,t){let r=R4(e);for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}function Mee(e){let{basename:t,children:r,window:n}=e,a=ue.exports.useRef();a.current==null&&(a.current=RJ({window:n,v5Compat:!0}));let o=a.current,[s,l]=ue.exports.useState({action:o.action,location:o.location});return ue.exports.useLayoutEffect(()=>o.listen(l),[o]),ne(See,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o})}var qT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(qT||(qT={}));var KT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(KT||(KT={}));function h2(e){let t=ue.exports.useRef(R4(e)),r=Bv(),n=ue.exports.useMemo(()=>Cee(r.search,t.current),[r.search]),a=tC(),o=ue.exports.useCallback((s,l)=>{const c=R4(typeof s=="function"?s(n):s);a("?"+c,l)},[a,n]);return[n,o]}const p2="/assets/icon.136020fa.svg",rC="/assets/github-dark.aac0d47c.svg";function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=fL(e[r])}),t}function Ol(e,t,r={clone:!0}){const n=r.clone?He({},e):e;return Md(e)&&Md(t)&&Object.keys(t).forEach(a=>{a!=="__proto__"&&(Md(t[a])&&a in e&&Md(e[a])?n[a]=Ol(e[a],t[a],r):r.clone?n[a]=Md(t[a])?fL(t[a]):t[a]:n[a]=t[a])}),n}var Io={exports:{}},kee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ree=kee,Aee=Ree;function dL(){}function hL(){}hL.resetWarningCache=dL;var Tee=function(){function e(n,a,o,s,l,c){if(c!==Aee){var p=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 p.name="Invariant Violation",p}}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:hL,resetWarningCache:dL};return r.PropTypes=r,r};Io.exports=Tee();function Lf(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 Zd(e,t=166){let r;function n(...a){const o=()=>{e.apply(this,a)};clearTimeout(r),r=setTimeout(o,t)}return n.clear=()=>{clearTimeout(r)},n}function Bee(e,t){return()=>null}function ub(e,t){return ue.exports.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function Ra(e){return e&&e.ownerDocument||document}function $l(e){return Ra(e).defaultView||window}function Uee(e,t){return()=>null}function Xb(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Nee=typeof window<"u"?ue.exports.useLayoutEffect:ue.exports.useEffect,du=Nee;let VT=0;function Lee(e){const[t,r]=ue.exports.useState(e),n=e||t;return ue.exports.useEffect(()=>{t==null&&(VT+=1,r(`mui-${VT}`))},[t]),n}const GT=Kd["useId"];function C2(e){if(GT!==void 0){const t=GT();return e??t}return Lee(e)}function Dee(e,t,r,n,a){return null}function zm({controlled:e,default:t,name:r,state:n="value"}){const{current:a}=ue.exports.useRef(e!==void 0),[o,s]=ue.exports.useState(t),l=a?e:o,c=ue.exports.useCallback(p=>{a||s(p)},[]);return[l,c]}function Il(e){const t=ue.exports.useRef(e);return du(()=>{t.current=e}),ue.exports.useCallback((...r)=>(0,t.current)(...r),[])}function ea(...e){return ue.exports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Xb(r,t)})},e)}let M2=!0,T4=!1,YT;const $ee={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 Fee(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&$ee[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function jee(e){e.metaKey||e.altKey||e.ctrlKey||(M2=!0)}function s5(){M2=!1}function Wee(){this.visibilityState==="hidden"&&T4&&(M2=!0)}function zee(e){e.addEventListener("keydown",jee,!0),e.addEventListener("mousedown",s5,!0),e.addEventListener("pointerdown",s5,!0),e.addEventListener("touchstart",s5,!0),e.addEventListener("visibilitychange",Wee,!0)}function Hee(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return M2||Fee(t)}function k2(){const e=ue.exports.useCallback(a=>{a!=null&&zee(a.ownerDocument)},[]),t=ue.exports.useRef(!1);function r(){return t.current?(T4=!0,window.clearTimeout(YT),YT=window.setTimeout(()=>{T4=!1},100),t.current=!1,!0):!1}function n(a){return Hee(a)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function gL(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Bh;function mL(){if(Bh)return Bh;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),Bh="reverse",e.scrollLeft>0?Bh="default":(e.scrollLeft=1,e.scrollLeft===0&&(Bh="negative")),document.body.removeChild(e),Bh}function XT(e,t){const r=e.scrollLeft;if(t!=="rtl")return r;switch(mL()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function oC(e,t){const r=He({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=He({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const a=e[n]||{},o=t[n];r[n]={},!o||!Object.keys(o)?r[n]=a:!a||!Object.keys(a)?r[n]=o:(r[n]=He({},o),Object.keys(a).forEach(s=>{r[n][s]=oC(a[s],o[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function wi(e,t,r){const n={};return Object.keys(e).forEach(a=>{n[a]=e[a].reduce((o,s)=>(s&&(o.push(t(s)),r&&r[s]&&o.push(r[s])),o),[]).join(" ")}),n}const QT=e=>e,qee=()=>{let e=QT;return{configure(t){e=t},generate(t){return e(t)},reset(){e=QT}}},Kee=qee(),aC=Kee,Vee={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function gi(e,t,r="Mui"){const n=Vee[t];return n?`${r}-${n}`:`${aC.generate(e)}-${t}`}function oi(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=gi(e,a,r)}),n}function Mn(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function vL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Gee=/^((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)-.*))$/,Yee=vL(function(e){return Gee.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Xee(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ja(f0,--Gs):0,Bp--,Ma===10&&(Bp=1,A2--),Ma}function ll(){return Ma=Gs2||qm(Ma)>3?"":" "}function lte(e,t){for(;--t&&ll()&&!(Ma<48||Ma>102||Ma>57&&Ma<65||Ma>70&&Ma<97););return Uv(e,cb()+(t<6&&Wu()==32&&ll()==32))}function P4(e){for(;ll();)switch(Ma){case e:return Gs;case 34:case 39:e!==34&&e!==39&&P4(Ma);break;case 40:e===41&&P4(e);break;case 92:ll();break}return Gs}function ute(e,t){for(;ll()&&e+Ma!==47+10;)if(e+Ma===42+42&&Wu()===47)break;return"/*"+Uv(t,Gs-1)+"*"+R2(e===47?e:ll())}function cte(e){for(;!qm(Wu());)ll();return Uv(e,Gs)}function fte(e){return SL(db("",null,null,null,[""],e=_L(e),0,[0],e))}function db(e,t,r,n,a,o,s,l,c){for(var p=0,m=0,_=s,T=0,O=0,A=0,M=1,B=1,L=1,U=0,D="",Y=a,q=o,Z=n,ee=D;B;)switch(A=U,U=ll()){case 40:if(A!=108&&Ja(ee,_-1)==58){I4(ee+=vo(fb(U),"&","&\f"),"&\f")!=-1&&(L=-1);break}case 34:case 39:case 91:ee+=fb(U);break;case 9:case 10:case 13:case 32:ee+=ste(A);break;case 92:ee+=lte(cb()-1,7);continue;case 47:switch(Wu()){case 42:case 47:C1(dte(ute(ll(),cb()),t,r),c);break;default:ee+="/"}break;case 123*M:l[p++]=Pu(ee)*L;case 125*M:case 59:case 0:switch(U){case 0:case 125:B=0;case 59+m:O>0&&Pu(ee)-_&&C1(O>32?JT(ee+";",n,r,_-1):JT(vo(ee," ","")+";",n,r,_-2),c);break;case 59:ee+=";";default:if(C1(Z=ZT(ee,t,r,p,m,a,l,D,Y=[],q=[],_),o),U===123)if(m===0)db(ee,t,Z,Z,Y,o,_,l,q);else switch(T===99&&Ja(ee,3)===110?100:T){case 100:case 109:case 115:db(e,Z,Z,n&&C1(ZT(e,Z,Z,0,0,a,l,D,a,Y=[],_),q),a,q,_,l,n?Y:q);break;default:db(ee,Z,Z,Z,[""],q,0,l,q)}}p=m=O=0,M=L=1,D=ee="",_=s;break;case 58:_=1+Pu(ee),O=A;default:if(M<1){if(U==123)--M;else if(U==125&&M++==0&&ate()==125)continue}switch(ee+=R2(U),U*M){case 38:L=m>0?1:(ee+="\f",-1);break;case 44:l[p++]=(Pu(ee)-1)*L,L=1;break;case 64:Wu()===45&&(ee+=fb(ll())),T=Wu(),m=_=Pu(D=ee+=cte(cb())),U++;break;case 45:A===45&&Pu(ee)==2&&(M=0)}}return o}function ZT(e,t,r,n,a,o,s,l,c,p,m){for(var _=a-1,T=a===0?o:[""],O=uC(T),A=0,M=0,B=0;A0?T[L]+" "+U:vo(U,/&\f/g,T[L])))&&(c[B++]=D);return T2(e,t,r,a===0?sC:l,c,p,m)}function dte(e,t,r){return T2(e,t,r,yL,R2(ote()),Hm(e,2,-2),0)}function JT(e,t,r,n){return T2(e,t,r,lC,Hm(e,0,n),Hm(e,n+1,-1),n)}function wp(e,t){for(var r="",n=uC(e),a=0;a6)switch(Ja(e,t+1)){case 109:if(Ja(e,t+4)!==45)break;case 102:return vo(e,/(.+:)(.+)-([^]+)/,"$1"+fo+"$2-$3$1"+Qb+(Ja(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~I4(e,"stretch")?EL(vo(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ja(e,t+1)!==115)break;case 6444:switch(Ja(e,Pu(e)-3-(~I4(e,"!important")&&10))){case 107:return vo(e,":",":"+fo)+e;case 101:return vo(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+fo+(Ja(e,14)===45?"inline-":"")+"box$3$1"+fo+"$2$3$1"+hs+"$2box$3")+e}break;case 5936:switch(Ja(e,t+11)){case 114:return fo+e+hs+vo(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fo+e+hs+vo(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fo+e+hs+vo(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fo+e+hs+e+e}return e}var xte=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case lC:t.return=EL(t.value,t.length);break;case bL:return wp([rg(t,{value:vo(t.value,"@","@"+fo)})],a);case sC:if(t.length)return ite(t.props,function(o){switch(nte(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wp([rg(t,{props:[vo(o,/:(read-\w+)/,":"+Qb+"$1")]})],a);case"::placeholder":return wp([rg(t,{props:[vo(o,/:(plac\w+)/,":"+fo+"input-$1")]}),rg(t,{props:[vo(o,/:(plac\w+)/,":"+Qb+"$1")]}),rg(t,{props:[vo(o,/:(plac\w+)/,hs+"input-$1")]})],a)}return""})}},_te=[xte],Ste=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(M){var B=M.getAttribute("data-emotion");B.indexOf(" ")!==-1&&(document.head.appendChild(M),M.setAttribute("data-s",""))})}var a=t.stylisPlugins||_te,o={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(M){for(var B=M.getAttribute("data-emotion").split(" "),L=1;L=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Bte={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},Ute=/[A-Z]|^ms/g,Nte=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IL=function(t){return t.charCodeAt(1)===45},tI=function(t){return t!=null&&typeof t!="boolean"},l5=vL(function(e){return IL(e)?e:e.replace(Ute,"-$&").toLowerCase()}),rI=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Nte,function(n,a,o){return Ou={name:a,styles:o,next:Ou},a})}return Bte[t]!==1&&!IL(t)&&typeof r=="number"&&r!==0?r+"px":r};function Km(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 Ou={name:r.name,styles:r.styles,next:Ou},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Ou={name:n.name,styles:n.styles,next:Ou},n=n.next;var a=r.styles+";";return a}return Lte(e,t,r)}case"function":{if(e!==void 0){var o=Ou,s=r(e);return Ou=o,Km(e,t,s)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function Lte(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a96?jte:Wte},aI=function(t,r,n){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"&&n&&(a=t.__emotion_forwardProp),a},zte=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return AL(r,n,a),$te(function(){return TL(r,n,a)}),null},Hte=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,s;r!==void 0&&(o=r.label,s=r.target);var l=aI(t,r,n),c=l||oI(a),p=!c("as");return function(){var m=arguments,_=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&_.push("label:"+o+";"),m[0]==null||m[0].raw===void 0)_.push.apply(_,m);else{_.push(m[0][0]);for(var T=m.length,O=1;Ot(Vte(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 UL(e,t){return Kte(e,t)}const Yte=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function fm(e,t){return t?Ol(e,t,{clone:!1}):e}const gC={xs:0,sm:600,md:900,lg:1200,xl:1536},sI={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${gC[e]}px)`};function Ic(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||sI;return t.reduce((s,l,c)=>(s[o.up(o.keys[c])]=r(t[c]),s),{})}if(typeof t=="object"){const o=n.breakpoints||sI;return Object.keys(t).reduce((s,l)=>{if(Object.keys(o.values||gC).indexOf(l)!==-1){const c=o.up(l);s[c]=r(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return r(t)}function Xte(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Qte(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Up(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Zb(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=Up(e,r)||n,t&&(a=t(a,n,e)),a}function bo(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,p=Up(c,n)||{};return Ic(s,l,_=>{let T=Zb(p,a,_);return _===T&&typeof _=="string"&&(T=Zb(p,a,`${t}${_==="default"?"":Qr(_)}`,_)),r===!1?T:{[r]:T}})};return o.propTypes={},o.filterProps=[t],o}function j2(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?fm(a,t[o](n)):a,{});return r.propTypes={},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function Zte(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Jte={m:"margin",p:"padding"},ere={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lI={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},tre=Zte(e=>{if(e.length>2)if(lI[e])e=lI[e];else return[e];const[t,r]=e.split(""),n=Jte[t],a=ere[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),mC=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],vC=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...mC,...vC];function Nv(e,t,r,n){var a;const o=(a=Up(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 NL(e){return Nv(e,"spacing",8)}function Lv(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function rre(e,t){return r=>e.reduce((n,a)=>(n[a]=Lv(t,r),n),{})}function nre(e,t,r,n){if(t.indexOf(r)===-1)return null;const a=tre(r),o=rre(a,n),s=e[r];return Ic(e,s,o)}function LL(e,t){const r=NL(e.theme);return Object.keys(e).map(n=>nre(e,t,n,r)).reduce(fm,{})}function fa(e){return LL(e,mC)}fa.propTypes={};fa.filterProps=mC;function da(e){return LL(e,vC)}da.propTypes={};da.filterProps=vC;function Lu(e){return typeof e!="number"?e:`${e}px solid`}const ire=bo({prop:"border",themeKey:"borders",transform:Lu}),ore=bo({prop:"borderTop",themeKey:"borders",transform:Lu}),are=bo({prop:"borderRight",themeKey:"borders",transform:Lu}),sre=bo({prop:"borderBottom",themeKey:"borders",transform:Lu}),lre=bo({prop:"borderLeft",themeKey:"borders",transform:Lu}),ure=bo({prop:"borderColor",themeKey:"palette"}),cre=bo({prop:"borderTopColor",themeKey:"palette"}),fre=bo({prop:"borderRightColor",themeKey:"palette"}),dre=bo({prop:"borderBottomColor",themeKey:"palette"}),hre=bo({prop:"borderLeftColor",themeKey:"palette"}),W2=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Nv(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Lv(t,n)});return Ic(e,e.borderRadius,r)}return null};W2.propTypes={};W2.filterProps=["borderRadius"];j2(ire,ore,are,sre,lre,ure,cre,fre,dre,hre,W2);const z2=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Nv(e.theme,"spacing",8),r=n=>({gap:Lv(t,n)});return Ic(e,e.gap,r)}return null};z2.propTypes={};z2.filterProps=["gap"];const H2=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Nv(e.theme,"spacing",8),r=n=>({columnGap:Lv(t,n)});return Ic(e,e.columnGap,r)}return null};H2.propTypes={};H2.filterProps=["columnGap"];const q2=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Nv(e.theme,"spacing",8),r=n=>({rowGap:Lv(t,n)});return Ic(e,e.rowGap,r)}return null};q2.propTypes={};q2.filterProps=["rowGap"];const pre=bo({prop:"gridColumn"}),gre=bo({prop:"gridRow"}),mre=bo({prop:"gridAutoFlow"}),vre=bo({prop:"gridAutoColumns"}),yre=bo({prop:"gridAutoRows"}),bre=bo({prop:"gridTemplateColumns"}),wre=bo({prop:"gridTemplateRows"}),xre=bo({prop:"gridTemplateAreas"}),_re=bo({prop:"gridArea"});j2(z2,H2,q2,pre,gre,mre,vre,yre,bre,wre,xre,_re);function xp(e,t){return t==="grey"?t:e}const Sre=bo({prop:"color",themeKey:"palette",transform:xp}),Ere=bo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:xp}),Cre=bo({prop:"backgroundColor",themeKey:"palette",transform:xp});j2(Sre,Ere,Cre);function il(e){return e<=1&&e!==0?`${e*100}%`:e}const Mre=bo({prop:"width",transform:il}),yC=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,a,o;return{maxWidth:((n=e.theme)==null||(a=n.breakpoints)==null||(o=a.values)==null?void 0:o[r])||gC[r]||il(r)}};return Ic(e,e.maxWidth,t)}return null};yC.filterProps=["maxWidth"];const kre=bo({prop:"minWidth",transform:il}),Rre=bo({prop:"height",transform:il}),Are=bo({prop:"maxHeight",transform:il}),Tre=bo({prop:"minHeight",transform:il});bo({prop:"size",cssProperty:"width",transform:il});bo({prop:"size",cssProperty:"height",transform:il});const Ire=bo({prop:"boxSizing"});j2(Mre,yC,kre,Rre,Are,Tre,Ire);const Pre={border:{themeKey:"borders",transform:Lu},borderTop:{themeKey:"borders",transform:Lu},borderRight:{themeKey:"borders",transform:Lu},borderBottom:{themeKey:"borders",transform:Lu},borderLeft:{themeKey:"borders",transform:Lu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:W2},color:{themeKey:"palette",transform:xp},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:xp},backgroundColor:{themeKey:"palette",transform:xp},p:{style:da},pt:{style:da},pr:{style:da},pb:{style:da},pl:{style:da},px:{style:da},py:{style:da},padding:{style:da},paddingTop:{style:da},paddingRight:{style:da},paddingBottom:{style:da},paddingLeft:{style:da},paddingX:{style:da},paddingY:{style:da},paddingInline:{style:da},paddingInlineStart:{style:da},paddingInlineEnd:{style:da},paddingBlock:{style:da},paddingBlockStart:{style:da},paddingBlockEnd:{style:da},m:{style:fa},mt:{style:fa},mr:{style:fa},mb:{style:fa},ml:{style:fa},mx:{style:fa},my:{style:fa},margin:{style:fa},marginTop:{style:fa},marginRight:{style:fa},marginBottom:{style:fa},marginLeft:{style:fa},marginX:{style:fa},marginY:{style:fa},marginInline:{style:fa},marginInlineStart:{style:fa},marginInlineEnd:{style:fa},marginBlock:{style:fa},marginBlockStart:{style:fa},marginBlockEnd:{style:fa},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:z2},rowGap:{style:q2},columnGap:{style:H2},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:il},maxWidth:{style:yC},minWidth:{transform:il},height:{transform:il},maxHeight:{transform:il},minHeight:{transform:il},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},K2=Pre;function Ore(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Bre(e,t){return typeof e=="function"?e(t):e}function Ure(){function e(r,n,a,o){const s={[r]:n,theme:a},l=o[r];if(!l)return{[r]:n};const{cssProperty:c=r,themeKey:p,transform:m,style:_}=l;if(n==null)return null;const T=Up(a,p)||{};return _?_(s):Ic(s,n,A=>{let M=Zb(T,m,A);return A===M&&typeof A=="string"&&(M=Zb(T,m,`${r}${A==="default"?"":Qr(A)}`,A)),c===!1?M:{[c]:M}})}function t(r){var n;const{sx:a,theme:o={}}=r||{};if(!a)return null;const s=(n=o.unstable_sxConfig)!=null?n:K2;function l(c){let p=c;if(typeof c=="function")p=c(o);else if(typeof c!="object")return c;if(!p)return null;const m=Xte(o.breakpoints),_=Object.keys(m);let T=m;return Object.keys(p).forEach(O=>{const A=Bre(p[O],o);if(A!=null)if(typeof A=="object")if(s[O])T=fm(T,e(O,A,o,s));else{const M=Ic({theme:o},A,B=>({[O]:B}));Ore(M,A)?T[O]=t({sx:A,theme:o}):T=fm(T,M)}else T=fm(T,e(O,A,o,s))}),Qte(_,T)}return Array.isArray(a)?a.map(l):l(a)}return t}const DL=Ure();DL.filterProps=["sx"];const V2=DL,Nre=["sx"],Lre=e=>{var t,r;const n={systemProps:{},otherProps:{}},a=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:K2;return Object.keys(e).forEach(o=>{a[o]?n.systemProps[o]=e[o]:n.otherProps[o]=e[o]}),n};function $L(e){const{sx:t}=e,r=Mn(e,Nre),{systemProps:n,otherProps:a}=Lre(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const l=t(...s);return Md(l)?He({},n,l):n}:o=He({},n,t),He({},a,{sx:o})}function FL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=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,n)=>r.val-n.val),t.reduce((r,n)=>He({},r,{[n.key]:n.val}),{})};function Fre(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,a=Mn(e,Dre),o=$re(t),s=Object.keys(o);function l(T){return`@media (min-width:${typeof t[T]=="number"?t[T]:T}${r})`}function c(T){return`@media (max-width:${(typeof t[T]=="number"?t[T]:T)-n/100}${r})`}function p(T,O){const A=s.indexOf(O);return`@media (min-width:${typeof t[T]=="number"?t[T]:T}${r}) and (max-width:${(A!==-1&&typeof t[s[A]]=="number"?t[s[A]]:O)-n/100}${r})`}function m(T){return s.indexOf(T)+1(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}const Hre=["breakpoints","palette","spacing","shape"];function bC(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={}}=e,s=Mn(e,Hre),l=Fre(r),c=zre(a);let p=Ol({breakpoints:l,direction:"ltr",components:{},palette:He({mode:"light"},n),spacing:c,shape:He({},Wre,o)},s);return p=t.reduce((m,_)=>Ol(m,_),p),p.unstable_sxConfig=He({},K2,s?.unstable_sxConfig),p.unstable_sx=function(_){return V2({sx:_,theme:this})},p}const qre=ue.exports.createContext(null),jL=qre;function WL(){return ue.exports.useContext(jL)}const Kre=typeof Symbol=="function"&&Symbol.for,Vre=Kre?Symbol.for("mui.nested"):"__THEME_NESTED__";function Gre(e,t){return typeof t=="function"?t(e):He({},e,t)}function Yre(e){const{children:t,theme:r}=e,n=WL(),a=ue.exports.useMemo(()=>{const o=n===null?r:Gre(n,r);return o!=null&&(o[Vre]=n!==null),o},[r,n]);return ne(jL.Provider,{value:a,children:t})}function Xre(e){return Object.keys(e).length===0}function wC(e=null){const t=WL();return!t||Xre(t)?e:t}const Qre=bC();function G2(e=Qre){return wC(e)}const Zre=["className","component"];function zL(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:n}=e,a=UL("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(V2);return ue.exports.forwardRef(function(l,c){const p=G2(t),m=$L(l),{className:_,component:T="div"}=m,O=Mn(m,Zre);return ne(a,He({as:T,ref:c,className:vn(_,n?n(r):r),theme:p},O))})}const Jre=zL(),wa=Jre,ene=["variant"];function uI(e){return e.length===0}function HL(e){const{variant:t}=e,r=Mn(e,ene);let n=t||"";return Object.keys(r).sort().forEach(a=>{a==="color"?n+=uI(n)?e[a]:Qr(e[a]):n+=`${uI(n)?a:Qr(a)}${Qr(e[a].toString())}`}),n}const tne=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],rne=["theme"],nne=["theme"];function ng(e){return Object.keys(e).length===0}function ine(e){return typeof e=="string"&&e.charCodeAt(0)>96}const one=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,ane=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const n={};return r.forEach(a=>{const o=HL(a.props);n[o]=a.style}),n},sne=(e,t,r,n)=>{var a,o;const{ownerState:s={}}=e,l=[],c=r==null||(a=r.components)==null||(o=a[n])==null?void 0:o.variants;return c&&c.forEach(p=>{let m=!0;Object.keys(p.props).forEach(_=>{s[_]!==p.props[_]&&e[_]!==p.props[_]&&(m=!1)}),m&&l.push(t[HL(p.props)])}),l};function dm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const lne=bC();function qL(e={}){const{defaultTheme:t=lne,rootShouldForwardProp:r=dm,slotShouldForwardProp:n=dm}=e,a=o=>{const s=ng(o.theme)?t:o.theme;return V2(He({},o,{theme:s}))};return a.__mui_systemSx=!0,(o,s={})=>{Yte(o,D=>D.filter(Y=>!(Y!=null&&Y.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:p,skipSx:m,overridesResolver:_}=s,T=Mn(s,tne),O=p!==void 0?p:c&&c!=="Root"||!1,A=m||!1;let M,B=dm;c==="Root"?B=r:c?B=n:ine(o)&&(B=void 0);const L=UL(o,He({shouldForwardProp:B,label:M},T)),U=(D,...Y)=>{const q=Y?Y.map(te=>typeof te=="function"&&te.__emotion_real!==te?R=>{let{theme:h}=R,g=Mn(R,rne);return te(He({theme:ng(h)?t:h},g))}:te):[];let Z=D;l&&_&&q.push(te=>{const R=ng(te.theme)?t:te.theme,h=one(l,R);if(h){const g={};return Object.entries(h).forEach(([v,u])=>{g[v]=typeof u=="function"?u(He({},te,{theme:R})):u}),_(te,g)}return null}),l&&!O&&q.push(te=>{const R=ng(te.theme)?t:te.theme;return sne(te,ane(l,R),R,l)}),A||q.push(a);const ee=q.length-Y.length;if(Array.isArray(D)&&ee>0){const te=new Array(ee).fill("");Z=[...D,...te],Z.raw=[...D.raw,...te]}else typeof D=="function"&&D.__emotion_real!==D&&(Z=te=>{let{theme:R}=te,h=Mn(te,nne);return D(He({theme:ng(R)?t:R},h))});return L(Z,...q)};return L.withConfig&&(U.withConfig=L.withConfig),U}}const une=qL(),ao=une;function KL(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:oC(t.components[r].defaultProps,n)}function cne({props:e,name:t,defaultTheme:r}){const n=G2(r);return KL({theme:n,name:t,props:e})}function xC(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function fne(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(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Jd(e){if(e.type)return e;if(e.charAt(0)==="#")return Jd(fne(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Lf(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a)===-1)throw new Error(Lf(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}function Y2(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function dne(e){e=Jd(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(p,m=(p+r/30)%12)=>a-o*Math.max(Math.min(m-3,9-m,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),Y2({type:l,values:c})}function B4(e){e=Jd(e);let t=e.type==="hsl"||e.type==="hsla"?Jd(dne(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 hne(e,t){const r=B4(e),n=B4(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function oo(e,t){return e=Jd(e),t=xC(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Y2(e)}function X2(e,t){if(e=Jd(e),t=xC(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 Y2(e)}function Q2(e,t){if(e=Jd(e),t=xC(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 Y2(e)}function pne(e,t=.15){return B4(e)>.5?X2(e,t):Q2(e,t)}const gne={};function mne(e){const t=G2();return ne(pC.Provider,{value:typeof t=="object"?t:gne,children:e.children})}function vne(e){const{children:t,theme:r}=e;return ne(Yre,{theme:r,children:ne(mne,{children:t})})}function yne(e,t){return He({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const bne={black:"#000",white:"#fff"},Gm=bne,wne={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"},xne=wne,_ne={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"},Uh=_ne,Sne={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"},Nh=Sne,Ene={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"},ig=Ene,Cne={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"},Lh=Cne,Mne={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"},Dh=Mne,kne={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"},$h=kne,Rne=["mode","contrastThreshold","tonalOffset"],cI={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:Gm.white,default:Gm.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}},u5={text:{primary:Gm.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:Gm.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 fI(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Q2(e.main,a):t==="dark"&&(e.dark=X2(e.main,o)))}function Ane(e="light"){return e==="dark"?{main:Lh[200],light:Lh[50],dark:Lh[400]}:{main:Lh[700],light:Lh[400],dark:Lh[800]}}function Tne(e="light"){return e==="dark"?{main:Uh[200],light:Uh[50],dark:Uh[400]}:{main:Uh[500],light:Uh[300],dark:Uh[700]}}function Ine(e="light"){return e==="dark"?{main:Nh[500],light:Nh[300],dark:Nh[700]}:{main:Nh[700],light:Nh[400],dark:Nh[800]}}function Pne(e="light"){return e==="dark"?{main:Dh[400],light:Dh[300],dark:Dh[700]}:{main:Dh[700],light:Dh[500],dark:Dh[900]}}function One(e="light"){return e==="dark"?{main:$h[400],light:$h[300],dark:$h[700]}:{main:$h[800],light:$h[500],dark:$h[900]}}function Bne(e="light"){return e==="dark"?{main:ig[400],light:ig[300],dark:ig[700]}:{main:"#ed6c02",light:ig[500],dark:ig[900]}}function Une(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,a=Mn(e,Rne),o=e.primary||Ane(t),s=e.secondary||Tne(t),l=e.error||Ine(t),c=e.info||Pne(t),p=e.success||One(t),m=e.warning||Bne(t);function _(M){return hne(M,u5.text.primary)>=r?u5.text.primary:cI.text.primary}const T=({color:M,name:B,mainShade:L=500,lightShade:U=300,darkShade:D=700})=>{if(M=He({},M),!M.main&&M[L]&&(M.main=M[L]),!M.hasOwnProperty("main"))throw new Error(Lf(11,B?` (${B})`:"",L));if(typeof M.main!="string")throw new Error(Lf(12,B?` (${B})`:"",JSON.stringify(M.main)));return fI(M,"light",U,n),fI(M,"dark",D,n),M.contrastText||(M.contrastText=_(M.main)),M},O={dark:u5,light:cI};return Ol(He({common:He({},Gm),mode:t,primary:T({color:o,name:"primary"}),secondary:T({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:T({color:l,name:"error"}),warning:T({color:m,name:"warning"}),info:T({color:c,name:"info"}),success:T({color:p,name:"success"}),grey:xne,contrastThreshold:r,getContrastText:_,augmentColor:T,tonalOffset:n},O[t]),a)}const Nne=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Lne(e){return Math.round(e*1e5)/1e5}const dI={textTransform:"uppercase"},hI='"Roboto", "Helvetica", "Arial", sans-serif';function Dne(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=hI,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:p=16,allVariants:m,pxToRem:_}=r,T=Mn(r,Nne),O=a/14,A=_||(L=>`${L/p*O}rem`),M=(L,U,D,Y,q)=>He({fontFamily:n,fontWeight:L,fontSize:A(U),lineHeight:D},n===hI?{letterSpacing:`${Lne(Y/U)}em`}:{},q,m),B={h1:M(o,96,1.167,-1.5),h2:M(o,60,1.2,-.5),h3:M(s,48,1.167,0),h4:M(s,34,1.235,.25),h5:M(s,24,1.334,0),h6:M(l,20,1.6,.15),subtitle1:M(s,16,1.75,.15),subtitle2:M(l,14,1.57,.1),body1:M(s,16,1.5,.15),body2:M(s,14,1.43,.15),button:M(l,14,1.75,.4,dI),caption:M(s,12,1.66,.4),overline:M(s,12,2.66,1,dI)};return Ol(He({htmlFontSize:p,pxToRem:A,fontFamily:n,fontSize:a,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},B),T,{clone:!1})}const $ne=.2,Fne=.14,jne=.12;function Qo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${$ne})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Fne})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${jne})`].join(",")}const Wne=["none",Qo(0,2,1,-1,0,1,1,0,0,1,3,0),Qo(0,3,1,-2,0,2,2,0,0,1,5,0),Qo(0,3,3,-2,0,3,4,0,0,1,8,0),Qo(0,2,4,-1,0,4,5,0,0,1,10,0),Qo(0,3,5,-1,0,5,8,0,0,1,14,0),Qo(0,3,5,-1,0,6,10,0,0,1,18,0),Qo(0,4,5,-2,0,7,10,1,0,2,16,1),Qo(0,5,5,-3,0,8,10,1,0,3,14,2),Qo(0,5,6,-3,0,9,12,1,0,3,16,2),Qo(0,6,6,-3,0,10,14,1,0,4,18,3),Qo(0,6,7,-4,0,11,15,1,0,4,20,3),Qo(0,7,8,-4,0,12,17,2,0,5,22,4),Qo(0,7,8,-4,0,13,19,2,0,5,24,4),Qo(0,7,9,-4,0,14,21,2,0,5,26,4),Qo(0,8,9,-5,0,15,22,2,0,6,28,5),Qo(0,8,10,-5,0,16,24,2,0,6,30,5),Qo(0,8,11,-5,0,17,26,2,0,6,32,5),Qo(0,9,11,-5,0,18,28,2,0,7,34,6),Qo(0,9,12,-6,0,19,29,2,0,7,36,6),Qo(0,10,13,-6,0,20,31,3,0,8,38,7),Qo(0,10,13,-6,0,21,33,3,0,8,40,7),Qo(0,10,14,-6,0,22,35,3,0,8,42,7),Qo(0,11,14,-7,0,23,36,3,0,9,44,8),Qo(0,11,15,-7,0,24,38,3,0,9,46,8)],zne=Wne,Hne=["duration","easing","delay"],qne={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)"},VL={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pI(e){return`${Math.round(e)}ms`}function Kne(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Vne(e){const t=He({},qne,e.easing),r=He({},VL,e.duration);return He({getAutoHeightDuration:Kne,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:c=0}=o;return Mn(o,Hne),(Array.isArray(a)?a:[a]).map(p=>`${p} ${typeof s=="string"?s:pI(s)} ${l} ${typeof c=="string"?c:pI(c)}`).join(",")}},e,{easing:t,duration:r})}const Gne={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Yne=Gne,Xne=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function _C(e={},...t){const{mixins:r={},palette:n={},transitions:a={},typography:o={}}=e,s=Mn(e,Xne);if(e.vars)throw new Error(Lf(18));const l=Une(n),c=bC(e);let p=Ol(c,{mixins:yne(c.breakpoints,r),palette:l,shadows:zne.slice(),typography:Dne(l,o),transitions:Vne(a),zIndex:He({},Yne)});return p=Ol(p,s),p=t.reduce((m,_)=>Ol(m,_),p),p.unstable_sxConfig=He({},K2,s?.unstable_sxConfig),p.unstable_sx=function(_){return V2({sx:_,theme:this})},p}function Qne(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Zne(e){return parseFloat(e)}const Jne=_C(),Z2=Jne;function _a(){return G2(Z2)}function Si({props:e,name:t}){return cne({props:e,name:t,defaultTheme:Z2})}const xu=e=>dm(e)&&e!=="classes",eie=dm,tie=qL({defaultTheme:Z2,rootShouldForwardProp:xu}),ur=tie,rie=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},gI=rie,nie="/assets/search.7f4d94b1.svg",SC="/assets/close.3e490fed.svg";function Jb(e){return typeof e=="string"}function Zg(e,t,r){return e===void 0||Jb(e)?t:He({},t,{ownerState:He({},t.ownerState,r)})}function iie(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function U4(e,t){return typeof e=="function"?e(t):e}function mI(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 oie(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const O=vn(a?.className,n?.className,o,r?.className),A=He({},r?.style,a?.style,n?.style),M=He({},r,a,n);return O.length>0&&(M.className=O),Object.keys(A).length>0&&(M.style=A),{props:M,internalRef:void 0}}const s=iie(He({},a,n)),l=mI(n),c=mI(a),p=t(s),m=vn(p?.className,r?.className,o,a?.className,n?.className),_=He({},p?.style,r?.style,a?.style,n?.style),T=He({},p,r,c,l);return m.length>0&&(T.className=m),Object.keys(_).length>0&&(T.style=_),{props:T,internalRef:p.ref}}const aie=["elementType","externalSlotProps","ownerState"];function N4(e){var t;const{elementType:r,externalSlotProps:n,ownerState:a}=e,o=Mn(e,aie),s=U4(n,a),{props:l,internalRef:c}=oie(He({},o,{externalSlotProps:s})),p=ea(c,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return Zg(r,He({},l,{ref:p}),a)}function vI(e){return e.substring(2).toLowerCase()}function sie(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const m=ea(t.ref,l),_=Il(A=>{const M=p.current;p.current=!1;const B=Ra(l.current);if(!c.current||!l.current||"clientX"in A&&sie(A,B))return;if(s.current){s.current=!1;return}let L;A.composedPath?L=A.composedPath().indexOf(l.current)>-1:L=!B.documentElement.contains(A.target)||l.current.contains(A.target),!L&&(r||!M)&&a(A)}),T=A=>M=>{p.current=!0;const B=t.props[A];B&&B(M)},O={ref:m};return o!==!1&&(O[o]=T(o)),ue.exports.useEffect(()=>{if(o!==!1){const A=vI(o),M=Ra(l.current),B=()=>{s.current=!0};return M.addEventListener(A,_),M.addEventListener("touchmove",B),()=>{M.removeEventListener(A,_),M.removeEventListener("touchmove",B)}}},[_,o]),n!==!1&&(O[n]=T(n)),ue.exports.useEffect(()=>{if(n!==!1){const A=vI(n),M=Ra(l.current);return M.addEventListener(A,_),()=>{M.removeEventListener(A,_)}}},[_,n]),ne(ue.exports.Fragment,{children:ue.exports.cloneElement(t,O)})}const lie=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function uie(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 cie(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function fie(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||cie(e))}function die(e){const t=[],r=[];return Array.from(e.querySelectorAll(lie)).forEach((n,a)=>{const o=uie(n);o===-1||!fie(n)||(o===0?t.push(n):r.push({documentOrder:a,tabIndex:o,node:n}))}),r.sort((n,a)=>n.tabIndex===a.tabIndex?n.documentOrder-a.documentOrder:n.tabIndex-a.tabIndex).map(n=>n.node).concat(t)}function hie(){return!0}function pie(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:a=!1,getTabbable:o=die,isEnabled:s=hie,open:l}=e,c=ue.exports.useRef(!1),p=ue.exports.useRef(null),m=ue.exports.useRef(null),_=ue.exports.useRef(null),T=ue.exports.useRef(null),O=ue.exports.useRef(!1),A=ue.exports.useRef(null),M=ea(t.ref,A),B=ue.exports.useRef(null);ue.exports.useEffect(()=>{!l||!A.current||(O.current=!r)},[r,l]),ue.exports.useEffect(()=>{if(!l||!A.current)return;const D=Ra(A.current);return A.current.contains(D.activeElement)||(A.current.hasAttribute("tabIndex")||A.current.setAttribute("tabIndex","-1"),O.current&&A.current.focus()),()=>{a||(_.current&&_.current.focus&&(c.current=!0,_.current.focus()),_.current=null)}},[l]),ue.exports.useEffect(()=>{if(!l||!A.current)return;const D=Ra(A.current),Y=ee=>{const{current:V}=A;if(V!==null){if(!D.hasFocus()||n||!s()||c.current){c.current=!1;return}if(!V.contains(D.activeElement)){if(ee&&T.current!==ee.target||D.activeElement!==T.current)T.current=null;else if(T.current!==null)return;if(!O.current)return;let h=[];if((D.activeElement===p.current||D.activeElement===m.current)&&(h=o(A.current)),h.length>0){var te,R;const g=Boolean(((te=B.current)==null?void 0:te.shiftKey)&&((R=B.current)==null?void 0:R.key)==="Tab"),v=h[0],u=h[h.length-1];typeof v!="string"&&typeof u!="string"&&(g?u.focus():v.focus())}else V.focus()}}},q=ee=>{B.current=ee,!(n||!s()||ee.key!=="Tab")&&D.activeElement===A.current&&ee.shiftKey&&(c.current=!0,m.current&&m.current.focus())};D.addEventListener("focusin",Y),D.addEventListener("keydown",q,!0);const Z=setInterval(()=>{D.activeElement&&D.activeElement.tagName==="BODY"&&Y(null)},50);return()=>{clearInterval(Z),D.removeEventListener("focusin",Y),D.removeEventListener("keydown",q,!0)}},[r,n,a,s,l,o]);const L=D=>{_.current===null&&(_.current=D.relatedTarget),O.current=!0,T.current=D.target;const Y=t.props.onFocus;Y&&Y(D)},U=D=>{_.current===null&&(_.current=D.relatedTarget),O.current=!0};return $t(ue.exports.Fragment,{children:[ne("div",{tabIndex:l?0:-1,onFocus:U,ref:p,"data-testid":"sentinelStart"}),ue.exports.cloneElement(t,{ref:M,onFocus:L}),ne("div",{tabIndex:l?0:-1,onFocus:U,ref:m,"data-testid":"sentinelEnd"})]})}var Ks="top",Fl="bottom",jl="right",Vs="left",CC="auto",Dv=[Ks,Fl,jl,Vs],Np="start",Ym="end",gie="clippingParents",GL="viewport",og="popper",mie="reference",yI=Dv.reduce(function(e,t){return e.concat([t+"-"+Np,t+"-"+Ym])},[]),YL=[].concat(Dv,[CC]).reduce(function(e,t){return e.concat([t,t+"-"+Np,t+"-"+Ym])},[]),vie="beforeRead",yie="read",bie="afterRead",wie="beforeMain",xie="main",_ie="afterMain",Sie="beforeWrite",Eie="write",Cie="afterWrite",Mie=[vie,yie,bie,wie,xie,_ie,Sie,Eie,Cie];function Xu(e){return e?(e.nodeName||"").toLowerCase():null}function zl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=zl(e).Element;return e instanceof t||e instanceof Element}function Bl(e){var t=zl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function MC(e){if(typeof ShadowRoot>"u")return!1;var t=zl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function kie(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},o=t.elements[r];!Bl(o)||!Xu(o)||(Object.assign(o.style,n),Object.keys(a).forEach(function(s){var l=a[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Rie(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(n){var a=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(c,p){return c[p]="",c},{});!Bl(a)||!Xu(a)||(Object.assign(a.style,l),Object.keys(o).forEach(function(c){a.removeAttribute(c)}))})}}const Aie={name:"applyStyles",enabled:!0,phase:"write",fn:kie,effect:Rie,requires:["computeStyles"]};function zu(e){return e.split("-")[0]}var Fd=Math.max,ew=Math.min,Lp=Math.round;function L4(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function XL(){return!/^((?!chrome|android).)*safari/i.test(L4())}function Dp(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,o=1;t&&Bl(e)&&(a=e.offsetWidth>0&&Lp(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Lp(n.height)/e.offsetHeight||1);var s=eh(e)?zl(e):window,l=s.visualViewport,c=!XL()&&r,p=(n.left+(c&&l?l.offsetLeft:0))/a,m=(n.top+(c&&l?l.offsetTop:0))/o,_=n.width/a,T=n.height/o;return{width:_,height:T,top:m,right:p+_,bottom:m+T,left:p,x:p,y:m}}function kC(e){var t=Dp(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function QL(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&MC(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Pc(e){return zl(e).getComputedStyle(e)}function Tie(e){return["table","td","th"].indexOf(Xu(e))>=0}function Xf(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function J2(e){return Xu(e)==="html"?e:e.assignedSlot||e.parentNode||(MC(e)?e.host:null)||Xf(e)}function bI(e){return!Bl(e)||Pc(e).position==="fixed"?null:e.offsetParent}function Iie(e){var t=/firefox/i.test(L4()),r=/Trident/i.test(L4());if(r&&Bl(e)){var n=Pc(e);if(n.position==="fixed")return null}var a=J2(e);for(MC(a)&&(a=a.host);Bl(a)&&["html","body"].indexOf(Xu(a))<0;){var o=Pc(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 $v(e){for(var t=zl(e),r=bI(e);r&&Tie(r)&&Pc(r).position==="static";)r=bI(r);return r&&(Xu(r)==="html"||Xu(r)==="body"&&Pc(r).position==="static")?t:r||Iie(e)||t}function RC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function hm(e,t,r){return Fd(e,ew(t,r))}function Pie(e,t,r){var n=hm(e,t,r);return n>r?r:n}function ZL(){return{top:0,right:0,bottom:0,left:0}}function JL(e){return Object.assign({},ZL(),e)}function eD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Oie=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,JL(typeof t!="number"?t:eD(t,Dv))};function Bie(e){var t,r=e.state,n=e.name,a=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=zu(r.placement),c=RC(l),p=[Vs,jl].indexOf(l)>=0,m=p?"height":"width";if(!(!o||!s)){var _=Oie(a.padding,r),T=kC(o),O=c==="y"?Ks:Vs,A=c==="y"?Fl:jl,M=r.rects.reference[m]+r.rects.reference[c]-s[c]-r.rects.popper[m],B=s[c]-r.rects.reference[c],L=$v(o),U=L?c==="y"?L.clientHeight||0:L.clientWidth||0:0,D=M/2-B/2,Y=_[O],q=U-T[m]-_[A],Z=U/2-T[m]/2+D,ee=hm(Y,Z,q),V=c;r.modifiersData[n]=(t={},t[V]=ee,t.centerOffset=ee-Z,t)}}function Uie(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||!QL(t.elements.popper,a)||(t.elements.arrow=a))}const Nie={name:"arrow",enabled:!0,phase:"main",fn:Bie,effect:Uie,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $p(e){return e.split("-")[1]}var Lie={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Die(e){var t=e.x,r=e.y,n=window,a=n.devicePixelRatio||1;return{x:Lp(t*a)/a||0,y:Lp(r*a)/a||0}}function wI(e){var t,r=e.popper,n=e.popperRect,a=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,_=e.isFixed,T=s.x,O=T===void 0?0:T,A=s.y,M=A===void 0?0:A,B=typeof m=="function"?m({x:O,y:M}):{x:O,y:M};O=B.x,M=B.y;var L=s.hasOwnProperty("x"),U=s.hasOwnProperty("y"),D=Vs,Y=Ks,q=window;if(p){var Z=$v(r),ee="clientHeight",V="clientWidth";if(Z===zl(r)&&(Z=Xf(r),Pc(Z).position!=="static"&&l==="absolute"&&(ee="scrollHeight",V="scrollWidth")),Z=Z,a===Ks||(a===Vs||a===jl)&&o===Ym){Y=Fl;var te=_&&Z===q&&q.visualViewport?q.visualViewport.height:Z[ee];M-=te-n.height,M*=c?1:-1}if(a===Vs||(a===Ks||a===Fl)&&o===Ym){D=jl;var R=_&&Z===q&&q.visualViewport?q.visualViewport.width:Z[V];O-=R-n.width,O*=c?1:-1}}var h=Object.assign({position:l},p&&Lie),g=m===!0?Die({x:O,y:M}):{x:O,y:M};if(O=g.x,M=g.y,c){var v;return Object.assign({},h,(v={},v[Y]=U?"0":"",v[D]=L?"0":"",v.transform=(q.devicePixelRatio||1)<=1?"translate("+O+"px, "+M+"px)":"translate3d("+O+"px, "+M+"px, 0)",v))}return Object.assign({},h,(t={},t[Y]=U?M+"px":"",t[D]=L?O+"px":"",t.transform="",t))}function $ie(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,c=l===void 0?!0:l,p={placement:zu(t.placement),variation:$p(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,wI(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wI(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Fie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$ie,data:{}};var M1={passive:!0};function jie(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,o=a===void 0?!0:a,s=n.resize,l=s===void 0?!0:s,c=zl(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&p.forEach(function(m){m.addEventListener("scroll",r.update,M1)}),l&&c.addEventListener("resize",r.update,M1),function(){o&&p.forEach(function(m){m.removeEventListener("scroll",r.update,M1)}),l&&c.removeEventListener("resize",r.update,M1)}}const Wie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jie,data:{}};var zie={left:"right",right:"left",bottom:"top",top:"bottom"};function hb(e){return e.replace(/left|right|bottom|top/g,function(t){return zie[t]})}var Hie={start:"end",end:"start"};function xI(e){return e.replace(/start|end/g,function(t){return Hie[t]})}function AC(e){var t=zl(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function TC(e){return Dp(Xf(e)).left+AC(e).scrollLeft}function qie(e,t){var r=zl(e),n=Xf(e),a=r.visualViewport,o=n.clientWidth,s=n.clientHeight,l=0,c=0;if(a){o=a.width,s=a.height;var p=XL();(p||!p&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:s,x:l+TC(e),y:c}}function Kie(e){var t,r=Xf(e),n=AC(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=Fd(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=Fd(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-n.scrollLeft+TC(e),c=-n.scrollTop;return Pc(a||r).direction==="rtl"&&(l+=Fd(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function IC(e){var t=Pc(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function tD(e){return["html","body","#document"].indexOf(Xu(e))>=0?e.ownerDocument.body:Bl(e)&&IC(e)?e:tD(J2(e))}function pm(e,t){var r;t===void 0&&(t=[]);var n=tD(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),o=zl(n),s=a?[o].concat(o.visualViewport||[],IC(n)?n:[]):n,l=t.concat(s);return a?l:l.concat(pm(J2(s)))}function D4(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Vie(e,t){var r=Dp(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 _I(e,t,r){return t===GL?D4(qie(e,r)):eh(t)?Vie(t,r):D4(Kie(Xf(e)))}function Gie(e){var t=pm(J2(e)),r=["absolute","fixed"].indexOf(Pc(e).position)>=0,n=r&&Bl(e)?$v(e):e;return eh(n)?t.filter(function(a){return eh(a)&&QL(a,n)&&Xu(a)!=="body"}):[]}function Yie(e,t,r,n){var a=t==="clippingParents"?Gie(e):[].concat(t),o=[].concat(a,[r]),s=o[0],l=o.reduce(function(c,p){var m=_I(e,p,n);return c.top=Fd(m.top,c.top),c.right=ew(m.right,c.right),c.bottom=ew(m.bottom,c.bottom),c.left=Fd(m.left,c.left),c},_I(e,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function rD(e){var t=e.reference,r=e.element,n=e.placement,a=n?zu(n):null,o=n?$p(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,c;switch(a){case Ks:c={x:s,y:t.y-r.height};break;case Fl:c={x:s,y:t.y+t.height};break;case jl:c={x:t.x+t.width,y:l};break;case Vs:c={x:t.x-r.width,y:l};break;default:c={x:t.x,y:t.y}}var p=a?RC(a):null;if(p!=null){var m=p==="y"?"height":"width";switch(o){case Np:c[p]=c[p]-(t[m]/2-r[m]/2);break;case Ym:c[p]=c[p]+(t[m]/2-r[m]/2);break}}return c}function Xm(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,o=r.strategy,s=o===void 0?e.strategy:o,l=r.boundary,c=l===void 0?gie:l,p=r.rootBoundary,m=p===void 0?GL:p,_=r.elementContext,T=_===void 0?og:_,O=r.altBoundary,A=O===void 0?!1:O,M=r.padding,B=M===void 0?0:M,L=JL(typeof B!="number"?B:eD(B,Dv)),U=T===og?mie:og,D=e.rects.popper,Y=e.elements[A?U:T],q=Yie(eh(Y)?Y:Y.contextElement||Xf(e.elements.popper),c,m,s),Z=Dp(e.elements.reference),ee=rD({reference:Z,element:D,strategy:"absolute",placement:a}),V=D4(Object.assign({},D,ee)),te=T===og?V:Z,R={top:q.top-te.top+L.top,bottom:te.bottom-q.bottom+L.bottom,left:q.left-te.left+L.left,right:te.right-q.right+L.right},h=e.modifiersData.offset;if(T===og&&h){var g=h[a];Object.keys(R).forEach(function(v){var u=[jl,Fl].indexOf(v)>=0?1:-1,f=[Ks,Fl].indexOf(v)>=0?"y":"x";R[v]+=g[f]*u})}return R}function Xie(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,p=c===void 0?YL:c,m=$p(n),_=m?l?yI:yI.filter(function(A){return $p(A)===m}):Dv,T=_.filter(function(A){return p.indexOf(A)>=0});T.length===0&&(T=_);var O=T.reduce(function(A,M){return A[M]=Xm(e,{placement:M,boundary:a,rootBoundary:o,padding:s})[zu(M)],A},{});return Object.keys(O).sort(function(A,M){return O[A]-O[M]})}function Qie(e){if(zu(e)===CC)return[];var t=hb(e);return[xI(e),t,xI(t)]}function Zie(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,o=a===void 0?!0:a,s=r.altAxis,l=s===void 0?!0:s,c=r.fallbackPlacements,p=r.padding,m=r.boundary,_=r.rootBoundary,T=r.altBoundary,O=r.flipVariations,A=O===void 0?!0:O,M=r.allowedAutoPlacements,B=t.options.placement,L=zu(B),U=L===B,D=c||(U||!A?[hb(B)]:Qie(B)),Y=[B].concat(D).reduce(function(we,Ae){return we.concat(zu(Ae)===CC?Xie(t,{placement:Ae,boundary:m,rootBoundary:_,padding:p,flipVariations:A,allowedAutoPlacements:M}):Ae)},[]),q=t.rects.reference,Z=t.rects.popper,ee=new Map,V=!0,te=Y[0],R=0;R=0,f=u?"width":"height",y=Xm(t,{placement:h,boundary:m,rootBoundary:_,altBoundary:T,padding:p}),S=u?v?jl:Vs:v?Fl:Ks;q[f]>Z[f]&&(S=hb(S));var w=hb(S),d=[];if(o&&d.push(y[g]<=0),l&&d.push(y[S]<=0,y[w]<=0),d.every(function(we){return we})){te=h,V=!1;break}ee.set(h,d)}if(V)for(var I=A?3:1,$=function(Ae){var je=Y.find(function(Vt){var De=ee.get(Vt);if(De)return De.slice(0,Ae).every(function(Fe){return Fe})});if(je)return te=je,"break"},b=I;b>0;b--){var X=$(b);if(X==="break")break}t.placement!==te&&(t.modifiersData[n]._skip=!0,t.placement=te,t.reset=!0)}}const Jie={name:"flip",enabled:!0,phase:"main",fn:Zie,requiresIfExists:["offset"],data:{_skip:!1}};function SI(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 EI(e){return[Ks,jl,Fl,Vs].some(function(t){return e[t]>=0})}function eoe(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,s=Xm(t,{elementContext:"reference"}),l=Xm(t,{altBoundary:!0}),c=SI(s,n),p=SI(l,a,o),m=EI(c),_=EI(p);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:p,isReferenceHidden:m,hasPopperEscaped:_},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":_})}const toe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eoe};function roe(e,t,r){var n=zu(e),a=[Vs,Ks].indexOf(n)>=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,[Vs,jl].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function noe(e){var t=e.state,r=e.options,n=e.name,a=r.offset,o=a===void 0?[0,0]:a,s=YL.reduce(function(m,_){return m[_]=roe(_,t.rects,o),m},{}),l=s[t.placement],c=l.x,p=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=s}const ioe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:noe};function ooe(e){var t=e.state,r=e.name;t.modifiersData[r]=rD({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const aoe={name:"popperOffsets",enabled:!0,phase:"read",fn:ooe,data:{}};function soe(e){return e==="x"?"y":"x"}function loe(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,o=a===void 0?!0:a,s=r.altAxis,l=s===void 0?!1:s,c=r.boundary,p=r.rootBoundary,m=r.altBoundary,_=r.padding,T=r.tether,O=T===void 0?!0:T,A=r.tetherOffset,M=A===void 0?0:A,B=Xm(t,{boundary:c,rootBoundary:p,padding:_,altBoundary:m}),L=zu(t.placement),U=$p(t.placement),D=!U,Y=RC(L),q=soe(Y),Z=t.modifiersData.popperOffsets,ee=t.rects.reference,V=t.rects.popper,te=typeof M=="function"?M(Object.assign({},t.rects,{placement:t.placement})):M,R=typeof te=="number"?{mainAxis:te,altAxis:te}:Object.assign({mainAxis:0,altAxis:0},te),h=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,g={x:0,y:0};if(!!Z){if(o){var v,u=Y==="y"?Ks:Vs,f=Y==="y"?Fl:jl,y=Y==="y"?"height":"width",S=Z[Y],w=S+B[u],d=S-B[f],I=O?-V[y]/2:0,$=U===Np?ee[y]:V[y],b=U===Np?-V[y]:-ee[y],X=t.elements.arrow,we=O&&X?kC(X):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ZL(),je=Ae[u],Vt=Ae[f],De=hm(0,ee[y],we[y]),Fe=D?ee[y]/2-I-De-je-R.mainAxis:$-De-je-R.mainAxis,wt=D?-ee[y]/2+I+De+Vt+R.mainAxis:b+De+Vt+R.mainAxis,Ke=t.elements.arrow&&$v(t.elements.arrow),ht=Ke?Y==="y"?Ke.clientTop||0:Ke.clientLeft||0:0,dr=(v=h?.[Y])!=null?v:0,ae=S+Fe-dr-ht,Ve=S+wt-dr,Nt=hm(O?ew(w,ae):w,S,O?Fd(d,Ve):d);Z[Y]=Nt,g[Y]=Nt-S}if(l){var Ee,xe=Y==="x"?Ks:Vs,ut=Y==="x"?Fl:jl,st=Z[q],_t=q==="y"?"height":"width",Pt=st+B[xe],Ut=st-B[ut],ve=[Ks,Vs].indexOf(L)!==-1,ye=(Ee=h?.[q])!=null?Ee:0,me=ve?Pt:st-ee[_t]-V[_t]-ye+R.altAxis,Q=ve?st+ee[_t]+V[_t]-ye-R.altAxis:Ut,j=O&&ve?Pie(me,st,Q):hm(O?me:Pt,st,O?Q:Ut);Z[q]=j,g[q]=j-st}t.modifiersData[n]=g}}const uoe={name:"preventOverflow",enabled:!0,phase:"main",fn:loe,requiresIfExists:["offset"]};function coe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function foe(e){return e===zl(e)||!Bl(e)?AC(e):coe(e)}function doe(e){var t=e.getBoundingClientRect(),r=Lp(t.width)/e.offsetWidth||1,n=Lp(t.height)/e.offsetHeight||1;return r!==1||n!==1}function hoe(e,t,r){r===void 0&&(r=!1);var n=Bl(t),a=Bl(t)&&doe(t),o=Xf(t),s=Dp(e,a,r),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Xu(t)!=="body"||IC(o))&&(l=foe(t)),Bl(t)?(c=Dp(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=TC(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function poe(e){var t=new Map,r=new Set,n=[];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 c=t.get(l);c&&a(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||a(o)}),n}function goe(e){var t=poe(e);return Mie.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function moe(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function voe(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var CI={placement:"bottom",modifiers:[],strategy:"absolute"};function MI(){for(var e=arguments.length,t=new Array(e),r=0;r{o||l(xoe(a)||document.body)},[a,o]),du(()=>{if(s&&!o)return Xb(r,s),()=>{Xb(r,null)}},[r,s,o]),o){if(ue.exports.isValidElement(n)){const p={ref:c};return ue.exports.cloneElement(n,p)}return ne(ue.exports.Fragment,{children:n})}return ne(ue.exports.Fragment,{children:s&&Al.exports.createPortal(n,s)})}),nD=_oe;function Soe(e){return gi("MuiPopperUnstyled",e)}oi("MuiPopperUnstyled",["root"]);const Eoe=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],Coe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Moe(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 $4(e){return typeof e=="function"?e():e}function koe(e){return e.nodeType!==void 0}const Roe=()=>wi({root:["root"]},Soe,{}),Aoe={},Toe=ue.exports.forwardRef(function(t,r){var n;const{anchorEl:a,children:o,component:s,direction:l,disablePortal:c,modifiers:p,open:m,ownerState:_,placement:T,popperOptions:O,popperRef:A,slotProps:M={},slots:B={},TransitionProps:L}=t,U=Mn(t,Eoe),D=ue.exports.useRef(null),Y=ea(D,r),q=ue.exports.useRef(null),Z=ea(q,A),ee=ue.exports.useRef(Z);du(()=>{ee.current=Z},[Z]),ue.exports.useImperativeHandle(A,()=>q.current,[]);const V=Moe(T,l),[te,R]=ue.exports.useState(V),[h,g]=ue.exports.useState($4(a));ue.exports.useEffect(()=>{q.current&&q.current.forceUpdate()}),ue.exports.useEffect(()=>{a&&g($4(a))},[a]),du(()=>{if(!h||!m)return;const S=I=>{R(I.placement)};let w=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:I})=>{S(I)}}];p!=null&&(w=w.concat(p)),O&&O.modifiers!=null&&(w=w.concat(O.modifiers));const d=woe(h,D.current,He({placement:V},O,{modifiers:w}));return ee.current(d),()=>{d.destroy(),ee.current(null)}},[h,c,p,m,O,V]);const v={placement:te};L!==null&&(v.TransitionProps=L);const u=Roe(),f=(n=s??B.root)!=null?n:"div",y=N4({elementType:f,externalSlotProps:M.root,externalForwardedProps:U,additionalProps:{role:"tooltip",ref:Y},ownerState:He({},t,_),className:u.root});return ne(f,He({},y,{children:typeof o=="function"?o(v):o}))}),Ioe=ue.exports.forwardRef(function(t,r){const{anchorEl:n,children:a,container:o,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:p,open:m,placement:_="bottom",popperOptions:T=Aoe,popperRef:O,style:A,transition:M=!1,slotProps:B={},slots:L={}}=t,U=Mn(t,Coe),[D,Y]=ue.exports.useState(!0),q=()=>{Y(!1)},Z=()=>{Y(!0)};if(!c&&!m&&(!M||D))return null;let ee;if(o)ee=o;else if(n){const R=$4(n);ee=R&&koe(R)?Ra(R).body:Ra(null).body}const V=!m&&c&&(!M||D)?"none":void 0,te=M?{in:m,onEnter:q,onExited:Z}:void 0;return ne(nD,{disablePortal:l,container:ee,children:ne(Toe,He({anchorEl:n,direction:s,disablePortal:l,modifiers:p,ref:r,open:M?!D:m,placement:_,popperOptions:T,popperRef:O,slotProps:B,slots:L},U,{style:He({position:"fixed",top:0,left:0,display:V},A),TransitionProps:te,children:a}))})}),Poe=Ioe;function Ooe(e){const t=Ra(e);return t.body===e?$l(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function gm(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function kI(e){return parseInt($l(e).getComputedStyle(e).paddingRight,10)||0}function Boe(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function RI(e,t,r,n,a){const o=[t,r,...n];[].forEach.call(e.children,s=>{const l=o.indexOf(s)===-1,c=!Boe(s);l&&c&&gm(s,a)})}function c5(e,t){let r=-1;return e.some((n,a)=>t(n)?(r=a,!0):!1),r}function Uoe(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(Ooe(n)){const s=gL(Ra(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${kI(n)+s}px`;const l=Ra(n).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{r.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${kI(c)+s}px`})}let o;if(n.parentNode instanceof DocumentFragment)o=Ra(n).body;else{const s=n.parentElement,l=$l(n);o=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:n}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 Noe(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class Loe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&gm(t.modalRef,!1);const a=Noe(r);RI(r,t.mount,t.modalRef,a,!0);const o=c5(this.containers,s=>s.container===r);return o!==-1?(this.containers[o].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:a}),n)}mount(t,r){const n=c5(this.containers,o=>o.modals.indexOf(t)!==-1),a=this.containers[n];a.restore||(a.restore=Uoe(a,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const a=c5(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[a];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(n,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&gm(t.modalRef,r),RI(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&&gm(s.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Doe(e){return gi("MuiModal",e)}oi("MuiModal",["root","hidden"]);const $oe=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],Foe=e=>{const{open:t,exited:r,classes:n}=e;return wi({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Doe,n)};function joe(e){return typeof e=="function"?e():e}function Woe(e){return e?e.props.hasOwnProperty("in"):!1}const zoe=new Loe,Hoe=ue.exports.forwardRef(function(t,r){var n,a;const{children:o,classes:s,closeAfterTransition:l=!1,component:c,container:p,disableAutoFocus:m=!1,disableEnforceFocus:_=!1,disableEscapeKeyDown:T=!1,disablePortal:O=!1,disableRestoreFocus:A=!1,disableScrollLock:M=!1,hideBackdrop:B=!1,keepMounted:L=!1,manager:U=zoe,onBackdropClick:D,onClose:Y,onKeyDown:q,open:Z,onTransitionEnter:ee,onTransitionExited:V,slotProps:te={},slots:R={}}=t,h=Mn(t,$oe),[g,v]=ue.exports.useState(!Z),u=ue.exports.useRef({}),f=ue.exports.useRef(null),y=ue.exports.useRef(null),S=ea(y,r),w=Woe(o),d=(n=t["aria-hidden"])!=null?n:!0,I=()=>Ra(f.current),$=()=>(u.current.modalRef=y.current,u.current.mountNode=f.current,u.current),b=()=>{U.mount($(),{disableScrollLock:M}),y.current&&(y.current.scrollTop=0)},X=Il(()=>{const xe=joe(p)||I().body;U.add($(),xe),y.current&&b()}),we=ue.exports.useCallback(()=>U.isTopModal($()),[U]),Ae=Il(xe=>{f.current=xe,!(!xe||!y.current)&&(Z&&we()?b():gm(y.current,d))}),je=ue.exports.useCallback(()=>{U.remove($(),d)},[U,d]);ue.exports.useEffect(()=>()=>{je()},[je]),ue.exports.useEffect(()=>{Z?X():(!w||!l)&&je()},[Z,je,w,l,X]);const Vt=He({},t,{classes:s,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:_,disableEscapeKeyDown:T,disablePortal:O,disableRestoreFocus:A,disableScrollLock:M,exited:g,hideBackdrop:B,keepMounted:L}),De=Foe(Vt),Fe=()=>{v(!1),ee&&ee()},wt=()=>{v(!0),V&&V(),l&&je()},Ke=xe=>{xe.target===xe.currentTarget&&(D&&D(xe),Y&&Y(xe,"backdropClick"))},ht=xe=>{q&&q(xe),!(xe.key!=="Escape"||!we())&&(T||(xe.stopPropagation(),Y&&Y(xe,"escapeKeyDown")))},dr={};o.props.tabIndex===void 0&&(dr.tabIndex="-1"),w&&(dr.onEnter=A4(Fe,o.props.onEnter),dr.onExited=A4(wt,o.props.onExited));const ae=(a=c??R.root)!=null?a:"div",Ve=N4({elementType:ae,externalSlotProps:te.root,externalForwardedProps:h,additionalProps:{ref:S,role:"presentation",onKeyDown:ht},className:De.root,ownerState:Vt}),Nt=R.backdrop,Ee=N4({elementType:Nt,externalSlotProps:te.backdrop,additionalProps:{"aria-hidden":!0,onClick:Ke,open:Z},className:De.backdrop,ownerState:Vt});return!L&&!Z&&(!w||g)?null:ne(nD,{ref:Ae,container:p,disablePortal:O,children:$t(ae,He({},Ve,{children:[!B&&Nt?ne(Nt,He({},Ee)):null,ne(pie,{disableEnforceFocus:_,disableAutoFocus:m,disableRestoreFocus:A,isEnabled:we,open:Z,children:ue.exports.cloneElement(o,dr)})]}))})}),qoe=Hoe,Koe=["onChange","maxRows","minRows","style","value"];function k1(e,t){return parseInt(e[t],10)||0}const Voe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function AI(e){return e==null||Object.keys(e).length===0}const Goe=ue.exports.forwardRef(function(t,r){const{onChange:n,maxRows:a,minRows:o=1,style:s,value:l}=t,c=Mn(t,Koe),{current:p}=ue.exports.useRef(l!=null),m=ue.exports.useRef(null),_=ea(r,m),T=ue.exports.useRef(null),O=ue.exports.useRef(0),[A,M]=ue.exports.useState({}),B=ue.exports.useCallback(()=>{const q=m.current,ee=$l(q).getComputedStyle(q);if(ee.width==="0px")return{};const V=T.current;V.style.width=ee.width,V.value=q.value||t.placeholder||"x",V.value.slice(-1)===` -`&&(V.value+=" ");const te=ee["box-sizing"],R=k1(ee,"padding-bottom")+k1(ee,"padding-top"),h=k1(ee,"border-bottom-width")+k1(ee,"border-top-width"),g=V.scrollHeight;V.value="x";const v=V.scrollHeight;let u=g;o&&(u=Math.max(Number(o)*v,u)),a&&(u=Math.min(Number(a)*v,u)),u=Math.max(u,v);const f=u+(te==="border-box"?R+h:0),y=Math.abs(u-g)<=1;return{outerHeightStyle:f,overflow:y}},[a,o,t.placeholder]),L=(q,Z)=>{const{outerHeightStyle:ee,overflow:V}=Z;return O.current<20&&(ee>0&&Math.abs((q.outerHeightStyle||0)-ee)>1||q.overflow!==V)?(O.current+=1,{overflow:V,outerHeightStyle:ee}):q},U=ue.exports.useCallback(()=>{const q=B();AI(q)||M(Z=>L(Z,q))},[B]),D=()=>{const q=B();AI(q)||Al.exports.flushSync(()=>{M(Z=>L(Z,q))})};ue.exports.useEffect(()=>{const q=Zd(()=>{O.current=0,m.current&&D()}),Z=$l(m.current);Z.addEventListener("resize",q);let ee;return typeof ResizeObserver<"u"&&(ee=new ResizeObserver(q),ee.observe(m.current)),()=>{q.clear(),Z.removeEventListener("resize",q),ee&&ee.disconnect()}}),du(()=>{U()}),ue.exports.useEffect(()=>{O.current=0},[l]);const Y=q=>{O.current=0,p||U(),n&&n(q)};return $t(ue.exports.Fragment,{children:[ne("textarea",He({value:l,onChange:Y,ref:_,rows:o,style:He({height:A.outerHeightStyle,overflow:A.overflow?"hidden":null},s)},c)),ne("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:T,tabIndex:-1,style:He({},Voe.shadow,s,{padding:0})})]})}),Yoe=Goe;function Xoe(e){return gi("MuiSvgIcon",e)}oi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Qoe=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Zoe=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${Qr(t)}`,`fontSize${Qr(r)}`]};return wi(a,Xoe,n)},Joe=ur("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Qr(r.color)}`],t[`fontSize${Qr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,a,o,s,l,c,p,m,_,T,O,A,M,B,L,U;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.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:((c=e.typography)==null||(p=c.pxToRem)==null?void 0:p.call(c,24))||"1.5rem",large:((m=e.typography)==null||(_=m.pxToRem)==null?void 0:_.call(m,35))||"2.1875rem"}[t.fontSize],color:(T=(O=(e.vars||e).palette)==null||(A=O[t.color])==null?void 0:A.main)!=null?T:{action:(M=(e.vars||e).palette)==null||(B=M.action)==null?void 0:B.active,disabled:(L=(e.vars||e).palette)==null||(U=L.action)==null?void 0:U.disabled,inherit:void 0}[t.color]}}),iD=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:p,inheritViewBox:m=!1,titleAccess:_,viewBox:T="0 0 24 24"}=n,O=Mn(n,Qoe),A=He({},n,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:T}),M={};m||(M.viewBox=T);const B=Zoe(A);return $t(Joe,He({as:l,className:vn(B.root,o),focusable:"false",color:p,"aria-hidden":_?void 0:!0,role:_?"img":void 0,ref:r},M,O,{ownerState:A,children:[a,_?ne("title",{children:_}):null]}))});iD.muiName="SvgIcon";const Fp=iD;function Fv(e,t){function r(n,a){return ne(Fp,He({"data-testid":`${t}Icon`,ref:a},n,{children:e}))}return r.muiName=Fp.muiName,ue.exports.memo(ue.exports.forwardRef(r))}const eae={configure:e=>{aC.configure(e)}},tae=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:eae,capitalize:Qr,createChainedFunction:A4,createSvgIcon:Fv,debounce:Zd,deprecatedPropType:Bee,isMuiElement:ub,ownerDocument:Ra,ownerWindow:$l,requirePropFactory:Uee,setRef:Xb,unstable_useEnhancedEffect:du,unstable_useId:C2,unsupportedProp:Dee,useControlled:zm,useEventCallback:Il,useForkRef:ea,useIsFocusVisible:k2},Symbol.toStringTag,{value:"Module"}));function F4(e,t){return F4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},F4(e,t)}function oD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,F4(e,t)}const TI={disabled:!1},tw=al.createContext(null);var rae=function(t){return t.scrollTop},Jg="unmounted",Sd="exited",Ed="entering",Gh="entered",j4="exiting",Fc=function(e){oD(t,e);function t(n,a){var o;o=e.call(this,n,a)||this;var s=a,l=s&&!s.isMounting?n.enter:n.appear,c;return o.appearStatus=null,n.in?l?(c=Sd,o.appearStatus=Ed):c=Gh:n.unmountOnExit||n.mountOnEnter?c=Jg:c=Sd,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(a,o){var s=a.in;return s&&o.status===Jg?{status:Sd}: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!==Ed&&s!==Gh&&(o=Ed):(s===Ed||s===Gh)&&(o=j4)}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===Ed){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:E1.findDOMNode(this);s&&rae(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sd&&this.setState({status:Jg})},r.performEnter=function(a){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:a,c=this.props.nodeRef?[l]:[E1.findDOMNode(this),l],p=c[0],m=c[1],_=this.getTimeouts(),T=l?_.appear:_.enter;if(!a&&!s||TI.disabled){this.safeSetState({status:Gh},function(){o.props.onEntered(p)});return}this.props.onEnter(p,m),this.safeSetState({status:Ed},function(){o.props.onEntering(p,m),o.onTransitionEnd(T,function(){o.safeSetState({status:Gh},function(){o.props.onEntered(p,m)})})})},r.performExit=function(){var a=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:E1.findDOMNode(this);if(!o||TI.disabled){this.safeSetState({status:Sd},function(){a.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:j4},function(){a.props.onExiting(l),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:Sd},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:E1.findDOMNode(this),l=a==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],p=c[0],m=c[1];this.props.addEndListener(p,m)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===Jg)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=Mn(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ne(tw.Provider,{value:null,children:typeof s=="function"?s(a,l):al.cloneElement(al.Children.only(s),l)})},t}(al.Component);Fc.contextType=tw;Fc.propTypes={};function Fh(){}Fc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fh,onEntering:Fh,onEntered:Fh,onExit:Fh,onExiting:Fh,onExited:Fh};Fc.UNMOUNTED=Jg;Fc.EXITED=Sd;Fc.ENTERING=Ed;Fc.ENTERED=Gh;Fc.EXITING=j4;const ex=Fc;function nae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PC(e,t){var r=function(o){return t&&ue.exports.isValidElement(o)?t(o):o},n=Object.create(null);return e&&ue.exports.Children.map(e,function(a){return a}).forEach(function(a){n[a.key]=r(a)}),n}function iae(e,t){e=e||{},t=t||{};function r(m){return m in t?t[m]:e[m]}var n=Object.create(null),a=[];for(var o in e)o in t?a.length&&(n[o]=a,a=[]):a.push(o);var s,l={};for(var c in t){if(n[c])for(s=0;se.scrollTop;function Df(e,t){var r,n;const{timeout:a,easing:o,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof a=="number"?a:a[t.mode]||0,easing:(n=s.transitionTimingFunction)!=null?n:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function cae(e){return gi("MuiCollapse",e)}oi("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const fae=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],dae=e=>{const{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return wi(n,cae,r)},hae=ur("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})=>He({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&He({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),pae=ur("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>He({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),gae=ur("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>He({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),aD=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiCollapse"}),{addEndListener:a,children:o,className:s,collapsedSize:l="0px",component:c,easing:p,in:m,onEnter:_,onEntered:T,onEntering:O,onExit:A,onExited:M,onExiting:B,orientation:L="vertical",style:U,timeout:D=VL.standard,TransitionComponent:Y=ex}=n,q=Mn(n,fae),Z=He({},n,{orientation:L,collapsedSize:l}),ee=dae(Z),V=_a(),te=ue.exports.useRef(),R=ue.exports.useRef(null),h=ue.exports.useRef(),g=typeof l=="number"?`${l}px`:l,v=L==="horizontal",u=v?"width":"height";ue.exports.useEffect(()=>()=>{clearTimeout(te.current)},[]);const f=ue.exports.useRef(null),y=ea(r,f),S=je=>Vt=>{if(je){const De=f.current;Vt===void 0?je(De):je(De,Vt)}},w=()=>R.current?R.current[v?"clientWidth":"clientHeight"]:0,d=S((je,Vt)=>{R.current&&v&&(R.current.style.position="absolute"),je.style[u]=g,_&&_(je,Vt)}),I=S((je,Vt)=>{const De=w();R.current&&v&&(R.current.style.position="");const{duration:Fe,easing:wt}=Df({style:U,timeout:D,easing:p},{mode:"enter"});if(D==="auto"){const Ke=V.transitions.getAutoHeightDuration(De);je.style.transitionDuration=`${Ke}ms`,h.current=Ke}else je.style.transitionDuration=typeof Fe=="string"?Fe:`${Fe}ms`;je.style[u]=`${De}px`,je.style.transitionTimingFunction=wt,O&&O(je,Vt)}),$=S((je,Vt)=>{je.style[u]="auto",T&&T(je,Vt)}),b=S(je=>{je.style[u]=`${w()}px`,A&&A(je)}),X=S(M),we=S(je=>{const Vt=w(),{duration:De,easing:Fe}=Df({style:U,timeout:D,easing:p},{mode:"exit"});if(D==="auto"){const wt=V.transitions.getAutoHeightDuration(Vt);je.style.transitionDuration=`${wt}ms`,h.current=wt}else je.style.transitionDuration=typeof De=="string"?De:`${De}ms`;je.style[u]=g,je.style.transitionTimingFunction=Fe,B&&B(je)});return ne(Y,He({in:m,onEnter:d,onEntered:$,onEntering:I,onExit:b,onExited:X,onExiting:we,addEndListener:je=>{D==="auto"&&(te.current=setTimeout(je,h.current||0)),a&&a(f.current,je)},nodeRef:f,timeout:D==="auto"?null:D},q,{children:(je,Vt)=>ne(hae,He({as:c,className:vn(ee.root,s,{entered:ee.entered,exited:!m&&g==="0px"&&ee.hidden}[je]),style:He({[v?"minWidth":"minHeight"]:g},U),ownerState:He({},Z,{state:je}),ref:y},Vt,{children:ne(pae,{ownerState:He({},Z,{state:je}),className:ee.wrapper,ref:R,children:ne(gae,{ownerState:He({},Z,{state:je}),className:ee.wrapperInner,children:o})})}))}))});aD.muiSupportAuto=!0;const mae=aD;function vae(e){return gi("MuiPaper",e)}oi("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 yae=["className","component","elevation","square","variant"],bae=e=>{const{square:t,elevation:r,variant:n,classes:a}=e,o={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return wi(o,vae,a)},wae=ur("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 He({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"&&He({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${oo("#fff",gI(t.elevation))}, ${oo("#fff",gI(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),xae=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiPaper"}),{className:a,component:o="div",elevation:s=1,square:l=!1,variant:c="elevation"}=n,p=Mn(n,yae),m=He({},n,{component:o,elevation:s,square:l,variant:c}),_=bae(m);return ne(wae,He({as:o,ownerState:m,className:vn(_.root,a),ref:r},p))}),jv=xae;function _ae(e){const{className:t,classes:r,pulsate:n=!1,rippleX:a,rippleY:o,rippleSize:s,in:l,onExited:c,timeout:p}=e,[m,_]=ue.exports.useState(!1),T=vn(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),O={width:s,height:s,top:-(s/2)+o,left:-(s/2)+a},A=vn(r.child,m&&r.childLeaving,n&&r.childPulsate);return!l&&!m&&_(!0),ue.exports.useEffect(()=>{if(!l&&c!=null){const M=setTimeout(c,p);return()=>{clearTimeout(M)}}},[c,l,p]),ne("span",{className:T,style:O,children:ne("span",{className:A})})}const Sae=oi("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Cl=Sae,Eae=["center","classes","className"];let tx=e=>e,II,PI,OI,BI;const W4=550,Cae=80,Mae=ph(II||(II=tx` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),kae=ph(PI||(PI=tx` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),Rae=ph(OI||(OI=tx` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),Aae=ur("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tae=ur(_ae,{name:"MuiTouchRipple",slot:"Ripple"})(BI||(BI=tx` - 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; - } -`),Cl.rippleVisible,Mae,W4,({theme:e})=>e.transitions.easing.easeInOut,Cl.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Cl.child,Cl.childLeaving,kae,W4,({theme:e})=>e.transitions.easing.easeInOut,Cl.childPulsate,Rae,({theme:e})=>e.transitions.easing.easeInOut),Iae=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:o={},className:s}=n,l=Mn(n,Eae),[c,p]=ue.exports.useState([]),m=ue.exports.useRef(0),_=ue.exports.useRef(null);ue.exports.useEffect(()=>{_.current&&(_.current(),_.current=null)},[c]);const T=ue.exports.useRef(!1),O=ue.exports.useRef(null),A=ue.exports.useRef(null),M=ue.exports.useRef(null);ue.exports.useEffect(()=>()=>{clearTimeout(O.current)},[]);const B=ue.exports.useCallback(Y=>{const{pulsate:q,rippleX:Z,rippleY:ee,rippleSize:V,cb:te}=Y;p(R=>[...R,ne(Tae,{classes:{ripple:vn(o.ripple,Cl.ripple),rippleVisible:vn(o.rippleVisible,Cl.rippleVisible),ripplePulsate:vn(o.ripplePulsate,Cl.ripplePulsate),child:vn(o.child,Cl.child),childLeaving:vn(o.childLeaving,Cl.childLeaving),childPulsate:vn(o.childPulsate,Cl.childPulsate)},timeout:W4,pulsate:q,rippleX:Z,rippleY:ee,rippleSize:V},m.current)]),m.current+=1,_.current=te},[o]),L=ue.exports.useCallback((Y={},q={},Z=()=>{})=>{const{pulsate:ee=!1,center:V=a||q.pulsate,fakeElement:te=!1}=q;if(Y?.type==="mousedown"&&T.current){T.current=!1;return}Y?.type==="touchstart"&&(T.current=!0);const R=te?null:M.current,h=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let g,v,u;if(V||Y===void 0||Y.clientX===0&&Y.clientY===0||!Y.clientX&&!Y.touches)g=Math.round(h.width/2),v=Math.round(h.height/2);else{const{clientX:f,clientY:y}=Y.touches&&Y.touches.length>0?Y.touches[0]:Y;g=Math.round(f-h.left),v=Math.round(y-h.top)}if(V)u=Math.sqrt((2*h.width**2+h.height**2)/3),u%2===0&&(u+=1);else{const f=Math.max(Math.abs((R?R.clientWidth:0)-g),g)*2+2,y=Math.max(Math.abs((R?R.clientHeight:0)-v),v)*2+2;u=Math.sqrt(f**2+y**2)}Y!=null&&Y.touches?A.current===null&&(A.current=()=>{B({pulsate:ee,rippleX:g,rippleY:v,rippleSize:u,cb:Z})},O.current=setTimeout(()=>{A.current&&(A.current(),A.current=null)},Cae)):B({pulsate:ee,rippleX:g,rippleY:v,rippleSize:u,cb:Z})},[a,B]),U=ue.exports.useCallback(()=>{L({},{pulsate:!0})},[L]),D=ue.exports.useCallback((Y,q)=>{if(clearTimeout(O.current),Y?.type==="touchend"&&A.current){A.current(),A.current=null,O.current=setTimeout(()=>{D(Y,q)});return}A.current=null,p(Z=>Z.length>0?Z.slice(1):Z),_.current=q},[]);return ue.exports.useImperativeHandle(r,()=>({pulsate:U,start:L,stop:D}),[U,L,D]),ne(Aae,He({className:vn(Cl.root,o.root,s),ref:M},l,{children:ne(uae,{component:null,exit:!0,children:c})}))}),Pae=Iae;function Oae(e){return gi("MuiButtonBase",e)}const Bae=oi("MuiButtonBase",["root","disabled","focusVisible"]),Uae=Bae,Nae=["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"],Lae=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:a}=e,s=wi({root:["root",t&&"disabled",r&&"focusVisible"]},Oae,a);return r&&n&&(s.root+=` ${n}`),s},Dae=ur("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"},[`&.${Uae.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$ae=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:o=!1,children:s,className:l,component:c="button",disabled:p=!1,disableRipple:m=!1,disableTouchRipple:_=!1,focusRipple:T=!1,LinkComponent:O="a",onBlur:A,onClick:M,onContextMenu:B,onDragLeave:L,onFocus:U,onFocusVisible:D,onKeyDown:Y,onKeyUp:q,onMouseDown:Z,onMouseLeave:ee,onMouseUp:V,onTouchEnd:te,onTouchMove:R,onTouchStart:h,tabIndex:g=0,TouchRippleProps:v,touchRippleRef:u,type:f}=n,y=Mn(n,Nae),S=ue.exports.useRef(null),w=ue.exports.useRef(null),d=ea(w,u),{isFocusVisibleRef:I,onFocus:$,onBlur:b,ref:X}=k2(),[we,Ae]=ue.exports.useState(!1);p&&we&&Ae(!1),ue.exports.useImperativeHandle(a,()=>({focusVisible:()=>{Ae(!0),S.current.focus()}}),[]);const[je,Vt]=ue.exports.useState(!1);ue.exports.useEffect(()=>{Vt(!0)},[]);const De=je&&!m&&!p;ue.exports.useEffect(()=>{we&&T&&!m&&je&&w.current.pulsate()},[m,T,we,je]);function Fe(F,ie,de=_){return Il(pe=>(ie&&ie(pe),!de&&w.current&&w.current[F](pe),!0))}const wt=Fe("start",Z),Ke=Fe("stop",B),ht=Fe("stop",L),dr=Fe("stop",V),ae=Fe("stop",F=>{we&&F.preventDefault(),ee&&ee(F)}),Ve=Fe("start",h),Nt=Fe("stop",te),Ee=Fe("stop",R),xe=Fe("stop",F=>{b(F),I.current===!1&&Ae(!1),A&&A(F)},!1),ut=Il(F=>{S.current||(S.current=F.currentTarget),$(F),I.current===!0&&(Ae(!0),D&&D(F)),U&&U(F)}),st=()=>{const F=S.current;return c&&c!=="button"&&!(F.tagName==="A"&&F.href)},_t=ue.exports.useRef(!1),Pt=Il(F=>{T&&!_t.current&&we&&w.current&&F.key===" "&&(_t.current=!0,w.current.stop(F,()=>{w.current.start(F)})),F.target===F.currentTarget&&st()&&F.key===" "&&F.preventDefault(),Y&&Y(F),F.target===F.currentTarget&&st()&&F.key==="Enter"&&!p&&(F.preventDefault(),M&&M(F))}),Ut=Il(F=>{T&&F.key===" "&&w.current&&we&&!F.defaultPrevented&&(_t.current=!1,w.current.stop(F,()=>{w.current.pulsate(F)})),q&&q(F),M&&F.target===F.currentTarget&&st()&&F.key===" "&&!F.defaultPrevented&&M(F)});let ve=c;ve==="button"&&(y.href||y.to)&&(ve=O);const ye={};ve==="button"?(ye.type=f===void 0?"button":f,ye.disabled=p):(!y.href&&!y.to&&(ye.role="button"),p&&(ye["aria-disabled"]=p));const me=ea(r,X,S),Q=He({},n,{centerRipple:o,component:c,disabled:p,disableRipple:m,disableTouchRipple:_,focusRipple:T,tabIndex:g,focusVisible:we}),j=Lae(Q);return $t(Dae,He({as:ve,className:vn(j.root,l),ownerState:Q,onBlur:xe,onClick:M,onContextMenu:Ke,onFocus:ut,onKeyDown:Pt,onKeyUp:Ut,onMouseDown:wt,onMouseLeave:ae,onMouseUp:dr,onDragLeave:ht,onTouchEnd:Nt,onTouchMove:Ee,onTouchStart:Ve,ref:me,tabIndex:p?-1:g,type:f},ye,y,{children:[s,De?ne(Pae,He({ref:d,center:o},v)):null]}))}),$f=$ae;function Fae(e){return gi("MuiIconButton",e)}const jae=oi("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Wae=jae,zae=["edge","children","className","color","disabled","disableFocusRipple","size"],Hae=e=>{const{classes:t,disabled:r,color:n,edge:a,size:o}=e,s={root:["root",r&&"disabled",n!=="default"&&`color${Qr(n)}`,a&&`edge${Qr(a)}`,`size${Qr(o)}`]};return wi(s,Fae,t)},qae=ur($f,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${Qr(r.color)}`],r.edge&&t[`edge${Qr(r.edge)}`],t[`size${Qr(r.size)}`]]}})(({theme:e,ownerState:t})=>He({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})`:oo(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 n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return He({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&He({color:n?.main},!t.disableRipple&&{"&:hover":He({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:oo(n.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)},{[`&.${Wae.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Kae=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiIconButton"}),{edge:a=!1,children:o,className:s,color:l="default",disabled:c=!1,disableFocusRipple:p=!1,size:m="medium"}=n,_=Mn(n,zae),T=He({},n,{edge:a,color:l,disabled:c,disableFocusRipple:p,size:m}),O=Hae(T);return ne(qae,He({className:vn(O.root,s),centerRipple:!0,focusRipple:!p,disabled:c,ref:r,ownerState:T},_,{children:o}))}),gl=Kae;function Vae(e){return gi("MuiTypography",e)}oi("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Gae=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Yae=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:a,variant:o,classes:s}=e,l={root:["root",o,e.align!=="inherit"&&`align${Qr(t)}`,r&&"gutterBottom",n&&"noWrap",a&&"paragraph"]};return wi(l,Vae,s)},Xae=ur("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${Qr(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>He({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})),UI={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qae={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Zae=e=>Qae[e]||e,Jae=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTypography"}),a=Zae(n.color),o=$L(He({},n,{color:a})),{align:s="inherit",className:l,component:c,gutterBottom:p=!1,noWrap:m=!1,paragraph:_=!1,variant:T="body1",variantMapping:O=UI}=o,A=Mn(o,Gae),M=He({},o,{align:s,color:a,className:l,component:c,gutterBottom:p,noWrap:m,paragraph:_,variant:T,variantMapping:O}),B=c||(_?"p":O[T]||UI[T])||"span",L=Yae(M);return ne(Xae,He({as:B,ref:r,ownerState:M,className:vn(L.root,l)},A))}),Fo=Jae,ese=["components","componentsProps","slots","slotProps"],tse=ur(Poe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),rse=ue.exports.forwardRef(function(t,r){var n;const a=wC(),o=Si({props:t,name:"MuiPopper"}),{components:s,componentsProps:l,slots:c,slotProps:p}=o,m=Mn(o,ese),_=(n=c?.root)!=null?n:s?.Root;return ne(tse,He({direction:a?.direction,slots:{root:_},slotProps:p??l},m,{ref:r}))}),sD=rse,nse=Fv(ne("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 ise(e){return gi("MuiChip",e)}const ose=oi("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"]),io=ose,ase=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],sse=e=>{const{classes:t,disabled:r,size:n,color:a,iconColor:o,onDelete:s,clickable:l,variant:c}=e,p={root:["root",c,r&&"disabled",`size${Qr(n)}`,`color${Qr(a)}`,l&&"clickable",l&&`clickableColor${Qr(a)}`,s&&"deletable",s&&`deletableColor${Qr(a)}`,`${c}${Qr(a)}`],label:["label",`label${Qr(n)}`],avatar:["avatar",`avatar${Qr(n)}`,`avatarColor${Qr(a)}`],icon:["icon",`icon${Qr(n)}`,`iconColor${Qr(o)}`],deleteIcon:["deleteIcon",`deleteIcon${Qr(n)}`,`deleteIconColor${Qr(a)}`,`deleteIcon${Qr(c)}Color${Qr(a)}`]};return wi(p,ise,t)},lse=ur("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:n,iconColor:a,clickable:o,onDelete:s,size:l,variant:c}=r;return[{[`& .${io.avatar}`]:t.avatar},{[`& .${io.avatar}`]:t[`avatar${Qr(l)}`]},{[`& .${io.avatar}`]:t[`avatarColor${Qr(n)}`]},{[`& .${io.icon}`]:t.icon},{[`& .${io.icon}`]:t[`icon${Qr(l)}`]},{[`& .${io.icon}`]:t[`iconColor${Qr(a)}`]},{[`& .${io.deleteIcon}`]:t.deleteIcon},{[`& .${io.deleteIcon}`]:t[`deleteIcon${Qr(l)}`]},{[`& .${io.deleteIcon}`]:t[`deleteIconColor${Qr(n)}`]},{[`& .${io.deleteIcon}`]:t[`deleteIcon${Qr(c)}Color${Qr(n)}`]},t.root,t[`size${Qr(l)}`],t[`color${Qr(n)}`],o&&t.clickable,o&&n!=="default"&&t[`clickableColor${Qr(n)})`],s&&t.deletable,s&&n!=="default"&&t[`deletableColor${Qr(n)}`],t[c],t[`${c}${Qr(n)}`]]}})(({theme:e,ownerState:t})=>{const r=oo(e.palette.text.primary,.26),n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return He({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",[`&.${io.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${io.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${io.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${io.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${io.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${io.icon}`]:He({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&He({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${io.deleteIcon}`]:He({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)`:oo(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)`:oo(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&&{[`&.${io.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:oo(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${io.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>He({},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}))`:oo(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${io.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:oo(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, &.${io.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>He({},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]}`,[`&.${io.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${io.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${io.avatar}`]:{marginLeft:4},[`& .${io.avatarSmall}`]:{marginLeft:2},[`& .${io.icon}`]:{marginLeft:4},[`& .${io.iconSmall}`]:{marginLeft:2},[`& .${io.deleteIcon}`]:{marginRight:5},[`& .${io.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)`:oo(e.palette[t.color].main,.7)}`,[`&.${io.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:oo(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${io.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:oo(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${io.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:oo(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),use=ur("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:n}=r;return[t.label,t[`label${Qr(n)}`]]}})(({ownerState:e})=>He({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.size==="small"&&{paddingLeft:8,paddingRight:8}));function NI(e){return e.key==="Backspace"||e.key==="Delete"}const cse=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiChip"}),{avatar:a,className:o,clickable:s,color:l="default",component:c,deleteIcon:p,disabled:m=!1,icon:_,label:T,onClick:O,onDelete:A,onKeyDown:M,onKeyUp:B,size:L="medium",variant:U="filled",tabIndex:D,skipFocusWhenDisabled:Y=!1}=n,q=Mn(n,ase),Z=ue.exports.useRef(null),ee=ea(Z,r),V=d=>{d.stopPropagation(),A&&A(d)},te=d=>{d.currentTarget===d.target&&NI(d)&&d.preventDefault(),M&&M(d)},R=d=>{d.currentTarget===d.target&&(A&&NI(d)?A(d):d.key==="Escape"&&Z.current&&Z.current.blur()),B&&B(d)},h=s!==!1&&O?!0:s,g=h||A?$f:c||"div",v=He({},n,{component:g,disabled:m,size:L,color:l,iconColor:ue.exports.isValidElement(_)&&_.props.color||l,onDelete:!!A,clickable:h,variant:U}),u=sse(v),f=g===$f?He({component:c||"div",focusVisibleClassName:u.focusVisible},A&&{disableRipple:!0}):{};let y=null;A&&(y=p&&ue.exports.isValidElement(p)?ue.exports.cloneElement(p,{className:vn(p.props.className,u.deleteIcon),onClick:V}):ne(nse,{className:vn(u.deleteIcon),onClick:V}));let S=null;a&&ue.exports.isValidElement(a)&&(S=ue.exports.cloneElement(a,{className:vn(u.avatar,a.props.className)}));let w=null;return _&&ue.exports.isValidElement(_)&&(w=ue.exports.cloneElement(_,{className:vn(u.icon,_.props.className)})),$t(lse,He({as:g,className:vn(u.root,o),disabled:h&&m?!0:void 0,onClick:O,onKeyDown:te,onKeyUp:R,ref:ee,tabIndex:Y&&m?-1:D,ownerState:v},f,q,{children:[S||w,ne(use,{className:vn(u.label),ownerState:v,children:T}),y]}))}),fse=cse;function d0({props:e,states:t,muiFormControl:r}){return t.reduce((n,a)=>(n[a]=e[a],r&&typeof e[a]>"u"&&(n[a]=r[a]),n),{})}const dse=ue.exports.createContext(void 0),UC=dse;function gh(){return ue.exports.useContext(UC)}function hse(e){return ne(Gte,He({},e,{defaultTheme:Z2}))}function LI(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function NC(e,t=!1){return e&&(LI(e.value)&&e.value!==""||t&&LI(e.defaultValue)&&e.defaultValue!=="")}function pse(e){return e.startAdornment}function gse(e){return gi("MuiInputBase",e)}const mse=oi("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jp=mse,vse=["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"],rx=(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${Qr(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},nx=(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]},yse=e=>{const{classes:t,color:r,disabled:n,error:a,endAdornment:o,focused:s,formControl:l,fullWidth:c,hiddenLabel:p,multiline:m,readOnly:_,size:T,startAdornment:O,type:A}=e,M={root:["root",`color${Qr(r)}`,n&&"disabled",a&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",T==="small"&&"sizeSmall",m&&"multiline",O&&"adornedStart",o&&"adornedEnd",p&&"hiddenLabel",_&&"readOnly"],input:["input",n&&"disabled",A==="search"&&"inputTypeSearch",m&&"inputMultiline",T==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",O&&"inputAdornedStart",o&&"inputAdornedEnd",_&&"readOnly"]};return wi(M,gse,t)},ix=ur("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rx})(({theme:e,ownerState:t})=>He({},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",[`&.${jp.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&He({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),ox=ur("input",{name:"MuiInputBase",slot:"Input",overridesResolver:nx})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",n=He({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 He({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":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${jp.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},[`&.${jp.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"})}),bse=ne(hse,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),wse=ue.exports.forwardRef(function(t,r){var n;const a=Si({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:l,className:c,components:p={},componentsProps:m={},defaultValue:_,disabled:T,disableInjectingGlobalStyles:O,endAdornment:A,fullWidth:M=!1,id:B,inputComponent:L="input",inputProps:U={},inputRef:D,maxRows:Y,minRows:q,multiline:Z=!1,name:ee,onBlur:V,onChange:te,onClick:R,onFocus:h,onKeyDown:g,onKeyUp:v,placeholder:u,readOnly:f,renderSuffix:y,rows:S,slotProps:w={},slots:d={},startAdornment:I,type:$="text",value:b}=a,X=Mn(a,vse),we=U.value!=null?U.value:b,{current:Ae}=ue.exports.useRef(we!=null),je=ue.exports.useRef(),Vt=ue.exports.useCallback(j=>{},[]),De=ea(je,D,U.ref,Vt),[Fe,wt]=ue.exports.useState(!1),Ke=gh(),ht=d0({props:a,muiFormControl:Ke,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ht.focused=Ke?Ke.focused:Fe,ue.exports.useEffect(()=>{!Ke&&T&&Fe&&(wt(!1),V&&V())},[Ke,T,Fe,V]);const dr=Ke&&Ke.onFilled,ae=Ke&&Ke.onEmpty,Ve=ue.exports.useCallback(j=>{NC(j)?dr&&dr():ae&&ae()},[dr,ae]);du(()=>{Ae&&Ve({value:we})},[we,Ve,Ae]);const Nt=j=>{if(ht.disabled){j.stopPropagation();return}h&&h(j),U.onFocus&&U.onFocus(j),Ke&&Ke.onFocus?Ke.onFocus(j):wt(!0)},Ee=j=>{V&&V(j),U.onBlur&&U.onBlur(j),Ke&&Ke.onBlur?Ke.onBlur(j):wt(!1)},xe=(j,...F)=>{if(!Ae){const ie=j.target||je.current;if(ie==null)throw new Error(Lf(1));Ve({value:ie.value})}U.onChange&&U.onChange(j,...F),te&&te(j,...F)};ue.exports.useEffect(()=>{Ve(je.current)},[]);const ut=j=>{je.current&&j.currentTarget===j.target&&je.current.focus(),R&&R(j)};let st=L,_t=U;Z&&st==="input"&&(S?_t=He({type:void 0,minRows:S,maxRows:S},_t):_t=He({type:void 0,maxRows:Y,minRows:q},_t),st=Yoe);const Pt=j=>{Ve(j.animationName==="mui-auto-fill-cancel"?je.current:{value:"x"})};ue.exports.useEffect(()=>{Ke&&Ke.setAdornedStart(Boolean(I))},[Ke,I]);const Ut=He({},a,{color:ht.color||"primary",disabled:ht.disabled,endAdornment:A,error:ht.error,focused:ht.focused,formControl:Ke,fullWidth:M,hiddenLabel:ht.hiddenLabel,multiline:Z,size:ht.size,startAdornment:I,type:$}),ve=yse(Ut),ye=d.root||p.Root||ix,me=w.root||m.root||{},Q=d.input||p.Input||ox;return _t=He({},_t,(n=w.input)!=null?n:m.input),$t(ue.exports.Fragment,{children:[!O&&bse,$t(ye,He({},me,!Jb(ye)&&{ownerState:He({},Ut,me.ownerState)},{ref:r,onClick:ut},X,{className:vn(ve.root,me.className,c),children:[I,ne(UC.Provider,{value:null,children:ne(Q,He({ownerState:Ut,"aria-invalid":ht.error,"aria-describedby":o,autoComplete:s,autoFocus:l,defaultValue:_,disabled:ht.disabled,id:B,onAnimationStart:Pt,name:ee,placeholder:u,readOnly:f,required:ht.required,rows:S,value:we,onKeyDown:g,onKeyUp:v,type:$},_t,!Jb(Q)&&{as:st,ownerState:He({},Ut,_t.ownerState)},{ref:De,className:vn(ve.input,_t.className),onBlur:Ee,onChange:xe,onFocus:Nt}))}),A,y?y(He({},ht,{startAdornment:I})):null]}))]})}),LC=wse;function xse(e){return gi("MuiInput",e)}const _se=He({},jp,oi("MuiInput",["root","underline","input"])),ag=_se;function Sse(e){return gi("MuiOutlinedInput",e)}const Ese=He({},jp,oi("MuiOutlinedInput",["root","notchedOutline","input"])),tf=Ese;function Cse(e){return gi("MuiFilledInput",e)}const Mse=He({},jp,oi("MuiFilledInput",["root","underline","input"])),dd=Mse,kse=Fv(ne("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Rse=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ase={entering:{opacity:1},entered:{opacity:1}},Tse=ue.exports.forwardRef(function(t,r){const n=_a(),a={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,easing:c,in:p,onEnter:m,onEntered:_,onEntering:T,onExit:O,onExited:A,onExiting:M,style:B,timeout:L=a,TransitionComponent:U=ex}=t,D=Mn(t,Rse),Y=ue.exports.useRef(null),q=ea(Y,l.ref,r),Z=u=>f=>{if(u){const y=Y.current;f===void 0?u(y):u(y,f)}},ee=Z(T),V=Z((u,f)=>{BC(u);const y=Df({style:B,timeout:L,easing:c},{mode:"enter"});u.style.webkitTransition=n.transitions.create("opacity",y),u.style.transition=n.transitions.create("opacity",y),m&&m(u,f)}),te=Z(_),R=Z(M),h=Z(u=>{const f=Df({style:B,timeout:L,easing:c},{mode:"exit"});u.style.webkitTransition=n.transitions.create("opacity",f),u.style.transition=n.transitions.create("opacity",f),O&&O(u)}),g=Z(A);return ne(U,He({appear:s,in:p,nodeRef:Y,onEnter:V,onEntered:te,onEntering:ee,onExit:h,onExited:g,onExiting:R,addEndListener:u=>{o&&o(Y.current,u)},timeout:L},D,{children:(u,f)=>ue.exports.cloneElement(l,He({style:He({opacity:0,visibility:u==="exited"&&!p?"hidden":void 0},Ase[u],B,l.props.style),ref:q},f))}))}),Wv=Tse;function Ise(e){return gi("MuiBackdrop",e)}oi("MuiBackdrop",["root","invisible"]);const Pse=["children","component","components","componentsProps","className","invisible","open","slotProps","slots","transitionDuration","TransitionComponent"],Ose=e=>{const{classes:t,invisible:r}=e;return wi({root:["root",r&&"invisible"]},Ise,t)},Bse=ur("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>He({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"})),Use=ue.exports.forwardRef(function(t,r){var n,a,o;const s=Si({props:t,name:"MuiBackdrop"}),{children:l,component:c="div",components:p={},componentsProps:m={},className:_,invisible:T=!1,open:O,slotProps:A={},slots:M={},transitionDuration:B,TransitionComponent:L=Wv}=s,U=Mn(s,Pse),D=He({},s,{component:c,invisible:T}),Y=Ose(D),q=(n=A.root)!=null?n:m.root;return ne(L,He({in:O,timeout:B},U,{children:ne(Bse,He({"aria-hidden":!0},q,{as:(a=(o=M.root)!=null?o:p.Root)!=null?a:c,className:vn(Y.root,_,q?.className),ownerState:He({},D,q?.ownerState),classes:Y,ref:r,children:l}))}))}),ax=Use,Nse=_C(),Lse=zL({defaultTheme:Nse,defaultClassName:"MuiBox-root",generateClassName:aC.generate}),Tn=Lse;function Dse(e){return gi("MuiButton",e)}const $se=oi("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"]),R1=$se,Fse=ue.exports.createContext({}),jse=Fse,Wse=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],zse=e=>{const{color:t,disableElevation:r,fullWidth:n,size:a,variant:o,classes:s}=e,l={root:["root",o,`${o}${Qr(t)}`,`size${Qr(a)}`,`${o}Size${Qr(a)}`,t==="inherit"&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Qr(a)}`],endIcon:["endIcon",`iconSize${Qr(a)}`]},c=wi(l,Dse,s);return He({},s,c)},lD=e=>He({},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}}),Hse=ur($f,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Qr(r.color)}`],t[`size${Qr(r.size)}`],t[`${r.variant}Size${Qr(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var r,n;return He({},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":He({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:oo(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})`:oo(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})`:oo(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":He({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${R1.focusVisible}`]:He({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${R1.disabled}`]:He({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 ${oo(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(n=e.palette).getContrastText)==null?void 0:r.call(n,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"},[`&.${R1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${R1.disabled}`]:{boxShadow:"none"}}),qse=ur("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${Qr(r.size)}`]]}})(({ownerState:e})=>He({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},lD(e))),Kse=ur("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${Qr(r.size)}`]]}})(({ownerState:e})=>He({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},lD(e))),Vse=ue.exports.forwardRef(function(t,r){const n=ue.exports.useContext(jse),a=oC(n,t),o=Si({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:p,disabled:m=!1,disableElevation:_=!1,disableFocusRipple:T=!1,endIcon:O,focusVisibleClassName:A,fullWidth:M=!1,size:B="medium",startIcon:L,type:U,variant:D="text"}=o,Y=Mn(o,Wse),q=He({},o,{color:l,component:c,disabled:m,disableElevation:_,disableFocusRipple:T,fullWidth:M,size:B,type:U,variant:D}),Z=zse(q),ee=L&&ne(qse,{className:Z.startIcon,ownerState:q,children:L}),V=O&&ne(Kse,{className:Z.endIcon,ownerState:q,children:O});return $t(Hse,He({ownerState:q,className:vn(n.className,Z.root,p),component:c,disabled:m,focusRipple:!T,focusVisibleClassName:vn(Z.focusVisible,A),ref:r,type:U},Y,{classes:Z,children:[ee,s,V]}))}),sx=Vse;function Gse(e){return gi("PrivateSwitchBase",e)}oi("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Yse=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Xse=e=>{const{classes:t,checked:r,disabled:n,edge:a}=e,o={root:["root",r&&"checked",n&&"disabled",a&&`edge${Qr(a)}`],input:["input"]};return wi(o,Gse,t)},Qse=ur($f)(({ownerState:e})=>He({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Zse=ur("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Jse=ue.exports.forwardRef(function(t,r){const{autoFocus:n,checked:a,checkedIcon:o,className:s,defaultChecked:l,disabled:c,disableFocusRipple:p=!1,edge:m=!1,icon:_,id:T,inputProps:O,inputRef:A,name:M,onBlur:B,onChange:L,onFocus:U,readOnly:D,required:Y,tabIndex:q,type:Z,value:ee}=t,V=Mn(t,Yse),[te,R]=zm({controlled:a,default:Boolean(l),name:"SwitchBase",state:"checked"}),h=gh(),g=d=>{U&&U(d),h&&h.onFocus&&h.onFocus(d)},v=d=>{B&&B(d),h&&h.onBlur&&h.onBlur(d)},u=d=>{if(d.nativeEvent.defaultPrevented)return;const I=d.target.checked;R(I),L&&L(d,I)};let f=c;h&&typeof f>"u"&&(f=h.disabled);const y=Z==="checkbox"||Z==="radio",S=He({},t,{checked:te,disabled:f,disableFocusRipple:p,edge:m}),w=Xse(S);return $t(Qse,He({component:"span",className:vn(w.root,s),centerRipple:!0,focusRipple:!p,disabled:f,tabIndex:null,role:void 0,onFocus:g,onBlur:v,ownerState:S,ref:r},V,{children:[ne(Zse,He({autoFocus:n,checked:a,defaultChecked:l,className:w.input,disabled:f,id:y&&T,name:M,onChange:u,readOnly:D,ref:A,required:Y,ownerState:S,tabIndex:q,type:Z},Z==="checkbox"&&ee===void 0?{}:{value:ee},O)),te?o:_]}))}),ele=Jse;function tle(e){return gi("MuiCircularProgress",e)}oi("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const rle=["className","color","disableShrink","size","style","thickness","value","variant"];let lx=e=>e,DI,$I,FI,jI;const rf=44,nle=ph(DI||(DI=lx` - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -`)),ile=ph($I||($I=lx` - 0% { - stroke-dasharray: 1px, 200px; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -15px; - } - - 100% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -125px; - } -`)),ole=e=>{const{classes:t,variant:r,color:n,disableShrink:a}=e,o={root:["root",r,`color${Qr(n)}`],svg:["svg"],circle:["circle",`circle${Qr(r)}`,a&&"circleDisableShrink"]};return wi(o,tle,t)},ale=ur("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${Qr(r.color)}`]]}})(({ownerState:e,theme:t})=>He({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"&&Vm(FI||(FI=lx` - animation: ${0} 1.4s linear infinite; - `),nle)),sle=ur("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),lle=ur("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${Qr(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>He({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&&Vm(jI||(jI=lx` - animation: ${0} 1.4s ease-in-out infinite; - `),ile)),ule=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiCircularProgress"}),{className:a,color:o="primary",disableShrink:s=!1,size:l=40,style:c,thickness:p=3.6,value:m=0,variant:_="indeterminate"}=n,T=Mn(n,rle),O=He({},n,{color:o,disableShrink:s,size:l,thickness:p,value:m,variant:_}),A=ole(O),M={},B={},L={};if(_==="determinate"){const U=2*Math.PI*((rf-p)/2);M.strokeDasharray=U.toFixed(3),L["aria-valuenow"]=Math.round(m),M.strokeDashoffset=`${((100-m)/100*U).toFixed(3)}px`,B.transform="rotate(-90deg)"}return ne(ale,He({className:vn(A.root,a),style:He({width:l,height:l},B,c),ownerState:O,ref:r,role:"progressbar"},L,T,{children:ne(sle,{className:A.svg,ownerState:O,viewBox:`${rf/2} ${rf/2} ${rf} ${rf}`,children:ne(lle,{className:A.circle,style:M,ownerState:O,cx:rf,cy:rf,r:(rf-p)/2,fill:"none",strokeWidth:p})})}))}),ux=ule,cle=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],fle=e=>e.classes,dle=ur("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})=>He({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),hle=ur(ax,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ple=ue.exports.forwardRef(function(t,r){var n,a,o,s,l,c;const p=Si({name:"MuiModal",props:t}),{BackdropComponent:m=hle,BackdropProps:_,closeAfterTransition:T=!1,children:O,component:A,components:M={},componentsProps:B={},disableAutoFocus:L=!1,disableEnforceFocus:U=!1,disableEscapeKeyDown:D=!1,disablePortal:Y=!1,disableRestoreFocus:q=!1,disableScrollLock:Z=!1,hideBackdrop:ee=!1,keepMounted:V=!1,slotProps:te,slots:R,theme:h}=p,g=Mn(p,cle),[v,u]=ue.exports.useState(!0),f={closeAfterTransition:T,disableAutoFocus:L,disableEnforceFocus:U,disableEscapeKeyDown:D,disablePortal:Y,disableRestoreFocus:q,disableScrollLock:Z,hideBackdrop:ee,keepMounted:V},y=He({},p,f,{exited:v}),S=fle(y),w=(n=(a=R?.root)!=null?a:M.Root)!=null?n:dle,d=(o=(s=R?.backdrop)!=null?s:M.Backdrop)!=null?o:m,I=(l=te?.root)!=null?l:B.root,$=(c=te?.backdrop)!=null?c:B.backdrop;return ne(qoe,He({slots:{root:w,backdrop:d},slotProps:{root:()=>He({},U4(I,y),!Jb(w)&&{as:A,theme:h}),backdrop:()=>He({},_,U4($,y))},onTransitionEnter:()=>u(!1),onTransitionExited:()=>u(!0),ref:r},g,{classes:S},f,{children:O}))}),DC=ple;function gle(e){return gi("MuiDialog",e)}const mle=oi("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),f5=mle,vle=ue.exports.createContext({}),uD=vle,yle=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ble=ur(ax,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),wle=e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:a,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Qr(r)}`],paper:["paper",`paperScroll${Qr(r)}`,`paperWidth${Qr(String(n))}`,a&&"paperFullWidth",o&&"paperFullScreen"]};return wi(s,gle,t)},xle=ur(DC,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),_le=ur("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${Qr(r.scroll)}`]]}})(({ownerState:e})=>He({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"}})),Sle=ur(jv,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${Qr(r.scroll)}`],t[`paperWidth${Qr(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>He({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}`,[`&.${f5.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}`,[`&.${f5.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,[`&.${f5.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Ele=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiDialog"}),a=_a(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:p,children:m,className:_,disableEscapeKeyDown:T=!1,fullScreen:O=!1,fullWidth:A=!1,maxWidth:M="sm",onBackdropClick:B,onClose:L,open:U,PaperComponent:D=jv,PaperProps:Y={},scroll:q="paper",TransitionComponent:Z=Wv,transitionDuration:ee=o,TransitionProps:V}=n,te=Mn(n,yle),R=He({},n,{disableEscapeKeyDown:T,fullScreen:O,fullWidth:A,maxWidth:M,scroll:q}),h=wle(R),g=ue.exports.useRef(),v=S=>{g.current=S.target===S.currentTarget},u=S=>{!g.current||(g.current=null,B&&B(S),L&&L(S,"backdropClick"))},f=C2(l),y=ue.exports.useMemo(()=>({titleId:f}),[f]);return ne(xle,He({className:vn(h.root,_),closeAfterTransition:!0,components:{Backdrop:ble},componentsProps:{backdrop:He({transitionDuration:ee,as:c},p)},disableEscapeKeyDown:T,onClose:L,open:U,ref:r,onClick:u,ownerState:R},te,{children:ne(Z,He({appear:!0,in:U,timeout:ee,role:"presentation"},V,{children:ne(_le,{className:vn(h.container),onMouseDown:v,ownerState:R,children:ne(Sle,He({as:D,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":f},Y,{className:vn(h.paper,Y.className),ownerState:R,children:ne(uD.Provider,{value:y,children:m})}))})}))}))}),$C=Ele;function Cle(e){return gi("MuiDialogActions",e)}oi("MuiDialogActions",["root","spacing"]);const Mle=["className","disableSpacing"],kle=e=>{const{classes:t,disableSpacing:r}=e;return wi({root:["root",!r&&"spacing"]},Cle,t)},Rle=ur("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>He({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),Ale=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiDialogActions"}),{className:a,disableSpacing:o=!1}=n,s=Mn(n,Mle),l=He({},n,{disableSpacing:o}),c=kle(l);return ne(Rle,He({className:vn(c.root,a),ownerState:l,ref:r},s))}),cD=Ale;function Tle(e){return gi("MuiDialogContent",e)}oi("MuiDialogContent",["root","dividers"]);function Ile(e){return gi("MuiDialogTitle",e)}const Ple=oi("MuiDialogTitle",["root"]),Ole=Ple,Ble=["className","dividers"],Ule=e=>{const{classes:t,dividers:r}=e;return wi({root:["root",r&&"dividers"]},Tle,t)},Nle=ur("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>He({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}`}:{[`.${Ole.root} + &`]:{paddingTop:0}})),Lle=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiDialogContent"}),{className:a,dividers:o=!1}=n,s=Mn(n,Ble),l=He({},n,{dividers:o}),c=Ule(l);return ne(Nle,He({className:vn(c.root,a),ownerState:l,ref:r},s))}),fD=Lle,Dle=["className","id"],$le=e=>{const{classes:t}=e;return wi({root:["root"]},Ile,t)},Fle=ur(Fo,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),jle=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiDialogTitle"}),{className:a,id:o}=n,s=Mn(n,Dle),l=n,c=$le(l),{titleId:p=o}=ue.exports.useContext(uD);return ne(Fle,He({component:"h2",className:vn(c.root,a),ownerState:l,ref:r,variant:"h6",id:p},s))}),dD=jle,Wle=oi("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),WI=Wle,zle=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Hle(e,t,r){const n=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),o=$l(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const p=o.getComputedStyle(t);s=p.getPropertyValue("-webkit-transform")||p.getPropertyValue("transform")}let l=0,c=0;if(s&&s!=="none"&&typeof s=="string"){const p=s.split("(")[1].split(")")[0].split(",");l=parseInt(p[4],10),c=parseInt(p[5],10)}return e==="left"?a?`translateX(${a.right+l-n.left}px)`:`translateX(${o.innerWidth+l-n.left}px)`:e==="right"?a?`translateX(-${n.right-a.left-l}px)`:`translateX(-${n.left+n.width-l}px)`:e==="up"?a?`translateY(${a.bottom+c-n.top}px)`:`translateY(${o.innerHeight+c-n.top}px)`:a?`translateY(-${n.top-a.top+n.height-c}px)`:`translateY(-${n.top+n.height-c}px)`}function qle(e){return typeof e=="function"?e():e}function A1(e,t,r){const n=qle(r),a=Hle(e,t,n);a&&(t.style.webkitTransform=a,t.style.transform=a)}const Kle=ue.exports.forwardRef(function(t,r){const n=_a(),a={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:c,container:p,direction:m="down",easing:_=a,in:T,onEnter:O,onEntered:A,onEntering:M,onExit:B,onExited:L,onExiting:U,style:D,timeout:Y=o,TransitionComponent:q=ex}=t,Z=Mn(t,zle),ee=ue.exports.useRef(null),V=ea(c.ref,ee,r),te=w=>d=>{w&&(d===void 0?w(ee.current):w(ee.current,d))},R=te((w,d)=>{A1(m,w,p),BC(w),O&&O(w,d)}),h=te((w,d)=>{const I=Df({timeout:Y,style:D,easing:_},{mode:"enter"});w.style.webkitTransition=n.transitions.create("-webkit-transform",He({},I)),w.style.transition=n.transitions.create("transform",He({},I)),w.style.webkitTransform="none",w.style.transform="none",M&&M(w,d)}),g=te(A),v=te(U),u=te(w=>{const d=Df({timeout:Y,style:D,easing:_},{mode:"exit"});w.style.webkitTransition=n.transitions.create("-webkit-transform",d),w.style.transition=n.transitions.create("transform",d),A1(m,w,p),B&&B(w)}),f=te(w=>{w.style.webkitTransition="",w.style.transition="",L&&L(w)}),y=w=>{s&&s(ee.current,w)},S=ue.exports.useCallback(()=>{ee.current&&A1(m,ee.current,p)},[m,p]);return ue.exports.useEffect(()=>{if(T||m==="down"||m==="right")return;const w=Zd(()=>{ee.current&&A1(m,ee.current,p)}),d=$l(ee.current);return d.addEventListener("resize",w),()=>{w.clear(),d.removeEventListener("resize",w)}},[m,T,p]),ue.exports.useEffect(()=>{T||S()},[T,S]),ne(q,He({nodeRef:ee,onEnter:R,onEntered:g,onEntering:h,onExit:u,onExited:f,onExiting:v,addEndListener:y,appear:l,in:T,timeout:Y},Z,{children:(w,d)=>ue.exports.cloneElement(c,He({ref:V,style:He({visibility:w==="exited"&&!T?"hidden":void 0},D,c.props.style)},d))}))}),hD=Kle;function Vle(e){return gi("MuiDrawer",e)}oi("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Gle=["BackdropProps"],Yle=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],pD=(e,t)=>{const{ownerState:r}=e;return[t.root,(r.variant==="permanent"||r.variant==="persistent")&&t.docked,t.modal]},Xle=e=>{const{classes:t,anchor:r,variant:n}=e,a={root:["root"],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Qr(r)}`,n!=="temporary"&&`paperAnchorDocked${Qr(r)}`]};return wi(a,Vle,t)},Qle=ur(DC,{name:"MuiDrawer",slot:"Root",overridesResolver:pD})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),zI=ur("div",{shouldForwardProp:xu,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:pD})({flex:"0 0 auto"}),Zle=ur(jv,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${Qr(r.anchor)}`],r.variant!=="temporary"&&t[`paperAnchorDocked${Qr(r.anchor)}`]]}})(({theme:e,ownerState:t})=>He({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}`})),gD={left:"right",right:"left",top:"down",bottom:"up"};function Jle(e){return["left","right"].indexOf(e)!==-1}function eue(e,t){return e.direction==="rtl"&&Jle(t)?gD[t]:t}const tue=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiDrawer"}),a=_a(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:p,elevation:m=16,hideBackdrop:_=!1,ModalProps:{BackdropProps:T}={},onClose:O,open:A=!1,PaperProps:M={},SlideProps:B,TransitionComponent:L=hD,transitionDuration:U=o,variant:D="temporary"}=n,Y=Mn(n.ModalProps,Gle),q=Mn(n,Yle),Z=ue.exports.useRef(!1);ue.exports.useEffect(()=>{Z.current=!0},[]);const ee=eue(a,s),te=He({},n,{anchor:s,elevation:m,open:A,variant:D},q),R=Xle(te),h=ne(Zle,He({elevation:D==="temporary"?m:0,square:!0},M,{className:vn(R.paper,M.className),ownerState:te,children:c}));if(D==="permanent")return ne(zI,He({className:vn(R.root,R.docked,p),ownerState:te,ref:r},q,{children:h}));const g=ne(L,He({in:A,direction:gD[ee],timeout:U,appear:Z.current},B,{children:h}));return D==="persistent"?ne(zI,He({className:vn(R.root,R.docked,p),ownerState:te,ref:r},q,{children:g})):ne(Qle,He({BackdropProps:He({},l,T,{transitionDuration:U}),className:vn(R.root,R.modal,p),open:A,ownerState:te,onClose:O,hideBackdrop:_,ref:r},q,Y,{children:g}))}),rue=tue,nue=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],iue=e=>{const{classes:t,disableUnderline:r}=e,a=wi({root:["root",!r&&"underline"],input:["input"]},Cse,t);return He({},t,a)},oue=ur(ix,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...rx(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var r;const n=e.palette.mode==="light",a=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return He({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}},[`&.${dd.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${dd.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"},[`&.${dd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dd.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(.${dd.disabled}, .${dd.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${dd.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&He({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),aue=ur(ox,{name:"MuiFilledInput",slot:"Input",overridesResolver:nx})(({theme:e,ownerState:t})=>He({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})),mD=ue.exports.forwardRef(function(t,r){var n,a,o,s;const l=Si({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:p,fullWidth:m=!1,inputComponent:_="input",multiline:T=!1,slotProps:O,slots:A={},type:M="text"}=l,B=Mn(l,nue),L=He({},l,{fullWidth:m,inputComponent:_,multiline:T,type:M}),U=iue(l),D={root:{ownerState:L},input:{ownerState:L}},Y=O??p?Ol(O??p,D):D,q=(n=(a=A.root)!=null?a:c.Root)!=null?n:oue,Z=(o=(s=A.input)!=null?s:c.Input)!=null?o:aue;return ne(LC,He({slots:{root:q,input:Z},componentsProps:Y,fullWidth:m,inputComponent:_,multiline:T,ref:r,type:M},B,{classes:U}))});mD.muiName="Input";const vD=mD;function sue(e){return gi("MuiFormControl",e)}oi("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const lue=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],uue=e=>{const{classes:t,margin:r,fullWidth:n}=e,a={root:["root",r!=="none"&&`margin${Qr(r)}`,n&&"fullWidth"]};return wi(a,sue,t)},cue=ur("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>He({},t.root,t[`margin${Qr(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>He({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%"})),fue=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiFormControl"}),{children:a,className:o,color:s="primary",component:l="div",disabled:c=!1,error:p=!1,focused:m,fullWidth:_=!1,hiddenLabel:T=!1,margin:O="none",required:A=!1,size:M="medium",variant:B="outlined"}=n,L=Mn(n,lue),U=He({},n,{color:s,component:l,disabled:c,error:p,fullWidth:_,hiddenLabel:T,margin:O,required:A,size:M,variant:B}),D=uue(U),[Y,q]=ue.exports.useState(()=>{let v=!1;return a&&ue.exports.Children.forEach(a,u=>{if(!ub(u,["Input","Select"]))return;const f=ub(u,["Select"])?u.props.input:u;f&&pse(f.props)&&(v=!0)}),v}),[Z,ee]=ue.exports.useState(()=>{let v=!1;return a&&ue.exports.Children.forEach(a,u=>{!ub(u,["Input","Select"])||NC(u.props,!0)&&(v=!0)}),v}),[V,te]=ue.exports.useState(!1);c&&V&&te(!1);const R=m!==void 0&&!c?m:V;let h;const g=ue.exports.useMemo(()=>({adornedStart:Y,setAdornedStart:q,color:s,disabled:c,error:p,filled:Z,focused:R,fullWidth:_,hiddenLabel:T,size:M,onBlur:()=>{te(!1)},onEmpty:()=>{ee(!1)},onFilled:()=>{ee(!0)},onFocus:()=>{te(!0)},registerEffect:h,required:A,variant:B}),[Y,s,c,p,Z,R,_,T,h,A,M,B]);return ne(UC.Provider,{value:g,children:ne(cue,He({as:l,ownerState:U,className:vn(D.root,o),ref:r},L,{children:a}))})}),yD=fue;function due(e){return gi("MuiFormHelperText",e)}const hue=oi("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),HI=hue;var qI;const pue=["children","className","component","disabled","error","filled","focused","margin","required","variant"],gue=e=>{const{classes:t,contained:r,size:n,disabled:a,error:o,filled:s,focused:l,required:c}=e,p={root:["root",a&&"disabled",o&&"error",n&&`size${Qr(n)}`,r&&"contained",l&&"focused",s&&"filled",c&&"required"]};return wi(p,due,t)},mue=ur("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${Qr(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(({theme:e,ownerState:t})=>He({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})),vue=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiFormHelperText"}),{children:a,className:o,component:s="p"}=n,l=Mn(n,pue),c=gh(),p=d0({props:n,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),m=He({},n,{component:s,contained:p.variant==="filled"||p.variant==="outlined",variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),_=gue(m);return ne(mue,He({as:s,ownerState:m,className:vn(_.root,o),ref:r},l,{children:a===" "?qI||(qI=ne("span",{className:"notranslate",children:"\u200B"})):a}))}),yue=vue;function bue(e){return gi("MuiFormLabel",e)}const wue=oi("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mm=wue,xue=["children","className","color","component","disabled","error","filled","focused","required"],_ue=e=>{const{classes:t,color:r,focused:n,disabled:a,error:o,filled:s,required:l}=e,c={root:["root",`color${Qr(r)}`,a&&"disabled",o&&"error",s&&"filled",n&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return wi(c,bue,t)},Sue=ur("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>He({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>He({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${mm.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${mm.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mm.error}`]:{color:(e.vars||e).palette.error.main}})),Eue=ur("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${mm.error}`]:{color:(e.vars||e).palette.error.main}})),Cue=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiFormLabel"}),{children:a,className:o,component:s="label"}=n,l=Mn(n,xue),c=gh(),p=d0({props:n,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),m=He({},n,{color:p.color||"primary",component:s,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),_=_ue(m);return $t(Sue,He({as:s,ownerState:m,className:vn(_.root,o),ref:r},l,{children:[a,p.required&&$t(Eue,{ownerState:m,"aria-hidden":!0,className:_.asterisk,children:["\u2009","*"]})]}))}),bD=Cue,Mue=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function z4(e){return`scale(${e}, ${e**2})`}const kue={entering:{opacity:1,transform:z4(1)},entered:{opacity:1,transform:"none"}},d5=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),wD=ue.exports.forwardRef(function(t,r){const{addEndListener:n,appear:a=!0,children:o,easing:s,in:l,onEnter:c,onEntered:p,onEntering:m,onExit:_,onExited:T,onExiting:O,style:A,timeout:M="auto",TransitionComponent:B=ex}=t,L=Mn(t,Mue),U=ue.exports.useRef(),D=ue.exports.useRef(),Y=_a(),q=ue.exports.useRef(null),Z=ea(q,o.ref,r),ee=f=>y=>{if(f){const S=q.current;y===void 0?f(S):f(S,y)}},V=ee(m),te=ee((f,y)=>{BC(f);const{duration:S,delay:w,easing:d}=Df({style:A,timeout:M,easing:s},{mode:"enter"});let I;M==="auto"?(I=Y.transitions.getAutoHeightDuration(f.clientHeight),D.current=I):I=S,f.style.transition=[Y.transitions.create("opacity",{duration:I,delay:w}),Y.transitions.create("transform",{duration:d5?I:I*.666,delay:w,easing:d})].join(","),c&&c(f,y)}),R=ee(p),h=ee(O),g=ee(f=>{const{duration:y,delay:S,easing:w}=Df({style:A,timeout:M,easing:s},{mode:"exit"});let d;M==="auto"?(d=Y.transitions.getAutoHeightDuration(f.clientHeight),D.current=d):d=y,f.style.transition=[Y.transitions.create("opacity",{duration:d,delay:S}),Y.transitions.create("transform",{duration:d5?d:d*.666,delay:d5?S:S||d*.333,easing:w})].join(","),f.style.opacity=0,f.style.transform=z4(.75),_&&_(f)}),v=ee(T),u=f=>{M==="auto"&&(U.current=setTimeout(f,D.current||0)),n&&n(q.current,f)};return ue.exports.useEffect(()=>()=>{clearTimeout(U.current)},[]),ne(B,He({appear:a,in:l,nodeRef:q,onEnter:te,onEntered:R,onEntering:V,onExit:g,onExited:v,onExiting:h,addEndListener:u,timeout:M==="auto"?null:M},L,{children:(f,y)=>ue.exports.cloneElement(o,He({style:He({opacity:0,transform:z4(.75),visibility:f==="exited"&&!l?"hidden":void 0},kue[f],A,o.props.style),ref:Z},y))}))});wD.muiSupportAuto=!0;const H4=wD;function Rue(e,t,r,n,a){const o=typeof window<"u"&&typeof window.matchMedia<"u",[s,l]=ue.exports.useState(()=>a&&o?r(e).matches:n?n(e).matches:t);return du(()=>{let c=!0;if(!o)return;const p=r(e),m=()=>{c&&l(p.matches)};return m(),p.addListener(m),()=>{c=!1,p.removeListener(m)}},[e,r,o]),s}const xD=Kd["useSyncExternalStore"];function Aue(e,t,r,n){const a=ue.exports.useCallback(()=>t,[t]),o=ue.exports.useMemo(()=>{if(n!==null){const{matches:p}=n(e);return()=>p}return a},[a,e,n]),[s,l]=ue.exports.useMemo(()=>{if(r===null)return[a,()=>()=>{}];const p=r(e);return[()=>p.matches,m=>(p.addListener(m),()=>{p.removeListener(m)})]},[a,r,e]);return xD(l,s,o)}function ga(e,t={}){const r=wC(),n=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:o=n?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l}=KL({name:"MuiUseMediaQuery",props:t,theme:r});let c=typeof e=="function"?e(r):e;return c=c.replace(/^@media( ?)/m,""),(xD!==void 0?Aue:Rue)(c,a,o,s,l)}const Tue=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Iue=e=>{const{classes:t,disableUnderline:r}=e,a=wi({root:["root",!r&&"underline"],input:["input"]},xse,t);return He({},t,a)},Pue=ur(ix,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...rx(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),He({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"},[`&.${ag.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ag.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&:before":{borderBottom:`1px solid ${n}`,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(.${ag.disabled}, .${ag.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ag.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Oue=ur(ox,{name:"MuiInput",slot:"Input",overridesResolver:nx})({}),_D=ue.exports.forwardRef(function(t,r){var n,a,o,s;const l=Si({props:t,name:"MuiInput"}),{disableUnderline:c,components:p={},componentsProps:m,fullWidth:_=!1,inputComponent:T="input",multiline:O=!1,slotProps:A,slots:M={},type:B="text"}=l,L=Mn(l,Tue),U=Iue(l),Y={root:{ownerState:{disableUnderline:c}}},q=A??m?Ol(A??m,Y):Y,Z=(n=(a=M.root)!=null?a:p.Root)!=null?n:Pue,ee=(o=(s=M.input)!=null?s:p.Input)!=null?o:Oue;return ne(LC,He({slots:{root:Z,input:ee},slotProps:q,fullWidth:_,inputComponent:T,multiline:O,ref:r,type:B},L,{classes:U}))});_D.muiName="Input";const SD=_D;function Bue(e){return gi("MuiInputLabel",e)}oi("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Uue=["disableAnimation","margin","shrink","variant","className"],Nue=e=>{const{classes:t,formControl:r,size:n,shrink:a,disableAnimation:o,variant:s,required:l}=e,p=wi({root:["root",r&&"formControl",!o&&"animated",a&&"shrink",n==="small"&&"sizeSmall",s],asterisk:[l&&"asterisk"]},Bue,t);return He({},t,p)},Lue=ur(bD,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${mm.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})=>He({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"&&He({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&&He({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"&&He({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)"}))),Due=ue.exports.forwardRef(function(t,r){const n=Si({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,shrink:o,className:s}=n,l=Mn(n,Uue),c=gh();let p=o;typeof p>"u"&&c&&(p=c.filled||c.focused||c.adornedStart);const m=d0({props:n,muiFormControl:c,states:["size","variant","required"]}),_=He({},n,{disableAnimation:a,formControl:c,shrink:p,size:m.size,variant:m.variant,required:m.required}),T=Nue(_);return ne(Lue,He({"data-shrink":p,ownerState:_,ref:r,className:vn(T.root,s)},l,{classes:T}))}),$ue=Due;function Fue(e){return gi("MuiLink",e)}const jue=oi("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Wue=jue,ED={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zue=e=>ED[e]||e,Hue=({theme:e,ownerState:t})=>{const r=zue(t.color),n=Up(e,`palette.${r}`,!1)||t.color,a=Up(e,`palette.${r}Channel`);return"vars"in e&&a?`rgba(${a} / 0.4)`:oo(n,.4)},que=Hue,Kue=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Vue=e=>{const{classes:t,component:r,focusVisible:n,underline:a}=e,o={root:["root",`underline${Qr(a)}`,r==="button"&&"button",n&&"focusVisible"]};return wi(o,Fue,t)},Gue=ur(Fo,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${Qr(r.underline)}`],r.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>He({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&He({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:que({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"},[`&.${Wue.focusVisible}`]:{outline:"auto"}})),Yue=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiLink"}),{className:a,color:o="primary",component:s="a",onBlur:l,onFocus:c,TypographyClasses:p,underline:m="always",variant:_="inherit",sx:T}=n,O=Mn(n,Kue),{isFocusVisibleRef:A,onBlur:M,onFocus:B,ref:L}=k2(),[U,D]=ue.exports.useState(!1),Y=ea(r,L),q=te=>{M(te),A.current===!1&&D(!1),l&&l(te)},Z=te=>{B(te),A.current===!0&&D(!0),c&&c(te)},ee=He({},n,{color:o,component:s,focusVisible:U,underline:m,variant:_}),V=Vue(ee);return ne(Gue,He({color:o,className:vn(V.root,a),classes:p,component:s,onBlur:q,onFocus:Z,ref:Y,ownerState:ee,variant:_,sx:[...Object.keys(ED).includes(o)?[]:[{color:o}],...Array.isArray(T)?T:[T]]},O))}),Sc=Yue,Xue=ue.exports.createContext({}),q4=Xue;function Que(e){return gi("MuiList",e)}oi("MuiList",["root","padding","dense","subheader"]);const Zue=["children","className","component","dense","disablePadding","subheader"],Jue=e=>{const{classes:t,disablePadding:r,dense:n,subheader:a}=e;return wi({root:["root",!r&&"padding",n&&"dense",a&&"subheader"]},Que,t)},ece=ur("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})=>He({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),tce=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiList"}),{children:a,className:o,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:p}=n,m=Mn(n,Zue),_=ue.exports.useMemo(()=>({dense:l}),[l]),T=He({},n,{component:s,dense:l,disablePadding:c}),O=Jue(T);return ne(q4.Provider,{value:_,children:$t(ece,He({as:s,className:vn(O.root,o),ref:r,ownerState:T},m,{children:[p,a]}))})}),rce=tce,nce=oi("MuiListItemIcon",["root","alignItemsFlexStart"]),KI=nce,ice=oi("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),VI=ice,oce=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function h5(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function GI(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function CD(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 sg(e,t,r,n,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 c=n?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!CD(l,o)||c)l=a(e,l,r);else return l.focus(),!0}return!1}const ace=ue.exports.forwardRef(function(t,r){const{actions:n,autoFocus:a=!1,autoFocusItem:o=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:p=!1,onKeyDown:m,variant:_="selectedMenu"}=t,T=Mn(t,oce),O=ue.exports.useRef(null),A=ue.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});du(()=>{a&&O.current.focus()},[a]),ue.exports.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(D,Y)=>{const q=!O.current.style.width;if(D.clientHeight{const Y=O.current,q=D.key,Z=Ra(Y).activeElement;if(q==="ArrowDown")D.preventDefault(),sg(Y,Z,p,c,h5);else if(q==="ArrowUp")D.preventDefault(),sg(Y,Z,p,c,GI);else if(q==="Home")D.preventDefault(),sg(Y,null,p,c,h5);else if(q==="End")D.preventDefault(),sg(Y,null,p,c,GI);else if(q.length===1){const ee=A.current,V=q.toLowerCase(),te=performance.now();ee.keys.length>0&&(te-ee.lastTime>500?(ee.keys=[],ee.repeating=!0,ee.previousKeyMatched=!0):ee.repeating&&V!==ee.keys[0]&&(ee.repeating=!1)),ee.lastTime=te,ee.keys.push(V);const R=Z&&!ee.repeating&&CD(Z,ee);ee.previousKeyMatched&&(R||sg(Y,Z,!1,c,h5,ee))?D.preventDefault():ee.previousKeyMatched=!1}m&&m(D)},B=ea(O,r);let L=-1;ue.exports.Children.forEach(s,(D,Y)=>{!ue.exports.isValidElement(D)||D.props.disabled||(_==="selectedMenu"&&D.props.selected||L===-1)&&(L=Y)});const U=ue.exports.Children.map(s,(D,Y)=>{if(Y===L){const q={};return o&&(q.autoFocus=!0),D.props.tabIndex===void 0&&_==="selectedMenu"&&(q.tabIndex=0),ue.exports.cloneElement(D,q)}return D});return ne(rce,He({role:"menu",ref:B,className:l,onKeyDown:M,tabIndex:a?0:-1},T,{children:U}))}),sce=ace;function lce(e){return gi("MuiPopover",e)}oi("MuiPopover",["root","paper"]);const uce=["onEntering"],cce=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function YI(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 QI(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function p5(e){return typeof e=="function"?e():e}const fce=e=>{const{classes:t}=e;return wi({root:["root"],paper:["paper"]},lce,t)},dce=ur(DC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hce=ur(jv,{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}),pce=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiPopover"}),{action:a,anchorEl:o,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:p,className:m,container:_,elevation:T=8,marginThreshold:O=16,open:A,PaperProps:M={},transformOrigin:B={vertical:"top",horizontal:"left"},TransitionComponent:L=H4,transitionDuration:U="auto",TransitionProps:{onEntering:D}={}}=n,Y=Mn(n.TransitionProps,uce),q=Mn(n,cce),Z=ue.exports.useRef(),ee=ea(Z,M.ref),V=He({},n,{anchorOrigin:s,anchorReference:c,elevation:T,marginThreshold:O,PaperProps:M,transformOrigin:B,TransitionComponent:L,transitionDuration:U,TransitionProps:Y}),te=fce(V),R=ue.exports.useCallback(()=>{if(c==="anchorPosition")return l;const I=p5(o),b=(I&&I.nodeType===1?I:Ra(Z.current).body).getBoundingClientRect();return{top:b.top+YI(b,s.vertical),left:b.left+XI(b,s.horizontal)}},[o,s.horizontal,s.vertical,l,c]),h=ue.exports.useCallback(I=>({vertical:YI(I,B.vertical),horizontal:XI(I,B.horizontal)}),[B.horizontal,B.vertical]),g=ue.exports.useCallback(I=>{const $={width:I.offsetWidth,height:I.offsetHeight},b=h($);if(c==="none")return{top:null,left:null,transformOrigin:QI(b)};const X=R();let we=X.top-b.vertical,Ae=X.left-b.horizontal;const je=we+$.height,Vt=Ae+$.width,De=$l(p5(o)),Fe=De.innerHeight-O,wt=De.innerWidth-O;if(weFe){const Ke=je-Fe;we-=Ke,b.vertical+=Ke}if(Aewt){const Ke=Vt-wt;Ae-=Ke,b.horizontal+=Ke}return{top:`${Math.round(we)}px`,left:`${Math.round(Ae)}px`,transformOrigin:QI(b)}},[o,c,R,h,O]),[v,u]=ue.exports.useState(A),f=ue.exports.useCallback(()=>{const I=Z.current;if(!I)return;const $=g(I);$.top!==null&&(I.style.top=$.top),$.left!==null&&(I.style.left=$.left),I.style.transformOrigin=$.transformOrigin,u(!0)},[g]),y=(I,$)=>{D&&D(I,$),f()},S=()=>{u(!1)};ue.exports.useEffect(()=>{A&&f()}),ue.exports.useImperativeHandle(a,()=>A?{updatePosition:()=>{f()}}:null,[A,f]),ue.exports.useEffect(()=>{if(!A)return;const I=Zd(()=>{f()}),$=$l(o);return $.addEventListener("resize",I),()=>{I.clear(),$.removeEventListener("resize",I)}},[o,A,f]);let w=U;U==="auto"&&!L.muiSupportAuto&&(w=void 0);const d=_||(o?Ra(p5(o)).body:void 0);return ne(dce,He({BackdropProps:{invisible:!0},className:vn(te.root,m),container:d,open:A,ref:r,ownerState:V},q,{children:ne(L,He({appear:!0,in:A,onEntering:y,onExited:S,timeout:w},Y,{children:ne(hce,He({elevation:T},M,{ref:ee,className:vn(te.paper,M.className)},v?void 0:{style:He({},M.style,{opacity:0})},{ownerState:V,children:p}))}))}))}),gce=pce;function mce(e){return gi("MuiMenu",e)}oi("MuiMenu",["root","paper","list"]);const vce=["onEntering"],yce=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],bce={vertical:"top",horizontal:"right"},wce={vertical:"top",horizontal:"left"},xce=e=>{const{classes:t}=e;return wi({root:["root"],paper:["paper"],list:["list"]},mce,t)},_ce=ur(gce,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Sce=ur(jv,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ece=ur(sce,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Cce=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:o,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:p,PaperProps:m={},PopoverClasses:_,transitionDuration:T="auto",TransitionProps:{onEntering:O}={},variant:A="selectedMenu"}=n,M=Mn(n.TransitionProps,vce),B=Mn(n,yce),L=_a(),U=L.direction==="rtl",D=He({},n,{autoFocus:a,disableAutoFocusItem:s,MenuListProps:l,onEntering:O,PaperProps:m,transitionDuration:T,TransitionProps:M,variant:A}),Y=xce(D),q=a&&!s&&p,Z=ue.exports.useRef(null),ee=(R,h)=>{Z.current&&Z.current.adjustStyleForScrollbar(R,L),O&&O(R,h)},V=R=>{R.key==="Tab"&&(R.preventDefault(),c&&c(R,"tabKeyDown"))};let te=-1;return ue.exports.Children.map(o,(R,h)=>{!ue.exports.isValidElement(R)||R.props.disabled||(A==="selectedMenu"&&R.props.selected||te===-1)&&(te=h)}),ne(_ce,He({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:U?"right":"left"},transformOrigin:U?bce:wce,PaperProps:He({component:Sce},m,{classes:He({},m.classes,{root:Y.paper})}),className:Y.root,open:p,ref:r,transitionDuration:T,TransitionProps:He({onEntering:ee},M),ownerState:D},B,{classes:_,children:ne(Ece,He({onKeyDown:V,actions:Z,autoFocus:a&&(te===-1||s),autoFocusItem:q,variant:A},l,{className:vn(Y.list,l.className),children:o}))}))}),Mce=Cce;function kce(e){return gi("MuiMenuItem",e)}const Rce=oi("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),lg=Rce,Ace=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Tce=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},Ice=e=>{const{disabled:t,dense:r,divider:n,disableGutters:a,selected:o,classes:s}=e,c=wi({root:["root",r&&"dense",t&&"disabled",!a&&"gutters",n&&"divider",o&&"selected"]},kce,s);return He({},s,c)},Pce=ur($f,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Tce})(({theme:e,ownerState:t})=>He({},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"}},[`&.${lg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:oo(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:oo(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:oo(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})`:oo(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${WI.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${WI.inset}`]:{marginLeft:52},[`& .${VI.root}`]:{marginTop:0,marginBottom:0},[`& .${VI.inset}`]:{paddingLeft:36},[`& .${KI.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&He({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${KI.root} svg`]:{fontSize:"1.25rem"}}))),Oce=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiMenuItem"}),{autoFocus:a=!1,component:o="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:p,role:m="menuitem",tabIndex:_,className:T}=n,O=Mn(n,Ace),A=ue.exports.useContext(q4),M=ue.exports.useMemo(()=>({dense:s||A.dense||!1,disableGutters:c}),[A.dense,s,c]),B=ue.exports.useRef(null);du(()=>{a&&B.current&&B.current.focus()},[a]);const L=He({},n,{dense:M.dense,divider:l,disableGutters:c}),U=Ice(n),D=ea(B,r);let Y;return n.disabled||(Y=_!==void 0?_:-1),ne(q4.Provider,{value:M,children:ne(Pce,He({ref:D,role:m,tabIndex:Y,component:o,focusVisibleClassName:vn(U.focusVisible,p),className:vn(U.root,T)},O,{ownerState:L,classes:U}))})}),ug=Oce;function Bce(e){return gi("MuiNativeSelect",e)}const Uce=oi("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),FC=Uce,Nce=["className","disabled","IconComponent","inputRef","variant"],Lce=e=>{const{classes:t,variant:r,disabled:n,multiple:a,open:o}=e,s={select:["select",r,n&&"disabled",a&&"multiple"],icon:["icon",`icon${Qr(r)}`,o&&"iconOpen",n&&"disabled"]};return wi(s,Bce,t)},MD=({ownerState:e,theme:t})=>He({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":He({},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"},[`&.${FC.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}}),Dce=ur("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:xu,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],{[`&.${FC.multiple}`]:t.multiple}]}})(MD),kD=({ownerState:e,theme:t})=>He({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${FC.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),$ce=ur("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Qr(r.variant)}`],r.open&&t.iconOpen]}})(kD),Fce=ue.exports.forwardRef(function(t,r){const{className:n,disabled:a,IconComponent:o,inputRef:s,variant:l="standard"}=t,c=Mn(t,Nce),p=He({},t,{disabled:a,variant:l}),m=Lce(p);return $t(ue.exports.Fragment,{children:[ne(Dce,He({ownerState:p,className:vn(m.select,n),disabled:a,ref:s||r},c)),t.multiple?null:ne($ce,{as:o,ownerState:p,className:m.icon})]})}),jce=Fce;var ZI;const Wce=["children","classes","className","label","notched"],zce=ur("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%"}),Hce=ur("legend")(({ownerState:e,theme:t})=>He({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&&He({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 qce(e){const{className:t,label:r,notched:n}=e,a=Mn(e,Wce),o=r!=null&&r!=="",s=He({},e,{notched:n,withLabel:o});return ne(zce,He({"aria-hidden":!0,className:t,ownerState:s},a,{children:ne(Hce,{ownerState:s,children:o?ne("span",{children:r}):ZI||(ZI=ne("span",{className:"notranslate",children:"\u200B"}))})}))}const Kce=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Vce=e=>{const{classes:t}=e,n=wi({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Sse,t);return He({},t,n)},Gce=ur(ix,{shouldForwardProp:e=>xu(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rx})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return He({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${tf.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${tf.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${tf.focused} .${tf.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${tf.error} .${tf.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${tf.disabled} .${tf.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&He({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),Yce=ur(qce,{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}}),Xce=ur(ox,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:nx})(({theme:e,ownerState:t})=>He({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})),RD=ue.exports.forwardRef(function(t,r){var n,a,o,s,l;const c=Si({props:t,name:"MuiOutlinedInput"}),{components:p={},fullWidth:m=!1,inputComponent:_="input",label:T,multiline:O=!1,notched:A,slots:M={},type:B="text"}=c,L=Mn(c,Kce),U=Vce(c),D=gh(),Y=d0({props:c,muiFormControl:D,states:["required"]}),q=He({},c,{color:Y.color||"primary",disabled:Y.disabled,error:Y.error,focused:Y.focused,formControl:D,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:O,size:Y.size,type:B}),Z=(n=(a=M.root)!=null?a:p.Root)!=null?n:Gce,ee=(o=(s=M.input)!=null?s:p.Input)!=null?o:Xce;return ne(LC,He({slots:{root:Z,input:ee},renderSuffix:V=>ne(Yce,{ownerState:q,className:U.notchedOutline,label:T!=null&&T!==""&&Y.required?l||(l=$t(ue.exports.Fragment,{children:[T,"\xA0","*"]})):T,notched:typeof A<"u"?A:Boolean(V.startAdornment||V.filled||V.focused)}),fullWidth:m,inputComponent:_,multiline:O,ref:r,type:B},L,{classes:He({},U,{notchedOutline:null})}))});RD.muiName="Input";const AD=RD;function Qce(e){return gi("MuiSelect",e)}const Zce=oi("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),T1=Zce;var JI;const Jce=["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"],efe=ur("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${T1.select}`]:t.select},{[`&.${T1.select}`]:t[r.variant]},{[`&.${T1.multiple}`]:t.multiple}]}})(MD,{[`&.${T1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tfe=ur("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Qr(r.variant)}`],r.open&&t.iconOpen]}})(kD),rfe=ur("input",{shouldForwardProp:e=>eie(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 eP(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function nfe(e){return e==null||typeof e=="string"&&!e.trim()}const ife=e=>{const{classes:t,variant:r,disabled:n,multiple:a,open:o}=e,s={select:["select",r,n&&"disabled",a&&"multiple"],icon:["icon",`icon${Qr(r)}`,o&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return wi(s,Qce,t)},ofe=ue.exports.forwardRef(function(t,r){const{"aria-describedby":n,"aria-label":a,autoFocus:o,autoWidth:s,children:l,className:c,defaultOpen:p,defaultValue:m,disabled:_,displayEmpty:T,IconComponent:O,inputRef:A,labelId:M,MenuProps:B={},multiple:L,name:U,onBlur:D,onChange:Y,onClose:q,onFocus:Z,onOpen:ee,open:V,readOnly:te,renderValue:R,SelectDisplayProps:h={},tabIndex:g,value:v,variant:u="standard"}=t,f=Mn(t,Jce),[y,S]=zm({controlled:v,default:m,name:"Select"}),[w,d]=zm({controlled:V,default:p,name:"Select"}),I=ue.exports.useRef(null),$=ue.exports.useRef(null),[b,X]=ue.exports.useState(null),{current:we}=ue.exports.useRef(V!=null),[Ae,je]=ue.exports.useState(),Vt=ea(r,A),De=ue.exports.useCallback(F=>{$.current=F,F&&X(F)},[]),Fe=b?.parentNode;ue.exports.useImperativeHandle(Vt,()=>({focus:()=>{$.current.focus()},node:I.current,value:y}),[y]),ue.exports.useEffect(()=>{p&&w&&b&&!we&&(je(s?null:Fe.clientWidth),$.current.focus())},[b,s]),ue.exports.useEffect(()=>{o&&$.current.focus()},[o]),ue.exports.useEffect(()=>{if(!M)return;const F=Ra($.current).getElementById(M);if(F){const ie=()=>{getSelection().isCollapsed&&$.current.focus()};return F.addEventListener("click",ie),()=>{F.removeEventListener("click",ie)}}},[M]);const wt=(F,ie)=>{F?ee&&ee(ie):q&&q(ie),we||(je(s?null:Fe.clientWidth),d(F))},Ke=F=>{F.button===0&&(F.preventDefault(),$.current.focus(),wt(!0,F))},ht=F=>{wt(!1,F)},dr=ue.exports.Children.toArray(l),ae=F=>{const ie=dr.map(pe=>pe.props.value).indexOf(F.target.value);if(ie===-1)return;const de=dr[ie];S(de.props.value),Y&&Y(F,de)},Ve=F=>ie=>{let de;if(!!ie.currentTarget.hasAttribute("tabindex")){if(L){de=Array.isArray(y)?y.slice():[];const pe=y.indexOf(F.props.value);pe===-1?de.push(F.props.value):de.splice(pe,1)}else de=F.props.value;if(F.props.onClick&&F.props.onClick(ie),y!==de&&(S(de),Y)){const pe=ie.nativeEvent||ie,be=new pe.constructor(pe.type,pe);Object.defineProperty(be,"target",{writable:!0,value:{value:de,name:U}}),Y(be,F)}L||wt(!1,ie)}},Nt=F=>{te||[" ","ArrowUp","ArrowDown","Enter"].indexOf(F.key)!==-1&&(F.preventDefault(),wt(!0,F))},Ee=b!==null&&w,xe=F=>{!Ee&&D&&(Object.defineProperty(F,"target",{writable:!0,value:{value:y,name:U}}),D(F))};delete f["aria-invalid"];let ut,st;const _t=[];let Pt=!1;(NC({value:y})||T)&&(R?ut=R(y):Pt=!0);const Ut=dr.map((F,ie,de)=>{var pe,be,Gt,Lt;if(!ue.exports.isValidElement(F))return null;let Tt;if(L){if(!Array.isArray(y))throw new Error(Lf(2));Tt=y.some(zt=>eP(zt,F.props.value)),Tt&&Pt&&_t.push(F.props.children)}else Tt=eP(y,F.props.value),Tt&&Pt&&(st=F.props.children);if(F.props.value===void 0)return ue.exports.cloneElement(F,{"aria-readonly":!0,role:"option"});const yr=()=>{if(y)return Tt;const zt=de.find(Ht=>{var On;return(Ht==null||(On=Ht.props)==null?void 0:On.value)!==void 0&&Ht.props.disabled!==!0});return F===zt?!0:Tt};return ue.exports.cloneElement(F,{"aria-selected":Tt?"true":"false",onClick:Ve(F),onKeyUp:zt=>{zt.key===" "&&zt.preventDefault(),F.props.onKeyUp&&F.props.onKeyUp(zt)},role:"option",selected:((pe=de[0])==null||(be=pe.props)==null?void 0:be.value)===void 0||((Gt=de[0])==null||(Lt=Gt.props)==null?void 0:Lt.disabled)===!0?yr():Tt,value:void 0,"data-value":F.props.value})});Pt&&(L?_t.length===0?ut=null:ut=_t.reduce((F,ie,de)=>(F.push(ie),de<_t.length-1&&F.push(", "),F),[]):ut=st);let ve=Ae;!s&&we&&b&&(ve=Fe.clientWidth);let ye;typeof g<"u"?ye=g:ye=_?null:0;const me=h.id||(U?`mui-component-select-${U}`:void 0),Q=He({},t,{variant:u,value:y,open:Ee}),j=ife(Q);return $t(ue.exports.Fragment,{children:[ne(efe,He({ref:De,tabIndex:ye,role:"button","aria-disabled":_?"true":void 0,"aria-expanded":Ee?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[M,me].filter(Boolean).join(" ")||void 0,"aria-describedby":n,onKeyDown:Nt,onMouseDown:_||te?null:Ke,onBlur:xe,onFocus:Z},h,{ownerState:Q,className:vn(h.className,j.select,c),id:me,children:nfe(ut)?JI||(JI=ne("span",{className:"notranslate",children:"\u200B"})):ut})),ne(rfe,He({value:Array.isArray(y)?y.join(","):y,name:U,ref:I,"aria-hidden":!0,onChange:ae,tabIndex:-1,disabled:_,className:j.nativeInput,autoFocus:o,ownerState:Q},f)),ne(tfe,{as:O,className:j.icon,ownerState:Q}),ne(Mce,He({id:`menu-${U||""}`,anchorEl:Fe,open:Ee,onClose:ht,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},B,{MenuListProps:He({"aria-labelledby":M,role:"listbox",disableListWrap:!0},B.MenuListProps),PaperProps:He({},B.PaperProps,{style:He({minWidth:ve},B.PaperProps!=null?B.PaperProps.style:null)}),children:Ut}))]})}),afe=ofe;var tP,rP;const sfe=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],lfe=e=>{const{classes:t}=e;return t},jC={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>xu(e)&&e!=="variant",slot:"Root"},ufe=ur(SD,jC)(""),cfe=ur(AD,jC)(""),ffe=ur(vD,jC)(""),TD=ue.exports.forwardRef(function(t,r){const n=Si({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:o,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:p=!1,IconComponent:m=kse,id:_,input:T,inputProps:O,label:A,labelId:M,MenuProps:B,multiple:L=!1,native:U=!1,onClose:D,onOpen:Y,open:q,renderValue:Z,SelectDisplayProps:ee,variant:V="outlined"}=n,te=Mn(n,sfe),R=U?jce:afe,h=gh(),v=d0({props:n,muiFormControl:h,states:["variant"]}).variant||V,u=T||{standard:tP||(tP=ne(ufe,{})),outlined:ne(cfe,{label:A}),filled:rP||(rP=ne(ffe,{}))}[v],f=He({},n,{variant:v,classes:s}),y=lfe(f),S=ea(r,u.ref);return ne(ue.exports.Fragment,{children:ue.exports.cloneElement(u,He({inputComponent:R,inputProps:He({children:o,IconComponent:m,variant:v,type:void 0,multiple:L},U?{id:_}:{autoWidth:a,defaultOpen:c,displayEmpty:p,labelId:M,MenuProps:B,onClose:D,onOpen:Y,open:q,renderValue:Z,SelectDisplayProps:He({id:_},ee)},O,{classes:O?Ol(y,O.classes):y},T?T.props.inputProps:{})},L&&U&&v==="outlined"?{notched:!0}:{},{ref:S,className:vn(u.props.className,l)},!T&&{variant:v},te))})});TD.muiName="Select";const ID=TD;function dfe(e){return gi("MuiSkeleton",e)}oi("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const hfe=["animation","className","component","height","style","variant","width"];let rw=e=>e,nP,iP,oP,aP;const pfe=e=>{const{classes:t,variant:r,animation:n,hasChildren:a,width:o,height:s}=e;return wi({root:["root",r,n,a&&"withChildren",a&&!o&&"fitContent",a&&!s&&"heightAuto"]},dfe,t)},gfe=ph(nP||(nP=rw` - 0% { - opacity: 1; - } - - 50% { - opacity: 0.4; - } - - 100% { - opacity: 1; - } -`)),mfe=ph(iP||(iP=rw` - 0% { - transform: translateX(-100%); - } - - 50% { - /* +0.5s of delay between each loop */ - transform: translateX(100%); - } - - 100% { - transform: translateX(100%); - } -`)),vfe=ur("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=Qne(e.shape.borderRadius)||"px",n=Zne(e.shape.borderRadius);return He({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:oo(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:`${n}${r}/${Math.round(n/.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"&&Vm(oP||(oP=rw` - animation: ${0} 1.5s ease-in-out 0.5s infinite; - `),gfe),({ownerState:e,theme:t})=>e.animation==="wave"&&Vm(aP||(aP=rw` - 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; - } - `),mfe,(t.vars||t).palette.action.hover)),yfe=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiSkeleton"}),{animation:a="pulse",className:o,component:s="span",height:l,style:c,variant:p="text",width:m}=n,_=Mn(n,hfe),T=He({},n,{animation:a,component:s,variant:p,hasChildren:Boolean(_.children)}),O=pfe(T);return ne(vfe,He({as:s,ref:r,className:vn(O.root,o),ownerState:T},_,{style:He({width:m,height:l},c)}))}),ps=yfe;function bfe(e){return gi("MuiTooltip",e)}const wfe=oi("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),yf=wfe,xfe=["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 _fe(e){return Math.round(e*1e5)/1e5}const Sfe=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:o}=e,s={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${Qr(o.split("-")[0])}`],arrow:["arrow"]};return wi(s,bfe,t)},Efe=ur(sD,{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})=>He({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${yf.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${yf.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${yf.arrow}`]:He({},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"] .${yf.arrow}`]:He({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Cfe=ur("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${Qr(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>He({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:oo(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:`${_fe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${yf.popper}[data-popper-placement*="left"] &`]:He({transformOrigin:"right center"},t.isRtl?He({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):He({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${yf.popper}[data-popper-placement*="right"] &`]:He({transformOrigin:"left center"},t.isRtl?He({marginRight:"14px"},t.touch&&{marginRight:"24px"}):He({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${yf.popper}[data-popper-placement*="top"] &`]:He({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${yf.popper}[data-popper-placement*="bottom"] &`]:He({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),Mfe=ur("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:oo(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let I1=!1,g5=null;function P1(e,t){return r=>{t&&t(r),e(r)}}const kfe=ue.exports.forwardRef(function(t,r){var n,a,o,s,l,c,p,m,_,T,O,A,M,B,L,U,D,Y,q;const Z=Si({props:t,name:"MuiTooltip"}),{arrow:ee=!1,children:V,components:te={},componentsProps:R={},describeChild:h=!1,disableFocusListener:g=!1,disableHoverListener:v=!1,disableInteractive:u=!1,disableTouchListener:f=!1,enterDelay:y=100,enterNextDelay:S=0,enterTouchDelay:w=700,followCursor:d=!1,id:I,leaveDelay:$=0,leaveTouchDelay:b=1500,onClose:X,onOpen:we,open:Ae,placement:je="bottom",PopperComponent:Vt,PopperProps:De={},slotProps:Fe={},slots:wt={},title:Ke,TransitionComponent:ht=H4,TransitionProps:dr}=Z,ae=Mn(Z,xfe),Ve=_a(),Nt=Ve.direction==="rtl",[Ee,xe]=ue.exports.useState(),[ut,st]=ue.exports.useState(null),_t=ue.exports.useRef(!1),Pt=u||d,Ut=ue.exports.useRef(),ve=ue.exports.useRef(),ye=ue.exports.useRef(),me=ue.exports.useRef(),[Q,j]=zm({controlled:Ae,default:!1,name:"Tooltip",state:"open"});let F=Q;const ie=C2(I),de=ue.exports.useRef(),pe=ue.exports.useCallback(()=>{de.current!==void 0&&(document.body.style.WebkitUserSelect=de.current,de.current=void 0),clearTimeout(me.current)},[]);ue.exports.useEffect(()=>()=>{clearTimeout(Ut.current),clearTimeout(ve.current),clearTimeout(ye.current),pe()},[pe]);const be=Xr=>{clearTimeout(g5),I1=!0,j(!0),we&&!F&&we(Xr)},Gt=Il(Xr=>{clearTimeout(g5),g5=setTimeout(()=>{I1=!1},800+$),j(!1),X&&F&&X(Xr),clearTimeout(Ut.current),Ut.current=setTimeout(()=>{_t.current=!1},Ve.transitions.duration.shortest)}),Lt=Xr=>{_t.current&&Xr.type!=="touchstart"||(Ee&&Ee.removeAttribute("title"),clearTimeout(ve.current),clearTimeout(ye.current),y||I1&&S?ve.current=setTimeout(()=>{be(Xr)},I1?S:y):be(Xr))},Tt=Xr=>{clearTimeout(ve.current),clearTimeout(ye.current),ye.current=setTimeout(()=>{Gt(Xr)},$)},{isFocusVisibleRef:yr,onBlur:zt,onFocus:Ht,ref:On}=k2(),[,gr]=ue.exports.useState(!1),mr=Xr=>{zt(Xr),yr.current===!1&&(gr(!1),Tt(Xr))},gt=Xr=>{Ee||xe(Xr.currentTarget),Ht(Xr),yr.current===!0&&(gr(!0),Lt(Xr))},Pr=Xr=>{_t.current=!0;const _n=V.props;_n.onTouchStart&&_n.onTouchStart(Xr)},kr=Lt,ai=Tt,$r=Xr=>{Pr(Xr),clearTimeout(ye.current),clearTimeout(Ut.current),pe(),de.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",me.current=setTimeout(()=>{document.body.style.WebkitUserSelect=de.current,Lt(Xr)},w)},Hr=Xr=>{V.props.onTouchEnd&&V.props.onTouchEnd(Xr),pe(),clearTimeout(ye.current),ye.current=setTimeout(()=>{Gt(Xr)},b)};ue.exports.useEffect(()=>{if(!F)return;function Xr(_n){(_n.key==="Escape"||_n.key==="Esc")&&Gt(_n)}return document.addEventListener("keydown",Xr),()=>{document.removeEventListener("keydown",Xr)}},[Gt,F]);const Ti=ea(V.ref,On,xe,r);!Ke&&Ke!==0&&(F=!1);const Wr=ue.exports.useRef({x:0,y:0}),Dr=ue.exports.useRef(),ho=Xr=>{const _n=V.props;_n.onMouseMove&&_n.onMouseMove(Xr),Wr.current={x:Xr.clientX,y:Xr.clientY},Dr.current&&Dr.current.update()},fe={},Me=typeof Ke=="string";h?(fe.title=!F&&Me&&!v?Ke:null,fe["aria-describedby"]=F?ie:null):(fe["aria-label"]=Me?Ke:null,fe["aria-labelledby"]=F&&!Me?ie:null);const Be=He({},fe,ae,V.props,{className:vn(ae.className,V.props.className),onTouchStart:Pr,ref:Ti},d?{onMouseMove:ho}:{}),J={};f||(Be.onTouchStart=$r,Be.onTouchEnd=Hr),v||(Be.onMouseOver=P1(kr,Be.onMouseOver),Be.onMouseLeave=P1(ai,Be.onMouseLeave),Pt||(J.onMouseOver=kr,J.onMouseLeave=ai)),g||(Be.onFocus=P1(gt,Be.onFocus),Be.onBlur=P1(mr,Be.onBlur),Pt||(J.onFocus=gt,J.onBlur=mr));const Te=ue.exports.useMemo(()=>{var Xr;let _n=[{name:"arrow",enabled:Boolean(ut),options:{element:ut,padding:4}}];return(Xr=De.popperOptions)!=null&&Xr.modifiers&&(_n=_n.concat(De.popperOptions.modifiers)),He({},De.popperOptions,{modifiers:_n})},[ut,De]),Zt=He({},Z,{isRtl:Nt,arrow:ee,disableInteractive:Pt,placement:je,PopperComponentProp:Vt,touch:_t.current}),Et=Sfe(Zt),Kt=(n=(a=wt.popper)!=null?a:te.Popper)!=null?n:Efe,Lr=(o=(s=(l=wt.transition)!=null?l:te.Transition)!=null?s:ht)!=null?o:H4,Ur=(c=(p=wt.tooltip)!=null?p:te.Tooltip)!=null?c:Cfe,Ar=(m=(_=wt.arrow)!=null?_:te.Arrow)!=null?m:Mfe,Qn=Zg(Kt,He({},De,(T=Fe.popper)!=null?T:R.popper,{className:vn(Et.popper,De?.className,(O=(A=Fe.popper)!=null?A:R.popper)==null?void 0:O.className)}),Zt),an=Zg(Lr,He({},dr,(M=Fe.transition)!=null?M:R.transition),Zt),wn=Zg(Ur,He({},(B=Fe.tooltip)!=null?B:R.tooltip,{className:vn(Et.tooltip,(L=(U=Fe.tooltip)!=null?U:R.tooltip)==null?void 0:L.className)}),Zt),Pn=Zg(Ar,He({},(D=Fe.arrow)!=null?D:R.arrow,{className:vn(Et.arrow,(Y=(q=Fe.arrow)!=null?q:R.arrow)==null?void 0:Y.className)}),Zt);return $t(ue.exports.Fragment,{children:[ue.exports.cloneElement(V,Be),ne(Kt,He({as:Vt??sD,placement:je,anchorEl:d?{getBoundingClientRect:()=>({top:Wr.current.y,left:Wr.current.x,right:Wr.current.x,bottom:Wr.current.y,width:0,height:0})}:Ee,popperRef:Dr,open:Ee?F:!1,id:ie,transition:!0},J,Qn,{popperOptions:Te,children:({TransitionProps:Xr})=>ne(Lr,He({timeout:Ve.transitions.duration.shorter},Xr,an,{children:$t(Ur,He({},wn,{children:[Ke,ee?ne(Ar,He({},Pn,{ref:st})):null]}))}))}))]})}),PD=kfe;function Rfe(e){return gi("MuiSwitch",e)}const Afe=oi("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Es=Afe,Tfe=["className","color","edge","size","sx"],Ife=e=>{const{classes:t,edge:r,size:n,color:a,checked:o,disabled:s}=e,l={root:["root",r&&`edge${Qr(r)}`,`size${Qr(n)}`],switchBase:["switchBase",`color${Qr(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=wi(l,Rfe,t);return He({},t,c)},Pfe=ur("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${Qr(r.edge)}`],t[`size${Qr(r.size)}`]]}})(({ownerState:e})=>He({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,[`& .${Es.thumb}`]:{width:16,height:16},[`& .${Es.switchBase}`]:{padding:4,[`&.${Es.checked}`]:{transform:"translateX(16px)"}}})),Ofe=ur(ele,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${Es.input}`]:t.input},r.color!=="default"&&t[`color${Qr(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}),[`&.${Es.checked}`]:{transform:"translateX(20px)"},[`&.${Es.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Es.checked} + .${Es.track}`]:{opacity:.5},[`&.${Es.disabled} + .${Es.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Es.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>He({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:oo(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${Es.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})`:oo(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Es.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Q2(e.palette[t.color].main,.62):X2(e.palette[t.color].main,.55)}`}},[`&.${Es.checked} + .${Es.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),Bfe=ur("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}`})),Ufe=ur("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%"})),Nfe=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:l="medium",sx:c}=n,p=Mn(n,Tfe),m=He({},n,{color:o,edge:s,size:l}),_=Ife(m),T=ne(Ufe,{className:_.thumb,ownerState:m});return $t(Pfe,{className:vn(_.root,a),sx:c,ownerState:m,children:[ne(Ofe,He({type:"checkbox",icon:T,checkedIcon:T,ref:r,ownerState:m},p,{classes:He({},_,{root:_.switchBase})})),ne(Bfe,{className:_.track,ownerState:m})]})}),Lfe=Nfe;function Dfe(e){return gi("MuiTab",e)}const $fe=oi("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),hd=$fe,Ffe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],jfe=e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:a,icon:o,label:s,selected:l,disabled:c}=e,p={root:["root",o&&s&&"labelIcon",`textColor${Qr(r)}`,n&&"fullWidth",a&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return wi(p,Dfe,t)},Wfe=ur($f,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${Qr(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>He({},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,[`& > .${hd.iconWrapper}`]:He({},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,[`&.${hd.selected}`]:{opacity:1},[`&.${hd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${hd.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${hd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${hd.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${hd.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)})),zfe=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTab"}),{className:a,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:p="top",indicator:m,label:_,onChange:T,onClick:O,onFocus:A,selected:M,selectionFollowsFocus:B,textColor:L="inherit",value:U,wrapped:D=!1}=n,Y=Mn(n,Ffe),q=He({},n,{disabled:o,disableFocusRipple:s,selected:M,icon:!!c,iconPosition:p,label:!!_,fullWidth:l,textColor:L,wrapped:D}),Z=jfe(q),ee=c&&_&&ue.exports.isValidElement(c)?ue.exports.cloneElement(c,{className:vn(Z.iconWrapper,c.props.className)}):c,V=R=>{!M&&T&&T(R,U),O&&O(R)},te=R=>{B&&!M&&T&&T(R,U),A&&A(R)};return $t(Wfe,He({focusRipple:!s,className:vn(Z.root,a),ref:r,role:"tab","aria-selected":M,disabled:o,onClick:V,onFocus:te,ownerState:q,tabIndex:M?0:-1},Y,{children:[p==="top"||p==="start"?$t(ue.exports.Fragment,{children:[ee,_]}):$t(ue.exports.Fragment,{children:[_,ee]}),m]}))}),m5=zfe,Hfe=ue.exports.createContext(),OD=Hfe;function qfe(e){return gi("MuiTable",e)}oi("MuiTable",["root","stickyHeader"]);const Kfe=["className","component","padding","size","stickyHeader"],Vfe=e=>{const{classes:t,stickyHeader:r}=e;return wi({root:["root",r&&"stickyHeader"]},qfe,t)},Gfe=ur("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>He({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":He({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),sP="table",Yfe=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTable"}),{className:a,component:o=sP,padding:s="normal",size:l="medium",stickyHeader:c=!1}=n,p=Mn(n,Kfe),m=He({},n,{component:o,padding:s,size:l,stickyHeader:c}),_=Vfe(m),T=ue.exports.useMemo(()=>({padding:s,size:l,stickyHeader:c}),[s,l,c]);return ne(OD.Provider,{value:T,children:ne(Gfe,He({as:o,role:o===sP?null:"table",ref:r,className:vn(_.root,a),ownerState:m},p))})}),WC=Yfe,Xfe=ue.exports.createContext(),cx=Xfe;function Qfe(e){return gi("MuiTableBody",e)}oi("MuiTableBody",["root"]);const Zfe=["className","component"],Jfe=e=>{const{classes:t}=e;return wi({root:["root"]},Qfe,t)},ede=ur("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),tde={variant:"body"},lP="tbody",rde=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTableBody"}),{className:a,component:o=lP}=n,s=Mn(n,Zfe),l=He({},n,{component:o}),c=Jfe(l);return ne(cx.Provider,{value:tde,children:ne(ede,He({className:vn(c.root,a),as:o,ref:r,role:o===lP?null:"rowgroup",ownerState:l},s))})}),zC=rde;function nde(e){return gi("MuiTableCell",e)}const ide=oi("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ode=ide,ade=["align","className","component","padding","scope","size","sortDirection","variant"],sde=e=>{const{classes:t,variant:r,align:n,padding:a,size:o,stickyHeader:s}=e,l={root:["root",r,s&&"stickyHeader",n!=="inherit"&&`align${Qr(n)}`,a!=="normal"&&`padding${Qr(a)}`,`size${Qr(o)}`]};return wi(l,nde,t)},lde=ur("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${Qr(r.size)}`],r.padding!=="normal"&&t[`padding${Qr(r.padding)}`],r.align!=="inherit"&&t[`align${Qr(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>He({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?Q2(oo(e.palette.divider,1),.88):X2(oo(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",[`&.${ode.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})),ude=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTableCell"}),{align:a="inherit",className:o,component:s,padding:l,scope:c,size:p,sortDirection:m,variant:_}=n,T=Mn(n,ade),O=ue.exports.useContext(OD),A=ue.exports.useContext(cx),M=A&&A.variant==="head";let B;s?B=s:B=M?"th":"td";let L=c;B==="td"?L=void 0:!L&&M&&(L="col");const U=_||A&&A.variant,D=He({},n,{align:a,component:B,padding:l||(O&&O.padding?O.padding:"normal"),size:p||(O&&O.size?O.size:"medium"),sortDirection:m,stickyHeader:U==="head"&&O&&O.stickyHeader,variant:U}),Y=sde(D);let q=null;return m&&(q=m==="asc"?"ascending":"descending"),ne(lde,He({as:B,ref:r,className:vn(Y.root,o),"aria-sort":q,scope:L,ownerState:D},T))}),HC=ude;function cde(e){return gi("MuiTableContainer",e)}oi("MuiTableContainer",["root"]);const fde=["className","component"],dde=e=>{const{classes:t}=e;return wi({root:["root"]},cde,t)},hde=ur("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),pde=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTableContainer"}),{className:a,component:o="div"}=n,s=Mn(n,fde),l=He({},n,{component:o}),c=dde(l);return ne(hde,He({ref:r,as:o,className:vn(c.root,a),ownerState:l},s))}),gde=pde;function mde(e){return gi("MuiTableHead",e)}oi("MuiTableHead",["root"]);const vde=["className","component"],yde=e=>{const{classes:t}=e;return wi({root:["root"]},mde,t)},bde=ur("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),wde={variant:"head"},uP="thead",xde=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTableHead"}),{className:a,component:o=uP}=n,s=Mn(n,vde),l=He({},n,{component:o}),c=yde(l);return ne(cx.Provider,{value:wde,children:ne(bde,He({as:o,className:vn(c.root,a),ref:r,role:o===uP?null:"rowgroup",ownerState:l},s))})}),BD=xde,_de=Fv(ne("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Sde=Fv(ne("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Ede(e){return gi("MuiTableRow",e)}const Cde=oi("MuiTableRow",["root","selected","hover","head","footer"]),cP=Cde,Mde=["className","component","hover","selected"],kde=e=>{const{classes:t,selected:r,hover:n,head:a,footer:o}=e;return wi({root:["root",r&&"selected",n&&"hover",a&&"head",o&&"footer"]},Ede,t)},Rde=ur("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,[`&.${cP.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${cP.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:oo(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}))`:oo(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),fP="tr",Ade=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTableRow"}),{className:a,component:o=fP,hover:s=!1,selected:l=!1}=n,c=Mn(n,Mde),p=ue.exports.useContext(cx),m=He({},n,{component:o,hover:s,selected:l,head:p&&p.variant==="head",footer:p&&p.variant==="footer"}),_=kde(m);return ne(Rde,He({as:o,ref:r,className:vn(_.root,a),role:o===fP?null:"row",ownerState:m},c))}),Oc=Ade;function Tde(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Ide(e,t,r,n={},a=()=>{}){const{ease:o=Tde,duration:s=300}=n;let l=null;const c=t[e];let p=!1;const m=()=>{p=!0},_=T=>{if(p){a(new Error("Animation cancelled"));return}l===null&&(l=T);const O=Math.min(1,(T-l)/s);if(t[e]=o(O)*(r-c)+c,O>=1){requestAnimationFrame(()=>{a(null)});return}requestAnimationFrame(_)};return c===r?(a(new Error("Element already at target position")),m):(requestAnimationFrame(_),m)}const Pde=["onChange"],Ode={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Bde(e){const{onChange:t}=e,r=Mn(e,Pde),n=ue.exports.useRef(),a=ue.exports.useRef(null),o=()=>{n.current=a.current.offsetHeight-a.current.clientHeight};return ue.exports.useEffect(()=>{const s=Zd(()=>{const c=n.current;o(),c!==n.current&&t(n.current)}),l=$l(a.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),ue.exports.useEffect(()=>{o(),t(n.current)},[t]),ne("div",He({style:Ode,ref:a},r))}function Ude(e){return gi("MuiTabScrollButton",e)}const Nde=oi("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Lde=Nde;var dP,hP;const Dde=["className","direction","orientation","disabled"],$de=e=>{const{classes:t,orientation:r,disabled:n}=e;return wi({root:["root",r,n&&"disabled"]},Ude,t)},Fde=ur($f,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>He({width:40,flexShrink:0,opacity:.8,[`&.${Lde.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),jde=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTabScrollButton"}),{className:a,direction:o}=n,s=Mn(n,Dde),c=_a().direction==="rtl",p=He({isRtl:c},n),m=$de(p);return ne(Fde,He({component:"div",className:vn(m.root,a),ref:r,role:null,ownerState:p,tabIndex:null},s,{children:o==="left"?dP||(dP=ne(_de,{fontSize:"small"})):hP||(hP=ne(Sde,{fontSize:"small"}))}))}),Wde=jde;function zde(e){return gi("MuiTabs",e)}const Hde=oi("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),v5=Hde,qde=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],pP=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,gP=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,O1=(e,t,r)=>{let n=!1,a=r(e,t);for(;a;){if(a===e.firstChild){if(n)return;n=!0}const o=a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||o)a=r(e,a);else{a.focus();return}}},Kde=e=>{const{vertical:t,fixed:r,hideScrollbar:n,scrollableX:a,scrollableY:o,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return wi({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",a&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[a&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},zde,c)},Vde=ur("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${v5.scrollButtons}`]:t.scrollButtons},{[`& .${v5.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>He({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${v5.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Gde=ur("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})=>He({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"})),Yde=ur("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})=>He({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Xde=ur("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>He({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})),Qde=ur(Bde,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),mP={},Zde=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTabs"}),a=_a(),o=a.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:p=!1,children:m,className:_,component:T="div",allowScrollButtonsMobile:O=!1,indicatorColor:A="primary",onChange:M,orientation:B="horizontal",ScrollButtonComponent:L=Wde,scrollButtons:U="auto",selectionFollowsFocus:D,TabIndicatorProps:Y={},TabScrollButtonProps:q={},textColor:Z="primary",value:ee,variant:V="standard",visibleScrollbar:te=!1}=n,R=Mn(n,qde),h=V==="scrollable",g=B==="vertical",v=g?"scrollTop":"scrollLeft",u=g?"top":"left",f=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=g?"height":"width",w=He({},n,{component:T,allowScrollButtonsMobile:O,indicatorColor:A,orientation:B,vertical:g,scrollButtons:U,textColor:Z,variant:V,visibleScrollbar:te,fixed:!h,hideScrollbar:h&&!te,scrollableX:h&&!g,scrollableY:h&&g,centered:p&&!h,scrollButtonsHideMobile:!O}),d=Kde(w),[I,$]=ue.exports.useState(!1),[b,X]=ue.exports.useState(mP),[we,Ae]=ue.exports.useState({start:!1,end:!1}),[je,Vt]=ue.exports.useState({overflow:"hidden",scrollbarWidth:0}),De=new Map,Fe=ue.exports.useRef(null),wt=ue.exports.useRef(null),Ke=()=>{const j=Fe.current;let F;if(j){const de=j.getBoundingClientRect();F={clientWidth:j.clientWidth,scrollLeft:j.scrollLeft,scrollTop:j.scrollTop,scrollLeftNormalized:XT(j,a.direction),scrollWidth:j.scrollWidth,top:de.top,bottom:de.bottom,left:de.left,right:de.right}}let ie;if(j&&ee!==!1){const de=wt.current.children;if(de.length>0){const pe=de[De.get(ee)];ie=pe?pe.getBoundingClientRect():null}}return{tabsMeta:F,tabMeta:ie}},ht=Il(()=>{const{tabsMeta:j,tabMeta:F}=Ke();let ie=0,de;if(g)de="top",F&&j&&(ie=F.top-j.top+j.scrollTop);else if(de=o?"right":"left",F&&j){const be=o?j.scrollLeftNormalized+j.clientWidth-j.scrollWidth:j.scrollLeft;ie=(o?-1:1)*(F[de]-j[de]+be)}const pe={[de]:ie,[S]:F?F[S]:0};if(isNaN(b[de])||isNaN(b[S]))X(pe);else{const be=Math.abs(b[de]-pe[de]),Gt=Math.abs(b[S]-pe[S]);(be>=1||Gt>=1)&&X(pe)}}),dr=(j,{animation:F=!0}={})=>{F?Ide(v,Fe.current,j,{duration:a.transitions.duration.standard}):Fe.current[v]=j},ae=j=>{let F=Fe.current[v];g?F+=j:(F+=j*(o?-1:1),F*=o&&mL()==="reverse"?-1:1),dr(F)},Ve=()=>{const j=Fe.current[y];let F=0;const ie=Array.from(wt.current.children);for(let de=0;dej){de===0&&(F=j);break}F+=pe[y]}return F},Nt=()=>{ae(-1*Ve())},Ee=()=>{ae(Ve())},xe=ue.exports.useCallback(j=>{Vt({overflow:null,scrollbarWidth:j})},[]),ut=()=>{const j={};j.scrollbarSizeListener=h?ne(Qde,{onChange:xe,className:vn(d.scrollableX,d.hideScrollbar)}):null;const F=we.start||we.end,ie=h&&(U==="auto"&&F||U===!0);return j.scrollButtonStart=ie?ne(L,He({orientation:B,direction:o?"right":"left",onClick:Nt,disabled:!we.start},q,{className:vn(d.scrollButtons,q.className)})):null,j.scrollButtonEnd=ie?ne(L,He({orientation:B,direction:o?"left":"right",onClick:Ee,disabled:!we.end},q,{className:vn(d.scrollButtons,q.className)})):null,j},st=Il(j=>{const{tabsMeta:F,tabMeta:ie}=Ke();if(!(!ie||!F)){if(ie[u]F[f]){const de=F[v]+(ie[f]-F[f]);dr(de,{animation:j})}}}),_t=Il(()=>{if(h&&U!==!1){const{scrollTop:j,scrollHeight:F,clientHeight:ie,scrollWidth:de,clientWidth:pe}=Fe.current;let be,Gt;if(g)be=j>1,Gt=j1,Gt=o?Lt>1:Lt{const j=Zd(()=>{Fe.current&&(ht(),_t())}),F=$l(Fe.current);F.addEventListener("resize",j);let ie;return typeof ResizeObserver<"u"&&(ie=new ResizeObserver(j),Array.from(wt.current.children).forEach(de=>{ie.observe(de)})),()=>{j.clear(),F.removeEventListener("resize",j),ie&&ie.disconnect()}},[ht,_t]);const Pt=ue.exports.useMemo(()=>Zd(()=>{_t()}),[_t]);ue.exports.useEffect(()=>()=>{Pt.clear()},[Pt]),ue.exports.useEffect(()=>{$(!0)},[]),ue.exports.useEffect(()=>{ht(),_t()}),ue.exports.useEffect(()=>{st(mP!==b)},[st,b]),ue.exports.useImperativeHandle(c,()=>({updateIndicator:ht,updateScrollButtons:_t}),[ht,_t]);const Ut=ne(Xde,He({},Y,{className:vn(d.indicator,Y.className),ownerState:w,style:He({},b,Y.style)}));let ve=0;const ye=ue.exports.Children.map(m,j=>{if(!ue.exports.isValidElement(j))return null;const F=j.props.value===void 0?ve:j.props.value;De.set(F,ve);const ie=F===ee;return ve+=1,ue.exports.cloneElement(j,He({fullWidth:V==="fullWidth",indicator:ie&&!I&&Ut,selected:ie,selectionFollowsFocus:D,onChange:M,textColor:Z,value:F},ve===1&&ee===!1&&!j.props.tabIndex?{tabIndex:0}:{}))}),me=j=>{const F=wt.current,ie=Ra(F).activeElement;if(ie.getAttribute("role")!=="tab")return;let pe=B==="horizontal"?"ArrowLeft":"ArrowUp",be=B==="horizontal"?"ArrowRight":"ArrowDown";switch(B==="horizontal"&&o&&(pe="ArrowRight",be="ArrowLeft"),j.key){case pe:j.preventDefault(),O1(F,ie,gP);break;case be:j.preventDefault(),O1(F,ie,pP);break;case"Home":j.preventDefault(),O1(F,null,pP);break;case"End":j.preventDefault(),O1(F,null,gP);break}},Q=ut();return $t(Vde,He({className:vn(d.root,_),ownerState:w,ref:r,as:T},R,{children:[Q.scrollButtonStart,Q.scrollbarSizeListener,$t(Gde,{className:d.scroller,ownerState:w,style:{overflow:je.overflow,[g?`margin${o?"Left":"Right"}`:"marginBottom"]:te?void 0:-je.scrollbarWidth},ref:Fe,onScroll:Pt,children:[ne(Yde,{"aria-label":s,"aria-labelledby":l,"aria-orientation":B==="vertical"?"vertical":null,className:d.flexContainer,ownerState:w,onKeyDown:me,ref:wt,role:"tablist",children:ye}),I&&Ut]}),Q.scrollButtonEnd]}))}),UD=Zde;function Jde(e){return gi("MuiTextField",e)}oi("MuiTextField",["root"]);const ehe=["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"],the={standard:SD,filled:vD,outlined:AD},rhe=e=>{const{classes:t}=e;return wi({root:["root"]},Jde,t)},nhe=ur(yD,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ihe=ue.exports.forwardRef(function(t,r){const n=Si({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:o=!1,children:s,className:l,color:c="primary",defaultValue:p,disabled:m=!1,error:_=!1,FormHelperTextProps:T,fullWidth:O=!1,helperText:A,id:M,InputLabelProps:B,inputProps:L,InputProps:U,inputRef:D,label:Y,maxRows:q,minRows:Z,multiline:ee=!1,name:V,onBlur:te,onChange:R,onFocus:h,placeholder:g,required:v=!1,rows:u,select:f=!1,SelectProps:y,type:S,value:w,variant:d="outlined"}=n,I=Mn(n,ehe),$=He({},n,{autoFocus:o,color:c,disabled:m,error:_,fullWidth:O,multiline:ee,required:v,select:f,variant:d}),b=rhe($),X={};d==="outlined"&&(B&&typeof B.shrink<"u"&&(X.notched=B.shrink),X.label=Y),f&&((!y||!y.native)&&(X.id=void 0),X["aria-describedby"]=void 0);const we=C2(M),Ae=A&&we?`${we}-helper-text`:void 0,je=Y&&we?`${we}-label`:void 0,Vt=the[d],De=ne(Vt,He({"aria-describedby":Ae,autoComplete:a,autoFocus:o,defaultValue:p,fullWidth:O,multiline:ee,name:V,rows:u,maxRows:q,minRows:Z,type:S,value:w,id:we,inputRef:D,onBlur:te,onChange:R,onFocus:h,placeholder:g,inputProps:L},X,U));return $t(nhe,He({className:vn(b.root,l),disabled:m,error:_,fullWidth:O,ref:r,required:v,color:c,variant:d,ownerState:$},I,{children:[Y!=null&&Y!==""&&ne($ue,He({htmlFor:we,id:je},B,{children:Y})),f?ne(ID,He({"aria-describedby":Ae,id:we,labelId:je,value:w,input:De},y,{children:s})):De,A&&ne(yue,He({id:Ae},T,{children:A}))]}))}),jd=ihe,ND=1160,ohe=250,qC="https://github.com/orbs-network/ton-contract-verifier",ahe=ur(sx)(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}})),ns=({children:e,disabled:t,onClick:r,type:n="button",fontSize:a=14,fontWeight:o,transparent:s,background:l,hoverBackground:c,width:p,height:m,textColor:_})=>ne(ahe,{width:p,height:m,fontSize:a,fontWeight:o,transparent:s,background:l,textColor:_,hoverBackground:c,className:"base-button",type:n,onClick:r||(()=>{}),variant:s?"outlined":"contained",disabled:t,disableElevation:!0,children:e}),she="/assets/recent-search.82384f57.svg",Vn=ur(Tn)(()=>({display:"flex",alignItems:"center"})),h0=ur(Tn)({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"}),fx=ur(Vn)({padding:"30px 24px 0 24px"}),p0=ur(Vn)({marginRight:8}),Qf=ur(Fo)({fontSize:20,color:"#161C28",fontWeight:800}),lhe=ao(wa)(({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"}})),uhe=ao(wa)({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)"}}),che=({searchResults:e,onItemClick:t,onItemDelete:r,onHistoryClear:n})=>$t(lhe,{children:[e.map(a=>$t(uhe,{onClick:()=>t(a),children:[$t(Vn,{children:[ne(Vn,{mr:1.5,children:ne("img",{width:18,height:18,src:she,alt:"Search Icon"})}),ne(Fo,{children:a})]}),ne(gl,{onClick:o=>r(o,a),children:ne("img",{src:SC,alt:"Close Icon",width:16,height:16})})]})),ne(Vn,{mt:2,mb:1,ml:1,sx:{width:"fit-content"},children:ne(ns,{onClick:n,height:34,transparent:!0,children:"Clear History"})})]});function jc(){const e=Bv(),t=tC();return(r,n)=>{t(typeof r=="string"?{pathname:r,search:e.search,hash:e.hash}:r,n)}}function fhe(e,t,r){const n=document.createElement("a"),a=new Blob([e],{type:r});n.href=URL.createObjectURL(a),n.download=t,n.click()}const LD=[{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 dhe(){const e=([r,n,a])=>`[https://tonverifier.live/${n}] // ${r} ${a??""}`,t=["# Verified Examples"];LD.forEach(({category:r,contracts:n})=>{t.push(`## ${r}`),t.push(n.map(e).join(` - -`))}),fhe(t.join(` - -`),"examples.md","text/markdown")}function hhe(){const e=jc();return $t("div",{style:{position:"absolute",padding:20,background:"#000000",borderRadius:20,height:300,top:60,overflow:"auto"},children:[ne("div",{style:{display:"flex",alignItems:"center",gap:20},children:ne(sx,{variant:"contained",onClick:()=>{dhe()},children:"Download examples.md"})}),ne("br",{}),ne("div",{children:LD.map(({category:t,contracts:r})=>$t(No,{children:[ne("h2",{children:t}),ne("div",{style:{gap:20,display:"flex",textAlign:"center",flexWrap:"wrap"},children:r.sort((n,a)=>n[0].localeCompare(a[0])).map(([n,a])=>ne("div",{style:{color:"#50a7ea",cursor:"pointer",border:"1px solid #50a7ea",padding:"10px 20px",borderRadius:10},onClick:o=>{e(`/${a}`)},children:n},n))})]}))})]})}var y5={},cg={},ml={exports:{}};const phe={},ghe=Object.freeze(Object.defineProperty({__proto__:null,default:phe},Symbol.toStringTag,{value:"Module"})),Ud=wu(ghe);(function(e){(function(t,r){function n(v,u){if(!v)throw new Error(u||"Assertion failed")}function a(v,u){v.super_=u;var f=function(){};f.prototype=u.prototype,v.prototype=new f,v.prototype.constructor=v}function o(v,u,f){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((u==="le"||u==="be")&&(f=u,u=10),this._init(v||0,u||10,f||"be"))}typeof t=="object"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Ud.Buffer}catch{}o.isBN=function(u){return u instanceof o?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===o.wordSize&&Array.isArray(u.words)},o.max=function(u,f){return u.cmp(f)>0?u:f},o.min=function(u,f){return u.cmp(f)<0?u:f},o.prototype._init=function(u,f,y){if(typeof u=="number")return this._initNumber(u,f,y);if(typeof u=="object")return this._initArray(u,f,y);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),u=u.toString().replace(/\s+/g,"");var S=0;u[0]==="-"&&(S++,this.negative=1),S=0;S-=3)d=u[S]|u[S-1]<<8|u[S-2]<<16,this.words[w]|=d<>>26-I&67108863,I+=24,I>=26&&(I-=26,w++);else if(y==="le")for(S=0,w=0;S>>26-I&67108863,I+=24,I>=26&&(I-=26,w++);return this._strip()};function l(v,u){var f=v.charCodeAt(u);if(f>=48&&f<=57)return f-48;if(f>=65&&f<=70)return f-55;if(f>=97&&f<=102)return f-87;n(!1,"Invalid character in "+v)}function c(v,u,f){var y=l(v,f);return f-1>=u&&(y|=l(v,f-1)<<4),y}o.prototype._parseHex=function(u,f,y){this.length=Math.ceil((u.length-f)/6),this.words=new Array(this.length);for(var S=0;S=f;S-=2)I=c(u,f,S)<=18?(w-=18,d+=1,this.words[d]|=I>>>26):w+=8;else{var $=u.length-f;for(S=$%2===0?f+1:f;S=18?(w-=18,d+=1,this.words[d]|=I>>>26):w+=8}this._strip()};function p(v,u,f,y){for(var S=0,w=0,d=Math.min(v.length,f),I=u;I=49?w=$-49+10:$>=17?w=$-17+10:w=$,n($>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{o.prototype.inspect=_}else o.prototype.inspect=_;function _(){return(this.red?""}var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],O=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(u,f){u=u||10,f=f|0||1;var y;if(u===16||u==="hex"){y="";for(var S=0,w=0,d=0;d>>24-S&16777215,w!==0||d!==this.length-1?y=T[6-$.length]+$+y:y=$+y,S+=2,S>=26&&(S-=26,d--)}for(w!==0&&(y=w.toString(16)+y);y.length%f!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(u===(u|0)&&u>=2&&u<=36){var b=O[u],X=A[u];y="";var we=this.clone();for(we.negative=0;!we.isZero();){var Ae=we.modrn(X).toString(u);we=we.idivn(X),we.isZero()?y=Ae+y:y=T[b-Ae.length]+Ae+y}for(this.isZero()&&(y="0"+y);y.length%f!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(u,f){return this.toArrayLike(s,u,f)}),o.prototype.toArray=function(u,f){return this.toArrayLike(Array,u,f)};var M=function(u,f){return u.allocUnsafe?u.allocUnsafe(f):new u(f)};o.prototype.toArrayLike=function(u,f,y){this._strip();var S=this.byteLength(),w=y||Math.max(1,S);n(S<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var d=M(u,w),I=f==="le"?"LE":"BE";return this["_toArrayLike"+I](d,S),d},o.prototype._toArrayLikeLE=function(u,f){for(var y=0,S=0,w=0,d=0;w>8&255),y>16&255),d===6?(y>24&255),S=0,d=0):(S=I>>>24,d+=2)}if(y=0&&(u[y--]=I>>8&255),y>=0&&(u[y--]=I>>16&255),d===6?(y>=0&&(u[y--]=I>>24&255),S=0,d=0):(S=I>>>24,d+=2)}if(y>=0)for(u[y--]=S;y>=0;)u[y--]=0},Math.clz32?o.prototype._countBits=function(u){return 32-Math.clz32(u)}:o.prototype._countBits=function(u){var f=u,y=0;return f>=4096&&(y+=13,f>>>=13),f>=64&&(y+=7,f>>>=7),f>=8&&(y+=4,f>>>=4),f>=2&&(y+=2,f>>>=2),y+f},o.prototype._zeroBits=function(u){if(u===0)return 26;var f=u,y=0;return(f&8191)===0&&(y+=13,f>>>=13),(f&127)===0&&(y+=7,f>>>=7),(f&15)===0&&(y+=4,f>>>=4),(f&3)===0&&(y+=2,f>>>=2),(f&1)===0&&y++,y},o.prototype.bitLength=function(){var u=this.words[this.length-1],f=this._countBits(u);return(this.length-1)*26+f};function B(v){for(var u=new Array(v.bitLength()),f=0;f>>S&1}return u}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,f=0;fu.length?this.clone().ior(u):u.clone().ior(this)},o.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},o.prototype.iuand=function(u){var f;this.length>u.length?f=u:f=this;for(var y=0;yu.length?this.clone().iand(u):u.clone().iand(this)},o.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},o.prototype.iuxor=function(u){var f,y;this.length>u.length?(f=this,y=u):(f=u,y=this);for(var S=0;Su.length?this.clone().ixor(u):u.clone().ixor(this)},o.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},o.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var f=Math.ceil(u/26)|0,y=u%26;this._expand(f),y>0&&f--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-y),this._strip()},o.prototype.notn=function(u){return this.clone().inotn(u)},o.prototype.setn=function(u,f){n(typeof u=="number"&&u>=0);var y=u/26|0,S=u%26;return this._expand(y+1),f?this.words[y]=this.words[y]|1<u.length?(y=this,S=u):(y=u,S=this);for(var w=0,d=0;d>>26;for(;w!==0&&d>>26;if(this.length=y.length,w!==0)this.words[this.length]=w,this.length++;else if(y!==this)for(;du.length?this.clone().iadd(u):u.clone().iadd(this)},o.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var f=this.iadd(u);return u.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var y=this.cmp(u);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,w;y>0?(S=this,w=u):(S=u,w=this);for(var d=0,I=0;I>26,this.words[I]=f&67108863;for(;d!==0&&I>26,this.words[I]=f&67108863;if(d===0&&I>>26,we=$&67108863,Ae=Math.min(b,u.length-1),je=Math.max(0,b-v.length+1);je<=Ae;je++){var Vt=b-je|0;S=v.words[Vt]|0,w=u.words[je]|0,d=S*w+we,X+=d/67108864|0,we=d&67108863}f.words[b]=we|0,$=X|0}return $!==0?f.words[b]=$|0:f.length--,f._strip()}var U=function(u,f,y){var S=u.words,w=f.words,d=y.words,I=0,$,b,X,we=S[0]|0,Ae=we&8191,je=we>>>13,Vt=S[1]|0,De=Vt&8191,Fe=Vt>>>13,wt=S[2]|0,Ke=wt&8191,ht=wt>>>13,dr=S[3]|0,ae=dr&8191,Ve=dr>>>13,Nt=S[4]|0,Ee=Nt&8191,xe=Nt>>>13,ut=S[5]|0,st=ut&8191,_t=ut>>>13,Pt=S[6]|0,Ut=Pt&8191,ve=Pt>>>13,ye=S[7]|0,me=ye&8191,Q=ye>>>13,j=S[8]|0,F=j&8191,ie=j>>>13,de=S[9]|0,pe=de&8191,be=de>>>13,Gt=w[0]|0,Lt=Gt&8191,Tt=Gt>>>13,yr=w[1]|0,zt=yr&8191,Ht=yr>>>13,On=w[2]|0,gr=On&8191,mr=On>>>13,gt=w[3]|0,Pr=gt&8191,kr=gt>>>13,ai=w[4]|0,$r=ai&8191,Hr=ai>>>13,Ti=w[5]|0,Wr=Ti&8191,Dr=Ti>>>13,ho=w[6]|0,fe=ho&8191,Me=ho>>>13,Be=w[7]|0,J=Be&8191,Te=Be>>>13,Zt=w[8]|0,Et=Zt&8191,Kt=Zt>>>13,Lr=w[9]|0,Ur=Lr&8191,Ar=Lr>>>13;y.negative=u.negative^f.negative,y.length=19,$=Math.imul(Ae,Lt),b=Math.imul(Ae,Tt),b=b+Math.imul(je,Lt)|0,X=Math.imul(je,Tt);var Qn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,$=Math.imul(De,Lt),b=Math.imul(De,Tt),b=b+Math.imul(Fe,Lt)|0,X=Math.imul(Fe,Tt),$=$+Math.imul(Ae,zt)|0,b=b+Math.imul(Ae,Ht)|0,b=b+Math.imul(je,zt)|0,X=X+Math.imul(je,Ht)|0;var an=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(an>>>26)|0,an&=67108863,$=Math.imul(Ke,Lt),b=Math.imul(Ke,Tt),b=b+Math.imul(ht,Lt)|0,X=Math.imul(ht,Tt),$=$+Math.imul(De,zt)|0,b=b+Math.imul(De,Ht)|0,b=b+Math.imul(Fe,zt)|0,X=X+Math.imul(Fe,Ht)|0,$=$+Math.imul(Ae,gr)|0,b=b+Math.imul(Ae,mr)|0,b=b+Math.imul(je,gr)|0,X=X+Math.imul(je,mr)|0;var wn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,$=Math.imul(ae,Lt),b=Math.imul(ae,Tt),b=b+Math.imul(Ve,Lt)|0,X=Math.imul(Ve,Tt),$=$+Math.imul(Ke,zt)|0,b=b+Math.imul(Ke,Ht)|0,b=b+Math.imul(ht,zt)|0,X=X+Math.imul(ht,Ht)|0,$=$+Math.imul(De,gr)|0,b=b+Math.imul(De,mr)|0,b=b+Math.imul(Fe,gr)|0,X=X+Math.imul(Fe,mr)|0,$=$+Math.imul(Ae,Pr)|0,b=b+Math.imul(Ae,kr)|0,b=b+Math.imul(je,Pr)|0,X=X+Math.imul(je,kr)|0;var Pn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,$=Math.imul(Ee,Lt),b=Math.imul(Ee,Tt),b=b+Math.imul(xe,Lt)|0,X=Math.imul(xe,Tt),$=$+Math.imul(ae,zt)|0,b=b+Math.imul(ae,Ht)|0,b=b+Math.imul(Ve,zt)|0,X=X+Math.imul(Ve,Ht)|0,$=$+Math.imul(Ke,gr)|0,b=b+Math.imul(Ke,mr)|0,b=b+Math.imul(ht,gr)|0,X=X+Math.imul(ht,mr)|0,$=$+Math.imul(De,Pr)|0,b=b+Math.imul(De,kr)|0,b=b+Math.imul(Fe,Pr)|0,X=X+Math.imul(Fe,kr)|0,$=$+Math.imul(Ae,$r)|0,b=b+Math.imul(Ae,Hr)|0,b=b+Math.imul(je,$r)|0,X=X+Math.imul(je,Hr)|0;var Xr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,$=Math.imul(st,Lt),b=Math.imul(st,Tt),b=b+Math.imul(_t,Lt)|0,X=Math.imul(_t,Tt),$=$+Math.imul(Ee,zt)|0,b=b+Math.imul(Ee,Ht)|0,b=b+Math.imul(xe,zt)|0,X=X+Math.imul(xe,Ht)|0,$=$+Math.imul(ae,gr)|0,b=b+Math.imul(ae,mr)|0,b=b+Math.imul(Ve,gr)|0,X=X+Math.imul(Ve,mr)|0,$=$+Math.imul(Ke,Pr)|0,b=b+Math.imul(Ke,kr)|0,b=b+Math.imul(ht,Pr)|0,X=X+Math.imul(ht,kr)|0,$=$+Math.imul(De,$r)|0,b=b+Math.imul(De,Hr)|0,b=b+Math.imul(Fe,$r)|0,X=X+Math.imul(Fe,Hr)|0,$=$+Math.imul(Ae,Wr)|0,b=b+Math.imul(Ae,Dr)|0,b=b+Math.imul(je,Wr)|0,X=X+Math.imul(je,Dr)|0;var _n=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(_n>>>26)|0,_n&=67108863,$=Math.imul(Ut,Lt),b=Math.imul(Ut,Tt),b=b+Math.imul(ve,Lt)|0,X=Math.imul(ve,Tt),$=$+Math.imul(st,zt)|0,b=b+Math.imul(st,Ht)|0,b=b+Math.imul(_t,zt)|0,X=X+Math.imul(_t,Ht)|0,$=$+Math.imul(Ee,gr)|0,b=b+Math.imul(Ee,mr)|0,b=b+Math.imul(xe,gr)|0,X=X+Math.imul(xe,mr)|0,$=$+Math.imul(ae,Pr)|0,b=b+Math.imul(ae,kr)|0,b=b+Math.imul(Ve,Pr)|0,X=X+Math.imul(Ve,kr)|0,$=$+Math.imul(Ke,$r)|0,b=b+Math.imul(Ke,Hr)|0,b=b+Math.imul(ht,$r)|0,X=X+Math.imul(ht,Hr)|0,$=$+Math.imul(De,Wr)|0,b=b+Math.imul(De,Dr)|0,b=b+Math.imul(Fe,Wr)|0,X=X+Math.imul(Fe,Dr)|0,$=$+Math.imul(Ae,fe)|0,b=b+Math.imul(Ae,Me)|0,b=b+Math.imul(je,fe)|0,X=X+Math.imul(je,Me)|0;var Dn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,$=Math.imul(me,Lt),b=Math.imul(me,Tt),b=b+Math.imul(Q,Lt)|0,X=Math.imul(Q,Tt),$=$+Math.imul(Ut,zt)|0,b=b+Math.imul(Ut,Ht)|0,b=b+Math.imul(ve,zt)|0,X=X+Math.imul(ve,Ht)|0,$=$+Math.imul(st,gr)|0,b=b+Math.imul(st,mr)|0,b=b+Math.imul(_t,gr)|0,X=X+Math.imul(_t,mr)|0,$=$+Math.imul(Ee,Pr)|0,b=b+Math.imul(Ee,kr)|0,b=b+Math.imul(xe,Pr)|0,X=X+Math.imul(xe,kr)|0,$=$+Math.imul(ae,$r)|0,b=b+Math.imul(ae,Hr)|0,b=b+Math.imul(Ve,$r)|0,X=X+Math.imul(Ve,Hr)|0,$=$+Math.imul(Ke,Wr)|0,b=b+Math.imul(Ke,Dr)|0,b=b+Math.imul(ht,Wr)|0,X=X+Math.imul(ht,Dr)|0,$=$+Math.imul(De,fe)|0,b=b+Math.imul(De,Me)|0,b=b+Math.imul(Fe,fe)|0,X=X+Math.imul(Fe,Me)|0,$=$+Math.imul(Ae,J)|0,b=b+Math.imul(Ae,Te)|0,b=b+Math.imul(je,J)|0,X=X+Math.imul(je,Te)|0;var Bn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,$=Math.imul(F,Lt),b=Math.imul(F,Tt),b=b+Math.imul(ie,Lt)|0,X=Math.imul(ie,Tt),$=$+Math.imul(me,zt)|0,b=b+Math.imul(me,Ht)|0,b=b+Math.imul(Q,zt)|0,X=X+Math.imul(Q,Ht)|0,$=$+Math.imul(Ut,gr)|0,b=b+Math.imul(Ut,mr)|0,b=b+Math.imul(ve,gr)|0,X=X+Math.imul(ve,mr)|0,$=$+Math.imul(st,Pr)|0,b=b+Math.imul(st,kr)|0,b=b+Math.imul(_t,Pr)|0,X=X+Math.imul(_t,kr)|0,$=$+Math.imul(Ee,$r)|0,b=b+Math.imul(Ee,Hr)|0,b=b+Math.imul(xe,$r)|0,X=X+Math.imul(xe,Hr)|0,$=$+Math.imul(ae,Wr)|0,b=b+Math.imul(ae,Dr)|0,b=b+Math.imul(Ve,Wr)|0,X=X+Math.imul(Ve,Dr)|0,$=$+Math.imul(Ke,fe)|0,b=b+Math.imul(Ke,Me)|0,b=b+Math.imul(ht,fe)|0,X=X+Math.imul(ht,Me)|0,$=$+Math.imul(De,J)|0,b=b+Math.imul(De,Te)|0,b=b+Math.imul(Fe,J)|0,X=X+Math.imul(Fe,Te)|0,$=$+Math.imul(Ae,Et)|0,b=b+Math.imul(Ae,Kt)|0,b=b+Math.imul(je,Et)|0,X=X+Math.imul(je,Kt)|0;var dn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(dn>>>26)|0,dn&=67108863,$=Math.imul(pe,Lt),b=Math.imul(pe,Tt),b=b+Math.imul(be,Lt)|0,X=Math.imul(be,Tt),$=$+Math.imul(F,zt)|0,b=b+Math.imul(F,Ht)|0,b=b+Math.imul(ie,zt)|0,X=X+Math.imul(ie,Ht)|0,$=$+Math.imul(me,gr)|0,b=b+Math.imul(me,mr)|0,b=b+Math.imul(Q,gr)|0,X=X+Math.imul(Q,mr)|0,$=$+Math.imul(Ut,Pr)|0,b=b+Math.imul(Ut,kr)|0,b=b+Math.imul(ve,Pr)|0,X=X+Math.imul(ve,kr)|0,$=$+Math.imul(st,$r)|0,b=b+Math.imul(st,Hr)|0,b=b+Math.imul(_t,$r)|0,X=X+Math.imul(_t,Hr)|0,$=$+Math.imul(Ee,Wr)|0,b=b+Math.imul(Ee,Dr)|0,b=b+Math.imul(xe,Wr)|0,X=X+Math.imul(xe,Dr)|0,$=$+Math.imul(ae,fe)|0,b=b+Math.imul(ae,Me)|0,b=b+Math.imul(Ve,fe)|0,X=X+Math.imul(Ve,Me)|0,$=$+Math.imul(Ke,J)|0,b=b+Math.imul(Ke,Te)|0,b=b+Math.imul(ht,J)|0,X=X+Math.imul(ht,Te)|0,$=$+Math.imul(De,Et)|0,b=b+Math.imul(De,Kt)|0,b=b+Math.imul(Fe,Et)|0,X=X+Math.imul(Fe,Kt)|0,$=$+Math.imul(Ae,Ur)|0,b=b+Math.imul(Ae,Ar)|0,b=b+Math.imul(je,Ur)|0,X=X+Math.imul(je,Ar)|0;var Zr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,$=Math.imul(pe,zt),b=Math.imul(pe,Ht),b=b+Math.imul(be,zt)|0,X=Math.imul(be,Ht),$=$+Math.imul(F,gr)|0,b=b+Math.imul(F,mr)|0,b=b+Math.imul(ie,gr)|0,X=X+Math.imul(ie,mr)|0,$=$+Math.imul(me,Pr)|0,b=b+Math.imul(me,kr)|0,b=b+Math.imul(Q,Pr)|0,X=X+Math.imul(Q,kr)|0,$=$+Math.imul(Ut,$r)|0,b=b+Math.imul(Ut,Hr)|0,b=b+Math.imul(ve,$r)|0,X=X+Math.imul(ve,Hr)|0,$=$+Math.imul(st,Wr)|0,b=b+Math.imul(st,Dr)|0,b=b+Math.imul(_t,Wr)|0,X=X+Math.imul(_t,Dr)|0,$=$+Math.imul(Ee,fe)|0,b=b+Math.imul(Ee,Me)|0,b=b+Math.imul(xe,fe)|0,X=X+Math.imul(xe,Me)|0,$=$+Math.imul(ae,J)|0,b=b+Math.imul(ae,Te)|0,b=b+Math.imul(Ve,J)|0,X=X+Math.imul(Ve,Te)|0,$=$+Math.imul(Ke,Et)|0,b=b+Math.imul(Ke,Kt)|0,b=b+Math.imul(ht,Et)|0,X=X+Math.imul(ht,Kt)|0,$=$+Math.imul(De,Ur)|0,b=b+Math.imul(De,Ar)|0,b=b+Math.imul(Fe,Ur)|0,X=X+Math.imul(Fe,Ar)|0;var gn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,$=Math.imul(pe,gr),b=Math.imul(pe,mr),b=b+Math.imul(be,gr)|0,X=Math.imul(be,mr),$=$+Math.imul(F,Pr)|0,b=b+Math.imul(F,kr)|0,b=b+Math.imul(ie,Pr)|0,X=X+Math.imul(ie,kr)|0,$=$+Math.imul(me,$r)|0,b=b+Math.imul(me,Hr)|0,b=b+Math.imul(Q,$r)|0,X=X+Math.imul(Q,Hr)|0,$=$+Math.imul(Ut,Wr)|0,b=b+Math.imul(Ut,Dr)|0,b=b+Math.imul(ve,Wr)|0,X=X+Math.imul(ve,Dr)|0,$=$+Math.imul(st,fe)|0,b=b+Math.imul(st,Me)|0,b=b+Math.imul(_t,fe)|0,X=X+Math.imul(_t,Me)|0,$=$+Math.imul(Ee,J)|0,b=b+Math.imul(Ee,Te)|0,b=b+Math.imul(xe,J)|0,X=X+Math.imul(xe,Te)|0,$=$+Math.imul(ae,Et)|0,b=b+Math.imul(ae,Kt)|0,b=b+Math.imul(Ve,Et)|0,X=X+Math.imul(Ve,Kt)|0,$=$+Math.imul(Ke,Ur)|0,b=b+Math.imul(Ke,Ar)|0,b=b+Math.imul(ht,Ur)|0,X=X+Math.imul(ht,Ar)|0;var rn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,$=Math.imul(pe,Pr),b=Math.imul(pe,kr),b=b+Math.imul(be,Pr)|0,X=Math.imul(be,kr),$=$+Math.imul(F,$r)|0,b=b+Math.imul(F,Hr)|0,b=b+Math.imul(ie,$r)|0,X=X+Math.imul(ie,Hr)|0,$=$+Math.imul(me,Wr)|0,b=b+Math.imul(me,Dr)|0,b=b+Math.imul(Q,Wr)|0,X=X+Math.imul(Q,Dr)|0,$=$+Math.imul(Ut,fe)|0,b=b+Math.imul(Ut,Me)|0,b=b+Math.imul(ve,fe)|0,X=X+Math.imul(ve,Me)|0,$=$+Math.imul(st,J)|0,b=b+Math.imul(st,Te)|0,b=b+Math.imul(_t,J)|0,X=X+Math.imul(_t,Te)|0,$=$+Math.imul(Ee,Et)|0,b=b+Math.imul(Ee,Kt)|0,b=b+Math.imul(xe,Et)|0,X=X+Math.imul(xe,Kt)|0,$=$+Math.imul(ae,Ur)|0,b=b+Math.imul(ae,Ar)|0,b=b+Math.imul(Ve,Ur)|0,X=X+Math.imul(Ve,Ar)|0;var un=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(un>>>26)|0,un&=67108863,$=Math.imul(pe,$r),b=Math.imul(pe,Hr),b=b+Math.imul(be,$r)|0,X=Math.imul(be,Hr),$=$+Math.imul(F,Wr)|0,b=b+Math.imul(F,Dr)|0,b=b+Math.imul(ie,Wr)|0,X=X+Math.imul(ie,Dr)|0,$=$+Math.imul(me,fe)|0,b=b+Math.imul(me,Me)|0,b=b+Math.imul(Q,fe)|0,X=X+Math.imul(Q,Me)|0,$=$+Math.imul(Ut,J)|0,b=b+Math.imul(Ut,Te)|0,b=b+Math.imul(ve,J)|0,X=X+Math.imul(ve,Te)|0,$=$+Math.imul(st,Et)|0,b=b+Math.imul(st,Kt)|0,b=b+Math.imul(_t,Et)|0,X=X+Math.imul(_t,Kt)|0,$=$+Math.imul(Ee,Ur)|0,b=b+Math.imul(Ee,Ar)|0,b=b+Math.imul(xe,Ur)|0,X=X+Math.imul(xe,Ar)|0;var hn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,$=Math.imul(pe,Wr),b=Math.imul(pe,Dr),b=b+Math.imul(be,Wr)|0,X=Math.imul(be,Dr),$=$+Math.imul(F,fe)|0,b=b+Math.imul(F,Me)|0,b=b+Math.imul(ie,fe)|0,X=X+Math.imul(ie,Me)|0,$=$+Math.imul(me,J)|0,b=b+Math.imul(me,Te)|0,b=b+Math.imul(Q,J)|0,X=X+Math.imul(Q,Te)|0,$=$+Math.imul(Ut,Et)|0,b=b+Math.imul(Ut,Kt)|0,b=b+Math.imul(ve,Et)|0,X=X+Math.imul(ve,Kt)|0,$=$+Math.imul(st,Ur)|0,b=b+Math.imul(st,Ar)|0,b=b+Math.imul(_t,Ur)|0,X=X+Math.imul(_t,Ar)|0;var tr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(tr>>>26)|0,tr&=67108863,$=Math.imul(pe,fe),b=Math.imul(pe,Me),b=b+Math.imul(be,fe)|0,X=Math.imul(be,Me),$=$+Math.imul(F,J)|0,b=b+Math.imul(F,Te)|0,b=b+Math.imul(ie,J)|0,X=X+Math.imul(ie,Te)|0,$=$+Math.imul(me,Et)|0,b=b+Math.imul(me,Kt)|0,b=b+Math.imul(Q,Et)|0,X=X+Math.imul(Q,Kt)|0,$=$+Math.imul(Ut,Ur)|0,b=b+Math.imul(Ut,Ar)|0,b=b+Math.imul(ve,Ur)|0,X=X+Math.imul(ve,Ar)|0;var lr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(lr>>>26)|0,lr&=67108863,$=Math.imul(pe,J),b=Math.imul(pe,Te),b=b+Math.imul(be,J)|0,X=Math.imul(be,Te),$=$+Math.imul(F,Et)|0,b=b+Math.imul(F,Kt)|0,b=b+Math.imul(ie,Et)|0,X=X+Math.imul(ie,Kt)|0,$=$+Math.imul(me,Ur)|0,b=b+Math.imul(me,Ar)|0,b=b+Math.imul(Q,Ur)|0,X=X+Math.imul(Q,Ar)|0;var Yt=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,$=Math.imul(pe,Et),b=Math.imul(pe,Kt),b=b+Math.imul(be,Et)|0,X=Math.imul(be,Kt),$=$+Math.imul(F,Ur)|0,b=b+Math.imul(F,Ar)|0,b=b+Math.imul(ie,Ur)|0,X=X+Math.imul(ie,Ar)|0;var Or=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Or>>>26)|0,Or&=67108863,$=Math.imul(pe,Ur),b=Math.imul(pe,Ar),b=b+Math.imul(be,Ur)|0,X=Math.imul(be,Ar);var Sr=(I+$|0)+((b&8191)<<13)|0;return I=(X+(b>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,d[0]=Qn,d[1]=an,d[2]=wn,d[3]=Pn,d[4]=Xr,d[5]=_n,d[6]=Dn,d[7]=Bn,d[8]=dn,d[9]=Zr,d[10]=gn,d[11]=rn,d[12]=un,d[13]=hn,d[14]=tr,d[15]=lr,d[16]=Yt,d[17]=Or,d[18]=Sr,I!==0&&(d[19]=I,y.length++),y};Math.imul||(U=L);function D(v,u,f){f.negative=u.negative^v.negative,f.length=v.length+u.length;for(var y=0,S=0,w=0;w>>26)|0,S+=d>>>26,d&=67108863}f.words[w]=I,y=d,d=S}return y!==0?f.words[w]=y:f.length--,f._strip()}function Y(v,u,f){return D(v,u,f)}o.prototype.mulTo=function(u,f){var y,S=this.length+u.length;return this.length===10&&u.length===10?y=U(this,u,f):S<63?y=L(this,u,f):S<1024?y=D(this,u,f):y=Y(this,u,f),y},o.prototype.mul=function(u){var f=new o(null);return f.words=new Array(this.length+u.length),this.mulTo(u,f)},o.prototype.mulf=function(u){var f=new o(null);return f.words=new Array(this.length+u.length),Y(this,u,f)},o.prototype.imul=function(u){return this.clone().mulTo(u,this)},o.prototype.imuln=function(u){var f=u<0;f&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var y=0,S=0;S>=26,y+=w/67108864|0,y+=d>>>26,this.words[S]=d&67108863}return y!==0&&(this.words[S]=y,this.length++),f?this.ineg():this},o.prototype.muln=function(u){return this.clone().imuln(u)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(u){var f=B(u);if(f.length===0)return new o(1);for(var y=this,S=0;S=0);var f=u%26,y=(u-f)/26,S=67108863>>>26-f<<26-f,w;if(f!==0){var d=0;for(w=0;w>>26-f}d&&(this.words[w]=d,this.length++)}if(y!==0){for(w=this.length-1;w>=0;w--)this.words[w+y]=this.words[w];for(w=0;w=0);var S;f?S=(f-f%26)/26:S=0;var w=u%26,d=Math.min((u-w)/26,this.length),I=67108863^67108863>>>w<d)for(this.length-=d,b=0;b=0&&(X!==0||b>=S);b--){var we=this.words[b]|0;this.words[b]=X<<26-w|we>>>w,X=we&I}return $&&X!==0&&($.words[$.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(u,f,y){return n(this.negative===0),this.iushrn(u,f,y)},o.prototype.shln=function(u){return this.clone().ishln(u)},o.prototype.ushln=function(u){return this.clone().iushln(u)},o.prototype.shrn=function(u){return this.clone().ishrn(u)},o.prototype.ushrn=function(u){return this.clone().iushrn(u)},o.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var f=u%26,y=(u-f)/26,S=1<=0);var f=u%26,y=(u-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(f!==0&&y++,this.length=Math.min(y,this.length),f!==0){var S=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},o.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-($/67108864|0),this.words[w+y]=d&67108863}for(;w>26,this.words[w+y]=d&67108863;if(I===0)return this._strip();for(n(I===-1),I=0,w=0;w>26,this.words[w]=d&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(u,f){var y=this.length-u.length,S=this.clone(),w=u,d=w.words[w.length-1]|0,I=this._countBits(d);y=26-I,y!==0&&(w=w.ushln(y),S.iushln(y),d=w.words[w.length-1]|0);var $=S.length-w.length,b;if(f!=="mod"){b=new o(null),b.length=$+1,b.words=new Array(b.length);for(var X=0;X=0;Ae--){var je=(S.words[w.length+Ae]|0)*67108864+(S.words[w.length+Ae-1]|0);for(je=Math.min(je/d|0,67108863),S._ishlnsubmul(w,je,Ae);S.negative!==0;)je--,S.negative=0,S._ishlnsubmul(w,1,Ae),S.isZero()||(S.negative^=1);b&&(b.words[Ae]=je)}return b&&b._strip(),S._strip(),f!=="div"&&y!==0&&S.iushrn(y),{div:b||null,mod:S}},o.prototype.divmod=function(u,f,y){if(n(!u.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var S,w,d;return this.negative!==0&&u.negative===0?(d=this.neg().divmod(u,f),f!=="mod"&&(S=d.div.neg()),f!=="div"&&(w=d.mod.neg(),y&&w.negative!==0&&w.iadd(u)),{div:S,mod:w}):this.negative===0&&u.negative!==0?(d=this.divmod(u.neg(),f),f!=="mod"&&(S=d.div.neg()),{div:S,mod:d.mod}):(this.negative&u.negative)!==0?(d=this.neg().divmod(u.neg(),f),f!=="div"&&(w=d.mod.neg(),y&&w.negative!==0&&w.isub(u)),{div:d.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new o(0),mod:this}:u.length===1?f==="div"?{div:this.divn(u.words[0]),mod:null}:f==="mod"?{div:null,mod:new o(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new o(this.modrn(u.words[0]))}:this._wordDiv(u,f)},o.prototype.div=function(u){return this.divmod(u,"div",!1).div},o.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},o.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},o.prototype.divRound=function(u){var f=this.divmod(u);if(f.mod.isZero())return f.div;var y=f.div.negative!==0?f.mod.isub(u):f.mod,S=u.ushrn(1),w=u.andln(1),d=y.cmp(S);return d<0||w===1&&d===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},o.prototype.modrn=function(u){var f=u<0;f&&(u=-u),n(u<=67108863);for(var y=(1<<26)%u,S=0,w=this.length-1;w>=0;w--)S=(y*S+(this.words[w]|0))%u;return f?-S:S},o.prototype.modn=function(u){return this.modrn(u)},o.prototype.idivn=function(u){var f=u<0;f&&(u=-u),n(u<=67108863);for(var y=0,S=this.length-1;S>=0;S--){var w=(this.words[S]|0)+y*67108864;this.words[S]=w/u|0,y=w%u}return this._strip(),f?this.ineg():this},o.prototype.divn=function(u){return this.clone().idivn(u)},o.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var f=this,y=u.clone();f.negative!==0?f=f.umod(u):f=f.clone();for(var S=new o(1),w=new o(0),d=new o(0),I=new o(1),$=0;f.isEven()&&y.isEven();)f.iushrn(1),y.iushrn(1),++$;for(var b=y.clone(),X=f.clone();!f.isZero();){for(var we=0,Ae=1;(f.words[0]&Ae)===0&&we<26;++we,Ae<<=1);if(we>0)for(f.iushrn(we);we-- >0;)(S.isOdd()||w.isOdd())&&(S.iadd(b),w.isub(X)),S.iushrn(1),w.iushrn(1);for(var je=0,Vt=1;(y.words[0]&Vt)===0&&je<26;++je,Vt<<=1);if(je>0)for(y.iushrn(je);je-- >0;)(d.isOdd()||I.isOdd())&&(d.iadd(b),I.isub(X)),d.iushrn(1),I.iushrn(1);f.cmp(y)>=0?(f.isub(y),S.isub(d),w.isub(I)):(y.isub(f),d.isub(S),I.isub(w))}return{a:d,b:I,gcd:y.iushln($)}},o.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var f=this,y=u.clone();f.negative!==0?f=f.umod(u):f=f.clone();for(var S=new o(1),w=new o(0),d=y.clone();f.cmpn(1)>0&&y.cmpn(1)>0;){for(var I=0,$=1;(f.words[0]&$)===0&&I<26;++I,$<<=1);if(I>0)for(f.iushrn(I);I-- >0;)S.isOdd()&&S.iadd(d),S.iushrn(1);for(var b=0,X=1;(y.words[0]&X)===0&&b<26;++b,X<<=1);if(b>0)for(y.iushrn(b);b-- >0;)w.isOdd()&&w.iadd(d),w.iushrn(1);f.cmp(y)>=0?(f.isub(y),S.isub(w)):(y.isub(f),w.isub(S))}var we;return f.cmpn(1)===0?we=S:we=w,we.cmpn(0)<0&&we.iadd(u),we},o.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var f=this.clone(),y=u.clone();f.negative=0,y.negative=0;for(var S=0;f.isEven()&&y.isEven();S++)f.iushrn(1),y.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;y.isEven();)y.iushrn(1);var w=f.cmp(y);if(w<0){var d=f;f=y,y=d}else if(w===0||y.cmpn(1)===0)break;f.isub(y)}while(!0);return y.iushln(S)},o.prototype.invm=function(u){return this.egcd(u).a.umod(u)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(u){return this.words[0]&u},o.prototype.bincn=function(u){n(typeof u=="number");var f=u%26,y=(u-f)/26,S=1<>>26,I&=67108863,this.words[d]=I}return w!==0&&(this.words[d]=w,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(u){var f=u<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this._strip();var y;if(this.length>1)y=1;else{f&&(u=-u),n(u<=67108863,"Number is too big");var S=this.words[0]|0;y=S===u?0:Su.length)return 1;if(this.length=0;y--){var S=this.words[y]|0,w=u.words[y]|0;if(S!==w){Sw&&(f=1);break}}return f},o.prototype.gtn=function(u){return this.cmpn(u)===1},o.prototype.gt=function(u){return this.cmp(u)===1},o.prototype.gten=function(u){return this.cmpn(u)>=0},o.prototype.gte=function(u){return this.cmp(u)>=0},o.prototype.ltn=function(u){return this.cmpn(u)===-1},o.prototype.lt=function(u){return this.cmp(u)===-1},o.prototype.lten=function(u){return this.cmpn(u)<=0},o.prototype.lte=function(u){return this.cmp(u)<=0},o.prototype.eqn=function(u){return this.cmpn(u)===0},o.prototype.eq=function(u){return this.cmp(u)===0},o.red=function(u){return new h(u)},o.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(u){return this.red=u,this},o.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},o.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},o.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},o.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},o.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},o.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},o.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},o.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function Z(v,u){this.name=v,this.p=new o(u,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Z.prototype._tmp=function(){var u=new o(null);return u.words=new Array(Math.ceil(this.n/13)),u},Z.prototype.ireduce=function(u){var f=u,y;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),y=f.bitLength();while(y>this.n);var S=y0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},Z.prototype.split=function(u,f){u.iushrn(this.n,0,f)},Z.prototype.imulK=function(u){return u.imul(this.k)};function ee(){Z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(ee,Z),ee.prototype.split=function(u,f){for(var y=4194303,S=Math.min(u.length,9),w=0;w>>22,d=I}d>>>=22,u.words[w-10]=d,d===0&&u.length>10?u.length-=10:u.length-=9},ee.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var f=0,y=0;y>>=26,u.words[y]=w,f=S}return f!==0&&(u.words[u.length++]=f),u},o._prime=function(u){if(q[u])return q[u];var f;if(u==="k256")f=new ee;else if(u==="p224")f=new V;else if(u==="p192")f=new te;else if(u==="p25519")f=new R;else throw new Error("Unknown prime "+u);return q[u]=f,f};function h(v){if(typeof v=="string"){var u=o._prime(v);this.m=u.p,this.prime=u}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}h.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},h.prototype._verify2=function(u,f){n((u.negative|f.negative)===0,"red works only with positives"),n(u.red&&u.red===f.red,"red works only with red numbers")},h.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(m(u,u.umod(this.m)._forceRed(this)),u)},h.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},h.prototype.add=function(u,f){this._verify2(u,f);var y=u.add(f);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},h.prototype.iadd=function(u,f){this._verify2(u,f);var y=u.iadd(f);return y.cmp(this.m)>=0&&y.isub(this.m),y},h.prototype.sub=function(u,f){this._verify2(u,f);var y=u.sub(f);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},h.prototype.isub=function(u,f){this._verify2(u,f);var y=u.isub(f);return y.cmpn(0)<0&&y.iadd(this.m),y},h.prototype.shl=function(u,f){return this._verify1(u),this.imod(u.ushln(f))},h.prototype.imul=function(u,f){return this._verify2(u,f),this.imod(u.imul(f))},h.prototype.mul=function(u,f){return this._verify2(u,f),this.imod(u.mul(f))},h.prototype.isqr=function(u){return this.imul(u,u.clone())},h.prototype.sqr=function(u){return this.mul(u,u)},h.prototype.sqrt=function(u){if(u.isZero())return u.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var y=this.m.add(new o(1)).iushrn(2);return this.pow(u,y)}for(var S=this.m.subn(1),w=0;!S.isZero()&&S.andln(1)===0;)w++,S.iushrn(1);n(!S.isZero());var d=new o(1).toRed(this),I=d.redNeg(),$=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new o(2*b*b).toRed(this);this.pow(b,$).cmp(I)!==0;)b.redIAdd(I);for(var X=this.pow(b,S),we=this.pow(u,S.addn(1).iushrn(1)),Ae=this.pow(u,S),je=w;Ae.cmp(d)!==0;){for(var Vt=Ae,De=0;Vt.cmp(d)!==0;De++)Vt=Vt.redSqr();n(De=0;w--){for(var X=f.words[w],we=b-1;we>=0;we--){var Ae=X>>we&1;if(d!==S[0]&&(d=this.sqr(d)),Ae===0&&I===0){$=0;continue}I<<=1,I|=Ae,$++,!($!==y&&(w!==0||we!==0))&&(d=this.mul(d,S[I]),$=0,I=0)}b=26}return d},h.prototype.convertTo=function(u){var f=u.umod(this.m);return f===u?f.clone():f},h.prototype.convertFrom=function(u){var f=u.clone();return f.red=null,f},o.mont=function(u){return new g(u)};function g(v){h.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(g,h),g.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},g.prototype.convertFrom=function(u){var f=this.imod(u.mul(this.rinv));return f.red=null,f},g.prototype.imul=function(u,f){if(u.isZero()||f.isZero())return u.words[0]=0,u.length=1,u;var y=u.imul(f),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=y.isub(S).iushrn(this.shift),d=w;return w.cmp(this.m)>=0?d=w.isub(this.m):w.cmpn(0)<0&&(d=w.iadd(this.m)),d._forceRed(this)},g.prototype.mul=function(u,f){if(u.isZero()||f.isZero())return new o(0)._forceRed(this);var y=u.mul(f),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=y.isub(S).iushrn(this.shift),d=w;return w.cmp(this.m)>=0?d=w.isub(this.m):w.cmpn(0)<0&&(d=w.iadd(this.m)),d._forceRed(this)},g.prototype.invm=function(u){var f=this.imod(u._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Ir)})(ml);const mhe=Symbol.for("nodejs.util.inspect.custom");var dx=mhe,vP;function KC(){if(vP)return cg;vP=1;var e=Ir&&Ir.__classPrivateFieldSet||function(A,M,B,L,U){if(L==="m")throw new TypeError("Private method is not writable");if(L==="a"&&!U)throw new TypeError("Private accessor was defined without a setter");if(typeof M=="function"?A!==M||!U:!M.has(A))throw new TypeError("Cannot write private member to an object whose class did not declare it");return L==="a"?U.call(A,B):U?U.value=B:M.set(A,B),B},t=Ir&&Ir.__classPrivateFieldGet||function(A,M,B,L){if(B==="a"&&!L)throw new TypeError("Private accessor was defined without a getter");if(typeof M=="function"?A!==M||!L:!M.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return B==="m"?L:B==="a"?L.call(A):L?L.value:M.get(A)},r=Ir&&Ir.__importDefault||function(A){return A&&A.__esModule?A:{default:A}},n,a,o,s,l,c,p;Object.defineProperty(cg,"__esModule",{value:!0}),cg.BitString=void 0;const m=r(ml.exports),_=r(dx),T=Go();class O{constructor(M,B,L){n.add(this),a.set(this,void 0),o.set(this,void 0),s.set(this,void 0),this[c]=()=>{let U=0,D=t(this,o,"f");return{next:()=>{if(U(t(this,n,"m",l).call(this,U),(t(this,s,"f")[U/8|0]&1<<7-U%8)>0),this.on=U=>{t(this,n,"m",l).call(this,U),t(this,s,"f")[U/8|0]|=1<<7-U%8},this.off=U=>{t(this,n,"m",l).call(this,U),t(this,s,"f")[U/8|0]&=~(1<<7-U%8)},this.toggle=U=>{t(this,n,"m",l).call(this,U),t(this,s,"f")[U/8|0]^=1<<7-U%8},this.writeBit=U=>{var D;U===!0||U>0?this.on(t(this,o,"f")):this.off(t(this,o,"f")),e(this,o,(D=t(this,o,"f"),D++,D),"f")},this.writeUint=(U,D)=>{let Y=new m.default(U);if(D==0||U.toString(2).length>D){if(Y.isZero())return;throw Error(`bitLength is too small for a value ${Y.toString()}. Got ${D}, expected >= ${U.toString(2).length}`)}const q=Y.toString(2,D);for(let Z=0;Z{let Y=new m.default(U);if(D==1){if(Y.eq(new m.default(-1))){this.writeBit(!0);return}if(Y.isZero()){this.writeBit(!1);return}throw Error(`bitlength is too small for a value ${Y}`)}else if(Y.isNeg()){this.writeBit(!0);const Z=new m.default(2).pow(new m.default(D-1));this.writeUint(Z.add(Y),D-1)}else this.writeBit(!1),this.writeUint(Y,D-1)},this.writeUint8=U=>{this.writeUint(U,8)},this.writeBuffer=U=>{for(let D=0;D{if(U==0)this.writeUint(0,4);else{U=new m.default(U);const D=Math.ceil(U.toString(16).length/2);this.writeUint(D,4),this.writeUint(U,D*8)}},this.writeAddress=U=>{U===null?this.writeUint(0,2):(this.writeUint(2,2),this.writeUint(0,1),this.writeInt(U.workChain,8),this.writeBuffer(U.hash))},this.writeBitString=U=>{for(let D of U)this.writeBit(D)},this[p]=()=>this.toFiftHex(),e(this,s,M,"f"),e(this,a,B,"f"),e(this,o,L,"f")}static alloc(M){return new O(Buffer.alloc(Math.ceil(M/8),0),M,0)}get available(){return this.length-this.cursor}get length(){return t(this,a,"f")}get cursor(){return t(this,o,"f")}get buffer(){return t(this,s,"f")}writeBitArray(M){for(let B of M)this.writeBit(B)}writeVarUInt(M,B){let L=new m.default(M);if(L.eq(new m.default(0)))this.writeUint(0,B);else{let U=L.toString("hex");for(;U.length%2!==0;)U="0"+U;const D=Math.ceil(U.length/2);this.writeUint(D,B),this.writeBuffer(Buffer.from(U,"hex"))}}clone(){let M=Buffer.alloc(t(this,s,"f").length);return t(this,s,"f").copy(M),new O(M,t(this,a,"f"),t(this,o,"f"))}toString(){let M="";for(let B of this)B?M=M+"1":M=M+"0";return M}toFiftHex(){if(this.cursor%4===0){const M=t(this,s,"f").slice(0,Math.ceil(this.cursor/8)).toString("hex").toUpperCase();return this.cursor%8===0?M:M.substr(0,M.length-1)}else{const M=this.clone();for(M.writeBit(1);M.cursor%4!==0;)M.writeBit(0);return M.toFiftHex().toUpperCase()+"_"}}setTopUppedArray(M,B=!0){if(e(this,a,M.length*8,"f"),e(this,s,Buffer.alloc(M.length),"f"),M.copy(t(this,s,"f")),e(this,o,this.length,"f"),!(B||!this.length)){let L=!1;for(let U=0;U<7;U++)if(e(this,o,t(this,o,"f")-1,"f"),this.get(this.cursor)){L=!0,this.off(this.cursor);break}if(!L)throw new Error("Incorrect TopUppedArray")}}getTopUppedLength(){return Math.ceil(this.cursor/8)}writeTopUppedArray(M,B=0){t(this,s,"f").copy(M,B);const L=this.getTopUppedLength(),U=L*8-this.cursor;if(U>0){const D=1<this.length)throw Error("Invalid index: "+M)},cg}var fg={},zv={};Object.defineProperty(zv,"__esModule",{value:!0});zv.AddressExternal=void 0;class vhe{constructor(t){this.bits=t}}zv.AddressExternal=vhe;var yP;function DD(){if(yP)return fg;yP=1,Object.defineProperty(fg,"__esModule",{value:!0}),fg.BitStringReader=void 0;const e=ml.exports,t=Go(),r=zv;class n{constructor(o){this.offset=0;let s=Buffer.alloc(o.buffer.length);o.buffer.copy(s),this.buffer=s,this.length=o.cursor}get currentOffset(){return this.offset}get remaining(){return this.length-this.offset}skip(o){for(let s=0;s=this.length||o<0)throw Error("Out of range");return(this.buffer[o/8|0]&1<<7-o%8)>0}}return fg.BitStringReader=n,fg}var dg={},Xa={},b5={},Tf={},hx={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ir,function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(ye,me,Q,j){var F,ie,de,pe=me||[0],be=(Q=Q||0)>>>3,Gt=j===-1?3:0;for(F=0;F>>2,pe.length<=ie&&pe.push(0),pe[ie]|=ye[F]<<8*(Gt+j*(de%4));return{value:pe,binLen:8*ye.length+Q}}function a(ye,me,Q){switch(me){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(ye){case"HEX":return function(j,F,ie){return function(de,pe,be,Gt){var Lt,Tt,yr,zt;if(de.length%2!=0)throw new Error("String of HEX type must be in byte increments");var Ht=pe||[0],On=(be=be||0)>>>3,gr=Gt===-1?3:0;for(Lt=0;Lt>>1)+On)>>>2;Ht.length<=yr;)Ht.push(0);Ht[yr]|=Tt<<8*(gr+Gt*(zt%4))}return{value:Ht,binLen:4*de.length+be}}(j,F,ie,Q)};case"TEXT":return function(j,F,ie){return function(de,pe,be,Gt,Lt){var Tt,yr,zt,Ht,On,gr,mr,gt,Pr=0,kr=be||[0],ai=(Gt=Gt||0)>>>3;if(pe==="UTF8")for(mr=Lt===-1?3:0,zt=0;zt(Tt=de.charCodeAt(zt))?yr.push(Tt):2048>Tt?(yr.push(192|Tt>>>6),yr.push(128|63&Tt)):55296>Tt||57344<=Tt?yr.push(224|Tt>>>12,128|Tt>>>6&63,128|63&Tt):(zt+=1,Tt=65536+((1023&Tt)<<10|1023&de.charCodeAt(zt)),yr.push(240|Tt>>>18,128|Tt>>>12&63,128|Tt>>>6&63,128|63&Tt)),Ht=0;Ht>>2;kr.length<=On;)kr.push(0);kr[On]|=yr[Ht]<<8*(mr+Lt*(gr%4)),Pr+=1}else for(mr=Lt===-1?2:0,gt=pe==="UTF16LE"&&Lt!==1||pe!=="UTF16LE"&&Lt===1,zt=0;zt>>8),On=(gr=Pr+ai)>>>2;kr.length<=On;)kr.push(0);kr[On]|=Tt<<8*(mr+Lt*(gr%4)),Pr+=2}return{value:kr,binLen:8*Pr+Gt}}(j,me,F,ie,Q)};case"B64":return function(j,F,ie){return function(de,pe,be,Gt){var Lt,Tt,yr,zt,Ht,On,gr=0,mr=pe||[0],gt=(be=be||0)>>>3,Pr=Gt===-1?3:0,kr=de.indexOf("=");if(de.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(de=de.replace(/=/g,""),kr!==-1&&kr>24&255,fe[Me+1]=Be>>16&255,fe[Me+2]=Be>>8&255,fe[Me+3]=Be&255,fe[Me+4]=J>>24&255,fe[Me+5]=J>>16&255,fe[Me+6]=J>>8&255,fe[Me+7]=J&255}function M(fe,Me,Be,J,Te){var Zt,Et=0;for(Zt=0;Zt>>8)-1}function B(fe,Me,Be,J){return M(fe,Me,Be,J,16)}function L(fe,Me,Be,J){return M(fe,Me,Be,J,32)}function U(fe,Me,Be,J){for(var Te=J[0]&255|(J[1]&255)<<8|(J[2]&255)<<16|(J[3]&255)<<24,Zt=Be[0]&255|(Be[1]&255)<<8|(Be[2]&255)<<16|(Be[3]&255)<<24,Et=Be[4]&255|(Be[5]&255)<<8|(Be[6]&255)<<16|(Be[7]&255)<<24,Kt=Be[8]&255|(Be[9]&255)<<8|(Be[10]&255)<<16|(Be[11]&255)<<24,Lr=Be[12]&255|(Be[13]&255)<<8|(Be[14]&255)<<16|(Be[15]&255)<<24,Ur=J[4]&255|(J[5]&255)<<8|(J[6]&255)<<16|(J[7]&255)<<24,Ar=Me[0]&255|(Me[1]&255)<<8|(Me[2]&255)<<16|(Me[3]&255)<<24,Qn=Me[4]&255|(Me[5]&255)<<8|(Me[6]&255)<<16|(Me[7]&255)<<24,an=Me[8]&255|(Me[9]&255)<<8|(Me[10]&255)<<16|(Me[11]&255)<<24,wn=Me[12]&255|(Me[13]&255)<<8|(Me[14]&255)<<16|(Me[15]&255)<<24,Pn=J[8]&255|(J[9]&255)<<8|(J[10]&255)<<16|(J[11]&255)<<24,Xr=Be[16]&255|(Be[17]&255)<<8|(Be[18]&255)<<16|(Be[19]&255)<<24,_n=Be[20]&255|(Be[21]&255)<<8|(Be[22]&255)<<16|(Be[23]&255)<<24,Dn=Be[24]&255|(Be[25]&255)<<8|(Be[26]&255)<<16|(Be[27]&255)<<24,Bn=Be[28]&255|(Be[29]&255)<<8|(Be[30]&255)<<16|(Be[31]&255)<<24,dn=J[12]&255|(J[13]&255)<<8|(J[14]&255)<<16|(J[15]&255)<<24,Zr=Te,gn=Zt,rn=Et,un=Kt,hn=Lr,tr=Ur,lr=Ar,Yt=Qn,Or=an,Sr=wn,Nr=Pn,qr=Xr,Gn=_n,si=Dn,xi=Bn,mi=dn,Rt,_i=0;_i<20;_i+=2)Rt=Zr+Gn|0,hn^=Rt<<7|Rt>>>32-7,Rt=hn+Zr|0,Or^=Rt<<9|Rt>>>32-9,Rt=Or+hn|0,Gn^=Rt<<13|Rt>>>32-13,Rt=Gn+Or|0,Zr^=Rt<<18|Rt>>>32-18,Rt=tr+gn|0,Sr^=Rt<<7|Rt>>>32-7,Rt=Sr+tr|0,si^=Rt<<9|Rt>>>32-9,Rt=si+Sr|0,gn^=Rt<<13|Rt>>>32-13,Rt=gn+si|0,tr^=Rt<<18|Rt>>>32-18,Rt=Nr+lr|0,xi^=Rt<<7|Rt>>>32-7,Rt=xi+Nr|0,rn^=Rt<<9|Rt>>>32-9,Rt=rn+xi|0,lr^=Rt<<13|Rt>>>32-13,Rt=lr+rn|0,Nr^=Rt<<18|Rt>>>32-18,Rt=mi+qr|0,un^=Rt<<7|Rt>>>32-7,Rt=un+mi|0,Yt^=Rt<<9|Rt>>>32-9,Rt=Yt+un|0,qr^=Rt<<13|Rt>>>32-13,Rt=qr+Yt|0,mi^=Rt<<18|Rt>>>32-18,Rt=Zr+un|0,gn^=Rt<<7|Rt>>>32-7,Rt=gn+Zr|0,rn^=Rt<<9|Rt>>>32-9,Rt=rn+gn|0,un^=Rt<<13|Rt>>>32-13,Rt=un+rn|0,Zr^=Rt<<18|Rt>>>32-18,Rt=tr+hn|0,lr^=Rt<<7|Rt>>>32-7,Rt=lr+tr|0,Yt^=Rt<<9|Rt>>>32-9,Rt=Yt+lr|0,hn^=Rt<<13|Rt>>>32-13,Rt=hn+Yt|0,tr^=Rt<<18|Rt>>>32-18,Rt=Nr+Sr|0,qr^=Rt<<7|Rt>>>32-7,Rt=qr+Nr|0,Or^=Rt<<9|Rt>>>32-9,Rt=Or+qr|0,Sr^=Rt<<13|Rt>>>32-13,Rt=Sr+Or|0,Nr^=Rt<<18|Rt>>>32-18,Rt=mi+xi|0,Gn^=Rt<<7|Rt>>>32-7,Rt=Gn+mi|0,si^=Rt<<9|Rt>>>32-9,Rt=si+Gn|0,xi^=Rt<<13|Rt>>>32-13,Rt=xi+si|0,mi^=Rt<<18|Rt>>>32-18;Zr=Zr+Te|0,gn=gn+Zt|0,rn=rn+Et|0,un=un+Kt|0,hn=hn+Lr|0,tr=tr+Ur|0,lr=lr+Ar|0,Yt=Yt+Qn|0,Or=Or+an|0,Sr=Sr+wn|0,Nr=Nr+Pn|0,qr=qr+Xr|0,Gn=Gn+_n|0,si=si+Dn|0,xi=xi+Bn|0,mi=mi+dn|0,fe[0]=Zr>>>0&255,fe[1]=Zr>>>8&255,fe[2]=Zr>>>16&255,fe[3]=Zr>>>24&255,fe[4]=gn>>>0&255,fe[5]=gn>>>8&255,fe[6]=gn>>>16&255,fe[7]=gn>>>24&255,fe[8]=rn>>>0&255,fe[9]=rn>>>8&255,fe[10]=rn>>>16&255,fe[11]=rn>>>24&255,fe[12]=un>>>0&255,fe[13]=un>>>8&255,fe[14]=un>>>16&255,fe[15]=un>>>24&255,fe[16]=hn>>>0&255,fe[17]=hn>>>8&255,fe[18]=hn>>>16&255,fe[19]=hn>>>24&255,fe[20]=tr>>>0&255,fe[21]=tr>>>8&255,fe[22]=tr>>>16&255,fe[23]=tr>>>24&255,fe[24]=lr>>>0&255,fe[25]=lr>>>8&255,fe[26]=lr>>>16&255,fe[27]=lr>>>24&255,fe[28]=Yt>>>0&255,fe[29]=Yt>>>8&255,fe[30]=Yt>>>16&255,fe[31]=Yt>>>24&255,fe[32]=Or>>>0&255,fe[33]=Or>>>8&255,fe[34]=Or>>>16&255,fe[35]=Or>>>24&255,fe[36]=Sr>>>0&255,fe[37]=Sr>>>8&255,fe[38]=Sr>>>16&255,fe[39]=Sr>>>24&255,fe[40]=Nr>>>0&255,fe[41]=Nr>>>8&255,fe[42]=Nr>>>16&255,fe[43]=Nr>>>24&255,fe[44]=qr>>>0&255,fe[45]=qr>>>8&255,fe[46]=qr>>>16&255,fe[47]=qr>>>24&255,fe[48]=Gn>>>0&255,fe[49]=Gn>>>8&255,fe[50]=Gn>>>16&255,fe[51]=Gn>>>24&255,fe[52]=si>>>0&255,fe[53]=si>>>8&255,fe[54]=si>>>16&255,fe[55]=si>>>24&255,fe[56]=xi>>>0&255,fe[57]=xi>>>8&255,fe[58]=xi>>>16&255,fe[59]=xi>>>24&255,fe[60]=mi>>>0&255,fe[61]=mi>>>8&255,fe[62]=mi>>>16&255,fe[63]=mi>>>24&255}function D(fe,Me,Be,J){for(var Te=J[0]&255|(J[1]&255)<<8|(J[2]&255)<<16|(J[3]&255)<<24,Zt=Be[0]&255|(Be[1]&255)<<8|(Be[2]&255)<<16|(Be[3]&255)<<24,Et=Be[4]&255|(Be[5]&255)<<8|(Be[6]&255)<<16|(Be[7]&255)<<24,Kt=Be[8]&255|(Be[9]&255)<<8|(Be[10]&255)<<16|(Be[11]&255)<<24,Lr=Be[12]&255|(Be[13]&255)<<8|(Be[14]&255)<<16|(Be[15]&255)<<24,Ur=J[4]&255|(J[5]&255)<<8|(J[6]&255)<<16|(J[7]&255)<<24,Ar=Me[0]&255|(Me[1]&255)<<8|(Me[2]&255)<<16|(Me[3]&255)<<24,Qn=Me[4]&255|(Me[5]&255)<<8|(Me[6]&255)<<16|(Me[7]&255)<<24,an=Me[8]&255|(Me[9]&255)<<8|(Me[10]&255)<<16|(Me[11]&255)<<24,wn=Me[12]&255|(Me[13]&255)<<8|(Me[14]&255)<<16|(Me[15]&255)<<24,Pn=J[8]&255|(J[9]&255)<<8|(J[10]&255)<<16|(J[11]&255)<<24,Xr=Be[16]&255|(Be[17]&255)<<8|(Be[18]&255)<<16|(Be[19]&255)<<24,_n=Be[20]&255|(Be[21]&255)<<8|(Be[22]&255)<<16|(Be[23]&255)<<24,Dn=Be[24]&255|(Be[25]&255)<<8|(Be[26]&255)<<16|(Be[27]&255)<<24,Bn=Be[28]&255|(Be[29]&255)<<8|(Be[30]&255)<<16|(Be[31]&255)<<24,dn=J[12]&255|(J[13]&255)<<8|(J[14]&255)<<16|(J[15]&255)<<24,Zr=Te,gn=Zt,rn=Et,un=Kt,hn=Lr,tr=Ur,lr=Ar,Yt=Qn,Or=an,Sr=wn,Nr=Pn,qr=Xr,Gn=_n,si=Dn,xi=Bn,mi=dn,Rt,_i=0;_i<20;_i+=2)Rt=Zr+Gn|0,hn^=Rt<<7|Rt>>>32-7,Rt=hn+Zr|0,Or^=Rt<<9|Rt>>>32-9,Rt=Or+hn|0,Gn^=Rt<<13|Rt>>>32-13,Rt=Gn+Or|0,Zr^=Rt<<18|Rt>>>32-18,Rt=tr+gn|0,Sr^=Rt<<7|Rt>>>32-7,Rt=Sr+tr|0,si^=Rt<<9|Rt>>>32-9,Rt=si+Sr|0,gn^=Rt<<13|Rt>>>32-13,Rt=gn+si|0,tr^=Rt<<18|Rt>>>32-18,Rt=Nr+lr|0,xi^=Rt<<7|Rt>>>32-7,Rt=xi+Nr|0,rn^=Rt<<9|Rt>>>32-9,Rt=rn+xi|0,lr^=Rt<<13|Rt>>>32-13,Rt=lr+rn|0,Nr^=Rt<<18|Rt>>>32-18,Rt=mi+qr|0,un^=Rt<<7|Rt>>>32-7,Rt=un+mi|0,Yt^=Rt<<9|Rt>>>32-9,Rt=Yt+un|0,qr^=Rt<<13|Rt>>>32-13,Rt=qr+Yt|0,mi^=Rt<<18|Rt>>>32-18,Rt=Zr+un|0,gn^=Rt<<7|Rt>>>32-7,Rt=gn+Zr|0,rn^=Rt<<9|Rt>>>32-9,Rt=rn+gn|0,un^=Rt<<13|Rt>>>32-13,Rt=un+rn|0,Zr^=Rt<<18|Rt>>>32-18,Rt=tr+hn|0,lr^=Rt<<7|Rt>>>32-7,Rt=lr+tr|0,Yt^=Rt<<9|Rt>>>32-9,Rt=Yt+lr|0,hn^=Rt<<13|Rt>>>32-13,Rt=hn+Yt|0,tr^=Rt<<18|Rt>>>32-18,Rt=Nr+Sr|0,qr^=Rt<<7|Rt>>>32-7,Rt=qr+Nr|0,Or^=Rt<<9|Rt>>>32-9,Rt=Or+qr|0,Sr^=Rt<<13|Rt>>>32-13,Rt=Sr+Or|0,Nr^=Rt<<18|Rt>>>32-18,Rt=mi+xi|0,Gn^=Rt<<7|Rt>>>32-7,Rt=Gn+mi|0,si^=Rt<<9|Rt>>>32-9,Rt=si+Gn|0,xi^=Rt<<13|Rt>>>32-13,Rt=xi+si|0,mi^=Rt<<18|Rt>>>32-18;fe[0]=Zr>>>0&255,fe[1]=Zr>>>8&255,fe[2]=Zr>>>16&255,fe[3]=Zr>>>24&255,fe[4]=tr>>>0&255,fe[5]=tr>>>8&255,fe[6]=tr>>>16&255,fe[7]=tr>>>24&255,fe[8]=Nr>>>0&255,fe[9]=Nr>>>8&255,fe[10]=Nr>>>16&255,fe[11]=Nr>>>24&255,fe[12]=mi>>>0&255,fe[13]=mi>>>8&255,fe[14]=mi>>>16&255,fe[15]=mi>>>24&255,fe[16]=lr>>>0&255,fe[17]=lr>>>8&255,fe[18]=lr>>>16&255,fe[19]=lr>>>24&255,fe[20]=Yt>>>0&255,fe[21]=Yt>>>8&255,fe[22]=Yt>>>16&255,fe[23]=Yt>>>24&255,fe[24]=Or>>>0&255,fe[25]=Or>>>8&255,fe[26]=Or>>>16&255,fe[27]=Or>>>24&255,fe[28]=Sr>>>0&255,fe[29]=Sr>>>8&255,fe[30]=Sr>>>16&255,fe[31]=Sr>>>24&255}function Y(fe,Me,Be,J){U(fe,Me,Be,J)}function q(fe,Me,Be,J){D(fe,Me,Be,J)}var Z=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function ee(fe,Me,Be,J,Te,Zt,Et){var Kt=new Uint8Array(16),Lr=new Uint8Array(64),Ur,Ar;for(Ar=0;Ar<16;Ar++)Kt[Ar]=0;for(Ar=0;Ar<8;Ar++)Kt[Ar]=Zt[Ar];for(;Te>=64;){for(Y(Lr,Kt,Et,Z),Ar=0;Ar<64;Ar++)fe[Me+Ar]=Be[J+Ar]^Lr[Ar];for(Ur=1,Ar=8;Ar<16;Ar++)Ur=Ur+(Kt[Ar]&255)|0,Kt[Ar]=Ur&255,Ur>>>=8;Te-=64,Me+=64,J+=64}if(Te>0)for(Y(Lr,Kt,Et,Z),Ar=0;Ar=64;){for(Y(Et,Zt,Te,Z),Lr=0;Lr<64;Lr++)fe[Me+Lr]=Et[Lr];for(Kt=1,Lr=8;Lr<16;Lr++)Kt=Kt+(Zt[Lr]&255)|0,Zt[Lr]=Kt&255,Kt>>>=8;Be-=64,Me+=64}if(Be>0)for(Y(Et,Zt,Te,Z),Lr=0;Lr>>13|Be<<3)&8191,J=fe[4]&255|(fe[5]&255)<<8,this.r[2]=(Be>>>10|J<<6)&7939,Te=fe[6]&255|(fe[7]&255)<<8,this.r[3]=(J>>>7|Te<<9)&8191,Zt=fe[8]&255|(fe[9]&255)<<8,this.r[4]=(Te>>>4|Zt<<12)&255,this.r[5]=Zt>>>1&8190,Et=fe[10]&255|(fe[11]&255)<<8,this.r[6]=(Zt>>>14|Et<<2)&8191,Kt=fe[12]&255|(fe[13]&255)<<8,this.r[7]=(Et>>>11|Kt<<5)&8065,Lr=fe[14]&255|(fe[15]&255)<<8,this.r[8]=(Kt>>>8|Lr<<8)&8191,this.r[9]=Lr>>>5&127,this.pad[0]=fe[16]&255|(fe[17]&255)<<8,this.pad[1]=fe[18]&255|(fe[19]&255)<<8,this.pad[2]=fe[20]&255|(fe[21]&255)<<8,this.pad[3]=fe[22]&255|(fe[23]&255)<<8,this.pad[4]=fe[24]&255|(fe[25]&255)<<8,this.pad[5]=fe[26]&255|(fe[27]&255)<<8,this.pad[6]=fe[28]&255|(fe[29]&255)<<8,this.pad[7]=fe[30]&255|(fe[31]&255)<<8};h.prototype.blocks=function(fe,Me,Be){for(var J=this.fin?0:2048,Te,Zt,Et,Kt,Lr,Ur,Ar,Qn,an,wn,Pn,Xr,_n,Dn,Bn,dn,Zr,gn,rn,un=this.h[0],hn=this.h[1],tr=this.h[2],lr=this.h[3],Yt=this.h[4],Or=this.h[5],Sr=this.h[6],Nr=this.h[7],qr=this.h[8],Gn=this.h[9],si=this.r[0],xi=this.r[1],mi=this.r[2],Rt=this.r[3],_i=this.r[4],mn=this.r[5],Ei=this.r[6],ri=this.r[7],Ui=this.r[8],St=this.r[9];Be>=16;)Te=fe[Me+0]&255|(fe[Me+1]&255)<<8,un+=Te&8191,Zt=fe[Me+2]&255|(fe[Me+3]&255)<<8,hn+=(Te>>>13|Zt<<3)&8191,Et=fe[Me+4]&255|(fe[Me+5]&255)<<8,tr+=(Zt>>>10|Et<<6)&8191,Kt=fe[Me+6]&255|(fe[Me+7]&255)<<8,lr+=(Et>>>7|Kt<<9)&8191,Lr=fe[Me+8]&255|(fe[Me+9]&255)<<8,Yt+=(Kt>>>4|Lr<<12)&8191,Or+=Lr>>>1&8191,Ur=fe[Me+10]&255|(fe[Me+11]&255)<<8,Sr+=(Lr>>>14|Ur<<2)&8191,Ar=fe[Me+12]&255|(fe[Me+13]&255)<<8,Nr+=(Ur>>>11|Ar<<5)&8191,Qn=fe[Me+14]&255|(fe[Me+15]&255)<<8,qr+=(Ar>>>8|Qn<<8)&8191,Gn+=Qn>>>5|J,an=0,wn=an,wn+=un*si,wn+=hn*(5*St),wn+=tr*(5*Ui),wn+=lr*(5*ri),wn+=Yt*(5*Ei),an=wn>>>13,wn&=8191,wn+=Or*(5*mn),wn+=Sr*(5*_i),wn+=Nr*(5*Rt),wn+=qr*(5*mi),wn+=Gn*(5*xi),an+=wn>>>13,wn&=8191,Pn=an,Pn+=un*xi,Pn+=hn*si,Pn+=tr*(5*St),Pn+=lr*(5*Ui),Pn+=Yt*(5*ri),an=Pn>>>13,Pn&=8191,Pn+=Or*(5*Ei),Pn+=Sr*(5*mn),Pn+=Nr*(5*_i),Pn+=qr*(5*Rt),Pn+=Gn*(5*mi),an+=Pn>>>13,Pn&=8191,Xr=an,Xr+=un*mi,Xr+=hn*xi,Xr+=tr*si,Xr+=lr*(5*St),Xr+=Yt*(5*Ui),an=Xr>>>13,Xr&=8191,Xr+=Or*(5*ri),Xr+=Sr*(5*Ei),Xr+=Nr*(5*mn),Xr+=qr*(5*_i),Xr+=Gn*(5*Rt),an+=Xr>>>13,Xr&=8191,_n=an,_n+=un*Rt,_n+=hn*mi,_n+=tr*xi,_n+=lr*si,_n+=Yt*(5*St),an=_n>>>13,_n&=8191,_n+=Or*(5*Ui),_n+=Sr*(5*ri),_n+=Nr*(5*Ei),_n+=qr*(5*mn),_n+=Gn*(5*_i),an+=_n>>>13,_n&=8191,Dn=an,Dn+=un*_i,Dn+=hn*Rt,Dn+=tr*mi,Dn+=lr*xi,Dn+=Yt*si,an=Dn>>>13,Dn&=8191,Dn+=Or*(5*St),Dn+=Sr*(5*Ui),Dn+=Nr*(5*ri),Dn+=qr*(5*Ei),Dn+=Gn*(5*mn),an+=Dn>>>13,Dn&=8191,Bn=an,Bn+=un*mn,Bn+=hn*_i,Bn+=tr*Rt,Bn+=lr*mi,Bn+=Yt*xi,an=Bn>>>13,Bn&=8191,Bn+=Or*si,Bn+=Sr*(5*St),Bn+=Nr*(5*Ui),Bn+=qr*(5*ri),Bn+=Gn*(5*Ei),an+=Bn>>>13,Bn&=8191,dn=an,dn+=un*Ei,dn+=hn*mn,dn+=tr*_i,dn+=lr*Rt,dn+=Yt*mi,an=dn>>>13,dn&=8191,dn+=Or*xi,dn+=Sr*si,dn+=Nr*(5*St),dn+=qr*(5*Ui),dn+=Gn*(5*ri),an+=dn>>>13,dn&=8191,Zr=an,Zr+=un*ri,Zr+=hn*Ei,Zr+=tr*mn,Zr+=lr*_i,Zr+=Yt*Rt,an=Zr>>>13,Zr&=8191,Zr+=Or*mi,Zr+=Sr*xi,Zr+=Nr*si,Zr+=qr*(5*St),Zr+=Gn*(5*Ui),an+=Zr>>>13,Zr&=8191,gn=an,gn+=un*Ui,gn+=hn*ri,gn+=tr*Ei,gn+=lr*mn,gn+=Yt*_i,an=gn>>>13,gn&=8191,gn+=Or*Rt,gn+=Sr*mi,gn+=Nr*xi,gn+=qr*si,gn+=Gn*(5*St),an+=gn>>>13,gn&=8191,rn=an,rn+=un*St,rn+=hn*Ui,rn+=tr*ri,rn+=lr*Ei,rn+=Yt*mn,an=rn>>>13,rn&=8191,rn+=Or*_i,rn+=Sr*Rt,rn+=Nr*mi,rn+=qr*xi,rn+=Gn*si,an+=rn>>>13,rn&=8191,an=(an<<2)+an|0,an=an+wn|0,wn=an&8191,an=an>>>13,Pn+=an,un=wn,hn=Pn,tr=Xr,lr=_n,Yt=Dn,Or=Bn,Sr=dn,Nr=Zr,qr=gn,Gn=rn,Me+=16,Be-=16;this.h[0]=un,this.h[1]=hn,this.h[2]=tr,this.h[3]=lr,this.h[4]=Yt,this.h[5]=Or,this.h[6]=Sr,this.h[7]=Nr,this.h[8]=qr,this.h[9]=Gn},h.prototype.finish=function(fe,Me){var Be=new Uint16Array(10),J,Te,Zt,Et;if(this.leftover){for(Et=this.leftover,this.buffer[Et++]=1;Et<16;Et++)this.buffer[Et]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(J=this.h[1]>>>13,this.h[1]&=8191,Et=2;Et<10;Et++)this.h[Et]+=J,J=this.h[Et]>>>13,this.h[Et]&=8191;for(this.h[0]+=J*5,J=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=J,J=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=J,Be[0]=this.h[0]+5,J=Be[0]>>>13,Be[0]&=8191,Et=1;Et<10;Et++)Be[Et]=this.h[Et]+J,J=Be[Et]>>>13,Be[Et]&=8191;for(Be[9]-=1<<13,Te=(J^1)-1,Et=0;Et<10;Et++)Be[Et]&=Te;for(Te=~Te,Et=0;Et<10;Et++)this.h[Et]=this.h[Et]&Te|Be[Et];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,Zt=this.h[0]+this.pad[0],this.h[0]=Zt&65535,Et=1;Et<8;Et++)Zt=(this.h[Et]+this.pad[Et]|0)+(Zt>>>16)|0,this.h[Et]=Zt&65535;fe[Me+0]=this.h[0]>>>0&255,fe[Me+1]=this.h[0]>>>8&255,fe[Me+2]=this.h[1]>>>0&255,fe[Me+3]=this.h[1]>>>8&255,fe[Me+4]=this.h[2]>>>0&255,fe[Me+5]=this.h[2]>>>8&255,fe[Me+6]=this.h[3]>>>0&255,fe[Me+7]=this.h[3]>>>8&255,fe[Me+8]=this.h[4]>>>0&255,fe[Me+9]=this.h[4]>>>8&255,fe[Me+10]=this.h[5]>>>0&255,fe[Me+11]=this.h[5]>>>8&255,fe[Me+12]=this.h[6]>>>0&255,fe[Me+13]=this.h[6]>>>8&255,fe[Me+14]=this.h[7]>>>0&255,fe[Me+15]=this.h[7]>>>8&255},h.prototype.update=function(fe,Me,Be){var J,Te;if(this.leftover){for(Te=16-this.leftover,Te>Be&&(Te=Be),J=0;J=16&&(Te=Be-Be%16,this.blocks(fe,Me,Te),Me+=Te,Be-=Te),Be){for(J=0;J>16&1),Zt[Be-1]&=65535;Zt[15]=Et[15]-32767-(Zt[14]>>16&1),Te=Zt[15]>>16&1,Zt[14]&=65535,w(Et,Zt,1-Te)}for(Be=0;Be<16;Be++)fe[2*Be]=Et[Be]&255,fe[2*Be+1]=Et[Be]>>8}function I(fe,Me){var Be=new Uint8Array(32),J=new Uint8Array(32);return d(Be,fe),d(J,Me),L(Be,0,J,0)}function $(fe){var Me=new Uint8Array(32);return d(Me,fe),Me[0]&1}function b(fe,Me){var Be;for(Be=0;Be<16;Be++)fe[Be]=Me[2*Be]+(Me[2*Be+1]<<8);fe[15]&=32767}function X(fe,Me,Be){for(var J=0;J<16;J++)fe[J]=Me[J]+Be[J]}function we(fe,Me,Be){for(var J=0;J<16;J++)fe[J]=Me[J]-Be[J]}function Ae(fe,Me,Be){var J,Te,Zt=0,Et=0,Kt=0,Lr=0,Ur=0,Ar=0,Qn=0,an=0,wn=0,Pn=0,Xr=0,_n=0,Dn=0,Bn=0,dn=0,Zr=0,gn=0,rn=0,un=0,hn=0,tr=0,lr=0,Yt=0,Or=0,Sr=0,Nr=0,qr=0,Gn=0,si=0,xi=0,mi=0,Rt=Be[0],_i=Be[1],mn=Be[2],Ei=Be[3],ri=Be[4],Ui=Be[5],St=Be[6],po=Be[7],Vi=Be[8],qi=Be[9],Mo=Be[10],ko=Be[11],Yo=Be[12],Lo=Be[13],Oo=Be[14],ti=Be[15];J=Me[0],Zt+=J*Rt,Et+=J*_i,Kt+=J*mn,Lr+=J*Ei,Ur+=J*ri,Ar+=J*Ui,Qn+=J*St,an+=J*po,wn+=J*Vi,Pn+=J*qi,Xr+=J*Mo,_n+=J*ko,Dn+=J*Yo,Bn+=J*Lo,dn+=J*Oo,Zr+=J*ti,J=Me[1],Et+=J*Rt,Kt+=J*_i,Lr+=J*mn,Ur+=J*Ei,Ar+=J*ri,Qn+=J*Ui,an+=J*St,wn+=J*po,Pn+=J*Vi,Xr+=J*qi,_n+=J*Mo,Dn+=J*ko,Bn+=J*Yo,dn+=J*Lo,Zr+=J*Oo,gn+=J*ti,J=Me[2],Kt+=J*Rt,Lr+=J*_i,Ur+=J*mn,Ar+=J*Ei,Qn+=J*ri,an+=J*Ui,wn+=J*St,Pn+=J*po,Xr+=J*Vi,_n+=J*qi,Dn+=J*Mo,Bn+=J*ko,dn+=J*Yo,Zr+=J*Lo,gn+=J*Oo,rn+=J*ti,J=Me[3],Lr+=J*Rt,Ur+=J*_i,Ar+=J*mn,Qn+=J*Ei,an+=J*ri,wn+=J*Ui,Pn+=J*St,Xr+=J*po,_n+=J*Vi,Dn+=J*qi,Bn+=J*Mo,dn+=J*ko,Zr+=J*Yo,gn+=J*Lo,rn+=J*Oo,un+=J*ti,J=Me[4],Ur+=J*Rt,Ar+=J*_i,Qn+=J*mn,an+=J*Ei,wn+=J*ri,Pn+=J*Ui,Xr+=J*St,_n+=J*po,Dn+=J*Vi,Bn+=J*qi,dn+=J*Mo,Zr+=J*ko,gn+=J*Yo,rn+=J*Lo,un+=J*Oo,hn+=J*ti,J=Me[5],Ar+=J*Rt,Qn+=J*_i,an+=J*mn,wn+=J*Ei,Pn+=J*ri,Xr+=J*Ui,_n+=J*St,Dn+=J*po,Bn+=J*Vi,dn+=J*qi,Zr+=J*Mo,gn+=J*ko,rn+=J*Yo,un+=J*Lo,hn+=J*Oo,tr+=J*ti,J=Me[6],Qn+=J*Rt,an+=J*_i,wn+=J*mn,Pn+=J*Ei,Xr+=J*ri,_n+=J*Ui,Dn+=J*St,Bn+=J*po,dn+=J*Vi,Zr+=J*qi,gn+=J*Mo,rn+=J*ko,un+=J*Yo,hn+=J*Lo,tr+=J*Oo,lr+=J*ti,J=Me[7],an+=J*Rt,wn+=J*_i,Pn+=J*mn,Xr+=J*Ei,_n+=J*ri,Dn+=J*Ui,Bn+=J*St,dn+=J*po,Zr+=J*Vi,gn+=J*qi,rn+=J*Mo,un+=J*ko,hn+=J*Yo,tr+=J*Lo,lr+=J*Oo,Yt+=J*ti,J=Me[8],wn+=J*Rt,Pn+=J*_i,Xr+=J*mn,_n+=J*Ei,Dn+=J*ri,Bn+=J*Ui,dn+=J*St,Zr+=J*po,gn+=J*Vi,rn+=J*qi,un+=J*Mo,hn+=J*ko,tr+=J*Yo,lr+=J*Lo,Yt+=J*Oo,Or+=J*ti,J=Me[9],Pn+=J*Rt,Xr+=J*_i,_n+=J*mn,Dn+=J*Ei,Bn+=J*ri,dn+=J*Ui,Zr+=J*St,gn+=J*po,rn+=J*Vi,un+=J*qi,hn+=J*Mo,tr+=J*ko,lr+=J*Yo,Yt+=J*Lo,Or+=J*Oo,Sr+=J*ti,J=Me[10],Xr+=J*Rt,_n+=J*_i,Dn+=J*mn,Bn+=J*Ei,dn+=J*ri,Zr+=J*Ui,gn+=J*St,rn+=J*po,un+=J*Vi,hn+=J*qi,tr+=J*Mo,lr+=J*ko,Yt+=J*Yo,Or+=J*Lo,Sr+=J*Oo,Nr+=J*ti,J=Me[11],_n+=J*Rt,Dn+=J*_i,Bn+=J*mn,dn+=J*Ei,Zr+=J*ri,gn+=J*Ui,rn+=J*St,un+=J*po,hn+=J*Vi,tr+=J*qi,lr+=J*Mo,Yt+=J*ko,Or+=J*Yo,Sr+=J*Lo,Nr+=J*Oo,qr+=J*ti,J=Me[12],Dn+=J*Rt,Bn+=J*_i,dn+=J*mn,Zr+=J*Ei,gn+=J*ri,rn+=J*Ui,un+=J*St,hn+=J*po,tr+=J*Vi,lr+=J*qi,Yt+=J*Mo,Or+=J*ko,Sr+=J*Yo,Nr+=J*Lo,qr+=J*Oo,Gn+=J*ti,J=Me[13],Bn+=J*Rt,dn+=J*_i,Zr+=J*mn,gn+=J*Ei,rn+=J*ri,un+=J*Ui,hn+=J*St,tr+=J*po,lr+=J*Vi,Yt+=J*qi,Or+=J*Mo,Sr+=J*ko,Nr+=J*Yo,qr+=J*Lo,Gn+=J*Oo,si+=J*ti,J=Me[14],dn+=J*Rt,Zr+=J*_i,gn+=J*mn,rn+=J*Ei,un+=J*ri,hn+=J*Ui,tr+=J*St,lr+=J*po,Yt+=J*Vi,Or+=J*qi,Sr+=J*Mo,Nr+=J*ko,qr+=J*Yo,Gn+=J*Lo,si+=J*Oo,xi+=J*ti,J=Me[15],Zr+=J*Rt,gn+=J*_i,rn+=J*mn,un+=J*Ei,hn+=J*ri,tr+=J*Ui,lr+=J*St,Yt+=J*po,Or+=J*Vi,Sr+=J*qi,Nr+=J*Mo,qr+=J*ko,Gn+=J*Yo,si+=J*Lo,xi+=J*Oo,mi+=J*ti,Zt+=38*gn,Et+=38*rn,Kt+=38*un,Lr+=38*hn,Ur+=38*tr,Ar+=38*lr,Qn+=38*Yt,an+=38*Or,wn+=38*Sr,Pn+=38*Nr,Xr+=38*qr,_n+=38*Gn,Dn+=38*si,Bn+=38*xi,dn+=38*mi,Te=1,J=Zt+Te+65535,Te=Math.floor(J/65536),Zt=J-Te*65536,J=Et+Te+65535,Te=Math.floor(J/65536),Et=J-Te*65536,J=Kt+Te+65535,Te=Math.floor(J/65536),Kt=J-Te*65536,J=Lr+Te+65535,Te=Math.floor(J/65536),Lr=J-Te*65536,J=Ur+Te+65535,Te=Math.floor(J/65536),Ur=J-Te*65536,J=Ar+Te+65535,Te=Math.floor(J/65536),Ar=J-Te*65536,J=Qn+Te+65535,Te=Math.floor(J/65536),Qn=J-Te*65536,J=an+Te+65535,Te=Math.floor(J/65536),an=J-Te*65536,J=wn+Te+65535,Te=Math.floor(J/65536),wn=J-Te*65536,J=Pn+Te+65535,Te=Math.floor(J/65536),Pn=J-Te*65536,J=Xr+Te+65535,Te=Math.floor(J/65536),Xr=J-Te*65536,J=_n+Te+65535,Te=Math.floor(J/65536),_n=J-Te*65536,J=Dn+Te+65535,Te=Math.floor(J/65536),Dn=J-Te*65536,J=Bn+Te+65535,Te=Math.floor(J/65536),Bn=J-Te*65536,J=dn+Te+65535,Te=Math.floor(J/65536),dn=J-Te*65536,J=Zr+Te+65535,Te=Math.floor(J/65536),Zr=J-Te*65536,Zt+=Te-1+37*(Te-1),Te=1,J=Zt+Te+65535,Te=Math.floor(J/65536),Zt=J-Te*65536,J=Et+Te+65535,Te=Math.floor(J/65536),Et=J-Te*65536,J=Kt+Te+65535,Te=Math.floor(J/65536),Kt=J-Te*65536,J=Lr+Te+65535,Te=Math.floor(J/65536),Lr=J-Te*65536,J=Ur+Te+65535,Te=Math.floor(J/65536),Ur=J-Te*65536,J=Ar+Te+65535,Te=Math.floor(J/65536),Ar=J-Te*65536,J=Qn+Te+65535,Te=Math.floor(J/65536),Qn=J-Te*65536,J=an+Te+65535,Te=Math.floor(J/65536),an=J-Te*65536,J=wn+Te+65535,Te=Math.floor(J/65536),wn=J-Te*65536,J=Pn+Te+65535,Te=Math.floor(J/65536),Pn=J-Te*65536,J=Xr+Te+65535,Te=Math.floor(J/65536),Xr=J-Te*65536,J=_n+Te+65535,Te=Math.floor(J/65536),_n=J-Te*65536,J=Dn+Te+65535,Te=Math.floor(J/65536),Dn=J-Te*65536,J=Bn+Te+65535,Te=Math.floor(J/65536),Bn=J-Te*65536,J=dn+Te+65535,Te=Math.floor(J/65536),dn=J-Te*65536,J=Zr+Te+65535,Te=Math.floor(J/65536),Zr=J-Te*65536,Zt+=Te-1+37*(Te-1),fe[0]=Zt,fe[1]=Et,fe[2]=Kt,fe[3]=Lr,fe[4]=Ur,fe[5]=Ar,fe[6]=Qn,fe[7]=an,fe[8]=wn,fe[9]=Pn,fe[10]=Xr,fe[11]=_n,fe[12]=Dn,fe[13]=Bn,fe[14]=dn,fe[15]=Zr}function je(fe,Me){Ae(fe,Me,Me)}function Vt(fe,Me){var Be=r(),J;for(J=0;J<16;J++)Be[J]=Me[J];for(J=253;J>=0;J--)je(Be,Be),J!==2&&J!==4&&Ae(Be,Be,Me);for(J=0;J<16;J++)fe[J]=Be[J]}function De(fe,Me){var Be=r(),J;for(J=0;J<16;J++)Be[J]=Me[J];for(J=250;J>=0;J--)je(Be,Be),J!==1&&Ae(Be,Be,Me);for(J=0;J<16;J++)fe[J]=Be[J]}function Fe(fe,Me,Be){var J=new Uint8Array(32),Te=new Float64Array(80),Zt,Et,Kt=r(),Lr=r(),Ur=r(),Ar=r(),Qn=r(),an=r();for(Et=0;Et<31;Et++)J[Et]=Me[Et];for(J[31]=Me[31]&127|64,J[0]&=248,b(Te,Be),Et=0;Et<16;Et++)Lr[Et]=Te[Et],Ar[Et]=Kt[Et]=Ur[Et]=0;for(Kt[0]=Ar[0]=1,Et=254;Et>=0;--Et)Zt=J[Et>>>3]>>>(Et&7)&1,w(Kt,Lr,Zt),w(Ur,Ar,Zt),X(Qn,Kt,Ur),we(Kt,Kt,Ur),X(Ur,Lr,Ar),we(Lr,Lr,Ar),je(Ar,Qn),je(an,Kt),Ae(Kt,Ur,Kt),Ae(Ur,Lr,Qn),X(Qn,Kt,Ur),we(Kt,Kt,Ur),je(Lr,Kt),we(Ur,Ar,an),Ae(Kt,Ur,c),X(Kt,Kt,Ar),Ae(Ur,Ur,Kt),Ae(Kt,Ar,an),Ae(Ar,Lr,Te),je(Lr,Qn),w(Kt,Lr,Zt),w(Ur,Ar,Zt);for(Et=0;Et<16;Et++)Te[Et+16]=Kt[Et],Te[Et+32]=Ur[Et],Te[Et+48]=Lr[Et],Te[Et+64]=Ar[Et];var wn=Te.subarray(32),Pn=Te.subarray(16);return Vt(wn,wn),Ae(Pn,Pn,wn),d(fe,Pn),0}function wt(fe,Me){return Fe(fe,Me,o)}function Ke(fe,Me){return n(Me,32),wt(fe,Me)}function ht(fe,Me,Be){var J=new Uint8Array(32);return Fe(J,Be,Me),q(fe,a,J,Z)}var dr=u,ae=f;function Ve(fe,Me,Be,J,Te,Zt){var Et=new Uint8Array(32);return ht(Et,Te,Zt),dr(fe,Me,Be,J,Et)}function Nt(fe,Me,Be,J,Te,Zt){var Et=new Uint8Array(32);return ht(Et,Te,Zt),ae(fe,Me,Be,J,Et)}var Ee=[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 xe(fe,Me,Be,J){for(var Te=new Int32Array(16),Zt=new Int32Array(16),Et,Kt,Lr,Ur,Ar,Qn,an,wn,Pn,Xr,_n,Dn,Bn,dn,Zr,gn,rn,un,hn,tr,lr,Yt,Or,Sr,Nr,qr,Gn=fe[0],si=fe[1],xi=fe[2],mi=fe[3],Rt=fe[4],_i=fe[5],mn=fe[6],Ei=fe[7],ri=Me[0],Ui=Me[1],St=Me[2],po=Me[3],Vi=Me[4],qi=Me[5],Mo=Me[6],ko=Me[7],Yo=0;J>=128;){for(hn=0;hn<16;hn++)tr=8*hn+Yo,Te[hn]=Be[tr+0]<<24|Be[tr+1]<<16|Be[tr+2]<<8|Be[tr+3],Zt[hn]=Be[tr+4]<<24|Be[tr+5]<<16|Be[tr+6]<<8|Be[tr+7];for(hn=0;hn<80;hn++)if(Et=Gn,Kt=si,Lr=xi,Ur=mi,Ar=Rt,Qn=_i,an=mn,wn=Ei,Pn=ri,Xr=Ui,_n=St,Dn=po,Bn=Vi,dn=qi,Zr=Mo,gn=ko,lr=Ei,Yt=ko,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=(Rt>>>14|Vi<<32-14)^(Rt>>>18|Vi<<32-18)^(Vi>>>41-32|Rt<<32-(41-32)),Yt=(Vi>>>14|Rt<<32-14)^(Vi>>>18|Rt<<32-18)^(Rt>>>41-32|Vi<<32-(41-32)),Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,lr=Rt&_i^~Rt&mn,Yt=Vi&qi^~Vi&Mo,Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,lr=Ee[hn*2],Yt=Ee[hn*2+1],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,lr=Te[hn%16],Yt=Zt[hn%16],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,rn=Nr&65535|qr<<16,un=Or&65535|Sr<<16,lr=rn,Yt=un,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=(Gn>>>28|ri<<32-28)^(ri>>>34-32|Gn<<32-(34-32))^(ri>>>39-32|Gn<<32-(39-32)),Yt=(ri>>>28|Gn<<32-28)^(Gn>>>34-32|ri<<32-(34-32))^(Gn>>>39-32|ri<<32-(39-32)),Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,lr=Gn&si^Gn&xi^si&xi,Yt=ri&Ui^ri&St^Ui&St,Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,wn=Nr&65535|qr<<16,gn=Or&65535|Sr<<16,lr=Ur,Yt=Dn,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=rn,Yt=un,Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,Ur=Nr&65535|qr<<16,Dn=Or&65535|Sr<<16,si=Et,xi=Kt,mi=Lr,Rt=Ur,_i=Ar,mn=Qn,Ei=an,Gn=wn,Ui=Pn,St=Xr,po=_n,Vi=Dn,qi=Bn,Mo=dn,ko=Zr,ri=gn,hn%16===15)for(tr=0;tr<16;tr++)lr=Te[tr],Yt=Zt[tr],Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=Te[(tr+9)%16],Yt=Zt[(tr+9)%16],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,rn=Te[(tr+1)%16],un=Zt[(tr+1)%16],lr=(rn>>>1|un<<32-1)^(rn>>>8|un<<32-8)^rn>>>7,Yt=(un>>>1|rn<<32-1)^(un>>>8|rn<<32-8)^(un>>>7|rn<<32-7),Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,rn=Te[(tr+14)%16],un=Zt[(tr+14)%16],lr=(rn>>>19|un<<32-19)^(un>>>61-32|rn<<32-(61-32))^rn>>>6,Yt=(un>>>19|rn<<32-19)^(rn>>>61-32|un<<32-(61-32))^(un>>>6|rn<<32-6),Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,Te[tr]=Nr&65535|qr<<16,Zt[tr]=Or&65535|Sr<<16;lr=Gn,Yt=ri,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[0],Yt=Me[0],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[0]=Gn=Nr&65535|qr<<16,Me[0]=ri=Or&65535|Sr<<16,lr=si,Yt=Ui,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[1],Yt=Me[1],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[1]=si=Nr&65535|qr<<16,Me[1]=Ui=Or&65535|Sr<<16,lr=xi,Yt=St,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[2],Yt=Me[2],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[2]=xi=Nr&65535|qr<<16,Me[2]=St=Or&65535|Sr<<16,lr=mi,Yt=po,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[3],Yt=Me[3],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[3]=mi=Nr&65535|qr<<16,Me[3]=po=Or&65535|Sr<<16,lr=Rt,Yt=Vi,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[4],Yt=Me[4],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[4]=Rt=Nr&65535|qr<<16,Me[4]=Vi=Or&65535|Sr<<16,lr=_i,Yt=qi,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[5],Yt=Me[5],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[5]=_i=Nr&65535|qr<<16,Me[5]=qi=Or&65535|Sr<<16,lr=mn,Yt=Mo,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[6],Yt=Me[6],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[6]=mn=Nr&65535|qr<<16,Me[6]=Mo=Or&65535|Sr<<16,lr=Ei,Yt=ko,Or=Yt&65535,Sr=Yt>>>16,Nr=lr&65535,qr=lr>>>16,lr=fe[7],Yt=Me[7],Or+=Yt&65535,Sr+=Yt>>>16,Nr+=lr&65535,qr+=lr>>>16,Sr+=Or>>>16,Nr+=Sr>>>16,qr+=Nr>>>16,fe[7]=Ei=Nr&65535|qr<<16,Me[7]=ko=Or&65535|Sr<<16,Yo+=128,J-=128}return J}function ut(fe,Me,Be){var J=new Int32Array(8),Te=new Int32Array(8),Zt=new Uint8Array(256),Et,Kt=Be;for(J[0]=1779033703,J[1]=3144134277,J[2]=1013904242,J[3]=2773480762,J[4]=1359893119,J[5]=2600822924,J[6]=528734635,J[7]=1541459225,Te[0]=4089235720,Te[1]=2227873595,Te[2]=4271175723,Te[3]=1595750129,Te[4]=2917565137,Te[5]=725511199,Te[6]=4215389547,Te[7]=327033209,xe(J,Te,Me,Be),Be%=128,Et=0;Et=0;--Te)J=Be[Te/8|0]>>(Te&7)&1,_t(fe,Me,J),st(Me,fe),st(fe,fe),_t(fe,Me,J)}function ve(fe,Me){var Be=[r(),r(),r(),r()];y(Be[0],_),y(Be[1],T),y(Be[2],l),Ae(Be[3],_,T),Ut(fe,Be,Me)}function ye(fe,Me,Be){var J=new Uint8Array(64),Te=[r(),r(),r(),r()],Zt;for(Be||n(Me,32),ut(J,Me,32),J[0]&=248,J[31]&=127,J[31]|=64,ve(Te,J),Pt(fe,Te),Zt=0;Zt<32;Zt++)Me[Zt+32]=fe[Zt];return 0}var me=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 Q(fe,Me){var Be,J,Te,Zt;for(J=63;J>=32;--J){for(Be=0,Te=J-32,Zt=J-12;Te>4)*me[Te],Be=Me[Te]>>8,Me[Te]&=255;for(Te=0;Te<32;Te++)Me[Te]-=Be*me[Te];for(J=0;J<32;J++)Me[J+1]+=Me[J]>>8,fe[J]=Me[J]&255}function j(fe){var Me=new Float64Array(64),Be;for(Be=0;Be<64;Be++)Me[Be]=fe[Be];for(Be=0;Be<64;Be++)fe[Be]=0;Q(fe,Me)}function F(fe,Me,Be,J){var Te=new Uint8Array(64),Zt=new Uint8Array(64),Et=new Uint8Array(64),Kt,Lr,Ur=new Float64Array(64),Ar=[r(),r(),r(),r()];ut(Te,J,32),Te[0]&=248,Te[31]&=127,Te[31]|=64;var Qn=Be+64;for(Kt=0;Kt>7&&we(fe[0],s,fe[0]),Ae(fe[3],fe[0],fe[1]),0)}function de(fe,Me,Be,J){var Te,Zt=new Uint8Array(32),Et=new Uint8Array(64),Kt=[r(),r(),r(),r()],Lr=[r(),r(),r(),r()];if(Be<64||ie(Lr,J))return-1;for(Te=0;Te=0},t.sign.keyPair=function(){var fe=new Uint8Array(kr),Me=new Uint8Array(ai);return ye(fe,Me),{publicKey:fe,secretKey:Me}},t.sign.keyPair.fromSecretKey=function(fe){if(Dr(fe),fe.length!==ai)throw new Error("bad secret key size");for(var Me=new Uint8Array(kr),Be=0;Bet.toLowerCase().trim())}async function GC(e){return(await(0,VC.pbkdf2_sha512)(e,"TON seed version",Math.max(1,Math.floor(HD/256)),64))[0]==0}async function Vhe(e){return(await(0,VC.pbkdf2_sha512)(e,"TON fast seed version",1,64))[0]==1}async function Vv(e,t){return await(0,Khe.hmac_sha512)(e.join(" "),t&&t.length>0?t:"")}Ls.mnemonicToEntropy=Vv;async function VD(e,t,r){const n=await Vv(e,r);return(await(0,VC.pbkdf2_sha512)(n,t,HD,64)).slice(0,32)}Ls.mnemonicToSeed=VD;async function GD(e,t){e=KD(e);const r=await VD(e,"TON default seed",t);let n=zD.default.sign.keyPair.fromSeed(r);return{publicKey:Buffer.from(n.publicKey),secretKey:Buffer.from(n.secretKey)}}Ls.mnemonicToPrivateKey=GD;async function Ghe(e,t){let n=(await GD(e,t)).secretKey.slice(0,32);const a=zD.default.sign.keyPair.fromSeed(n);return{publicKey:Buffer.from(a.publicKey),secretKey:Buffer.from(a.secretKey)}}Ls.mnemonicToWalletKey=Ghe;async function Yhe(e,t){e=KD(e);for(let r of e)if(K4.wordlist.indexOf(r)<0)return!1;return t&&t.length>0&&!await qD(e)?!1:await GC(await Vv(e,t))}Ls.mnemonicValidate=Yhe;async function Xhe(e=24,t){let r=[];for(;;){r=[];for(let n=0;n0&&!await qD(r))&&!!await GC(await Vv(r,t)))break}return r}Ls.mnemonicNew=Xhe;var ks={},Qhe=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ks,"__esModule",{value:!0});ks.openBox=ks.sealBox=ks.signVerify=ks.sign=ks.keyPairFromSeed=ks.keyPairFromSecretKey=void 0;const m0=Qhe(qv.exports);function Zhe(e){let t=m0.default.sign.keyPair.fromSecretKey(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}ks.keyPairFromSecretKey=Zhe;function Jhe(e){let t=m0.default.sign.keyPair.fromSeed(new Uint8Array(e));return{publicKey:Buffer.from(t.publicKey),secretKey:Buffer.from(t.secretKey)}}ks.keyPairFromSeed=Jhe;function epe(e,t){return Buffer.from(m0.default.sign.detached(new Uint8Array(e),new Uint8Array(t)))}ks.sign=epe;function tpe(e,t,r){return m0.default.sign.detached.verify(new Uint8Array(e),new Uint8Array(t),new Uint8Array(r))}ks.signVerify=tpe;function rpe(e,t,r){return Buffer.from(m0.default.secretbox(e,t,r))}ks.sealBox=rpe;function npe(e,t,r){let n=m0.default.secretbox.open(e,t,r);return n?Buffer.from(n):null}ks.openBox=npe;var yx={},bx={};Object.defineProperty(bx,"__esModule",{value:!0});bx.wordlist=void 0;bx.wordlist=["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","coastline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dish","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","euphemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","giddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungrily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasses","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastrami","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","recycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","tingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unusable","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"];Object.defineProperty(yx,"__esModule",{value:!0});yx.newSecureWords=void 0;const ipe=Hu,bP=bx;async function ope(e=6){let t=[];for(let r=0;r>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1,t=t&1?t>>>1^nf:t>>>1;t=t^4294967295;let r=Buffer.alloc(4);return r.writeInt32LE(t),r}wx.crc32c=spe;var xx={};Object.defineProperty(xx,"__esModule",{value:!0});xx.topologicalSort=void 0;function lpe(e){let t=[e],r=new Map,n=new Set,a=[];for(;t.length>0;){const p=[...t];t=[];for(let m of p){const _=m.hash().toString("hex");if(!r.has(_)){n.add(_),r.set(_,{cell:m,refs:m.refs.map(T=>T.hash().toString("hex"))});for(let T of m.refs)t.push(T)}}}let o=new Set;function s(p){if(!!n.has(p)){if(o.has(p))throw Error("Not a DAG");o.add(p);for(let m of r.get(p).refs)s(m);a.unshift(p),o.delete(p),n.delete(p)}}for(;n.size>0;){const p=Array.from(n)[0];s(p)}let l=new Map;for(let p=0;pl.get(_))})}return c}xx.topologicalSort=lpe;var _P;function upe(){if(_P)return Xa;_P=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.serializeToBoc=Xa.deserializeBoc=Xa.deserializeCellData=Xa.parseBocHeader=Xa.hashCell=Xa.getMaxLevel=Xa.getMaxDepth=void 0;const e=Zf(),t=Go(),r=wx,n=xx,a=Buffer.from("B5EE9C72","hex"),o=Buffer.from("68ff65f3","hex"),s=Buffer.from("acc3a728","hex");let l=null;function c(V){if(!l)throw Error("No cache context");let te=V[l];return te||(te={hash:null,maxDepth:null},V[l]=te),te}function p(V,te){let R=!1;l||(R=!0,l=Symbol());let h=c(V);try{return te(h)}finally{R&&(l=null)}}function m(V){return p(V,te=>{if(te.maxDepth!==null)return te.maxDepth;let R=0;if(V.refs.length>0){for(let h in V.refs){const g=V.refs[h];m(g)>R&&(R=m(g))}R=R+1}return te.maxDepth=R,R})}Xa.getMaxDepth=m;function _(V){return 0}Xa.getMaxLevel=_;function T(V){return V.refs.length+(V.isExotic?1:0)*8+_()*32}function O(V){let te=V.bits.cursor;return V.isExotic&&(te+=8),Math.ceil(te/8)+Math.floor(te/8)}function A(V){const te=V.bits.getTopUppedLength(),R=Buffer.alloc(2+te+(2+32)*V.refs.length);let h=0;R[h++]=T(V),R[h++]=O(V),V.bits.writeTopUppedArray(R,h),h+=te;for(const g of V.refs){const v=m(g);R[h++]=Math.floor(v/256),R[h++]=v%256}for(const g of V.refs)g.hash().copy(R,h),h+=32;return R}function M(V){return p(V,te=>{if(te.hash)return te.hash;let R=(0,e.sha256_sync)(A(V));return te.hash=R,R})}Xa.hashCell=M;function B(V,te){let R=0;for(let h=0;h=0;u--){let f=g[u];for(let y=0;y=0;g--)V[te++]=R>>g*8&255}function ee(V,te=!0,R=!0,h=!1,g=0){return p(V,()=>{const v=V,u=(0,n.topologicalSort)(v),f=u.length,y=f.toString(2).length,S=Math.max(Math.ceil(y/8),1),w=u.map((Ae,je)=>Y(Ae.cell,S));let d=0,I=[];for(let Ae=0;Ae{Z(X,we,I[je],b),we+=b});for(let Ae=0;Aethis.toString(),this.kind=c,this.bits=p}static fromBoc(c){return(0,n.deserializeBoc)(typeof c=="string"?Buffer.from(c,"hex"):c)}get isExotic(){return this.kind!=="ordinary"}beginParse(){if(this.isExotic)throw Error("Unable to parse exotic cell");return o.Slice.fromCell(this)}writeCell(c){this.bits.writeBitString(c.bits);for(let p of c.refs)this.refs.push(p)}hash(){return(0,n.hashCell)(this)}toBoc(c){let p=c&&c.idx!==null&&c.idx!==void 0?c.idx:!0,m=c&&c.crc32!==null&&c.crc32!==void 0?c.crc32:!0,_=c&&c.cacheBits!==null&&c.cacheBits!==void 0?c.cacheBits:!1,T=c&&c.flags!==null&&c.flags!==void 0?c.flags:0;return(0,n.serializeToBoc)(this,p,m,_,T)}toString(c){let p=c||"",m=p+"x{"+this.bits.toFiftHex()+`} -`;for(let _ in this.refs){const T=this.refs[_];m+=T.toString(p+" ")}return m}toDebugString(c){let p=c||"";this.isExotic&&(p+="(exotic)");let m=p+"x{"+this.bits.toFiftHex()+`} -`;for(let _ in this.refs){const T=this.refs[_];m+=T.toString(p+" ")}return m}withReference(c){return this.refs.push(c),this}withData(c){for(let p of c)p==="0"?this.bits.writeBit(0):this.bits.writeBit(1);return this}equals(c){if(c.refs.length!==this.refs.length)return!1;for(let p=0;p0;)r<<=1,a&o&&(r+=1),o>>=1,r>65535&&(r&=65535,r^=4129)}return Buffer.from([Math.floor(r/256),r%256])}Gv.crc16=cpe;var fpe=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},YD;Object.defineProperty(v0,"__esModule",{value:!0});v0.Address=void 0;const dpe=fpe(dx),XD=Gv,V4=17,QD=81,G4=128;function EP(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.slice(0,34),n=t.slice(34,36),a=(0,XD.crc16)(r);if(!(a[0]===n[0]&&a[1]===n[1]))throw new Error("Invalid checksum: "+e);let o=r[0],s=!1,l=!1;if(o&G4&&(s=!0,o=o^G4),o!==V4&&o!==QD)throw"Unknown address tag";l=o===V4;let c=null;r[1]===255?c=-1:c=r[1];const p=r.slice(2,34);return{isTestOnly:s,isBounceable:l,workchain:c,hashPart:p}}class lf{constructor(t,r){this.toString=()=>this.workChain+":"+this.hash.toString("hex"),this.toBuffer=()=>{const n=Buffer.alloc(36);return n.set(this.hash),n.set([this.workChain,this.workChain,this.workChain,this.workChain],32),n},this.toFriendlyBuffer=n=>{let a=n&&n.testOnly!==void 0?n.testOnly:!1,s=(n&&n.bounceable!==void 0?n.bounceable:!0)?V4:QD;a&&(s|=G4);const l=Buffer.alloc(34);l[0]=s,l[1]=this.workChain,l.set(this.hash,2);const c=Buffer.alloc(36);return c.set(l),c.set((0,XD.crc16)(l),34),c},this.toFriendly=n=>{let a=n&&n.urlSafe!==void 0?n.urlSafe:!0,o=this.toFriendlyBuffer(n);return a?o.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):o.toString("base64")},this[YD]=()=>this.toFriendly(),this.workChain=t,this.hash=r,Object.freeze(this)}static isAddress(t){return t instanceof lf}static isFriendly(t){return t.indexOf(":")<0}static normalize(t){return typeof t=="string"?lf.parse(t).toFriendly():t.toFriendly()}static parse(t){return lf.isFriendly(t)?this.parseFriendly(t).address:this.parseRaw(t)}static parseRaw(t){let r=parseInt(t.split(":")[0]),n=Buffer.from(t.split(":")[1],"hex");return new lf(r,n)}static parseFriendly(t){if(Buffer.isBuffer(t)){let r=EP(t);return{isBounceable:r.isBounceable,isTestOnly:r.isTestOnly,address:new lf(r.workchain,r.hashPart)}}else{let r=t.replace(/\-/g,"+").replace(/_/g,"/"),n=EP(r);return{isBounceable:n.isBounceable,isTestOnly:n.isTestOnly,address:new lf(n.workchain,n.hashPart)}}}equals(t){return t.workChain!==this.workChain?!1:t.hash.equals(this.hash)}}v0.Address=lf;YD=dpe.default;var Yv={};function xa(e){return e}function ZD(e){return function(){return e}}var hpe=ZD(null),ppe=ZD(void 0);function Jf(e,t,r,n,a,o,s,l,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return r(t(e.apply(this,arguments)))};case 4:return function(){return n(r(t(e.apply(this,arguments))))};case 5:return function(){return a(n(r(t(e.apply(this,arguments)))))};case 6:return function(){return o(a(n(r(t(e.apply(this,arguments))))))};case 7:return function(){return s(o(a(n(r(t(e.apply(this,arguments)))))))};case 8:return function(){return l(s(o(a(n(r(t(e.apply(this,arguments))))))))};case 9:return function(){return c(l(s(o(a(n(r(t(e.apply(this,arguments)))))))))}}}function Jr(e,t,r,n,a,o,s,l,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return r(t(e));case 4:return n(r(t(e)));case 5:return a(n(r(t(e))));case 6:return o(a(n(r(t(e)))));case 7:return s(o(a(n(r(t(e))))));case 8:return l(s(o(a(n(r(t(e)))))));case 9:return c(l(s(o(a(n(r(t(e))))))));default:{for(var p=arguments[0],m=1;m0},QC=function(e){return e[0]},ype=function(e){return e.slice(1)},JD=[],Ex={},Ga=Object.prototype.hasOwnProperty,bpe=function(e){return mpe([e[0]],e.slice(1),!0)};function Qv(e){return function(t){return function(r){return e.ap(e.map(r,function(n){return function(){return n}}),t)}}}function Zv(e){return function(t){return function(r){return e.ap(e.map(r,function(){return function(n){return n}}),t)}}}function Cx(e){return function(t,r){return function(n){return e.ap(e.map(n,function(a){return function(o){var s;return Object.assign({},a,(s={},s[t]=o,s))}}),r)}}}function Mx(e){return function(t){return{concat:function(r,n){return e.ap(e.map(r,function(a){return function(o){return t.concat(a,o)}}),n)}}}}function Jv(e){return function(t){return function(r){return e.map(r,function(n){return n(t)})}}}function kx(e){return function(t){return function(r){return e.map(r,function(n){var a;return a={},a[t]=n,a})}}}function Rx(e){return function(t,r){return function(n){return e.map(n,function(a){var o;return Object.assign({},a,(o={},o[t]=r(a),o))})}}}function ZC(e){var t=Mx(e);return function(r){return{concat:t(r).concat,empty:e.of(r.empty)}}}function y0(e){return function(t){return function(r){return e.chain(r,function(n){return e.map(t(n),function(){return n})})}}}function Ax(e){return function(t,r){return function(n){return e.chain(n,function(a){return e.map(r(a),function(o){var s;return Object.assign({},a,(s={},s[t]=o,s))})})}}}var wpe=function(e,t){for(var r=t(e);r._tag==="Left";)r=t(r.left);return r.right};function e$(e){return function(t){return function(r){return e.fromEither(YC(r)?_x(t()):Sx(r.value))}}}function xpe(e){return function(t,r){return function(n){return e.fromEither(t(n)?Sx(n):_x(r(n)))}}}function t$(e){var t=e$(e);return function(r){var n=t(r);return function(a){return Jf(a,n)}}}function _pe(e,t){var r=t$(e);return function(n){var a=r(n);return function(o){return function(s){return t.chain(s,a(o))}}}}function Tx(e){return function(t){return Jf(t,e.fromEither)}}function Spe(e,t){var r=Tx(e);return function(n){return function(a){return t.chain(a,r(n))}}}function Epe(e,t){return Jf(Tx(e),y0(t))}function Cpe(e,t){return function(r,n){return function(a){return t.chain(a,function(o){return e.fromEither(r(o)?Sx(o):_x(n(o)))})}}}var Ha=function(e,t){return{left:e,right:t}};function ey(e,t){return function(r){var n=e.traverse(r);return function(a,o){return r.map(n(a,o),t.separate)}}}function ty(e,t){return function(r){var n=e.traverse(r);return function(a,o){return r.map(n(a,o),t.compact)}}}function Mpe(e){return function(t){var r=e.wither(t);return function(n){return function(a){return r(a,function(o){return t.map(n(o),function(s){return s?Sa(o):ca})})}}}}var ws=_x,Uo=Sx,_s=function(e,t){return Jr(e,o$(t))},vh=function(e,t){return Jr(e,s$(t))},b0=function(e,t){return Jr(e,oM(t))},ry=function(e,t,r){return Jr(e,u$(t,r))},ny=function(e){return function(t,r){var n=c$(e);return Jr(t,n(r))}},iy=function(e,t,r){return Jr(e,f$(t,r))},Ix=function(e){var t=d$(e);return function(r,n){return Jr(r,t(n))}},JC=function(e,t,r){return Jr(e,h$(t,r))},eM=function(e,t){return Jr(e,p$(t))},r$=function(e,t){return Jr(e,m$(t))},tM=function(e,t){return Jr(e,aM(t))},rM=function(e,t){return wpe(t(e),function(r){return qn(r)?Uo(ws(r.left)):qn(r.right)?ws(t(r.right.left)):Uo(Uo(r.right.right))})},va="Either",kpe=function(e,t){return{show:function(r){return qn(r)?"left(".concat(e.show(r.left),")"):"right(".concat(t.show(r.right),")")}}},Rpe=function(e,t){return{equals:function(r,n){return r===n||(qn(r)?qn(n)&&e.equals(r.left,n.left):sM(n)&&t.equals(r.right,n.right))}}},Ape=function(e){return{concat:function(t,r){return qn(r)?t:qn(t)?r:Uo(e.concat(t.right,r.right))}}},nM=function(e){var t=ws(e.empty);return{URI:va,_E:void 0,compact:function(r){return qn(r)?r:r.right._tag==="None"?t:Uo(r.right.value)},separate:function(r){return qn(r)?Ha(r,r):qn(r.right)?Ha(Uo(r.right.left),t):Ha(t,Uo(r.right.right))}}},n$=function(e){var t=ws(e.empty),r=nM(e),n=r.compact,a=r.separate,o=function(l,c){return qn(l)||c(l.right)?l:t},s=function(l,c){return qn(l)?Ha(l,l):c(l.right)?Ha(t,Uo(l.right)):Ha(Uo(l.right),t)};return{URI:va,_E:void 0,map:_s,compact:n,separate:a,filter:o,filterMap:function(l,c){if(qn(l))return l;var p=c(l.right);return p._tag==="None"?t:Uo(p.value)},partition:s,partitionMap:function(l,c){if(qn(l))return Ha(l,l);var p=c(l.right);return qn(p)?Ha(Uo(p.left),t):Ha(t,Uo(p.right))}}},Tpe=function(e){var t=n$(e),r=nM(e);return{URI:va,_E:void 0,map:_s,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:Ix,sequence:sy,reduce:ry,foldMap:ny,reduceRight:iy,wither:ty(Y4,r),wilt:ey(Y4,r)}},Px=function(e){return{URI:va,_E:void 0,map:_s,ap:function(t,r){return qn(t)?qn(r)?ws(e.concat(t.left,r.left)):t:qn(r)?r:Uo(t.right(r.right))},of:ec}},i$=function(e){return{URI:va,_E:void 0,map:_s,alt:function(t,r){if(sM(t))return t;var n=r();return qn(n)?ws(e.concat(t.left,n.left)):n}}},o$=function(e){return function(t){return qn(t)?t:Uo(e(t.right))}},Ox={URI:va,map:_s},ec=Uo,Ipe={URI:va,of:ec},a$=function(e){return function(t){return qn(t)?t:qn(e)?e:Uo(t.right(e.right))}},s$=a$,oy={URI:va,map:_s,ap:vh},l$={URI:va,map:_s,ap:vh,of:ec},iM=function(e){return function(t){return qn(t)?t:e(t.right)}},oM=iM,ay={URI:va,map:_s,ap:vh,chain:b0},Ppe={URI:va,map:_s,ap:vh,of:ec,chain:b0},u$=function(e,t){return function(r){return qn(r)?e:t(e,r.right)}},c$=function(e){return function(t){return function(r){return qn(r)?e.empty:t(r.right)}}},f$=function(e,t){return function(r){return qn(r)?e:t(r.right,e)}},Ope={URI:va,reduce:ry,foldMap:ny,reduceRight:iy},d$=function(e){return function(t){return function(r){return qn(r)?e.of(ws(r.left)):e.map(t(r.right),Uo)}}},sy=function(e){return function(t){return qn(t)?e.of(ws(t.left)):e.map(t.right,Uo)}},Y4={URI:va,map:_s,reduce:ry,foldMap:ny,reduceRight:iy,traverse:Ix,sequence:sy},h$=function(e,t){return function(r){return qn(r)?ws(e(r.left)):Uo(t(r.right))}},p$=function(e){return function(t){return qn(t)?ws(e(t.left)):t}},Bpe={URI:va,bimap:JC,mapLeft:eM},g$=function(e){return function(t){return qn(t)?e():t}},m$=g$,Upe={URI:va,map:_s,alt:r$},aM=function(e){return function(t){return qn(t)?t:Uo(e(t))}},Npe={URI:va,map:_s,extend:tM},Lpe={URI:va,map:_s,ap:vh,chain:b0,chainRec:rM},Bx=ws,Dpe={URI:va,map:_s,ap:vh,of:ec,chain:b0,throwError:Bx},w0={URI:va,fromEither:xa},$pe=xpe(w0),Fpe=e$(w0),qn=Xv,sM=vpe,lM=function(e,t){return function(r){return qn(r)?e(r.left):t(r.right)}},v$=lM,y$=lM,jpe=y$,b$=function(e){return function(t){return qn(t)?e(t.left):t.right}},Wpe=b$,zpe=Jv(Ox),w$=Qv(oy),Hpe=w$,x$=Zv(oy),qpe=x$,_$=y0(ay),Kpe=_$,S$=iM(xa),Vpe=S$,Gpe=aM(xa),Ype=t$(w0),Xpe=_pe(w0,ay),E$=Cpe(w0,ay),Qpe=E$,Zpe=function(e){return qn(e)?Uo(e.left):ws(e.right)},C$=function(e){return function(t){return qn(t)?e(t.left):t}},Jpe=C$,M$=function(e){return function(t){return t==null?ws(e):Uo(t)}},Ux=function(e,t){try{return Uo(e())}catch(r){return ws(t(r))}},e0e=function(e,t){return function(){for(var r=[],n=0;n")}function _0e(e,t){return{key:e,type:t}}function hu(e,t,r,n){for(var a=e.length,o=Array(a+1),s=0;s")}function S0e(e,t,r,n){n===void 0&&(n="{ [K in ".concat(t.name,"]: ").concat(r.name," }"));var a=e.length;return new pM(n,function(o){return Ts.is(o)&&e.every(function(s){return r.is(o[s])})},function(o,s){var l=Ts.validate(o,s);if(qn(l))return l;for(var c=l.right,p={},m=[],_=!1,T=0;T0?tc(m):jo(_||Object.keys(c).length!==a?p:c)},r.encode===Zi?Zi:function(o){for(var s={},l=0;l0?tc(s):jo(p?o:n)}return MP(t)&&Array.isArray(n)?jo(n):as(n,a)},e.encode===Zi&&t.encode===Zi?Zi:function(n){for(var a={},o=Object.keys(n),s=o.length,l=0;l")}function M0e(e){return e.length>0}var Ds={};function D$(e,t){for(var r=[],n=0,a=e;n")),new nF(t,function(r){return Hp.is(r)&&r.every(e.is)},function(r,n){var a=Hp.validate(r,n);if(qn(a))return a;for(var o=a.right,s=o.length,l=o,c=[],p=0;p0?tc(c):jo(l)},e.encode===Zi?Zi:function(r){return r.map(e.encode)},e)}var oF=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.props=s,l._tag="InterfaceType",l}return t}(xo);function J4(e,t){t===void 0&&(t=U$(e));var r=Object.keys(e),n=r.map(function(o){return e[o]}),a=r.length;return new oF(t,function(o){if(Ts.is(o)){for(var s=0;s0?tc(m):jo(p)},Qm(n)?Zi:function(o){for(var s=zp({},o),l=0;l0?tc(m):jo(p)},Qm(n)?Zi:function(o){for(var s=zp({},o),l=0;l0){var n=r[0],a=r[1],o=a.length,s=function(l){for(var c=0;c0?tc(s):jo(Q4(n,o))},e.length===0?Zi:function(n){return Q4(n,e.map(function(a){return a.encode(n)}))},e)}var cF=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.types=s,l._tag="TupleType",l}return t}(xo);function q0e(e,t){t===void 0&&(t="[".concat(e.map(function(n){return n.name}).join(", "),"]"));var r=e.length;return new cF(t,function(n){return Hp.is(n)&&n.length===r&&e.every(function(a,o){return a.is(n[o])})},function(n,a){var o=Hp.validate(n,a);if(qn(o))return o;for(var s=o.right,l=s.length>r?s.slice(0,r):s,c=[],p=0;p0?tc(c):jo(l)},Qm(e)?Zi:function(n){return e.map(function(a,o){return a.encode(n[o])})},e)}var fF=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.type=s,l._tag="ReadonlyType",l}return t}(xo);function K0e(e,t){return t===void 0&&(t="Readonly<".concat(e.name,">")),new fF(t,e.is,e.validate,e.encode,e)}var dF=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.type=s,l._tag="ReadonlyArrayType",l}return t}(xo);function V0e(e,t){t===void 0&&(t="ReadonlyArray<".concat(e.name,">"));var r=iF(e);return new dF(t,r.is,r.validate,r.encode,e)}var G0e=function(e,t){return pF(J4(e),t)},hF=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.type=s,l._tag="ExactType",l}return t}(xo);function pF(e,t){t===void 0&&(t=C0e(e));var r=Z4(e);return new hF(t,e.is,function(n,a){var o=Ts.validate(n,a);if(qn(o))return o;var s=e.validate(n,a);return qn(s)?s:Uo(CP(s.right,r))},function(n){return e.encode(CP(n,r))},e)}var gF=function(e){wo(t,e);function t(){var r=e.call(this,"Function",function(n){return typeof n=="function"},function(n,a){return r.is(n)?jo(n):as(n,a)},Zi)||this;return r._tag="FunctionType",r}return t}(xo),Y0e=new gF,mF=function(e){wo(t,e);function t(){var r=e.call(this,"never",function(n){return!1},function(n,a){return as(n,a)},function(){throw new Error("cannot encode never")})||this;return r._tag="NeverType",r}return t}(xo),X0e=new mF,vF=function(e){wo(t,e);function t(){var r=e.call(this,"any",function(n){return!0},jo,Zi)||this;return r._tag="AnyType",r}return t}(xo),Q0e=new vF;function mM(e,t,r){return r===void 0&&(r="(".concat(e.name," | ").concat(B$(t),")")),new tF(r,function(n){return e.is(n)&&t(n)},function(n,a){var o=e.validate(n,a);if(qn(o))return o;var s=o.right;return t(s)?jo(s):as(s,a)},e.encode,e,t)}var Z0e=mM(dM,Number.isInteger,"Integer"),iw=function(e){wo(t,e);function t(r,n,a,o,s,l){var c=e.call(this,r,n,a,o,s)||this;return c.tag=l,c}return t}(gM),J0e=function(e,t,r){r===void 0&&(r=L$(t));var n=lF(t,r);return n instanceof iw?n:(console.warn("[io-ts] Cannot build a tagged union for ".concat(r,", returning a de-optimized union")),new iw(r,n.is,n.validate,n.encode,t,e))},ege=function(e,t){return{value:e,context:t}},tge=function(e){return[{key:"",type:e}]},rge=Ts,yF=function(e){wo(t,e);function t(){var r=e.call(this,"object",function(n){return n!==null&&typeof n=="object"},function(n,a){return r.is(n)?jo(n):as(n,a)},Zi)||this;return r._tag="ObjectType",r}return t}(xo),nge=new yF,ige=sF,oge=function(e){wo(t,e);function t(r,n,a,o,s){var l=e.call(this,r,n,a,o)||this;return l.props=s,l._tag="StrictType",l}return t}(xo);function age(e){return e}function sge(e){return function(){return e}}const lge=Object.freeze(Object.defineProperty({__proto__:null,failures:tc,failure:as,success:jo,Type:xo,identity:Zi,getFunctionName:B$,getContextEntry:_0e,appendContext:hu,getDomainKeys:cM,mergeAll:Q4,emptyTags:Ds,getTags:hf,getIndex:W$,NullType:z$,nullType:kP,UndefinedType:H$,VoidType:q$,voidType:RP,UnknownType:K$,unknown:N0e,StringType:V$,string:fM,NumberType:G$,number:dM,BigIntType:Y$,bigint:L0e,BooleanType:X$,boolean:D0e,AnyArrayType:Q$,UnknownArray:Hp,AnyDictionaryType:Z$,UnknownRecord:Ts,null:kP,undefined:nw,void:RP,LiteralType:J$,literal:$0e,KeyofType:eF,keyof:F0e,RefinementType:tF,brand:rF,Int:j0e,RecursiveType:hM,recursion:W0e,ArrayType:nF,array:iF,InterfaceType:oF,type:J4,PartialType:aF,partial:z0e,DictionaryType:pM,record:sF,UnionType:gM,union:lF,IntersectionType:uF,intersection:H0e,TupleType:cF,tuple:q0e,ReadonlyType:fF,readonly:K0e,ReadonlyArrayType:dF,readonlyArray:V0e,strict:G0e,ExactType:hF,exact:pF,FunctionType:gF,Function:Y0e,NeverType:mF,never:X0e,AnyType:vF,any:Q0e,refinement:mM,Integer:Z0e,TaggedUnionType:iw,taggedUnion:J0e,Array:Hp,interface:J4,getValidationError:ege,getDefaultContext:tge,Dictionary:rge,ObjectType:yF,object:nge,dictionary:ige,StrictType:oge,clean:age,alias:sge},Symbol.toStringTag,{value:"Module"})),Nx=wu(lge);var vM={},qp={},es={},yh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEndomorphismMonoid=e.not=e.SK=e.hole=e.pipe=e.untupled=e.tupled=e.absurd=e.decrement=e.increment=e.tuple=e.flow=e.flip=e.constVoid=e.constUndefined=e.constNull=e.constFalse=e.constTrue=e.constant=e.unsafeCoerce=e.identity=e.apply=e.getRing=e.getSemiring=e.getMonoid=e.getSemigroup=e.getBooleanAlgebra=void 0;var t=function(q){return function(){return{meet:function(Z,ee){return function(V){return q.meet(Z(V),ee(V))}},join:function(Z,ee){return function(V){return q.join(Z(V),ee(V))}},zero:function(){return q.zero},one:function(){return q.one},implies:function(Z,ee){return function(V){return q.implies(Z(V),ee(V))}},not:function(Z){return function(ee){return q.not(Z(ee))}}}}};e.getBooleanAlgebra=t;var r=function(q){return function(){return{concat:function(Z,ee){return function(V){return q.concat(Z(V),ee(V))}}}}};e.getSemigroup=r;var n=function(q){var Z=(0,e.getSemigroup)(q);return function(){return{concat:Z().concat,empty:function(){return q.empty}}}};e.getMonoid=n;var a=function(q){return{add:function(Z,ee){return function(V){return q.add(Z(V),ee(V))}},zero:function(){return q.zero},mul:function(Z,ee){return function(V){return q.mul(Z(V),ee(V))}},one:function(){return q.one}}};e.getSemiring=a;var o=function(q){var Z=(0,e.getSemiring)(q);return{add:Z.add,mul:Z.mul,one:Z.one,zero:Z.zero,sub:function(ee,V){return function(te){return q.sub(ee(te),V(te))}}}};e.getRing=o;var s=function(q){return function(Z){return Z(q)}};e.apply=s;function l(q){return q}e.identity=l,e.unsafeCoerce=l;function c(q){return function(){return q}}e.constant=c,e.constTrue=c(!0),e.constFalse=c(!1),e.constNull=c(null),e.constUndefined=c(void 0),e.constVoid=e.constUndefined;function p(q){return function(){for(var Z=[],ee=0;ee1?q(Z[1],Z[0]):function(V){return q(V)(Z[0])}}}e.flip=p;function m(q,Z,ee,V,te,R,h,g,v){switch(arguments.length){case 1:return q;case 2:return function(){return Z(q.apply(this,arguments))};case 3:return function(){return ee(Z(q.apply(this,arguments)))};case 4:return function(){return V(ee(Z(q.apply(this,arguments))))};case 5:return function(){return te(V(ee(Z(q.apply(this,arguments)))))};case 6:return function(){return R(te(V(ee(Z(q.apply(this,arguments))))))};case 7:return function(){return h(R(te(V(ee(Z(q.apply(this,arguments)))))))};case 8:return function(){return g(h(R(te(V(ee(Z(q.apply(this,arguments))))))))};case 9:return function(){return v(g(h(R(te(V(ee(Z(q.apply(this,arguments)))))))))}}}e.flow=m;function _(){for(var q=[],Z=0;Z0};Hi.isNonEmpty=yge;var bge=function(e){return e[0]};Hi.head=bge;var wge=function(e){return e.slice(1)};Hi.tail=wge;Hi.emptyReadonlyArray=[];Hi.emptyRecord={};Hi.has=Object.prototype.hasOwnProperty;var xge=function(e){return uge([e[0]],e.slice(1),!0)};Hi.fromReadonlyNonEmptyArray=xge;var _ge=Ir&&Ir.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Sge=Ir&&Ir.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ege=Ir&&Ir.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&_ge(t,e,r);return Sge(t,e),t};Object.defineProperty(es,"__esModule",{value:!0});es.sequenceS=es.sequenceT=es.getApplySemigroup=es.apS=es.apSecond=es.apFirst=es.ap=void 0;var Cge=yh,Mge=Ege(Hi);function kge(e,t){return function(r){return function(n){return e.ap(e.map(n,function(a){return function(o){return t.ap(a,o)}}),r)}}}es.ap=kge;function Rge(e){return function(t){return function(r){return e.ap(e.map(r,function(n){return function(){return n}}),t)}}}es.apFirst=Rge;function Age(e){return function(t){return function(r){return e.ap(e.map(r,function(){return function(n){return n}}),t)}}}es.apSecond=Age;function Tge(e){return function(t,r){return function(n){return e.ap(e.map(n,function(a){return function(o){var s;return Object.assign({},a,(s={},s[t]=o,s))}}),r)}}}es.apS=Tge;function Ige(e){return function(t){return{concat:function(r,n){return e.ap(e.map(r,function(a){return function(o){return t.concat(a,o)}}),n)}}}}es.getApplySemigroup=Ige;function yM(e,t,r){return function(n){for(var a=Array(r.length+1),o=0;o-1?t:r}};function gme(e,t){return et?1:0}ume.equals;var mme=function(e){return{concat:hme(e)}},vme=function(e){return{concat:pme(e)}},yme=function(){return{concat:xa}},CF=function(){return{concat:function(e,t){return t}}},bme=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n=t.length},xme=function(e){return function(t){return bme([e],t,!0)}},_me=xme,Sme=function(e){return function(t){for(var r=[e,t[0]],n=1;n0},$x=function(e,t){return e<0||e>=t.length},SM=function(e){return function(t){return Zm([e],t,!0)}},Kp=SM,EM=function(e){return function(t){return Zm(Zm([],t,!0),[e],!1)}},ly=EM,CM=function(e,t,r){if(Wc(r)){var n=uy(r);return n.splice(e,0,t),n}return[t]},MM=function(e,t,r){var n=uy(r);return n[e]=t,n},kM=function(e){return function(t){if(t.length===1)return x0(t);for(var r=[Hl(t)],n=pu(t),a=function(c){r.every(function(p){return!e.equals(p,c)})&&r.push(c)},o=0,s=n;or.length?ca:Sa(CM(e,t,r))}},$me=function(e,t){return $F(e,function(){return t})},$F=function(e,t){return function(r){return $x(e,r)?ca:Sa(MM(e,t(r[e]),r))}},x0=uy,ed=function(e){return[e]},FF=function(e,t,r){for(var n=[r(e[0],t[0])],a=Math.min(e.length,t.length),o=1;o=t.length?[x0(t),[]]:[Jr(t.slice(1,r),Kp(Hl(t))),t.slice(r)]}},KF=function(e){return IM(zx(e))},_u=function(e,t){return Jr(e,$M(t))},PM=function(e,t){return Jr(e,FM(t))},cy=function(e,t){return Jr(e,ZF(t))},OM=function(e,t){return Jr(e,Hx(t))},VF=function(e,t){return Jr(e,DM(t))},fy=function(e,t,r){return Jr(e,JF(t,r))},dy=function(e){var t=HF(e);return function(r,n){return Jr(r,t(n))}},hy=function(e,t,r){return Jr(e,tj(t,r))},BM=function(e){var t=nj(e);return function(r,n){return Jr(r,t(n))}},GF=function(e,t){return Jr(e,QF(t))},UM=function(e,t,r){return Jr(e,ej(t,r))},NM=function(e){var t=zF(e);return function(r,n){return Jr(r,t(n))}},LM=function(e,t,r){return Jr(e,rj(t,r))},YF=function(e){var t=Kx(e);return function(r,n){return Jr(r,t(n))}},XF=function(e){return function(t){return Jr(t,LF(e()))}},QF=XF,ZF=function(e){return Hx(function(t){return Jr(e,$M(t))})},Hx=function(e){return qF(function(t,r){return e(r)})},DM=function(e){return function(t){for(var r=pu(t),n=[e(t)];Wc(r);)n.push(e(r)),r=pu(r);return n}},jme=DM(xa),Wme=Hx(xa),$M=function(e){return FM(function(t,r){return e(r)})},FM=function(e){return function(t){for(var r=[e(0,Hl(t))],n=1;nt?1:0}};function uj(e,t){return function(r){return r?t.of(void 0):e.zero()}}var Tve=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n=0;r--)if(e(t[r]))return Sa(t[r]);return ca}}var Fve=function(e){return function(t){for(var r=t.length-1;r>=0;r--){var n=e(t[r]);if(mh(n))return n}return ca}},jve=function(e){return function(t){for(var r=t.length-1;r>=0;r--)if(e(t[r]))return Sa(r);return ca}};function fj(e){return function(t,r){if(r===void 0){var n=fj(e);return function(s){return n(t,s)}}for(var a=function(s){return e.equals(s,t)},o=0;o0;){var a=r.shift();Xv(a)?r.unshift.apply(r,e(a.left)):n.push(a.right)}return n}},mj=function(e){return function(t){var r=e(t),n=[],a=[];function o(p){Xv(p)?e(p.left).forEach(function(m){return n.push(m)}):a.push(p.right)}for(var s=0,l=r;s0;)o(n.shift());return a}};function Xve(e){return function(t){return t.every(e)}}var Qve=function(e){var t=IF(e);return function(r){return Pve(function(){return e.empty},t(r))}},ih=function(e){return e.length===0},Ba=Wc,Zve=Kp,Jve=SM,Yx=ly,eye=EM,vj=function(e,t){return e<=0?[]:Fx(t)(e)},tye=function(e,t){return vj(e,function(){return t})};function rye(e){return function(t){return e(t)?[t]:[]}}var yj=function(e){return YC(e)?[]:[e.value]},bj=function(e){return Xv(e)?[]:[e.right]},wj=function(e,t){return function(r){return Ba(r)?t(r):e()}},nye=wj,xj=function(e,t){return function(r){return Ba(r)?t(Hl(r),pu(r)):e()}},_j=xj,iye=_j,Sj=function(e,t){return function(r){return Ba(r)?t(S0(r),_0(r)):e()}},Ej=Sj,oye=Ej,Cj=function(e){return function(t){for(var r=[],n=0;n=0;o--)a[o]=t(r[o],a[o+1]);return a}},lye=function(e){return e.length},py=$x,uye=cj,cye=Bve,fye=Uve,dye=function(e){return Ba(e)?Sa(pu(e)):ca},hye=function(e){return Ba(e)?Sa(S0(e)):ca},pye=function(e){return function(t){return py(e,t)?xs(t):t.slice(0,e)}},gye=function(e){return function(t){return py(e,t)?xs(t):e===0?[]:t.slice(-e)}};function mye(e){return function(t){for(var r=[],n=0,a=t;n=t.length?[]:t.slice(e,t.length)}},bye=function(e){return function(t){return e<=0||ih(t)?xs(t):e>=t.length?[]:t.slice(0,t.length-e)}};function wye(e){return function(t){return t.slice(Mj(t,e))}}var xye=Nve;function _ye(e){return Lve(e)}var Sye=Dve;function Eye(e){return $ve(e)}var Cye=Fve,Mye=jve,xs=function(e){return e.slice()},kye=function(e,t){return function(r){return e<0||e>r.length?ca:Sa(aW(e,t,r))}},Rye=function(e,t){return kj(e,function(){return t})},Aye=function(e){return function(t){return py(e,t)?ca:Sa(lW(e,t))}},kj=function(e,t){return function(r){return py(e,r)?ca:Sa(sW(e,t(r[e]),r))}},Tye=function(e){return ih(e)?[]:e.slice().reverse()},Iye=function(e){for(var t=[],r=0;r=1&&Ba(t)?zx(e)(t):ih(t)?[xs(t),[]]:[[],xs(t)]}},Fye=function(e){var t=KF(e);return function(r){return Ba(r)?t(r):[]}},jye=function(e){return function(){for(var t=[],r=0;rt?1:0}},$be=function(e){return Object.keys(e).length},Uc=function(e){for(var t in e)if(Ga.call(e,t))return!1;return!0},wy=function(e){return function(t){return Object.keys(t).sort(e.compare)}};function UW(e){if(typeof e=="function")return UW(Jn)(e);var t=wy(e);return function(r){return function(n){for(var a=[],o=0,s=t(n);o=0;p--){var m=l[p];s=a(m,o[m],s)}return s}}}var jbe=function(e,t){var r;return r={},r[e]=t,r};function Wbe(e){var t=jW(Jn)(e);return function(r){return function(n){return t(n,r)}}}function zbe(e){var t=Lk(Jn)(e);return function(r){return function(n){return t(n,r)}}}function Hbe(e){return FW(Jn)(e)}function Ok(e){return function(t){var r={},n={};for(var a in t)if(Ga.call(t,a)){var o=e(a,t[a]);switch(o._tag){case"Left":r[a]=o.left;break;case"Right":n[a]=o.right;break}}return Ha(r,n)}}function Bk(e){return function(t){var r={},n={};for(var a in t)if(Ga.call(t,a)){var o=t[a];e(a,o)?n[a]=o:r[a]=o}return Ha(r,n)}}function Uk(e){return function(t){var r={};for(var n in t)if(Ga.call(t,n)){var a=e(n,t[n]);mh(a)&&(r[n]=a.value)}return r}}function Nk(e){return function(t){var r={},n=!1;for(var a in t)if(Ga.call(t,a)){var o=t[a];e(a,o)?r[a]=o:n=!0}return n?r:t}}function qbe(e,t){var r=DW(e,t);return function(n){return r(n,xa)}}function DW(e,t){return function(r,n){return t.reduce(r,{},function(a,o){var s=n(o),l=s[0],c=s[1];return a[l]=Ga.call(a,l)?e.concat(a[l],c):c,a})}}function Kbe(e){return function(t){for(var r in t)if(!e(t[r]))return!1;return!0}}function Vbe(e){return function(t){for(var r in t)if(e(t[r]))return!0;return!1}}function $W(e){return function(t,r){if(r===void 0){var n=$W(e);return function(o){return n(t,o)}}for(var a in r)if(e.equals(r[a],t))return!0;return!1}}var Gbe=function(e){return function(t){return function(r){if(Uc(r))return t;if(Uc(t))return r;var n={};for(var a in r)Vp(a,t)?n[a]=e.concat(r[a],t[a]):n[a]=r[a];for(var a in t)Vp(a,n)||(n[a]=t[a]);return n}}},Ybe=function(e){return function(t){return function(r){if(Uc(r)||Uc(t))return Ik;var n={};for(var a in r)Vp(a,t)&&(n[a]=e.concat(r[a],t[a]));return n}}},Xbe=function(e){return function(t){if(Uc(t))return e;if(Uc(e))return t;var r={};for(var n in t)Vp(n,e)||(r[n]=t[n]);for(var n in e)Vp(n,t)||(r[n]=e[n]);return r}},Qbe=function(e,t){return Jr(e,LW(t))},Zbe=function(e,t){return Jr(e,Pk(t))},Jbe=function(e){var t=aw(e);return function(r,n,a){return Jr(r,t(n,a))}},ewe=function(e){return function(t){var r=sw(e)(t);return function(n,a){return Jr(n,r(a))}}},twe=function(e){var t=lw(e);return function(r,n,a){return Jr(r,t(n,a))}},rwe=function(e,t){return Jr(e,WW(t))},nwe=function(e,t){return Jr(e,zW(t))},iwe=function(e,t){return Jr(e,HW(t))},owe=function(e,t){return Jr(e,qW(t))},awe=function(e){var t=ev(e);return function(r,n,a){return Jr(r,t(n,a))}},swe=function(e){var t=tv(e);return function(r){var n=t(r);return function(a,o){return Jr(a,n(o))}}},lwe=function(e){var t=rv(e);return function(r,n,a){return Jr(r,t(n,a))}},uwe=function(e,t){return Jr(e,Ok(t))},cwe=function(e,t){return Jr(e,Bk(t))},fwe=function(e,t){return Jr(e,Uk(t))},dwe=function(e,t){return Jr(e,Nk(t))},Lk=function(e){var t=jW(e);return function(r){var n=t(r);return function(a,o){return n(a,Jf(gpe,o))}}},FW=function(e){var t=Lk(e);return function(r){var n=t(r);return function(a){return n(a,xa)}}},jW=function(e){return function(t){var r=wy(e);return function(n,a){var o=r(n);if(o.length===0)return t.of(Ik);for(var s=t.of({}),l=function(_){s=t.ap(t.map(s,function(T){return function(O){var A;return Object.assign({},T,(A={},A[_]=O,A))}}),a(_,n[_]))},c=0,p=o;ce.TYPE_MAX_LEN?R.slice(0,e.TYPE_MAX_LEN-3)+"...":R},M=function(R,h,g,v){return["Expecting "+A(R,v),h===""?"":"at "+h,"but instead got: "+m(g.value),g.message?"("+g.message+")":""].filter(Boolean).join(" ")},B=function(R,h,g,v){return[`Expecting one of: -`,R.map(function(u){return" "+A(u,v)}).join(` -`),h===""?` -`:` -at `+h+" ","but instead got: "+m(g)].filter(Boolean).join("")},L=function(R){return s.pipe(R,t.findIndex(p),a.chain(function(h){return t.lookup(h+1,R)}))},U=function(R,h,g){var v=s.pipe(h,t.map(O),t.map(L),t.compact),u=s.pipe(v,t.head,a.map(function(y){return y.actual}),a.getOrElse(function(){})),f=v.map(function(y){var S=y.type;return S.name});return f.length>0?a.some(B(f,R,u,g)):a.none},D=function(R,h,g){return s.pipe(h,T,a.map(function(v){return M(v.type.name,R,h,g)}))},Y=n.groupBy(function(R){return s.pipe(R.context,c.takeUntil(p),_)}),q=function(R,h,g){return n.tail(h).length>0?U(R,h,g):D(R,n.head(h),g)},Z=function(R,h){return D(_(R.context),R,h)};e.formatValidationError=Z;var ee=function(R,h){return s.pipe(R,Y,o.mapWithIndex(function(g,v){return q(g,v,h)}),o.compact,o.toArray,t.map(function(g){g[0];var v=g[1];return v}))};e.formatValidationErrors=ee;var V=function(R,h){return s.pipe(R,r.mapLeft(function(g){return e.formatValidationErrors(g,h)}),r.fold(function(g){return g},function(){return[]}))};e.reporter=V;var te={report:e.reporter};e.default=te})(EF);var j2e=function(){function e(r,n){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=q2e(n),this._batchScheduleFn=K2e(n),this._cacheKeyFn=V2e(n),this._cacheMap=G2e(n),this._batch=null}var t=e.prototype;return t.load=function(n){if(n==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(n)+"."));var a=z2e(this),o=this._cacheMap,s=this._cacheKeyFn(n);if(o){var l=o.get(s);if(l){var c=a.cacheHits||(a.cacheHits=[]);return new Promise(function(m){c.push(function(){m(l)})})}}a.keys.push(n);var p=new Promise(function(m,_){a.callbacks.push({resolve:m,reject:_})});return o&&o.set(s,p),p},t.loadMany=function(n){if(!Nz(n))throw new TypeError("The loader.loadMany() function must be called with Array "+("but got: "+n+"."));for(var a=[],o=0;o and returns Promise>, but the function did "+("not return a Promise: "+String(r)+".")));r.then(function(n){if(!Nz(n))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(n)+"."));if(n.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(n)));tS(t);for(var a=0;a0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var Y2e=j2e,Hk={exports:{}},qk={exports:{}},Lz=function(t,r){return function(){for(var a=new Array(arguments.length),o=0;o"u"}function Q2e(e){return e!==null&&!rS(e)&&e.constructor!==null&&!rS(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Dz(e){return id.call(e)==="[object ArrayBuffer]"}function Z2e(e){return id.call(e)==="[object FormData]"}function J2e(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dz(e.buffer),t}function exe(e){return typeof e=="string"}function txe(e){return typeof e=="number"}function $z(e){return e!==null&&typeof e=="object"}function pb(e){if(id.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function rxe(e){return id.call(e)==="[object Date]"}function nxe(e){return id.call(e)==="[object File]"}function ixe(e){return id.call(e)==="[object Blob]"}function Fz(e){return id.call(e)==="[object Function]"}function oxe(e){return $z(e)&&Fz(e.pipe)}function axe(e){return id.call(e)==="[object URLSearchParams]"}function sxe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function lxe(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Vk(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Kk(e))for(var r=0,n=e.length;r"u"||(jh.isArray(c)?p=p+"[]":c=[c],jh.forEach(c,function(_){jh.isDate(_)?_=_.toISOString():jh.isObject(_)&&(_=JSON.stringify(_)),o.push(IP(p)+"="+IP(_))}))}),a=o.join("&")}if(a){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t},fxe=Xs;function p_(){this.handlers=[]}p_.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};p_.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};p_.prototype.forEach=function(t){fxe.forEach(this.handlers,function(n){n!==null&&t(n)})};var dxe=p_,hxe=Xs,pxe=function(t,r){hxe.forEach(t,function(a,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[o])})},Wz=function(t,r,n,a,o){return t.config=r,n&&(t.code=n),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},S5,PP;function zz(){if(PP)return S5;PP=1;var e=Wz;return S5=function(r,n,a,o,s){var l=new Error(r);return e(l,n,a,o,s)},S5}var E5,OP;function gxe(){if(OP)return E5;OP=1;var e=zz();return E5=function(r,n,a){var o=a.config.validateStatus;!a.status||!o||o(a.status)?r(a):n(e("Request failed with status code "+a.status,a.config,null,a.request,a))},E5}var C5,BP;function mxe(){if(BP)return C5;BP=1;var e=Xs;return C5=e.isStandardBrowserEnv()?function(){return{write:function(n,a,o,s,l,c){var p=[];p.push(n+"="+encodeURIComponent(a)),e.isNumber(o)&&p.push("expires="+new Date(o).toGMTString()),e.isString(s)&&p.push("path="+s),e.isString(l)&&p.push("domain="+l),c===!0&&p.push("secure"),document.cookie=p.join("; ")},read:function(n){var a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),C5}var M5,UP;function vxe(){return UP||(UP=1,M5=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),M5}var k5,NP;function yxe(){return NP||(NP=1,k5=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),k5}var R5,LP;function bxe(){if(LP)return R5;LP=1;var e=vxe(),t=yxe();return R5=function(n,a){return n&&!e(a)?t(n,a):a},R5}var A5,DP;function wxe(){if(DP)return A5;DP=1;var e=Xs,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 A5=function(n){var a={},o,s,l;return n&&e.forEach(n.split(` -`),function(p){if(l=p.indexOf(":"),o=e.trim(p.substr(0,l)).toLowerCase(),s=e.trim(p.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},A5}var T5,$P;function xxe(){if($P)return T5;$P=1;var e=Xs;return T5=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),a;function o(s){var l=s;return r&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=o(window.location.href),function(l){var c=e.isString(l)?o(l):l;return c.protocol===a.protocol&&c.host===a.host}}():function(){return function(){return!0}}(),T5}var I5,FP;function g_(){if(FP)return I5;FP=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,I5=e,I5}var P5,jP;function WP(){if(jP)return P5;jP=1;var e=Xs,t=gxe(),r=mxe(),n=jz,a=bxe(),o=wxe(),s=xxe(),l=zz(),c=m_(),p=g_();return P5=function(_){return new Promise(function(O,A){var M=_.data,B=_.headers,L=_.responseType,U;function D(){_.cancelToken&&_.cancelToken.unsubscribe(U),_.signal&&_.signal.removeEventListener("abort",U)}e.isFormData(M)&&delete B["Content-Type"];var Y=new XMLHttpRequest;if(_.auth){var q=_.auth.username||"",Z=_.auth.password?unescape(encodeURIComponent(_.auth.password)):"";B.Authorization="Basic "+btoa(q+":"+Z)}var ee=a(_.baseURL,_.url);Y.open(_.method.toUpperCase(),n(ee,_.params,_.paramsSerializer),!0),Y.timeout=_.timeout;function V(){if(!!Y){var R="getAllResponseHeaders"in Y?o(Y.getAllResponseHeaders()):null,h=!L||L==="text"||L==="json"?Y.responseText:Y.response,g={data:h,status:Y.status,statusText:Y.statusText,headers:R,config:_,request:Y};t(function(u){O(u),D()},function(u){A(u),D()},g),Y=null}}if("onloadend"in Y?Y.onloadend=V:Y.onreadystatechange=function(){!Y||Y.readyState!==4||Y.status===0&&!(Y.responseURL&&Y.responseURL.indexOf("file:")===0)||setTimeout(V)},Y.onabort=function(){!Y||(A(l("Request aborted",_,"ECONNABORTED",Y)),Y=null)},Y.onerror=function(){A(l("Network Error",_,null,Y)),Y=null},Y.ontimeout=function(){var h=_.timeout?"timeout of "+_.timeout+"ms exceeded":"timeout exceeded",g=_.transitional||c.transitional;_.timeoutErrorMessage&&(h=_.timeoutErrorMessage),A(l(h,_,g.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",Y)),Y=null},e.isStandardBrowserEnv()){var te=(_.withCredentials||s(ee))&&_.xsrfCookieName?r.read(_.xsrfCookieName):void 0;te&&(B[_.xsrfHeaderName]=te)}"setRequestHeader"in Y&&e.forEach(B,function(h,g){typeof M>"u"&&g.toLowerCase()==="content-type"?delete B[g]:Y.setRequestHeader(g,h)}),e.isUndefined(_.withCredentials)||(Y.withCredentials=!!_.withCredentials),L&&L!=="json"&&(Y.responseType=_.responseType),typeof _.onDownloadProgress=="function"&&Y.addEventListener("progress",_.onDownloadProgress),typeof _.onUploadProgress=="function"&&Y.upload&&Y.upload.addEventListener("progress",_.onUploadProgress),(_.cancelToken||_.signal)&&(U=function(R){!Y||(A(!R||R&&R.type?new p("canceled"):R),Y.abort(),Y=null)},_.cancelToken&&_.cancelToken.subscribe(U),_.signal&&(_.signal.aborted?U():_.signal.addEventListener("abort",U))),M||(M=null),Y.send(M)})},P5}var O5,zP;function m_(){if(zP)return O5;zP=1;var e=Xs,t=pxe,r=Wz,n={"Content-Type":"application/x-www-form-urlencoded"};function a(c,p){!e.isUndefined(c)&&e.isUndefined(c["Content-Type"])&&(c["Content-Type"]=p)}function o(){var c;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(c=WP()),c}function s(c,p,m){if(e.isString(c))try{return(p||JSON.parse)(c),e.trim(c)}catch(_){if(_.name!=="SyntaxError")throw _}return(m||JSON.stringify)(c)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:o(),transformRequest:[function(p,m){return t(m,"Accept"),t(m,"Content-Type"),e.isFormData(p)||e.isArrayBuffer(p)||e.isBuffer(p)||e.isStream(p)||e.isFile(p)||e.isBlob(p)?p:e.isArrayBufferView(p)?p.buffer:e.isURLSearchParams(p)?(a(m,"application/x-www-form-urlencoded;charset=utf-8"),p.toString()):e.isObject(p)||m&&m["Content-Type"]==="application/json"?(a(m,"application/json"),s(p)):p}],transformResponse:[function(p){var m=this.transitional||l.transitional,_=m&&m.silentJSONParsing,T=m&&m.forcedJSONParsing,O=!_&&this.responseType==="json";if(O||T&&e.isString(p)&&p.length)try{return JSON.parse(p)}catch(A){if(O)throw A.name==="SyntaxError"?r(A,this,"E_JSON_PARSE"):A}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(p){l.headers[p]={}}),e.forEach(["post","put","patch"],function(p){l.headers[p]=e.merge(n)}),O5=l,O5}var _xe=Xs,Sxe=m_(),Exe=function(t,r,n){var a=this||Sxe;return _xe.forEach(n,function(s){t=s.call(a,t,r)}),t},B5,HP;function Hz(){return HP||(HP=1,B5=function(t){return!!(t&&t.__CANCEL__)}),B5}var qP=Xs,U5=Exe,Cxe=Hz(),Mxe=m_(),kxe=g_();function N5(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kxe("canceled")}var Rxe=function(t){N5(t),t.headers=t.headers||{},t.data=U5.call(t,t.data,t.headers,t.transformRequest),t.headers=qP.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),qP.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||Mxe.adapter;return r(t).then(function(a){return N5(t),a.data=U5.call(t,a.data,a.headers,t.transformResponse),a},function(a){return Cxe(a)||(N5(t),a&&a.response&&(a.response.data=U5.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},Zs=Xs,qz=function(t,r){r=r||{};var n={};function a(m,_){return Zs.isPlainObject(m)&&Zs.isPlainObject(_)?Zs.merge(m,_):Zs.isPlainObject(_)?Zs.merge({},_):Zs.isArray(_)?_.slice():_}function o(m){if(Zs.isUndefined(r[m])){if(!Zs.isUndefined(t[m]))return a(void 0,t[m])}else return a(t[m],r[m])}function s(m){if(!Zs.isUndefined(r[m]))return a(void 0,r[m])}function l(m){if(Zs.isUndefined(r[m])){if(!Zs.isUndefined(t[m]))return a(void 0,t[m])}else return a(void 0,r[m])}function c(m){if(m in r)return a(t[m],r[m]);if(m in t)return a(void 0,t[m])}var p={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:c};return Zs.forEach(Object.keys(t).concat(Object.keys(r)),function(_){var T=p[_]||o,O=T(_);Zs.isUndefined(O)&&T!==c||(n[_]=O)}),n},L5,KP;function Kz(){return KP||(KP=1,L5={version:"0.25.0"}),L5}var Axe=Kz().version,Gk={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Gk[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var VP={};Gk.transitional=function(t,r,n){function a(o,s){return"[Axios v"+Axe+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return function(o,s,l){if(t===!1)throw new Error(a(s," has been removed"+(r?" in "+r:"")));return r&&!VP[s]&&(VP[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 Txe(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var o=n[a],s=t[o];if(s){var l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}var Ixe={assertOptions:Txe,validators:Gk},Vz=Xs,Pxe=jz,GP=dxe,YP=Rxe,v_=qz,Gz=Ixe,Wh=Gz.validators;function Ty(e){this.defaults=e,this.interceptors={request:new GP,response:new GP}}Ty.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=v_(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Gz.assertOptions(n,{silentJSONParsing:Wh.transitional(Wh.boolean),forcedJSONParsing:Wh.transitional(Wh.boolean),clarifyTimeoutError:Wh.transitional(Wh.boolean)},!1);var a=[],o=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(r)===!1||(o=o&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});var s=[];this.interceptors.response.forEach(function(O){s.push(O.fulfilled,O.rejected)});var l;if(!o){var c=[YP,void 0];for(Array.prototype.unshift.apply(c,a),c=c.concat(s),l=Promise.resolve(r);c.length;)l=l.then(c.shift(),c.shift());return l}for(var p=r;a.length;){var m=a.shift(),_=a.shift();try{p=m(p)}catch(T){_(T);break}}try{l=YP(p)}catch(T){return Promise.reject(T)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};Ty.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=v_(this.defaults,t),Pxe(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};Vz.forEach(["delete","get","head","options"],function(t){Ty.prototype[t]=function(r,n){return this.request(v_(n||{},{method:t,url:r,data:(n||{}).data}))}});Vz.forEach(["post","put","patch"],function(t){Ty.prototype[t]=function(r,n,a){return this.request(v_(a||{},{method:t,url:r,data:n}))}});var Oxe=Ty,D5,XP;function Bxe(){if(XP)return D5;XP=1;var e=g_();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(s){n=s});var a=this;this.promise.then(function(o){if(!!a._listeners){var s,l=a._listeners.length;for(s=0;sa+""),this.shardLoader=new eO.default(async a=>await Promise.all(a.map(async o=>{const s=await this.shardCache.get(o);if(s)return s;let l=(await this.doCall("shards",{seqno:o},f_e)).shards;return await this.shardCache.set(o,l),l}))),this.shardTransactionsCache=new iO("ton-shard-tx",r,nO,a=>a.workchain+":"+a.shard+":"+a.seqno),this.shardTransactionsLoader=new eO.default(async a=>await Promise.all(a.map(async o=>{const s=await this.shardTransactionsCache.get(o);if(s)return s;let l=await this.doCall("getBlockTransactions",{workchain:o.workchain,seqno:o.seqno,shard:o.shard},nO);return await this.shardTransactionsCache.set(o,l),l})),{cacheKeyFn:a=>a.workchain+":"+a.shard+":"+a.seqno})}getAddressInformation(t){return this.doCall("getAddressInformation",{address:t.toString()},i_e)}async getTransactions(t,r){const n=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&&n!==!0&&o++;let s=await this.doCall("getTransactions",{address:t.toString(),...r,limit:o,hash:a},rO);return s.length>o&&(s=s.slice(0,o)),r.hash&&r.lt&&n!==!0&&s.shift(),s}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},c_e)}async getShards(t){return await this.shardLoader.load(t)}async getBlockTransactions(t,r,n){return await this.shardTransactionsLoader.load({workchain:t,seqno:r,shard:n})}async getTransaction(t,r,n){let a=Buffer.from(n,"base64").toString("hex"),s=(await this.doCall("getTransactions",{address:t.toString(),lt:r,hash:a,limit:1},rO)).find(l=>l.transaction_id.lt===r&&l.transaction_id.hash===n);return s||null}async callGetMethod(t,r,n){return await this.doCall("runGetMethod",{address:t.toString(),method:r,stack:n},s_e)}async sendBoc(t){await this.doCall("sendBoc",{boc:t.toString("base64")},o_e)}async estimateFee(t,r){return await this.doCall("estimateFee",{address:t.toFriendly(),body:(await r.body.toBoc({idx:!1})).toString("base64"),init_data:r.initData?(await r.initData.toBoc({idx:!1})).toString("base64"):"",init_code:r.initCode?(await r.initCode.toBoc({idx:!1})).toString("base64"):"",ignore_chksig:r.ignoreSignature},a_e)}async doCall(t,r,n){let a={"Content-Type":"application/json","X-Ton-Client-Version":n_e};this.parameters.apiKey&&(a["X-API-Key"]=this.parameters.apiKey);let o=await r_e.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=n.decode(o.data.result);if((0,Xz.isRight)(s))return s.right;throw Error("Malformed response: "+t_e.default.report(s).join(", "))}}Yv.HttpApi=h_e;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.ExternalMessage=void 0;class p_e{constructor(t){this.to=t.to,this.body=t.body,t.from!==void 0&&t.from!==null?this.from=t.from:this.from=null,t.importFee!==void 0&&t.importFee!==null?this.importFee=t.importFee:this.importFee=0}writeTo(t){t.bits.writeUint(2,2),t.bits.writeAddress(this.from),t.bits.writeAddress(this.to),t.bits.writeCoins(this.importFee),this.body.writeTo(t)}}Iy.ExternalMessage=p_e;var gg={},oO;function Xk(){if(oO)return gg;oO=1,Object.defineProperty(gg,"__esModule",{value:!0}),gg.CommonMessageInfo=void 0;const e=vl();class t{constructor(n){n&&n.stateInit!==null&&n.stateInit!==void 0?this.stateInit=n.stateInit:this.stateInit=null,n&&n.body!==null&&n.body!==void 0?this.body=n.body:this.body=null}writeTo(n){if(this.stateInit){n.bits.writeBit(1);const a=new e.Cell;this.stateInit.writeTo(a),n.bits.available-1>=a.bits.cursor?(n.bits.writeBit(0),n.writeCell(a)):(n.bits.writeBit(1),n.refs.push(a))}else n.bits.writeBit(0);if(this.body){const a=new e.Cell;this.body.writeTo(a),n.bits.available>=a.bits.cursor?(n.bits.writeBit(0),n.writeCell(a)):(n.bits.writeBit(1),n.refs.push(a))}else n.bits.writeBit(0)}}return gg.CommonMessageInfo=t,gg}var Py={};Object.defineProperty(Py,"__esModule",{value:!0});Py.StateInit=void 0;class g_e{constructor(t){t.code!==null&&t.code!==void 0?this.code=t.code:this.code=null,t.data!==null&&t.data!==void 0?this.data=t.data:this.data=null}writeTo(t){t.bits.writeBit(0),t.bits.writeBit(0),t.bits.writeBit(!!this.code),t.bits.writeBit(!!this.data),t.bits.writeBit(0),this.code&&t.refs.push(this.code),this.data&&t.refs.push(this.data)}}Py.StateInit=g_e;var j5={},mg={},aO;function Qz(){if(aO)return mg;aO=1,Object.defineProperty(mg,"__esModule",{value:!0}),mg.WalletV1R2Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.simple.r2",this.walletVersion="v1",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>"Simple Wallet Contract (R2)",this.publicKey=n.publicKey,this.initialCode=n.initialCode,this.initialData=n.initialData,this.workchain=n.workchain,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s=e.Cell.fromBoc("B5EE9C724101010100530000A2FF0020DD2082014C97BA9730ED44D0D70B1FE0A4F260810200D71820D70B1FED44D0D31FD3FFD15112BAF2A122F901541044F910F2A2F80001D31F3120D74A96D307D402FB00DED1A4C8CB1FCBFFC9ED54D0E2786F")[0],l=new e.Cell;return l.bits.writeUint(0,32),l.bits.writeBuffer(a),new t({publicKey:a,initialCode:s,initialData:l,workchain:o})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc")})}}return mg.WalletV1R2Source=t,mg}var vg={},sO;function Zz(){if(sO)return vg;sO=1,Object.defineProperty(vg,"__esModule",{value:!0}),vg.WalletV1R3Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.simple.r3",this.walletVersion="v1",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>"Simple Wallet Contract (R3)",this.publicKey=n.publicKey,this.initialCode=n.initialCode,this.initialData=n.initialData,this.workchain=n.workchain,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s=e.Cell.fromBoc("B5EE9C7241010101005F0000BAFF0020DD2082014C97BA218201339CBAB19C71B0ED44D0D31FD70BFFE304E0A4F260810200D71820D70B1FED44D0D31FD3FFD15112BAF2A122F901541044F910F2A2F80001D31F3120D74A96D307D402FB00DED1A4C8CB1FCBFFC9ED54B5B86E42")[0],l=new e.Cell;return l.bits.writeUint(0,32),l.bits.writeBuffer(a),new t({publicKey:a,initialCode:s,initialData:l,workchain:o})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc")})}}return vg.WalletV1R3Source=t,vg}var yg={},lO;function Jz(){if(lO)return yg;lO=1,Object.defineProperty(yg,"__esModule",{value:!0}),yg.WalletV2R1Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.v2",this.walletVersion="v2",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>"Wallet V2 Contract",this.publicKey=n.publicKey,this.initialCode=n.initialCode,this.initialData=n.initialData,this.workchain=n.workchain,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s=e.Cell.fromBoc("B5EE9C724101010100570000AAFF0020DD2082014C97BA9730ED44D0D70B1FE0A4F2608308D71820D31FD31F01F823BBF263ED44D0D31FD3FFD15131BAF2A103F901541042F910F2A2F800029320D74A96D307D402FB00E8D1A4C8CB1FCBFFC9ED54A1370BB6")[0],l=new e.Cell;return l.bits.writeUint(0,32),l.bits.writeBuffer(a),new t({publicKey:a,initialCode:s,initialData:l,workchain:o})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc")})}}return yg.WalletV2R1Source=t,yg}var bg={},uO;function eH(){if(uO)return bg;uO=1,Object.defineProperty(bg,"__esModule",{value:!0}),bg.WalletV2R2Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.v2.r2",this.walletVersion="v2",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>"Wallet V2 Contract (R2)",this.publicKey=n.publicKey,this.workchain=n.workchain,this.initialCode=n.initialCode,this.initialData=n.initialData,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s=e.Cell.fromBoc("B5EE9C724101010100630000C2FF0020DD2082014C97BA218201339CBAB19C71B0ED44D0D31FD70BFFE304E0A4F2608308D71820D31FD31F01F823BBF263ED44D0D31FD3FFD15131BAF2A103F901541042F910F2A2F800029320D74A96D307D402FB00E8D1A4C8CB1FCBFFC9ED54044CD7A1")[0],l=new e.Cell;return l.bits.writeUint(0,32),l.bits.writeBuffer(a),new t({publicKey:a,initialCode:s,initialData:l,workchain:o})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc")})}}return bg.WalletV2R2Source=t,bg}var wg={},cO;function tH(){if(cO)return wg;cO=1,Object.defineProperty(wg,"__esModule",{value:!0}),wg.WalletV3R1Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.v3",this.walletVersion="v3",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setInt("walletId",this.walletId),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>`Wallet V3 Contract. WalletID = ${this.walletId}`,this.publicKey=n.publicKey,this.workchain=n.workchain,this.walletId=n.walletId,this.initialCode=n.initialCode,this.initialData=n.initialData,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s;n.walletId!==null&&n.walletId!==void 0?s=n.walletId:s=698983191+o;let l=e.Cell.fromBoc("B5EE9C724101010100620000C0FF0020DD2082014C97BA9730ED44D0D70B1FE0A4F2608308D71820D31FD31FD31FF82313BBF263ED44D0D31FD31FD3FFD15132BAF2A15144BAF2A204F901541055F910F2A3F8009320D74A96D307D402FB00E8D101A4C8CB1FCB1FCBFFC9ED543FBE6EE0")[0],c=new e.Cell;return c.bits.writeUint(0,32),c.bits.writeUint(s,32),c.bits.writeBuffer(a),new t({publicKey:a,workchain:o,walletId:s,initialCode:l,initialData:c})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc"),walletId:a.getInt("walletId")})}}return wg.WalletV3R1Source=t,wg}var xg={},fO;function rH(){if(fO)return xg;fO=1,Object.defineProperty(xg,"__esModule",{value:!0}),xg.WalletV3R2Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.v3.r2",this.walletVersion="v3",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setInt("walletId",this.walletId),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>`Wallet V3 Contract (R2). WalletID = ${this.walletId}`,this.publicKey=n.publicKey,this.workchain=n.workchain,this.walletId=n.walletId,this.initialCode=n.initialCode,this.initialData=n.initialData,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s;n.walletId!==null&&n.walletId!==void 0?s=n.walletId:s=698983191+o;let l=e.Cell.fromBoc("B5EE9C724101010100710000DEFF0020DD2082014C97BA218201339CBAB19F71B0ED44D0D31FD31F31D70BFFE304E0A4F2608308D71820D31FD31FD31FF82313BBF263ED44D0D31FD31FD3FFD15132BAF2A15144BAF2A204F901541055F910F2A3F8009320D74A96D307D402FB00E8D101A4C8CB1FCB1FCBFFC9ED5410BD6DAD")[0],c=new e.Cell;return c.bits.writeUint(0,32),c.bits.writeUint(s,32),c.bits.writeBuffer(a),new t({publicKey:a,workchain:o,walletId:s,initialCode:l,initialData:c})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc"),walletId:a.getInt("walletId")})}}return xg.WalletV3R2Source=t,xg}var _g={},dO;function nH(){if(dO)return _g;dO=1,Object.defineProperty(_g,"__esModule",{value:!0}),_g.WalletV4Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.v4",this.walletVersion="v4",this.initialCode=n.initialCode,this.initialData=n.initialData,this.workchain=n.workchain,this.walletId=n.walletId,this.publicKey=n.publicKey}static create(n){const a=n.walletId?n.walletId:698983191;let o=e.Cell.fromBoc(t.SOURCE)[0],s=new e.Cell;return s.bits.writeUint(0,32),s.bits.writeUint(a,32),s.bits.writeBuffer(n.publicKey),s.bits.writeBit(0),new t({initialCode:o,initialData:s,workchain:n.workchain,walletId:a,publicKey:n.publicKey})}static restore(n){const a=new e.ConfigStore(n);return t.create({workchain:a.getInt("wc"),publicKey:a.getBuffer("pk"),walletId:a.getInt("walletId")})}describe(){return"Wallet v4 #"+this.walletId}backup(){const n=new e.ConfigStore;return n.setInt("wc",this.workchain),n.setBuffer("pk",this.publicKey),n.setInt("walletId",this.walletId),n.save()}}return _g.WalletV4Source=t,t.SOURCE=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"),_g}var Sg={},Yl={},Eg={},hO;function m_e(){if(hO)return Eg;hO=1,Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.WalletV1SigningMessage=void 0;const e=vl();class t{constructor(n){this.order=n.order,this.sendMode=n.sendMode,n.seqno!==void 0&&n.seqno!==null?this.seqno=n.seqno:this.seqno=0}writeTo(n){n.bits.writeUint(this.seqno,32),n.bits.writeUint8(this.sendMode);let a=new e.Cell;this.order.writeTo(a),n.refs.push(a)}}return Eg.WalletV1SigningMessage=t,Eg}var Cg={},pO;function v_e(){if(pO)return Cg;pO=1,Object.defineProperty(Cg,"__esModule",{value:!0}),Cg.WalletV2SigningMessage=void 0;const e=vl();class t{constructor(n){this.order=n.order,this.sendMode=n.sendMode,n.timeout!==void 0&&n.timeout!==null?this.timeout=n.timeout:this.timeout=Math.floor(Date.now()/1e3)+60,n.seqno!==void 0&&n.seqno!==null?this.seqno=n.seqno:this.seqno=0}writeTo(n){if(n.bits.writeUint(this.seqno,32),this.seqno===0)for(let o=0;o<32;o++)n.bits.writeBit(1);else n.bits.writeUint(this.timeout,32);n.bits.writeUint8(this.sendMode);let a=new e.Cell;this.order.writeTo(a),n.refs.push(a)}}return Cg.WalletV2SigningMessage=t,Cg}var Mg={},gO;function y_e(){if(gO)return Mg;gO=1,Object.defineProperty(Mg,"__esModule",{value:!0}),Mg.WalletV3SigningMessage=void 0;const e=vl();class t{constructor(n){this.order=n.order,this.sendMode=n.sendMode,n.timeout!==void 0&&n.timeout!==null?this.timeout=n.timeout:this.timeout=Math.floor(Date.now()/1e3)+60,n.seqno!==void 0&&n.seqno!==null?this.seqno=n.seqno:this.seqno=0,n.walletId!==null&&n.walletId!==void 0?this.walletId=n.walletId:this.walletId=698983191}writeTo(n){if(n.bits.writeUint(this.walletId,32),this.seqno===0)for(let o=0;o<32;o++)n.bits.writeBit(1);else n.bits.writeUint(this.timeout,32);n.bits.writeUint(this.seqno,32),n.bits.writeUint8(this.sendMode);let a=new e.Cell;this.order.writeTo(a),n.refs.push(a)}}return Mg.WalletV3SigningMessage=t,Mg}var kg={},mO;function b_e(){if(mO)return kg;mO=1,Object.defineProperty(kg,"__esModule",{value:!0}),kg.WalletV4SigningMessage=void 0;const e=vl();class t{constructor(n){this.order=n.order,this.sendMode=n.sendMode,n.timeout!==void 0&&n.timeout!==null?this.timeout=n.timeout:this.timeout=Math.floor(Date.now()/1e3)+60,n.seqno!==void 0&&n.seqno!==null?this.seqno=n.seqno:this.seqno=0,n.walletId!==null&&n.walletId!==void 0?this.walletId=n.walletId:this.walletId=698983191}writeTo(n){if(n.bits.writeUint(this.walletId,32),this.seqno===0)for(let a=0;a<32;a++)n.bits.writeBit(1);else n.bits.writeUint(this.timeout,32);if(n.bits.writeUint(this.seqno,32),n.bits.writeUint8(0),this.order){n.bits.writeUint8(this.sendMode);let a=new e.Cell;this.order.writeTo(a),n.refs.push(a)}}}return kg.WalletV4SigningMessage=t,kg}var vO;function iH(){if(vO)return Yl;vO=1,Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.createWalletTransferV4=Yl.createWalletTransferV3=Yl.createWalletTransferV2=Yl.createWalletTransferV1=void 0;const e=Zf(),t=Go(),r=m_e(),n=v_e(),a=y_e(),o=b_e();function s(m){let _=new r.WalletV1SigningMessage({seqno:m.seqno,sendMode:m.sendMode,order:m.order});const T=new t.Cell;_.writeTo(T);let O=(0,e.sign)(T.hash(),m.secretKey);const A=new t.Cell;return A.bits.writeBuffer(O),_.writeTo(A),A}Yl.createWalletTransferV1=s;function l(m){let _=new n.WalletV2SigningMessage({seqno:m.seqno,sendMode:m.sendMode,order:m.order,timeout:m.timeout});const T=new t.Cell;_.writeTo(T);let O=(0,e.sign)(T.hash(),m.secretKey);const A=new t.Cell;return A.bits.writeBuffer(O),_.writeTo(A),A}Yl.createWalletTransferV2=l;function c(m){let _=new a.WalletV3SigningMessage({timeout:m.timeout,walletId:m.walletId,seqno:m.seqno,sendMode:m.sendMode,order:m.order});const T=new t.Cell;_.writeTo(T);let O=(0,e.sign)(T.hash(),m.secretKey);const A=new t.Cell;return A.bits.writeBuffer(O),_.writeTo(A),A}Yl.createWalletTransferV3=c;function p(m){let _=new o.WalletV4SigningMessage({timeout:m.timeout,walletId:m.walletId,seqno:m.seqno,sendMode:m.sendMode,order:m.order});const T=new t.Cell;_.writeTo(T);let O;m.secretKey?O=(0,e.sign)(T.hash(),m.secretKey):O=Buffer.alloc(64);const A=new t.Cell;return A.bits.writeBuffer(O),_.writeTo(A),A}return Yl.createWalletTransferV4=p,Yl}var Rg={},yO;function oH(){if(yO)return Rg;yO=1,Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.contractAddress=void 0;const e=Go();function t(r){let n=new e.Cell;new e.StateInit({code:r.initialCode,data:r.initialData}).writeTo(n);let o=n.hash();return new e.Address(r.workchain,o)}return Rg.contractAddress=t,Rg}var bO;function aH(){if(bO)return Sg;bO=1,Object.defineProperty(Sg,"__esModule",{value:!0}),Sg.WalletContract=void 0;const e=iH(),t=oH();class r{constructor(a,o,s){this.client=a,this.address=s,this.source=o}static create(a,o){let s=(0,t.contractAddress)(o);return new r(a,o,s)}async getSeqNo(){if(await this.client.isContractDeployed(this.address)){let a=await this.client.callGetMethod(this.address,"seqno");return parseInt(a.stack[0][1],16)}else return 0}createTransfer(a){switch(this.source.walletVersion){case"v1":return(0,e.createWalletTransferV1)({seqno:a.seqno,sendMode:a.sendMode,secretKey:a.secretKey,order:a.order});case"v2":return(0,e.createWalletTransferV2)({seqno:a.seqno,sendMode:a.sendMode,secretKey:a.secretKey,order:a.order,timeout:a.timeout});case"v3":return(0,e.createWalletTransferV3)({seqno:a.seqno,sendMode:a.sendMode,secretKey:a.secretKey,order:a.order,walletId:this.source.walletId,timeout:a.timeout});case"v4":return(0,e.createWalletTransferV4)({seqno:a.seqno,sendMode:a.sendMode,secretKey:a.secretKey,order:a.order,walletId:this.source.walletId,timeout:a.timeout});default:throw Error("Unknown contract type: "+this.source.type)}}}return Sg.WalletContract=r,Sg}var Oy={},w_e=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oy,"__esModule",{value:!0});Oy.InternalMessage=void 0;const cc=w_e(ml.exports);class x_e{constructor(t){this.to=t.to,this.value=new cc.default(t.value),this.bounce=t.bounce,this.body=t.body,t.from?this.from=t.from:this.from=null,t.ihrDisabled!==null&&t.ihrDisabled!==void 0?this.ihrDisabled=t.ihrDisabled:this.ihrDisabled=!0,t.bounced!==null&&t.bounced!==void 0?this.bounced=t.bounced:this.bounced=!1,t.ihrFees!==null&&t.ihrFees!==void 0?this.ihrFees=new cc.default(t.ihrFees):this.ihrFees=new cc.default(0),t.fwdFees!==null&&t.fwdFees!==void 0?this.fwdFees=new cc.default(t.fwdFees):this.fwdFees=new cc.default(0),t.createdAt!==null&&t.createdAt!==void 0?this.createdAt=new cc.default(t.createdAt):this.createdAt=new cc.default(0),t.createdLt!==null&&t.createdLt!==void 0?this.createdLt=new cc.default(t.createdLt):this.createdLt=new cc.default(0)}writeTo(t){t.bits.writeBit(0),t.bits.writeBit(this.ihrDisabled),t.bits.writeBit(this.bounce),t.bits.writeBit(this.bounced),t.bits.writeAddress(this.from),t.bits.writeAddress(this.to),t.bits.writeCoins(this.value),t.bits.writeBit(!1),t.bits.writeCoins(this.ihrFees),t.bits.writeCoins(this.fwdFees),t.bits.writeUint(this.createdLt,64),t.bits.writeUint(this.createdAt,32),this.body.writeTo(t)}}Oy.InternalMessage=x_e;var Qk={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SendMode=void 0,function(t){t[t.CARRRY_ALL_REMAINING_BALANCE=128]="CARRRY_ALL_REMAINING_BALANCE",t[t.CARRRY_ALL_REMAINING_INCOMING_VALUE=64]="CARRRY_ALL_REMAINING_INCOMING_VALUE",t[t.DESTROY_ACCOUNT_IF_ZERO=32]="DESTROY_ACCOUNT_IF_ZERO",t[t.PAY_GAS_SEPARATLY=1]="PAY_GAS_SEPARATLY",t[t.IGNORE_ERRORS=2]="IGNORE_ERRORS"}(e.SendMode||(e.SendMode={}))})(Qk);var wO;function sH(){return wO||(wO=1,function(e){var t=Ir&&Ir.__classPrivateFieldSet||function(ee,V,te,R,h){if(R==="m")throw new TypeError("Private method is not writable");if(R==="a"&&!h)throw new TypeError("Private accessor was defined without a setter");if(typeof V=="function"?ee!==V||!h:!V.has(ee))throw new TypeError("Cannot write private member to an object whose class did not declare it");return R==="a"?h.call(ee,te):h?h.value=te:V.set(ee,te),te},r=Ir&&Ir.__classPrivateFieldGet||function(ee,V,te,R){if(te==="a"&&!R)throw new TypeError("Private accessor was defined without a getter");if(typeof V=="function"?ee!==V||!R:!V.has(ee))throw new TypeError("Cannot read private member from an object whose class did not declare it");return te==="m"?R:te==="a"?R.call(ee):R?R.value:V.get(ee)},n=Ir&&Ir.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}},a,o;Object.defineProperty(e,"__esModule",{value:!0}),e.Wallet=e.validateWalletType=e.allTypes=void 0;const s=n(ml.exports),l=Zf(),c=Go(),p=Qz(),m=Zz(),_=Jz(),T=eH(),O=tH(),A=rH(),M=nH(),B=aH(),L=Xk(),U=Oy,D=Qk;e.allTypes=["org.ton.wallets.simple.r2","org.ton.wallets.simple.r3","org.ton.wallets.v2","org.ton.wallets.v2.r2","org.ton.wallets.v4","org.ton.wallets.v3.r2","org.ton.wallets.v3"];function Y(ee){return ee==="org.ton.wallets.simple"||ee==="org.ton.wallets.simple.r2"||ee==="org.ton.wallets.simple.r3"||ee==="org.ton.wallets.v2"||ee==="org.ton.wallets.v2.r2"||ee==="org.ton.wallets.v3"||ee==="org.ton.wallets.v3.r2"||ee==="org.ton.wallets.v4"?ee:null}e.validateWalletType=Y;function q(ee,V,te,R){if(V==="org.ton.wallets.simple")throw Error("Unsupported wallet");if(V==="org.ton.wallets.simple.r2")return B.WalletContract.create(ee,p.WalletV1R2Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.simple.r3")return B.WalletContract.create(ee,m.WalletV1R3Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.v2")return B.WalletContract.create(ee,_.WalletV2R1Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.v2.r2")return B.WalletContract.create(ee,T.WalletV2R2Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.v3")return B.WalletContract.create(ee,O.WalletV3R1Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.v3.r2")return B.WalletContract.create(ee,A.WalletV3R2Source.create({publicKey:te,workchain:R}));if(V==="org.ton.wallets.v4")return B.WalletContract.create(ee,M.WalletV4Source.create({publicKey:te,workchain:R}));throw Error("Unknown wallet type: "+V)}class Z{constructor(V,te){a.set(this,void 0),o.set(this,null),t(this,a,V,"f"),this.address=te}static open(V,te){return new Z(V,te)}static openDefault(V,te,R){const h=(0,l.keyPairFromSecretKey)(R).publicKey;let g=q(V,"org.ton.wallets.v3",h,te),v=new Z(V,g.address);return v.prepare(te,h,"org.ton.wallets.v3"),v}static openByType(V,te,R,h){const g=(0,l.keyPairFromSecretKey)(R).publicKey;let v=q(V,h,g,te),u=new Z(V,v.address);return u.prepare(te,g,h),u}static openFromSource(V,te){let R=(0,c.contractAddress)(te),h=new Z(V,R);return h.prepareFromSource(te),h}static async findActiveBySecretKey(V,te,R){const h=(0,l.keyPairFromSecretKey)(R).publicKey;let g=[];for(let v of e.allTypes){let u=q(V,v,h,te),f=await V.isContractDeployed(u.address),y=await V.getBalance(u.address);(f||y.gt(new s.default(0)))&&g.push({address:u.address,type:v,balance:y,deployed:f})}return g}static async findBestBySecretKey(V,te,R){const h=(0,l.keyPairFromSecretKey)(R).publicKey;let g=await this.findActiveBySecretKey(V,te,R);if(g.length===0)return this.openDefault(V,te,R);let v=g[0].balance,u=g[0].type;for(let S=1;S{if(this.ended)throw Error("Already ended");return this.refs.push(o),this},this.storeBit=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeBit(o),this},this.storeBitArray=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeBitArray(o),this},this.storeUint=(o,s)=>{if(this.ended)throw Error("Already ended");return this.bits.writeUint(o,s),this},this.storeInt=(o,s)=>{if(this.ended)throw Error("Already ended");return this.bits.writeInt(o,s),this},this.storeUint8=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeUint8(o),this},this.storeVarUint=(o,s)=>{if(this.ended)throw Error("Already ended");return this.bits.writeVarUInt(o,s),this},this.storeBuffer=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeBuffer(o),this},this.storeCoins=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeCoins(o),this},this.storeAddress=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeAddress(o),this},this.storeBitString=o=>{if(this.ended)throw Error("Already ended");return this.bits.writeBitString(o),this},this.storeDict=o=>{if(this.ended)throw Error("Already ended");return o?(this.bits.writeBit(!0),this.refs.push(o)):this.bits.writeBit(!1),this},this.storeRefMaybe=o=>this.storeDict(o),this.storeCellCopy=o=>{this.storeBitString(o.bits);for(let s of o.refs)this.storeRef(s);return this}}endCell(){if(this.ended)throw Error("Already ended");this.ended=!0;let o=new t.Cell("ordinary",this.bits);for(let s of this.refs)o.refs.push(s);return o}}pd.Builder=r;function n(){return new r}return pd.beginCell=n,pd}var cu={};Object.defineProperty(cu,"__esModule",{value:!0});cu.parseDictRefs=cu.parseDictBitString=cu.parseDict=void 0;const __e=ml.exports;function iv(e,t,r,n,a){let o=t.readBit()?1:0,s=0,l=e;if(o===0){s=t.readUnaryLength();for(let c=0;cn.readRemaining()),r}cu.parseDictBitString=E_e;function C_e(e,t){let r=new Map;return iv("",e,t,r,n=>n.readRef()),r}cu.parseDictRefs=C_e;var pi={},_O;function lH(){if(_O)return pi;_O=1;var e=Ir&&Ir.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(pi,"__esModule",{value:!0}),pi.parseFullConfig=pi.parseVotingSetup=pi.parseProposalSetup=pi.configParse29=pi.configParse28=pi.configParseMsgPrices=pi.configParseGasLimitsPrices=pi.configParseBridge=pi.configParseValidatorSet=pi.configParse12=pi.configParse40=pi.configParse8=pi.configParse18=pi.configParse17=pi.configParse16=pi.configParse15=pi.configParseMasterAddressRequired=pi.parseBridge=pi.parseValidatorSet=pi.parseValidatorDescr=pi.configParseWorkchainDescriptor=pi.configParseMasterAddress=void 0;const t=e(ml.exports),r=Go(),n=cu;function a(g){return g?new r.Address(-1,g.readBuffer(32)):null}pi.configParseMasterAddress=a;function o(g){if(g.readUint(8).toNumber()!==166)throw Error("Invalid config");let v=g.readUint(32).toNumber(),u=g.readUint(8).toNumber(),f=g.readUint(8).toNumber(),y=g.readUint(8).toNumber(),S=g.readBit(),w=g.readBit(),d=g.readBit(),I=g.readUint(13).toNumber(),$=g.readBuffer(32),b=g.readBuffer(32),X=g.readUint(32).toNumber();if(g.readBit())throw Error("Invalid config");let we=g.readUint(32).toNumber(),Ae=g.readUint(64);return{enabledSince:v,actialMinSplit:u,min_split:f,max_split:y,basic:S,active:w,accept_msgs:d,flags:I,zerostateRootHash:$,zerostateFileHash:b,version:X,format:{vmVersion:we,vmMode:Ae}}}pi.configParseWorkchainDescriptor=o;function s(g){if(g.readUint(32).toNumber()!==2390828938)throw Error("Invalid config");return g.readBuffer(32)}function l(g){let v=g.readUint(8).toNumber();if(v===83)return{publicKey:s(g),weight:g.readUint(64),adnlAddress:null};if(v===115)return{publicKey:s(g),weight:g.readUint(64),adnlAddress:g.readBuffer(32)};throw Error("Invalid config")}pi.parseValidatorDescr=l;function c(g){let v=g.readUint(8).toNumber();if(v===17){let u=g.readUint(32).toNumber(),f=g.readUint(32).toNumber(),y=g.readUint(16).toNumber(),S=g.readUint(16).toNumber(),w=(0,n.parseDict)(g.readRef(),16,l);return{timeSince:u,timeUntil:f,total:y,main:S,totalWeight:null,list:w}}else if(v===18){let u=g.readUint(32).toNumber(),f=g.readUint(32).toNumber(),y=g.readUint(16).toNumber(),S=g.readUint(16).toNumber(),w=g.readUint(64),I=g.readBit()?(0,n.parseDict)(g.readRef(),16,l):null;return{timeSince:u,timeUntil:f,total:y,main:S,totalWeight:w,list:I}}}pi.parseValidatorSet=c;function p(g){let v=g.readBuffer(32),u=g.readBuffer(32),f=g.readBit()?(0,n.parseDict)(g.readRef(),256,S=>S.readBuffer(32)):null,y=g.readBuffer(32);return{bridgeAddress:v,oracleMultisigAddress:u,oracles:f,externalChainAddress:y}}pi.parseBridge=p;function m(g){if(!g)throw Error("Invalid config");return a(g)}pi.configParseMasterAddressRequired=m;function _(g){if(!g)throw Error("Invalid config");let v=g.readUintNumber(32),u=g.readUintNumber(32),f=g.readUintNumber(32),y=g.readUintNumber(32);return{validatorsElectedFor:v,electorsStartBefore:u,electorsEndBefore:f,stakeHeldFor:y}}pi.configParse15=_;function T(g){if(!g)throw Error("Invalid config");let v=g.readUintNumber(16),u=g.readUintNumber(16),f=g.readUintNumber(16);return{maxValidators:v,maxMainValidators:u,minValidators:f}}pi.configParse16=T;function O(g){if(!g)throw Error("Invalid config");let v=g.readCoins(),u=g.readCoins(),f=g.readCoins(),y=g.readUintNumber(32);return{minStake:v,maxStake:u,minTotalStake:f,maxStakeFactor:y}}pi.configParse17=O;function A(g){if(!g)throw Error("Invalid config");let v=[];return(0,n.parseDict)(g,32,u=>{if(u.readUintNumber(8)!==204)throw Error("Invalid config");let y=u.readUint(32),S=u.readUint(64),w=u.readUint(64),d=u.readUint(64),I=u.readUint(64);return{utime_since:y,bit_price_ps:S,cell_price_ps:w,mc_bit_price_ps:d,mc_cell_price_ps:I}}).forEach(u=>{v.push(u)}),v}pi.configParse18=A;function M(g){if(!g)return{version:0,capabilities:new t.default(0)};let v=g.readUintNumber(32),u=g.readUint(64);return{version:v,capabilities:u}}pi.configParse8=M;function B(g){if(!g)return null;if(g.readUintNumber(8)!==1)throw Error("Invalid config");let u=g.readCoins(),f=g.readCoins(),y=g.readUintNumber(16),S=g.readUintNumber(16),w=g.readUintNumber(16),d=g.readUintNumber(16),I=g.readUintNumber(16),$=g.readUintNumber(16),b=g.readUintNumber(16),X=g.readUintNumber(16),we=g.readUintNumber(16);return{defaultFlatFine:u,defaultProportionaFine:f,severityFlatMult:y,severityProportionalMult:S,unfunishableInterval:w,longInterval:d,longFlatMult:I,longProportionalMult:$,mediumInterval:b,mediumFlatMult:X,mediumProportionalMult:we}}pi.configParse40=B;function L(g){if(!g)throw Error("Invalid config");if(g.readUint(1).toNumber())return(0,n.parseDict)(g.readRef(),32,o);throw Error("No workchains exist")}pi.configParse12=L;function U(g){return g?c(g):null}pi.configParseValidatorSet=U;function D(g){return g?p(g):null}pi.configParseBridge=D;function Y(g){const v=g.readUintNumber(8);if(v===222){const u=g.readUint(64),f=g.readUint(64),y=g.readUint(64),S=g.readUint(64),w=g.readUint(64),d=g.readUint(64),I=g.readUint(64);return{gasPrice:u,gasLimit:f,specialGasLimit:y,gasCredit:S,blockGasLimit:w,freezeDueLimit:d,deleteDueLimit:I}}else if(v===221){const u=g.readUint(64),f=g.readUint(64),y=g.readUint(64),S=g.readUint(64),w=g.readUint(64),d=g.readUint(64);return{gasPrice:u,gasLimit:f,gasCredit:y,blockGasLimit:S,freezeDueLimit:w,deleteDueLimit:d}}else throw Error("Invalid config")}function q(g){if(!g)throw Error("Invalid config");if(g.readUintNumber(8)===209){const u=g.readUint(64),f=g.readUint(64),y=Y(g);return{flatLimit:u,flatGasPrice:f,other:y}}else throw Error("Invalid config")}pi.configParseGasLimitsPrices=q;function Z(g){if(!g)throw new Error("Invalid config");if(g.readUintNumber(8)!==234)throw new Error("Invalid msg prices param");return{lumpPrice:g.readUint(64),bitPrice:g.readUint(64),cellPrice:g.readUint(64),ihrPriceFactor:g.readUint(32),firstFrac:g.readUint(16),nextFrac:g.readUint(16)}}pi.configParseMsgPrices=Z;function ee(g){if(!g)throw new Error("Invalid config");let v=g.readUintNumber(8);if(v===193){let u=g.readUintNumber(32),f=g.readUintNumber(32),y=g.readUintNumber(32),S=g.readUintNumber(32);return{masterCatchainLifetime:u,shardCatchainLifetime:f,shardValidatorsLifetime:y,shardValidatorsCount:S}}if(v===194){let u=g.readUintNumber(7),f=g.readBit(),y=g.readUintNumber(32),S=g.readUintNumber(32),w=g.readUintNumber(32),d=g.readUintNumber(32);return{flags:u,suffleMasterValidators:f,masterCatchainLifetime:y,shardCatchainLifetime:S,shardValidatorsLifetime:w,shardValidatorsCount:d}}throw new Error("Invalid config")}pi.configParse28=ee;function V(g){if(!g)throw new Error("Invalid config");let v=g.readUintNumber(8);if(v===214){let u=g.readUintNumber(32),f=g.readUintNumber(32),y=g.readUintNumber(32),S=g.readUintNumber(32),w=g.readUintNumber(32),d=g.readUintNumber(32),I=g.readUintNumber(32),$=g.readUintNumber(32);return{roundCandidates:u,nextCandidateDelay:f,consensusTimeout:y,fastAttempts:S,attemptDuration:w,catchainMaxDeps:d,maxBlockBytes:I,maxColaltedBytes:$}}else if(v===215){let u=g.readUintNumber(7),f=g.readBit(),y=g.readUintNumber(8),S=g.readUintNumber(32),w=g.readUintNumber(32),d=g.readUintNumber(32),I=g.readUintNumber(32),$=g.readUintNumber(32),b=g.readUintNumber(32),X=g.readUintNumber(32);return{flags:u,newCatchainIds:f,roundCandidates:y,nextCandidateDelay:S,consensusTimeout:w,fastAttempts:d,attemptDuration:I,catchainMaxDeps:$,maxBlockBytes:b,maxColaltedBytes:X}}else if(v===216){let u=g.readUintNumber(7),f=g.readBit(),y=g.readUintNumber(8),S=g.readUintNumber(32),w=g.readUintNumber(32),d=g.readUintNumber(32),I=g.readUintNumber(32),$=g.readUintNumber(32),b=g.readUintNumber(32),X=g.readUintNumber(32),we=g.readUintNumber(16);return{flags:u,newCatchainIds:f,roundCandidates:y,nextCandidateDelay:S,consensusTimeout:w,fastAttempts:d,attemptDuration:I,catchainMaxDeps:$,maxBlockBytes:b,maxColaltedBytes:X,protoVersion:we}}else if(v===217){let u=g.readUintNumber(7),f=g.readBit(),y=g.readUintNumber(8),S=g.readUintNumber(32),w=g.readUintNumber(32),d=g.readUintNumber(32),I=g.readUintNumber(32),$=g.readUintNumber(32),b=g.readUintNumber(32),X=g.readUintNumber(32),we=g.readUintNumber(16),Ae=g.readUintNumber(32);return{flags:u,newCatchainIds:f,roundCandidates:y,nextCandidateDelay:S,consensusTimeout:w,fastAttempts:d,attemptDuration:I,catchainMaxDeps:$,maxBlockBytes:b,maxColaltedBytes:X,protoVersion:we,catchainMaxBlocksCoeff:Ae}}throw new Error("Invalid config")}pi.configParse29=V;function te(g){if(g.readUintNumber(8)!==54)throw new Error("Invalid config");let u=g.readUintNumber(8),f=g.readUintNumber(8),y=g.readUintNumber(8),S=g.readUintNumber(8),w=g.readUintNumber(32),d=g.readUintNumber(32),I=g.readUintNumber(32),$=g.readUintNumber(32);return{minTotalRounds:u,maxTotalRounds:f,minWins:y,maxLoses:S,minStoreSec:w,maxStoreSec:d,bitPrice:I,cellPrice:$}}pi.parseProposalSetup=te;function R(g){if(!g)throw new Error("Invalid config");if(g.readUintNumber(8)!==145)throw new Error("Invalid config");let u=te(g.readRef()),f=te(g.readRef());return{normalParams:u,criticalParams:f}}pi.parseVotingSetup=R;function h(g){return{configAddress:m(g.get("0")),electorAddress:m(g.get("1")),minterAddress:a(g.get("2")),feeCollectorAddress:a(g.get("3")),dnsRootAddress:a(g.get("4")),globalVersion:M(g.get("8")),workchains:L(g.get("12")),voting:R(g.get("11")),validators:{..._(g.get("15")),...T(g.get("16")),...O(g.get("17"))},storagePrices:A(g.get("18")),gasPrices:{masterchain:q(g.get("20")),workchain:q(g.get("21"))},msgPrices:{masterchain:Z(g.get("24")),workchain:Z(g.get("25"))},validatorSets:{prevValidators:U(g.get("32")),prevTempValidators:U(g.get("33")),currentValidators:U(g.get("34")),currentTempValidators:U(g.get("35")),nextValidators:U(g.get("36")),nextTempValidators:U(g.get("37"))},validatorsPunish:B(g.get("40")),bridges:{ethereum:D(g.get("71")),binance:D(g.get("72")),polygon:D(g.get("73"))},catchain:ee(g.get("28")),consensus:V(g.get("29"))}}return pi.parseFullConfig=h,pi}var SO;function M_e(){if(SO)return Ag;SO=1,Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.ConfigContract=void 0;const e=Go(),t=DD(),r=By(),n=cu,a=lH();class o{constructor(l){this.address=e.Address.parseRaw("-1:5555555555555555555555555555555555555555555555555555555555555555"),this.source=new e.UnknownContractSource("org.ton.config",-1,"Config Contract"),this.client=l}async getSeqNo(){let l=await this.client.callGetMethod(this.address,"seqno");return parseInt(l.stack[0][1],16)}async getPublicKey(){let l=(await this.client.getContractState(this.address)).data,c=e.Cell.fromBoc(l)[0],p=new t.BitStringReader(c.bits);return p.readUint(32),p.readUint(256)}async getConfigsRaw(){let l=(await this.client.getContractState(this.address)).data,p=e.Cell.fromBoc(l)[0].beginParse().readRef();return(0,n.parseDictRefs)(p,32)}async getConfigs(){let l=await this.getConfigsRaw();return(0,a.parseFullConfig)(l)}async createProposal(l){return(0,r.beginCell)().storeUint(1851150418,32).storeUint(l.queryId,64).storeUint(l.expiresAt,32).storeRef((0,r.beginCell)().storeUint(243,8).storeUint(l.paramId,32).storeRefMaybe(l.paramValue).storeRefMaybe(l.ifHashEqual).endCell()).storeBit(l.critical).endCell()}}return Ag.ConfigContract=o,Ag}var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0});Uy.InMemoryCache=void 0;class k_e{constructor(){this.cache=new Map,this.set=async(t,r,n)=>{n!==null?this.cache.set(t+"$$"+r,n):this.cache.delete(t+"$$"+r)},this.get=async(t,r)=>{let n=this.cache.get(t+"$$"+r);return n!==void 0?n:null}}}Uy.InMemoryCache=k_e;var EO;function R_e(){if(EO)return pg;EO=1;var e=Ir&&Ir.__classPrivateFieldSet||function(U,D,Y,q,Z){if(q==="m")throw new TypeError("Private method is not writable");if(q==="a"&&!Z)throw new TypeError("Private accessor was defined without a setter");if(typeof D=="function"?U!==D||!Z:!D.has(U))throw new TypeError("Cannot write private member to an object whose class did not declare it");return q==="a"?Z.call(U,Y):Z?Z.value=Y:D.set(U,Y),Y},t=Ir&&Ir.__classPrivateFieldGet||function(U,D,Y,q){if(Y==="a"&&!q)throw new TypeError("Private accessor was defined without a getter");if(typeof D=="function"?U!==D||!q:!D.has(U))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?q:Y==="a"?q.call(U):q?q.value:D.get(U)},r;Object.defineProperty(pg,"__esModule",{value:!0}),pg.TonClient=void 0;const n=Zf(),a=v0,o=vl(),s=Yv,l=Iy,c=Xk(),p=Py,m=sH(),_=ml.exports,T=Go(),O=M_e(),A=Uy;function M(U){return{source:U.source!==""?a.Address.parseFriendly(U.source).address:null,destination:U.destination!==""?a.Address.parseFriendly(U.destination).address:null,forwardFee:new _.BN(U.fwd_fee),ihrFee:new _.BN(U.ihr_fee),value:new _.BN(U.value),createdLt:U.created_lt,body:U.msg_data["@type"]==="msg.dataRaw"?{type:"data",data:Buffer.from(U.msg_data.body,"base64")}:U.msg_data["@type"]==="msg.dataText"?{type:"text",text:Buffer.from(U.msg_data.text,"base64").toString("utf-8")}:null}}function B(U){return{id:{lt:U.transaction_id.lt,hash:U.transaction_id.hash},time:U.utime,data:U.data,storageFee:new _.BN(U.storage_fee),otherFee:new _.BN(U.other_fee),fee:new _.BN(U.fee),inMessage:U.in_msg?M(U.in_msg):null,outMessages:U.out_msgs.map(M)}}class L{constructor(D){r.set(this,void 0),this.services={configs:new O.ConfigContract(this)},this.parameters={endpoint:D.endpoint,cache:D.cache?D.cache:new A.InMemoryCache},e(this,r,new s.HttpApi(this.parameters.endpoint,this.parameters.cache,{timeout:D.timeout,apiKey:D.apiKey,adapter:D.httpAdapter}),"f")}async getBalance(D){return(await this.getContractState(D)).balance}async callGetMethod(D,Y,q=[]){let Z=await t(this,r,"f").callGetMethod(D,Y,q);if(Z.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+Z.exit_code);return{gas_used:Z.gas_used,stack:Z.stack}}async callGetMethodWithError(D,Y,q=[]){let Z=await t(this,r,"f").callGetMethod(D,Y,q);return{gas_used:Z.gas_used,stack:Z.stack,exit_code:Z.exit_code}}async getTransactions(D,Y){let q=await t(this,r,"f").getTransactions(D,Y),Z=[];for(let ee of q)Z.push(B(ee));return Z}async getTransaction(D,Y,q){let Z=await t(this,r,"f").getTransaction(D,Y,q);return Z?B(Z):null}async getMasterchainInfo(){let D=await t(this,r,"f").getMasterchainInfo();return{workchain:D.init.workchain,shard:D.last.shard,initSeqno:D.init.seqno,latestSeqno:D.last.seqno}}async getWorkchainShards(D){return(await t(this,r,"f").getShards(D)).map(q=>({workchain:q.workchain,shard:q.shard,seqno:q.seqno}))}async getShardTransactions(D,Y,q){let Z=await t(this,r,"f").getBlockTransactions(D,Y,q);if(Z.incomplete)throw Error("Unsupported");return Z.transactions.map(ee=>({account:a.Address.parseRaw(ee.account),lt:ee.lt,hash:ee.hash}))}async sendMessage(D){const Y=new o.Cell;D.writeTo(Y);const q=await Y.toBoc({idx:!1});await t(this,r,"f").sendBoc(q)}async sendFile(D){await t(this,r,"f").sendBoc(D)}async estimateExternalMessageFee(D,Y){return await t(this,r,"f").estimateFee(D,{body:Y.body,initCode:Y.initCode,initData:Y.initData,ignoreSignature:Y.ignoreSignature})}async sendExternalMessage(D,Y){if(await this.isContractDeployed(D.address)){const q=new l.ExternalMessage({to:D.address,body:new c.CommonMessageInfo({body:new T.CellMessage(Y)})});await this.sendMessage(q)}else{const q=new l.ExternalMessage({to:D.address,body:new c.CommonMessageInfo({stateInit:new p.StateInit({code:D.source.initialCode,data:D.source.initialData}),body:new T.CellMessage(Y)})});await this.sendMessage(q)}}async isContractDeployed(D){return(await this.getContractState(D)).state==="active"}async getContractState(D){let Y=await t(this,r,"f").getAddressInformation(D),q=new _.BN(Y.balance),Z=Y.state;return{balance:q,state:Z,code:Y.code!==""?Buffer.from(Y.code,"base64"):null,data:Y.data!==""?Buffer.from(Y.data,"base64"):null,lastTransaction:Y.last_transaction_id.lt!=="0"?{lt:Y.last_transaction_id.lt,hash:Y.last_transaction_id.hash}:null,blockId:{workchain:Y.block_id.workchain,shard:Y.block_id.shard,seqno:Y.block_id.seqno},timestampt:Y.sync_utime}}openWalletFromAddress(D){return m.Wallet.open(this,D.source)}findWalletFromSecretKey(D){return m.Wallet.findBestBySecretKey(this,D.workchain,D.secretKey)}openWalletDefaultFromSecretKey(D){return m.Wallet.openDefault(this,D.workchain,D.secretKey)}openWalletFromSecretKey(D){return m.Wallet.openByType(this,D.workchain,D.secretKey,D.type)}openWalletFromCustomContract(D){return m.Wallet.openFromSource(this,D)}async createNewWallet(D){let Y=await(0,n.mnemonicNew)(24,D.password),q=await(0,n.mnemonicToWalletKey)(Y,D.password),Z=D.type||"org.ton.wallets.v3",ee=m.Wallet.openByType(this,D.workchain,q.secretKey,Z);return{mnemonic:Y,key:q,wallet:ee}}}return pg.TonClient=L,r=new WeakMap,pg}var Xp={},uH={exports:{}};(function(e){(function(t,r){function n(R,h){if(!R)throw new Error(h||"Assertion failed")}function a(R,h){R.super_=h;var g=function(){};g.prototype=h.prototype,R.prototype=new g,R.prototype.constructor=R}function o(R,h,g){if(o.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((h==="le"||h==="be")&&(g=h,h=10),this._init(R||0,h||10,g||"be"))}typeof t=="object"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{s=nl("buffer").Buffer}catch{}o.isBN=function(h){return h instanceof o?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===o.wordSize&&Array.isArray(h.words)},o.max=function(h,g){return h.cmp(g)>0?h:g},o.min=function(h,g){return h.cmp(g)<0?h:g},o.prototype._init=function(h,g,v){if(typeof h=="number")return this._initNumber(h,g,v);if(typeof h=="object")return this._initArray(h,g,v);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),h=h.toString().replace(/\s+/g,"");var u=0;h[0]==="-"&&u++,g===16?this._parseHex(h,u):this._parseBase(h,g,u),h[0]==="-"&&(this.negative=1),this.strip(),v==="le"&&this._initArray(this.toArray(),g,v)},o.prototype._initNumber=function(h,g,v){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),g,v)},o.prototype._initArray=function(h,g,v){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var u=0;u=0;u-=3)y=h[u]|h[u-1]<<8|h[u-2]<<16,this.words[f]|=y<>>26-S&67108863,S+=24,S>=26&&(S-=26,f++);else if(v==="le")for(u=0,f=0;u>>26-S&67108863,S+=24,S>=26&&(S-=26,f++);return this.strip()};function l(R,h,g){for(var v=0,u=Math.min(R.length,g),f=h;f=49&&y<=54?v|=y-49+10:y>=17&&y<=22?v|=y-17+10:v|=y&15}return v}o.prototype._parseHex=function(h,g){this.length=Math.ceil((h.length-g)/6),this.words=new Array(this.length);for(var v=0;v=g;v-=6)f=l(h,v,v+6),this.words[u]|=f<>>26-y&4194303,y+=24,y>=26&&(y-=26,u++);v+6!==g&&(f=l(h,g,v+6),this.words[u]|=f<>>26-y&4194303),this.strip()};function c(R,h,g,v){for(var u=0,f=Math.min(R.length,g),y=h;y=49?u+=S-49+10:S>=17?u+=S-17+10:u+=S}return u}o.prototype._parseBase=function(h,g,v){this.words=[0],this.length=1;for(var u=0,f=1;f<=67108863;f*=g)u++;u--,f=f/g|0;for(var y=h.length-v,S=y%u,w=Math.min(y,y-S)+v,d=0,I=v;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(h,g){h=h||10,g=g|0||1;var v;if(h===16||h==="hex"){v="";for(var u=0,f=0,y=0;y>>24-u&16777215,f!==0||y!==this.length-1?v=p[6-w.length]+w+v:v=w+v,u+=2,u>=26&&(u-=26,y--)}for(f!==0&&(v=f.toString(16)+v);v.length%g!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(h===(h|0)&&h>=2&&h<=36){var d=m[h],I=_[h];v="";var $=this.clone();for($.negative=0;!$.isZero();){var b=$.modn(I).toString(h);$=$.idivn(I),$.isZero()?v=b+v:v=p[d-b.length]+b+v}for(this.isZero()&&(v="0"+v);v.length%g!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(h,g){return n(typeof s<"u"),this.toArrayLike(s,h,g)},o.prototype.toArray=function(h,g){return this.toArrayLike(Array,h,g)},o.prototype.toArrayLike=function(h,g,v){var u=this.byteLength(),f=v||Math.max(1,u);n(u<=f,"byte array longer than desired length"),n(f>0,"Requested array length <= 0"),this.strip();var y=g==="le",S=new h(f),w,d,I=this.clone();if(y){for(d=0;!I.isZero();d++)w=I.andln(255),I.iushrn(8),S[d]=w;for(;d=4096&&(v+=13,g>>>=13),g>=64&&(v+=7,g>>>=7),g>=8&&(v+=4,g>>>=4),g>=2&&(v+=2,g>>>=2),v+g},o.prototype._zeroBits=function(h){if(h===0)return 26;var g=h,v=0;return(g&8191)===0&&(v+=13,g>>>=13),(g&127)===0&&(v+=7,g>>>=7),(g&15)===0&&(v+=4,g>>>=4),(g&3)===0&&(v+=2,g>>>=2),(g&1)===0&&v++,v},o.prototype.bitLength=function(){var h=this.words[this.length-1],g=this._countBits(h);return(this.length-1)*26+g};function T(R){for(var h=new Array(R.bitLength()),g=0;g>>u}return h}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,g=0;gh.length?this.clone().ior(h):h.clone().ior(this)},o.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},o.prototype.iuand=function(h){var g;this.length>h.length?g=h:g=this;for(var v=0;vh.length?this.clone().iand(h):h.clone().iand(this)},o.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},o.prototype.iuxor=function(h){var g,v;this.length>h.length?(g=this,v=h):(g=h,v=this);for(var u=0;uh.length?this.clone().ixor(h):h.clone().ixor(this)},o.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},o.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var g=Math.ceil(h/26)|0,v=h%26;this._expand(g),v>0&&g--;for(var u=0;u0&&(this.words[u]=~this.words[u]&67108863>>26-v),this.strip()},o.prototype.notn=function(h){return this.clone().inotn(h)},o.prototype.setn=function(h,g){n(typeof h=="number"&&h>=0);var v=h/26|0,u=h%26;return this._expand(v+1),g?this.words[v]=this.words[v]|1<h.length?(v=this,u=h):(v=h,u=this);for(var f=0,y=0;y>>26;for(;f!==0&&y>>26;if(this.length=v.length,f!==0)this.words[this.length]=f,this.length++;else if(v!==this)for(;yh.length?this.clone().iadd(h):h.clone().iadd(this)},o.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var g=this.iadd(h);return h.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var v=this.cmp(h);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,f;v>0?(u=this,f=h):(u=h,f=this);for(var y=0,S=0;S>26,this.words[S]=g&67108863;for(;y!==0&&S>26,this.words[S]=g&67108863;if(y===0&&S>>26,$=w&67108863,b=Math.min(d,h.length-1),X=Math.max(0,d-R.length+1);X<=b;X++){var we=d-X|0;u=R.words[we]|0,f=h.words[X]|0,y=u*f+$,I+=y/67108864|0,$=y&67108863}g.words[d]=$|0,w=I|0}return w!==0?g.words[d]=w|0:g.length--,g.strip()}var A=function(h,g,v){var u=h.words,f=g.words,y=v.words,S=0,w,d,I,$=u[0]|0,b=$&8191,X=$>>>13,we=u[1]|0,Ae=we&8191,je=we>>>13,Vt=u[2]|0,De=Vt&8191,Fe=Vt>>>13,wt=u[3]|0,Ke=wt&8191,ht=wt>>>13,dr=u[4]|0,ae=dr&8191,Ve=dr>>>13,Nt=u[5]|0,Ee=Nt&8191,xe=Nt>>>13,ut=u[6]|0,st=ut&8191,_t=ut>>>13,Pt=u[7]|0,Ut=Pt&8191,ve=Pt>>>13,ye=u[8]|0,me=ye&8191,Q=ye>>>13,j=u[9]|0,F=j&8191,ie=j>>>13,de=f[0]|0,pe=de&8191,be=de>>>13,Gt=f[1]|0,Lt=Gt&8191,Tt=Gt>>>13,yr=f[2]|0,zt=yr&8191,Ht=yr>>>13,On=f[3]|0,gr=On&8191,mr=On>>>13,gt=f[4]|0,Pr=gt&8191,kr=gt>>>13,ai=f[5]|0,$r=ai&8191,Hr=ai>>>13,Ti=f[6]|0,Wr=Ti&8191,Dr=Ti>>>13,ho=f[7]|0,fe=ho&8191,Me=ho>>>13,Be=f[8]|0,J=Be&8191,Te=Be>>>13,Zt=f[9]|0,Et=Zt&8191,Kt=Zt>>>13;v.negative=h.negative^g.negative,v.length=19,w=Math.imul(b,pe),d=Math.imul(b,be),d=d+Math.imul(X,pe)|0,I=Math.imul(X,be);var Lr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,w=Math.imul(Ae,pe),d=Math.imul(Ae,be),d=d+Math.imul(je,pe)|0,I=Math.imul(je,be),w=w+Math.imul(b,Lt)|0,d=d+Math.imul(b,Tt)|0,d=d+Math.imul(X,Lt)|0,I=I+Math.imul(X,Tt)|0;var Ur=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,w=Math.imul(De,pe),d=Math.imul(De,be),d=d+Math.imul(Fe,pe)|0,I=Math.imul(Fe,be),w=w+Math.imul(Ae,Lt)|0,d=d+Math.imul(Ae,Tt)|0,d=d+Math.imul(je,Lt)|0,I=I+Math.imul(je,Tt)|0,w=w+Math.imul(b,zt)|0,d=d+Math.imul(b,Ht)|0,d=d+Math.imul(X,zt)|0,I=I+Math.imul(X,Ht)|0;var Ar=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,w=Math.imul(Ke,pe),d=Math.imul(Ke,be),d=d+Math.imul(ht,pe)|0,I=Math.imul(ht,be),w=w+Math.imul(De,Lt)|0,d=d+Math.imul(De,Tt)|0,d=d+Math.imul(Fe,Lt)|0,I=I+Math.imul(Fe,Tt)|0,w=w+Math.imul(Ae,zt)|0,d=d+Math.imul(Ae,Ht)|0,d=d+Math.imul(je,zt)|0,I=I+Math.imul(je,Ht)|0,w=w+Math.imul(b,gr)|0,d=d+Math.imul(b,mr)|0,d=d+Math.imul(X,gr)|0,I=I+Math.imul(X,mr)|0;var Qn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,w=Math.imul(ae,pe),d=Math.imul(ae,be),d=d+Math.imul(Ve,pe)|0,I=Math.imul(Ve,be),w=w+Math.imul(Ke,Lt)|0,d=d+Math.imul(Ke,Tt)|0,d=d+Math.imul(ht,Lt)|0,I=I+Math.imul(ht,Tt)|0,w=w+Math.imul(De,zt)|0,d=d+Math.imul(De,Ht)|0,d=d+Math.imul(Fe,zt)|0,I=I+Math.imul(Fe,Ht)|0,w=w+Math.imul(Ae,gr)|0,d=d+Math.imul(Ae,mr)|0,d=d+Math.imul(je,gr)|0,I=I+Math.imul(je,mr)|0,w=w+Math.imul(b,Pr)|0,d=d+Math.imul(b,kr)|0,d=d+Math.imul(X,Pr)|0,I=I+Math.imul(X,kr)|0;var an=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(an>>>26)|0,an&=67108863,w=Math.imul(Ee,pe),d=Math.imul(Ee,be),d=d+Math.imul(xe,pe)|0,I=Math.imul(xe,be),w=w+Math.imul(ae,Lt)|0,d=d+Math.imul(ae,Tt)|0,d=d+Math.imul(Ve,Lt)|0,I=I+Math.imul(Ve,Tt)|0,w=w+Math.imul(Ke,zt)|0,d=d+Math.imul(Ke,Ht)|0,d=d+Math.imul(ht,zt)|0,I=I+Math.imul(ht,Ht)|0,w=w+Math.imul(De,gr)|0,d=d+Math.imul(De,mr)|0,d=d+Math.imul(Fe,gr)|0,I=I+Math.imul(Fe,mr)|0,w=w+Math.imul(Ae,Pr)|0,d=d+Math.imul(Ae,kr)|0,d=d+Math.imul(je,Pr)|0,I=I+Math.imul(je,kr)|0,w=w+Math.imul(b,$r)|0,d=d+Math.imul(b,Hr)|0,d=d+Math.imul(X,$r)|0,I=I+Math.imul(X,Hr)|0;var wn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(wn>>>26)|0,wn&=67108863,w=Math.imul(st,pe),d=Math.imul(st,be),d=d+Math.imul(_t,pe)|0,I=Math.imul(_t,be),w=w+Math.imul(Ee,Lt)|0,d=d+Math.imul(Ee,Tt)|0,d=d+Math.imul(xe,Lt)|0,I=I+Math.imul(xe,Tt)|0,w=w+Math.imul(ae,zt)|0,d=d+Math.imul(ae,Ht)|0,d=d+Math.imul(Ve,zt)|0,I=I+Math.imul(Ve,Ht)|0,w=w+Math.imul(Ke,gr)|0,d=d+Math.imul(Ke,mr)|0,d=d+Math.imul(ht,gr)|0,I=I+Math.imul(ht,mr)|0,w=w+Math.imul(De,Pr)|0,d=d+Math.imul(De,kr)|0,d=d+Math.imul(Fe,Pr)|0,I=I+Math.imul(Fe,kr)|0,w=w+Math.imul(Ae,$r)|0,d=d+Math.imul(Ae,Hr)|0,d=d+Math.imul(je,$r)|0,I=I+Math.imul(je,Hr)|0,w=w+Math.imul(b,Wr)|0,d=d+Math.imul(b,Dr)|0,d=d+Math.imul(X,Wr)|0,I=I+Math.imul(X,Dr)|0;var Pn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,w=Math.imul(Ut,pe),d=Math.imul(Ut,be),d=d+Math.imul(ve,pe)|0,I=Math.imul(ve,be),w=w+Math.imul(st,Lt)|0,d=d+Math.imul(st,Tt)|0,d=d+Math.imul(_t,Lt)|0,I=I+Math.imul(_t,Tt)|0,w=w+Math.imul(Ee,zt)|0,d=d+Math.imul(Ee,Ht)|0,d=d+Math.imul(xe,zt)|0,I=I+Math.imul(xe,Ht)|0,w=w+Math.imul(ae,gr)|0,d=d+Math.imul(ae,mr)|0,d=d+Math.imul(Ve,gr)|0,I=I+Math.imul(Ve,mr)|0,w=w+Math.imul(Ke,Pr)|0,d=d+Math.imul(Ke,kr)|0,d=d+Math.imul(ht,Pr)|0,I=I+Math.imul(ht,kr)|0,w=w+Math.imul(De,$r)|0,d=d+Math.imul(De,Hr)|0,d=d+Math.imul(Fe,$r)|0,I=I+Math.imul(Fe,Hr)|0,w=w+Math.imul(Ae,Wr)|0,d=d+Math.imul(Ae,Dr)|0,d=d+Math.imul(je,Wr)|0,I=I+Math.imul(je,Dr)|0,w=w+Math.imul(b,fe)|0,d=d+Math.imul(b,Me)|0,d=d+Math.imul(X,fe)|0,I=I+Math.imul(X,Me)|0;var Xr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,w=Math.imul(me,pe),d=Math.imul(me,be),d=d+Math.imul(Q,pe)|0,I=Math.imul(Q,be),w=w+Math.imul(Ut,Lt)|0,d=d+Math.imul(Ut,Tt)|0,d=d+Math.imul(ve,Lt)|0,I=I+Math.imul(ve,Tt)|0,w=w+Math.imul(st,zt)|0,d=d+Math.imul(st,Ht)|0,d=d+Math.imul(_t,zt)|0,I=I+Math.imul(_t,Ht)|0,w=w+Math.imul(Ee,gr)|0,d=d+Math.imul(Ee,mr)|0,d=d+Math.imul(xe,gr)|0,I=I+Math.imul(xe,mr)|0,w=w+Math.imul(ae,Pr)|0,d=d+Math.imul(ae,kr)|0,d=d+Math.imul(Ve,Pr)|0,I=I+Math.imul(Ve,kr)|0,w=w+Math.imul(Ke,$r)|0,d=d+Math.imul(Ke,Hr)|0,d=d+Math.imul(ht,$r)|0,I=I+Math.imul(ht,Hr)|0,w=w+Math.imul(De,Wr)|0,d=d+Math.imul(De,Dr)|0,d=d+Math.imul(Fe,Wr)|0,I=I+Math.imul(Fe,Dr)|0,w=w+Math.imul(Ae,fe)|0,d=d+Math.imul(Ae,Me)|0,d=d+Math.imul(je,fe)|0,I=I+Math.imul(je,Me)|0,w=w+Math.imul(b,J)|0,d=d+Math.imul(b,Te)|0,d=d+Math.imul(X,J)|0,I=I+Math.imul(X,Te)|0;var _n=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(_n>>>26)|0,_n&=67108863,w=Math.imul(F,pe),d=Math.imul(F,be),d=d+Math.imul(ie,pe)|0,I=Math.imul(ie,be),w=w+Math.imul(me,Lt)|0,d=d+Math.imul(me,Tt)|0,d=d+Math.imul(Q,Lt)|0,I=I+Math.imul(Q,Tt)|0,w=w+Math.imul(Ut,zt)|0,d=d+Math.imul(Ut,Ht)|0,d=d+Math.imul(ve,zt)|0,I=I+Math.imul(ve,Ht)|0,w=w+Math.imul(st,gr)|0,d=d+Math.imul(st,mr)|0,d=d+Math.imul(_t,gr)|0,I=I+Math.imul(_t,mr)|0,w=w+Math.imul(Ee,Pr)|0,d=d+Math.imul(Ee,kr)|0,d=d+Math.imul(xe,Pr)|0,I=I+Math.imul(xe,kr)|0,w=w+Math.imul(ae,$r)|0,d=d+Math.imul(ae,Hr)|0,d=d+Math.imul(Ve,$r)|0,I=I+Math.imul(Ve,Hr)|0,w=w+Math.imul(Ke,Wr)|0,d=d+Math.imul(Ke,Dr)|0,d=d+Math.imul(ht,Wr)|0,I=I+Math.imul(ht,Dr)|0,w=w+Math.imul(De,fe)|0,d=d+Math.imul(De,Me)|0,d=d+Math.imul(Fe,fe)|0,I=I+Math.imul(Fe,Me)|0,w=w+Math.imul(Ae,J)|0,d=d+Math.imul(Ae,Te)|0,d=d+Math.imul(je,J)|0,I=I+Math.imul(je,Te)|0,w=w+Math.imul(b,Et)|0,d=d+Math.imul(b,Kt)|0,d=d+Math.imul(X,Et)|0,I=I+Math.imul(X,Kt)|0;var Dn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,w=Math.imul(F,Lt),d=Math.imul(F,Tt),d=d+Math.imul(ie,Lt)|0,I=Math.imul(ie,Tt),w=w+Math.imul(me,zt)|0,d=d+Math.imul(me,Ht)|0,d=d+Math.imul(Q,zt)|0,I=I+Math.imul(Q,Ht)|0,w=w+Math.imul(Ut,gr)|0,d=d+Math.imul(Ut,mr)|0,d=d+Math.imul(ve,gr)|0,I=I+Math.imul(ve,mr)|0,w=w+Math.imul(st,Pr)|0,d=d+Math.imul(st,kr)|0,d=d+Math.imul(_t,Pr)|0,I=I+Math.imul(_t,kr)|0,w=w+Math.imul(Ee,$r)|0,d=d+Math.imul(Ee,Hr)|0,d=d+Math.imul(xe,$r)|0,I=I+Math.imul(xe,Hr)|0,w=w+Math.imul(ae,Wr)|0,d=d+Math.imul(ae,Dr)|0,d=d+Math.imul(Ve,Wr)|0,I=I+Math.imul(Ve,Dr)|0,w=w+Math.imul(Ke,fe)|0,d=d+Math.imul(Ke,Me)|0,d=d+Math.imul(ht,fe)|0,I=I+Math.imul(ht,Me)|0,w=w+Math.imul(De,J)|0,d=d+Math.imul(De,Te)|0,d=d+Math.imul(Fe,J)|0,I=I+Math.imul(Fe,Te)|0,w=w+Math.imul(Ae,Et)|0,d=d+Math.imul(Ae,Kt)|0,d=d+Math.imul(je,Et)|0,I=I+Math.imul(je,Kt)|0;var Bn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,w=Math.imul(F,zt),d=Math.imul(F,Ht),d=d+Math.imul(ie,zt)|0,I=Math.imul(ie,Ht),w=w+Math.imul(me,gr)|0,d=d+Math.imul(me,mr)|0,d=d+Math.imul(Q,gr)|0,I=I+Math.imul(Q,mr)|0,w=w+Math.imul(Ut,Pr)|0,d=d+Math.imul(Ut,kr)|0,d=d+Math.imul(ve,Pr)|0,I=I+Math.imul(ve,kr)|0,w=w+Math.imul(st,$r)|0,d=d+Math.imul(st,Hr)|0,d=d+Math.imul(_t,$r)|0,I=I+Math.imul(_t,Hr)|0,w=w+Math.imul(Ee,Wr)|0,d=d+Math.imul(Ee,Dr)|0,d=d+Math.imul(xe,Wr)|0,I=I+Math.imul(xe,Dr)|0,w=w+Math.imul(ae,fe)|0,d=d+Math.imul(ae,Me)|0,d=d+Math.imul(Ve,fe)|0,I=I+Math.imul(Ve,Me)|0,w=w+Math.imul(Ke,J)|0,d=d+Math.imul(Ke,Te)|0,d=d+Math.imul(ht,J)|0,I=I+Math.imul(ht,Te)|0,w=w+Math.imul(De,Et)|0,d=d+Math.imul(De,Kt)|0,d=d+Math.imul(Fe,Et)|0,I=I+Math.imul(Fe,Kt)|0;var dn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(dn>>>26)|0,dn&=67108863,w=Math.imul(F,gr),d=Math.imul(F,mr),d=d+Math.imul(ie,gr)|0,I=Math.imul(ie,mr),w=w+Math.imul(me,Pr)|0,d=d+Math.imul(me,kr)|0,d=d+Math.imul(Q,Pr)|0,I=I+Math.imul(Q,kr)|0,w=w+Math.imul(Ut,$r)|0,d=d+Math.imul(Ut,Hr)|0,d=d+Math.imul(ve,$r)|0,I=I+Math.imul(ve,Hr)|0,w=w+Math.imul(st,Wr)|0,d=d+Math.imul(st,Dr)|0,d=d+Math.imul(_t,Wr)|0,I=I+Math.imul(_t,Dr)|0,w=w+Math.imul(Ee,fe)|0,d=d+Math.imul(Ee,Me)|0,d=d+Math.imul(xe,fe)|0,I=I+Math.imul(xe,Me)|0,w=w+Math.imul(ae,J)|0,d=d+Math.imul(ae,Te)|0,d=d+Math.imul(Ve,J)|0,I=I+Math.imul(Ve,Te)|0,w=w+Math.imul(Ke,Et)|0,d=d+Math.imul(Ke,Kt)|0,d=d+Math.imul(ht,Et)|0,I=I+Math.imul(ht,Kt)|0;var Zr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,w=Math.imul(F,Pr),d=Math.imul(F,kr),d=d+Math.imul(ie,Pr)|0,I=Math.imul(ie,kr),w=w+Math.imul(me,$r)|0,d=d+Math.imul(me,Hr)|0,d=d+Math.imul(Q,$r)|0,I=I+Math.imul(Q,Hr)|0,w=w+Math.imul(Ut,Wr)|0,d=d+Math.imul(Ut,Dr)|0,d=d+Math.imul(ve,Wr)|0,I=I+Math.imul(ve,Dr)|0,w=w+Math.imul(st,fe)|0,d=d+Math.imul(st,Me)|0,d=d+Math.imul(_t,fe)|0,I=I+Math.imul(_t,Me)|0,w=w+Math.imul(Ee,J)|0,d=d+Math.imul(Ee,Te)|0,d=d+Math.imul(xe,J)|0,I=I+Math.imul(xe,Te)|0,w=w+Math.imul(ae,Et)|0,d=d+Math.imul(ae,Kt)|0,d=d+Math.imul(Ve,Et)|0,I=I+Math.imul(Ve,Kt)|0;var gn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(gn>>>26)|0,gn&=67108863,w=Math.imul(F,$r),d=Math.imul(F,Hr),d=d+Math.imul(ie,$r)|0,I=Math.imul(ie,Hr),w=w+Math.imul(me,Wr)|0,d=d+Math.imul(me,Dr)|0,d=d+Math.imul(Q,Wr)|0,I=I+Math.imul(Q,Dr)|0,w=w+Math.imul(Ut,fe)|0,d=d+Math.imul(Ut,Me)|0,d=d+Math.imul(ve,fe)|0,I=I+Math.imul(ve,Me)|0,w=w+Math.imul(st,J)|0,d=d+Math.imul(st,Te)|0,d=d+Math.imul(_t,J)|0,I=I+Math.imul(_t,Te)|0,w=w+Math.imul(Ee,Et)|0,d=d+Math.imul(Ee,Kt)|0,d=d+Math.imul(xe,Et)|0,I=I+Math.imul(xe,Kt)|0;var rn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(rn>>>26)|0,rn&=67108863,w=Math.imul(F,Wr),d=Math.imul(F,Dr),d=d+Math.imul(ie,Wr)|0,I=Math.imul(ie,Dr),w=w+Math.imul(me,fe)|0,d=d+Math.imul(me,Me)|0,d=d+Math.imul(Q,fe)|0,I=I+Math.imul(Q,Me)|0,w=w+Math.imul(Ut,J)|0,d=d+Math.imul(Ut,Te)|0,d=d+Math.imul(ve,J)|0,I=I+Math.imul(ve,Te)|0,w=w+Math.imul(st,Et)|0,d=d+Math.imul(st,Kt)|0,d=d+Math.imul(_t,Et)|0,I=I+Math.imul(_t,Kt)|0;var un=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(un>>>26)|0,un&=67108863,w=Math.imul(F,fe),d=Math.imul(F,Me),d=d+Math.imul(ie,fe)|0,I=Math.imul(ie,Me),w=w+Math.imul(me,J)|0,d=d+Math.imul(me,Te)|0,d=d+Math.imul(Q,J)|0,I=I+Math.imul(Q,Te)|0,w=w+Math.imul(Ut,Et)|0,d=d+Math.imul(Ut,Kt)|0,d=d+Math.imul(ve,Et)|0,I=I+Math.imul(ve,Kt)|0;var hn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(hn>>>26)|0,hn&=67108863,w=Math.imul(F,J),d=Math.imul(F,Te),d=d+Math.imul(ie,J)|0,I=Math.imul(ie,Te),w=w+Math.imul(me,Et)|0,d=d+Math.imul(me,Kt)|0,d=d+Math.imul(Q,Et)|0,I=I+Math.imul(Q,Kt)|0;var tr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(tr>>>26)|0,tr&=67108863,w=Math.imul(F,Et),d=Math.imul(F,Kt),d=d+Math.imul(ie,Et)|0,I=Math.imul(ie,Kt);var lr=(S+w|0)+((d&8191)<<13)|0;return S=(I+(d>>>13)|0)+(lr>>>26)|0,lr&=67108863,y[0]=Lr,y[1]=Ur,y[2]=Ar,y[3]=Qn,y[4]=an,y[5]=wn,y[6]=Pn,y[7]=Xr,y[8]=_n,y[9]=Dn,y[10]=Bn,y[11]=dn,y[12]=Zr,y[13]=gn,y[14]=rn,y[15]=un,y[16]=hn,y[17]=tr,y[18]=lr,S!==0&&(y[19]=S,v.length++),v};Math.imul||(A=O);function M(R,h,g){g.negative=h.negative^R.negative,g.length=R.length+h.length;for(var v=0,u=0,f=0;f>>26)|0,u+=y>>>26,y&=67108863}g.words[f]=S,v=y,y=u}return v!==0?g.words[f]=v:g.length--,g.strip()}function B(R,h,g){var v=new L;return v.mulp(R,h,g)}o.prototype.mulTo=function(h,g){var v,u=this.length+h.length;return this.length===10&&h.length===10?v=A(this,h,g):u<63?v=O(this,h,g):u<1024?v=M(this,h,g):v=B(this,h,g),v};function L(R,h){this.x=R,this.y=h}L.prototype.makeRBT=function(h){for(var g=new Array(h),v=o.prototype._countBits(h)-1,u=0;u>=1;return u},L.prototype.permute=function(h,g,v,u,f,y){for(var S=0;S>>1)f++;return 1<>>13,v[2*y+1]=f&8191,f=f>>>13;for(y=2*g;y>=26,g+=u/67108864|0,g+=f>>>26,this.words[v]=f&67108863}return g!==0&&(this.words[v]=g,this.length++),this},o.prototype.muln=function(h){return this.clone().imuln(h)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(h){var g=T(h);if(g.length===0)return new o(1);for(var v=this,u=0;u=0);var g=h%26,v=(h-g)/26,u=67108863>>>26-g<<26-g,f;if(g!==0){var y=0;for(f=0;f>>26-g}y&&(this.words[f]=y,this.length++)}if(v!==0){for(f=this.length-1;f>=0;f--)this.words[f+v]=this.words[f];for(f=0;f=0);var u;g?u=(g-g%26)/26:u=0;var f=h%26,y=Math.min((h-f)/26,this.length),S=67108863^67108863>>>f<y)for(this.length-=y,d=0;d=0&&(I!==0||d>=u);d--){var $=this.words[d]|0;this.words[d]=I<<26-f|$>>>f,I=$&S}return w&&I!==0&&(w.words[w.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(h,g,v){return n(this.negative===0),this.iushrn(h,g,v)},o.prototype.shln=function(h){return this.clone().ishln(h)},o.prototype.ushln=function(h){return this.clone().iushln(h)},o.prototype.shrn=function(h){return this.clone().ishrn(h)},o.prototype.ushrn=function(h){return this.clone().iushrn(h)},o.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var g=h%26,v=(h-g)/26,u=1<=0);var g=h%26,v=(h-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(g!==0&&v++,this.length=Math.min(v,this.length),g!==0){var u=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},o.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(w/67108864|0),this.words[f+v]=y&67108863}for(;f>26,this.words[f+v]=y&67108863;if(S===0)return this.strip();for(n(S===-1),S=0,f=0;f>26,this.words[f]=y&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(h,g){var v=this.length-h.length,u=this.clone(),f=h,y=f.words[f.length-1]|0,S=this._countBits(y);v=26-S,v!==0&&(f=f.ushln(v),u.iushln(v),y=f.words[f.length-1]|0);var w=u.length-f.length,d;if(g!=="mod"){d=new o(null),d.length=w+1,d.words=new Array(d.length);for(var I=0;I=0;b--){var X=(u.words[f.length+b]|0)*67108864+(u.words[f.length+b-1]|0);for(X=Math.min(X/y|0,67108863),u._ishlnsubmul(f,X,b);u.negative!==0;)X--,u.negative=0,u._ishlnsubmul(f,1,b),u.isZero()||(u.negative^=1);d&&(d.words[b]=X)}return d&&d.strip(),u.strip(),g!=="div"&&v!==0&&u.iushrn(v),{div:d||null,mod:u}},o.prototype.divmod=function(h,g,v){if(n(!h.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var u,f,y;return this.negative!==0&&h.negative===0?(y=this.neg().divmod(h,g),g!=="mod"&&(u=y.div.neg()),g!=="div"&&(f=y.mod.neg(),v&&f.negative!==0&&f.iadd(h)),{div:u,mod:f}):this.negative===0&&h.negative!==0?(y=this.divmod(h.neg(),g),g!=="mod"&&(u=y.div.neg()),{div:u,mod:y.mod}):(this.negative&h.negative)!==0?(y=this.neg().divmod(h.neg(),g),g!=="div"&&(f=y.mod.neg(),v&&f.negative!==0&&f.isub(h)),{div:y.div,mod:f}):h.length>this.length||this.cmp(h)<0?{div:new o(0),mod:this}:h.length===1?g==="div"?{div:this.divn(h.words[0]),mod:null}:g==="mod"?{div:null,mod:new o(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new o(this.modn(h.words[0]))}:this._wordDiv(h,g)},o.prototype.div=function(h){return this.divmod(h,"div",!1).div},o.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},o.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},o.prototype.divRound=function(h){var g=this.divmod(h);if(g.mod.isZero())return g.div;var v=g.div.negative!==0?g.mod.isub(h):g.mod,u=h.ushrn(1),f=h.andln(1),y=v.cmp(u);return y<0||f===1&&y===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},o.prototype.modn=function(h){n(h<=67108863);for(var g=(1<<26)%h,v=0,u=this.length-1;u>=0;u--)v=(g*v+(this.words[u]|0))%h;return v},o.prototype.idivn=function(h){n(h<=67108863);for(var g=0,v=this.length-1;v>=0;v--){var u=(this.words[v]|0)+g*67108864;this.words[v]=u/h|0,g=u%h}return this.strip()},o.prototype.divn=function(h){return this.clone().idivn(h)},o.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var g=this,v=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var u=new o(1),f=new o(0),y=new o(0),S=new o(1),w=0;g.isEven()&&v.isEven();)g.iushrn(1),v.iushrn(1),++w;for(var d=v.clone(),I=g.clone();!g.isZero();){for(var $=0,b=1;(g.words[0]&b)===0&&$<26;++$,b<<=1);if($>0)for(g.iushrn($);$-- >0;)(u.isOdd()||f.isOdd())&&(u.iadd(d),f.isub(I)),u.iushrn(1),f.iushrn(1);for(var X=0,we=1;(v.words[0]&we)===0&&X<26;++X,we<<=1);if(X>0)for(v.iushrn(X);X-- >0;)(y.isOdd()||S.isOdd())&&(y.iadd(d),S.isub(I)),y.iushrn(1),S.iushrn(1);g.cmp(v)>=0?(g.isub(v),u.isub(y),f.isub(S)):(v.isub(g),y.isub(u),S.isub(f))}return{a:y,b:S,gcd:v.iushln(w)}},o.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var g=this,v=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var u=new o(1),f=new o(0),y=v.clone();g.cmpn(1)>0&&v.cmpn(1)>0;){for(var S=0,w=1;(g.words[0]&w)===0&&S<26;++S,w<<=1);if(S>0)for(g.iushrn(S);S-- >0;)u.isOdd()&&u.iadd(y),u.iushrn(1);for(var d=0,I=1;(v.words[0]&I)===0&&d<26;++d,I<<=1);if(d>0)for(v.iushrn(d);d-- >0;)f.isOdd()&&f.iadd(y),f.iushrn(1);g.cmp(v)>=0?(g.isub(v),u.isub(f)):(v.isub(g),f.isub(u))}var $;return g.cmpn(1)===0?$=u:$=f,$.cmpn(0)<0&&$.iadd(h),$},o.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var g=this.clone(),v=h.clone();g.negative=0,v.negative=0;for(var u=0;g.isEven()&&v.isEven();u++)g.iushrn(1),v.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;v.isEven();)v.iushrn(1);var f=g.cmp(v);if(f<0){var y=g;g=v,v=y}else if(f===0||v.cmpn(1)===0)break;g.isub(v)}while(!0);return v.iushln(u)},o.prototype.invm=function(h){return this.egcd(h).a.umod(h)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(h){return this.words[0]&h},o.prototype.bincn=function(h){n(typeof h=="number");var g=h%26,v=(h-g)/26,u=1<>>26,S&=67108863,this.words[y]=S}return f!==0&&(this.words[y]=f,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(h){var g=h<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var v;if(this.length>1)v=1;else{g&&(h=-h),n(h<=67108863,"Number is too big");var u=this.words[0]|0;v=u===h?0:uh.length)return 1;if(this.length=0;v--){var u=this.words[v]|0,f=h.words[v]|0;if(u!==f){uf&&(g=1);break}}return g},o.prototype.gtn=function(h){return this.cmpn(h)===1},o.prototype.gt=function(h){return this.cmp(h)===1},o.prototype.gten=function(h){return this.cmpn(h)>=0},o.prototype.gte=function(h){return this.cmp(h)>=0},o.prototype.ltn=function(h){return this.cmpn(h)===-1},o.prototype.lt=function(h){return this.cmp(h)===-1},o.prototype.lten=function(h){return this.cmpn(h)<=0},o.prototype.lte=function(h){return this.cmp(h)<=0},o.prototype.eqn=function(h){return this.cmpn(h)===0},o.prototype.eq=function(h){return this.cmp(h)===0},o.red=function(h){return new V(h)},o.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(h){return this.red=h,this},o.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},o.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},o.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},o.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},o.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},o.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},o.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},o.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var U={k256:null,p224:null,p192:null,p25519:null};function D(R,h){this.name=R,this.p=new o(h,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var h=new o(null);return h.words=new Array(Math.ceil(this.n/13)),h},D.prototype.ireduce=function(h){var g=h,v;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),v=g.bitLength();while(v>this.n);var u=v0?g.isub(this.p):g.strip(),g},D.prototype.split=function(h,g){h.iushrn(this.n,0,g)},D.prototype.imulK=function(h){return h.imul(this.k)};function Y(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(Y,D),Y.prototype.split=function(h,g){for(var v=4194303,u=Math.min(h.length,9),f=0;f>>22,y=S}y>>>=22,h.words[f-10]=y,y===0&&h.length>10?h.length-=10:h.length-=9},Y.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var g=0,v=0;v>>=26,h.words[v]=f,g=u}return g!==0&&(h.words[h.length++]=g),h},o._prime=function(h){if(U[h])return U[h];var g;if(h==="k256")g=new Y;else if(h==="p224")g=new q;else if(h==="p192")g=new Z;else if(h==="p25519")g=new ee;else throw new Error("Unknown prime "+h);return U[h]=g,g};function V(R){if(typeof R=="string"){var h=o._prime(R);this.m=h.p,this.prime=h}else n(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}V.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},V.prototype._verify2=function(h,g){n((h.negative|g.negative)===0,"red works only with positives"),n(h.red&&h.red===g.red,"red works only with red numbers")},V.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},V.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},V.prototype.add=function(h,g){this._verify2(h,g);var v=h.add(g);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},V.prototype.iadd=function(h,g){this._verify2(h,g);var v=h.iadd(g);return v.cmp(this.m)>=0&&v.isub(this.m),v},V.prototype.sub=function(h,g){this._verify2(h,g);var v=h.sub(g);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},V.prototype.isub=function(h,g){this._verify2(h,g);var v=h.isub(g);return v.cmpn(0)<0&&v.iadd(this.m),v},V.prototype.shl=function(h,g){return this._verify1(h),this.imod(h.ushln(g))},V.prototype.imul=function(h,g){return this._verify2(h,g),this.imod(h.imul(g))},V.prototype.mul=function(h,g){return this._verify2(h,g),this.imod(h.mul(g))},V.prototype.isqr=function(h){return this.imul(h,h.clone())},V.prototype.sqr=function(h){return this.mul(h,h)},V.prototype.sqrt=function(h){if(h.isZero())return h.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var v=this.m.add(new o(1)).iushrn(2);return this.pow(h,v)}for(var u=this.m.subn(1),f=0;!u.isZero()&&u.andln(1)===0;)f++,u.iushrn(1);n(!u.isZero());var y=new o(1).toRed(this),S=y.redNeg(),w=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);this.pow(d,w).cmp(S)!==0;)d.redIAdd(S);for(var I=this.pow(d,u),$=this.pow(h,u.addn(1).iushrn(1)),b=this.pow(h,u),X=f;b.cmp(y)!==0;){for(var we=b,Ae=0;we.cmp(y)!==0;Ae++)we=we.redSqr();n(Ae=0;f--){for(var I=g.words[f],$=d-1;$>=0;$--){var b=I>>$&1;if(y!==u[0]&&(y=this.sqr(y)),b===0&&S===0){w=0;continue}S<<=1,S|=b,w++,!(w!==v&&(f!==0||$!==0))&&(y=this.mul(y,u[S]),w=0,S=0)}d=26}return y},V.prototype.convertTo=function(h){var g=h.umod(this.m);return g===h?g.clone():g},V.prototype.convertFrom=function(h){var g=h.clone();return g.red=null,g},o.mont=function(h){return new te(h)};function te(R){V.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(te,V),te.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},te.prototype.convertFrom=function(h){var g=this.imod(h.mul(this.rinv));return g.red=null,g},te.prototype.imul=function(h,g){if(h.isZero()||g.isZero())return h.words[0]=0,h.length=1,h;var v=h.imul(g),u=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=v.isub(u).iushrn(this.shift),y=f;return f.cmp(this.m)>=0?y=f.isub(this.m):f.cmpn(0)<0&&(y=f.iadd(this.m)),y._forceRed(this)},te.prototype.mul=function(h,g){if(h.isZero()||g.isZero())return new o(0)._forceRed(this);var v=h.mul(g),u=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=v.isub(u).iushrn(this.shift),y=f;return f.cmp(this.m)>=0?y=f.isub(this.m):f.cmpn(0)<0&&(y=f.iadd(this.m)),y._forceRed(this)},te.prototype.invm=function(h){var g=this.imod(h._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(e,Ir)})(uH);var cH={exports:{}};(function(e){(function(t,r){function n(R,h){if(!R)throw new Error(h||"Assertion failed")}function a(R,h){R.super_=h;var g=function(){};g.prototype=h.prototype,R.prototype=new g,R.prototype.constructor=R}function o(R,h,g){if(o.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((h==="le"||h==="be")&&(g=h,h=10),this._init(R||0,h||10,g||"be"))}typeof t=="object"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{s=nl("buffer").Buffer}catch{}o.isBN=function(h){return h instanceof o?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===o.wordSize&&Array.isArray(h.words)},o.max=function(h,g){return h.cmp(g)>0?h:g},o.min=function(h,g){return h.cmp(g)<0?h:g},o.prototype._init=function(h,g,v){if(typeof h=="number")return this._initNumber(h,g,v);if(typeof h=="object")return this._initArray(h,g,v);g==="hex"&&(g=16),n(g===(g|0)&&g>=2&&g<=36),h=h.toString().replace(/\s+/g,"");var u=0;h[0]==="-"&&u++,g===16?this._parseHex(h,u):this._parseBase(h,g,u),h[0]==="-"&&(this.negative=1),this.strip(),v==="le"&&this._initArray(this.toArray(),g,v)},o.prototype._initNumber=function(h,g,v){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),g,v)},o.prototype._initArray=function(h,g,v){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var u=0;u=0;u-=3)y=h[u]|h[u-1]<<8|h[u-2]<<16,this.words[f]|=y<>>26-S&67108863,S+=24,S>=26&&(S-=26,f++);else if(v==="le")for(u=0,f=0;u>>26-S&67108863,S+=24,S>=26&&(S-=26,f++);return this.strip()};function l(R,h,g){for(var v=0,u=Math.min(R.length,g),f=h;f=49&&y<=54?v|=y-49+10:y>=17&&y<=22?v|=y-17+10:v|=y&15}return v}o.prototype._parseHex=function(h,g){this.length=Math.ceil((h.length-g)/6),this.words=new Array(this.length);for(var v=0;v=g;v-=6)f=l(h,v,v+6),this.words[u]|=f<>>26-y&4194303,y+=24,y>=26&&(y-=26,u++);v+6!==g&&(f=l(h,g,v+6),this.words[u]|=f<>>26-y&4194303),this.strip()};function c(R,h,g,v){for(var u=0,f=Math.min(R.length,g),y=h;y=49?u+=S-49+10:S>=17?u+=S-17+10:u+=S}return u}o.prototype._parseBase=function(h,g,v){this.words=[0],this.length=1;for(var u=0,f=1;f<=67108863;f*=g)u++;u--,f=f/g|0;for(var y=h.length-v,S=y%u,w=Math.min(y,y-S)+v,d=0,I=v;I1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(h,g){h=h||10,g=g|0||1;var v;if(h===16||h==="hex"){v="";for(var u=0,f=0,y=0;y>>24-u&16777215,f!==0||y!==this.length-1?v=p[6-w.length]+w+v:v=w+v,u+=2,u>=26&&(u-=26,y--)}for(f!==0&&(v=f.toString(16)+v);v.length%g!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(h===(h|0)&&h>=2&&h<=36){var d=m[h],I=_[h];v="";var $=this.clone();for($.negative=0;!$.isZero();){var b=$.modn(I).toString(h);$=$.idivn(I),$.isZero()?v=b+v:v=p[d-b.length]+b+v}for(this.isZero()&&(v="0"+v);v.length%g!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(h,g){return n(typeof s<"u"),this.toArrayLike(s,h,g)},o.prototype.toArray=function(h,g){return this.toArrayLike(Array,h,g)},o.prototype.toArrayLike=function(h,g,v){var u=this.byteLength(),f=v||Math.max(1,u);n(u<=f,"byte array longer than desired length"),n(f>0,"Requested array length <= 0"),this.strip();var y=g==="le",S=new h(f),w,d,I=this.clone();if(y){for(d=0;!I.isZero();d++)w=I.andln(255),I.iushrn(8),S[d]=w;for(;d=4096&&(v+=13,g>>>=13),g>=64&&(v+=7,g>>>=7),g>=8&&(v+=4,g>>>=4),g>=2&&(v+=2,g>>>=2),v+g},o.prototype._zeroBits=function(h){if(h===0)return 26;var g=h,v=0;return(g&8191)===0&&(v+=13,g>>>=13),(g&127)===0&&(v+=7,g>>>=7),(g&15)===0&&(v+=4,g>>>=4),(g&3)===0&&(v+=2,g>>>=2),(g&1)===0&&v++,v},o.prototype.bitLength=function(){var h=this.words[this.length-1],g=this._countBits(h);return(this.length-1)*26+g};function T(R){for(var h=new Array(R.bitLength()),g=0;g>>u}return h}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,g=0;gh.length?this.clone().ior(h):h.clone().ior(this)},o.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},o.prototype.iuand=function(h){var g;this.length>h.length?g=h:g=this;for(var v=0;vh.length?this.clone().iand(h):h.clone().iand(this)},o.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},o.prototype.iuxor=function(h){var g,v;this.length>h.length?(g=this,v=h):(g=h,v=this);for(var u=0;uh.length?this.clone().ixor(h):h.clone().ixor(this)},o.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},o.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var g=Math.ceil(h/26)|0,v=h%26;this._expand(g),v>0&&g--;for(var u=0;u0&&(this.words[u]=~this.words[u]&67108863>>26-v),this.strip()},o.prototype.notn=function(h){return this.clone().inotn(h)},o.prototype.setn=function(h,g){n(typeof h=="number"&&h>=0);var v=h/26|0,u=h%26;return this._expand(v+1),g?this.words[v]=this.words[v]|1<h.length?(v=this,u=h):(v=h,u=this);for(var f=0,y=0;y>>26;for(;f!==0&&y>>26;if(this.length=v.length,f!==0)this.words[this.length]=f,this.length++;else if(v!==this)for(;yh.length?this.clone().iadd(h):h.clone().iadd(this)},o.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var g=this.iadd(h);return h.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var v=this.cmp(h);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,f;v>0?(u=this,f=h):(u=h,f=this);for(var y=0,S=0;S>26,this.words[S]=g&67108863;for(;y!==0&&S>26,this.words[S]=g&67108863;if(y===0&&S>>26,$=w&67108863,b=Math.min(d,h.length-1),X=Math.max(0,d-R.length+1);X<=b;X++){var we=d-X|0;u=R.words[we]|0,f=h.words[X]|0,y=u*f+$,I+=y/67108864|0,$=y&67108863}g.words[d]=$|0,w=I|0}return w!==0?g.words[d]=w|0:g.length--,g.strip()}var A=function(h,g,v){var u=h.words,f=g.words,y=v.words,S=0,w,d,I,$=u[0]|0,b=$&8191,X=$>>>13,we=u[1]|0,Ae=we&8191,je=we>>>13,Vt=u[2]|0,De=Vt&8191,Fe=Vt>>>13,wt=u[3]|0,Ke=wt&8191,ht=wt>>>13,dr=u[4]|0,ae=dr&8191,Ve=dr>>>13,Nt=u[5]|0,Ee=Nt&8191,xe=Nt>>>13,ut=u[6]|0,st=ut&8191,_t=ut>>>13,Pt=u[7]|0,Ut=Pt&8191,ve=Pt>>>13,ye=u[8]|0,me=ye&8191,Q=ye>>>13,j=u[9]|0,F=j&8191,ie=j>>>13,de=f[0]|0,pe=de&8191,be=de>>>13,Gt=f[1]|0,Lt=Gt&8191,Tt=Gt>>>13,yr=f[2]|0,zt=yr&8191,Ht=yr>>>13,On=f[3]|0,gr=On&8191,mr=On>>>13,gt=f[4]|0,Pr=gt&8191,kr=gt>>>13,ai=f[5]|0,$r=ai&8191,Hr=ai>>>13,Ti=f[6]|0,Wr=Ti&8191,Dr=Ti>>>13,ho=f[7]|0,fe=ho&8191,Me=ho>>>13,Be=f[8]|0,J=Be&8191,Te=Be>>>13,Zt=f[9]|0,Et=Zt&8191,Kt=Zt>>>13;v.negative=h.negative^g.negative,v.length=19,w=Math.imul(b,pe),d=Math.imul(b,be),d=d+Math.imul(X,pe)|0,I=Math.imul(X,be);var Lr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,w=Math.imul(Ae,pe),d=Math.imul(Ae,be),d=d+Math.imul(je,pe)|0,I=Math.imul(je,be),w=w+Math.imul(b,Lt)|0,d=d+Math.imul(b,Tt)|0,d=d+Math.imul(X,Lt)|0,I=I+Math.imul(X,Tt)|0;var Ur=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,w=Math.imul(De,pe),d=Math.imul(De,be),d=d+Math.imul(Fe,pe)|0,I=Math.imul(Fe,be),w=w+Math.imul(Ae,Lt)|0,d=d+Math.imul(Ae,Tt)|0,d=d+Math.imul(je,Lt)|0,I=I+Math.imul(je,Tt)|0,w=w+Math.imul(b,zt)|0,d=d+Math.imul(b,Ht)|0,d=d+Math.imul(X,zt)|0,I=I+Math.imul(X,Ht)|0;var Ar=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,w=Math.imul(Ke,pe),d=Math.imul(Ke,be),d=d+Math.imul(ht,pe)|0,I=Math.imul(ht,be),w=w+Math.imul(De,Lt)|0,d=d+Math.imul(De,Tt)|0,d=d+Math.imul(Fe,Lt)|0,I=I+Math.imul(Fe,Tt)|0,w=w+Math.imul(Ae,zt)|0,d=d+Math.imul(Ae,Ht)|0,d=d+Math.imul(je,zt)|0,I=I+Math.imul(je,Ht)|0,w=w+Math.imul(b,gr)|0,d=d+Math.imul(b,mr)|0,d=d+Math.imul(X,gr)|0,I=I+Math.imul(X,mr)|0;var Qn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,w=Math.imul(ae,pe),d=Math.imul(ae,be),d=d+Math.imul(Ve,pe)|0,I=Math.imul(Ve,be),w=w+Math.imul(Ke,Lt)|0,d=d+Math.imul(Ke,Tt)|0,d=d+Math.imul(ht,Lt)|0,I=I+Math.imul(ht,Tt)|0,w=w+Math.imul(De,zt)|0,d=d+Math.imul(De,Ht)|0,d=d+Math.imul(Fe,zt)|0,I=I+Math.imul(Fe,Ht)|0,w=w+Math.imul(Ae,gr)|0,d=d+Math.imul(Ae,mr)|0,d=d+Math.imul(je,gr)|0,I=I+Math.imul(je,mr)|0,w=w+Math.imul(b,Pr)|0,d=d+Math.imul(b,kr)|0,d=d+Math.imul(X,Pr)|0,I=I+Math.imul(X,kr)|0;var an=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(an>>>26)|0,an&=67108863,w=Math.imul(Ee,pe),d=Math.imul(Ee,be),d=d+Math.imul(xe,pe)|0,I=Math.imul(xe,be),w=w+Math.imul(ae,Lt)|0,d=d+Math.imul(ae,Tt)|0,d=d+Math.imul(Ve,Lt)|0,I=I+Math.imul(Ve,Tt)|0,w=w+Math.imul(Ke,zt)|0,d=d+Math.imul(Ke,Ht)|0,d=d+Math.imul(ht,zt)|0,I=I+Math.imul(ht,Ht)|0,w=w+Math.imul(De,gr)|0,d=d+Math.imul(De,mr)|0,d=d+Math.imul(Fe,gr)|0,I=I+Math.imul(Fe,mr)|0,w=w+Math.imul(Ae,Pr)|0,d=d+Math.imul(Ae,kr)|0,d=d+Math.imul(je,Pr)|0,I=I+Math.imul(je,kr)|0,w=w+Math.imul(b,$r)|0,d=d+Math.imul(b,Hr)|0,d=d+Math.imul(X,$r)|0,I=I+Math.imul(X,Hr)|0;var wn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(wn>>>26)|0,wn&=67108863,w=Math.imul(st,pe),d=Math.imul(st,be),d=d+Math.imul(_t,pe)|0,I=Math.imul(_t,be),w=w+Math.imul(Ee,Lt)|0,d=d+Math.imul(Ee,Tt)|0,d=d+Math.imul(xe,Lt)|0,I=I+Math.imul(xe,Tt)|0,w=w+Math.imul(ae,zt)|0,d=d+Math.imul(ae,Ht)|0,d=d+Math.imul(Ve,zt)|0,I=I+Math.imul(Ve,Ht)|0,w=w+Math.imul(Ke,gr)|0,d=d+Math.imul(Ke,mr)|0,d=d+Math.imul(ht,gr)|0,I=I+Math.imul(ht,mr)|0,w=w+Math.imul(De,Pr)|0,d=d+Math.imul(De,kr)|0,d=d+Math.imul(Fe,Pr)|0,I=I+Math.imul(Fe,kr)|0,w=w+Math.imul(Ae,$r)|0,d=d+Math.imul(Ae,Hr)|0,d=d+Math.imul(je,$r)|0,I=I+Math.imul(je,Hr)|0,w=w+Math.imul(b,Wr)|0,d=d+Math.imul(b,Dr)|0,d=d+Math.imul(X,Wr)|0,I=I+Math.imul(X,Dr)|0;var Pn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,w=Math.imul(Ut,pe),d=Math.imul(Ut,be),d=d+Math.imul(ve,pe)|0,I=Math.imul(ve,be),w=w+Math.imul(st,Lt)|0,d=d+Math.imul(st,Tt)|0,d=d+Math.imul(_t,Lt)|0,I=I+Math.imul(_t,Tt)|0,w=w+Math.imul(Ee,zt)|0,d=d+Math.imul(Ee,Ht)|0,d=d+Math.imul(xe,zt)|0,I=I+Math.imul(xe,Ht)|0,w=w+Math.imul(ae,gr)|0,d=d+Math.imul(ae,mr)|0,d=d+Math.imul(Ve,gr)|0,I=I+Math.imul(Ve,mr)|0,w=w+Math.imul(Ke,Pr)|0,d=d+Math.imul(Ke,kr)|0,d=d+Math.imul(ht,Pr)|0,I=I+Math.imul(ht,kr)|0,w=w+Math.imul(De,$r)|0,d=d+Math.imul(De,Hr)|0,d=d+Math.imul(Fe,$r)|0,I=I+Math.imul(Fe,Hr)|0,w=w+Math.imul(Ae,Wr)|0,d=d+Math.imul(Ae,Dr)|0,d=d+Math.imul(je,Wr)|0,I=I+Math.imul(je,Dr)|0,w=w+Math.imul(b,fe)|0,d=d+Math.imul(b,Me)|0,d=d+Math.imul(X,fe)|0,I=I+Math.imul(X,Me)|0;var Xr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,w=Math.imul(me,pe),d=Math.imul(me,be),d=d+Math.imul(Q,pe)|0,I=Math.imul(Q,be),w=w+Math.imul(Ut,Lt)|0,d=d+Math.imul(Ut,Tt)|0,d=d+Math.imul(ve,Lt)|0,I=I+Math.imul(ve,Tt)|0,w=w+Math.imul(st,zt)|0,d=d+Math.imul(st,Ht)|0,d=d+Math.imul(_t,zt)|0,I=I+Math.imul(_t,Ht)|0,w=w+Math.imul(Ee,gr)|0,d=d+Math.imul(Ee,mr)|0,d=d+Math.imul(xe,gr)|0,I=I+Math.imul(xe,mr)|0,w=w+Math.imul(ae,Pr)|0,d=d+Math.imul(ae,kr)|0,d=d+Math.imul(Ve,Pr)|0,I=I+Math.imul(Ve,kr)|0,w=w+Math.imul(Ke,$r)|0,d=d+Math.imul(Ke,Hr)|0,d=d+Math.imul(ht,$r)|0,I=I+Math.imul(ht,Hr)|0,w=w+Math.imul(De,Wr)|0,d=d+Math.imul(De,Dr)|0,d=d+Math.imul(Fe,Wr)|0,I=I+Math.imul(Fe,Dr)|0,w=w+Math.imul(Ae,fe)|0,d=d+Math.imul(Ae,Me)|0,d=d+Math.imul(je,fe)|0,I=I+Math.imul(je,Me)|0,w=w+Math.imul(b,J)|0,d=d+Math.imul(b,Te)|0,d=d+Math.imul(X,J)|0,I=I+Math.imul(X,Te)|0;var _n=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(_n>>>26)|0,_n&=67108863,w=Math.imul(F,pe),d=Math.imul(F,be),d=d+Math.imul(ie,pe)|0,I=Math.imul(ie,be),w=w+Math.imul(me,Lt)|0,d=d+Math.imul(me,Tt)|0,d=d+Math.imul(Q,Lt)|0,I=I+Math.imul(Q,Tt)|0,w=w+Math.imul(Ut,zt)|0,d=d+Math.imul(Ut,Ht)|0,d=d+Math.imul(ve,zt)|0,I=I+Math.imul(ve,Ht)|0,w=w+Math.imul(st,gr)|0,d=d+Math.imul(st,mr)|0,d=d+Math.imul(_t,gr)|0,I=I+Math.imul(_t,mr)|0,w=w+Math.imul(Ee,Pr)|0,d=d+Math.imul(Ee,kr)|0,d=d+Math.imul(xe,Pr)|0,I=I+Math.imul(xe,kr)|0,w=w+Math.imul(ae,$r)|0,d=d+Math.imul(ae,Hr)|0,d=d+Math.imul(Ve,$r)|0,I=I+Math.imul(Ve,Hr)|0,w=w+Math.imul(Ke,Wr)|0,d=d+Math.imul(Ke,Dr)|0,d=d+Math.imul(ht,Wr)|0,I=I+Math.imul(ht,Dr)|0,w=w+Math.imul(De,fe)|0,d=d+Math.imul(De,Me)|0,d=d+Math.imul(Fe,fe)|0,I=I+Math.imul(Fe,Me)|0,w=w+Math.imul(Ae,J)|0,d=d+Math.imul(Ae,Te)|0,d=d+Math.imul(je,J)|0,I=I+Math.imul(je,Te)|0,w=w+Math.imul(b,Et)|0,d=d+Math.imul(b,Kt)|0,d=d+Math.imul(X,Et)|0,I=I+Math.imul(X,Kt)|0;var Dn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,w=Math.imul(F,Lt),d=Math.imul(F,Tt),d=d+Math.imul(ie,Lt)|0,I=Math.imul(ie,Tt),w=w+Math.imul(me,zt)|0,d=d+Math.imul(me,Ht)|0,d=d+Math.imul(Q,zt)|0,I=I+Math.imul(Q,Ht)|0,w=w+Math.imul(Ut,gr)|0,d=d+Math.imul(Ut,mr)|0,d=d+Math.imul(ve,gr)|0,I=I+Math.imul(ve,mr)|0,w=w+Math.imul(st,Pr)|0,d=d+Math.imul(st,kr)|0,d=d+Math.imul(_t,Pr)|0,I=I+Math.imul(_t,kr)|0,w=w+Math.imul(Ee,$r)|0,d=d+Math.imul(Ee,Hr)|0,d=d+Math.imul(xe,$r)|0,I=I+Math.imul(xe,Hr)|0,w=w+Math.imul(ae,Wr)|0,d=d+Math.imul(ae,Dr)|0,d=d+Math.imul(Ve,Wr)|0,I=I+Math.imul(Ve,Dr)|0,w=w+Math.imul(Ke,fe)|0,d=d+Math.imul(Ke,Me)|0,d=d+Math.imul(ht,fe)|0,I=I+Math.imul(ht,Me)|0,w=w+Math.imul(De,J)|0,d=d+Math.imul(De,Te)|0,d=d+Math.imul(Fe,J)|0,I=I+Math.imul(Fe,Te)|0,w=w+Math.imul(Ae,Et)|0,d=d+Math.imul(Ae,Kt)|0,d=d+Math.imul(je,Et)|0,I=I+Math.imul(je,Kt)|0;var Bn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,w=Math.imul(F,zt),d=Math.imul(F,Ht),d=d+Math.imul(ie,zt)|0,I=Math.imul(ie,Ht),w=w+Math.imul(me,gr)|0,d=d+Math.imul(me,mr)|0,d=d+Math.imul(Q,gr)|0,I=I+Math.imul(Q,mr)|0,w=w+Math.imul(Ut,Pr)|0,d=d+Math.imul(Ut,kr)|0,d=d+Math.imul(ve,Pr)|0,I=I+Math.imul(ve,kr)|0,w=w+Math.imul(st,$r)|0,d=d+Math.imul(st,Hr)|0,d=d+Math.imul(_t,$r)|0,I=I+Math.imul(_t,Hr)|0,w=w+Math.imul(Ee,Wr)|0,d=d+Math.imul(Ee,Dr)|0,d=d+Math.imul(xe,Wr)|0,I=I+Math.imul(xe,Dr)|0,w=w+Math.imul(ae,fe)|0,d=d+Math.imul(ae,Me)|0,d=d+Math.imul(Ve,fe)|0,I=I+Math.imul(Ve,Me)|0,w=w+Math.imul(Ke,J)|0,d=d+Math.imul(Ke,Te)|0,d=d+Math.imul(ht,J)|0,I=I+Math.imul(ht,Te)|0,w=w+Math.imul(De,Et)|0,d=d+Math.imul(De,Kt)|0,d=d+Math.imul(Fe,Et)|0,I=I+Math.imul(Fe,Kt)|0;var dn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(dn>>>26)|0,dn&=67108863,w=Math.imul(F,gr),d=Math.imul(F,mr),d=d+Math.imul(ie,gr)|0,I=Math.imul(ie,mr),w=w+Math.imul(me,Pr)|0,d=d+Math.imul(me,kr)|0,d=d+Math.imul(Q,Pr)|0,I=I+Math.imul(Q,kr)|0,w=w+Math.imul(Ut,$r)|0,d=d+Math.imul(Ut,Hr)|0,d=d+Math.imul(ve,$r)|0,I=I+Math.imul(ve,Hr)|0,w=w+Math.imul(st,Wr)|0,d=d+Math.imul(st,Dr)|0,d=d+Math.imul(_t,Wr)|0,I=I+Math.imul(_t,Dr)|0,w=w+Math.imul(Ee,fe)|0,d=d+Math.imul(Ee,Me)|0,d=d+Math.imul(xe,fe)|0,I=I+Math.imul(xe,Me)|0,w=w+Math.imul(ae,J)|0,d=d+Math.imul(ae,Te)|0,d=d+Math.imul(Ve,J)|0,I=I+Math.imul(Ve,Te)|0,w=w+Math.imul(Ke,Et)|0,d=d+Math.imul(Ke,Kt)|0,d=d+Math.imul(ht,Et)|0,I=I+Math.imul(ht,Kt)|0;var Zr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,w=Math.imul(F,Pr),d=Math.imul(F,kr),d=d+Math.imul(ie,Pr)|0,I=Math.imul(ie,kr),w=w+Math.imul(me,$r)|0,d=d+Math.imul(me,Hr)|0,d=d+Math.imul(Q,$r)|0,I=I+Math.imul(Q,Hr)|0,w=w+Math.imul(Ut,Wr)|0,d=d+Math.imul(Ut,Dr)|0,d=d+Math.imul(ve,Wr)|0,I=I+Math.imul(ve,Dr)|0,w=w+Math.imul(st,fe)|0,d=d+Math.imul(st,Me)|0,d=d+Math.imul(_t,fe)|0,I=I+Math.imul(_t,Me)|0,w=w+Math.imul(Ee,J)|0,d=d+Math.imul(Ee,Te)|0,d=d+Math.imul(xe,J)|0,I=I+Math.imul(xe,Te)|0,w=w+Math.imul(ae,Et)|0,d=d+Math.imul(ae,Kt)|0,d=d+Math.imul(Ve,Et)|0,I=I+Math.imul(Ve,Kt)|0;var gn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(gn>>>26)|0,gn&=67108863,w=Math.imul(F,$r),d=Math.imul(F,Hr),d=d+Math.imul(ie,$r)|0,I=Math.imul(ie,Hr),w=w+Math.imul(me,Wr)|0,d=d+Math.imul(me,Dr)|0,d=d+Math.imul(Q,Wr)|0,I=I+Math.imul(Q,Dr)|0,w=w+Math.imul(Ut,fe)|0,d=d+Math.imul(Ut,Me)|0,d=d+Math.imul(ve,fe)|0,I=I+Math.imul(ve,Me)|0,w=w+Math.imul(st,J)|0,d=d+Math.imul(st,Te)|0,d=d+Math.imul(_t,J)|0,I=I+Math.imul(_t,Te)|0,w=w+Math.imul(Ee,Et)|0,d=d+Math.imul(Ee,Kt)|0,d=d+Math.imul(xe,Et)|0,I=I+Math.imul(xe,Kt)|0;var rn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(rn>>>26)|0,rn&=67108863,w=Math.imul(F,Wr),d=Math.imul(F,Dr),d=d+Math.imul(ie,Wr)|0,I=Math.imul(ie,Dr),w=w+Math.imul(me,fe)|0,d=d+Math.imul(me,Me)|0,d=d+Math.imul(Q,fe)|0,I=I+Math.imul(Q,Me)|0,w=w+Math.imul(Ut,J)|0,d=d+Math.imul(Ut,Te)|0,d=d+Math.imul(ve,J)|0,I=I+Math.imul(ve,Te)|0,w=w+Math.imul(st,Et)|0,d=d+Math.imul(st,Kt)|0,d=d+Math.imul(_t,Et)|0,I=I+Math.imul(_t,Kt)|0;var un=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(un>>>26)|0,un&=67108863,w=Math.imul(F,fe),d=Math.imul(F,Me),d=d+Math.imul(ie,fe)|0,I=Math.imul(ie,Me),w=w+Math.imul(me,J)|0,d=d+Math.imul(me,Te)|0,d=d+Math.imul(Q,J)|0,I=I+Math.imul(Q,Te)|0,w=w+Math.imul(Ut,Et)|0,d=d+Math.imul(Ut,Kt)|0,d=d+Math.imul(ve,Et)|0,I=I+Math.imul(ve,Kt)|0;var hn=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(hn>>>26)|0,hn&=67108863,w=Math.imul(F,J),d=Math.imul(F,Te),d=d+Math.imul(ie,J)|0,I=Math.imul(ie,Te),w=w+Math.imul(me,Et)|0,d=d+Math.imul(me,Kt)|0,d=d+Math.imul(Q,Et)|0,I=I+Math.imul(Q,Kt)|0;var tr=(S+w|0)+((d&8191)<<13)|0;S=(I+(d>>>13)|0)+(tr>>>26)|0,tr&=67108863,w=Math.imul(F,Et),d=Math.imul(F,Kt),d=d+Math.imul(ie,Et)|0,I=Math.imul(ie,Kt);var lr=(S+w|0)+((d&8191)<<13)|0;return S=(I+(d>>>13)|0)+(lr>>>26)|0,lr&=67108863,y[0]=Lr,y[1]=Ur,y[2]=Ar,y[3]=Qn,y[4]=an,y[5]=wn,y[6]=Pn,y[7]=Xr,y[8]=_n,y[9]=Dn,y[10]=Bn,y[11]=dn,y[12]=Zr,y[13]=gn,y[14]=rn,y[15]=un,y[16]=hn,y[17]=tr,y[18]=lr,S!==0&&(y[19]=S,v.length++),v};Math.imul||(A=O);function M(R,h,g){g.negative=h.negative^R.negative,g.length=R.length+h.length;for(var v=0,u=0,f=0;f>>26)|0,u+=y>>>26,y&=67108863}g.words[f]=S,v=y,y=u}return v!==0?g.words[f]=v:g.length--,g.strip()}function B(R,h,g){var v=new L;return v.mulp(R,h,g)}o.prototype.mulTo=function(h,g){var v,u=this.length+h.length;return this.length===10&&h.length===10?v=A(this,h,g):u<63?v=O(this,h,g):u<1024?v=M(this,h,g):v=B(this,h,g),v};function L(R,h){this.x=R,this.y=h}L.prototype.makeRBT=function(h){for(var g=new Array(h),v=o.prototype._countBits(h)-1,u=0;u>=1;return u},L.prototype.permute=function(h,g,v,u,f,y){for(var S=0;S>>1)f++;return 1<>>13,v[2*y+1]=f&8191,f=f>>>13;for(y=2*g;y>=26,g+=u/67108864|0,g+=f>>>26,this.words[v]=f&67108863}return g!==0&&(this.words[v]=g,this.length++),this},o.prototype.muln=function(h){return this.clone().imuln(h)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(h){var g=T(h);if(g.length===0)return new o(1);for(var v=this,u=0;u=0);var g=h%26,v=(h-g)/26,u=67108863>>>26-g<<26-g,f;if(g!==0){var y=0;for(f=0;f>>26-g}y&&(this.words[f]=y,this.length++)}if(v!==0){for(f=this.length-1;f>=0;f--)this.words[f+v]=this.words[f];for(f=0;f=0);var u;g?u=(g-g%26)/26:u=0;var f=h%26,y=Math.min((h-f)/26,this.length),S=67108863^67108863>>>f<y)for(this.length-=y,d=0;d=0&&(I!==0||d>=u);d--){var $=this.words[d]|0;this.words[d]=I<<26-f|$>>>f,I=$&S}return w&&I!==0&&(w.words[w.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(h,g,v){return n(this.negative===0),this.iushrn(h,g,v)},o.prototype.shln=function(h){return this.clone().ishln(h)},o.prototype.ushln=function(h){return this.clone().iushln(h)},o.prototype.shrn=function(h){return this.clone().ishrn(h)},o.prototype.ushrn=function(h){return this.clone().iushrn(h)},o.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var g=h%26,v=(h-g)/26,u=1<=0);var g=h%26,v=(h-g)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(g!==0&&v++,this.length=Math.min(v,this.length),g!==0){var u=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},o.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(w/67108864|0),this.words[f+v]=y&67108863}for(;f>26,this.words[f+v]=y&67108863;if(S===0)return this.strip();for(n(S===-1),S=0,f=0;f>26,this.words[f]=y&67108863;return this.negative=1,this.strip()},o.prototype._wordDiv=function(h,g){var v=this.length-h.length,u=this.clone(),f=h,y=f.words[f.length-1]|0,S=this._countBits(y);v=26-S,v!==0&&(f=f.ushln(v),u.iushln(v),y=f.words[f.length-1]|0);var w=u.length-f.length,d;if(g!=="mod"){d=new o(null),d.length=w+1,d.words=new Array(d.length);for(var I=0;I=0;b--){var X=(u.words[f.length+b]|0)*67108864+(u.words[f.length+b-1]|0);for(X=Math.min(X/y|0,67108863),u._ishlnsubmul(f,X,b);u.negative!==0;)X--,u.negative=0,u._ishlnsubmul(f,1,b),u.isZero()||(u.negative^=1);d&&(d.words[b]=X)}return d&&d.strip(),u.strip(),g!=="div"&&v!==0&&u.iushrn(v),{div:d||null,mod:u}},o.prototype.divmod=function(h,g,v){if(n(!h.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var u,f,y;return this.negative!==0&&h.negative===0?(y=this.neg().divmod(h,g),g!=="mod"&&(u=y.div.neg()),g!=="div"&&(f=y.mod.neg(),v&&f.negative!==0&&f.iadd(h)),{div:u,mod:f}):this.negative===0&&h.negative!==0?(y=this.divmod(h.neg(),g),g!=="mod"&&(u=y.div.neg()),{div:u,mod:y.mod}):(this.negative&h.negative)!==0?(y=this.neg().divmod(h.neg(),g),g!=="div"&&(f=y.mod.neg(),v&&f.negative!==0&&f.isub(h)),{div:y.div,mod:f}):h.length>this.length||this.cmp(h)<0?{div:new o(0),mod:this}:h.length===1?g==="div"?{div:this.divn(h.words[0]),mod:null}:g==="mod"?{div:null,mod:new o(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new o(this.modn(h.words[0]))}:this._wordDiv(h,g)},o.prototype.div=function(h){return this.divmod(h,"div",!1).div},o.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},o.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},o.prototype.divRound=function(h){var g=this.divmod(h);if(g.mod.isZero())return g.div;var v=g.div.negative!==0?g.mod.isub(h):g.mod,u=h.ushrn(1),f=h.andln(1),y=v.cmp(u);return y<0||f===1&&y===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},o.prototype.modn=function(h){n(h<=67108863);for(var g=(1<<26)%h,v=0,u=this.length-1;u>=0;u--)v=(g*v+(this.words[u]|0))%h;return v},o.prototype.idivn=function(h){n(h<=67108863);for(var g=0,v=this.length-1;v>=0;v--){var u=(this.words[v]|0)+g*67108864;this.words[v]=u/h|0,g=u%h}return this.strip()},o.prototype.divn=function(h){return this.clone().idivn(h)},o.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var g=this,v=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var u=new o(1),f=new o(0),y=new o(0),S=new o(1),w=0;g.isEven()&&v.isEven();)g.iushrn(1),v.iushrn(1),++w;for(var d=v.clone(),I=g.clone();!g.isZero();){for(var $=0,b=1;(g.words[0]&b)===0&&$<26;++$,b<<=1);if($>0)for(g.iushrn($);$-- >0;)(u.isOdd()||f.isOdd())&&(u.iadd(d),f.isub(I)),u.iushrn(1),f.iushrn(1);for(var X=0,we=1;(v.words[0]&we)===0&&X<26;++X,we<<=1);if(X>0)for(v.iushrn(X);X-- >0;)(y.isOdd()||S.isOdd())&&(y.iadd(d),S.isub(I)),y.iushrn(1),S.iushrn(1);g.cmp(v)>=0?(g.isub(v),u.isub(y),f.isub(S)):(v.isub(g),y.isub(u),S.isub(f))}return{a:y,b:S,gcd:v.iushln(w)}},o.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var g=this,v=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var u=new o(1),f=new o(0),y=v.clone();g.cmpn(1)>0&&v.cmpn(1)>0;){for(var S=0,w=1;(g.words[0]&w)===0&&S<26;++S,w<<=1);if(S>0)for(g.iushrn(S);S-- >0;)u.isOdd()&&u.iadd(y),u.iushrn(1);for(var d=0,I=1;(v.words[0]&I)===0&&d<26;++d,I<<=1);if(d>0)for(v.iushrn(d);d-- >0;)f.isOdd()&&f.iadd(y),f.iushrn(1);g.cmp(v)>=0?(g.isub(v),u.isub(f)):(v.isub(g),f.isub(u))}var $;return g.cmpn(1)===0?$=u:$=f,$.cmpn(0)<0&&$.iadd(h),$},o.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var g=this.clone(),v=h.clone();g.negative=0,v.negative=0;for(var u=0;g.isEven()&&v.isEven();u++)g.iushrn(1),v.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;v.isEven();)v.iushrn(1);var f=g.cmp(v);if(f<0){var y=g;g=v,v=y}else if(f===0||v.cmpn(1)===0)break;g.isub(v)}while(!0);return v.iushln(u)},o.prototype.invm=function(h){return this.egcd(h).a.umod(h)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(h){return this.words[0]&h},o.prototype.bincn=function(h){n(typeof h=="number");var g=h%26,v=(h-g)/26,u=1<>>26,S&=67108863,this.words[y]=S}return f!==0&&(this.words[y]=f,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(h){var g=h<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var v;if(this.length>1)v=1;else{g&&(h=-h),n(h<=67108863,"Number is too big");var u=this.words[0]|0;v=u===h?0:uh.length)return 1;if(this.length=0;v--){var u=this.words[v]|0,f=h.words[v]|0;if(u!==f){uf&&(g=1);break}}return g},o.prototype.gtn=function(h){return this.cmpn(h)===1},o.prototype.gt=function(h){return this.cmp(h)===1},o.prototype.gten=function(h){return this.cmpn(h)>=0},o.prototype.gte=function(h){return this.cmp(h)>=0},o.prototype.ltn=function(h){return this.cmpn(h)===-1},o.prototype.lt=function(h){return this.cmp(h)===-1},o.prototype.lten=function(h){return this.cmpn(h)<=0},o.prototype.lte=function(h){return this.cmp(h)<=0},o.prototype.eqn=function(h){return this.cmpn(h)===0},o.prototype.eq=function(h){return this.cmp(h)===0},o.red=function(h){return new V(h)},o.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(h){return this.red=h,this},o.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},o.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},o.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},o.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},o.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},o.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},o.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},o.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var U={k256:null,p224:null,p192:null,p25519:null};function D(R,h){this.name=R,this.p=new o(h,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var h=new o(null);return h.words=new Array(Math.ceil(this.n/13)),h},D.prototype.ireduce=function(h){var g=h,v;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),v=g.bitLength();while(v>this.n);var u=v0?g.isub(this.p):g.strip(),g},D.prototype.split=function(h,g){h.iushrn(this.n,0,g)},D.prototype.imulK=function(h){return h.imul(this.k)};function Y(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(Y,D),Y.prototype.split=function(h,g){for(var v=4194303,u=Math.min(h.length,9),f=0;f>>22,y=S}y>>>=22,h.words[f-10]=y,y===0&&h.length>10?h.length-=10:h.length-=9},Y.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var g=0,v=0;v>>=26,h.words[v]=f,g=u}return g!==0&&(h.words[h.length++]=g),h},o._prime=function(h){if(U[h])return U[h];var g;if(h==="k256")g=new Y;else if(h==="p224")g=new q;else if(h==="p192")g=new Z;else if(h==="p25519")g=new ee;else throw new Error("Unknown prime "+h);return U[h]=g,g};function V(R){if(typeof R=="string"){var h=o._prime(R);this.m=h.p,this.prime=h}else n(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}V.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},V.prototype._verify2=function(h,g){n((h.negative|g.negative)===0,"red works only with positives"),n(h.red&&h.red===g.red,"red works only with red numbers")},V.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},V.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},V.prototype.add=function(h,g){this._verify2(h,g);var v=h.add(g);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},V.prototype.iadd=function(h,g){this._verify2(h,g);var v=h.iadd(g);return v.cmp(this.m)>=0&&v.isub(this.m),v},V.prototype.sub=function(h,g){this._verify2(h,g);var v=h.sub(g);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},V.prototype.isub=function(h,g){this._verify2(h,g);var v=h.isub(g);return v.cmpn(0)<0&&v.iadd(this.m),v},V.prototype.shl=function(h,g){return this._verify1(h),this.imod(h.ushln(g))},V.prototype.imul=function(h,g){return this._verify2(h,g),this.imod(h.imul(g))},V.prototype.mul=function(h,g){return this._verify2(h,g),this.imod(h.mul(g))},V.prototype.isqr=function(h){return this.imul(h,h.clone())},V.prototype.sqr=function(h){return this.mul(h,h)},V.prototype.sqrt=function(h){if(h.isZero())return h.clone();var g=this.m.andln(3);if(n(g%2===1),g===3){var v=this.m.add(new o(1)).iushrn(2);return this.pow(h,v)}for(var u=this.m.subn(1),f=0;!u.isZero()&&u.andln(1)===0;)f++,u.iushrn(1);n(!u.isZero());var y=new o(1).toRed(this),S=y.redNeg(),w=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);this.pow(d,w).cmp(S)!==0;)d.redIAdd(S);for(var I=this.pow(d,u),$=this.pow(h,u.addn(1).iushrn(1)),b=this.pow(h,u),X=f;b.cmp(y)!==0;){for(var we=b,Ae=0;we.cmp(y)!==0;Ae++)we=we.redSqr();n(Ae=0;f--){for(var I=g.words[f],$=d-1;$>=0;$--){var b=I>>$&1;if(y!==u[0]&&(y=this.sqr(y)),b===0&&S===0){w=0;continue}S<<=1,S|=b,w++,!(w!==v&&(f!==0||$!==0))&&(y=this.mul(y,u[S]),w=0,S=0)}d=26}return y},V.prototype.convertTo=function(h){var g=h.umod(this.m);return g===h?g.clone():g},V.prototype.convertFrom=function(h){var g=h.clone();return g.red=null,g},o.mont=function(h){return new te(h)};function te(R){V.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(te,V),te.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},te.prototype.convertFrom=function(h){var g=this.imod(h.mul(this.rinv));return g.red=null,g},te.prototype.imul=function(h,g){if(h.isZero()||g.isZero())return h.words[0]=0,h.length=1,h;var v=h.imul(g),u=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=v.isub(u).iushrn(this.shift),y=f;return f.cmp(this.m)>=0?y=f.isub(this.m):f.cmpn(0)<0&&(y=f.iadd(this.m)),y._forceRed(this)},te.prototype.mul=function(h,g){if(h.isZero()||g.isZero())return new o(0)._forceRed(this);var v=h.mul(g),u=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=v.isub(u).iushrn(this.shift),y=f;return f.cmp(this.m)>=0?y=f.isub(this.m):f.cmpn(0)<0&&(y=f.iadd(this.m)),y._forceRed(this)},te.prototype.invm=function(h){var g=this.imod(h._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(e,Ir)})(cH);var A_e=function(t){if(typeof t!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return t.slice(0,2)==="0x"},T_e=A_e,I_e=function(t){return typeof t!="string"?t:T_e(t)?t.slice(2):t},Tg=cH.exports,CO=I_e,P_e=function(t){if(typeof t=="string"||typeof t=="number"){var r=new Tg(1),n=String(t).toLowerCase().trim(),a=n.substr(0,2)==="0x"||n.substr(0,3)==="-0x",o=CO(n);if(o.substr(0,1)==="-"&&(o=CO(o.slice(1)),r=new Tg(-1,10)),o=o===""?"0":o,!o.match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||a===!0&&o.match(/^[0-9A-Fa-f]+$/))return new Tg(o,16).mul(r);if((o.match(/^-?[0-9]+$/)||o==="")&&a===!1)return new Tg(o,10).mul(r)}else if(typeof t=="object"&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new Tg(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")},_p=uH.exports,O_e=P_e,B_e=new _p(0),fH=new _p(-1),ov={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Zk(e){var t=e?e.toLowerCase():"ether",r=ov[t];if(typeof r!="string")throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(ov,null,2));return new _p(r,10)}function dH(e){if(typeof e=="string"){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}else{if(typeof e=="number")return String(e);if(typeof e=="object"&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10)}throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}function U_e(e,t,r){var n=O_e(e),a=n.lt(B_e),o=Zk(t),s=ov[t].length-1||1,l=r||{};a&&(n=n.mul(fH));for(var c=n.mod(o).toString(10);c.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=s[0],c=s[1];if(l||(l="0"),c||(c="0"),c.length>a)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;c.length!!(await M(D,Buffer.from(a(this,s,"f"),"hex"))).publicKey.equals(Buffer.from(a(this,l,"f"),"hex")),this.hasKey=D=>a(this,c,"f").has(D),this.getKey=D=>{let Y=a(this,c,"f").get(D);return Y?{name:Y.name,address:Y.address,kind:Y.kind,config:Y.config,comment:Y.comment,publicKey:Buffer.from(Y.publicKey,"hex")}:null},this.getSecret=async(D,Y)=>{if(!a(this,c,"f").has(D))throw Error("Key with name "+D+" does not exist");let q=a(this,c,"f").get(D),Z=Buffer.from(q.secretKey,"hex"),ee=Z.slice(0,24),V=Z.slice(24,24+32),te=Z.slice(24+32),R=await M(Y,Buffer.from(a(this,s,"f"),"hex"));if(!R.publicKey.equals(Buffer.from(a(this,l,"f"),"hex")))throw Error("Invalid password");let h=O.default.box.open(te,ee,V,R.secretKey);if(!h)throw Error("Invalid password");return Buffer.from(h)},this.addKey=async(D,Y)=>{if(a(this,c,"f").has(D.name))throw Error("Key with name "+D.name+" already exists");let q=await(0,p.getSecureRandomBytes)(32),Z=Buffer.from(O.default.box.keyPair.fromSecretKey(q).publicKey),ee=await(0,p.getSecureRandomBytes)(24),V=O.default.box(Y,ee,Buffer.from(a(this,l,"f"),"hex"),q),te=Buffer.concat([ee,Z,V]),R={name:D.name,address:D.address,kind:D.kind,config:D.config,comment:D.comment,publicKey:D.publicKey.toString("hex"),secretKey:te.toString("hex")};Object.freeze(R),a(this,c,"f").set(D.name,R)},this.removeKey=D=>{if(!a(this,c,"f").has(D))throw Error("Key with name "+D+" does not exist");a(this,c,"f").delete(D)},U.version!==1)throw Error("Unsupported keystore");n(this,s,U.salt,"f"),n(this,l,U.publicKey,"f");for(let D of U.records){if(a(this,c,"f").has(D.name))throw Error("Broken keystore");const Y={name:D.name,address:T.Address.parseRaw(D.address),kind:D.kind,config:D.config,comment:D.comment,publicKey:D.publicKey,secretKey:D.secretKey};Object.freeze(Y),a(this,c,"f").set(D.name,Y)}}static async createNew(U){let D=await(0,p.getSecureRandomBytes)(32),Y=await M(U,D);return new B({version:1,salt:D.toString("hex"),publicKey:Y.publicKey.toString("hex"),records:[]})}static async load(U){if(U.length<32)throw Error("Broken keystore");let D=U.slice(0,32),Y=U.slice(32),q=await(0,p.sha256)(Y);if(!D.equals(q))throw Error("Broken keystore");let Z=JSON.parse(Y.toString("utf-8")),ee=A.decode(Z);if((0,_.isLeft)(ee))throw Error("Broken keystore");return new B(ee.right)}get allKeys(){let U=[];for(let D of a(this,c,"f").keys()){let Y=a(this,c,"f").get(D);U.push({name:Y.name,address:Y.address,kind:Y.kind,config:Y.config,comment:Y.comment,publicKey:Buffer.from(Y.publicKey,"hex")})}return U}async save(){let U={version:1,salt:a(this,s,"f"),publicKey:a(this,l,"f"),records:Array.from(a(this,c,"f").entries()).map(q=>({name:q[1].name,address:q[1].address.toString(),kind:q[1].kind,config:q[1].config,comment:q[1].comment,publicKey:q[1].publicKey,secretKey:q[1].secretKey}))},D=Buffer.from(JSON.stringify(U),"utf-8"),Y=await(0,p.sha256)(D);return Buffer.concat([Y,D])}}return gd.KeyStore=B,s=new WeakMap,l=new WeakMap,c=new WeakMap,gd}var Ig={},kO;function j_e(){if(kO)return Ig;kO=1,Object.defineProperty(Ig,"__esModule",{value:!0}),Ig.Slice=void 0;const e=Go();class t{constructor(n,a){this.refs=[],this.skip=o=>{this.bits.skip(o)},this.readUint=o=>this.bits.readUint(o),this.readUintNumber=o=>this.bits.readUintNumber(o),this.readInt=o=>this.bits.readInt(o),this.readIntNumber=o=>this.bits.readIntNumber(o),this.readBuffer=o=>this.bits.readBuffer(o),this.readBit=()=>this.bits.readBit(),this.readCoins=()=>this.bits.readCoins(),this.readVarUInt=o=>this.bits.readVarUInt(o),this.readVarUIntNumber=o=>this.bits.readVarUIntNumber(o),this.readRemaining=()=>this.bits.readRemaining(),this.readRemainingBytes=()=>{if(this.bits.remaining%8!==0)throw Error("Number remaining of bits is not multiply of 8");return this.bits.readBuffer(this.bits.remaining/8)},this.readAddress=()=>this.bits.readAddress(),this.readAddressInternal=()=>this.bits.readAddressInternal(),this.readAddressExternal=()=>this.bits.readAddressExternal(),this.readUnaryLength=()=>this.bits.readUnaryLength(),this.readBitString=o=>this.bits.readBitString(o),this.readOptDict=(o,s)=>this.readBit()?this.readDict(o,s):null,this.readDict=(o,s)=>{let l=this.refs.shift();if(l)return(0,e.parseDict)(l.beginParse(),o,s);throw Error("No ref")},this.readRef=()=>{let o=this.refs.shift();if(o)return t.fromCell(o);throw Error("No ref")},this.readCell=()=>{let o=this.refs.shift();if(o)return o;throw Error("No ref")},this.preloadCell=()=>{let o=this.refs[0];if(o)return o;throw Error("No ref")},this.clone=()=>{const o=this.sourceBits.clone(),s=new e.BitStringReader(o);s.skip(this.bits.currentOffset);const l=s.readRemaining(),c=[...this.refs];return new t(l,c)},this.toCell=()=>{const o=this.sourceBits.clone(),s=new e.BitStringReader(o);s.skip(this.bits.currentOffset);const l=s.readRemaining();let c=new e.Cell("ordinary",l);for(let p of this.refs)c.refs.push(p);return c},this.sourceBits=n.clone(),this.refs=[...a],this.bits=new e.BitStringReader(this.sourceBits)}static fromCell(n){if(n.isExotic)throw Error("Unable to create slice from exotic");return new t(n.bits,n.refs)}get remaining(){return this.bits.remaining}get remainingRefs(){return this.refs.length}}return Ig.Slice=t,Ig}var Ny={},Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.base32Decode=Qp.base32Encode=void 0;const iS="abcdefghijklmnopqrstuvwxyz234567";function W_e(e){const t=e.byteLength;let r=0,n=0,a="";for(let o=0;o=5;)a+=iS[n>>>r-5&31],r-=5;return r>0&&(a+=iS[n<<5-r&31]),a}Qp.base32Encode=W_e;function z_e(e,t){const r=e.indexOf(t);if(r===-1)throw new Error("Invalid character found: "+t);return r}function H_e(e){let t;t=e.toLowerCase();const{length:r}=t;let n=0,a=0,o=0;const s=Buffer.alloc(r*5/8|0);for(let l=0;l=8&&(s[o++]=a>>>n-8&255,n-=8);return s}Qp.base32Decode=H_e;var q_e=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pH;Object.defineProperty(Ny,"__esModule",{value:!0});Ny.ADNLAddress=void 0;const K_e=q_e(dx),RO=Qp,AO=Gv;class uw{constructor(t){if(this.toString=()=>this.toFriendly(),this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toFriendly=()=>{let r=Buffer.concat([Buffer.from([45]),this.address]),n=(0,AO.crc16)(r);return r=Buffer.concat([r,n]),(0,RO.base32Encode)(r).slice(1)},this[pH]=()=>this.toFriendly(),t.length!==32)throw Error("Invalid address");this.address=t}static parseFriendly(t){if(t.length!==55)throw Error("Invalid address");t="f"+t;let r=(0,RO.base32Decode)(t);if(r[0]!==45)throw Error("Invalid address");let n=r.slice(33);if(!(0,AO.crc16)(r.slice(0,33)).equals(n))throw Error("Invalid address");return new uw(r.slice(1,33))}static parseRaw(t){const r=Buffer.from(t,"base64");return new uw(r)}equals(t){return this.address.equals(t.address)}}Ny.ADNLAddress=uw;pH=K_e.default;var y_={};Object.defineProperty(y_,"__esModule",{value:!0});y_.ADNLKey=void 0;const TO=Zf(),V_e=Ny,G_e=Buffer.from("17236849","hex");class Jk{constructor(t,r){this.address=t,this.keyPair=r}static async fromKey(t){if(t.length!==36||!t.slice(0,4).equals(G_e))throw Error("Invalid key");const r=t.slice(4),n=(0,TO.keyPairFromSeed)(r),a=await(0,TO.sha256)(Buffer.concat([Buffer.from([198,180,19,72]),n.publicKey]));return new Jk(new V_e.ADNLAddress(a),n)}}y_.ADNLKey=Jk;var md={},Ss={},b_={};Object.defineProperty(b_,"__esModule",{value:!0});b_.findCommonPrefix=void 0;function Y_e(e){if(e.length===0)return"";if(e.length===1)return e[0];const t=[...e].sort();let r=0;for(let n=0;n{if(this.ended)throw Error("Already ended");let m;if(typeof c=="number")m=c.toString(10);else if(t.default.isBN(c))m=c.toString(10);else if(Buffer.isBuffer(c))m=new t.default(c.toString("hex"),"hex").toString(10);else throw Error("Invalid index type");if(this.items.has(m))throw Error("Item "+c+" already exist");this.items.set(m,p)},this.storeRef=(c,p)=>{if(this.ended)throw Error("Already ended");this.storeCell(c,(0,r.beginCell)().storeRef(p).endCell())},this.endDict=()=>{if(this.ended)throw Error("Already ended");return this.ended=!0,this.items.size===0?null:(0,n.serializeDict)(this.items,this.keySize,(c,p)=>p.writeCell(c))},this.endCell=()=>{if(this.ended)throw Error("Already ended");if(this.items.size===0)throw Error("Dict is empty");return this.endDict()},this.keySize=l}}md.DictBuilder=a;function o(s){return new a(s)}return md.beginDict=o,md}var Ly={};Object.defineProperty(Ly,"__esModule",{value:!0});Ly.bnToAddress=void 0;const Q_e=v0;function Z_e(e,t){let r=t.toString("hex");for(;r.length<64;)r="0"+r;return new Q_e.Address(e,Buffer.from(r,"hex"))}Ly.bnToAddress=Z_e;var Pg={},OO;function mH(){if(OO)return Pg;OO=1,Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.TupleSlice=void 0;const e=ml.exports,t=Ly,r=vl();class n{constructor(o){this.items=[...o]}get remaining(){return this.items.length}readNumber(){if(this.items[0][0]!=="num")throw Error("Not a number");let o=parseInt(this.items[0][1]);return this.items.splice(0,1),o}readBoolean(){if(this.items[0][0]!=="num")throw Error("Not a number");let o=parseInt(this.items[0][1]);return this.items.splice(0,1),o!==0}readBigNumber(){if(this.items[0][0]!=="num")throw Error("Not a number");let o=new e.BN(this.items[0][1].slice(2),"hex");return this.items.splice(0,1),o}readCell(){if(this.items[0][0]!=="cell")throw Error("Not a cell");let o=r.Cell.fromBoc(Buffer.from(this.items[0][1].bytes,"base64"))[0];return this.items.splice(0,1),o}readNumericAddress(o){if(this.items[0][0]!=="num")throw Error("Not a number");let s=this.readBigNumber();return(0,t.bnToAddress)(o,s)}}return Pg.TupleSlice=n,Pg}var _h={};Object.defineProperty(_h,"__esModule",{value:!0});_h.TupleSlice4=void 0;class cw{constructor(t){this.items=[...t]}get remaining(){return this.items.length}pop(){if(this.items.length===0)throw Error("EOF");let t=this.items[0];return this.items.splice(0,1),t}readBigNumber(){let t=this.pop();if(t.type!=="int")throw Error("Not a number");return t.value}readBigNumberOpt(){let t=this.pop();if(t.type==="null")return null;if(t.type!=="int")throw Error("Not a number");return t.value}readNumber(){return this.readBigNumber().toNumber()}readNumberOpt(){let t=this.readBigNumberOpt();return t!==null?t.toNumber():null}readBoolean(){return this.readNumber()!==0}readBooleanOpt(){let t=this.readNumberOpt();return t!==null?t!==0:null}readAddress(){let t=this.readCell().beginParse().readAddress();if(t!==null)return t;throw Error("Not an address")}readAddressOpt(){let t=this.readCellOpt();return t!==null?t.beginParse().readAddress():null}readCell(){let t=this.pop();if(t.type!=="cell"&&t.type!=="slice"&&t.type!=="builder")throw Error("Not a cell");return t.cell}readCellOpt(){let t=this.pop();if(t.type==="null")return null;if(t.type!=="cell"&&t.type!=="slice"&&t.type!=="builder")throw Error("Not a cell");return t.cell}readTuple(){let t=this.pop();if(t.type!=="tuple")throw Error("Not a number");return new cw(t.items)}readTupleOpt(){let t=this.pop();if(t.type==="null")return null;if(t.type!=="tuple")throw Error("Not a number");return new cw(t.items)}}_h.TupleSlice4=cw;var fc={},BO;function J_e(){if(BO)return fc;BO=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.getSupportedInterfaces=fc.getSupportedInterfacesRaw=fc.resolveKnownInterface=void 0;const e=mH(),t={["123515602279859691144772641439386770278"]:"org.ton.introspection.v0",["256184278959413194623484780286929323492"]:"com.tonwhales.nominators:v0",["242422353946785872806511191513850808027"]:"org.ton.jetton.master.v1",["311736387032003861293477945447179662681"]:"org.ton.jetton.wallet.v1"};function r(o){let s=t[o];return s||null}fc.resolveKnownInterface=r;async function n(o,s){let l=await s.callGetMethodWithError(o,"supported_interfaces");if(l.exit_code!==0&&l.exit_code!==1)return[];try{let c=new e.TupleSlice(l.stack);if(c.readBigNumber().toString()!=="123515602279859691144772641439386770278")return[];let m=[];for(;c.remaining>0;)m.push(c.readBigNumber().toString());return m}catch(c){return console.warn(c),[]}}fc.getSupportedInterfacesRaw=n;async function a(o,s){return(await n(o,s)).map(c=>{let p=r(c);return p?{type:"known",name:p}:{type:"unknown",value:c}})}return fc.getSupportedInterfaces=a,fc}var w_={},Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.crc32str=Zp.crc32=void 0;const e3e=-306674912;let fw;function t3e(){fw=new Int32Array(256);for(let e=0;e<256;e++){let t=e;for(let r=8;r>0;--r)t=t&1?t>>>1^e3e:t>>>1;fw[e]=t}}function vH(e){let t=4294967295;fw===void 0&&t3e();for(let r=0;r>>8;return(t^-1)>>>0}Zp.crc32=vH;function r3e(e){return vH(Buffer.from(e))}Zp.crc32str=r3e;Object.defineProperty(w_,"__esModule",{value:!0});w_.parseSupportedMessage=void 0;const Xl=Zp;function n3e(e,t){if(e===(0,Xl.crc32str)("op::stake_deposit")){let r=t.readUint(64),n=t.readCoins().toNumber();return{type:"deposit",data:{query_id:r,gas_limit:n}}}if(e===(0,Xl.crc32str)("op::stake_deposit::response"))return{type:"deposit::ok",data:{}};if(e===(0,Xl.crc32str)("op::stake_withdraw")){let r=t.readUint(64),n=t.readCoins().toNumber();return{type:"withdraw",data:{stake:t.readCoins(),query_id:r,gas_limit:n}}}if(e===(0,Xl.crc32str)("op::stake_withdraw::delayed"))return{type:"withdraw::delayed",data:{}};if(e===(0,Xl.crc32str)("op::stake_withdraw::response"))return{type:"withdraw::ok",data:{}};if(e===(0,Xl.crc32str)("op::upgrade")){let r=t.readUint(64),n=t.readCoins().toNumber();return{type:"upgrade",data:{code:t.readCell(),query_id:r,gas_limit:n}}}if(e===(0,Xl.crc32str)("op::upgrade::response"))return{type:"upgrade::ok",data:{}};if(e===(0,Xl.crc32str)("op::upgrade")){let r=t.readUint(64),n=t.readCoins().toNumber();return{type:"upgrade",data:{code:t.readCell(),query_id:r,gas_limit:n}}}if(e===(0,Xl.crc32str)("op::upgrade::ok"))return{type:"upgrade::ok",data:{}};if(e===(0,Xl.crc32str)("op::update")){let r=t.readUint(64),n=t.readCoins().toNumber();return{type:"update",data:{code:t.readCell(),query_id:r,gas_limit:n}}}return e===(0,Xl.crc32str)("op::update::ok")?{type:"update::ok",data:{}}:null}function i3e(e,t){if(e===3576854235)return{type:"jetton::excesses",data:{query_id:t.readUint(64)}};if(e===260734629){let r=t.readUint(64),n=t.readCoins(),a=t.readAddress(),o=t.readAddress(),s=t.readBit()?t.readCell():null,l=t.readCoins(),c=t.readBit()?t.readCell():t.toCell();return{type:"jetton::transfer",data:{query_id:r,amount:n,destination:a,response_destination:o,custom_payload:s,forward_ton:l,payload:c}}}if(e===1935855772){let r=t.readUint(64),n=t.readCoins(),a=t.readAddress(),o=t.readBit()?t.readCell():t.toCell();return{type:"jetton::transfer_notification",data:{query_id:r,amount:n,sender:a,payload:o}}}return null}function o3e(e,t){return null}function a3e(e,t){try{let r=t.beginParse();if(r.remaining<32)return null;let n=r.readUintNumber(32);if(n===0)return null;if(e==="com.tonwhales.nominators:v0")return n3e(n,r);if(e==="org.ton.jetton.wallet.v1")return i3e(n,r);if(e==="org.ton.jetton.master.v1")return o3e(n,r)}catch(r){console.warn(r)}return null}w_.parseSupportedMessage=a3e;var x_={};Object.defineProperty(x_,"__esModule",{value:!0});x_.CellMessage=void 0;class s3e{constructor(t){this.cell=t}writeTo(t){t.writeCell(this.cell)}}x_.CellMessage=s3e;var __={};Object.defineProperty(__,"__esModule",{value:!0});__.EmptyMessage=void 0;class l3e{writeTo(t){}}__.EmptyMessage=l3e;var Og={},UO;function u3e(){if(UO)return Og;UO=1,Object.defineProperty(Og,"__esModule",{value:!0}),Og.CommentMessage=void 0;const e=vl();class t{constructor(n){this.comment=n}writeTo(n){if(this.comment.length>0){n.bits.writeUint(0,32);let a=Buffer.from(this.comment),o=n;for(;a.length>0;){let s=Math.floor(o.bits.available/8);if(a.length<=s){o.bits.writeBuffer(a);break}o.bits.writeBuffer(a.slice(0,s)),a=a.slice(s,a.length);let l=new e.Cell;o.refs.push(l),o=l}}}}return Og.CommentMessage=t,Og}var S_={};Object.defineProperty(S_,"__esModule",{value:!0});S_.BinaryMessage=void 0;class c3e{constructor(t){this.payload=t}writeTo(t){t.bits.writeBuffer(this.payload)}}S_.BinaryMessage=c3e;var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.UnknownContractSource=void 0;class f3e{constructor(t,r,n){this.backup=()=>{throw Error("Unknown")},this.describe=()=>this.description,this.type=t,this.workchain=r,this.description=n}get initialCode(){throw Error("Unknown")}get initialData(){throw Error("Unknown")}}E_.UnknownContractSource=f3e;var Bg={},NO;function d3e(){if(NO)return Bg;NO=1,Object.defineProperty(Bg,"__esModule",{value:!0}),Bg.WalletV1R1Source=void 0;const e=Go();class t{constructor(n){this.type="org.ton.wallets.simple",this.walletVersion="v1",this.backup=()=>{const a=new e.ConfigStore;return a.setInt("wc",this.workchain),a.setBuffer("pk",this.publicKey),a.save()},this.describe=()=>"Simple Wallet Contract",this.publicKey=n.publicKey,this.initialCode=n.initialCode,this.initialData=n.initialData,this.workchain=n.workchain,Object.freeze(this)}static create(n){let a=n.publicKey,o=n.workchain,s=e.Cell.fromBoc("B5EE9C72410101010044000084FF0020DDA4F260810200D71820D70B1FED44D0D31FD3FFD15112BAF2A122F901541044F910F2A2F80001D31F3120D74A96D307D402FB00DED1A4C8CB1FCBFFC9ED5441FDF089")[0],l=new e.Cell;return l.bits.writeUint(0,32),l.bits.writeBuffer(a),new t({publicKey:a,initialCode:s,initialData:l,workchain:o})}static restore(n){const a=new e.ConfigStore(n);return t.create({publicKey:a.getBuffer("pk"),workchain:a.getInt("wc")})}}return Bg.WalletV1R1Source=t,Bg}var Ug={},LO;function h3e(){if(LO)return Ug;LO=1;var e=Ir&&Ir.__classPrivateFieldGet||function(a,o,s,l){if(s==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?a!==o||!l:!o.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?l:s==="a"?l.call(a):l?l.value:o.get(a)},t;Object.defineProperty(Ug,"__esModule",{value:!0}),Ug.ConfigStore=void 0;const r=Go();class n{constructor(o){if(t.set(this,new Map),this.getString=s=>{let l=e(this,t,"f").get(s);if(!l)throw Error("Unable to find key "+s);return l},this.getBuffer=s=>Buffer.from(this.getString(s),"hex"),this.getAddress=s=>r.Address.parseFriendly(this.getString(s)).address,this.getInt=s=>parseInt(this.getString(s)),this.setBuffer=(s,l)=>{this.setString(s,l.toString("hex"))},this.setAddress=(s,l)=>{this.setString(s,l.toFriendly())},o){let s=o.split(",");for(let l of s){let c=l.split("=");if(c.length!==2||e(this,t,"f").has(c[0]))throw Error("Mailformed input");e(this,t,"f").set(c[0],c[1])}}}setString(o,s){if(o.indexOf("=")>=0||o.indexOf(",")>=0||s.indexOf("=")>=0||s.indexOf(",")>=0)throw Error("Mailformed input");e(this,t,"f").set(o,s)}setInt(o,s){this.setString(o,s.toString(10))}save(){let o="";for(let s of e(this,t,"f"))o!==""&&(o+=","),o+=s[0]+"="+s[1];return o}}return Ug.ConfigStore=n,t=new WeakMap,Ug}var Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.safeSignVerify=Jp.safeSign=void 0;const e8=Zf(),p3e=8,g3e=64;function yH(e,t){let r=Buffer.from(t);if(r.length>g3e)throw Error("Seed can be longer than 64 bytes");if(r.lengthI.readVarUIntNumber(5));S=new Map;for(let I of d)S.set(parseInt(I[0],10),I[1])}}return{extraCurrencies:S,coins:y}}zn.parseCurrencyCollection=n;function a(f){if(f.readBit())if(f.readBit()){let y=f.readAddressInternal(),S=f.readAddressExternal(),w=f.readUint(64),d=f.readUintNumber(32);return{type:"external-out",src:y,dest:S,createdLt:w,createdAt:d}}else{let y=f.readAddressExternal(),S=f.readAddressInternal(),w=f.readCoins();return{type:"external-in",src:y,dest:S,importFee:w}}else{let y=f.readBit(),S=f.readBit(),w=f.readBit(),d=f.readAddressInternal(),I=f.readAddressInternal(),$=n(f),b=f.readCoins(),X=f.readCoins(),we=f.readUint(64),Ae=f.readUintNumber(32);return{type:"internal",ihrDisabled:y,bounce:S,bounced:w,src:d,dest:I,value:$,ihrFee:b,fwdFee:X,createdLt:we,createdAt:Ae}}}zn.parseCommonMsgInfo=a;function o(f){if(f.readBit()){if(f.readBit()){let y=f.readAddress(),S=f.readAddressExternal(),w=f.readUint(64),d=f.readUintNumber(32);return{type:"external-out",src:y,dest:S,createdLt:w,createdAt:d}}}else{let y=f.readBit(),S=f.readBit(),w=f.readBit(),d=f.readAddress(),I=f.readAddressInternal(),$=n(f),b=f.readCoins(),X=f.readCoins(),we=f.readUint(64),Ae=f.readUintNumber(32);return{type:"internal",ihrDisabled:y,bounce:S,bounced:w,src:d,dest:I,value:$,ihrFee:b,fwdFee:X,createdLt:we,createdAt:Ae}}throw new Error("Invalid message info")}zn.parseCommonMsgInfoRelaxed=o;function s(f){return{tick:f.readBit(),tock:f.readBit()}}zn.parseRawTickTock=s;function l(f){let y=f.toCell(),S=null;f.readBit()&&(S=f.readUintNumber(5));const w=f.readBit()?s(f):null,I=f.readBit()?f.readCell():null,b=f.readBit()?f.readCell():null;return f.readBit()&&f.readCell(),{splitDepth:S,data:b,code:I,special:w,raw:y}}zn.parseStateInit=l;function c(f){const y=f.toCell(),S=a(f),w=f.readBit();let d=null;w&&(f.readBit()?d=l(f.readRef()):d=l(f));const I=f.readBit()?f.readRef().toCell():f.toCell();return{info:S,init:d,body:I,raw:y}}zn.parseMessage=c;function p(f){const y=f.toCell(),S=o(f),w=f.readBit();let d=null;w&&(f.readBit()?d=l(f.readRef()):d=l(f));const I=f.readBit()?f.readRef().toCell():f.toCell();return{info:S,init:d,body:I,raw:y}}zn.parseMessageRelaxed=p;function m(f){if(f.readUintNumber(8)!==114)throw Error("Invalid data");const y=f.readBuffer(32),S=f.readBuffer(32);return{oldHash:y,newHash:S}}zn.parseHashUpdate=m;function _(f){return f.readBit()?f.readBit()?"frozen":"deleted":"unchanged"}zn.parseAccountChange=_;function T(f){return{cells:f.readVarUIntNumber(3),bits:f.readVarUIntNumber(3)}}zn.parseStorageUsedShort=T;function O(f){const y=f.readCoins();let S=null;f.readBit()&&(S=f.readCoins());const w=_(f);return{storageFeesCollected:y,storageFeesDue:S,statusChange:w}}zn.parseStoragePhase=O;function A(f){let y=f.readBit()?f.readCoins():null;const S=n(f);return{dueFeesColelcted:y,credit:S}}zn.parseCreditPhase=A;function M(f){if(!f.readBit()){const wt=f.readUintNumber(2);if(wt===0)return{type:"skipped",reason:"no-state"};if(wt===1)return{type:"skipped",reason:"bad-state"};if(wt===2)return{type:"skipped",reason:"no-gas"}}const y=f.readBit(),S=f.readBit(),w=f.readBit();let d=f.readCoins();const I=f.readRef();let $=I.readVarUInt(3),b=I.readVarUInt(3),X=I.readBit()?I.readVarUInt(2):null,we=I.readUintNumber(8),Ae=I.readUintNumber(32),je=I.readBit()?I.readUintNumber(32):null,Vt=I.readUintNumber(32),De=I.readBuffer(32),Fe=I.readBuffer(32);return{type:"computed",success:y,messageStateUsed:S,accountActivated:w,gasFees:d,gasUsed:$,gasLimit:b,gasCredit:X,mode:we,exitCode:Ae,exitArg:je,vmSteps:Vt,vmInitStateHash:De,vmFinalStateHash:Fe}}zn.parseComputePhase=M;function B(f){const y=f.readBit(),S=f.readBit(),w=f.readBit(),d=_(f),I=f.readBit()?f.readCoins():null,$=f.readBit()?f.readCoins():null,b=f.readUintNumber(32),X=f.readBit()?f.readUintNumber(32):null,we=f.readUintNumber(16),Ae=f.readUintNumber(16),je=f.readUintNumber(16),Vt=f.readUintNumber(16),De=f.readBuffer(32),Fe=T(f);return{success:y,valid:S,noFunds:w,statusChange:d,totalFwdFees:I,totalActionFees:$,resultCode:b,resultArg:X,totalActions:we,specialActions:Ae,skippedActions:je,messagesCreated:Vt,actionListHash:De,totalMessageSizes:Fe}}zn.parseActionPhase=B;function L(f){if(f.readBit()){const y=T(f),S=f.readCoins(),w=f.readCoins();return{type:"ok",msgSize:y,msgFees:S,fwdFees:w}}if(f.readBit()){const y=T(f),S=f.readCoins();return{type:"no-funds",msgSize:y,fwdFees:S}}return{type:"negative-funds"}}zn.parseBouncePhase=L;function U(f){const y=f.readUintNumber(4);if(y===0){const S=f.readBit();let w=null,d=null;f.readBit()&&(w=O(f)),f.readBit()&&(d=A(f));let I=M(f),$=null;f.readBit()&&($=B(f.readRef()));let b=f.readBit(),X=null;f.readBit()&&(X=L(f));const we=f.readBit();return{type:"generic",creditFirst:S,storagePhase:w,creditPhase:d,computePhase:I,actionPhase:$,bouncePhase:X,aborted:b,destroyed:we}}if(y===1)return{type:"storage",storagePhase:O(f)};if(y===2||y===3){const S=y===3;let w=O(f),d=M(f),I=null;f.readBit()&&(I=B(f.readRef()));const $=f.readBit(),b=f.readBit();return{type:"tick-tock",isTock:S,storagePhase:w,computePhase:d,actionPhase:I,aborted:$,destroyed:b}}throw Error("Unsupported transaction type")}zn.parseTransactionDescription=U;function D(f,y){if(y.readUintNumber(4)!==7)throw Error("Invalid data");const S=y.readBuffer(32),w=new e.Address(f,S),d=y.readUint(64),I=y.readBuffer(32),$=y.readUint(64),b=y.readUintNumber(32),X=y.readUintNumber(15),we=r(y),Ae=r(y),je=y.readRef();let Vt=je.readBit(),De=je.readBit(),Fe=null;Vt&&(Fe=c(je.readRef()));let wt=[];if(De){let ae=je.readDict(15,Ve=>c(Ve.readRef()));for(let Ve of Array.from(ae.values()))wt.push(Ve)}let Ke=n(y),ht=m(y.readRef()),dr=U(y.readRef());return{address:w,lt:d,time:b,outMessagesCount:X,oldStatus:we,newStatus:Ae,fees:Ke,update:ht,description:dr,inMessage:Fe,outMessages:wt,prevTransaction:{hash:I,lt:$}}}zn.parseTransaction=D;function Y(f){return{cells:f.readVarUIntNumber(3),bits:f.readVarUIntNumber(3),publicCells:f.readVarUIntNumber(3)}}zn.parseStorageUsed=Y;function q(f){return{used:Y(f),lastPaid:f.readUintNumber(32),duePayment:f.readBit()?f.readCoins():null}}zn.parseStorageInfo=q;function Z(f){return f.readBit()?{type:"active",state:l(f)}:f.readBit()?{type:"frozen",stateHash:f.readBuffer(32)}:{type:"uninit"}}zn.parseAccountState=Z;function ee(f){return{lastTransLt:f.readUint(64),balance:n(f),state:Z(f)}}zn.parseAccountStorage=ee;function V(f){return f.readBit()?{address:f.readAddressInternal(),storageStat:q(f),storage:ee(f)}:null}zn.parseAccount=V;function te(f){if(f.readUintNumber(2)!==0)throw Error("Invalid data");let y=f.readUintNumber(6),S=f.readIntNumber(32),w=f.readUint(64);return{shardPrefixBits:y,workchainId:S,shardPrefix:w}}zn.parseShardIdent=te;function R(f){let y=f.readCell(),S=null;return y.isExotic||(S=y.beginParse().readAddress()),{address:S,lastTransHash:f.readBuffer(32),lastTransLt:f.readUint(64)}}zn.parseShardAccount=R;function h(f){return{splitDepth:f.readUintNumber(5),balance:n(f)}}zn.parseDepthBalanceInfo=h;function g(f){return f.readBit()?(0,t.parseDict)(f.readRef(),256,y=>{let S=h(y),w=R(y);return{depthBalanceInfo:S,shardAccount:w}}):new Map}zn.parseShardAccounts=g;function v(f){if(f.readUintNumber(16)!==52262)throw Error("Invalid data");f.readBit()&&f.readCell();let y=new e.Address(-1,f.readBuffer(32)),S=f.readCell();const w=n(f);return{config:S,configAddress:y,globalBalance:w}}zn.parseMasterchainStateExtra=v;function u(f){if(f.readUintNumber(32)!==2418257890)throw Error("Invalid data");let y=f.readIntNumber(32),S=te(f),w=f.readUintNumber(32),d=f.readUintNumber(32),I=f.readUintNumber(32),$=f.readUint(64),b=f.readUintNumber(32);f.readCell();let X=f.readBit(),we,Ae=f.readCell();Ae.isExotic?we=new Map:we=g(Ae.beginParse()),f.readCell();let je=f.readBit(),Vt=null;if(je){let De=f.readCell();De.isExotic||(Vt=v(De.beginParse()))}return{globalId:y,shardId:S,seqno:w,vertSeqNo:d,genUtime:I,genLt:$,minRefSeqno:b,beforeSplit:X,accounts:we,extras:Vt}}return zn.parseShardStateUnsplit=u,zn}var vd={},$O;function wH(){if($O)return vd;$O=1;var e=Ir&&Ir.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(vd,"__esModule",{value:!0}),vd.parseStack=vd.serializeStack=void 0;const t=e(ml.exports),r=By(),n=vl(),a=new t.default("-9223372036854775808"),o=new t.default("9223372036854775807");function s(_,T){if(_.type==="null")T.storeUint8(0);else if(_.type==="int")_.value.lte(o)&&_.value.gte(a)?(T.storeUint8(1),T.storeInt(_.value,64)):(T.storeUint(256,15),T.storeInt(_.value,257));else if(_.type==="nan")T.storeInt(767,16);else if(_.type==="cell")T.storeUint8(3),T.storeRef(_.cell);else if(_.type==="slice")T.storeUint8(4),T.storeUint(0,10),T.storeUint(_.cell.bits.cursor,10),T.storeUint(0,3),T.storeUint(_.cell.refs.length,3),T.storeRef(_.cell);else if(_.type==="builder")T.storeUint8(5),T.storeRef(_.cell);else if(_.type==="tuple"){let O=null,A=null;for(let M=0;M<_.items.length;M++){let B=O;O=A,A=B,M>1&&(O=(0,r.beginCell)().storeRef(A).storeRef(O).endCell());let L=(0,r.beginCell)();s(_.items[M],L),A=L.endCell()}T.storeUint8(7),T.storeUint(_.items.length,16),O&&T.storeRef(O),A&&T.storeRef(A)}else throw Error("Invalid value")}function l(_){let T=_.readUintNumber(8);if(T===0)return{type:"null"};if(T===1)return{type:"int",value:_.readInt(64)};if(T===2)return _.readUintNumber(7)===0?{type:"int",value:_.readInt(257)}:(_.readBit(),{type:"nan"});if(T===3)return{type:"cell",cell:_.readCell()};if(T===4){let O=_.readUintNumber(10),A=_.readUintNumber(10),M=_.readUintNumber(3),B=_.readUintNumber(3),L=_.readCell().beginParse();L.skip(O);let U=L.readBitString(A-O),D=new n.Cell("ordinary",U);if(M1){let M=_.readRef(),B=_.readRef();A.unshift(l(B));for(let L=0;L0){let O=(0,r.beginCell)();c(_.slice(0,_.length-1),O),T.storeRef(O.endCell()),s(_[_.length-1],T)}}function p(_){let T=(0,r.beginCell)();T.storeUint(_.length,24);let O=[..._];return c(O,T),T.endCell()}vd.serializeStack=p;function m(_){let T=[],O=_.beginParse(),A=O.readUintNumber(24);for(let M=0;M=0;)e=e.replace("/","_");for(;e.indexOf("+")>=0;)e=e.replace("+","-");for(;e.indexOf("=")>=0;)e=e.replace("=","");return e}C_.toUrlSafe=y3e;var FO;function b3e(){if(FO)return Ng;FO=1;var e=Ir&&Ir.__createBinding||(Object.create?function(te,R,h,g){g===void 0&&(g=h),Object.defineProperty(te,g,{enumerable:!0,get:function(){return R[h]}})}:function(te,R,h,g){g===void 0&&(g=h),te[g]=R[h]}),t=Ir&&Ir.__setModuleDefault||(Object.create?function(te,R){Object.defineProperty(te,"default",{enumerable:!0,value:R})}:function(te,R){te.default=R}),r=Ir&&Ir.__importStar||function(te){if(te&&te.__esModule)return te;var R={};if(te!=null)for(var h in te)h!=="default"&&Object.prototype.hasOwnProperty.call(te,h)&&e(R,te,h);return t(R,te),R},n=Ir&&Ir.__classPrivateFieldSet||function(te,R,h,g,v){if(g==="m")throw new TypeError("Private method is not writable");if(g==="a"&&!v)throw new TypeError("Private accessor was defined without a setter");if(typeof R=="function"?te!==R||!v:!R.has(te))throw new TypeError("Cannot write private member to an object whose class did not declare it");return g==="a"?v.call(te,h):v?v.value=h:R.set(te,h),h},a=Ir&&Ir.__classPrivateFieldGet||function(te,R,h,g){if(h==="a"&&!g)throw new TypeError("Private accessor was defined without a getter");if(typeof R=="function"?te!==R||!g:!R.has(te))throw new TypeError("Cannot read private member from an object whose class did not declare it");return h==="m"?g:h==="a"?g.call(te):g?g.value:R.get(te)},o=Ir&&Ir.__importDefault||function(te){return te&&te.__esModule?te:{default:te}},s,l,c;Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.TonClient4=void 0;const p=o(Hk.exports),m=r(Nx),_=wH(),T=vl(),O=C_;class A{constructor(R){s.set(this,void 0),l.set(this,void 0),c.set(this,void 0),n(this,s,R.endpoint,"f"),n(this,l,R.timeout||5e3,"f"),n(this,c,R.httpAdapter,"f")}async getLastBlock(){let R=await p.default.get(a(this,s,"f")+"/block/latest",{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!M.is(R.data))throw Error("Mailformed response");return R.data}async getBlock(R){let h=await p.default.get(a(this,s,"f")+"/block/"+R,{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!B.is(h.data))throw Error("Mailformed response");if(!h.data.exist)throw Error("Block is out of scope");return h.data.block}async getBlockByUtime(R){let h=await p.default.get(a(this,s,"f")+"/block/utime/"+R,{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!B.is(h.data))throw Error("Mailformed response");if(!h.data.exist)throw Error("Block is out of scope");return h.data.block}async getAccount(R,h){let g=await p.default.get(a(this,s,"f")+"/block/"+R+"/"+h.toFriendly({urlSafe:!0}),{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!U.is(g.data))throw Error("Mailformed response");return g.data}async getAccountLite(R,h){let g=await p.default.get(a(this,s,"f")+"/block/"+R+"/"+h.toFriendly({urlSafe:!0})+"/lite",{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!D.is(g.data))throw Error("Mailformed response");return g.data}async isAccountChanged(R,h,g){let v=await p.default.get(a(this,s,"f")+"/block/"+R+"/"+h.toFriendly({urlSafe:!0})+"/changed/"+g.toString(10),{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!Y.is(v.data))throw Error("Mailformed response");return v.data}async getAccountTransactions(R,h,g){let v=await p.default.get(a(this,s,"f")+"/account/"+R.toFriendly({urlSafe:!0})+"/tx/"+h.toString(10)+"/"+(0,O.toUrlSafe)(g.toString("base64")),{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!V.is(v.data))throw Error("Mailformed response");let u=v.data,f=[],y=T.Cell.fromBoc(Buffer.from(u.boc,"base64"));for(let S=0;S0&&(g="/"+[...h].sort().join(","));let v=await p.default.get(a(this,s,"f")+"/block/"+R+"/config"+g,{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!Z.is(v.data))throw Error("Mailformed response");return v.data}async runMethod(R,h,g,v){let u=v&&v.length>0?"/"+(0,O.toUrlSafe)((0,_.serializeStack)(v).toBoc({idx:!1,crc32:!1}).toString("base64")):"",f=a(this,s,"f")+"/block/"+R+"/"+h.toFriendly({urlSafe:!0})+"/run/"+g+u,y=await p.default.get(f,{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!q.is(y.data))throw Error("Mailformed response");return{exitCode:y.data.exitCode,result:y.data.resultRaw?(0,_.parseStack)(T.Cell.fromBoc(Buffer.from(y.data.resultRaw,"base64"))[0]):[],resultRaw:y.data.resultRaw,block:y.data.block,shardBlock:y.data.shardBlock}}async sendMessage(R){let h=await p.default.post(a(this,s,"f")+"/send",{boc:R.toString("base64")},{adapter:a(this,c,"f"),timeout:a(this,l,"f")});if(!ee.is(h.data))throw Error("Mailformed response");return{status:h.data.status}}}Ng.TonClient4=A,s=new WeakMap,l=new WeakMap,c=new WeakMap;const M=m.type({last:m.type({seqno:m.number,shard:m.string,workchain:m.number,fileHash:m.string,rootHash:m.string}),init:m.type({fileHash:m.string,rootHash:m.string}),stateRootHash:m.string,now:m.number}),B=m.union([m.type({exist:m.literal(!1)}),m.type({exist:m.literal(!0),block:m.type({shards:m.array(m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string,transactions:m.array(m.type({account:m.string,hash:m.string,lt:m.string}))}))})})]),L=m.type({lastPaid:m.number,duePayment:m.union([m.null,m.string]),used:m.type({bits:m.number,cells:m.number,publicCells:m.number})}),U=m.type({account:m.type({state:m.union([m.type({type:m.literal("uninit")}),m.type({type:m.literal("active"),code:m.union([m.string,m.null]),data:m.union([m.string,m.null])}),m.type({type:m.literal("frozen"),stateHash:m.string})]),balance:m.type({coins:m.string}),last:m.union([m.null,m.type({lt:m.string,hash:m.string})]),storageStat:m.union([m.null,L])}),block:m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string})}),D=m.type({account:m.type({state:m.union([m.type({type:m.literal("uninit")}),m.type({type:m.literal("active"),codeHash:m.string,dataHash:m.string}),m.type({type:m.literal("frozen"),stateHash:m.string})]),balance:m.type({coins:m.string}),last:m.union([m.null,m.type({lt:m.string,hash:m.string})]),storageStat:m.union([m.null,L])})}),Y=m.type({changed:m.boolean,block:m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string})}),q=m.type({exitCode:m.number,resultRaw:m.union([m.string,m.null]),block:m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string}),shardBlock:m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string})}),Z=m.type({config:m.type({cell:m.string,address:m.string,globalBalance:m.type({coins:m.string})})}),ee=m.type({status:m.number}),V=m.type({blocks:m.array(m.type({workchain:m.number,seqno:m.number,shard:m.string,rootHash:m.string,fileHash:m.string})),boc:m.string});return Ng}var Js={},jO;function w3e(){if(jO)return Js;jO=1;var e=Ir&&Ir.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Js,"__esModule",{value:!0}),Js.computeMessageForwardFees=Js.computeExternalMessageFees=Js.computeGasPrices=Js.computeFwdFees=Js.computeStorageFees=void 0;const t=e(ml.exports),r=bH();function n(m){const{lastPaid:_,now:T,storagePrices:O,storageStat:A,special:M,masterchain:B}=m;if(T<=_||O.length===0||T{let a=await e.runMethod(t,r,n);if(a.exitCode!==0&&a.exitCode!==1)throw Error("Exit code: "+a.exitCode);return new x3e.TupleSlice4(a.result).readAddress()}}k_.address=_3e;var R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.amount=void 0;const S3e=_h;function E3e(e){return async(t,r,n)=>{let a=await e.runMethod(t,r,n);if(a.exitCode!==0&&a.exitCode!==1)throw Error("Exit code: "+a.exitCode);return new S3e.TupleSlice4(a.result).readBigNumber()}}R_.amount=E3e;var A_={};Object.defineProperty(A_,"__esModule",{value:!0});A_.seqno=void 0;const C3e=_h;function M3e(e){return async(t,r,n="seqno")=>{let a=await e.runMethod(t,r,n);if(a.exitCode!==0&&a.exitCode!==1)throw Error("Exit code: "+a.exitCode);return new C3e.TupleSlice4(a.result).readNumber()}}A_.seqno=M3e;Object.defineProperty(M_,"__esModule",{value:!0});M_.Traits=void 0;const k3e=k_,R3e=R_,A3e=A_;M_.Traits={withClient:e=>({seqno:(0,A3e.seqno)(e),amount:(0,R3e.amount)(e),address:(0,k3e.address)(e)})};var yd={},WO;function T3e(){if(WO)return yd;WO=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.stringToCell=yd.readString=void 0;const e=By();function t(o){if(o.remaining%8!==0)throw new Error(`Invalid string length: ${o.remaining}`);if(o.remainingRefs!==0&&o.remainingRefs!==1)throw new Error(`invalid number of refs: ${o.remainingRefs}`);if(o.remainingRefs===1&&1023-o.remaining>7)throw new Error(`invalid string length: ${o.remaining/8}`);let s=o.readBuffer(o.remaining/8);return o.remainingRefs===1&&(s=Buffer.concat([s,t(o.readRef())])),s}function r(o){return t(o).toString()}yd.readString=r;function n(o){let s=(0,e.beginCell)();if(o.length>0)if(o.length>127){let l=o.slice(0,127),c=o.slice(127);s=s.storeBuffer(l),s=s.storeRef(n(c))}else s=s.storeBuffer(o);return s.endCell()}function a(o){return n(Buffer.from(o))}return yd.stringToCell=a,yd}var zO;function Go(){return zO||(zO=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletV3R2Source=e.WalletV3R1Source=e.WalletV2R2Source=e.WalletV2R1Source=e.WalletV1R3Source=e.WalletV1R2Source=e.WalletV1R1Source=e.UnknownContractSource=e.contractAddress=e.createWalletTransferV3=e.createWalletTransferV2=e.createWalletTransferV1=e.WalletContract=e.BinaryMessage=e.CommentMessage=e.CommonMessageInfo=e.StateInit=e.EmptyMessage=e.ExternalMessage=e.InternalMessage=e.CellMessage=e.parseSupportedMessage=e.getSupportedInterfacesRaw=e.resolveKnownInterface=e.getSupportedInterfaces=e.TupleSlice4=e.TupleSlice=e.bnToAddress=e.beginDict=e.DictBuilder=e.beginCell=e.Builder=e.ADNLKey=e.ADNLAddress=e.Slice=e.HttpApi=e.InMemoryCache=e.SendMode=e.KeyStore=e.fromNano=e.toNano=e.AddressExternal=e.Address=e.AllWalletContractTypes=e.validateWalletType=e.Wallet=e.TonClient=e.Cell=e.BitStringReader=e.BitString=void 0,e.configParseMasterAddressRequired=e.parseBridge=e.parseValidatorSet=e.parseValidatorDescr=e.configParseWorkchainDescriptor=e.configParseMasterAddress=e.computeMessageForwardFees=e.computeExternalMessageFees=e.computeGasPrices=e.computeFwdFees=e.computeStorageFees=e.TonClient4=e.parseStack=e.serializeStack=e.parseMasterchainStateExtra=e.parseShardStateUnsplit=e.parseShardAccounts=e.parseDepthBalanceInfo=e.parseShardAccount=e.parseShardIdent=e.parseAccount=e.parseAccountStorage=e.parseAccountState=e.parseStorageInfo=e.parseStorageUsed=e.parseRawTickTock=e.parseTransactionDescription=e.parseBouncePhase=e.parseActionPhase=e.parseComputePhase=e.parseCreditPhase=e.parseStoragePhase=e.parseStorageUsedShort=e.parseAccountChange=e.parseHashUpdate=e.parseMessageRelaxed=e.parseMessage=e.parseStateInit=e.parseCommonMsgInfo=e.parseCurrencyCollection=e.parseAccountStatus=e.parseTransaction=e.safeSignVerify=e.safeSign=e.serializeDict=e.parseDictRefs=e.parseDictBitString=e.parseDict=e.ConfigStore=e.WalletV4Source=void 0,e.stringToCell=e.readString=e.Traits=e.configParse29=e.configParse28=e.parseFullConfig=e.configParseMsgPrices=e.configParseGasLimitsPrices=e.configParseBridge=e.configParseValidatorSet=e.configParse12=e.configParse40=e.configParse8=e.configParse18=e.configParse17=e.configParse16=e.configParse15=void 0;var t=KC();Object.defineProperty(e,"BitString",{enumerable:!0,get:function(){return t.BitString}});var r=DD();Object.defineProperty(e,"BitStringReader",{enumerable:!0,get:function(){return r.BitStringReader}});var n=vl();Object.defineProperty(e,"Cell",{enumerable:!0,get:function(){return n.Cell}});var a=R_e();Object.defineProperty(e,"TonClient",{enumerable:!0,get:function(){return a.TonClient}});var o=sH();Object.defineProperty(e,"Wallet",{enumerable:!0,get:function(){return o.Wallet}}),Object.defineProperty(e,"validateWalletType",{enumerable:!0,get:function(){return o.validateWalletType}}),Object.defineProperty(e,"AllWalletContractTypes",{enumerable:!0,get:function(){return o.allTypes}});var s=v0;Object.defineProperty(e,"Address",{enumerable:!0,get:function(){return s.Address}});var l=zv;Object.defineProperty(e,"AddressExternal",{enumerable:!0,get:function(){return l.AddressExternal}});var c=Xp;Object.defineProperty(e,"toNano",{enumerable:!0,get:function(){return c.toNano}}),Object.defineProperty(e,"fromNano",{enumerable:!0,get:function(){return c.fromNano}});var p=F_e();Object.defineProperty(e,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});var m=Qk;Object.defineProperty(e,"SendMode",{enumerable:!0,get:function(){return m.SendMode}});var _=Uy;Object.defineProperty(e,"InMemoryCache",{enumerable:!0,get:function(){return _.InMemoryCache}});var T=Yv;Object.defineProperty(e,"HttpApi",{enumerable:!0,get:function(){return T.HttpApi}});var O=j_e();Object.defineProperty(e,"Slice",{enumerable:!0,get:function(){return O.Slice}});var A=Ny;Object.defineProperty(e,"ADNLAddress",{enumerable:!0,get:function(){return A.ADNLAddress}});var M=y_;Object.defineProperty(e,"ADNLKey",{enumerable:!0,get:function(){return M.ADNLKey}});var B=By();Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return B.Builder}}),Object.defineProperty(e,"beginCell",{enumerable:!0,get:function(){return B.beginCell}});var L=X_e();Object.defineProperty(e,"DictBuilder",{enumerable:!0,get:function(){return L.DictBuilder}}),Object.defineProperty(e,"beginDict",{enumerable:!0,get:function(){return L.beginDict}});var U=Ly;Object.defineProperty(e,"bnToAddress",{enumerable:!0,get:function(){return U.bnToAddress}});var D=mH();Object.defineProperty(e,"TupleSlice",{enumerable:!0,get:function(){return D.TupleSlice}});var Y=_h;Object.defineProperty(e,"TupleSlice4",{enumerable:!0,get:function(){return Y.TupleSlice4}});var q=J_e();Object.defineProperty(e,"getSupportedInterfaces",{enumerable:!0,get:function(){return q.getSupportedInterfaces}}),Object.defineProperty(e,"resolveKnownInterface",{enumerable:!0,get:function(){return q.resolveKnownInterface}}),Object.defineProperty(e,"getSupportedInterfacesRaw",{enumerable:!0,get:function(){return q.getSupportedInterfacesRaw}});var Z=w_;Object.defineProperty(e,"parseSupportedMessage",{enumerable:!0,get:function(){return Z.parseSupportedMessage}});var ee=x_;Object.defineProperty(e,"CellMessage",{enumerable:!0,get:function(){return ee.CellMessage}});var V=Oy;Object.defineProperty(e,"InternalMessage",{enumerable:!0,get:function(){return V.InternalMessage}});var te=Iy;Object.defineProperty(e,"ExternalMessage",{enumerable:!0,get:function(){return te.ExternalMessage}});var R=__;Object.defineProperty(e,"EmptyMessage",{enumerable:!0,get:function(){return R.EmptyMessage}});var h=Py;Object.defineProperty(e,"StateInit",{enumerable:!0,get:function(){return h.StateInit}});var g=Xk();Object.defineProperty(e,"CommonMessageInfo",{enumerable:!0,get:function(){return g.CommonMessageInfo}});var v=u3e();Object.defineProperty(e,"CommentMessage",{enumerable:!0,get:function(){return v.CommentMessage}});var u=S_;Object.defineProperty(e,"BinaryMessage",{enumerable:!0,get:function(){return u.BinaryMessage}});var f=aH();Object.defineProperty(e,"WalletContract",{enumerable:!0,get:function(){return f.WalletContract}});var y=iH();Object.defineProperty(e,"createWalletTransferV1",{enumerable:!0,get:function(){return y.createWalletTransferV1}}),Object.defineProperty(e,"createWalletTransferV2",{enumerable:!0,get:function(){return y.createWalletTransferV2}}),Object.defineProperty(e,"createWalletTransferV3",{enumerable:!0,get:function(){return y.createWalletTransferV3}});var S=oH();Object.defineProperty(e,"contractAddress",{enumerable:!0,get:function(){return S.contractAddress}});var w=E_;Object.defineProperty(e,"UnknownContractSource",{enumerable:!0,get:function(){return w.UnknownContractSource}});var d=d3e();Object.defineProperty(e,"WalletV1R1Source",{enumerable:!0,get:function(){return d.WalletV1R1Source}});var I=Qz();Object.defineProperty(e,"WalletV1R2Source",{enumerable:!0,get:function(){return I.WalletV1R2Source}});var $=Zz();Object.defineProperty(e,"WalletV1R3Source",{enumerable:!0,get:function(){return $.WalletV1R3Source}});var b=Jz();Object.defineProperty(e,"WalletV2R1Source",{enumerable:!0,get:function(){return b.WalletV2R1Source}});var X=eH();Object.defineProperty(e,"WalletV2R2Source",{enumerable:!0,get:function(){return X.WalletV2R2Source}});var we=tH();Object.defineProperty(e,"WalletV3R1Source",{enumerable:!0,get:function(){return we.WalletV3R1Source}});var Ae=rH();Object.defineProperty(e,"WalletV3R2Source",{enumerable:!0,get:function(){return Ae.WalletV3R2Source}});var je=nH();Object.defineProperty(e,"WalletV4Source",{enumerable:!0,get:function(){return je.WalletV4Source}});var Vt=h3e();Object.defineProperty(e,"ConfigStore",{enumerable:!0,get:function(){return Vt.ConfigStore}});var De=cu;Object.defineProperty(e,"parseDict",{enumerable:!0,get:function(){return De.parseDict}}),Object.defineProperty(e,"parseDictBitString",{enumerable:!0,get:function(){return De.parseDictBitString}}),Object.defineProperty(e,"parseDictRefs",{enumerable:!0,get:function(){return De.parseDictRefs}});var Fe=gH();Object.defineProperty(e,"serializeDict",{enumerable:!0,get:function(){return Fe.serializeDict}});var wt=Jp;Object.defineProperty(e,"safeSign",{enumerable:!0,get:function(){return wt.safeSign}}),Object.defineProperty(e,"safeSignVerify",{enumerable:!0,get:function(){return wt.safeSignVerify}});var Ke=bH();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Ke.parseTransaction}}),Object.defineProperty(e,"parseAccountStatus",{enumerable:!0,get:function(){return Ke.parseAccountStatus}}),Object.defineProperty(e,"parseCurrencyCollection",{enumerable:!0,get:function(){return Ke.parseCurrencyCollection}}),Object.defineProperty(e,"parseCommonMsgInfo",{enumerable:!0,get:function(){return Ke.parseCommonMsgInfo}}),Object.defineProperty(e,"parseStateInit",{enumerable:!0,get:function(){return Ke.parseStateInit}}),Object.defineProperty(e,"parseMessage",{enumerable:!0,get:function(){return Ke.parseMessage}}),Object.defineProperty(e,"parseMessageRelaxed",{enumerable:!0,get:function(){return Ke.parseMessageRelaxed}}),Object.defineProperty(e,"parseHashUpdate",{enumerable:!0,get:function(){return Ke.parseHashUpdate}}),Object.defineProperty(e,"parseAccountChange",{enumerable:!0,get:function(){return Ke.parseAccountChange}}),Object.defineProperty(e,"parseStorageUsedShort",{enumerable:!0,get:function(){return Ke.parseStorageUsedShort}}),Object.defineProperty(e,"parseStoragePhase",{enumerable:!0,get:function(){return Ke.parseStoragePhase}}),Object.defineProperty(e,"parseCreditPhase",{enumerable:!0,get:function(){return Ke.parseCreditPhase}}),Object.defineProperty(e,"parseComputePhase",{enumerable:!0,get:function(){return Ke.parseComputePhase}}),Object.defineProperty(e,"parseActionPhase",{enumerable:!0,get:function(){return Ke.parseActionPhase}}),Object.defineProperty(e,"parseBouncePhase",{enumerable:!0,get:function(){return Ke.parseBouncePhase}}),Object.defineProperty(e,"parseTransactionDescription",{enumerable:!0,get:function(){return Ke.parseTransactionDescription}}),Object.defineProperty(e,"parseRawTickTock",{enumerable:!0,get:function(){return Ke.parseRawTickTock}}),Object.defineProperty(e,"parseStorageUsed",{enumerable:!0,get:function(){return Ke.parseStorageUsed}}),Object.defineProperty(e,"parseStorageInfo",{enumerable:!0,get:function(){return Ke.parseStorageInfo}}),Object.defineProperty(e,"parseAccountState",{enumerable:!0,get:function(){return Ke.parseAccountState}}),Object.defineProperty(e,"parseAccountStorage",{enumerable:!0,get:function(){return Ke.parseAccountStorage}}),Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return Ke.parseAccount}}),Object.defineProperty(e,"parseShardIdent",{enumerable:!0,get:function(){return Ke.parseShardIdent}}),Object.defineProperty(e,"parseShardAccount",{enumerable:!0,get:function(){return Ke.parseShardAccount}}),Object.defineProperty(e,"parseDepthBalanceInfo",{enumerable:!0,get:function(){return Ke.parseDepthBalanceInfo}}),Object.defineProperty(e,"parseShardAccounts",{enumerable:!0,get:function(){return Ke.parseShardAccounts}}),Object.defineProperty(e,"parseShardStateUnsplit",{enumerable:!0,get:function(){return Ke.parseShardStateUnsplit}}),Object.defineProperty(e,"parseMasterchainStateExtra",{enumerable:!0,get:function(){return Ke.parseMasterchainStateExtra}});var ht=wH();Object.defineProperty(e,"serializeStack",{enumerable:!0,get:function(){return ht.serializeStack}}),Object.defineProperty(e,"parseStack",{enumerable:!0,get:function(){return ht.parseStack}});var dr=b3e();Object.defineProperty(e,"TonClient4",{enumerable:!0,get:function(){return dr.TonClient4}});var ae=w3e();Object.defineProperty(e,"computeStorageFees",{enumerable:!0,get:function(){return ae.computeStorageFees}}),Object.defineProperty(e,"computeFwdFees",{enumerable:!0,get:function(){return ae.computeFwdFees}}),Object.defineProperty(e,"computeGasPrices",{enumerable:!0,get:function(){return ae.computeGasPrices}}),Object.defineProperty(e,"computeExternalMessageFees",{enumerable:!0,get:function(){return ae.computeExternalMessageFees}}),Object.defineProperty(e,"computeMessageForwardFees",{enumerable:!0,get:function(){return ae.computeMessageForwardFees}});var Ve=lH();Object.defineProperty(e,"configParseMasterAddress",{enumerable:!0,get:function(){return Ve.configParseMasterAddress}}),Object.defineProperty(e,"configParseWorkchainDescriptor",{enumerable:!0,get:function(){return Ve.configParseWorkchainDescriptor}}),Object.defineProperty(e,"parseValidatorDescr",{enumerable:!0,get:function(){return Ve.parseValidatorDescr}}),Object.defineProperty(e,"parseValidatorSet",{enumerable:!0,get:function(){return Ve.parseValidatorSet}}),Object.defineProperty(e,"parseBridge",{enumerable:!0,get:function(){return Ve.parseBridge}}),Object.defineProperty(e,"configParseMasterAddressRequired",{enumerable:!0,get:function(){return Ve.configParseMasterAddressRequired}}),Object.defineProperty(e,"configParse15",{enumerable:!0,get:function(){return Ve.configParse15}}),Object.defineProperty(e,"configParse16",{enumerable:!0,get:function(){return Ve.configParse16}}),Object.defineProperty(e,"configParse17",{enumerable:!0,get:function(){return Ve.configParse17}}),Object.defineProperty(e,"configParse18",{enumerable:!0,get:function(){return Ve.configParse18}}),Object.defineProperty(e,"configParse8",{enumerable:!0,get:function(){return Ve.configParse8}}),Object.defineProperty(e,"configParse40",{enumerable:!0,get:function(){return Ve.configParse40}}),Object.defineProperty(e,"configParse12",{enumerable:!0,get:function(){return Ve.configParse12}}),Object.defineProperty(e,"configParseValidatorSet",{enumerable:!0,get:function(){return Ve.configParseValidatorSet}}),Object.defineProperty(e,"configParseBridge",{enumerable:!0,get:function(){return Ve.configParseBridge}}),Object.defineProperty(e,"configParseGasLimitsPrices",{enumerable:!0,get:function(){return Ve.configParseGasLimitsPrices}}),Object.defineProperty(e,"configParseMsgPrices",{enumerable:!0,get:function(){return Ve.configParseMsgPrices}}),Object.defineProperty(e,"parseFullConfig",{enumerable:!0,get:function(){return Ve.parseFullConfig}}),Object.defineProperty(e,"configParse28",{enumerable:!0,get:function(){return Ve.configParse28}}),Object.defineProperty(e,"configParse29",{enumerable:!0,get:function(){return Ve.configParse29}});var Nt=M_;Object.defineProperty(e,"Traits",{enumerable:!0,get:function(){return Nt.Traits}});var Ee=T3e();Object.defineProperty(e,"readString",{enumerable:!0,get:function(){return Ee.readString}}),Object.defineProperty(e,"stringToCell",{enumerable:!0,get:function(){return Ee.stringToCell}})}(y5)),y5}var ii=Go();function nc(){const e=jc(),{contractAddress:t}=cL(),n=xH(t)?ii.Address.parse(t):null,a=n?.toFriendly()??null,o=n?.toString()??null;return ue.exports.useEffect(()=>{t&&n&&a!==t&&e(`/${a}`,{replace:!0})},[t]),{contractAddress:a,contractAddressHex:o,isAddressEmpty:!t}}function xH(e){let t=!0;try{ii.Address.parse(e??"")}catch{t=!1}return t}function HO(e,t){for(var r=0;r=0)&&(r[a]=e[a]);return r}function qO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _H=al.createContext(),O3e={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},dc={view:{default:20,dense:4},snackbar:{default:6,dense:2}},Nd={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:hD,transitionDuration:{enter:225,exit:195}},vm=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},B3e=function(t){return""+vm(t.vertical)+vm(t.horizontal)},U3e=function(t){return Object.keys(t).filter(function(r){return!O3e.container[r]}).reduce(function(r,n){var a;return Ho({},r,(a={},a[n]=t[n],a))},{})},pf={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},mb={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var r=t.vertical,n=t.horizontal;return"anchorOrigin"+vm(r)+vm(n)},toVariant:function(t){return"variant"+vm(t)}},U1=function(t){return!!t||t===0},KO=function(t){return typeof t=="number"||t===null},N3e=function(t,r,n){return function(a){return a==="autoHideDuration"?KO(t.autoHideDuration)?t.autoHideDuration:KO(r.autoHideDuration)?r.autoHideDuration:Nd.autoHideDuration:t[a]||r[a]||n[a]}};function W5(e,t,r){return e===void 0&&(e={}),t===void 0&&(t={}),r===void 0&&(r={}),Ho({},r,{},t,{},e)}var L3e="SnackbarContent",SH={root:L3e+"-root"},D3e=ur("div")(function(e){var t,r,n=e.theme;return r={},r["&."+SH.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[n.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),r}),$3e=ue.exports.forwardRef(function(e,t){var r=e.className,n=Of(e,["className"]);return ne(D3e,{...Object.assign({ref:t,className:vn(SH.root,r)},n)})}),VO={right:"left",left:"right",bottom:"up",top:"down"},F3e=function(t){return t.horizontal!=="center"?VO[t.horizontal]:VO[t.vertical]},j3e=function(t){return ne(Fp,{...Object.assign({},t),children:ne("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"})})},W3e=function(t){return ne(Fp,{...Object.assign({},t),children:ne("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})},z3e=function(t){return ne(Fp,{...Object.assign({},t),children:ne("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"})})},H3e=function(t){return ne(Fp,{...Object.assign({},t),children:ne("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"})})},N1={fontSize:20,marginInlineEnd:8},q3e={default:void 0,success:ne(j3e,{style:N1}),warning:ne(W3e,{style:N1}),error:ne(z3e,{style:N1}),info:ne(H3e,{style:N1})};function ym(e,t){return e.reduce(function(r,n){return n==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"},H5=16,bd="SnackbarContainer",eu={root:bd+"-root",rootDense:bd+"-rootDense",top:bd+"-top",bottom:bd+"-bottom",left:bd+"-left",right:bd+"-right",center:bd+"-center"},X3e=ur("div")(function(e){var t,r,n,a,o,s,l=e.theme;return s={},s["&."+eu.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[z5.container]={pointerEvents:"all"},t[z5.wrapper]={padding:dc.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+dc.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+H5*2+"px)"},t),s["&."+eu.rootDense]=(r={},r[z5.wrapper]={padding:dc.snackbar.dense+"px 0px"},r),s["&."+eu.top]={top:dc.view.default-dc.snackbar.default,flexDirection:"column"},s["&."+eu.bottom]={bottom:dc.view.default-dc.snackbar.default,flexDirection:"column-reverse"},s["&."+eu.left]=(n={left:dc.view.default},n[l.breakpoints.up("sm")]={alignItems:"flex-start"},n[l.breakpoints.down("sm")]={left:H5+"px"},n),s["&."+eu.right]=(a={right:dc.view.default},a[l.breakpoints.up("sm")]={alignItems:"flex-end"},a[l.breakpoints.down("sm")]={right:H5+"px"},a),s["&."+eu.center]=(o={left:"50%",transform:"translateX(-50%)"},o[l.breakpoints.up("sm")]={alignItems:"center"},o),s}),Q3e=function(t){var r=t.className,n=t.anchorOrigin,a=t.dense,o=Of(t,["className","anchorOrigin","dense"]),s=vn(eu[n.vertical],eu[n.horizontal],eu.root,r,a&&eu.rootDense);return ne(X3e,{...Object.assign({className:s},o)})},Z3e=al.memo(Q3e),J3e=function(e){P3e(t,e);function t(n){var a;return a=e.call(this,n)||this,a.enqueueSnackbar=function(o,s){s===void 0&&(s={});var l=s,c=l.key,p=l.preventDuplicate,m=Of(l,["key","preventDuplicate"]),_=U1(c),T=_?c:new Date().getTime()+Math.random(),O=N3e(m,a.props,Nd),A=Ho({key:T},m,{message:o,open:!0,entered:!1,requestClose:!1,variant:O("variant"),anchorOrigin:O("anchorOrigin"),autoHideDuration:O("autoHideDuration")});return m.persist&&(A.autoHideDuration=void 0),a.setState(function(M){if(p===void 0&&a.props.preventDuplicate||p){var B=function(Y){return _?Y.key===c:Y.message===o},L=M.queue.findIndex(B)>-1,U=M.snacks.findIndex(B)>-1;if(L||U)return M}return a.handleDisplaySnack(Ho({},M,{queue:[].concat(M.queue,[A])}))}),T},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?Ho({},o,{snacks:[].concat(l,[s[0]]),queue:s.slice(1,s.length)}):o},a.handleDismissOldest=function(o){if(o.snacks.some(function(m){return!m.open||m.requestClose}))return o;var s=!1,l=!1,c=o.snacks.reduce(function(m,_){return m+(_.open&&_.persist?1:0)},0);c===a.maxSnack&&(l=!0);var p=o.snacks.map(function(m){return!s&&(!m.persist||l)?(s=!0,m.entered?(m.onClose&&m.onClose(null,pf.MAXSNACK,m.key),a.props.onClose&&a.props.onClose(null,pf.MAXSNACK,m.key),Ho({},m,{open:!1})):Ho({},m,{requestClose:!0})):Ho({},m)});return Ho({},o,{snacks:p})},a.handleEnteredSnack=function(o,s,l){if(!U1(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");a.setState(function(c){var p=c.snacks;return{snacks:p.map(function(m){return m.key===l?Ho({},m,{entered:!0}):Ho({},m)})}})},a.handleCloseSnack=function(o,s,l){if(a.props.onClose&&a.props.onClose(o,s,l),s!==pf.CLICKAWAY){var c=l===void 0;a.setState(function(p){var m=p.snacks,_=p.queue;return{snacks:m.map(function(T){return!c&&T.key!==l?Ho({},T):T.entered?Ho({},T,{open:!1}):Ho({},T,{requestClose:!0})}),queue:_.filter(function(T){return T.key!==l})}})}},a.closeSnackbar=function(o){var s=a.state.snacks.find(function(l){return l.key===o});U1(o)&&s&&s.onClose&&s.onClose(null,pf.INSTRUCTED,o),a.handleCloseSnack(null,pf.INSTRUCTED,o)},a.handleExitedSnack=function(o,s,l){var c=s||l;if(!U1(c))throw new Error("handleExitedSnack Cannot be called with undefined key");a.setState(function(p){var m=a.processQueue(Ho({},p,{snacks:p.snacks.filter(function(_){return _.key!==c})}));return m.queue.length===0?m:a.handleDismissOldest(m)})},a.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:a.enqueueSnackbar.bind(qO(a)),closeSnackbar:a.closeSnackbar.bind(qO(a))}},a}var r=t.prototype;return r.render=function(){var a=this,o=this.state.contextValue,s=this.props,l=s.iconVariant,c=s.dense,p=c===void 0?Nd.dense:c,m=s.hideIconVariant,_=m===void 0?Nd.hideIconVariant:m,T=s.domRoot,O=s.children,A=s.classes,M=A===void 0?{}:A,B=Of(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),L=this.state.snacks.reduce(function(D,Y){var q,Z=B3e(Y.anchorOrigin),ee=D[Z]||[];return Ho({},D,(q={},q[Z]=[].concat(ee,[Y]),q))},{}),U=Object.keys(L).map(function(D){var Y=L[D];return ne(Z3e,{dense:p,anchorOrigin:Y[0].anchorOrigin,className:vn(M.containerRoot,M[mb.toContainerAnchorOrigin(D)]),children:Y.map(function(q){return ne(Y3e,{...Object.assign({},B,{key:q.key,snack:q,dense:p,iconVariant:l,hideIconVariant:_,classes:U3e(M),onClose:a.handleCloseSnack,onExited:ym([a.handleExitedSnack,a.props.onExited]),onEntered:ym([a.handleEnteredSnack,a.props.onEntered])})})})},D)});return $t(_H.Provider,{value:o,children:[O,T?Al.exports.createPortal(U,T):U]})},I3e(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Nd.maxSnack}}]),t}(ue.exports.Component),e5e=function(){return ue.exports.useContext(_H)},t8={},T_={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})(T_);var q5={};const t5e=wu(tae);var YO;function r8(){return YO||(YO=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=t5e}(q5)),q5}const n8=wu(dJ);var r5e=T_.exports;Object.defineProperty(t8,"__esModule",{value:!0});var EH=t8.default=void 0,n5e=r5e(r8()),i5e=n8,o5e=(0,n5e.default)((0,i5e.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");EH=t8.default=o5e;const a5e=ur(wa)({"& &":{color:"white"},"& a":{color:"white"}});function Dy(){const{enqueueSnackbar:e,closeSnackbar:t}=e5e();return{showNotification:ue.exports.useCallback((n,a,o,s)=>{const l=e(ne(a5e,{children:n}),{variant:a,autoHideDuration:s||5e3,onClose:o,onClick:()=>t(l),action:()=>ne(gl,{children:ne(EH,{sx:{color:"#fff",stroke:"#fff",width:20,height:20}})})})},[t,e])}}const XO=e=>{let t;const r=new Set,n=(c,p)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const _=t;t=p??typeof m!="object"?m:Object.assign({},t,m),r.forEach(T=>T(t,_))}},a=()=>t,l={setState:n,getState:a,subscribe:c=>(r.add(c),()=>r.delete(c)),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(n,a,l),l},s5e=e=>e?XO(e):XO;var CH={exports:{}},MH={};/** - * @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 I_=ue.exports,l5e=XE.exports;function u5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var c5e=typeof Object.is=="function"?Object.is:u5e,f5e=l5e.useSyncExternalStore,d5e=I_.useRef,h5e=I_.useEffect,p5e=I_.useMemo,g5e=I_.useDebugValue;MH.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var o=d5e(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=p5e(function(){function c(O){if(!p){if(p=!0,m=O,O=n(O),a!==void 0&&s.hasValue){var A=s.value;if(a(A,O))return _=A}return _=O}if(A=_,c5e(m,O))return A;var M=n(O);return a!==void 0&&a(A,M)?A:(m=O,_=M)}var p=!1,m,_,T=r===void 0?null:r;return[function(){return c(t())},T===null?void 0:function(){return c(T())}]},[t,r,n,a]);var l=f5e(e,o[0],o[1]);return h5e(function(){s.hasValue=!0,s.value=l},[l]),g5e(l),l};(function(e){e.exports=MH})(CH);const m5e=Hw(CH.exports),{useSyncExternalStoreWithSelector:v5e}=m5e;function y5e(e,t=e.getState,r){const n=v5e(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return ue.exports.useDebugValue(n),n}const QO=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"?s5e(e):e,r=(n,a)=>y5e(t,n,a);return Object.assign(r,t),r},P0=e=>e?QO(e):QO;var $y=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'"),P0(e));const b5e=$y(e=>({value:"",active:!1,setValue:t=>e({value:t}),setActive:t=>e({active:t})}));function i8(){const{showNotification:e}=Dy(),t=jc(),{value:r,setValue:n,active:a,setActive:o}=b5e(c=>c),s=ue.exports.useCallback(()=>{n("")},[]);return{onSubmit:()=>{if(!xH(r)){e("Invalid address","error");return}n(""),o(!1),t(`/${r}`)},onClear:s,setActive:o,setValue:n,active:a,value:r}}function w5e(e){let t;try{t=e()}catch{return}return{getItem:n=>{var a;const o=l=>l===null?null:JSON.parse(l),s=(a=t.getItem(n))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(n,a)=>t.setItem(n,JSON.stringify(a)),removeItem:n=>t.removeItem(n)}}const av=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return av(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return av(n)(r)}}}},x5e=(e,t)=>(r,n,a)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:B=>B,version:0,merge:(B,L)=>({...L,...B}),...t},s=!1;const l=new Set,c=new Set;let p;try{p=o.getStorage()}catch{}if(!p)return e((...B)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...B)},n,a);const m=av(o.serialize),_=()=>{const B=o.partialize({...n()});let L;const U=m({state:B,version:o.version}).then(D=>p.setItem(o.name,D)).catch(D=>{L=D});if(L)throw L;return U},T=a.setState;a.setState=(B,L)=>{T(B,L),_()};const O=e((...B)=>{r(...B),_()},n,a);let A;const M=()=>{var B;if(!p)return;s=!1,l.forEach(U=>U(n()));const L=((B=o.onRehydrateStorage)==null?void 0:B.call(o,n()))||void 0;return av(p.getItem.bind(p))(o.name).then(U=>{if(U)return o.deserialize(U)}).then(U=>{if(U)if(typeof U.version=="number"&&U.version!==o.version){if(o.migrate)return o.migrate(U.state,U.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return U.state}).then(U=>{var D;return A=o.merge(U,(D=n())!=null?D:O),r(A,!0),_()}).then(()=>{L?.(A,void 0),s=!0,c.forEach(U=>U(A))}).catch(U=>{L?.(void 0,U)})};return a.persist={setOptions:B=>{o={...o,...B},B.getStorage&&(p=B.getStorage())},clearStorage:()=>{p?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>M(),hasHydrated:()=>s,onHydrate:B=>(l.add(B),()=>{l.delete(B)}),onFinishHydration:B=>(c.add(B),()=>{c.delete(B)})},M(),A||O},_5e=(e,t)=>(r,n,a)=>{let o={storage:w5e(()=>localStorage),partialize:M=>M,version:0,merge:(M,B)=>({...B,...M}),...t},s=!1;const l=new Set,c=new Set;let p=o.storage;if(!p)return e((...M)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...M)},n,a);const m=()=>{const M=o.partialize({...n()});return p.setItem(o.name,{state:M,version:o.version})},_=a.setState;a.setState=(M,B)=>{_(M,B),m()};const T=e((...M)=>{r(...M),m()},n,a);let O;const A=()=>{var M;if(!p)return;s=!1,l.forEach(L=>L(n()));const B=((M=o.onRehydrateStorage)==null?void 0:M.call(o,n()))||void 0;return av(p.getItem.bind(p))(o.name).then(L=>{if(L)if(typeof L.version=="number"&&L.version!==o.version){if(o.migrate)return o.migrate(L.state,L.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return L.state}).then(L=>{var U;return O=o.merge(L,(U=n())!=null?U:T),r(O,!0),m()}).then(()=>{B?.(O,void 0),s=!0,c.forEach(L=>L(O))}).catch(L=>{B?.(void 0,L)})};return a.persist={setOptions:M=>{o={...o,...M},M.storage&&(p=M.storage)},clearStorage:()=>{p?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>A(),hasHydrated:()=>s,onHydrate:M=>(l.add(M),()=>{l.delete(M)}),onFinishHydration:M=>(c.add(M),()=>{c.delete(M)})},A(),O||T},S5e=(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."),x5e(e,t)):_5e(e,t),E5e=S5e,C5e=$y()(E5e((e,t)=>({addresses:[],addAddress:r=>e({addresses:[r,...t().addresses.filter(n=>n!==r)].slice(0,20)}),clear:()=>e({addresses:[]}),removeItem:r=>{const{addresses:n}=t(),a=n.filter(o=>o!==r);e({addresses:a})}}),{name:"addressHistory",getStorage:()=>localStorage}));function kH(){const e=jc(),{setValue:t,setActive:r}=i8(),{addresses:n,addAddress:a,clear:o,removeItem:s}=C5e(),{contractAddress:l}=nc(),c=ue.exports.useCallback(()=>{o()},[o]),p=ue.exports.useCallback(_=>{t(""),r(!1),e(`/${_}`)},[]),m=ue.exports.useCallback((_,T)=>{_.stopPropagation(),s(T)},[s]);return ue.exports.useEffect(()=>{l&&a(l)},[l]),{onHistoryClear:c,onItemClick:p,onItemDelete:m,addressHistory:n,addAddress:a}}const M5e=ur(Tn)({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}),k5e=ur("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 R5e(){const{onSubmit:e,onClear:t,setActive:r,setValue:n,active:a,value:o}=i8(),{onItemDelete:s,onItemClick:l,onHistoryClear:c,addressHistory:p}=kH(),[m]=h2(),_=m.get("devExamples")!==null;return ne(EC,{onClickAway:()=>r(!1),children:$t(No,{children:[$t(Tn,{sx:{position:"relative",maxWidth:1160,width:"100%",zIndex:3},children:[$t(M5e,{children:[ne("img",{width:24,height:24,src:nie,alt:"Search icon"}),ne(k5e,{onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),e())},placeholder:"Contract address",value:o,onChange:T=>n(T.target.value),onSubmit:e,onFocus:()=>r(!0),spellCheck:!1}),ne(Wv,{in:!!o,timeout:ohe,children:$t(Vn,{children:[ne(gl,{onClick:t,children:ne("img",{src:SC,width:16,height:16,alt:"Close icon"})}),ne(ns,{height:34,width:40,textColor:"#fff",background:"rgb(0, 136, 204)",hoverBackground:"rgb(0, 95, 142)",fontWeight:600,onClick:e,children:"Go"})]})})]}),a&&!!p?.length&&ne(che,{searchResults:p,onItemClick:l,onItemDelete:s,onHistoryClear:c}),(_||!1)&&a&&ne(hhe,{})]}),ne(ax,{sx:{color:"#fff",zIndex:1,overflow:"hidden"},invisible:!p?.length,open:a,onClick:()=>r(!1)})]})})}const A5e=250,ZO=188,T5e=ur(Tn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",minHeight:t.isMobile?80:ZO,height:t.showExpanded&&!t.isMobile?A5e:t.isMobile?80:ZO,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"})),RH=ur(Vn)(()=>({gap:10})),ah=ur(Sc)(()=>({display:"flex",alignItems:"center",gap:10,color:"#000",textDecoration:"none",cursor:"pointer"})),AH=ur(Vn)(({theme:e})=>({margin:"auto",maxWidth:ND,height:100,width:"100%",justifyContent:"space-between",gap:10})),P_=ur("h4")(({theme:e})=>({color:"#000",fontSize:20,fontWeight:800,[e.breakpoints.down("sm")]:{fontSize:16}})),o8=ur("h5")(()=>({color:"#000",fontWeight:700,fontSize:18})),I5e=ur("h3")(({theme:e})=>({color:"#000",fontSize:26,marginTop:0,textAlign:"center",fontWeight:800})),P5e=ur(Vn)({margin:"auto",maxWidth:ND,width:"100%"});var a8={},O5e=T_.exports;Object.defineProperty(a8,"__esModule",{value:!0});var TH=a8.default=void 0,B5e=O5e(r8()),U5e=n8,N5e=(0,B5e.default)((0,U5e.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");TH=a8.default=N5e;var s8={},L5e=T_.exports;Object.defineProperty(s8,"__esModule",{value:!0});var l8=s8.default=void 0,D5e=L5e(r8()),$5e=n8,F5e=(0,D5e.default)((0,$5e.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");l8=s8.default=F5e;var IH={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())})(Ir,function(){var t={};function r(n){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(n))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(n){if(typeof n!="string")throw new TypeError("expected string");var a,o=unescape(encodeURIComponent(n)),s=new Uint8Array(o.length);for(a=0;a"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(n){return Buffer.from(n).toString("base64")},t.decodeBase64=function(n){return r(n),new Uint8Array(Array.prototype.slice.call(Buffer.from(n,"base64"),0))}):(t.encodeBase64=function(n){return new Buffer(n).toString("base64")},t.decodeBase64=function(n){return r(n),new Uint8Array(Array.prototype.slice.call(new Buffer(n,"base64"),0))}):(t.encodeBase64=function(n){var a,o=[],s=n.length;for(a=0;a=e.length)throw new Error("Index is out of buffer");const r=e.slice(0,t),n=e.slice(t);return[r,n]}function K5(e){let t="";return e.forEach(r=>{t+=("0"+(r&255).toString(16)).slice(-2)}),t}function dw(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),n()}})})}send(t,r,n,a){return Li(this,void 0,void 0,function*(){const o=new URL(iB(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",n),yield fetch(o,{method:"post",body:u8.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,n;if(!this.isClosed){if(((r=this.eventSource)===null||r===void 0?void 0:r.readyState)===EventSource.CLOSED){this.eventSource.close(),this.registerSession();return}if(((n=this.eventSource)===null||n===void 0?void 0:n.readyState)===EventSource.CONNECTING){console.debug("[TON_CONNET_SDK_ERROR]: Bridge error",JSON.stringify(t));return}this.errorsListener(t)}}messagesHandler(t){return Li(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(n){throw new yo(`Bridge message parse failed, message ${n.data}`)}this.listener(r)}})}}class uv{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return Li(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},n={type:"http",connectEvent:t.connectEvent,session:r,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(n))})}removeConnection(){return Li(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return Li(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 n=new PH(r.session.sessionKeyPair);return{type:"http",connectEvent:r.connectEvent,lastWalletEventId:r.lastWalletEventId,nextRpcRequestId:r.nextRpcRequestId,session:{sessionCrypto:n,bridgeUrl:r.session.bridgeUrl,walletPublicKey:r.session.walletPublicKey}}})}getHttpConnection(){return Li(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new yo("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new yo("Trying to read HTTP connection source while injected connection is stored");return t})}getInjectedConnection(){return Li(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new yo("Trying to read Injected bridge connection source while nothing is stored");if(t?.type==="http")throw new yo("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return Li(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return Li(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 Li(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return Li(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 Li(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&t.nextRpcRequestId||0})}}const OH=2;function _l(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch{}}function vb(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch{}}function t6e(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch{}}class gw{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 uv(t)}static fromStorage(t){return Li(this,void 0,void 0,function*(){const n=yield new uv(t).getHttpConnection();return new gw(t,{bridgeUrl:n.session.bridgeUrl})})}connect(t){this.closeGateways();const r=new PH;let n="",a=this.standardUniversalLink;return Array.isArray(this.walletConnectionSource)?(this.pendingGateways=this.walletConnectionSource.map(o=>{const s=new V5(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())):(n=this.walletConnectionSource.bridgeUrl,this.walletConnectionSource.universalLink&&(a=this.walletConnectionSource.universalLink),this.gateway=new V5(this.storage,this.walletConnectionSource.bridgeUrl,r.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),this.gateway.registerSession()),this.session={sessionCrypto:r,bridgeUrl:n},this.generateUniversalLink(a,t)}restoreConnection(){return Li(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource))throw new yo("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 V5(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((n,a)=>Li(this,void 0,void 0,function*(){if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new yo("Trying to send bridge request without session");const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),_l("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})),dw(this.session.walletPublicKey));this.gateway.send(s,this.session.walletPublicKey,t.method).catch(a),this.pendingRequests.set(o.toString(),n),r?.()}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(){return Li(this,void 0,void 0,function*(){return new Promise(t=>Li(this,void 0,void 0,function*(){let r=!1;const n=()=>{r=!0,this.removeBridgeAndSession().then(t)};try{yield this.sendRequest({method:"disconnect",params:[]},n)}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 Li(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,n){return Li(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(n)})}gatewayListener(t){return Li(this,void 0,void 0,function*(){const r=JSON.parse(this.session.sessionCrypto.decrypt(u8.decode(t.message).toUint8Array(),dw(t.from)));if(_l("Wallet message received:",r),!("event"in r)){const a=r.id.toString(),o=this.pendingRequests.get(a);if(!o){_l(`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){vb(`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 n=this.listeners;r.event==="connect"&&(yield this.updateSession(r,t.from)),r.event==="disconnect"&&(yield this.removeBridgeAndSession()),n.forEach(a=>a(r))})}gatewayErrorsListener(t){return Li(this,void 0,void 0,function*(){throw new yo(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,r){return Li(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:r});const n=t.payload.items.find(o=>o.name==="ton_addr"),a=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:a,nextRpcRequestId:0})})}removeBridgeAndSession(){return Li(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,r){const n=new URL(t);return n.searchParams.append("v",OH.toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(r)),n.toString()}closeGateways(t){var r;(r=this.gateway)===null||r===void 0||r.close(),this.pendingGateways.filter(n=>n!==t?.except).forEach(n=>n.close()),this.pendingGateways=[]}}function oB(e,t){return BH(e,[t])}function BH(e,t){return!e||typeof e!="object"?!1:t.every(r=>r in e)}function r6e(e){try{return!oB(e,"tonconnect")||!oB(e.tonconnect,"walletInfo")?!1:BH(e.tonconnect.walletInfo,["name","image","about_url"])}catch{return!1}}function g8(){if(!(typeof window>"u"))return window}function n6e(){if(!(typeof document>"u"))return document}function i6e(){var e;const t=(e=g8())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}class Fs{constructor(t,r){this.injectedWalletKey=r,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=Fs.window;if(!Fs.isWindowContainsWallet(n,r))throw new d8;this.connectionStorage=new uv(t),this.injectedWallet=n[r].tonconnect}static fromStorage(t){return Li(this,void 0,void 0,function*(){const n=yield new uv(t).getInjectedConnection();return new Fs(t,n.jsBridgeKey)})}static isWalletInjected(t){return Fs.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return Fs.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Object.entries(this.window).filter(([r,n])=>r6e(n)).map(([r,n])=>({name:n.tonconnect.walletInfo.name,aboutUrl:n.tonconnect.walletInfo.about_url,imageUrl:n.tonconnect.walletInfo.image,tondns:n.tonconnect.walletInfo.tondns,jsBridgeKey:r,injected:!0,embedded:n.tonconnect.isWalletBrowser})):[]}static isWindowContainsWallet(t,r){return!!t&&r in t&&typeof t[r]=="object"&&"tonconnect"in t[r]}connect(t){this._connect(OH,t)}restoreConnection(){return Li(this,void 0,void 0,function*(){try{_l("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();_l("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 Li(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(n){_l(n),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 Li(this,void 0,void 0,function*(){const n=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),_l("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:n}));const a=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:n}));return a.then(o=>_l("Wallet message received:",o)),r?.(),a})}_connect(t,r){return Li(this,void 0,void 0,function*(){try{_l(`Injected Provider connect request: protocolVersion: ${t}, message:`,r);const n=yield this.injectedWallet.connect(t,r);_l("Injected Provider connect response:",n),n.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(a=>a(n))}catch(n){_l(n);const a={event:"connect_error",payload:{code:0,message:n?.toString()}};this.listeners.forEach(o=>o(a))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{_l("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})}}Fs.window=g8();class o6e{constructor(){const t=g8();if(!t?.localStorage)throw new h8;this.window=t}getItem(t){return Li(this,void 0,void 0,function*(){return Promise.resolve(this.window.localStorage.getItem(t))})}removeItem(t){return Li(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 D_(e){return a6e(e)&&e.injected}function UH(e){return D_(e)&&e.embedded}function a6e(e){return"jsBridgeKey"in e}function m8(e){return"bridgeUrl"in e}const s6e=[{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 oS{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 Li(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 Li(this,void 0,void 0,function*(){const r=(yield this.getWallets()).filter(UH);return r.length!==1?null:r[0]})}fetchWalletsList(){return Li(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new p8("Wrong wallets list format, wallets list must be an array.");const a=t.filter(o=>!this.isCorrectWalletConfigDTO(o));a.length&&(vb(`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(n){vb(n),t=s6e}let r=[];try{r=Fs.getCurrentlyInjectedWallets()}catch(n){vb(n)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),r)})}walletConfigDTOListToWalletConfigList(t){return t.map(r=>{const n={name:r.name,imageUrl:r.image,aboutUrl:r.about_url,tondns:r.tondns};return r.bridge.forEach(a=>{if(a.type==="sse"&&(n.bridgeUrl=a.url,n.universalLink=r.universal_url,n.deepLink=r.deepLink),a.type==="js"){const o=a.key;n.jsBridgeKey=o,n.injected=Fs.isWalletInjected(o),n.embedded=Fs.isInsideWalletBrowser(o)}}),n})}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,n="image"in t,a="about_url"in t;if(!r||!n||!a||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const o=t.bridge;if(o.some(c=>!c||typeof c!="object"||!("type"in c)))return!1;const s=o.find(c=>c.type==="sse");if(s&&(!("url"in s)||!s.url||!t.universal_url))return!1;const l=o.find(c=>c.type==="js");return!(l&&(!("key"in l)||!l.key))}}class mw extends yo{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,mw.prototype)}}function l6e(e,t){const r=e.includes("SendTransaction"),n=e.find(a=>a&&typeof a=="object"&&a.name==="SendTransaction");if(!r&&!n)throw new mw("Wallet doesn't support SendTransaction feature.");if(n&&n.maxMessages!==void 0){if(n.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(n=>n!==t),r&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(n=>n!==r))}}connect(t,r){var n;if(this.connected)throw new f8;return(n=this.provider)===null||n===void 0||n.closeConnection(),this.provider=this.createProvider(t),this.provider.connect(this.createConnectRequest(r))}restoreConnection(){return Li(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 gw.fromStorage(this.dappSettings.storage);break;case"injected":this.provider=yield Fs.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 Li(this,void 0,void 0,function*(){this.checkConnection(),l6e(this.wallet.device.features,{requiredMessagesNumber:t.messages.length});const{validUntil:r}=t,n=V5e(t,["validUntil"]),a=t.from||this.account.address,o=t.network||this.account.chain,s=yield this.provider.sendRequest(L1.convertToRpcRequest(Object.assign(Object.assign({},n),{valid_until:r,from:a,network:o})));return L1.isError(s)?L1.parseAndThrowError(s):L1.convertFromRpcResponse(s)})}disconnect(){return Li(this,void 0,void 0,function*(){if(!this.connected)throw new hw;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=n6e();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)&&G5e(t)?r=new Fs(this.dappSettings.storage,t.jsBridgeKey):r=new gw(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"),n=t.items.find(o=>o.name==="ton_proof");if(!r)throw new yo("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}};n&&(a.connectItems={tonProof:n}),this.wallet=a}onWalletConnectError(t){const r=X5e.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(n=>n(r)),console.debug(r),r instanceof B_||r instanceof O_)throw console.error(r),r}onWalletDisconnected(){this.wallet=null}checkConnection(){if(!this.connected)throw new hw}createConnectRequest(t){const r=[{name:"ton_addr"}];return t?.tonProof&&r.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:r}}}sh.walletsList=new oS;sh.isWalletInjected=e=>Fs.isWalletInjected(e);sh.isInsideWalletBrowser=e=>Fs.isInsideWalletBrowser(e);const u6e=17,c6e=128;function v8(e,t=!1){const{wc:r,hex:n}=f6e(e);let a=u6e;t&&(a|=c6e);const o=new Int8Array(34);o[0]=a,o[1]=r,o.set(n,2);const s=new Uint8Array(36);return s.set(o),s.set(d6e(o),34),u8.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}function f6e(e){if(!e.includes(":"))throw new cp(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new cp(`Wrong address ${e}. Address must include ":" only once.`);const r=parseInt(t[0]);if(r!==0&&r!==-1)throw new cp(`Wrong address ${e}. WC must be eq 0 or -1, but ${r} received.`);const n=t[1];if(n?.length!==64)throw new cp(`Wrong address ${e}. Hex part must be 64bytes length, but ${n?.length} received.`);return{wc:r,hex:h6e(n)}}function d6e(e){let r=0;const n=new Uint8Array(e.length+2);n.set(e);for(let a of n){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 aS={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),aS[t]=e}function h6e(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new pw("Hex string must have length a multiple of 2: "+e);const r=t/2,n=new Uint8Array(r);for(let a=0;at in e?R6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ia=(e,t)=>{for(var r in t||(t={}))I6e.call(t,r)&&lS(e,r,t[r]);if(sB)for(var r of sB(t))P6e.call(t,r)&&lS(e,r,t[r]);return e},jf=(e,t)=>A6e(e,T6e(t)),tl=(e,t,r)=>(lS(e,typeof t!="symbol"?t+"":t,r),r),Sl=(e,t,r)=>new Promise((n,a)=>{var o=c=>{try{l(r.next(c))}catch(p){a(p)}},s=c=>{try{l(r.throw(c))}catch(p){a(p)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);l((r=r.apply(e,t)).next())});const Jo={};function O6e(e){Jo.context=e}const B6e=(e,t)=>e===t,gu=Symbol("solid-proxy"),uS=Symbol("solid-track"),vw={equals:B6e};let DH=HH;const Hc=1,yw=2,$H={owned:null,cleanups:null,context:null,owner:null},G5={};var Pa=null;let zd=null,oa=null,ys=null,Ec=null,y8=0;function bm(e,t){const r=oa,n=Pa,a=e.length===0,o=a?$H:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},s=a?e:()=>e(()=>os(()=>W_(o)));Pa=o,oa=null;try{return Wf(s,!0)}finally{oa=r,Pa=n}}function Qi(e,t){t=t?Object.assign({},vw,t):vw;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=a=>(typeof a=="function"&&(a=a(r.value)),zH(r,a));return[WH.bind(r),n]}function bw(e,t,r){const n=j_(e,t,!0,Hc);O0(n)}function ma(e,t,r){const n=j_(e,t,!1,Hc);O0(n)}function Ul(e,t,r){DH=W6e;const n=j_(e,t,!1,Hc);n.user=!0,Ec?Ec.push(n):O0(n)}function Di(e,t,r){r=r?Object.assign({},vw,r):vw;const n=j_(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,O0(n),WH.bind(n)}function U6e(e,t,r){let n,a,o;arguments.length===2&&typeof t=="object"||arguments.length===1?(n=!0,a=e,o=t||{}):(n=e,a=t,o=r||{});let s=null,l=G5,c=null,p=!1,m="initialValue"in o,_=typeof n=="function"&&Di(n);const T=new Set,[O,A]=(o.storage||Qi)(o.initialValue),[M,B]=Qi(void 0),[L,U]=Qi(void 0,{equals:!1}),[D,Y]=Qi(m?"ready":"unresolved");if(Jo.context){c=`${Jo.context.id}${Jo.context.count++}`;let te;o.ssrLoadFrom==="initial"?l=o.initialValue:Jo.load&&(te=Jo.load(c))&&(l=te[0])}function q(te,R,h,g){return s===te&&(s=null,m=!0,(te===l||R===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(g,{value:R})),l=G5,Z(R,h)),R}function Z(te,R){Wf(()=>{R===void 0&&A(()=>te),Y(R!==void 0?"errored":"ready"),B(R);for(const h of T.keys())h.decrement();T.clear()},!1)}function ee(){const te=$6e,R=O(),h=M();if(h!==void 0&&!s)throw h;return oa&&!oa.user&&te&&bw(()=>{L(),s&&(te.resolved||T.has(te)||(te.increment(),T.add(te)))}),R}function V(te=!0){if(te!==!1&&p)return;p=!1;const R=_?_():n;if(R==null||R===!1){q(s,os(O));return}const h=l!==G5?l:os(()=>a(R,{value:O(),refetching:te}));return typeof h!="object"||!(h&&"then"in h)?(q(s,h,void 0,R),h):(s=h,p=!0,queueMicrotask(()=>p=!1),Wf(()=>{Y(m?"refreshing":"pending"),U()},!1),h.then(g=>q(h,g,void 0,R),g=>q(h,void 0,KH(g),R)))}return Object.defineProperties(ee,{state:{get:()=>D()},error:{get:()=>M()},loading:{get(){const te=D();return te==="pending"||te==="refreshing"}},latest:{get(){if(!m)return ee();const te=M();if(te&&!s)throw te;return O()}}}),_?bw(()=>V(!1)):V(!1),[ee,{refetch:V,mutate:A}]}function FH(e){return Wf(e,!1)}function os(e){if(oa===null)return e();const t=oa;oa=null;try{return e()}finally{oa=t}}function N6e(e,t,r){const n=Array.isArray(e);let a,o=r&&r.defer;return s=>{let l;if(n){l=Array(e.length);for(let p=0;pt(l,a,s));return a=l,c}}function L6e(e){Ul(()=>os(e))}function Nc(e){return Pa===null||(Pa.cleanups===null?Pa.cleanups=[e]:Pa.cleanups.push(e)),e}function jH(){return oa}function D6e(){return Pa}function $_(e,t){const r=Symbol("context");return{id:r,Provider:z6e(r),defaultValue:e}}function mu(e){let t;return(t=GH(Pa,e.id))!==void 0?t:e.defaultValue}function F_(e){const t=Di(e),r=Di(()=>cS(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}let $6e;function WH(){const e=zd;if(this.sources&&(this.state||e))if(this.state===Hc||e)O0(this);else{const t=ys;ys=null,Wf(()=>xw(this),!1),ys=t}if(oa){const t=this.observers?this.observers.length:0;oa.sources?(oa.sources.push(this),oa.sourceSlots.push(t)):(oa.sources=[this],oa.sourceSlots=[t]),this.observers?(this.observers.push(oa),this.observerSlots.push(oa.sources.length-1)):(this.observers=[oa],this.observerSlots=[oa.sources.length-1])}return this.value}function zH(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Wf(()=>{for(let a=0;a1e6)throw ys=[],new Error},!1)),t}function O0(e){if(!e.fn)return;W_(e);const t=Pa,r=oa,n=y8;oa=Pa=e,F6e(e,e.value,n),oa=r,Pa=t}function F6e(e,t,r){let n;try{n=e.fn(t)}catch(a){e.pure&&(e.state=Hc,e.owned&&e.owned.forEach(W_),e.owned=null),VH(a)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?zH(e,n):e.value=n,e.updatedAt=r)}function j_(e,t,r,n=Hc,a){const o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Pa,context:null,pure:r};return Pa===null||Pa!==$H&&(Pa.owned?Pa.owned.push(o):Pa.owned=[o]),o}function ww(e){const t=zd;if(e.state===0||t)return;if(e.state===yw||t)return xw(e);if(e.suspense&&os(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=r[n],e.state===Hc||t)O0(e);else if(e.state===yw||t){const a=ys;ys=null,Wf(()=>xw(e,r[0]),!1),ys=a}}function Wf(e,t){if(ys)return e();let r=!1;t||(ys=[]),Ec?r=!0:Ec=[],y8++;try{const n=e();return j6e(r),n}catch(n){r||(Ec=null),ys=null,VH(n)}}function j6e(e){if(ys&&(HH(ys),ys=null),e)return;const t=Ec;Ec=null,t.length&&Wf(()=>DH(t),!1)}function HH(e){for(let t=0;ta=os(()=>(Pa.context={[e]:n.value},F_(()=>n.children))),void 0),a}}const H6e=Symbol("fallback");function lB(e){for(let t=0;t1?[]:null;return Nc(()=>lB(o)),()=>{let c=e()||[],p,m;return c[uS],os(()=>{let T=c.length,O,A,M,B,L,U,D,Y,q;if(T===0)s!==0&&(lB(o),o=[],n=[],a=[],s=0,l&&(l=[])),r.fallback&&(n=[H6e],a[0]=bm(Z=>(o[0]=Z,r.fallback())),s=1);else if(s===0){for(a=new Array(T),m=0;m=U&&Y>=U&&n[D]===c[Y];D--,Y--)M[Y]=a[D],B[Y]=o[D],l&&(L[Y]=l[D]);for(O=new Map,A=new Array(Y+1),m=Y;m>=U;m--)q=c[m],p=O.get(q),A[m]=p===void 0?-1:p,O.set(q,m);for(p=U;p<=D;p++)q=n[p],m=O.get(q),m!==void 0&&m!==-1?(M[m]=a[p],B[m]=o[p],l&&(L[m]=l[p]),m=A[m],O.set(q,m)):o[p]();for(m=U;me(t||{}))}function D1(){return!0}const fS={get(e,t,r){return t===gu?r:e.get(t)},has(e,t){return t===gu?!0:e.has(t)},set:D1,deleteProperty:D1,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:D1,deleteProperty:D1}},ownKeys(e){return e.keys()}};function Y5(e){return(e=typeof e=="function"?e():e)?e:{}}function qu(...e){let t=!1;for(let n=0;n=0;a--){const o=Y5(e[a])[n];if(o!==void 0)return o}},has(n){for(let a=e.length-1;a>=0;a--)if(n in Y5(e[a]))return!0;return!1},keys(){const n=[];for(let a=0;a=0;n--)if(e[n]){const a=Object.getOwnPropertyDescriptors(e[n]);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 b8(e,...t){const r=new Set(t.flat());if(gu 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)}},fS));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))}},fS)),a}const n=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(n).filter(a=>!r.has(a))),t.map(a=>{const o={};for(let s=0;se.fallback};return Di(q6e(()=>e.each,e.children,t||void 0))}function _o(e){let t=!1;const r=e.keyed,n=Di(()=>e.when,void 0,{equals:(a,o)=>t?a===o:!a==!o});return Di(()=>{const a=n();if(a){const o=e.children,s=typeof o=="function"&&o.length>0;return t=r||s,s?os(()=>o(a)):o}return e.fallback},void 0,void 0)}function H_(e){let t=!1,r=!1;const n=(s,l)=>s[0]===l[0]&&(t?s[1]===l[1]:!s[1]==!l[1])&&s[2]===l[2],a=F_(()=>e.children),o=Di(()=>{let s=a();Array.isArray(s)||(s=[s]);for(let l=0;l{const[s,l,c]=o();if(s<0)return e.fallback;const p=c.children,m=typeof p=="function"&&p.length>0;return t=r||m,m?os(()=>p(l)):p},void 0,void 0)}function Ku(e){return e}const K6e=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],V6e=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...K6e]),G6e=new Set(["innerHTML","textContent","innerText","children"]),Y6e=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),uB=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),X6e=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Q6e=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"]),Z6e={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function J6e(e,t,r){let n=r.length,a=t.length,o=n,s=0,l=0,c=t[a-1].nextSibling,p=null;for(;sm-l){const A=t[s];for(;l{a=o,t===document?e():qa(t,e(),t.firstChild?null:void 0,r)},n.owner),()=>{a(),t.textContent=""}}function Ea(e,t,r){if(typeof window>"u")return null;const n=document.createElement("template");n.innerHTML=e;let a=n.content.firstChild;return r&&(a=a.firstChild),a}function t4e(e,t=window.document){const r=t[cB]||(t[cB]=new Set);for(let n=0,a=e.length;na.call(e,r[1],o))}else e.addEventListener(t,r)}function i4e(e,t,r={}){const n=Object.keys(t||{}),a=Object.keys(r);let o,s;for(o=0,s=a.length;oa.children=t0(e,t.children,a.children)),ma(()=>t.ref&&t.ref(e)),ma(()=>a4e(e,t,r,!0,a,!0)),a}function _w(e,t,r){return os(()=>e(t,r))}function qa(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return t0(e,t,n,r);ma(a=>t0(e,t(),a,r),n)}function a4e(e,t,r,n,a={},o=!1){t||(t={});for(const s in a)if(!(s in t)){if(s==="children")continue;a[s]=dB(e,s,null,a[s],r,o)}for(const s in t){if(s==="children"){n||t0(e,t.children);continue}const l=t[s];a[s]=dB(e,s,l,a[s],r,o)}}function s4e(e){let t,r;return!Jo.context||!(t=Jo.registry.get(r=c4e()))?e.cloneNode(!0):(Jo.completed&&Jo.completed.add(t),Jo.registry.delete(r),t)}function l4e(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function fB(e,t,r){const n=t.trim().split(/\s+/);for(let a=0,o=n.length;a-1&&Z6e[t.split(":")[0]];p?r4e(e,p,t,r):qo(e,Y6e[t]||t,r)}return r}function u4e(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}}),Jo.registry&&!Jo.done&&(Jo.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+e;){let a=n.nextSibling;n.remove(),n=a}n&&n.remove()}));r;){const n=r[t];if(n&&!r.disabled){const a=r[`${t}Data`];if(a!==void 0?n.call(r,a,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function t0(e,t,r,n,a){for(Jo.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,s=n!==void 0;if(e=s&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(Jo.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=zh(e,r,n,l)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(Jo.context)return r;r=zh(e,r,n)}else{if(o==="function")return ma(()=>{let l=t();for(;typeof l=="function";)l=l();r=t0(e,l,r,n)}),()=>r;if(Array.isArray(t)){const l=[],c=r&&Array.isArray(r);if(dS(l,t,r,a))return ma(()=>r=t0(e,l,r,n,!0)),()=>r;if(Jo.context){if(!l.length)return r;for(let p=0;p=0;s--){const l=t[s];if(a!==l){const c=l.parentNode===e;!o&&!s?c?e.replaceChild(a,l):e.insertBefore(a,r):c&&l.remove()}else o=!0}}else e.insertBefore(a,r);return[a]}function c4e(){const e=Jo.context;return`${e.id}${e.count++}`}const f4e="http://www.w3.org/2000/svg";function XH(e,t=!1){return t?document.createElementNS(f4e,e):document.createElement(e)}function QH(e){const{useShadow:t}=e,r=document.createTextNode(""),n=e.mount||document.body;function a(){if(Jo.context){const[o,s]=Qi(!1);return queueMicrotask(()=>s(!0)),()=>o()&&e.children}else return()=>e.children}if(n instanceof HTMLHeadElement){const[o,s]=Qi(!1),l=()=>s(!0);bm(c=>qa(n,()=>o()?c():a()(),null)),Nc(()=>{Jo.context?queueMicrotask(l):l()})}else{const o=XH(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}),qa(s,a()),n.appendChild(o),e.ref&&e.ref(o),Nc(()=>n.removeChild(o))}return r}function x8(e){const[t,r]=b8(e,["component"]),n=Di(()=>t.component);return Di(()=>{const a=n();switch(typeof a){case"function":return os(()=>a(r));case"string":const o=Q6e.has(a),s=Jo.context?s4e():XH(a,o);return YH(s,r,o),s}})}const[d4e,hS]=Qi(!1),[h4e,au]=Qi(null),[Yh,fp]=Qi(null);let p4e={data:""},g4e=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||p4e,m4e=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,v4e=/\/\*[^]*?\*\/| +/g,pB=/\n+/g,kd=(e,t)=>{let r="",n="",a="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+s+";":n+=o[1]=="f"?kd(s,o):o+"{"+kd(s,o[1]=="k"?"":t)+"}":typeof s=="object"?n+=kd(s,t?t.replace(/([^,])+/g,l=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=kd.p?kd.p(o,s):o+":"+s+";")}return r+(t&&a?t+"{"+a+"}":a)+n},pc={},ZH=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+ZH(e[r]);return t}return e},y4e=(e,t,r,n,a)=>{let o=ZH(e),s=pc[o]||(pc[o]=(c=>{let p=0,m=11;for(;p>>0;return"go"+m})(o));if(!pc[s]){let c=o!==e?e:(p=>{let m,_,T=[{}];for(;m=m4e.exec(p.replace(v4e,""));)m[4]?T.shift():m[3]?(_=m[3].replace(pB," ").trim(),T.unshift(T[0][_]=T[0][_]||{})):T[0][m[1]]=m[2].replace(pB," ").trim();return T[0]})(e);pc[s]=kd(a?{["@keyframes "+s]:c}:c,r?"":"."+s)}let l=r&&pc.g?pc.g:null;return r&&(pc.g=pc[s]),((c,p,m,_)=>{_?p.data=p.data.replace(_,c):p.data.indexOf(c)===-1&&(p.data=m?c+p.data:p.data+c)})(pc[s],t,n,l),s},b4e=(e,t,r)=>e.reduce((n,a,o)=>{let s=t[o];if(s&&s.call){let l=s(r),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=c?"."+c:l&&typeof l=="object"?l.props?"":kd(l,""):l===!1?"":l}return n+a+(s??"")},"");function Lc(e){let t=this||{},r=e.call?e(t.p):e;return y4e(r.unshift?r.raw?b4e(r,[].slice.call(arguments,1),t.p):r.reduce((n,a)=>Object.assign(n,a&&a.call?a(t.p):a),{}):r,g4e(t.target),t.g,t.o,t.k)}Lc.bind({g:1});let w4e=Lc.bind({k:1});const _8=$_();function x4e(e){return Wt(_8.Provider,{value:e.theme,get children(){return e.children}})}function bl(){return mu(_8)}function JH(e){let t=this||{};return(...r)=>{const n=a=>{const o=mu(_8),s=qu(a,{theme:o}),l=qu(s,{get class(){const O=s.class,A="class"in s&&/^go[0-9]+/.test(O);let M=Lc.apply({target:t.target,o:A,p:s,g:t.g},r);return[O,M].filter(Boolean).join(" ")}}),[c,p]=b8(l,["as","theme"]),m=p,_=c.as||e;let T;return typeof _=="function"?T=_(m):t.g==1?(T=document.createElement(_),YH(T,m)):T=x8(qu({component:_},m)),T};return n.class=a=>os(()=>Lc.apply({target:t.target,p:a,g:t.g},r)),n}}const kn=new Proxy(JH,{get(e,t){return e(t)}});function _4e(){const e=JH.call({g:1},"div").apply(null,arguments);return function(r){return e(r),null}}const S4e={close:"Close",get:"GET",learnMore:"Learn more",openExtension:"Open Extension",copyLink:"Copy Link",copied:"Copied!",yourWallet:"your wallet"},E4e={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},C4e={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."}},M4e={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 }}?"}},k4e={confirmTransaction:{header:"Confirm the\xA0transaction in\xA0{{ name }}",text:"It will only take a\xA0moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},R4e={common:S4e,button:E4e,notifications:C4e,walletModal:M4e,actionModal:k4e},A4e={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"},T4e={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"}},I4e={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."}},P4e={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 }}?"}},O4e={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"},B4e={common:A4e,button:T4e,notifications:I4e,walletModal:P4e,actionModal:O4e},U4e={en:gB(R4e),ru:gB(B4e)};function gB(e){const t="$",r=n=>{Object.entries(n).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(c=>{if(c in l)l=l[c];else throw new Error(`Cannot parse translations: there is no property ${c} in translation`)}),n[a]=l}o.slice(0,2)===`\\${t}`&&(n[a]=o.slice(1))}})};return r(e),e}const q_=$_(),pS=Symbol("store-raw"),fv=Symbol("store-node"),N4e=Symbol("store-name");function eq(e,t){let r=e[gu];if(!r&&(Object.defineProperty(e,gu,{value:r=new Proxy(e,$4e)}),!Array.isArray(e))){const n=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let o=0,s=n.length;oe[gu][t]),r}function tq(e){if(jH()){const t=S8(e);(t._||(t._=rq()))()}}function D4e(e){return tq(e),Reflect.ownKeys(e)}function rq(e){const[t,r]=Qi(e,{equals:!1,internal:!0});return t.$=r,t}const $4e={get(e,t,r){if(t===pS)return e;if(t===gu)return r;if(t===uS)return tq(e),r;const n=S8(e),a=n.hasOwnProperty(t);let o=a?n[t]():e[t];if(t===fv||t==="__proto__")return o;if(!a){const s=Object.getOwnPropertyDescriptor(e,t);jH()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(o=gS(n,t,o)())}return Sw(o)?eq(o):o},has(e,t){return t===pS||t===gu||t===uS||t===fv||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:D4e,getOwnPropertyDescriptor:L4e};function Ew(e,t,r,n=!1){if(!n&&e[t]===r)return;const a=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let s=S8(e),l;(l=gS(s,t,a))&&l.$(()=>r),Array.isArray(e)&&e.length!==o&&(l=gS(s,"length",o))&&l.$(e.length),(l=s._)&&l.$()}function nq(e,t){const r=Object.keys(t);for(let n=0;n1){n=t.shift();const s=typeof n,l=Array.isArray(e);if(Array.isArray(n)){for(let c=0;c1){em(e[n],t,[n].concat(r));return}a=e[n],r=[n].concat(r)}let o=t[0];typeof o=="function"&&(o=o(a,r),o===a)||n===void 0&&o==null||(o=r0(o),n===void 0||Sw(a)&&Sw(o)&&!Array.isArray(o)?nq(a,o):Ew(e,n,o))}function E8(...[e,t]){const r=r0(e||{}),n=Array.isArray(r),a=eq(r);function o(...s){FH(()=>{n&&s.length===1?F4e(r,s[0]):em(r,s)})}return[a,o]}var pa=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(pa||{});const iq={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"}},j4e={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 mB(e){return Object.prototype.toString.call(e)==="[object Object]"}function W4e(e){var t,r;return mB(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(mB(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Bf(e,t){return e?k6e(t,e,{arrayMerge:(n,a,o)=>a,isMergeableObject:W4e}):t}const[z4e,C8]=E8({theme:pa.LIGHT,colors:iq,borderRadius:"m"}),oq={[pa.LIGHT]:iq,[pa.DARK]:j4e},Du={[pa.LIGHT]:void 0,[pa.DARK]:void 0};function X5(e,t){t&&(Du[pa.DARK]=Bf(t[pa.DARK],Du[pa.DARK]),Du[pa.LIGHT]=Bf(t[pa.LIGHT],Du[pa.LIGHT])),C8({theme:e,colors:Bf(Du[e],oq[e])})}function H4e(e){C8({borderRadius:e})}function q4e(e){Du[pa.DARK]=Bf(e[pa.DARK],Du[pa.DARK]),Du[pa.LIGHT]=Bf(e[pa.LIGHT],Du[pa.LIGHT]),C8(t=>({colors:Bf(Du[t.theme],oq[t.theme])}))}const vc="tc-root",M8="tc-disable-scroll",Q5="tc-using-mouse",K4e=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(Q5)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(Q5)});const e=_4e` - ${vc} * { - 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; - } - - ${vc} img { - -webkit-user-select: none; - -webkit-touch-callout: none; - } - - ${vc} *:focus { - outline: #08f auto 2px; - } - - ${vc} li { - list-style: none; - } - - ${vc} button { - outline: none; - } - - body.${M8} { - position: fixed; - overflow-y: scroll; - right: 0; - left: 0; - } - - body.${Q5} ${vc} *:focus { - outline: none; - } -`;return Wt(e,{})},V4e=kn.div` - background-color: ${e=>e.theme.colors.background.secondary}; -`,k8=e=>{let t;const[r,n]=Qi(null);return Ul(()=>{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?n(a):(a.addEventListener("load",()=>n(a)),()=>a.removeEventListener("load",()=>n(a)))}),[Wt(_o,{get when(){return r()},get children(){return r()}}),Wt(_o,{get when(){return!r()},get children(){return Wt(V4e,{get class(){return e.class},ref(a){const o=t;typeof o=="function"?o(a):t=a}})}})]};function G4e(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),r=t>>16&255,n=t>>8&255,a=t&255;return[r,n,a].join(",")}function K_(e,t){return e[0]==="#"&&(e=G4e(e)),`rgba(${e}, ${t})`}function Vu(e){return e.toString()+"px"}class Bu extends yo{constructor(...t){super(...t),Object.setPrototypeOf(this,Bu.prototype)}}function dv(e,t="_self"){return window.open(e,t,"noreferrer noopener")}function R8(e){dv(e,"_blank")}function Y4e(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?pa.LIGHT:pa.DARK}function X4e(e){const t=r=>e(r.matches?pa.DARK:pa.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function Q4e(e,t,r){const n=new URL(e);return n.searchParams.append(t,r),n.toString()}function hv(e,t){return Q4e(e,"ret",t)}function Z4e(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Vu(-document.documentElement.scrollTop),document.body.classList.add(M8))}function J4e(){document.body.classList.remove(M8),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function eSe(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function tSe(){customElements.define(vc,class extends HTMLDivElement{},{extends:"div"})}function rSe(e){e.forEach(t=>{const r=new window.Image;r.src=t})}function aq(){if(typeof localStorage>"u")throw new Bu("window.localStorage is undefined. localStorage is required for TonConnectUI")}function sq(){if(typeof window<"u")return window}function nSe(){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 bf={mobile:440,tablet:1020};function dp(e){const t=sq();if(!t)return e==="desktop";const r=t.innerWidth;switch(e){case"desktop":return r>bf.tablet;case"tablet":return r>bf.mobile;default:case"mobile":return r<=bf.mobile}}function qc(e){switch(e){case"mobile":return`@media (max-width: ${bf.mobile}px)`;case"tablet":return`@media (max-width: ${bf.tablet}px) (min-width: ${bf.mobile}px)`;default:case"desktop":return`@media (min-width: ${bf.tablet}px)`}}const V_="@media (hover: none)",G_="@media not all and (hover: none)",iSe={m:"100vh",s:"8px",none:"0"},Z5={s:.02,m:.04},oSe=kn.button` - background-color: ${e=>e.appearance==="flat"?"transparent":K_(e.theme.colors.accent,.12)}; - color: ${e=>e.theme.colors.accent}; - - padding: ${e=>e.appearance==="flat"?"0":"9px 16px"}; - border: none; - border-radius: ${e=>iSe[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; - - ${G_} { - &:hover { - transform: ${e=>e.disabled?"unset":`scale(${1+Z5[e.scale]})`}; - } - } - - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-Z5[e.scale]})`}; - } - - ${V_} { - &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-Z5[e.scale]*2})`}; - } - } -`;function Fy(e){const t=os(()=>Object.keys(e).filter(n=>n.startsWith("data-"))),[r]=b8(e,t);return r}const ic=e=>{const t=Fy(e);return Wt(oSe,qu({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:r=>{var n;return(n=e.onClick)==null?void 0:n.call(e,r)},onMouseEnter:r=>{var n;return(n=e.onMouseEnter)==null?void 0:n.call(e,r)},onMouseLeave:r=>{var n;return(n=e.onMouseLeave)==null?void 0:n.call(e,r)},ref(r){const n=e.ref;typeof n=="function"?n(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 Cw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const Y_=e=>{let t,r=!0;const[n,a]=Qi(),[o,s]=Qi(),l=F_(()=>e.children),{onBeforeEnter:c,onEnter:p,onAfterEnter:m,onBeforeExit:_,onExit:T,onAfterExit:O}=e,A=Di(()=>{const L=e.name||"s";return{enterActiveClass:e.enterActiveClass||L+"-enter-active",enterClass:e.enterClass||L+"-enter",enterToClass:e.enterToClass||L+"-enter-to",exitActiveClass:e.exitActiveClass||L+"-exit-active",exitClass:e.exitClass||L+"-exit",exitToClass:e.exitToClass||L+"-exit-to"}});function M(L,U){if(!r||e.appear){let D=function(ee){L&&(!ee||ee.target===L)&&(L.removeEventListener("transitionend",D),L.removeEventListener("animationend",D),L.classList.remove(...q),L.classList.remove(...Z),FH(()=>{n()!==L&&a(L),o()===L&&s(void 0)}),m&&m(L),e.mode==="inout"&&B(L,U))};const Y=A().enterClass.split(" "),q=A().enterActiveClass.split(" "),Z=A().enterToClass.split(" ");c&&c(L),L.classList.add(...Y),L.classList.add(...q),Cw(()=>{L.classList.remove(...Y),L.classList.add(...Z),p&&p(L,()=>D()),(!p||p.length<2)&&(L.addEventListener("transitionend",D),L.addEventListener("animationend",D))})}U&&!e.mode?s(L):a(L)}function B(L,U){const D=A().exitClass.split(" "),Y=A().exitActiveClass.split(" "),q=A().exitToClass.split(" ");if(!U.parentNode)return Z();_&&_(U),U.classList.add(...D),U.classList.add(...Y),Cw(()=>{U.classList.remove(...D),U.classList.add(...q)}),T&&T(U,()=>Z()),(!T||T.length<2)&&(U.addEventListener("transitionend",Z),U.addEventListener("animationend",Z));function Z(ee){(!ee||ee.target===U)&&(U.removeEventListener("transitionend",Z),U.removeEventListener("animationend",Z),U.classList.remove(...Y),U.classList.remove(...q),n()===U&&a(void 0),O&&O(U),e.mode==="outin"&&M(L,U))}}return bw(L=>{for(t=l();typeof t=="function";)t=t();return os(()=>(t&&t!==L&&(e.mode!=="outin"?M(t,L):r&&a(t)),L&&L!==t&&e.mode!=="inout"&&B(t,L),r=!1,t))}),[n,o]};function $1(e){const{top:t,bottom:r,left:n,right:a,width:o,height:s}=e.getBoundingClientRect(),l=e.parentNode.getBoundingClientRect();return{top:t-l.top,bottom:r,left:n-l.left,right:a,width:o,height:s}}const aSe=e=>{const t=F_(()=>e.children),r=Di(()=>{const O=e.name||"s";return{enterActiveClass:e.enterActiveClass||O+"-enter-active",enterClass:e.enterClass||O+"-enter",enterToClass:e.enterToClass||O+"-enter-to",exitActiveClass:e.exitActiveClass||O+"-exit-active",exitClass:e.exitClass||O+"-exit",exitToClass:e.exitToClass||O+"-exit-to",moveClass:e.moveClass||O+"-move"}}),{onBeforeEnter:n,onEnter:a,onAfterEnter:o,onBeforeExit:s,onExit:l,onAfterExit:c}=e,[p,m]=Qi();let _=[],T=!0;return bw(()=>{const O=t(),A=[...O],M=new Set(O),B=new Set(_),L=r().enterClass.split(" "),U=r().enterActiveClass.split(" "),D=r().enterToClass.split(" "),Y=r().exitClass.split(" "),q=r().exitActiveClass.split(" "),Z=r().exitToClass.split(" ");for(let ee=0;ee{V.classList.remove(...L),V.classList.add(...D),a&&a(V,()=>te()),(!a||a.length<2)&&(V.addEventListener("transitionend",te),V.addEventListener("animationend",te))})}}for(let ee=0;ee<_.length;ee++){const V=_[ee];if(!M.has(V)&&V.parentNode){let te=function(R){(!R||R.target===V)&&(V.removeEventListener("transitionend",te),V.removeEventListener("animationend",te),V.classList.remove(...q),V.classList.remove(...Z),c&&c(V),_=_.filter(h=>h!==V),m(_))};A.splice(ee,0,V),s&&s(V),V.classList.add(...Y),V.classList.add(...q),Cw(()=>{V.classList.remove(...Y),V.classList.add(...Z)}),l&&l(V,()=>te()),(!l||l.length<2)&&(V.addEventListener("transitionend",te),V.addEventListener("animationend",te))}}_=A,m(A)}),Ul(O=>{const A=p();return A.forEach(M=>{let B;(B=O.get(M))?B.new&&(B.new=!1,B.newPos=$1(M)):O.set(M,B={pos:$1(M),new:!T}),B.new&&M.addEventListener("transitionend",()=>{B.new=!1,M.parentNode&&(B.newPos=$1(M))},{once:!0}),B.newPos&&(B.pos=B.newPos),B.newPos=$1(M)}),T?(T=!1,O):(A.forEach(M=>{const B=O.get(M),L=B.pos,U=B.newPos,D=L.left-U.left,Y=L.top-U.top;if(D||Y){B.moved=!0;const q=M.style;q.transform=`translate(${D}px,${Y}px)`,q.transitionDuration="0s"}}),document.body.offsetHeight,A.forEach(M=>{const B=O.get(M);if(B.moved){let L=function(Y){Y&&Y.target!==M||!M.parentNode||(!Y||/transform$/.test(Y.propertyName))&&(M.removeEventListener("transitionend",L),M.classList.remove(...D))};B.moved=!1;const U=M.style,D=r().moveClass.split(" ");M.classList.add(...D),U.transform=U.transitionDuration="",M.addEventListener("transitionend",L)}}),O)},new Map),p};function sSe(e,t){const r=n=>{var a;return!e.contains(n.target)&&((a=t())==null?void 0:a())};document.body.addEventListener("click",r),Nc(()=>document.body.removeEventListener("click",r))}function lSe(e,t){const r=n=>{var a,o;n.key==="Escape"&&((a=document.activeElement)==null||a.blur(),(o=t())==null||o())};document.body.addEventListener("keydown",r),Nc(()=>document.body.removeEventListener("keydown",r))}const uSe=Ea('',4,!0),cSe={left:0,top:90,right:180,bottom:270},lq=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.secondary,n=()=>e.direction||"left",a=kn("svg")` - transform: rotate(${o=>cSe[o.svgDirection]}deg); - transition: transform 0.1s ease-in-out; - `;return Wt(a,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",get svgDirection(){return n()},get children(){const o=uSe.cloneNode(!0);return ma(()=>qo(o,"stroke",r())),o}})},fSe=Ea(''),dSe=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const n=fSe.cloneNode(!0),a=n.firstChild;return ma(()=>qo(a,"stroke",r())),n})()},hSe=kn.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; - - ${G_} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${V_} { - &:active { - transform: scale(0.92); - } - } -`,uq=e=>{const t=Fy(e),r=()=>e.icon||"close";return Wt(hSe,qu({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[Wt(_o,{get when(){return!!e.children},get children(){return e.children}}),Wt(_o,{get when(){return!e.children},get children(){return Wt(H_,{get children(){return[Wt(Ku,{get when(){return r()==="close"},get children(){return Wt(dSe,{get fill(){return e.fill}})}}),Wt(Ku,{get when(){return r()==="arrow"},get children(){return Wt(lq,{get fill(){return e.fill}})}})]}})}})]}}))},pSe=kn.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); - - ${qc("mobile")} { - align-items: flex-end; - } - - @media (min-width: ${bf.mobile.toString()}px) and (max-height: 600px) { - padding: 48px 0; - align-items: flex-start; - overflow: scroll; - } -`,gSe=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; - - ${qc("mobile")} { - width: 100%; - } -`,mSe=kn(uq)` - position: absolute; - right: 16px; - top: 16px; -`,vSe=Ea("
    "),ySe=sSe,bSe=lSe,J5={m:"24px",s:"16px",none:"0"},cq=e=>{const t=bl(),r=Fy(e);return Ul(()=>{e.opened?Z4e():J4e()}),Wt(Y_,{onBeforeEnter:n=>{const a=dp("mobile")?200:100;n.animate([{opacity:0},{opacity:1}],{duration:a}),dp("mobile")&&n.firstElementChild.animate([{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:a})},onExit:(n,a)=>{const o=dp("mobile")?200:100,s=n.animate([{opacity:1},{opacity:0}],{duration:o});if(dp("mobile")){const l=n.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 Wt(_o,{get when(){return e.opened},get children(){return Wt(pSe,qu({"data-tc-modal":"true"},r,{get children(){const n=vSe.cloneNode(!0);return _w(bSe,n,()=>()=>e.onClose()),_w(ySe,n,()=>()=>e.onClose()),qa(n,Wt(mSe,{icon:"close",onClick:()=>e.onClose()}),null),qa(n,()=>e.children,null),ma(()=>w8(n,sS(gSe,e.class,Lc` - background-color: ${t.colors.background.primary}; - border-radius: ${J5[t.borderRadius]}; - - ${qc("mobile")} { - border-radius: ${J5[t.borderRadius]} - ${J5[t.borderRadius]} 0 0; - } - `))),n}}))}})}})},wSe={m:"22px",s:"12px",none:"0"},xSe={m:"18px",s:"8px",none:"0"},_Se=kn.div` - display: grid; - grid-template: 1fr / 1fr 1fr; - width: fit-content; - justify-items: center; - gap: 4px; - - position: relative; - padding: 4px; - border-radius: ${e=>wSe[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.secondary}; -`,SSe=kn.div` - position: absolute; - top: 4px; - left: 4px; - - height: calc(100% - 8px); - width: calc(50% - 4px); - - border-radius: ${e=>xSe[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; -`,vB=kn.input` - display: none; -`,yB=kn.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};`} - } -`,ESe=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return Wt(_Se,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[Wt(SSe,{get right(){return e.selectedTabIndex===1}}),Wt(yB,{get isActive(){return e.selectedTabIndex===0},get children(){return[Wt(vB,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,0)}}),Di(()=>e.tab1)]}}),Wt(yB,{get isActive(){return e.selectedTabIndex===1},get children(){return[Wt(vB,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var r;return(r=e.onSelectedTabIndexChange)==null?void 0:r.call(e,1)}}),Di(()=>e.tab2)]}})]}})},CSe={m:"16px",s:"8px",none:"0"},fq=256,mS=60,bB=48,wB=24,MSe=kn.div` - display: flex; - align-items: center; - position: relative; - background-color: ${e=>e.theme.colors.background.secondary}; - border-radius: ${e=>CSe[e.theme.borderRadius]}; - padding: ${Vu(wB)} 0; - height: ${Vu(fq+wB*2)}; - width: 100%; - - overflow: hidden; -`,kSe=kn.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}; - } -`,RSe=kn.div` - position: absolute; - width: ${Vu(mS)}; - height: ${Vu(mS)}; - background: ${e=>e.theme.colors.background.secondary}; - - display: flex; - align-items: center; - justify-content: center; -`,ASe=kn(k8)` - width: ${e=>Vu(e.size)}; - height: ${e=>Vu(e.size)}; - border-radius: 12px; -`,TSe=kn(ic)` - 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 dq={exports:{}};(function(e,t){var r=function(){var n=function(q,Z){var ee=236,V=17,te=q,R=o[Z],h=null,g=0,v=null,u=[],f={},y=function(De,Fe){g=te*4+17,h=function(wt){for(var Ke=new Array(wt),ht=0;ht=7&&$(De),v==null&&(v=Ae(te,R,u)),X(v,Fe)},S=function(De,Fe){for(var wt=-1;wt<=7;wt+=1)if(!(De+wt<=-1||g<=De+wt))for(var Ke=-1;Ke<=7;Ke+=1)Fe+Ke<=-1||g<=Fe+Ke||(0<=wt&&wt<=6&&(Ke==0||Ke==6)||0<=Ke&&Ke<=6&&(wt==0||wt==6)||2<=wt&&wt<=4&&2<=Ke&&Ke<=4?h[De+wt][Fe+Ke]=!0:h[De+wt][Fe+Ke]=!1)},w=function(){for(var De=0,Fe=0,wt=0;wt<8;wt+=1){y(!0,wt);var Ke=l.getLostPoint(f);(wt==0||De>Ke)&&(De=Ke,Fe=wt)}return Fe},d=function(){for(var De=8;De>wt&1)==1;h[Math.floor(wt/3)][wt%3+g-8-3]=Ke}for(var wt=0;wt<18;wt+=1){var Ke=!De&&(Fe>>wt&1)==1;h[wt%3+g-8-3][Math.floor(wt/3)]=Ke}},b=function(De,Fe){for(var wt=R<<3|Fe,Ke=l.getBCHTypeInfo(wt),ht=0;ht<15;ht+=1){var dr=!De&&(Ke>>ht&1)==1;ht<6?h[ht][8]=dr:ht<8?h[ht+1][8]=dr:h[g-15+ht][8]=dr}for(var ht=0;ht<15;ht+=1){var dr=!De&&(Ke>>ht&1)==1;ht<8?h[8][g-ht-1]=dr:ht<9?h[8][15-ht-1+1]=dr:h[8][15-ht-1]=dr}h[g-8][8]=!De},X=function(De,Fe){for(var wt=-1,Ke=g-1,ht=7,dr=0,ae=l.getMaskFunction(Fe),Ve=g-1;Ve>0;Ve-=2)for(Ve==6&&(Ve-=1);;){for(var Nt=0;Nt<2;Nt+=1)if(h[Ke][Ve-Nt]==null){var Ee=!1;dr>>ht&1)==1);var xe=ae(Ke,Ve-Nt);xe&&(Ee=!Ee),h[Ke][Ve-Nt]=Ee,ht-=1,ht==-1&&(dr+=1,ht=7)}if(Ke+=wt,Ke<0||g<=Ke){Ke-=wt,wt=-wt;break}}},we=function(De,Fe){for(var wt=0,Ke=0,ht=0,dr=new Array(Fe.length),ae=new Array(Fe.length),Ve=0;Ve=0?_t.getAt(Pt):0}}for(var Ut=0,xe=0;xeVe*8)throw"code length overflow. ("+ht.getLengthInBits()+">"+Ve*8+")";for(ht.getLengthInBits()+4<=Ve*8&&ht.put(0,4);ht.getLengthInBits()%8!=0;)ht.putBit(!1);for(;!(ht.getLengthInBits()>=Ve*8||(ht.put(ee,8),ht.getLengthInBits()>=Ve*8));)ht.put(V,8);return we(ht,Ke)};f.addData=function(De,Fe){Fe=Fe||"Byte";var wt=null;switch(Fe){case"Numeric":wt=T(De);break;case"Alphanumeric":wt=O(De);break;case"Byte":wt=A(De);break;case"Kanji":wt=M(De);break;default:throw"mode:"+Fe}u.push(wt),v=null},f.isDark=function(De,Fe){if(De<0||g<=De||Fe<0||g<=Fe)throw De+","+Fe;return h[De][Fe]},f.getModuleCount=function(){return g},f.make=function(){if(te<1){for(var De=1;De<40;De++){for(var Fe=m.getRSBlocks(De,R),wt=_(),Ke=0;Ke"u"?De*4:Fe;var wt="";wt+='";for(var ht=0;ht';wt+=""}return wt+="",wt+="
    ",wt},f.createSvgTag=function(De,Fe,wt,Ke){var ht={};typeof arguments[0]=="object"&&(ht=arguments[0],De=ht.cellSize,Fe=ht.margin,wt=ht.alt,Ke=ht.title),De=De||2,Fe=typeof Fe>"u"?De*4:Fe,wt=typeof wt=="string"?{text:wt}:wt||{},wt.text=wt.text||null,wt.id=wt.text?wt.id||"qrcode-description":null,Ke=typeof Ke=="string"?{text:Ke}:Ke||{},Ke.text=Ke.text||null,Ke.id=Ke.text?Ke.id||"qrcode-title":null;var dr=f.getModuleCount()*De+Fe*2,ae,Ve,Nt,Ee,xe="",ut;for(ut="l"+De+",0 0,"+De+" -"+De+",0 0,-"+De+"z ",xe+=''+je(Ke.text)+"":"",xe+=wt.text?''+je(wt.text)+"":"",xe+='',xe+='"u"?De*4:Fe;var wt=f.getModuleCount()*De+Fe*2,Ke=Fe,ht=wt-Fe;return Y(wt,wt,function(dr,ae){if(Ke<=dr&&dr"u"?De*4:Fe;var Ke=f.getModuleCount()*De+Fe*2,ht="";return ht+="",ht};var je=function(De){for(var Fe="",wt=0;wt":Fe+=">";break;case"&":Fe+="&";break;case'"':Fe+=""";break;default:Fe+=Ke;break}}return Fe},Vt=function(De){var Fe=1;De=typeof De>"u"?Fe*2:De;var wt=f.getModuleCount()*Fe+De*2,Ke=De,ht=wt-De,dr,ae,Ve,Nt,Ee,xe={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},ut={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},st="";for(dr=0;dr=ht?ut[Ee]:xe[Ee];st+=` -`}return wt%2&&De>0?st.substring(0,st.length-wt-1)+Array(wt+1).join("\u2580"):st.substring(0,st.length-1)};return f.createASCII=function(De,Fe){if(De=De||1,De<2)return Vt(Fe);De-=1,Fe=typeof Fe>"u"?De*2:Fe;var wt=f.getModuleCount()*De+Fe*2,Ke=Fe,ht=wt-Fe,dr,ae,Ve,Nt,Ee=Array(De+1).join("\u2588\u2588"),xe=Array(De+1).join(" "),ut="",st="";for(dr=0;dr>>8),R.push(v&255)):R.push(V)}}return R}};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 q=[[],[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]],Z=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,ee=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,V=1<<14|1<<12|1<<10|1<<4|1<<1,te={},R=function(h){for(var g=0;h!=0;)g+=1,h>>>=1;return g};return te.getBCHTypeInfo=function(h){for(var g=h<<10;R(g)-R(Z)>=0;)g^=Z<=0;)g^=ee<5&&(v+=3+y-5)}for(var u=0;u=256;)te-=255;return q[te]},V}();function p(q,Z){if(typeof q.length>"u")throw q.length+"/"+Z;var ee=function(){for(var te=0;te"u")throw"bad rs block @ typeNumber:"+te+"/errorCorrectionLevel:"+R;for(var g=h.length/3,v=[],u=0;u>>7-V%8&1)==1},ee.put=function(V,te){for(var R=0;R>>te-R-1&1)==1)},ee.getLengthInBits=function(){return Z},ee.putBit=function(V){var te=Math.floor(Z/8);q.length<=te&&q.push(0),V&&(q[te]|=128>>>Z%8),Z+=1},ee},T=function(q){var Z=a.MODE_NUMBER,ee=q,V={};V.getMode=function(){return Z},V.getLength=function(h){return ee.length},V.write=function(h){for(var g=ee,v=0;v+2>>8&255)*192+(v&255),R.put(v,13),g+=2}if(g>>8)},Z.writeBytes=function(ee,V,te){V=V||0,te=te||ee.length;for(var R=0;R0&&(ee+=","),ee+=q[V];return ee+="]",ee},Z},L=function(){var q=0,Z=0,ee=0,V="",te={},R=function(g){V+=String.fromCharCode(h(g&63))},h=function(g){if(!(g<0)){if(g<26)return 65+g;if(g<52)return 97+(g-26);if(g<62)return 48+(g-52);if(g==62)return 43;if(g==63)return 47}throw"n:"+g};return te.writeByte=function(g){for(q=q<<8|g&255,Z+=8,ee+=1;Z>=6;)R(q>>>Z-6),Z-=6},te.flush=function(){if(Z>0&&(R(q<<6-Z),q=0,Z=0),ee%3!=0)for(var g=3-ee%3,v=0;v=Z.length){if(te==0)return-1;throw"unexpected end of file./"+te}var g=Z.charAt(ee);if(ee+=1,g=="=")return te=0,-1;if(g.match(/^\s$/))continue;V=V<<6|h(g.charCodeAt(0)),te+=6}var v=V>>>te-8&255;return te-=8,v};var h=function(g){if(65<=g&&g<=90)return g-65;if(97<=g&&g<=122)return g-97+26;if(48<=g&&g<=57)return g-48+52;if(g==43)return 62;if(g==47)return 63;throw"c:"+g};return R},D=function(q,Z){var ee=q,V=Z,te=new Array(q*Z),R={};R.setPixel=function(u,f,y){te[f*ee+u]=y},R.write=function(u){u.writeString("GIF87a"),u.writeShort(ee),u.writeShort(V),u.writeByte(128),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(255),u.writeByte(255),u.writeByte(255),u.writeString(","),u.writeShort(0),u.writeShort(0),u.writeShort(ee),u.writeShort(V),u.writeByte(0);var f=2,y=g(f);u.writeByte(f);for(var S=0;y.length-S>255;)u.writeByte(255),u.writeBytes(y,S,255),S+=255;u.writeByte(y.length-S),u.writeBytes(y,S,y.length-S),u.writeByte(0),u.writeString(";")};var h=function(u){var f=u,y=0,S=0,w={};return w.write=function(d,I){if(d>>>I!=0)throw"length over";for(;y+I>=8;)f.writeByte(255&(d<>>=8-y,S=0,y=0;S=d<0&&f.writeByte(S)},w},g=function(u){for(var f=1<>6,128|c&63):c<55296||c>=57344?s.push(224|c>>12,128|c>>6&63,128|c&63):(l++,c=65536+((c&1023)<<10|o.charCodeAt(l)&1023),s.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return s}return a(n)}})(),function(n){e.exports=n()}(function(){return r})})(dq);const ISe=dq.exports;function hq(e){return navigator?.clipboard?navigator.clipboard.writeText(e):(PSe(e),Promise.resolve())}function PSe(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 vS=(e,t,r)=>{const n=t.trim().split(".").reduce((a,o)=>a?a[o]:void 0,e);return n!==void 0?n:r},OSe=(e,t,r=/{{(.*?)}}/g)=>e.replace(r,(n,a)=>vS(t,a,"")),BSe=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[r,n]=Qi(t),[a,o]=E8(e);return[(c,p,m)=>{const _=vS(a[r()],c,m||"");return typeof _=="function"?_(p):typeof _=="string"?OSe(_,p||{}):_},{add(c,p){o(c,m=>Object.assign(m||{},p))},locale:c=>c?n(c):r(),dict:c=>vS(a,c)}]},pq=$_({}),od=()=>mu(pq);const su=e=>{const[t]=od();return Di(()=>{var r;return t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString())})},USe=Ea("
    "),e6={translationKey:"common.copyLink",text:"Copy Link"},NSe={translationKey:"common.copied",text:"Copied!"},gq=e=>{let t,r,n;const[a,o]=Qi(!1),[s,l]=Qi(!1),[c,p]=Qi(!1),[m,_]=Qi(e6),[T,O]=Qi(bB);Ul(()=>o(s()||c())),Ul(()=>!a()&&_(e6)),Ul(()=>{const U=ISe(0,"L");U.addData(e.sourceUrl),U.make(),t.innerHTML=U.createSvgTag(4,0);const D=t.firstElementChild.clientWidth,Y=Math.round(fq/D*1e5)/1e5;if(n){const q=Math.ceil(mS/(Y*4))*4,Z=Vu(Math.ceil((D-q)/(2*4))*4);n.style.top=Z,n.style.left=Z,n.style.height=Vu(q),n.style.width=Vu(q),O(Math.round(bB/Y))}r.style.transform=`scale(${Y})`});let A=null;const M=()=>{hq(e.sourceUrl),_(NSe),A!=null&&clearTimeout(A),A=setTimeout(()=>_(e6),3e3)};return Wt(MSe,{get class(){return e.class},get children(){return[Wt(kSe,{ref(B){const L=r;typeof L=="function"?L(B):r=B},onMouseEnter:()=>p(!0),onMouseLeave:()=>setTimeout(()=>p(!1)),get children(){return[(()=>{const B=USe.cloneNode(!0),L=t;return typeof L=="function"?_w(L,B):t=B,B})(),Wt(_o,{get when(){return e.imageUrl},get children(){return Wt(RSe,{ref(B){const L=n;typeof L=="function"?L(B):n=B},get children(){return Wt(ASe,{get src(){return e.imageUrl},alt:"",get size(){return T()}})}})}})]}}),Wt(Y_,{onBeforeEnter:B=>{B.animate([{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:200})},onExit:(B,L)=>{B.animate([{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:200}).finished.then(()=>{L()})},get children(){return Wt(_o,{get when(){return a()&&!e.disableCopy},get children(){return Wt(TSe,{onClick:M,onMouseEnter:()=>a()&&l(!0),onMouseLeave:()=>setTimeout(()=>l(!1)),get children(){return Wt(su,{get translationKey(){return m().translationKey},get children(){return m().text}})}})}})}})]}})},LSe=kn.div` - font-style: normal; - font-weight: ${e=>e.fontWeight}; - font-size: ${e=>e.fontSize}; - line-height: ${e=>e.lineHeight}; - - color: ${e=>e.color}; -`,vu=e=>{const t=bl(),[r]=od();let n;const a=()=>e.color||t.colors.text.primary,o=qu({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return Ul(()=>{!n||o.cursor!=="unset"&&getComputedStyle(n).cursor!=="pointer"&&(n.style.cursor="default")}),Wt(LSe,{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=n;typeof l=="function"?l(s):n=s},"data-tc-text":"true",get children(){var s;return Di(()=>!!o.translationKey)()?r(o.translationKey,o.translationValues,(s=o.children)==null?void 0:s.toString()):o.children}})},DSe=kn.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; - - ${G_} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${qc("mobile")} { - padding: 8px 4px; - height: 124px; - width: 82px; - } - - ${V_} { - &:active { - transform: scale(0.92); - } - } -`,$Se=kn(k8)` - width: 48px; - height: 48px; - border-radius: 12px; - - margin-bottom: 8px; - - ${qc("mobile")} { - width: 64px; - height: 64px; - border-radius: 16px; - } -`,FSe=kn(vu)` - font-weight: 590; - max-width: 76px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -`,mq=e=>Wt(DSe,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[Wt($Se,{get src(){return e.iconUrl},alt:""}),Wt(FSe,{get children(){return e.name}})]}}),jSe=kn.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; -`,X_=e=>{const[t]=od();return Wt(jSe,{get class(){return e.class},"data-tc-h1":"true",get children(){var r;return Di(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},WSe=kn.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; -`,Q_=e=>{const[t]=od();return Wt(WSe,{get class(){return e.class},"data-tc-h2":"true",get children(){var r;return Di(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},zSe=kn.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; -`,HSe=e=>{const[t]=od();return Wt(zSe,{"data-tc-h3":"true",get children(){var r;return Di(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(r=e.children)==null?void 0:r.toString()):e.children}})},qSe=Ea(''),KSe=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.secondary;return(()=>{const n=qSe.cloneNode(!0),a=n.firstChild;return ma(()=>qo(a,"stroke",r())),n})()},VSe=Ea(''),GSe=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const n=VSe.cloneNode(!0),a=n.firstChild;return ma(()=>qo(a,"fill",r())),n})()},YSe=Ea(''),XSe=Ea(''),vq=e=>{const t=bl(),r=()=>e.size||"s",n=()=>e.fill||t.colors.icon.success;return Di((()=>{const a=Di(()=>r()==="s");return()=>a()?(()=>{const o=YSe.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return ma(c=>{const p=e.class,m=n(),_=t.colors.constant.white;return p!==c._v$&&qo(o,"class",c._v$=p),m!==c._v$2&&qo(s,"fill",c._v$2=m),_!==c._v$3&&qo(l,"fill",c._v$3=_),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=XSe.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return ma(c=>{const p=e.class,m=n(),_=t.colors.constant.white;return p!==c._v$4&&qo(o,"class",c._v$4=p),m!==c._v$5&&qo(s,"fill",c._v$5=m),_!==c._v$6&&qo(l,"fill",c._v$6=_),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()})())},QSe=Ea(''),ZSe=Ea(''),yq=e=>{const t=bl(),r=()=>e.size||"s",n=()=>e.fill||t.colors.icon.error;return Di((()=>{const a=Di(()=>r()==="s");return()=>a()?(()=>{const o=QSe.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return ma(c=>{const p=e.class,m=n(),_=t.colors.constant.white;return p!==c._v$&&qo(o,"class",c._v$=p),m!==c._v$2&&qo(s,"fill",c._v$2=m),_!==c._v$3&&qo(l,"fill",c._v$3=_),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=ZSe.cloneNode(!0),s=o.firstChild,l=s.nextSibling;return ma(c=>{const p=e.class,m=n(),_=t.colors.constant.white;return p!==c._v$4&&qo(o,"class",c._v$4=p),m!==c._v$5&&qo(s,"fill",c._v$5=m),_!==c._v$6&&qo(l,"fill",c._v$6=_),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()})())},JSe=Ea(''),eEe=Ea(''),Z_=e=>{const t=bl(),r=()=>e.size||"s",n=()=>e.fill||t.colors.icon.tertiary,a=w4e` - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - `,o=Lc` - animation: ${a} 1s linear infinite; - `;return Di((()=>{const s=Di(()=>r()==="s");return()=>s()?(()=>{const l=JSe.cloneNode(!0),c=l.firstChild;return ma(p=>{const m=sS(o,e.class),_=n();return m!==p._v$&&qo(l,"class",p._v$=m),_!==p._v$2&&qo(c,"fill",p._v$2=_),p},{_v$:void 0,_v$2:void 0}),l})():(()=>{const l=eEe.cloneNode(!0),c=l.firstChild;return ma(p=>{const m=sS(o,e.class),_=n();return m!==p._v$3&&qo(l,"class",p._v$3=m),_!==p._v$4&&qo(c,"stroke",p._v$4=_),p},{_v$3:void 0,_v$4:void 0}),l})()})())},B0=$_(),tEe=Ea(''),rEe=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const n=tEe.cloneNode(!0),a=n.firstChild;return ma(()=>qo(a,"fill",r())),n})()},nEe=Ea(''),iEe=e=>{const t=bl(),r=()=>e.fill||t.colors.icon.primary;return(()=>{const n=nEe.cloneNode(!0),a=n.firstChild,o=a.nextSibling;return ma(s=>{const l=r(),c=r();return l!==s._v$&&qo(a,"fill",s._v$=l),c!==s._v$2&&qo(o,"fill",s._v$2=c),s},{_v$:void 0,_v$2:void 0}),n})()},oEe={m:"8px",s:"4px",none:"0"},aEe={m:"16px",s:"8px",none:"0"},sEe=kn.div` - width: 256px; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>aEe[e.theme.borderRadius]}; - - background-color: ${e=>e.theme.colors.background.primary} - - color: ${e=>e.theme.colors.text.primary} -`,lEe=kn.ul` - background-color: ${e=>e.theme.colors.background.primary}; - padding: 8px; -`,xB=kn.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=>oEe[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); - } -`,_B=Ea("
  • "),t6=e=>Wt(vu,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),uEe=e=>{const t=mu(B0),[r,n]=Qi(!1),a=()=>Sl(void 0,null,function*(){const s=v8(t.account.address,t.account.chain===lv.TESTNET);yield hq(s),n(!0),setTimeout(()=>n(!1),1e3)}),o=()=>{t.disconnect(),e.onClose()};return Wt(sEe,{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 Wt(lEe,{get children(){return[(()=>{const s=_B.cloneNode(!0);return qa(s,Wt(xB,{onClick:()=>a(),get children(){return[Wt(rEe,{}),Wt(_o,{get when(){return!r()},get children(){return Wt(t6,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),Wt(_o,{get when(){return r()},get children(){return Wt(t6,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),s})(),(()=>{const s=_B.cloneNode(!0);return qa(s,Wt(xB,{onClick:()=>o(),get children(){return[Wt(iEe,{}),Wt(t6,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),s})()]}})}})},cEe={m:"16px",s:"8px",none:"0"},fEe=kn.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=>cEe[e.theme.borderRadius]}; -`,dEe=kn.div` - width: 192px; -`,hEe=kn(vu)` - margin-top: 4px; - color: ${e=>e.theme.colors.text.secondary}; -`,A8=e=>{const t=Fy(e);return Wt(fEe,qu({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[Wt(dEe,{get children(){return[Wt(HSe,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),Wt(_o,{get when(){return e.text},get children(){return Wt(hEe,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),Di(()=>e.icon)]}}))},pEe=kn(Z_)` - align-self: center; -`,gEe=e=>{var t;const r=mu(B0),[n]=od(),a=((t=r.wallet)==null?void 0:t.name)||n("common.yourWallet",{},"your wallet");return Wt(A8,{header:{translationKey:"notifications.confirm.header",translationValues:{name:a}},get class(){return e.class},get icon(){return Wt(pEe,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},mEe=kn(yq)` - margin-top: 2px; -`,vEe=e=>Wt(A8,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return Wt(mEe,{})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),yEe=kn(vq)` - margin-top: 2px; -`,bEe=e=>Wt(A8,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return Wt(yEe,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),r6=Lc` - transform: translateY(-8px); - margin-bottom: 12px; -`,wEe=Ea('
    '),xEe=e=>{const t=[],[r,n]=Qi([]);let a=-1;const o=4500;return Ul(N6e(Yh,s=>{if(s&&s.showNotification){a++;const l=a;n(c=>c.filter(p=>p.action!=="confirm-transaction").concat({id:l,action:s.name})),t.push(setTimeout(()=>n(c=>c.filter(p=>p.id!==l)),o))}})),Nc(()=>{t.forEach(clearTimeout)}),(()=>{const s=wEe.cloneNode(!0);return qa(s,Wt(aSe,{onBeforeEnter:l=>{l.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(l,c)=>{l.animate([{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(c)},get children(){return Wt(z_,{get each(){return r()},children:l=>Wt(H_,{get children(){return[Wt(Ku,{get when(){return l.action==="transaction-sent"},get children(){return Wt(bEe,{class:r6})}}),Wt(Ku,{get when(){return l.action==="transaction-canceled"},get children(){return Wt(vEe,{class:r6})}}),Wt(Ku,{get when(){return l.action==="confirm-transaction"},get children(){return Wt(gEe,{class:r6})}})]}})})}})),ma(()=>w8(s,e.class)),s})()},bq=kn(ic)` - background-color: ${e=>e.theme.colors.connectButton.background}; - color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${K_(e.theme.colors.constant.black,.16)}`}; - padding: 8px 16px 8px 12px; - - display: flex; - align-items: center; - gap: 4px; - height: 40px; -`,_Ee=kn(bq)` - padding: 12px 16px; - min-width: 148px; - justify-content: center; - background-color: ${e=>e.theme.colors.background.primary}; -`,SEe=kn(ic)` - 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 ${K_(e.theme.colors.constant.black,.16)}`}; - - display: flex; - align-items: center; - justify-content: center; -`,EEe=kn(Z_)` - height: 18px; - width: 18px; -`,CEe=kn.div` - width: fit-content; - display: flex; - flex-direction: column; - align-items: flex-end; -`,MEe=kn(uEe)` - box-sizing: border-box; - overflow: hidden; - margin-top: 12px; -`,kEe=kn(xEe)` - > div:first-child { - margin-top: 20px; - } -`;function wq(e){return e.split("-")[0]}function REe(e){return e.split("-")[1]}function AEe(e){return["top","bottom"].includes(wq(e))?"x":"y"}function TEe(e){return e==="y"?"height":"width"}function SB(e,t,r){let{reference:n,floating:a}=e;const o=n.x+n.width/2-a.width/2,s=n.y+n.height/2-a.height/2,l=AEe(t),c=TEe(l),p=n[c]/2-a[c]/2,m=wq(t),_=l==="x";let T;switch(m){case"top":T={x:o,y:n.y-a.height};break;case"bottom":T={x:o,y:n.y+n.height};break;case"right":T={x:n.x+n.width,y:s};break;case"left":T={x:n.x-a.width,y:s};break;default:T={x:n.x,y:n.y}}switch(REe(t)){case"start":T[l]-=p*(r&&_?-1:1);break;case"end":T[l]+=p*(r&&_?-1:1);break}return T}const IEe=(e,t,r)=>Sl(void 0,null,function*(){const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:s}=r,l=o.filter(Boolean),c=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(M=>{let{name:B}=M;return B==="autoPlacement"||B==="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 p=yield s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:_}=SB(p,n,c),T=n,O={},A=0;for(let M=0;M50&&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(" ")),q&&A<=50){A++,typeof q=="object"&&(q.placement&&(T=q.placement),q.rects&&(p=q.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:a}):q.rects),{x:m,y:_}=SB(p,T,c)),M=-1;continue}}return{x:m,y:_,placement:T,strategy:a,middlewareData:O}});function EB(e){return jf(ia({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Kc(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qu(e){return Kc(e).getComputedStyle(e)}function zf(e){return _q(e)?(e.nodeName||"").toLowerCase():""}let F1;function xq(){if(F1)return F1;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(F1=e.brands.map(t=>t.brand+"/"+t.version).join(" "),F1):navigator.userAgent}function Zu(e){return e instanceof Kc(e).HTMLElement}function Nl(e){return e instanceof Kc(e).Element}function _q(e){return e instanceof Kc(e).Node}function CB(e){if(typeof ShadowRoot>"u")return!1;const t=Kc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function J_(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Qu(e);return/auto|scroll|overlay|hidden/.test(t+n+r)&&!["inline","contents"].includes(a)}function PEe(e){return["table","td","th"].includes(zf(e))}function T8(e){const t=/firefox/i.test(xq()),r=Qu(e),n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||(n?n!=="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 Sq(){return!/^((?!chrome|android).)*safari/i.test(xq())}function I8(e){return["html","body","#document"].includes(zf(e))}const MB=Math.min,wm=Math.max,kB=Math.round,yS={x:1,y:1};function pv(e){const t=!Nl(e)&&e.contextElement?e.contextElement:Nl(e)?e:null;if(!t)return yS;const r=t.getBoundingClientRect(),n=Qu(t);if(n.boxSizing!=="border-box")return Zu(t)?{x:t.offsetWidth>0&&kB(r.width)/t.offsetWidth||1,y:t.offsetHeight>0&&kB(r.height)/t.offsetHeight||1}:yS;let a=r.width/parseFloat(n.width),o=r.height/parseFloat(n.height);return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}function Hf(e,t,r,n){var a,o,s,l;t===void 0&&(t=!1),r===void 0&&(r=!1);const c=e.getBoundingClientRect();let p=yS;t&&(n?Nl(n)&&(p=pv(n)):p=pv(e));const m=Nl(e)?Kc(e):window,_=!Sq()&&r,T=(c.left+(_&&(a=(o=m.visualViewport)==null?void 0:o.offsetLeft)!=null?a:0))/p.x,O=(c.top+(_&&(s=(l=m.visualViewport)==null?void 0:l.offsetTop)!=null?s:0))/p.y,A=c.width/p.x,M=c.height/p.y;return{width:A,height:M,top:O,right:T+A,bottom:O+M,left:T,x:T,y:O}}function ad(e){return((_q(e)?e.ownerDocument:e.document)||window.document).documentElement}function e3(e){return Nl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Eq(e){return Hf(ad(e)).left+e3(e).scrollLeft}function OEe(e,t,r){const n=Zu(t),a=ad(t),o=Hf(e,!0,r==="fixed",t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&r!=="fixed")if((zf(t)!=="body"||J_(a))&&(s=e3(t)),Zu(t)){const c=Hf(t,!0);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else a&&(l.x=Eq(a));return{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function gv(e){if(zf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(CB(e)?e.host:null)||ad(e);return CB(t)?t.host:t}function RB(e){return!Zu(e)||Qu(e).position==="fixed"?null:e.offsetParent}function BEe(e){let t=gv(e);for(;Zu(t)&&!I8(t);){if(T8(t))return t;t=gv(t)}return null}function AB(e){const t=Kc(e);let r=RB(e);for(;r&&PEe(r)&&Qu(r).position==="static";)r=RB(r);return r&&(zf(r)==="html"||zf(r)==="body"&&Qu(r).position==="static"&&!T8(r))?t:r||BEe(e)||t}function UEe(e){if(Zu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Hf(e);return{width:t.width,height:t.height}}function NEe(e){let{rect:t,offsetParent:r,strategy:n}=e;const a=Zu(r),o=ad(r);if(r===o)return t;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const c={x:0,y:0};if((a||!a&&n!=="fixed")&&((zf(r)!=="body"||J_(o))&&(s=e3(r)),Zu(r))){const p=Hf(r);l=pv(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-s.scrollLeft*l.x+c.x,y:t.y*l.y-s.scrollTop*l.y+c.y}}function LEe(e,t){const r=Kc(e),n=ad(e),a=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,l=0,c=0;if(a){o=a.width,s=a.height;const p=Sq();(p||!p&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:s,x:l,y:c}}function DEe(e){var t;const r=ad(e),n=e3(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=wm(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=wm(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let l=-n.scrollLeft+Eq(e);const c=-n.scrollTop;return Qu(a||r).direction==="rtl"&&(l+=wm(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Cq(e){const t=gv(e);return I8(t)?e.ownerDocument.body:Zu(t)&&J_(t)?t:Cq(t)}function xm(e,t){var r;t===void 0&&(t=[]);const n=Cq(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),o=Kc(n);return a?t.concat(o,o.visualViewport||[],J_(n)?n:[]):t.concat(n,xm(n))}function $Ee(e,t){const r=Hf(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Zu(e)?pv(e):{x:1,y:1},s=e.clientWidth*o.x,l=e.clientHeight*o.y,c=a*o.x,p=n*o.y;return{top:p,left:c,right:c+s,bottom:p+l,x:c,y:p,width:s,height:l}}function TB(e,t,r){return t==="viewport"?EB(LEe(e,r)):Nl(t)?$Ee(t,r):EB(DEe(ad(e)))}function FEe(e,t){const r=t.get(e);if(r)return r;let n=xm(e).filter(l=>Nl(l)&&zf(l)!=="body"),a=null;const o=Qu(e).position==="fixed";let s=o?gv(e):e;for(;Nl(s)&&!I8(s);){const l=Qu(s),c=T8(s);(o?!c&&!a:!c&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position))?n=n.filter(m=>m!==s):a=l,s=gv(s)}return t.set(e,n),n}function jEe(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const s=[...r==="clippingAncestors"?FEe(t,this._c):[].concat(r),n],l=s[0],c=s.reduce((p,m)=>{const _=TB(t,m,a);return p.top=wm(_.top,p.top),p.right=MB(_.right,p.right),p.bottom=MB(_.bottom,p.bottom),p.left=wm(_.left,p.left),p},TB(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}const WEe={getClippingRect:jEe,convertOffsetParentRelativeRectToViewportRelativeRect:NEe,isElement:Nl,getDimensions:UEe,getOffsetParent:AB,getDocumentElement:ad,getScale:pv,getElementRects(e){return Sl(this,null,function*(){let{reference:t,floating:r,strategy:n}=e;const a=this.getOffsetParent||AB,o=this.getDimensions;return{reference:OEe(t,yield a(r),n),floating:ia({x:0,y:0},yield o(r))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Qu(e).direction==="rtl"};function zEe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:l=!1}=n,c=a&&!l,p=c||o?[...Nl(e)?xm(e):e.contextElement?xm(e.contextElement):[],...xm(t)]:[];p.forEach(A=>{c&&A.addEventListener("scroll",r,{passive:!0}),o&&A.addEventListener("resize",r)});let m=null;if(s){let A=!0;m=new ResizeObserver(()=>{A||r(),A=!1}),Nl(e)&&!l&&m.observe(e),!Nl(e)&&e.contextElement&&!l&&m.observe(e.contextElement),m.observe(t)}let _,T=l?Hf(e):null;l&&O();function O(){const A=Hf(e);T&&(A.x!==T.x||A.y!==T.y||A.width!==T.width||A.height!==T.height)&&r(),T=A,_=requestAnimationFrame(O)}return r(),()=>{var A;p.forEach(M=>{c&&M.removeEventListener("scroll",r),o&&M.removeEventListener("resize",r)}),(A=m)==null||A.disconnect(),m=null,l&&cancelAnimationFrame(_)}}const HEe=(e,t,r)=>{const n=new Map,a=ia({platform:WEe},r),o=jf(ia({},a.platform),{_c:n});return IEe(e,t,jf(ia({},a),{platform:o}))};function qEe(e,t,r){let n=()=>{var _;return(_=r?.placement)!=null?_:"bottom"},a=()=>{var _;return(_=r?.strategy)!=null?_:"absolute"},[o,s]=Qi({x:null,y:null,placement:n(),strategy:a(),middlewareData:{}}),[l,c]=Qi();Ul(()=>{let _=l();if(_)throw _.value});let p=Di(()=>(e(),t(),{}));function m(){let _=e(),T=t();if(_&&T){let O=p();HEe(_,T,{middleware:r?.middleware,placement:n(),strategy:a()}).then(A=>{O===p()&&s(A)},A=>{c(A)})}}return Ul(()=>{let _=e(),T=t();if(r?.middleware,n(),a(),_&&T)if(r!=null&&r.whileElementsMounted){let O=r.whileElementsMounted(_,T,m);O&&Nc(O)}else m()}),{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:m}}const KEe=Ea(''),VEe=()=>{const e=bl(),t=mu(q_),r=mu(B0),[n,a]=Qi(!1),[o,s]=Qi(t.account),[l,c]=Qi(!0);let p;const[m,_]=Qi(),[T,O]=Qi(),A=qEe(T,m,{whileElementsMounted:zEe,placement:"bottom-end"}),M=()=>{const U=o();if(U){const D=v8(U.address,U.chain===lv.TESTNET);return D.slice(0,4)+"\u2026"+D.slice(-4)}return""};r.connectionRestored.then(()=>c(!1));const B=t.onStatusChange(U=>{if(!U){a(!1),s(null);return}s(U.account)}),L=U=>{if(!o()||!n())return;const D=T().contains(U.target),Y=p.contains(U.target);!D&&!Y&&a(!1)};return L6e(()=>{document.body.addEventListener("click",L)}),Nc(()=>{document.body.removeEventListener("click",L),B()}),Wt(x8,{component:vc,get children(){return[Wt(_o,{get when(){return l()},get children(){return Wt(SEe,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return Wt(EEe,{})}})}}),Wt(_o,{get when(){return!l()},get children(){return[Wt(_o,{get when(){return!o()},get children(){return Wt(bq,{onClick:()=>r.connectWallet(),"data-tc-connect-button":"true",get children(){return[Wt(GSe,{get fill(){return e.colors.connectButton.foreground}}),Wt(vu,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),Wt(_o,{get when(){return o()},get children(){return Wt(CEe,{get children(){return[Wt(_Ee,{onClick:()=>a(U=>!U),ref:O,"data-tc-dropdown-button":"true",get children(){return[Wt(vu,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return M()}}),Wt(lq,{direction:"bottom"})]}}),Wt(QH,{get children(){const U=os(()=>document.importNode(KEe,!0));return _w(_,U),U.style.setProperty("z-index","999"),U._$owner=D6e(),qa(U,Wt(Y_,{onBeforeEnter:D=>{D.animate([{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(D,Y)=>{D.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(Y)},get children(){return Wt(_o,{get when(){return n()},get children(){return Wt(MEe,{get hidden(){return!n()},onClose:()=>a(!1),ref(D){const Y=p;typeof Y=="function"?Y(D):p=D}})}})}}),null),qa(U,Wt(kEe,{}),null),ma(D=>{var Y,q;const Z=A.strategy,ee=`${(Y=A.y)!=null?Y:0}px`,V=`${(q=A.x)!=null?q:0}px`;return Z!==D._v$&&U.style.setProperty("position",D._v$=Z),ee!==D._v$2&&U.style.setProperty("top",D._v$2=ee),V!==D._v$3&&U.style.setProperty("left",D._v$3=V),D},{_v$:void 0,_v$2:void 0,_v$3:void 0}),U}})]}})}})]}})]}})},GEe={m:"16px",s:"8px",none:"0"},YEe=kn.div` - ${qc("mobile")} { - padding: 10px 16px 0 16px; - } -`,XEe=kn(X_)` - max-width: 320px; - margin: 0 auto 6px; -`,QEe=kn(uq)` - position: absolute; - top: 16px; - left: 16px; -`,ZEe=kn(gq)` - margin-bottom: 16px; -`,JEe=kn.div` - display: flex; - gap: 16px; - height: 56px; - margin-bottom: 24px; -`,IB=kn(ic)` - padding: 0 16px; - height: 56px; - font-size: 16px; - line-height: 20px; - width: 100%; - border-radius: ${e=>GEe[e.theme.borderRadius]}; -`,eCe=kn.div` - display: flex; - justify-content: space-between; - align-items: center; -`,tCe=kn(vu)` - padding-left: 8px; - color: ${e=>e.theme.colors.text.secondary}; - font-size: 16px; -`,[ts,j1]=E8({buttonRootId:null,language:"en",returnStrategy:"back",walletsListConfiguration:{}}),rCe=kn.a` - display: block; - text-decoration: unset; -`,t3=e=>Wt(rCe,qu({get href(){return e.href},get target(){return e.blank?"_blank":"_self"}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),nCe=e=>{const t=mu(q_),r=Di(()=>t.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest));return Wt(YEe,{"data-tc-wallet-qr-modal-desktop":"true",get children(){return[Wt(QEe,{icon:"arrow",onClick:()=>e.onBackClick()}),Wt(XEe,{translationKey:"walletModal.qrCodeModal.connectWith",get translationValues(){return{name:e.wallet.name}},get children(){return["Connect with ",Di(()=>e.wallet.name)]}}),Wt(Q_,{translationKey:"walletModal.qrCodeModal.scan",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan QR code with your phone\u2019s or ",Di(()=>e.wallet.name),"\u2019s camera."]}}),Wt(ZEe,{disableCopy:!1,get sourceUrl(){return r()},get imageUrl(){return e.wallet.imageUrl}}),Wt(JEe,{get children(){return[Wt(IB,{scale:"s",onClick:()=>{au(jf(ia({},e.wallet),{openMethod:"universal-link"})),R8(hv(r(),ts.returnStrategy))},get children(){return Wt(su,{translationKey:"walletModal.qrCodeModal.openWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Open ",Di(()=>e.wallet.name)]}})}}),Wt(_o,{get when(){return D_(e.wallet)},get children(){return Wt(IB,{scale:"s",onClick:()=>{au(e.wallet),t.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest)},get children(){return Wt(su,{translationKey:"common.openExtension",children:"Open Extension"})}})}})]}}),Wt(eCe,{get children(){return[Wt(tCe,{translationKey:"walletModal.qrCodeModal.dontHave",get translationValues(){return{name:e.wallet.name}},get children(){return["Don't have ",Di(()=>e.wallet.name),"?"]}}),Wt(t3,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return Wt(ic,{get children(){return Wt(su,{translationKey:"common.get",children:"GET"})}})}})]}})]}})},iCe=kn(cq)` - padding-left: 24px; - padding-right: 24px; - - ${qc("mobile")} { - padding-left: 0; - padding-right: 0; - - min-height: 364px; - } -`,oCe=kn(X_)` - margin-top: 12px; - - ${qc("mobile")} { - padding: 0 10px; - } -`,aCe=kn.div` - margin: 30px 0; - width: 100%; - display: flex; - justify-content: center; - - ${qc("mobile")} { - height: 160px; - align-items: center; - } -`,PB=kn(vu)` - min-width: 84px; - text-align: center; - font-weight: 590; -`,sCe=kn(ESe)` - margin: 0 auto 22px; -`;function lCe(e){return[...new Set(e)]}function uCe(e,t,r){return t.map(n=>{const a=r.find(o=>o[e]===n[e]);return r=r.filter(o=>o[e]!==n[e]),a===void 0?n:a}).concat(r)}function cCe(e){return"jsBridgeKey"in e?jf(ia({},e),{injected:sh.isWalletInjected(e.jsBridgeKey),embedded:sh.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Mq(e,t){var r;return t&&(r=t.includeWallets)!=null&&r.length&&(e=uCe("name",e,t.includeWallets.map(cCe))),e}const[OB,fCe]=Qi(dp("mobile"));sq()&&window.addEventListener("resize",()=>fCe(dp("mobile")));const dCe=kn.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; -`,hCe=kn.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; - - ${G_} { - &:hover { - transform: scale(1.04); - } - } - - &:active { - transform: scale(0.96); - } - - ${V_} { - &:active { - transform: scale(0.92); - } - } -`,pCe=kn.div` - width: 1px; - margin: 0 10px; - height: 24px; - position: relative; - top: 30px; - - background-color: ${e=>e.theme.colors.icon.tertiary}; -`,gCe=kn.div` - width: 64px; - height: 64px; - border-radius: 16px; - display: flex; - align-items: center; - justify-content: center; - - background-color: ${e=>K_(e.theme.colors.accent,.12)}; - color: ${e=>e.theme.colors.accent}; - - margin-bottom: 8px; -`,mCe=kn(Q_)` - margin-bottom: 24px; - padding: 0 24px; - min-height: 44px; -`,vCe=kn(ic)` - display: block; - margin: 0 auto; -`,P8={LEARN_MORE:"https://ton.org/wallets"},yCe=Ea('
    '),bCe=Ea("
  • "),wCe=e=>{const t=ts.connector,r=bl(),n=o=>{if(!nSe())return e.onSelect(o);if("universalLink"in o){au(jf(ia({},o),{openMethod:"universal-link"}));const s=t.connect({universalLink:o.universalLink,bridgeUrl:o.bridgeUrl},e.additionalRequest);dv(hv(s,ts.returnStrategy));return}R8(o.aboutUrl)},a=()=>{const o=t.connect(e.walletsList.filter(m8).map(s=>({bridgeUrl:s.bridgeUrl,universalLink:s.universalLink})),e.additionalRequest);au({openMethod:"universal-link"}),dv(hv(o,ts.returnStrategy))};return(()=>{const o=yCe.cloneNode(!0);return qa(o,Wt(X_,{translationKey:"walletModal.mobileSelectWalletModal.connectWallet",children:"Connect a wallet"}),null),qa(o,Wt(mCe,{translationKey:"walletModal.mobileSelectWalletModal.selectWallet",children:"Select your wallet from the options to get started."}),null),qa(o,Wt(dCe,{get children(){return[Wt(hCe,{onClick:a,get children(){return[Wt(gCe,{get children(){return Wt(KSe,{get fill(){return r.colors.accent}})}}),Wt(vu,{fontWeight:590,translationKey:"walletModal.mobileSelectWalletModal.installedWallet",children:"Installed wallet"})]}}),Wt(pCe,{children:"\xA0"}),Wt(z_,{get each(){return e.walletsList.filter(s=>"bridgeUrl"in s)},children:s=>(()=>{const l=bCe.cloneNode(!0);return qa(l,Wt(mq,{get iconUrl(){return s.imageUrl},get name(){return s.name},onClick:()=>n(s)})),l})()})]}}),null),qa(o,Wt(t3,{get href(){return P8.LEARN_MORE},blank:!0,get children(){return Wt(vCe,{get children(){return Wt(su,{translationKey:"common.learnMore",children:"Learn more"})}})}}),null),o})()},kq={m:"16px",s:"8px",none:"0"},xCe={m:"8px",s:"4px",none:"0"},_Ce=kn.div` - display: flex; - flex-direction: column; - align-items: center; -`,SCe=kn(Q_)` - max-width: 320px; - margin-bottom: 24px; -`,ECe=kn(gq)` - margin-bottom: 16px; -`,CCe=kn.div` - display: flex; - gap: 16px; - width: 100%; -`,BB=kn(ic)` - position: relative; - font-size: 16px; - line-height: 20px; - width: 100%; - padding: 0 16px; - height: 56px; - border-radius: ${e=>kq[e.theme.borderRadius]}; - - &:hover { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } - - &:active { - ${e=>e.disableEventsAnimation?"transform: unset;":""} - } -`,MCe=kn.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=>kq[e.theme.borderRadius]}; - box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); -`,kCe=kn.li` - padding: 8px; - - display: flex; - align-items: center; - gap: 8px; - - cursor: pointer; - border-radius: ${e=>xCe[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); - } -`,RCe=kn(k8)` - width: 24px; - height: 24px; - - border-radius: 6px; -`,ACe=kn.div` - margin-top: 23px; - margin-bottom: 1px; - width: 100%; - display: flex; - justify-content: center; - align-items: center; -`;kn(vu)` - color: ${e=>e.theme.colors.text.secondary}; - font-size: 16px; -`;const TCe=e=>{const[t,r]=Qi(!1),n=ts.connector,a=e.walletsList.filter(m8).map(m=>({bridgeUrl:m.bridgeUrl,universalLink:m.universalLink})),o=e.walletsList.filter(D_);au({openMethod:"qrcode"});const s=Di(()=>n.connect(a,e.additionalRequest)),l=()=>{let m=!1;function _(){m=!0,au({openMethod:"universal-link"}),window.removeEventListener("blur",_)}window.addEventListener("blur",_),dv(hv(s(),ts.returnStrategy)),setTimeout(()=>{m||e.openWalletFallback(),window.removeEventListener("blur",_)},200)},c=m=>{if(m.stopPropagation(),o.length===1){const _=o[0];au(_),n.connect({jsBridgeKey:_.jsBridgeKey},e.additionalRequest);return}r(_=>!_)},p=m=>{au(m),n.connect({jsBridgeKey:m.jsBridgeKey},e.additionalRequest)};return Wt(_Ce,{onClick:()=>r(!1),"data-tc-universal-qr-desktop":"true",get children(){return[Wt(SCe,{translationKey:"walletModal.universalQRModal.scanQR",children:"Scan QR code with a TON Connect compatible wallet."}),Wt(ECe,{get sourceUrl(){return s()},get disableCopy(){return t()}}),Wt(CCe,{get children(){return[Wt(BB,{onClick:l,scale:"s",get children(){return[Wt(_o,{get when(){return o.length},get children(){return Wt(su,{translationKey:"walletModal.universalQRModal.openWallet",children:"Open Wallet"})}}),Wt(_o,{get when(){return!o.length},get children(){return Wt(su,{translationKey:"walletModal.universalQRModal.openInstalledWallet",children:"Open Installed Wallet"})}})]}}),Wt(_o,{get when(){return o.length},get children(){return Wt(BB,{onClick:c,get disableEventsAnimation(){return t()},scale:"s",get children(){return[Wt(Y_,{onBeforeEnter:m=>{m.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-16px)"}],{duration:150})},onExit:(m,_)=>{m.animate([{opacity:1,transform:"translateY(-16px)"},{opacity:0,transform:"translateY(0)"}],{duration:150}).finished.then(_)},get children(){return Wt(_o,{get when(){return t()},get children(){return Wt(MCe,{get children(){return Wt(z_,{each:o,children:m=>Wt(kCe,{onClick:()=>p(m),get children(){return[Wt(RCe,{get src(){return m.imageUrl},alt:""}),Wt(vu,{fontWeight:590,get children(){return m.name}})]}})})}})}})}}),Wt(su,{translationKey:"common.openExtension",children:"Open Extension"})]}})}})]}}),Wt(_o,{get when(){return!o.length},get children(){return Wt(ACe,{get children(){return Wt(t3,{get href(){return P8.LEARN_MORE},blank:!0,get children(){return Wt(ic,{appearance:"flat",class:Lc` - font-size: 15px; - `,get children(){return Wt(su,{translationKey:"common.learnMore",children:"Learn more"})}})}})}})}})]}})},ICe=kn.div` - display: flex; - flex-direction: column; - align-items: center; -`,PCe=kn(Q_)` - margin-bottom: 26px; -`,OCe=kn.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; - } -`,BCe=kn(ic)` - display: block; - margin: 0 auto 1px; - font-size: 15px; -`,UCe=Ea("
  • "),NCe=e=>Wt(ICe,{"data-tc-select-wallet-desktop":"true",get children(){return[Wt(PCe,{translationKey:"walletModal.desktopSelectWalletModal.selectWallet",children:"Choose your preferred wallet from the options to get started."}),Wt(OCe,{get children(){return Wt(z_,{get each(){return e.walletsList},children:t=>(()=>{const r=UCe.cloneNode(!0);return qa(r,Wt(mq,{get iconUrl(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),r})()})}}),Wt(t3,{get href(){return P8.LEARN_MORE},blank:!0,get children(){return Wt(BCe,{appearance:"flat",get children(){return Wt(su,{translationKey:"common.learnMore",children:"Learn more"})}})}})]}}),LCe=Ea('
    '),DCe=()=>{const{locale:e}=od()[1];Ul(()=>e(ts.language));const t=mu(q_),r=mu(B0),[n]=U6e(()=>r.getWallets()),[a,o]=Qi(null),[s,l]=Qi(0),c=Di(()=>{if(n.state!=="ready")return null;let A=Mq(n(),ts.walletsListConfiguration);const M=ts.preferredWalletName,B=A.find(U=>U.name===M),L=A.filter(U=>U.name===M).length>=2;return M&&B&&!L&&(A=[B].concat(A.filter(U=>U.name!==M))),A}),p=()=>{var A;return((A=ts.connectRequestParameters)==null?void 0:A.state)==="loading"},m=Di(()=>{var A;if(!p())return(A=ts.connectRequestParameters)==null?void 0:A.value}),_=()=>{hS(!1),o(null)},T=A=>{if(D_(A)){au(A),t.connect({jsBridgeKey:A.jsBridgeKey},m());return}if(m8(A)){au(jf(ia({},A),{openMethod:"qrcode"})),o(A);return}R8(A.aboutUrl)},O=t.onStatusChange(A=>{A&&_()});return Nc(O),Wt(iCe,{get opened(){return d4e()},onClose:_,"data-tc-wallets-modal-container":"true",get children(){return[Wt(_o,{get when(){return p()||!c()},get children(){return[Wt(oCe,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),Wt(aCe,{get children(){return Wt(Z_,{size:"m"})}})]}}),Wt(_o,{get when(){return Di(()=>!p())()&&c()},get children(){return[Wt(_o,{get when(){return Di(()=>!!OB())()&&!a()},get children(){return Wt(wCe,{onSelect:T,get walletsList(){return c()},get additionalRequest(){return m()}})}}),Wt(_o,{get when(){return!OB()},get children(){return Wt(_o,{get when(){return!a()},get children(){const A=LCe.cloneNode(!0);return qa(A,Wt(sCe,{get tab1(){return Wt(PB,{translationKey:"walletModal.qrCode",cursor:"unset",children:"QR Code"})},get tab2(){return Wt(PB,{translationKey:"walletModal.wallets",cursor:"unset",children:"Wallets"})},get selectedTabIndex(){return s()},onSelectedTabIndexChange:l}),null),qa(A,Wt(H_,{get children(){return[Wt(Ku,{get when(){return s()===0},get children(){return Wt(TCe,{get walletsList(){return c()},get additionalRequest(){return m()},openWalletFallback:()=>l(1)})}}),Wt(Ku,{get when(){return s()===1},get children(){return Wt(NCe,{get walletsList(){return c()},onSelect:T})}})]}}),null),A}})}}),Wt(_o,{get when(){return a()},get children(){return Wt(nCe,{get additionalRequest(){return m()},get wallet(){return a()},onBackClick:()=>o(null)})}})]}})]}})},$Ce=kn.div` - display: flex; - flex-direction: column; - align-items: center; - padding-bottom: 8px; -`,FCe=kn(X_)` - margin-top: 16px; -`,jCe=kn(vu)` - font-weight: 510; - font-size: 16px; - line-height: 20px; - text-align: center; - max-width: 250px; - - color: ${e=>e.theme.colors.text.secondary}; -`,WCe=kn(ic)` - margin-top: 32px; -`,O8=e=>{const t=Fy(e);return Wt($Ce,qu(t,{get children(){return[Di(()=>e.icon),Wt(FCe,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),Wt(jCe,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),Wt(_o,{get when(){return e.showButton!==!1},get children(){return Wt(WCe,{onClick:()=>e.onClose(),get children(){return Wt(su,{translationKey:"common.close",children:"Close"})}})}})]}}))},zCe=e=>{var t;const r=mu(B0),[n]=od(),a=((t=r.wallet)==null?void 0:t.name)||n("common.yourWallet",{},"your wallet");return Wt(O8,{headerTranslationKey:"actionModal.confirmTransaction.header",headerTranslationValues:{name:a},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return Wt(Z_,{size:"m"})},onClose:()=>e.onClose(),showButton:!1,"data-tc-confirm-modal":"true"})},HCe=e=>Wt(O8,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return Wt(yq,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),qCe=e=>Wt(O8,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return Wt(vq,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),KCe=()=>Wt(cq,{get opened(){var e;return Di(()=>Yh()!==null)()&&((e=Yh())==null?void 0:e.openModal)===!0},onClose:()=>fp(null),"data-tc-actions-modal-container":"true",get children(){return Wt(H_,{get children(){return[Wt(Ku,{get when(){return Yh().name==="transaction-sent"},get children(){return Wt(qCe,{onClose:()=>fp(null)})}}),Wt(Ku,{get when(){return Yh().name==="transaction-canceled"},get children(){return Wt(HCe,{onClose:()=>fp(null)})}}),Wt(Ku,{get when(){return Yh().name==="confirm-transaction"},get children(){return Wt(zCe,{onClose:()=>fp(null)})}})]}})}}),VCe=e=>{const t=BSe(U4e,ts.language);return tSe(),eSe(),Wt(pq.Provider,{value:t,get children(){return Wt(B0.Provider,{get value(){return e.tonConnectUI},get children(){return Wt(q_.Provider,{get value(){return ts.connector},get children(){return[Wt(K4e,{}),Wt(x4e,{theme:z4e,get children(){return[Wt(_o,{get when(){return ts.buttonRootId},get children(){return Wt(QH,{get mount(){return document.getElementById(ts.buttonRootId)},get children(){return Wt(VEe,{})}})}}),Wt(x8,{component:vc,get children(){return[Wt(DCe,{}),Wt(KCe,{})]}})]}})]}})}})}})},wd={openWalletsModal:()=>void setTimeout(()=>hS(!0)),closeWalletsModal:()=>void setTimeout(()=>hS(!1)),setAction:e=>void setTimeout(()=>fp(e)),clearAction:()=>void setTimeout(()=>fp(null)),getSelectedWalletInfo:()=>h4e(),renderApp:(e,t)=>e4e(()=>Wt(VCe,{tonConnectUI:t}),document.getElementById(e))};class GCe{constructor(){tl(this,"localStorage"),tl(this,"storageKey","ton-connect-ui_wallet-info"),aq(),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 YCe{constructor(){tl(this,"localStorage"),tl(this,"storageKey","ton-connect-ui_preferred-wallet"),aq(),this.localStorage=localStorage}setPreferredWalletName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletName(){return this.localStorage.getItem(this.storageKey)||void 0}}class XCe{constructor(t){if(tl(this,"walletInfoStorage",new GCe),tl(this,"preferredWalletStorage",new YCe),tl(this,"connector"),tl(this,"walletInfo",null),tl(this,"systemThemeChangeUnsubscribe",null),tl(this,"actionsConfiguration"),tl(this,"walletsList"),tl(this,"connectRequestParametersCallback"),tl(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 sh({manifestUrl:t.manifestUrl});else throw new Bu("You have to specify a `manifestUrl` or a `connector` in the options.");this.walletsList=this.getWallets(),this.walletsList.then(a=>rSe(lCe(a.map(o=>o.imageUrl))));const r=this.normalizeWidgetRoot(t?.widgetRootId);this.subscribeToWalletChange(),t?.restoreConnection!==!1&&(this.connectionRestored=new Promise(a=>Sl(this,null,function*(){yield this.connector.restoreConnection(),this.connector.connected||this.walletInfoStorage.removeWalletInfo(),a(this.connector.connected)}))),this.uiOptions=Bf(t,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletName();j1({connector:this.connector,preferredWalletName:n}),wd.renderApp(r,this)}static getWallets(){return sh.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return!this.connector.wallet||!this.walletInfo?null:ia(ia({},this.connector.wallet),this.walletInfo)}set uiOptions(t){var r,n,a,o,s;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(r=t.uiPreferences)!=null&&r.theme?((n=t.uiPreferences)==null?void 0:n.theme)!=="SYSTEM"?((a=this.systemThemeChangeUnsubscribe)==null||a.call(this),X5(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(X5(Y4e(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=X4e(X5))):(o=t.uiPreferences)!=null&&o.colorsSet&&q4e(t.uiPreferences.colorsSet),(s=t.uiPreferences)!=null&&s.borderRadius&&H4e(t.uiPreferences.borderRadius),j1(l=>{var c;const p=Bf(ia(ia(ia({},t.language&&{language:t.language}),!!((c=t.actionsConfiguration)!=null&&c.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),r0(l));return t.buttonRootId!==void 0&&(p.buttonRootId=t.buttonRootId),p})}setConnectRequestParameters(t){var r;j1({connectRequestParameters:t}),(t?.state==="ready"||!t)&&((r=this.connectRequestParametersCallback)==null||r.call(this,t?.value))}getWallets(){return Sl(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,r){return this.connector.onStatusChange(n=>Sl(this,null,function*(){if(n){const a=yield this.getSelectedWalletInfo(n);t(ia(ia({},n),a||this.walletInfoStorage.getWalletInfo()))}else t(n)}),r)}connectWallet(){return Sl(this,null,function*(){const r=(yield this.getWallets()).find(UH);if(r){const n=o=>{au(r),this.connector.connect({jsBridgeKey:r.jsBridgeKey},o)},a=ts.connectRequestParameters;a?.state==="loading"?this.connectRequestParametersCallback=n:n(a?.value)}else wd.openWalletsModal();return new Promise((n,a)=>{const o=this.connector.onStatusChange(s=>Sl(this,null,function*(){if(o(),s){const l=yield this.getSelectedWalletInfo(s);n(ia(ia({},s),l||this.walletInfoStorage.getWalletInfo()))}else a(new Bu("Wallet was not connected"))}),a)})})}disconnect(){return wd.clearAction(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,r){return Sl(this,null,function*(){if(!this.connected||!this.walletInfo)throw new Bu("Connect wallet to send a transaction.");const{notifications:n,modals:a,returnStrategy:o}=this.getModalsAndNotificationsConfiguration(r);"universalLink"in this.walletInfo&&this.walletInfo.openMethod==="universal-link"&&dv(hv(this.walletInfo.universalLink,o)),wd.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:a.includes("before")});try{const s=yield this.connector.sendTransaction(t);return wd.setAction({name:"transaction-sent",showNotification:n.includes("success"),openModal:a.includes("success")}),s}catch(s){throw wd.setAction({name:"transaction-canceled",showNotification:n.includes("error"),openModal:a.includes("error")}),s instanceof yo?s:(console.error(s),new Bu("Unhandled error:"+s))}})}subscribeToWalletChange(){this.connector.onStatusChange(t=>Sl(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),j1({preferredWalletName:t})}getSelectedWalletInfo(t){return Sl(this,null,function*(){let r=wd.getSelectedWalletInfo();if(!r)return null;let n;if("name"in r)n=r;else{const o=Mq(yield this.walletsList,ts.walletsListConfiguration).find(s=>s.name.toLowerCase()===t.device.appName.toLowerCase());if(!o)throw new Bu(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);n=ia(ia({},o),r)}return n})}updateWalletInfo(t){return Sl(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 Bu(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var r,n,a;const o=["before","success","error"];let s=o;((r=this.actionsConfiguration)==null?void 0:r.notifications)&&((n=this.actionsConfiguration)==null?void 0:n.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 QCe=Object.defineProperty,Mw=Object.getOwnPropertySymbols,Rq=Object.prototype.hasOwnProperty,Aq=Object.prototype.propertyIsEnumerable,UB=(e,t,r)=>t in e?QCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZCe=(e,t)=>{for(var r in t||(t={}))Rq.call(t,r)&&UB(e,r,t[r]);if(Mw)for(var r of Mw(t))Aq.call(t,r)&&UB(e,r,t[r]);return e},JCe=(e,t)=>{var r={};for(var n in e)Rq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mw)for(var n of Mw(e))t.indexOf(n)<0&&Aq.call(e,n)&&(r[n]=e[n]);return r},Tq={exports:{}},Lg={};/** - * @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 NB;function eMe(){if(NB)return Lg;NB=1;var e=al,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=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,c,p){var m,_={},T=null,O=null;p!==void 0&&(T=""+p),c.key!==void 0&&(T=""+c.key),c.ref!==void 0&&(O=c.ref);for(m in c)n.call(c,m)&&!o.hasOwnProperty(m)&&(_[m]=c[m]);if(l&&l.defaultProps)for(m in c=l.defaultProps,c)_[m]===void 0&&(_[m]=c[m]);return{$$typeof:t,type:l,key:T,ref:O,props:_,_owner:a.current}}return Lg.Fragment=r,Lg.jsx=s,Lg.jsxs=s,Lg}(function(e){e.exports=eMe()})(Tq);const Iq=Tq.exports.jsx;function Pq(){return typeof window<"u"}function tMe(){return!Pq()}const Oq=ue.exports.createContext(null);let n6=null;const rMe=e=>{var t=e,{children:r}=t,n=JCe(t,["children"]);return Pq()&&!n6&&(n6=new XCe(n)),Iq(Oq.Provider,{value:n6,children:r})},nMe=ue.exports.memo(rMe);class B8 extends Bu{constructor(...t){super(...t),Object.setPrototypeOf(this,B8.prototype)}}class U8 extends B8{constructor(...t){super(...t),Object.setPrototypeOf(this,U8.prototype)}}function iMe(e){if(!e)throw new U8("You should add on the top of the app to use TonConnect");return!0}function r3(){const e=ue.exports.useContext(Oq),t=ue.exports.useCallback(r=>{e&&(e.uiOptions=r)},[e]);return tMe()?[null,()=>{}]:(iMe(e),[e,t])}const LB="ton-connect-button",oMe=({className:e,style:t})=>{const[r,n]=r3();return ue.exports.useEffect(()=>(n({buttonRootId:LB}),()=>n({buttonRootId:null})),[n]),Iq("div",{id:LB,className:e,style:ZCe({width:"fit-content"},t)})},aMe=ue.exports.memo(oMe);function sMe(){const[e]=r3(),[t,r]=ue.exports.useState(e?.wallet||null);return ue.exports.useEffect(()=>{if(e)return e.onStatusChange(n=>{r(n)})},[e]),t}function n3(e=!0){const t=sMe();return t?e?v8(t.account.address,t.account.chain===lv.TESTNET):t.account.address:""}const N8=ur(aMe)(({theme:e})=>({button:{background:e.palette.primary.main,"*":{color:"white"},svg:{"*":{stroke:"white"}}}}));function lMe({closeMenu:e,showMenu:t}){const r=jc(),n=n3();return ne(rue,{anchor:"left",open:t,onClose:e,children:$t(wa,{p:2,sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"250px",height:"100%"},children:[ne(gl,{sx:{alignSelf:"end",padding:.3},onClick:e,children:ne(l8,{style:{width:25,height:25}})}),$t(wa,{pt:2,sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center"},children:[ne("div",{style:{maxWidth:"250px"},onClick:n?()=>{}:e,children:ne(N8,{})}),$t(ah,{href:qC,target:"_blank",children:[ne("img",{src:rC,alt:"Github icon",width:20,height:20}),ne(o8,{children:"GitHub"})]})]}),$t(ah,{onClick:()=>r("/"),children:[ne("img",{src:p2,width:30,height:30,alt:"App icon"}),ne(P_,{children:"TON VERIFIER"})]})]})})}function uMe(){const{pathname:e}=Bv(),t=_a(),r=jc(),n=ga(t.breakpoints.down("lg")),a=ga(t.breakpoints.down("md")),[o,s]=ue.exports.useState(e.length===1),[l,c]=ue.exports.useState(!1);return ue.exports.useEffect(()=>{s(e.length===1)},[e]),$t(T5e,{px:n?2.4:0,isMobile:a,showExpanded:o,children:[a&&ne(gl,{sx:{width:35,height:35,marginRight:2.4},onClick:()=>c(!0),children:ne(TH,{sx:{width:35,height:35}})}),!a&&$t(AH,{mb:5,children:[$t(ah,{onClick:()=>r("/"),children:[ne("img",{src:p2,width:30,height:30,alt:"App icon"}),ne(P_,{children:"TON VERIFIER"})]}),$t(RH,{children:[ne(Vn,{mr:2,children:ne(N8,{})}),$t(ah,{href:qC,target:"_blank",children:[ne("img",{src:rC,alt:"Github icon",width:20,height:20}),ne(o8,{children:"GitHub"})]})]})]}),e.length<2&&!a&&ne(I5e,{children:"Smart Contract Verifier"}),ne(P5e,{children:ne(R5e,{})}),ne(lMe,{closeMenu:()=>c(!1),showMenu:l})]})}var Bq={},L8={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,n,a,o,s,l,c,p,m,_,T,O,A,M,B,L,U,D,Y,q,Z,ee;(function(V){var te=typeof Ir=="object"?Ir:typeof self=="object"?self:typeof this=="object"?this:{};V(R(te,R(e.exports)));function R(h,g){return h!==te&&(typeof Object.create=="function"?Object.defineProperty(h,"__esModule",{value:!0}):h.__esModule=!0),function(v,u){return h[v]=g?g(v,u):u}}})(function(V){var te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,h){R.__proto__=h}||function(R,h){for(var g in h)h.hasOwnProperty(g)&&(R[g]=h[g])};t=function(R,h){te(R,h);function g(){this.constructor=R}R.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)},r=Object.assign||function(R){for(var h,g=1,v=arguments.length;g=0;S--)(y=R[S])&&(f=(u<3?y(f):u>3?y(h,g,f):y(h,g))||f);return u>3&&f&&Object.defineProperty(h,g,f),f},o=function(R,h){return function(g,v){h(g,v,R)}},s=function(R,h){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(R,h)},l=function(R,h,g,v){function u(f){return f instanceof g?f:new g(function(y){y(f)})}return new(g||(g=Promise))(function(f,y){function S(I){try{d(v.next(I))}catch($){y($)}}function w(I){try{d(v.throw(I))}catch($){y($)}}function d(I){I.done?f(I.value):u(I.value).then(S,w)}d((v=v.apply(R,h||[])).next())})},c=function(R,h){var g={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},v,u,f,y;return y={next:S(0),throw:S(1),return:S(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function S(d){return function(I){return w([d,I])}}function w(d){if(v)throw new TypeError("Generator is already executing.");for(;g;)try{if(v=1,u&&(f=d[0]&2?u.return:d[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,d[1])).done)return f;switch(u=0,f&&(d=[d[0]&2,f.value]),d[0]){case 0:case 1:f=d;break;case 4:return g.label++,{value:d[1],done:!1};case 5:g.label++,u=d[1],d=[0];continue;case 7:d=g.ops.pop(),g.trys.pop();continue;default:if(f=g.trys,!(f=f.length>0&&f[f.length-1])&&(d[0]===6||d[0]===2)){g=0;continue}if(d[0]===3&&(!f||d[1]>f[0]&&d[1]=R.length&&(R=void 0),{value:R&&R[v++],done:!R}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},_=function(R,h){var g=typeof Symbol=="function"&&R[Symbol.iterator];if(!g)return R;var v=g.call(R),u,f=[],y;try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)f.push(u.value)}catch(S){y={error:S}}finally{try{u&&!u.done&&(g=v.return)&&g.call(v)}finally{if(y)throw y.error}}return f},T=function(){for(var R=[],h=0;h1||S(b,X)})})}function S(b,X){try{w(v[b](X))}catch(we){$(f[0][3],we)}}function w(b){b.value instanceof A?Promise.resolve(b.value.v).then(d,I):$(f[0][2],b)}function d(b){S("next",b)}function I(b){S("throw",b)}function $(b,X){b(X),f.shift(),f.length&&S(f[0][0],f[0][1])}},B=function(R){var h,g;return h={},v("next"),v("throw",function(u){throw u}),v("return"),h[Symbol.iterator]=function(){return this},h;function v(u,f){h[u]=R[u]?function(y){return(g=!g)?{value:A(R[u](y)),done:u==="return"}:f?f(y):y}:f}},L=function(R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var h=R[Symbol.asyncIterator],g;return h?h.call(R):(R=typeof m=="function"?m(R):R[Symbol.iterator](),g={},v("next"),v("throw"),v("return"),g[Symbol.asyncIterator]=function(){return this},g);function v(f){g[f]=R[f]&&function(y){return new Promise(function(S,w){y=R[f](y),u(S,w,y.done,y.value)})}}function u(f,y,S,w){Promise.resolve(w).then(function(d){f({value:d,done:S})},y)}},U=function(R,h){return Object.defineProperty?Object.defineProperty(R,"raw",{value:h}):R.raw=h,R},D=function(R){if(R&&R.__esModule)return R;var h={};if(R!=null)for(var g in R)Object.hasOwnProperty.call(R,g)&&(h[g]=R[g]);return h.default=R,h},Y=function(R){return R&&R.__esModule?R:{default:R}},q=function(R,h){if(!h.has(R))throw new TypeError("attempted to get private field on non-instance");return h.get(R)},Z=function(R,h,g){if(!h.has(R))throw new TypeError("attempted to set private field on non-instance");return h.set(R,g),g},V("__extends",t),V("__assign",r),V("__rest",n),V("__decorate",a),V("__param",o),V("__metadata",s),V("__awaiter",l),V("__generator",c),V("__exportStar",p),V("__createBinding",ee),V("__values",m),V("__read",_),V("__spread",T),V("__spreadArrays",O),V("__await",A),V("__asyncGenerator",M),V("__asyncDelegator",B),V("__asyncValues",L),V("__makeTemplateObject",U),V("__importStar",D),V("__importDefault",Y),V("__classPrivateFieldGet",q),V("__classPrivateFieldSet",Z)})})(L8);var Dg={},el={},DB;function Uq(){return DB||(DB=1,Object.defineProperty(el,"__esModule",{value:!0}),el.MAX_HASHABLE_LENGTH=el.INIT=el.KEY=el.DIGEST_LENGTH=el.BLOCK_SIZE=void 0,el.BLOCK_SIZE=64,el.DIGEST_LENGTH=32,el.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]),el.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],el.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),el}var $g={},$B;function cMe(){if($B)return $g;$B=1,Object.defineProperty($g,"__esModule",{value:!0}),$g.RawSha256=void 0;var e=Uq(),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(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var a=0,o=n.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++]=n[a++],o--,this.bufferLength===e.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var n=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 n=this,a=n.buffer,o=n.state,s=o[0],l=o[1],c=o[2],p=o[3],m=o[4],_=o[5],T=o[6],O=o[7],A=0;A>>17|M<<15)^(M>>>19|M<<13)^M>>>10;M=this.temp[A-15];var L=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3;this.temp[A]=(B+this.temp[A-7]|0)+(L+this.temp[A-16]|0)}var U=(((m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&_^~m&T)|0)+(O+(e.KEY[A]+this.temp[A]|0)|0)|0,D=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&l^s&c^l&c)|0;O=T,T=_,_=m,m=p+U|0,p=c,c=l,l=s,s=U+D|0}o[0]+=s,o[1]+=l,o[2]+=c,o[3]+=p,o[4]+=m,o[5]+=_,o[6]+=T,o[7]+=O},r}();return $g.RawSha256=t,$g}var i6={},Fg={};const fMe=e=>{const t=[];for(let r=0,n=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)},dMe=e=>{let t="";for(let r=0,n=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 hMe(e){return new TextEncoder().encode(e)}function pMe(e){return new TextDecoder("utf-8").decode(e)}const gMe=e=>typeof TextEncoder=="function"?hMe(e):fMe(e),mMe=e=>typeof TextDecoder=="function"?pMe(e):dMe(e),vMe=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:gMe,toUtf8:mMe},Symbol.toStringTag,{value:"Module"})),yMe=wu(vMe);var FB;function bMe(){if(FB)return Fg;FB=1,Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.convertToBuffer=void 0;var e=yMe,t=typeof Buffer<"u"&&Buffer.from?function(n){return Buffer.from(n,"utf8")}:e.fromUtf8;function r(n){return n instanceof Uint8Array?n:typeof n=="string"?t(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return Fg.convertToBuffer=r,Fg}var jg={},jB;function wMe(){if(jB)return jg;jB=1,Object.defineProperty(jg,"__esModule",{value:!0}),jg.isEmptyData=void 0;function e(t){return typeof t=="string"?t.length===0:t.byteLength===0}return jg.isEmptyData=e,jg}var Wg={},WB;function xMe(){if(WB)return Wg;WB=1,Object.defineProperty(Wg,"__esModule",{value:!0}),Wg.numToUint8=void 0;function e(t){return new Uint8Array([(t&4278190080)>>24,(t&16711680)>>16,(t&65280)>>8,t&255])}return Wg.numToUint8=e,Wg}var zg={},zB;function _Me(){if(zB)return zg;zB=1,Object.defineProperty(zg,"__esModule",{value:!0}),zg.uint32ArrayFrom=void 0;function e(t){if(!Uint32Array.from){for(var r=new Uint32Array(t.length),n=0;nt.BLOCK_SIZE){var c=new r.RawSha256;c.update(l),l=c.digest()}var p=new Uint8Array(t.BLOCK_SIZE);return p.set(l),p}return Dg}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=L8.exports;t.__exportStar(EMe(),e)})(Bq);var Nq={},Ql={},D8={exports:{}};(function(e){(function(t,r){function n(v,u){if(!v)throw new Error(u||"Assertion failed")}function a(v,u){v.super_=u;var f=function(){};f.prototype=u.prototype,v.prototype=new f,v.prototype.constructor=v}function o(v,u,f){if(o.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&((u==="le"||u==="be")&&(f=u,u=10),this._init(v||0,u||10,f||"be"))}typeof t=="object"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Ud.Buffer}catch{}o.isBN=function(u){return u instanceof o?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===o.wordSize&&Array.isArray(u.words)},o.max=function(u,f){return u.cmp(f)>0?u:f},o.min=function(u,f){return u.cmp(f)<0?u:f},o.prototype._init=function(u,f,y){if(typeof u=="number")return this._initNumber(u,f,y);if(typeof u=="object")return this._initArray(u,f,y);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),u=u.toString().replace(/\s+/g,"");var S=0;u[0]==="-"&&(S++,this.negative=1),S=0;S-=3)d=u[S]|u[S-1]<<8|u[S-2]<<16,this.words[w]|=d<>>26-I&67108863,I+=24,I>=26&&(I-=26,w++);else if(y==="le")for(S=0,w=0;S>>26-I&67108863,I+=24,I>=26&&(I-=26,w++);return this._strip()};function l(v,u){var f=v.charCodeAt(u);if(f>=48&&f<=57)return f-48;if(f>=65&&f<=70)return f-55;if(f>=97&&f<=102)return f-87;n(!1,"Invalid character in "+v)}function c(v,u,f){var y=l(v,f);return f-1>=u&&(y|=l(v,f-1)<<4),y}o.prototype._parseHex=function(u,f,y){this.length=Math.ceil((u.length-f)/6),this.words=new Array(this.length);for(var S=0;S=f;S-=2)I=c(u,f,S)<=18?(w-=18,d+=1,this.words[d]|=I>>>26):w+=8;else{var $=u.length-f;for(S=$%2===0?f+1:f;S=18?(w-=18,d+=1,this.words[d]|=I>>>26):w+=8}this._strip()};function p(v,u,f,y){for(var S=0,w=0,d=Math.min(v.length,f),I=u;I=49?w=$-49+10:$>=17?w=$-17+10:w=$,n($>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{o.prototype.inspect=_}else o.prototype.inspect=_;function _(){return(this.red?""}var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],O=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(u,f){u=u||10,f=f|0||1;var y;if(u===16||u==="hex"){y="";for(var S=0,w=0,d=0;d>>24-S&16777215,S+=2,S>=26&&(S-=26,d--),w!==0||d!==this.length-1?y=T[6-$.length]+$+y:y=$+y}for(w!==0&&(y=w.toString(16)+y);y.length%f!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(u===(u|0)&&u>=2&&u<=36){var b=O[u],X=A[u];y="";var we=this.clone();for(we.negative=0;!we.isZero();){var Ae=we.modrn(X).toString(u);we=we.idivn(X),we.isZero()?y=Ae+y:y=T[b-Ae.length]+Ae+y}for(this.isZero()&&(y="0"+y);y.length%f!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(u,f){return this.toArrayLike(s,u,f)}),o.prototype.toArray=function(u,f){return this.toArrayLike(Array,u,f)};var M=function(u,f){return u.allocUnsafe?u.allocUnsafe(f):new u(f)};o.prototype.toArrayLike=function(u,f,y){this._strip();var S=this.byteLength(),w=y||Math.max(1,S);n(S<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var d=M(u,w),I=f==="le"?"LE":"BE";return this["_toArrayLike"+I](d,S),d},o.prototype._toArrayLikeLE=function(u,f){for(var y=0,S=0,w=0,d=0;w>8&255),y>16&255),d===6?(y>24&255),S=0,d=0):(S=I>>>24,d+=2)}if(y=0&&(u[y--]=I>>8&255),y>=0&&(u[y--]=I>>16&255),d===6?(y>=0&&(u[y--]=I>>24&255),S=0,d=0):(S=I>>>24,d+=2)}if(y>=0)for(u[y--]=S;y>=0;)u[y--]=0},Math.clz32?o.prototype._countBits=function(u){return 32-Math.clz32(u)}:o.prototype._countBits=function(u){var f=u,y=0;return f>=4096&&(y+=13,f>>>=13),f>=64&&(y+=7,f>>>=7),f>=8&&(y+=4,f>>>=4),f>=2&&(y+=2,f>>>=2),y+f},o.prototype._zeroBits=function(u){if(u===0)return 26;var f=u,y=0;return(f&8191)===0&&(y+=13,f>>>=13),(f&127)===0&&(y+=7,f>>>=7),(f&15)===0&&(y+=4,f>>>=4),(f&3)===0&&(y+=2,f>>>=2),(f&1)===0&&y++,y},o.prototype.bitLength=function(){var u=this.words[this.length-1],f=this._countBits(u);return(this.length-1)*26+f};function B(v){for(var u=new Array(v.bitLength()),f=0;f>>S&1}return u}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,f=0;fu.length?this.clone().ior(u):u.clone().ior(this)},o.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},o.prototype.iuand=function(u){var f;this.length>u.length?f=u:f=this;for(var y=0;yu.length?this.clone().iand(u):u.clone().iand(this)},o.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},o.prototype.iuxor=function(u){var f,y;this.length>u.length?(f=this,y=u):(f=u,y=this);for(var S=0;Su.length?this.clone().ixor(u):u.clone().ixor(this)},o.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},o.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var f=Math.ceil(u/26)|0,y=u%26;this._expand(f),y>0&&f--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-y),this._strip()},o.prototype.notn=function(u){return this.clone().inotn(u)},o.prototype.setn=function(u,f){n(typeof u=="number"&&u>=0);var y=u/26|0,S=u%26;return this._expand(y+1),f?this.words[y]=this.words[y]|1<u.length?(y=this,S=u):(y=u,S=this);for(var w=0,d=0;d>>26;for(;w!==0&&d>>26;if(this.length=y.length,w!==0)this.words[this.length]=w,this.length++;else if(y!==this)for(;du.length?this.clone().iadd(u):u.clone().iadd(this)},o.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var f=this.iadd(u);return u.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var y=this.cmp(u);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,w;y>0?(S=this,w=u):(S=u,w=this);for(var d=0,I=0;I>26,this.words[I]=f&67108863;for(;d!==0&&I>26,this.words[I]=f&67108863;if(d===0&&I>>26,we=$&67108863,Ae=Math.min(b,u.length-1),je=Math.max(0,b-v.length+1);je<=Ae;je++){var Vt=b-je|0;S=v.words[Vt]|0,w=u.words[je]|0,d=S*w+we,X+=d/67108864|0,we=d&67108863}f.words[b]=we|0,$=X|0}return $!==0?f.words[b]=$|0:f.length--,f._strip()}var U=function(u,f,y){var S=u.words,w=f.words,d=y.words,I=0,$,b,X,we=S[0]|0,Ae=we&8191,je=we>>>13,Vt=S[1]|0,De=Vt&8191,Fe=Vt>>>13,wt=S[2]|0,Ke=wt&8191,ht=wt>>>13,dr=S[3]|0,ae=dr&8191,Ve=dr>>>13,Nt=S[4]|0,Ee=Nt&8191,xe=Nt>>>13,ut=S[5]|0,st=ut&8191,_t=ut>>>13,Pt=S[6]|0,Ut=Pt&8191,ve=Pt>>>13,ye=S[7]|0,me=ye&8191,Q=ye>>>13,j=S[8]|0,F=j&8191,ie=j>>>13,de=S[9]|0,pe=de&8191,be=de>>>13,Gt=w[0]|0,Lt=Gt&8191,Tt=Gt>>>13,yr=w[1]|0,zt=yr&8191,Ht=yr>>>13,On=w[2]|0,gr=On&8191,mr=On>>>13,gt=w[3]|0,Pr=gt&8191,kr=gt>>>13,ai=w[4]|0,$r=ai&8191,Hr=ai>>>13,Ti=w[5]|0,Wr=Ti&8191,Dr=Ti>>>13,ho=w[6]|0,fe=ho&8191,Me=ho>>>13,Be=w[7]|0,J=Be&8191,Te=Be>>>13,Zt=w[8]|0,Et=Zt&8191,Kt=Zt>>>13,Lr=w[9]|0,Ur=Lr&8191,Ar=Lr>>>13;y.negative=u.negative^f.negative,y.length=19,$=Math.imul(Ae,Lt),b=Math.imul(Ae,Tt),b=b+Math.imul(je,Lt)|0,X=Math.imul(je,Tt);var Qn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,$=Math.imul(De,Lt),b=Math.imul(De,Tt),b=b+Math.imul(Fe,Lt)|0,X=Math.imul(Fe,Tt),$=$+Math.imul(Ae,zt)|0,b=b+Math.imul(Ae,Ht)|0,b=b+Math.imul(je,zt)|0,X=X+Math.imul(je,Ht)|0;var an=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(an>>>26)|0,an&=67108863,$=Math.imul(Ke,Lt),b=Math.imul(Ke,Tt),b=b+Math.imul(ht,Lt)|0,X=Math.imul(ht,Tt),$=$+Math.imul(De,zt)|0,b=b+Math.imul(De,Ht)|0,b=b+Math.imul(Fe,zt)|0,X=X+Math.imul(Fe,Ht)|0,$=$+Math.imul(Ae,gr)|0,b=b+Math.imul(Ae,mr)|0,b=b+Math.imul(je,gr)|0,X=X+Math.imul(je,mr)|0;var wn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,$=Math.imul(ae,Lt),b=Math.imul(ae,Tt),b=b+Math.imul(Ve,Lt)|0,X=Math.imul(Ve,Tt),$=$+Math.imul(Ke,zt)|0,b=b+Math.imul(Ke,Ht)|0,b=b+Math.imul(ht,zt)|0,X=X+Math.imul(ht,Ht)|0,$=$+Math.imul(De,gr)|0,b=b+Math.imul(De,mr)|0,b=b+Math.imul(Fe,gr)|0,X=X+Math.imul(Fe,mr)|0,$=$+Math.imul(Ae,Pr)|0,b=b+Math.imul(Ae,kr)|0,b=b+Math.imul(je,Pr)|0,X=X+Math.imul(je,kr)|0;var Pn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,$=Math.imul(Ee,Lt),b=Math.imul(Ee,Tt),b=b+Math.imul(xe,Lt)|0,X=Math.imul(xe,Tt),$=$+Math.imul(ae,zt)|0,b=b+Math.imul(ae,Ht)|0,b=b+Math.imul(Ve,zt)|0,X=X+Math.imul(Ve,Ht)|0,$=$+Math.imul(Ke,gr)|0,b=b+Math.imul(Ke,mr)|0,b=b+Math.imul(ht,gr)|0,X=X+Math.imul(ht,mr)|0,$=$+Math.imul(De,Pr)|0,b=b+Math.imul(De,kr)|0,b=b+Math.imul(Fe,Pr)|0,X=X+Math.imul(Fe,kr)|0,$=$+Math.imul(Ae,$r)|0,b=b+Math.imul(Ae,Hr)|0,b=b+Math.imul(je,$r)|0,X=X+Math.imul(je,Hr)|0;var Xr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,$=Math.imul(st,Lt),b=Math.imul(st,Tt),b=b+Math.imul(_t,Lt)|0,X=Math.imul(_t,Tt),$=$+Math.imul(Ee,zt)|0,b=b+Math.imul(Ee,Ht)|0,b=b+Math.imul(xe,zt)|0,X=X+Math.imul(xe,Ht)|0,$=$+Math.imul(ae,gr)|0,b=b+Math.imul(ae,mr)|0,b=b+Math.imul(Ve,gr)|0,X=X+Math.imul(Ve,mr)|0,$=$+Math.imul(Ke,Pr)|0,b=b+Math.imul(Ke,kr)|0,b=b+Math.imul(ht,Pr)|0,X=X+Math.imul(ht,kr)|0,$=$+Math.imul(De,$r)|0,b=b+Math.imul(De,Hr)|0,b=b+Math.imul(Fe,$r)|0,X=X+Math.imul(Fe,Hr)|0,$=$+Math.imul(Ae,Wr)|0,b=b+Math.imul(Ae,Dr)|0,b=b+Math.imul(je,Wr)|0,X=X+Math.imul(je,Dr)|0;var _n=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(_n>>>26)|0,_n&=67108863,$=Math.imul(Ut,Lt),b=Math.imul(Ut,Tt),b=b+Math.imul(ve,Lt)|0,X=Math.imul(ve,Tt),$=$+Math.imul(st,zt)|0,b=b+Math.imul(st,Ht)|0,b=b+Math.imul(_t,zt)|0,X=X+Math.imul(_t,Ht)|0,$=$+Math.imul(Ee,gr)|0,b=b+Math.imul(Ee,mr)|0,b=b+Math.imul(xe,gr)|0,X=X+Math.imul(xe,mr)|0,$=$+Math.imul(ae,Pr)|0,b=b+Math.imul(ae,kr)|0,b=b+Math.imul(Ve,Pr)|0,X=X+Math.imul(Ve,kr)|0,$=$+Math.imul(Ke,$r)|0,b=b+Math.imul(Ke,Hr)|0,b=b+Math.imul(ht,$r)|0,X=X+Math.imul(ht,Hr)|0,$=$+Math.imul(De,Wr)|0,b=b+Math.imul(De,Dr)|0,b=b+Math.imul(Fe,Wr)|0,X=X+Math.imul(Fe,Dr)|0,$=$+Math.imul(Ae,fe)|0,b=b+Math.imul(Ae,Me)|0,b=b+Math.imul(je,fe)|0,X=X+Math.imul(je,Me)|0;var Dn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,$=Math.imul(me,Lt),b=Math.imul(me,Tt),b=b+Math.imul(Q,Lt)|0,X=Math.imul(Q,Tt),$=$+Math.imul(Ut,zt)|0,b=b+Math.imul(Ut,Ht)|0,b=b+Math.imul(ve,zt)|0,X=X+Math.imul(ve,Ht)|0,$=$+Math.imul(st,gr)|0,b=b+Math.imul(st,mr)|0,b=b+Math.imul(_t,gr)|0,X=X+Math.imul(_t,mr)|0,$=$+Math.imul(Ee,Pr)|0,b=b+Math.imul(Ee,kr)|0,b=b+Math.imul(xe,Pr)|0,X=X+Math.imul(xe,kr)|0,$=$+Math.imul(ae,$r)|0,b=b+Math.imul(ae,Hr)|0,b=b+Math.imul(Ve,$r)|0,X=X+Math.imul(Ve,Hr)|0,$=$+Math.imul(Ke,Wr)|0,b=b+Math.imul(Ke,Dr)|0,b=b+Math.imul(ht,Wr)|0,X=X+Math.imul(ht,Dr)|0,$=$+Math.imul(De,fe)|0,b=b+Math.imul(De,Me)|0,b=b+Math.imul(Fe,fe)|0,X=X+Math.imul(Fe,Me)|0,$=$+Math.imul(Ae,J)|0,b=b+Math.imul(Ae,Te)|0,b=b+Math.imul(je,J)|0,X=X+Math.imul(je,Te)|0;var Bn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,$=Math.imul(F,Lt),b=Math.imul(F,Tt),b=b+Math.imul(ie,Lt)|0,X=Math.imul(ie,Tt),$=$+Math.imul(me,zt)|0,b=b+Math.imul(me,Ht)|0,b=b+Math.imul(Q,zt)|0,X=X+Math.imul(Q,Ht)|0,$=$+Math.imul(Ut,gr)|0,b=b+Math.imul(Ut,mr)|0,b=b+Math.imul(ve,gr)|0,X=X+Math.imul(ve,mr)|0,$=$+Math.imul(st,Pr)|0,b=b+Math.imul(st,kr)|0,b=b+Math.imul(_t,Pr)|0,X=X+Math.imul(_t,kr)|0,$=$+Math.imul(Ee,$r)|0,b=b+Math.imul(Ee,Hr)|0,b=b+Math.imul(xe,$r)|0,X=X+Math.imul(xe,Hr)|0,$=$+Math.imul(ae,Wr)|0,b=b+Math.imul(ae,Dr)|0,b=b+Math.imul(Ve,Wr)|0,X=X+Math.imul(Ve,Dr)|0,$=$+Math.imul(Ke,fe)|0,b=b+Math.imul(Ke,Me)|0,b=b+Math.imul(ht,fe)|0,X=X+Math.imul(ht,Me)|0,$=$+Math.imul(De,J)|0,b=b+Math.imul(De,Te)|0,b=b+Math.imul(Fe,J)|0,X=X+Math.imul(Fe,Te)|0,$=$+Math.imul(Ae,Et)|0,b=b+Math.imul(Ae,Kt)|0,b=b+Math.imul(je,Et)|0,X=X+Math.imul(je,Kt)|0;var dn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(dn>>>26)|0,dn&=67108863,$=Math.imul(pe,Lt),b=Math.imul(pe,Tt),b=b+Math.imul(be,Lt)|0,X=Math.imul(be,Tt),$=$+Math.imul(F,zt)|0,b=b+Math.imul(F,Ht)|0,b=b+Math.imul(ie,zt)|0,X=X+Math.imul(ie,Ht)|0,$=$+Math.imul(me,gr)|0,b=b+Math.imul(me,mr)|0,b=b+Math.imul(Q,gr)|0,X=X+Math.imul(Q,mr)|0,$=$+Math.imul(Ut,Pr)|0,b=b+Math.imul(Ut,kr)|0,b=b+Math.imul(ve,Pr)|0,X=X+Math.imul(ve,kr)|0,$=$+Math.imul(st,$r)|0,b=b+Math.imul(st,Hr)|0,b=b+Math.imul(_t,$r)|0,X=X+Math.imul(_t,Hr)|0,$=$+Math.imul(Ee,Wr)|0,b=b+Math.imul(Ee,Dr)|0,b=b+Math.imul(xe,Wr)|0,X=X+Math.imul(xe,Dr)|0,$=$+Math.imul(ae,fe)|0,b=b+Math.imul(ae,Me)|0,b=b+Math.imul(Ve,fe)|0,X=X+Math.imul(Ve,Me)|0,$=$+Math.imul(Ke,J)|0,b=b+Math.imul(Ke,Te)|0,b=b+Math.imul(ht,J)|0,X=X+Math.imul(ht,Te)|0,$=$+Math.imul(De,Et)|0,b=b+Math.imul(De,Kt)|0,b=b+Math.imul(Fe,Et)|0,X=X+Math.imul(Fe,Kt)|0,$=$+Math.imul(Ae,Ur)|0,b=b+Math.imul(Ae,Ar)|0,b=b+Math.imul(je,Ur)|0,X=X+Math.imul(je,Ar)|0;var Zr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,$=Math.imul(pe,zt),b=Math.imul(pe,Ht),b=b+Math.imul(be,zt)|0,X=Math.imul(be,Ht),$=$+Math.imul(F,gr)|0,b=b+Math.imul(F,mr)|0,b=b+Math.imul(ie,gr)|0,X=X+Math.imul(ie,mr)|0,$=$+Math.imul(me,Pr)|0,b=b+Math.imul(me,kr)|0,b=b+Math.imul(Q,Pr)|0,X=X+Math.imul(Q,kr)|0,$=$+Math.imul(Ut,$r)|0,b=b+Math.imul(Ut,Hr)|0,b=b+Math.imul(ve,$r)|0,X=X+Math.imul(ve,Hr)|0,$=$+Math.imul(st,Wr)|0,b=b+Math.imul(st,Dr)|0,b=b+Math.imul(_t,Wr)|0,X=X+Math.imul(_t,Dr)|0,$=$+Math.imul(Ee,fe)|0,b=b+Math.imul(Ee,Me)|0,b=b+Math.imul(xe,fe)|0,X=X+Math.imul(xe,Me)|0,$=$+Math.imul(ae,J)|0,b=b+Math.imul(ae,Te)|0,b=b+Math.imul(Ve,J)|0,X=X+Math.imul(Ve,Te)|0,$=$+Math.imul(Ke,Et)|0,b=b+Math.imul(Ke,Kt)|0,b=b+Math.imul(ht,Et)|0,X=X+Math.imul(ht,Kt)|0,$=$+Math.imul(De,Ur)|0,b=b+Math.imul(De,Ar)|0,b=b+Math.imul(Fe,Ur)|0,X=X+Math.imul(Fe,Ar)|0;var gn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,$=Math.imul(pe,gr),b=Math.imul(pe,mr),b=b+Math.imul(be,gr)|0,X=Math.imul(be,mr),$=$+Math.imul(F,Pr)|0,b=b+Math.imul(F,kr)|0,b=b+Math.imul(ie,Pr)|0,X=X+Math.imul(ie,kr)|0,$=$+Math.imul(me,$r)|0,b=b+Math.imul(me,Hr)|0,b=b+Math.imul(Q,$r)|0,X=X+Math.imul(Q,Hr)|0,$=$+Math.imul(Ut,Wr)|0,b=b+Math.imul(Ut,Dr)|0,b=b+Math.imul(ve,Wr)|0,X=X+Math.imul(ve,Dr)|0,$=$+Math.imul(st,fe)|0,b=b+Math.imul(st,Me)|0,b=b+Math.imul(_t,fe)|0,X=X+Math.imul(_t,Me)|0,$=$+Math.imul(Ee,J)|0,b=b+Math.imul(Ee,Te)|0,b=b+Math.imul(xe,J)|0,X=X+Math.imul(xe,Te)|0,$=$+Math.imul(ae,Et)|0,b=b+Math.imul(ae,Kt)|0,b=b+Math.imul(Ve,Et)|0,X=X+Math.imul(Ve,Kt)|0,$=$+Math.imul(Ke,Ur)|0,b=b+Math.imul(Ke,Ar)|0,b=b+Math.imul(ht,Ur)|0,X=X+Math.imul(ht,Ar)|0;var rn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,$=Math.imul(pe,Pr),b=Math.imul(pe,kr),b=b+Math.imul(be,Pr)|0,X=Math.imul(be,kr),$=$+Math.imul(F,$r)|0,b=b+Math.imul(F,Hr)|0,b=b+Math.imul(ie,$r)|0,X=X+Math.imul(ie,Hr)|0,$=$+Math.imul(me,Wr)|0,b=b+Math.imul(me,Dr)|0,b=b+Math.imul(Q,Wr)|0,X=X+Math.imul(Q,Dr)|0,$=$+Math.imul(Ut,fe)|0,b=b+Math.imul(Ut,Me)|0,b=b+Math.imul(ve,fe)|0,X=X+Math.imul(ve,Me)|0,$=$+Math.imul(st,J)|0,b=b+Math.imul(st,Te)|0,b=b+Math.imul(_t,J)|0,X=X+Math.imul(_t,Te)|0,$=$+Math.imul(Ee,Et)|0,b=b+Math.imul(Ee,Kt)|0,b=b+Math.imul(xe,Et)|0,X=X+Math.imul(xe,Kt)|0,$=$+Math.imul(ae,Ur)|0,b=b+Math.imul(ae,Ar)|0,b=b+Math.imul(Ve,Ur)|0,X=X+Math.imul(Ve,Ar)|0;var un=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(un>>>26)|0,un&=67108863,$=Math.imul(pe,$r),b=Math.imul(pe,Hr),b=b+Math.imul(be,$r)|0,X=Math.imul(be,Hr),$=$+Math.imul(F,Wr)|0,b=b+Math.imul(F,Dr)|0,b=b+Math.imul(ie,Wr)|0,X=X+Math.imul(ie,Dr)|0,$=$+Math.imul(me,fe)|0,b=b+Math.imul(me,Me)|0,b=b+Math.imul(Q,fe)|0,X=X+Math.imul(Q,Me)|0,$=$+Math.imul(Ut,J)|0,b=b+Math.imul(Ut,Te)|0,b=b+Math.imul(ve,J)|0,X=X+Math.imul(ve,Te)|0,$=$+Math.imul(st,Et)|0,b=b+Math.imul(st,Kt)|0,b=b+Math.imul(_t,Et)|0,X=X+Math.imul(_t,Kt)|0,$=$+Math.imul(Ee,Ur)|0,b=b+Math.imul(Ee,Ar)|0,b=b+Math.imul(xe,Ur)|0,X=X+Math.imul(xe,Ar)|0;var hn=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,$=Math.imul(pe,Wr),b=Math.imul(pe,Dr),b=b+Math.imul(be,Wr)|0,X=Math.imul(be,Dr),$=$+Math.imul(F,fe)|0,b=b+Math.imul(F,Me)|0,b=b+Math.imul(ie,fe)|0,X=X+Math.imul(ie,Me)|0,$=$+Math.imul(me,J)|0,b=b+Math.imul(me,Te)|0,b=b+Math.imul(Q,J)|0,X=X+Math.imul(Q,Te)|0,$=$+Math.imul(Ut,Et)|0,b=b+Math.imul(Ut,Kt)|0,b=b+Math.imul(ve,Et)|0,X=X+Math.imul(ve,Kt)|0,$=$+Math.imul(st,Ur)|0,b=b+Math.imul(st,Ar)|0,b=b+Math.imul(_t,Ur)|0,X=X+Math.imul(_t,Ar)|0;var tr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(tr>>>26)|0,tr&=67108863,$=Math.imul(pe,fe),b=Math.imul(pe,Me),b=b+Math.imul(be,fe)|0,X=Math.imul(be,Me),$=$+Math.imul(F,J)|0,b=b+Math.imul(F,Te)|0,b=b+Math.imul(ie,J)|0,X=X+Math.imul(ie,Te)|0,$=$+Math.imul(me,Et)|0,b=b+Math.imul(me,Kt)|0,b=b+Math.imul(Q,Et)|0,X=X+Math.imul(Q,Kt)|0,$=$+Math.imul(Ut,Ur)|0,b=b+Math.imul(Ut,Ar)|0,b=b+Math.imul(ve,Ur)|0,X=X+Math.imul(ve,Ar)|0;var lr=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(lr>>>26)|0,lr&=67108863,$=Math.imul(pe,J),b=Math.imul(pe,Te),b=b+Math.imul(be,J)|0,X=Math.imul(be,Te),$=$+Math.imul(F,Et)|0,b=b+Math.imul(F,Kt)|0,b=b+Math.imul(ie,Et)|0,X=X+Math.imul(ie,Kt)|0,$=$+Math.imul(me,Ur)|0,b=b+Math.imul(me,Ar)|0,b=b+Math.imul(Q,Ur)|0,X=X+Math.imul(Q,Ar)|0;var Yt=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,$=Math.imul(pe,Et),b=Math.imul(pe,Kt),b=b+Math.imul(be,Et)|0,X=Math.imul(be,Kt),$=$+Math.imul(F,Ur)|0,b=b+Math.imul(F,Ar)|0,b=b+Math.imul(ie,Ur)|0,X=X+Math.imul(ie,Ar)|0;var Or=(I+$|0)+((b&8191)<<13)|0;I=(X+(b>>>13)|0)+(Or>>>26)|0,Or&=67108863,$=Math.imul(pe,Ur),b=Math.imul(pe,Ar),b=b+Math.imul(be,Ur)|0,X=Math.imul(be,Ar);var Sr=(I+$|0)+((b&8191)<<13)|0;return I=(X+(b>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,d[0]=Qn,d[1]=an,d[2]=wn,d[3]=Pn,d[4]=Xr,d[5]=_n,d[6]=Dn,d[7]=Bn,d[8]=dn,d[9]=Zr,d[10]=gn,d[11]=rn,d[12]=un,d[13]=hn,d[14]=tr,d[15]=lr,d[16]=Yt,d[17]=Or,d[18]=Sr,I!==0&&(d[19]=I,y.length++),y};Math.imul||(U=L);function D(v,u,f){f.negative=u.negative^v.negative,f.length=v.length+u.length;for(var y=0,S=0,w=0;w>>26)|0,S+=d>>>26,d&=67108863}f.words[w]=I,y=d,d=S}return y!==0?f.words[w]=y:f.length--,f._strip()}function Y(v,u,f){return D(v,u,f)}o.prototype.mulTo=function(u,f){var y,S=this.length+u.length;return this.length===10&&u.length===10?y=U(this,u,f):S<63?y=L(this,u,f):S<1024?y=D(this,u,f):y=Y(this,u,f),y},o.prototype.mul=function(u){var f=new o(null);return f.words=new Array(this.length+u.length),this.mulTo(u,f)},o.prototype.mulf=function(u){var f=new o(null);return f.words=new Array(this.length+u.length),Y(this,u,f)},o.prototype.imul=function(u){return this.clone().mulTo(u,this)},o.prototype.imuln=function(u){var f=u<0;f&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var y=0,S=0;S>=26,y+=w/67108864|0,y+=d>>>26,this.words[S]=d&67108863}return y!==0&&(this.words[S]=y,this.length++),f?this.ineg():this},o.prototype.muln=function(u){return this.clone().imuln(u)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(u){var f=B(u);if(f.length===0)return new o(1);for(var y=this,S=0;S=0);var f=u%26,y=(u-f)/26,S=67108863>>>26-f<<26-f,w;if(f!==0){var d=0;for(w=0;w>>26-f}d&&(this.words[w]=d,this.length++)}if(y!==0){for(w=this.length-1;w>=0;w--)this.words[w+y]=this.words[w];for(w=0;w=0);var S;f?S=(f-f%26)/26:S=0;var w=u%26,d=Math.min((u-w)/26,this.length),I=67108863^67108863>>>w<d)for(this.length-=d,b=0;b=0&&(X!==0||b>=S);b--){var we=this.words[b]|0;this.words[b]=X<<26-w|we>>>w,X=we&I}return $&&X!==0&&($.words[$.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(u,f,y){return n(this.negative===0),this.iushrn(u,f,y)},o.prototype.shln=function(u){return this.clone().ishln(u)},o.prototype.ushln=function(u){return this.clone().iushln(u)},o.prototype.shrn=function(u){return this.clone().ishrn(u)},o.prototype.ushrn=function(u){return this.clone().iushrn(u)},o.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var f=u%26,y=(u-f)/26,S=1<=0);var f=u%26,y=(u-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(f!==0&&y++,this.length=Math.min(y,this.length),f!==0){var S=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},o.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-($/67108864|0),this.words[w+y]=d&67108863}for(;w>26,this.words[w+y]=d&67108863;if(I===0)return this._strip();for(n(I===-1),I=0,w=0;w>26,this.words[w]=d&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(u,f){var y=this.length-u.length,S=this.clone(),w=u,d=w.words[w.length-1]|0,I=this._countBits(d);y=26-I,y!==0&&(w=w.ushln(y),S.iushln(y),d=w.words[w.length-1]|0);var $=S.length-w.length,b;if(f!=="mod"){b=new o(null),b.length=$+1,b.words=new Array(b.length);for(var X=0;X=0;Ae--){var je=(S.words[w.length+Ae]|0)*67108864+(S.words[w.length+Ae-1]|0);for(je=Math.min(je/d|0,67108863),S._ishlnsubmul(w,je,Ae);S.negative!==0;)je--,S.negative=0,S._ishlnsubmul(w,1,Ae),S.isZero()||(S.negative^=1);b&&(b.words[Ae]=je)}return b&&b._strip(),S._strip(),f!=="div"&&y!==0&&S.iushrn(y),{div:b||null,mod:S}},o.prototype.divmod=function(u,f,y){if(n(!u.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var S,w,d;return this.negative!==0&&u.negative===0?(d=this.neg().divmod(u,f),f!=="mod"&&(S=d.div.neg()),f!=="div"&&(w=d.mod.neg(),y&&w.negative!==0&&w.iadd(u)),{div:S,mod:w}):this.negative===0&&u.negative!==0?(d=this.divmod(u.neg(),f),f!=="mod"&&(S=d.div.neg()),{div:S,mod:d.mod}):(this.negative&u.negative)!==0?(d=this.neg().divmod(u.neg(),f),f!=="div"&&(w=d.mod.neg(),y&&w.negative!==0&&w.isub(u)),{div:d.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new o(0),mod:this}:u.length===1?f==="div"?{div:this.divn(u.words[0]),mod:null}:f==="mod"?{div:null,mod:new o(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new o(this.modrn(u.words[0]))}:this._wordDiv(u,f)},o.prototype.div=function(u){return this.divmod(u,"div",!1).div},o.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},o.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},o.prototype.divRound=function(u){var f=this.divmod(u);if(f.mod.isZero())return f.div;var y=f.div.negative!==0?f.mod.isub(u):f.mod,S=u.ushrn(1),w=u.andln(1),d=y.cmp(S);return d<0||w===1&&d===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},o.prototype.modrn=function(u){var f=u<0;f&&(u=-u),n(u<=67108863);for(var y=(1<<26)%u,S=0,w=this.length-1;w>=0;w--)S=(y*S+(this.words[w]|0))%u;return f?-S:S},o.prototype.modn=function(u){return this.modrn(u)},o.prototype.idivn=function(u){var f=u<0;f&&(u=-u),n(u<=67108863);for(var y=0,S=this.length-1;S>=0;S--){var w=(this.words[S]|0)+y*67108864;this.words[S]=w/u|0,y=w%u}return this._strip(),f?this.ineg():this},o.prototype.divn=function(u){return this.clone().idivn(u)},o.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var f=this,y=u.clone();f.negative!==0?f=f.umod(u):f=f.clone();for(var S=new o(1),w=new o(0),d=new o(0),I=new o(1),$=0;f.isEven()&&y.isEven();)f.iushrn(1),y.iushrn(1),++$;for(var b=y.clone(),X=f.clone();!f.isZero();){for(var we=0,Ae=1;(f.words[0]&Ae)===0&&we<26;++we,Ae<<=1);if(we>0)for(f.iushrn(we);we-- >0;)(S.isOdd()||w.isOdd())&&(S.iadd(b),w.isub(X)),S.iushrn(1),w.iushrn(1);for(var je=0,Vt=1;(y.words[0]&Vt)===0&&je<26;++je,Vt<<=1);if(je>0)for(y.iushrn(je);je-- >0;)(d.isOdd()||I.isOdd())&&(d.iadd(b),I.isub(X)),d.iushrn(1),I.iushrn(1);f.cmp(y)>=0?(f.isub(y),S.isub(d),w.isub(I)):(y.isub(f),d.isub(S),I.isub(w))}return{a:d,b:I,gcd:y.iushln($)}},o.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var f=this,y=u.clone();f.negative!==0?f=f.umod(u):f=f.clone();for(var S=new o(1),w=new o(0),d=y.clone();f.cmpn(1)>0&&y.cmpn(1)>0;){for(var I=0,$=1;(f.words[0]&$)===0&&I<26;++I,$<<=1);if(I>0)for(f.iushrn(I);I-- >0;)S.isOdd()&&S.iadd(d),S.iushrn(1);for(var b=0,X=1;(y.words[0]&X)===0&&b<26;++b,X<<=1);if(b>0)for(y.iushrn(b);b-- >0;)w.isOdd()&&w.iadd(d),w.iushrn(1);f.cmp(y)>=0?(f.isub(y),S.isub(w)):(y.isub(f),w.isub(S))}var we;return f.cmpn(1)===0?we=S:we=w,we.cmpn(0)<0&&we.iadd(u),we},o.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var f=this.clone(),y=u.clone();f.negative=0,y.negative=0;for(var S=0;f.isEven()&&y.isEven();S++)f.iushrn(1),y.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;y.isEven();)y.iushrn(1);var w=f.cmp(y);if(w<0){var d=f;f=y,y=d}else if(w===0||y.cmpn(1)===0)break;f.isub(y)}while(!0);return y.iushln(S)},o.prototype.invm=function(u){return this.egcd(u).a.umod(u)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(u){return this.words[0]&u},o.prototype.bincn=function(u){n(typeof u=="number");var f=u%26,y=(u-f)/26,S=1<>>26,I&=67108863,this.words[d]=I}return w!==0&&(this.words[d]=w,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(u){var f=u<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this._strip();var y;if(this.length>1)y=1;else{f&&(u=-u),n(u<=67108863,"Number is too big");var S=this.words[0]|0;y=S===u?0:Su.length)return 1;if(this.length=0;y--){var S=this.words[y]|0,w=u.words[y]|0;if(S!==w){Sw&&(f=1);break}}return f},o.prototype.gtn=function(u){return this.cmpn(u)===1},o.prototype.gt=function(u){return this.cmp(u)===1},o.prototype.gten=function(u){return this.cmpn(u)>=0},o.prototype.gte=function(u){return this.cmp(u)>=0},o.prototype.ltn=function(u){return this.cmpn(u)===-1},o.prototype.lt=function(u){return this.cmp(u)===-1},o.prototype.lten=function(u){return this.cmpn(u)<=0},o.prototype.lte=function(u){return this.cmp(u)<=0},o.prototype.eqn=function(u){return this.cmpn(u)===0},o.prototype.eq=function(u){return this.cmp(u)===0},o.red=function(u){return new h(u)},o.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(u){return this.red=u,this},o.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},o.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},o.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},o.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},o.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},o.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},o.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},o.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function Z(v,u){this.name=v,this.p=new o(u,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Z.prototype._tmp=function(){var u=new o(null);return u.words=new Array(Math.ceil(this.n/13)),u},Z.prototype.ireduce=function(u){var f=u,y;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),y=f.bitLength();while(y>this.n);var S=y0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},Z.prototype.split=function(u,f){u.iushrn(this.n,0,f)},Z.prototype.imulK=function(u){return u.imul(this.k)};function ee(){Z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}a(ee,Z),ee.prototype.split=function(u,f){for(var y=4194303,S=Math.min(u.length,9),w=0;w>>22,d=I}d>>>=22,u.words[w-10]=d,d===0&&u.length>10?u.length-=10:u.length-=9},ee.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var f=0,y=0;y>>=26,u.words[y]=w,f=S}return f!==0&&(u.words[u.length++]=f),u},o._prime=function(u){if(q[u])return q[u];var f;if(u==="k256")f=new ee;else if(u==="p224")f=new V;else if(u==="p192")f=new te;else if(u==="p25519")f=new R;else throw new Error("Unknown prime "+u);return q[u]=f,f};function h(v){if(typeof v=="string"){var u=o._prime(v);this.m=u.p,this.prime=u}else n(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}h.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},h.prototype._verify2=function(u,f){n((u.negative|f.negative)===0,"red works only with positives"),n(u.red&&u.red===f.red,"red works only with red numbers")},h.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(m(u,u.umod(this.m)._forceRed(this)),u)},h.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},h.prototype.add=function(u,f){this._verify2(u,f);var y=u.add(f);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},h.prototype.iadd=function(u,f){this._verify2(u,f);var y=u.iadd(f);return y.cmp(this.m)>=0&&y.isub(this.m),y},h.prototype.sub=function(u,f){this._verify2(u,f);var y=u.sub(f);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},h.prototype.isub=function(u,f){this._verify2(u,f);var y=u.isub(f);return y.cmpn(0)<0&&y.iadd(this.m),y},h.prototype.shl=function(u,f){return this._verify1(u),this.imod(u.ushln(f))},h.prototype.imul=function(u,f){return this._verify2(u,f),this.imod(u.imul(f))},h.prototype.mul=function(u,f){return this._verify2(u,f),this.imod(u.mul(f))},h.prototype.isqr=function(u){return this.imul(u,u.clone())},h.prototype.sqr=function(u){return this.mul(u,u)},h.prototype.sqrt=function(u){if(u.isZero())return u.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var y=this.m.add(new o(1)).iushrn(2);return this.pow(u,y)}for(var S=this.m.subn(1),w=0;!S.isZero()&&S.andln(1)===0;)w++,S.iushrn(1);n(!S.isZero());var d=new o(1).toRed(this),I=d.redNeg(),$=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new o(2*b*b).toRed(this);this.pow(b,$).cmp(I)!==0;)b.redIAdd(I);for(var X=this.pow(b,S),we=this.pow(u,S.addn(1).iushrn(1)),Ae=this.pow(u,S),je=w;Ae.cmp(d)!==0;){for(var Vt=Ae,De=0;Vt.cmp(d)!==0;De++)Vt=Vt.redSqr();n(De=0;w--){for(var X=f.words[w],we=b-1;we>=0;we--){var Ae=X>>we&1;if(d!==S[0]&&(d=this.sqr(d)),Ae===0&&I===0){$=0;continue}I<<=1,I|=Ae,$++,!($!==y&&(w!==0||we!==0))&&(d=this.mul(d,S[I]),$=0,I=0)}b=26}return d},h.prototype.convertTo=function(u){var f=u.umod(this.m);return f===u?f.clone():f},h.prototype.convertFrom=function(u){var f=u.clone();return f.red=null,f},o.mont=function(u){return new g(u)};function g(v){h.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}a(g,h),g.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},g.prototype.convertFrom=function(u){var f=this.imod(u.mul(this.rinv));return f.red=null,f},g.prototype.imul=function(u,f){if(u.isZero()||f.isZero())return u.words[0]=0,u.length=1,u;var y=u.imul(f),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=y.isub(S).iushrn(this.shift),d=w;return w.cmp(this.m)>=0?d=w.isub(this.m):w.cmpn(0)<0&&(d=w.iadd(this.m)),d._forceRed(this)},g.prototype.mul=function(u,f){if(u.isZero()||f.isZero())return new o(0)._forceRed(this);var y=u.mul(f),S=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=y.isub(S).iushrn(this.shift),d=w;return w.cmp(this.m)>=0?d=w.isub(this.m):w.cmpn(0)<0&&(d=w.iadd(this.m)),d._forceRed(this)},g.prototype.invm=function(u){var f=this.imod(u._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Ir)})(D8);const lh=D8.exports;var Hg={},i3={},o3={};Object.defineProperty(o3,"__esModule",{value:!0});o3.Trie=void 0;class KB{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 Lq(e,t){e.end&&t.unshift(e.getWord());for(var r in e.children)Lq(e.children[r],t)}class CMe{constructor(){this.root=new KB(null,null)}insert(t,r){for(var n=this.root,a=0;a0)throw console.log(n.getWord(),this.find(n.getWord())),new Error("Word cannot start with already used prefix");n.end=!0,n.value=r}}}contains(t){for(var r=this.root,n=0;n({}).DEBUG&&{}.DEBUG.includes("tvm-disassembler");jy._isDebug=RMe;var VB;function AMe(){if(VB)return Hg;VB=1,Object.defineProperty(Hg,"__esModule",{value:!0}),Hg.CP0Auto=void 0;const e=Go(),t=Dq(),r=i3,n=jy;function a(s,l,c){let p=new e.Cell;for(let m=0;m{let l=s.readUintNumber(4);return l==0?"NOP":`s0 s${l} XCHG`}),o.insertHex("1",4,s=>{let l=s.readUintNumber(4);if(l===0){let c=s.readUintNumber(4),p=s.readUintNumber(4);return`s${c} s${p} XCHG`}return l===1?`s0 s${s.readUintNumber(8)} XCHG`:`s1 s${l} XCHG`}),o.insertHex("2",4,s=>`s${s.readUintNumber(4)} PUSH`),o.insertHex("3",4,s=>`s${s.readUintNumber(4)} POP`),o.insertHex("4",4,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4),p=s.readUintNumber(4);return`s${l} s${c} s${p} XCHG3`}),o.insertHex("50",8,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4);return`s${l} s${c} XCHG2`}),o.insertHex("51",8,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4);return`s${l} s${c} XCPU`}),o.insertHex("52",8,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4);return`s${l} s${c-1} PUXC`}),o.insertHex("53",8,s=>{let l=s.readUintNumber(8),c=l>>4&15,p=l&15;return`s${c} s${p} PUSH2`}),o.insertHex("540",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`s${c} s${p} s${m} XCHG3`}),o.insertHex("541",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p} ${m} XC2PU`}),o.insertHex("542",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p} ${m-1} XCPUXC`}),o.insertHex("543",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p} ${m} XCPU2`}),o.insertHex("544",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p-1} ${m-1} PUXC2`}),o.insertHex("545",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p-1} ${m-1} PUXCPU`}),o.insertHex("546",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p-1} ${m-2} PU2XC`}),o.insertHex("547",12,s=>{let l=s.readUintNumber(12),c=l>>8&15,p=l>>4&15,m=l&15;return`${c} ${p} ${m} PUSH3`}),o.insertHex("55",8,s=>{let l=s.readUintNumber(8),c=l>>4&15,p=l&15;return`${c+1} ${p+1} BLKSWAP`}),o.insertHex("56",8,s=>`s${s.readUintNumber(8)} PUSH`),o.insertHex("57",8,s=>`s${s.readUintNumber(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.readUintNumber(8),c=l>>4&15,p=l&15;return`${c+2} ${p} REVERSE`}),o.insertHex("5f",8,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4);return l===0?`${c} BLKDROP`:`${l} ${c} 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.readUintNumber(4),c=s.readUintNumber(4);return`${l} ${c} BLKDROP2`}),o.insertHex("6d",8,"PUSHNULL"),o.insertHex("6e",8,"ISNULL"),o.insertHex("6f0",12,s=>{let l=s.readUintNumber(4);return l===0?"NIL":l===1?"SINGLE":l===2?"PAIR":l===3?"TRIPLE":`${l} TUPLE`}),o.insertHex("6f1",12,s=>`${s.readUintNumber(4)} INDEX`),o.insertHex("6f2",12,s=>`${s.readUintNumber(4)} UNTUPLE`),o.insertHex("6f3",12,s=>{let l=s.readUintNumber(4);return l===0?"CHKTUPLE":`${l} UNPACKFIRST`}),o.insertHex("6f4",12,s=>`${s.readUintNumber(4)} EXPLODE`),o.insertHex("6f5",12,s=>`${s.readUintNumber(4)} SETINDEX`),o.insertHex("6f6",12,s=>`${s.readUintNumber(4)} INDEXQ`),o.insertHex("6f7",12,s=>`${s.readUintNumber(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.readUintNumber(2),c=s.readUintNumber(2);return`${l} ${c} INDEX2`}),o.insertHex("7",4,s=>`${s.readIntNumber(4)} PUSHINT`),o.insertHex("80",8,s=>`${s.readIntNumber(8)} PUSHINT`),o.insertHex("81",8,s=>`${s.readIntNumber(16)} PUSHINT`),o.insertHex("82",8,s=>{let c=8*s.readUintNumber(5)+19;return`${s.readInt(c).toString(10)} PUSHINT`}),o.insertHex("83",8,s=>`${s.readUintNumber(8)+1} PUSHPOW2`),o.insertHex("84",8,s=>`${s.readUintNumber(8)+1} PUSHPOW2DEC`),o.insertHex("850000",8,s=>`${s.readUintNumber(8)+1} PUSHNEGPOW2`),o.insertHex("88",8,"PUSHREF"),o.insertHex("89",8,"PUSHREFSLICE"),o.insertHex("8a",8,"PUSHREFCONT"),o.insertHex("8b",8,s=>{let c=8*s.readUintNumber(4)+4;return a(s,c),"PUSHSLICE"}),o.insertHex("8c0000",8,s=>{let l=s.readUintNumber(2)+1,c=s.readUintNumber(5);return a(s,8*c+1,l),"PUSHSLICE"}),o.insertHex("8d",8,s=>{let l=s.readUintNumber(3),c=s.readUintNumber(7);return a(s,8*c+6,l),"PUSHSLICE"}),o.insertHex("8E",7,(s,l)=>{let c=s.readUintNumber(9),p=c>>7&3,m=(c&127)*8,_=a(s,m,p);return`<{ -${(0,t.decompile)(_,l+2)}${new Array(l).fill(" ").join("")}}> PUSHCONT`}),o.insertHex("9",4,(s,l)=>{let c=s.readUintNumber(4)*8,p=a(s,c);return`<{ -${(0,t.decompile)(p,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.readIntNumber(8)} ADDCONST`),o.insertHex("a70000",8,s=>`${s.readIntNumber(8)} MULCONST`),o.insertHex("a80000",8,"MUL"),o.insertHex("A9",8,s=>{let l=s.readBit(),c=s.readUintNumber(2),p=s.readBit(),m=s.readUintNumber(2),_=s.readUintNumber(2),T="";if(l&&(T+="MUL"),c==0)T+="DIV";else if(c==1?T="RSHIFT":T="LSHIFT",!p)T+=" s0";else{let O=s.readUintNumber(8)+1;T+=` ${O}`}return m===1?T+=" QOUT":m===2?T+=" REM":m===3&&(T+=" BOTH"),_===1?T+=" R":_==2&&(T+=" C"),T}),o.insertHex("aa",8,s=>`${s.readUintNumber(8)+1} LSHIFT`),o.insertHex("ab",8,s=>`${s.readUintNumber(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.readUintNumber(8)+1} FITS`),o.insertHex("b5",8,s=>`${s.readUintNumber(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.readIntNumber(8)} QADDCONST`),o.insertHex("b7a7",16,s=>`${s.readIntNumber(8)} QMULCONST`),o.insertHex("b7a8",16,"QMUL"),o.insertHex("b7a9",16,s=>{let l=s.readBit(),c=s.readUintNumber(2),p=s.readBit(),m=s.readUintNumber(2),_=s.readUintNumber(2),T="Q";if(l&&(T+="MUL"),c==0)T+="DIV";else if(c==1?T="RSHIFT":T="LSHIFT",!p)T+=" s0";else{let O=s.readUintNumber(8)+1;T+=` ${O}`}return m===1?T+=" QOUT":m===2?T+=" REM":m===3&&(T+=" BOTH"),_===1?T+=" R":_==2&&(T+=" C"),T}),o.insertHex("b7aa",16,s=>`${s.readUintNumber(8)+1} QLSHIFT`),o.insertHex("b7ab",16,s=>`${s.readUintNumber(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.readUintNumber(8)+1} QFITS`),o.insertHex("b7b5",16,s=>`${s.readUintNumber(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.readIntNumber(8)} QEQINT`),o.insertHex("b7c1",16,s=>`${s.readIntNumber(8)} QLESSINT`),o.insertHex("b7c2",16,s=>`${s.readIntNumber(8)} QGTINT`),o.insertHex("b7c3",16,s=>`${s.readIntNumber(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.readIntNumber(8)} EQINT`),o.insertHex("c1",8,s=>`${s.readIntNumber(8)} LESSINT`),o.insertHex("c2",8,s=>`${s.readIntNumber(8)} GTINT`),o.insertHex("c3",8,s=>`${s.readIntNumber(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.readUintNumber(8)+1} STI`),o.insertHex("cb",8,s=>`${s.readUintNumber(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.readUintNumber(3),c=!(l&1),p="ST";return p+=c?"I":"U",p+="X",l&2&&(p+="R"),l&4&&(p+="Q"),p}),o.insertHex("cf08",13,s=>{let l=s.readUintNumber(11),c=(l&255)+1,p=!(l&256),m="ST";return m+=p?"I":"U",l&512&&(m+="R"),l&1024&&(m+="Q"),`${c} ${m}`}),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.readUintNumber(1)===0?"STREFCONST":"STREF2CONST"),o.insertHex("cf23",16,"ENDXC"),o.insertHex("cf28",14,s=>{let l=s.readUintNumber(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.readUintNumber(8)+1} BCHKBITS`),o.insertHex("cf39",16,"BCHKBITS"),o.insertHex("cf3a",16,"BCHKREFS"),o.insertHex("cf3b",16,"BCHKBITREFS"),o.insertHex("cf3c",16,s=>`${s.readUintNumber(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.readUintNumber(2),c=s.readUintNumber(3)*8+1;return a(s,c,l),"STSLICECONST"}),o.insertHex("d0",8,"CTOS"),o.insertHex("d1",8,"ENDS"),o.insertHex("d2",8,s=>`${s.readUintNumber(8)+1} LDI`),o.insertHex("d3",8,s=>`${s.readUintNumber(8)+1} LDU`),o.insertHex("d4",8,"LDREF"),o.insertHex("d5",8,"LDREFRTOS"),o.insertHex("d6",8,s=>`${s.readUintNumber(8)+1} LDSLICE`),o.insertHex("d70",12,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m=s.readBit();return`${l?s.readUintNumber(8)+1+" ":""}${p?"PLD":"LD"}${m?"U":"I"}${c?"Q":""}`}),o.insertHex("d710",13,s=>`${32*(s.readUintNumber(3)+1+1)} PLDUZ`),o.insertHex("d718",14,s=>{let l=s.readBit();return`${s.readBit()?"PLD":"LD"}SLICEX${l?"Q":""}`}),o.insertHex("d71c",14,s=>{let l=s.readBit(),c=s.readBit();return`${s.readUintNumber(8)+1} ${c?"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.readUintNumber(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.readUintNumber(2)} PLDREFIDX`),o.insertHex("d750",12,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m=s.readBit();return`${c?"PLD":"LD"}${m?"U":"I"}LE${p?"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.readUintNumber(4),c=s.readUintNumber(4);return`${l} ${c} CALLXARGS`}),o.insertHex("db0",12,s=>`${s.readUintNumber(4)} CALLXARGS`),o.insertHex("db1",12,s=>`${s.readUintNumber(4)} JMPXARGS`),o.insertHex("db2",12,s=>`${s.readUintNumber(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.readUintNumber(4),c=s.readUintNumber(4);return`${l} ${c} 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 c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> CALLREF`}),o.insertHex("db3d",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> JMPREF`}),o.insertHex("db3e",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,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 c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> IFREF`}),o.insertHex("e301",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> IFNOTREF`}),o.insertHex("e302",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> IFJMPREF`}),o.insertHex("e303",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,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 c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> IFREFELSE`}),o.insertHex("e30e",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,l+2)}${new Array(l).fill(" ").join("")}}> IFELSEREF`}),o.insertHex("e30f",16,(s,l)=>{let c=s.readRef();return`<{ -${(0,t.decompile)(c,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.readUintNumber(6),"(FIXED 879)")),o.insertHex("e3c",10,s=>(s.readUintNumber(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.readUintNumber(4),c=s.readUintNumber(4);return`${l}, ${c} SETCONTARGS`}),o.insertHex("ed0",12,s=>`${s.readUintNumber(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.readUintNumber(4)} PUSH`),o.insertHex("ed5",12,s=>`c${s.readUintNumber(4)} POP`),o.insertHex("ed6",12,s=>`c${s.readUintNumber(4)} SETCONT`),o.insertHex("ed7",12,s=>`c${s.readUintNumber(4)} SETRETCTR`),o.insertHex("ed8",12,s=>`c${s.readUintNumber(4)} SETALTCTR`),o.insertHex("ed9",12,s=>`c${s.readUintNumber(4)} POPSAVE`),o.insertHex("eda",12,s=>`c${s.readUintNumber(4)} SAVE`),o.insertHex("edb",12,s=>`c${s.readUintNumber(4)} SAVEALT`),o.insertHex("edc",12,s=>`c${s.readUintNumber(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.readUintNumber(4),c=s.readUintNumber(4);return`${l},${c} BLESSARGS`}),o.insertHex("f0",8,s=>`${s.readUintNumber(8)} CALLDICT`),o.insertHex("f10",10,s=>`${s.readUintNumber(14)} CALL`),o.insertHex("f20",10,s=>`${s.readUintNumber(6)} THROW`),o.insertHex("F24",10,s=>`${s.readUint(6)} THROWIF`),o.insertHex("F28",10,s=>`${s.readUint(6)} THROWIFNOT`),o.insertHex("f2c0",13,s=>`${s.readUintNumber(11)} THROW`),o.insertHex("f2c8",13,s=>`${s.readUintNumber(11)} THROWARG`),o.insertHex("f2d0",13,s=>`${s.readUintNumber(11)} THROWIF`),o.insertHex("f2e0",13,s=>`${s.readUintNumber(11)} THROWIFNOT`),o.insertHex("f2f0",13,s=>{let l=s.readBit(),c=s.readBit();return`THROW${s.readBit()?"ARG":""}ANY${c||l?"IF":""}${l?"NOT":""}`}),o.insertHex("f2ff",16,"TRY"),o.insertHex("f3",8,s=>{let l=s.readUintNumber(4),c=s.readUintNumber(4);return`${l},${c} 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.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`DICT${m}REPLACE${p?"REF":""}`}),o.insertHex("f42a",13,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`DICT${m}REPLACEGET${p?"REF":""}`}),o.insertHex("f432",13,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`DICT${m}ADD${p?"REF":""}`}),o.insertHex("f43a",13,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`DICT${m}ADDGET${p?"REF":""}`}),o.insertHex("f441",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"U":"I":""}SETB`}),o.insertHex("f445",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"U":"I":""}SETGETB`}),o.insertHex("f449",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"U":"I":""}REPLACEB`}),o.insertHex("f44d",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"U":"I":""}REPLACEGETB`}),o.insertHex("f451",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"U":"I":""}ADDB`}),o.insertHex("f455",14,s=>{let l=s.readBit(),c=s.readBit();return`DICT${l?c?"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.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`DICT${m}DELGET${p?"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.readUintNumber(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.readBit(),c=s.readBit(),p=s.readBit(),m=s.readBit(),_=s.readBit(),T="";return p&&!m?T="I":p&&m&&(T="U"),`DICT${T}${l?"REM":""}${c?"MAX":"MIN"}${_?"REF":""}`}),o.insertHex("f4a0",13,(s,l)=>{if(s.readBit()){let _=a(s,0,1),T=s.readUintNumber(10),O;try{O=(0,t.decompileMethodsMap)(_.clone(),l)}catch(A){(0,n._isDebug)()&&console.error(A),O=_.toCell().toString(" ".repeat(l))}return`${O} ${T} DICTPUSHCONST`}let p=s.readBit();return`DICT${s.readBit()?"U":"I"}GET${p?"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.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`SUBDICT${m}GET${p?"REF":""}`}),o.insertHex("f4b5",13,s=>{let l=s.readBit(),c=s.readBit(),p=s.readBit(),m="";return l&&!c?m="I":l&&c&&(m="U"),`SUBDICT${m}RPGET${p?"REF":""}`}),o.insertHex("f4bc",14,s=>{let l=s.readBit();return`DICT${s.readBit()?"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.readUintNumber(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.readUintNumber(5)} GETGLOBVAR`),o.insertHex("f861",11,s=>`${s.readUintNumber(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.readUintNumber(8);if((l&240)==240){let c=l&15;return`"${s.readBuffer(c+1).toString("utf-8")}" DEBUGSTR`}return`${l} DEBUG`}),o.insertHex("ff",8,s=>{let l=s.readUintNumber(8);if((l&240)==240){let c=l&15;if(c==0)return"SETCPX";l=c-16}return`${l} SETCP`}),Hg}var a3={};Object.defineProperty(a3,"__esModule",{value:!0});a3.KnownMethods=void 0;a3.KnownMethods={[0]:"recv_internal",[-1]:"recv_external",[-2]:"run_ticktock",[68445]:"get_nft_content",[80293]:"get_owner",[83229]:"owner",[85143]:"seqno",[85719]:"royalty_params",[90228]:"get_editor",[92067]:"get_nft_address_by_index",[97026]:"get_wallet_data",[102351]:"get_nft_data",[102491]:"get_collection_data",[103289]:"get_wallet_address",[106029]:"get_jetton_data"};var GB;function Dq(){if(GB)return Ql;GB=1,Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.fromCode=Ql.decompileMethodsMap=Ql.decompile=Ql.setCodepage=void 0;const e=D8.exports,t=Go(),r=AMe(),n=a3,a=jy;let o=r.CP0Auto;function s(m){o=m}Ql.setCodepage=s;function l(m,_){let T="";const O=M=>{if(M instanceof t.Cell){T+=M.toString(" ".repeat(_||0));return}if(_)for(let B=0;B<_;B++)T+=" ";T+=M+` -`};let A="";for(;m.bits.length>m.bits.currentOffset;){let M=m.readBit();A+=M?"1":"0";let B=o.find(A);if(B.length>1||B.length==1&&A.length!==B[0].length)continue;if(B.length==0){let U=new t.Cell;U.bits.writeBitArray(Array.from(A).map(D=>D!="0")),U.writeCell(m.toCell()),O(U);continue}let L=o.getOp(A);if(A="",typeof L=="string")O(L);else if(typeof L=="function"){let U=L(m,_||0);O(U)}m.bits.length==m.bits.currentOffset&&m.refs.length>0&&(m=m.readRef())}return T}Ql.decompile=l;function c(m,_){var T;let O=m.readDict(19,B=>{try{return l(B.clone(),(_||0)+4)}catch(L){return(0,a._isDebug)()&&console.error(L),B.toCell().toString(" ".repeat((_||0)+4))}}),A="";const M=B=>{if(_)for(let L=0;L<_;L++)A+=" ";A+=B+` -`};M("(:methods"),_=(_||0)+2;for(let[B,L]of O){let U=new t.Cell;U.bits.writeUint(new e.BN(B),19);let D=U.beginParse().readIntNumber(19);M(`${(T=n.KnownMethods[D])!==null&&T!==void 0?T:D}: -${L}`)}return A=A.slice(0,-1),_-=2,M(")"),A=A.slice(0,-1),A}Ql.decompileMethodsMap=c;function p(m){let _=m.beginParse();if(_.readUintNumber(16)!==65280)throw new Error("unsupported codepage");let O=`SETCP0 -`;return O+=l(_),O}return Ql.fromCode=p,Ql}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setCodepage=e.fromCode=e.decompile=void 0;const t=Dq();Object.defineProperty(e,"decompile",{enumerable:!0,get:function(){return t.decompile}}),Object.defineProperty(e,"fromCode",{enumerable:!0,get:function(){return t.fromCode}}),Object.defineProperty(e,"setCodepage",{enumerable:!0,get:function(){return t.setCodepage}})})(Nq);var iu={},s3={},ms=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ms<"u"&&ms,Us={searchParams:"URLSearchParams"in ms,iterable:"Symbol"in ms&&"iterator"in Symbol,blob:"FileReader"in ms&&"Blob"in ms&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in ms,arrayBuffer:"ArrayBuffer"in ms};function TMe(e){return e&&DataView.prototype.isPrototypeOf(e)}if(Us.arrayBuffer)var IMe=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],PMe=ArrayBuffer.isView||function(e){return e&&IMe.indexOf(Object.prototype.toString.call(e))>-1};function Wy(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 $8(e){return typeof e!="string"&&(e=String(e)),e}function F8(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return Us.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Ua(e){this.map={},e instanceof Ua?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)}Ua.prototype.append=function(e,t){e=Wy(e),t=$8(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};Ua.prototype.delete=function(e){delete this.map[Wy(e)]};Ua.prototype.get=function(e){return e=Wy(e),this.has(e)?this.map[e]:null};Ua.prototype.has=function(e){return this.map.hasOwnProperty(Wy(e))};Ua.prototype.set=function(e,t){this.map[Wy(e)]=$8(t)};Ua.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)};Ua.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),F8(e)};Ua.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),F8(e)};Ua.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),F8(e)};Us.iterable&&(Ua.prototype[Symbol.iterator]=Ua.prototype.entries);function o6(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function $q(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function OMe(e){var t=new FileReader,r=$q(t);return t.readAsArrayBuffer(e),r}function BMe(e){var t=new FileReader,r=$q(t);return t.readAsText(e),r}function UMe(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}function uh(e,t){if(!(this instanceof uh))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 uh){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ua(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 Ua(t.headers)),this.method=LMe(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 n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}uh.prototype.clone=function(){return new uh(this,{body:this._bodyInit})};function DMe(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}}),t}function $Me(e){var t=new Ua,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(` -`)===0?n.substr(1,n.length):n}).forEach(function(n){var a=n.split(":"),o=a.shift().trim();if(o){var s=a.join(":").trim();t.append(o,s)}}),t}Fq.call(uh.prototype);function Ju(e,t){if(!(this instanceof Ju))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 Ua(t.headers),this.url=t.url||"",this._initBody(e)}Fq.call(Ju.prototype);Ju.prototype.clone=function(){return new Ju(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ua(this.headers),url:this.url})};Ju.error=function(){var e=new Ju(null,{status:0,statusText:""});return e.type="error",e};var FMe=[301,302,303,307,308];Ju.redirect=function(e,t){if(FMe.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ju(null,{status:t,headers:{location:e}})};var Rd=ms.DOMException;try{new Rd}catch{Rd=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},Rd.prototype=Object.create(Error.prototype),Rd.prototype.constructor=Rd}function jq(e,t){return new Promise(function(r,n){var a=new uh(e,t);if(a.signal&&a.signal.aborted)return n(new Rd("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var c={status:o.status,statusText:o.statusText,headers:$Me(o.getAllResponseHeaders()||"")};c.url="responseURL"in o?o.responseURL:c.headers.get("X-Request-URL");var p="response"in o?o.response:o.responseText;setTimeout(function(){r(new Ju(p,c))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){n(new Rd("Aborted","AbortError"))},0)};function l(c){try{return c===""&&ms.location.href?ms.location.href:c}catch{return c}}o.open(a.method,l(a.url),!0),a.credentials==="include"?o.withCredentials=!0:a.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(Us.blob?o.responseType="blob":Us.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 Ua)?Object.getOwnPropertyNames(t.headers).forEach(function(c){o.setRequestHeader(c,$8(t.headers[c]))}):a.headers.forEach(function(c,p){o.setRequestHeader(p,c)}),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)})}jq.polyfill=!0;ms.fetch||(ms.fetch=jq,ms.Headers=Ua,ms.Request=uh,ms.Response=Ju);self.fetch.bind(self);var jMe=Ir&&Ir.__awaiter||function(e,t,r,n){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(m){try{p(n.next(m))}catch(_){s(_)}}function c(m){try{p(n.throw(m))}catch(_){s(_)}}function p(m){m.done?o(m.value):a(m.value).then(l,c)}p((n=n.apply(e,t||[])).next())})};Object.defineProperty(s3,"__esModule",{value:!0});s3.Nodes=void 0;const WMe=2*60*1e3;class zMe{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(t){return jMe(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(n){throw new Error(`exception in fetch(${t}): ${n}`)}for(const n of r)n.Healthy==="1"&&this.topology.push(n);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(t){var r;const n=[];for(const a of this.topology)this.initTime-a.Mngr.successTS0&&((r=a.Mngr)===null||r===void 0?void 0:r.health[t])&&n.push(a);return n}}s3.Nodes=zMe;const HMe="@orbs-network/ton-access",qMe="2.3.0",KMe="Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",VMe="lib/index.js",GMe="lib/index.js",YMe="lib/index.d.ts",XMe=["lib/**/*"],QMe={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"},ZMe={type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},JMe="yuval@orbs.com",eke="MIT",tke={url:"https://github.com/orbs-network/ton-access/issues"},rke="https://github.com/orbs-network/ton-access#readme",nke={"isomorphic-fetch":"^3.0.0"},ike={"@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"},oke={name:HMe,version:qMe,description:KMe,source:VMe,main:GMe,types:YMe,files:XMe,scripts:QMe,repository:ZMe,author:JMe,license:eke,bugs:tke,homepage:rke,dependencies:nke,devDependencies:ike};var U0=Ir&&Ir.__awaiter||function(e,t,r,n){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(m){try{p(n.next(m))}catch(_){s(_)}}function c(m){try{p(n.throw(m))}catch(_){s(_)}}function p(m){m.done?o(m.value):a(m.value).then(l,c)}p((n=n.apply(e,t||[])).next())})};Object.defineProperty(iu,"__esModule",{value:!0});iu.getHttpV4Endpoint=iu.getHttpV4Endpoints=qq=iu.getHttpEndpoint=iu.getHttpEndpoints=iu.Access=void 0;const ake=s3;class Wq{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new ake.Nodes}init(){return U0(this,void 0,void 0,function*(){const t=oke;yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${t.version}`)})}makeProtonet(t,r){let n="";switch(t){case"toncenter-api-v2":n+="v2-";break;case"ton-api-v4":n+="v4-";break}return n+=r,n}weightedRandom(t){let r=0;for(const o of t)r+=o.Weight;const n=Math.floor(Math.random()*r);let a=0;for(const o of t){if(n>=a&&n{if(!e)return null;const a=await Sh(),o=ii.Address.parse(e);let{code:s,data:l}=await a.getContractState(o),c=ii.Cell.fromBoc(s)[0],p=ii.Cell.fromBoc(l)[0];const m=await a.getBalance(o);let _;try{_=Nq.fromCode(c)}catch(A){_=A?.toString()}const T=c.hash(),O=p.hash();return{codeCellHash:{base64:T.toString("base64"),hex:T.toString("hex")},dataCellHash:{base64:O.toString("base64"),hex:O.toString("hex")},decompiled:_,balance:ii.fromNano(m)}});return{isLoading:t,error:r,data:n}}(()=>{var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(i=>typeof nl<"u"?nl:typeof Proxy<"u"?new Proxy(i,{get:(E,k)=>(typeof nl<"u"?nl:E)[k]}):i)(function(i){if(typeof nl<"u")return nl.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')}),l=(i,E)=>()=>(i&&(E=i(i=0)),E),c=(i,E)=>()=>(E||i((E={exports:{}}).exports,E),E.exports),p=(i,E)=>{for(var k in E)t(i,k,{get:E[k],enumerable:!0})},m=(i,E,k,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let x of n(E))!o.call(i,x)&&x!==k&&t(i,x,{get:()=>E[x],enumerable:!(N=r(E,x))||N.enumerable});return i},_=(i,E,k)=>(k=i!=null?e(a(i)):{},m(E||!i||!i.__esModule?t(k,"default",{value:i,enumerable:!0}):k,i)),T=i=>m(t({},"__esModule",{value:!0}),i),O,A=l(()=>{O=globalThis}),M=l(()=>{}),B=l(()=>{}),L={};p(L,{addListener:()=>dr,argv:()=>Vt,binding:()=>h,browser:()=>Ae,chdir:()=>v,config:()=>Ke,cwd:()=>g,default:()=>Pt,emit:()=>xe,env:()=>je,hrtime:()=>f,nextTick:()=>V,off:()=>Ve,on:()=>ht,once:()=>ae,platform:()=>we,release:()=>wt,removeAllListeners:()=>Ee,removeListener:()=>Nt,title:()=>X,umask:()=>u,uptime:()=>y,version:()=>De,versions:()=>Fe});function U(){throw new Error("setTimeout has not been defined")}function D(){throw new Error("clearTimeout has not been defined")}function Y(i){if(S===setTimeout)return setTimeout(i,0);if((S===U||!S)&&setTimeout)return S=setTimeout,setTimeout(i,0);try{return S(i,0)}catch{try{return S.call(null,i,0)}catch{return S.call(this,i,0)}}}function q(i){if(w===clearTimeout)return clearTimeout(i);if((w===D||!w)&&clearTimeout)return w=clearTimeout,clearTimeout(i);try{return w(i)}catch{try{return w.call(null,i)}catch{return w.call(this,i)}}}function Z(){!I||!$||(I=!1,$.length?d=$.concat(d):b=-1,d.length&&ee())}function ee(){if(!I){var i=Y(Z);I=!0;for(var E=d.length;E;){for($=d,d=[];++b1)for(var k=1;k{A(),M(),B(),St(),ve(),S=U,w=D,typeof O.setTimeout=="function"&&(S=setTimeout),typeof O.clearTimeout=="function"&&(w=clearTimeout),d=[],I=!1,b=-1,te.prototype.run=function(){this.fun.apply(null,this.array)},X="browser",we="browser",Ae=!0,je={},Vt=[],De="",Fe={},wt={},Ke={},ht=R,dr=R,ae=R,Ve=R,Nt=R,Ee=R,xe=R,ut=O.performance||{},st=ut.now||ut.mozNow||ut.msNow||ut.oNow||ut.webkitNow||function(){return new Date().getTime()},_t=new Date,Pt={nextTick:V,title:X,browser:Ae,env:je,argv:Vt,version:De,versions:Fe,on:ht,addListener:dr,once:ae,off:Ve,removeListener:Nt,removeAllListeners:Ee,emit:xe,binding:h,cwd:g,chdir:v,umask:u,hrtime:f,platform:we,release:wt,config:Ke,uptime:y}}),ve=l(()=>{Ut()});function ye(){be=!0;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0,k=i.length;E0)throw new Error("Invalid string. Length must be a multiple of 4");C=i[H-2]==="="?2:i[H-1]==="="?1:0,P=new pe(H*3/4-C),N=C>0?H-4:H;var G=0;for(E=0,k=0;E>16&255,P[G++]=x>>8&255,P[G++]=x&255;return C===2?(x=de[i.charCodeAt(E)]<<2|de[i.charCodeAt(E+1)]>>4,P[G++]=x&255):C===1&&(x=de[i.charCodeAt(E)]<<10|de[i.charCodeAt(E+1)]<<4|de[i.charCodeAt(E+2)]>>2,P[G++]=x>>8&255,P[G++]=x&255),P}function Q(i){return ie[i>>18&63]+ie[i>>12&63]+ie[i>>6&63]+ie[i&63]}function j(i,E,k){for(var N,x=[],C=E;CG?G:H+P));return N===1?(E=i[k-1],x+=ie[E>>2],x+=ie[E<<4&63],x+="=="):N===2&&(E=(i[k-2]<<8)+i[k-1],x+=ie[E>>10],x+=ie[E>>4&63],x+=ie[E<<2&63],x+="="),C.push(x),C.join("")}var ie,de,pe,be,Gt=l(()=>{A(),M(),B(),St(),ve(),ie=[],de=[],pe=typeof Uint8Array<"u"?Uint8Array:Array,be=!1});function Lt(i,E,k,N,x){var C,P,H=x*8-N-1,G=(1<>1,re=-7,z=k?x-1:0,ce=k?-1:1,Ie=i[E+z];for(z+=ce,C=Ie&(1<<-re)-1,Ie>>=-re,re+=H;re>0;C=C*256+i[E+z],z+=ce,re-=8);for(P=C&(1<<-re)-1,C>>=-re,re+=N;re>0;P=P*256+i[E+z],z+=ce,re-=8);if(C===0)C=1-K;else{if(C===G)return P?NaN:(Ie?-1:1)*(1/0);P=P+Math.pow(2,N),C=C-K}return(Ie?-1:1)*P*Math.pow(2,C-N)}function Tt(i,E,k,N,x,C){var P,H,G,K=C*8-x-1,re=(1<>1,ce=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ie=N?0:C-1,Oe=N?1:-1,Xe=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===1/0?(H=isNaN(E)?1:0,P=re):(P=Math.floor(Math.log(E)/Math.LN2),E*(G=Math.pow(2,-P))<1&&(P--,G*=2),P+z>=1?E+=ce/G:E+=ce*Math.pow(2,1-z),E*G>=2&&(P++,G/=2),P+z>=re?(H=0,P=re):P+z>=1?(H=(E*G-1)*Math.pow(2,x),P=P+z):(H=E*Math.pow(2,z-1)*Math.pow(2,x),P=0));x>=8;i[k+Ie]=H&255,Ie+=Oe,H/=256,x-=8);for(P=P<0;i[k+Ie]=P&255,Ie+=Oe,P/=256,K-=8);i[k+Ie-Oe]|=Xe*128}var yr=l(()=>{A(),M(),B(),St(),ve()}),zt,Ht,On=l(()=>{A(),M(),B(),St(),ve(),zt={}.toString,Ht=Array.isArray||function(i){return zt.call(i)=="[object Array]"}});function gr(){return gt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function mr(i,E){if(gr()=gr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gr().toString(16)+" bytes");return i|0}function fe(i){return!!(i!=null&&i._isBuffer)}function Me(i,E){if(fe(i))return i.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(i)||i instanceof ArrayBuffer))return i.byteLength;typeof i!="string"&&(i=""+i);var k=i.length;if(k===0)return 0;for(var N=!1;;)switch(E){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":case void 0:return Sr(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return Gn(i).length;default:if(N)return Sr(i).length;E=(""+E).toLowerCase(),N=!0}}function Be(i,E,k){var N=!1;if((E===void 0||E<0)&&(E=0),E>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,E>>>=0,k<=E))return"";for(i||(i="utf8");;)switch(i){case"hex":return Dn(this,E,k);case"utf8":case"utf-8":return wn(this,E,k);case"ascii":return Xr(this,E,k);case"latin1":case"binary":return _n(this,E,k);case"base64":return an(this,E,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bn(this,E,k);default:if(N)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),N=!0}}function J(i,E,k){var N=i[E];i[E]=i[k],i[k]=N}function Te(i,E,k,N,x){if(i.length===0)return-1;if(typeof k=="string"?(N=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,isNaN(k)&&(k=x?0:i.length-1),k<0&&(k=i.length+k),k>=i.length){if(x)return-1;k=i.length-1}else if(k<0)if(x)k=0;else return-1;if(typeof E=="string"&&(E=gt.from(E,N)),fe(E))return E.length===0?-1:Zt(i,E,k,N,x);if(typeof E=="number")return E=E&255,gt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(i,E,k):Uint8Array.prototype.lastIndexOf.call(i,E,k):Zt(i,[E],k,N,x);throw new TypeError("val must be string, number or Buffer")}function Zt(i,E,k,N,x){var C=1,P=i.length,H=E.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(i.length<2||E.length<2)return-1;C=2,P/=2,H/=2,k/=2}function G(Ie,Oe){return C===1?Ie[Oe]:Ie.readUInt16BE(Oe*C)}var K;if(x){var re=-1;for(K=k;KP&&(k=P-H),K=k;K>=0;K--){for(var z=!0,ce=0;cex&&(N=x)):N=x;var C=E.length;if(C%2!==0)throw new TypeError("Invalid hex string");N>C/2&&(N=C/2);for(var P=0;P239?4:C>223?3:C>191?2:1;if(x+H<=k){var G,K,re,z;switch(H){case 1:C<128&&(P=C);break;case 2:G=i[x+1],(G&192)===128&&(z=(C&31)<<6|G&63,z>127&&(P=z));break;case 3:G=i[x+1],K=i[x+2],(G&192)===128&&(K&192)===128&&(z=(C&15)<<12|(G&63)<<6|K&63,z>2047&&(z<55296||z>57343)&&(P=z));break;case 4:G=i[x+1],K=i[x+2],re=i[x+3],(G&192)===128&&(K&192)===128&&(re&192)===128&&(z=(C&15)<<18|(G&63)<<12|(K&63)<<6|re&63,z>65535&&z<1114112&&(P=z))}}P===null?(P=65533,H=1):P>65535&&(P-=65536,N.push(P>>>10&1023|55296),P=56320|P&1023),N.push(P),x+=H}return Pn(N)}function Pn(i){var E=i.length;if(E<=Ei)return String.fromCharCode.apply(String,i);for(var k="",N=0;NN)&&(k=N);for(var x="",C=E;Ck)throw new RangeError("Trying to access beyond buffer length")}function Zr(i,E,k,N,x,C){if(!fe(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(E>x||Ei.length)throw new RangeError("Index out of range")}function gn(i,E,k,N){E<0&&(E=65535+E+1);for(var x=0,C=Math.min(i.length-k,2);x>>(N?x:1-x)*8}function rn(i,E,k,N){E<0&&(E=4294967295+E+1);for(var x=0,C=Math.min(i.length-k,4);x>>(N?x:3-x)*8&255}function un(i,E,k,N,x,C){if(k+N>i.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function hn(i,E,k,N,x){return x||un(i,E,k,4),Tt(i,E,k,N,23,4),k+4}function tr(i,E,k,N,x){return x||un(i,E,k,8),Tt(i,E,k,N,52,8),k+8}function lr(i){if(i=Yt(i).replace(ri,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Yt(i){return i.trim?i.trim():i.replace(/^\s+|\s+$/g,"")}function Or(i){return i<16?"0"+i.toString(16):i.toString(16)}function Sr(i,E){E=E||1/0;for(var k,N=i.length,x=null,C=[],P=0;P55295&&k<57344){if(!x){if(k>56319){(E-=3)>-1&&C.push(239,191,189);continue}else if(P+1===N){(E-=3)>-1&&C.push(239,191,189);continue}x=k;continue}if(k<56320){(E-=3)>-1&&C.push(239,191,189),x=k;continue}k=(x-55296<<10|k-56320)+65536}else x&&(E-=3)>-1&&C.push(239,191,189);if(x=null,k<128){if((E-=1)<0)break;C.push(k)}else if(k<2048){if((E-=2)<0)break;C.push(k>>6|192,k&63|128)}else if(k<65536){if((E-=3)<0)break;C.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((E-=4)<0)break;C.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return C}function Nr(i){for(var E=[],k=0;k>8,x=k%256,C.push(x),C.push(N);return C}function Gn(i){return me(lr(i))}function si(i,E,k,N){for(var x=0;x=E.length||x>=i.length);++x)E[x+k]=i[x];return x}function xi(i){return i!==i}function mi(i){return i!=null&&(!!i._isBuffer||Rt(i)||_i(i))}function Rt(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function _i(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&Rt(i.slice(0,0))}var mn,Ei,ri,Ui=l(()=>{A(),M(),B(),St(),ve(),Gt(),yr(),On(),mn=50,gt.TYPED_ARRAY_SUPPORT=O.TYPED_ARRAY_SUPPORT!==void 0?O.TYPED_ARRAY_SUPPORT:!0,gr(),gt.poolSize=8192,gt._augment=function(i){return i.__proto__=gt.prototype,i},gt.from=function(i,E,k){return Pr(null,i,E,k)},gt.TYPED_ARRAY_SUPPORT&&(gt.prototype.__proto__=Uint8Array.prototype,gt.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&>[Symbol.species]),gt.alloc=function(i,E,k){return ai(null,i,E,k)},gt.allocUnsafe=function(i){return $r(null,i)},gt.allocUnsafeSlow=function(i){return $r(null,i)},gt.isBuffer=mi,gt.compare=function(i,E){if(!fe(i)||!fe(E))throw new TypeError("Arguments must be Buffers");if(i===E)return 0;for(var k=i.length,N=E.length,x=0,C=Math.min(k,N);x0&&(i=this.toString("hex",0,E).match(/.{2}/g).join(" "),this.length>E&&(i+=" ... ")),""},gt.prototype.compare=function(i,E,k,N,x){if(!fe(i))throw new TypeError("Argument must be a Buffer");if(E===void 0&&(E=0),k===void 0&&(k=i?i.length:0),N===void 0&&(N=0),x===void 0&&(x=this.length),E<0||k>i.length||N<0||x>this.length)throw new RangeError("out of range index");if(N>=x&&E>=k)return 0;if(N>=x)return-1;if(E>=k)return 1;if(E>>>=0,k>>>=0,N>>>=0,x>>>=0,this===i)return 0;for(var C=x-N,P=k-E,H=Math.min(C,P),G=this.slice(N,x),K=i.slice(E,k),re=0;rex)&&(k=x),i.length>0&&(k<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");for(var C=!1;;)switch(N){case"hex":return Et(this,i,E,k);case"utf8":case"utf-8":return Kt(this,i,E,k);case"ascii":return Lr(this,i,E,k);case"latin1":case"binary":return Ur(this,i,E,k);case"base64":return Ar(this,i,E,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qn(this,i,E,k);default:if(C)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),C=!0}},gt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Ei=4096,gt.prototype.slice=function(i,E){var k=this.length;i=~~i,E=E===void 0?k:~~E,i<0?(i+=k,i<0&&(i=0)):i>k&&(i=k),E<0?(E+=k,E<0&&(E=0)):E>k&&(E=k),E0&&(x*=256);)N+=this[i+--E]*x;return N},gt.prototype.readUInt8=function(i,E){return E||dn(i,1,this.length),this[i]},gt.prototype.readUInt16LE=function(i,E){return E||dn(i,2,this.length),this[i]|this[i+1]<<8},gt.prototype.readUInt16BE=function(i,E){return E||dn(i,2,this.length),this[i]<<8|this[i+1]},gt.prototype.readUInt32LE=function(i,E){return E||dn(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216},gt.prototype.readUInt32BE=function(i,E){return E||dn(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])},gt.prototype.readIntLE=function(i,E,k){i=i|0,E=E|0,k||dn(i,E,this.length);for(var N=this[i],x=1,C=0;++C=x&&(N-=Math.pow(2,8*E)),N},gt.prototype.readIntBE=function(i,E,k){i=i|0,E=E|0,k||dn(i,E,this.length);for(var N=E,x=1,C=this[i+--N];N>0&&(x*=256);)C+=this[i+--N]*x;return x*=128,C>=x&&(C-=Math.pow(2,8*E)),C},gt.prototype.readInt8=function(i,E){return E||dn(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]},gt.prototype.readInt16LE=function(i,E){E||dn(i,2,this.length);var k=this[i]|this[i+1]<<8;return k&32768?k|4294901760:k},gt.prototype.readInt16BE=function(i,E){E||dn(i,2,this.length);var k=this[i+1]|this[i]<<8;return k&32768?k|4294901760:k},gt.prototype.readInt32LE=function(i,E){return E||dn(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},gt.prototype.readInt32BE=function(i,E){return E||dn(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},gt.prototype.readFloatLE=function(i,E){return E||dn(i,4,this.length),Lt(this,i,!0,23,4)},gt.prototype.readFloatBE=function(i,E){return E||dn(i,4,this.length),Lt(this,i,!1,23,4)},gt.prototype.readDoubleLE=function(i,E){return E||dn(i,8,this.length),Lt(this,i,!0,52,8)},gt.prototype.readDoubleBE=function(i,E){return E||dn(i,8,this.length),Lt(this,i,!1,52,8)},gt.prototype.writeUIntLE=function(i,E,k,N){if(i=+i,E=E|0,k=k|0,!N){var x=Math.pow(2,8*k)-1;Zr(this,i,E,k,x,0)}var C=1,P=0;for(this[E]=i&255;++P=0&&(P*=256);)this[E+C]=i/P&255;return E+k},gt.prototype.writeUInt8=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,1,255,0),gt.TYPED_ARRAY_SUPPORT||(i=Math.floor(i)),this[E]=i&255,E+1},gt.prototype.writeUInt16LE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,2,65535,0),gt.TYPED_ARRAY_SUPPORT?(this[E]=i&255,this[E+1]=i>>>8):gn(this,i,E,!0),E+2},gt.prototype.writeUInt16BE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,2,65535,0),gt.TYPED_ARRAY_SUPPORT?(this[E]=i>>>8,this[E+1]=i&255):gn(this,i,E,!1),E+2},gt.prototype.writeUInt32LE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,4,4294967295,0),gt.TYPED_ARRAY_SUPPORT?(this[E+3]=i>>>24,this[E+2]=i>>>16,this[E+1]=i>>>8,this[E]=i&255):rn(this,i,E,!0),E+4},gt.prototype.writeUInt32BE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,4,4294967295,0),gt.TYPED_ARRAY_SUPPORT?(this[E]=i>>>24,this[E+1]=i>>>16,this[E+2]=i>>>8,this[E+3]=i&255):rn(this,i,E,!1),E+4},gt.prototype.writeIntLE=function(i,E,k,N){if(i=+i,E=E|0,!N){var x=Math.pow(2,8*k-1);Zr(this,i,E,k,x-1,-x)}var C=0,P=1,H=0;for(this[E]=i&255;++C>0)-H&255;return E+k},gt.prototype.writeIntBE=function(i,E,k,N){if(i=+i,E=E|0,!N){var x=Math.pow(2,8*k-1);Zr(this,i,E,k,x-1,-x)}var C=k-1,P=1,H=0;for(this[E+C]=i&255;--C>=0&&(P*=256);)i<0&&H===0&&this[E+C+1]!==0&&(H=1),this[E+C]=(i/P>>0)-H&255;return E+k},gt.prototype.writeInt8=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,1,127,-128),gt.TYPED_ARRAY_SUPPORT||(i=Math.floor(i)),i<0&&(i=255+i+1),this[E]=i&255,E+1},gt.prototype.writeInt16LE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,2,32767,-32768),gt.TYPED_ARRAY_SUPPORT?(this[E]=i&255,this[E+1]=i>>>8):gn(this,i,E,!0),E+2},gt.prototype.writeInt16BE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,2,32767,-32768),gt.TYPED_ARRAY_SUPPORT?(this[E]=i>>>8,this[E+1]=i&255):gn(this,i,E,!1),E+2},gt.prototype.writeInt32LE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,4,2147483647,-2147483648),gt.TYPED_ARRAY_SUPPORT?(this[E]=i&255,this[E+1]=i>>>8,this[E+2]=i>>>16,this[E+3]=i>>>24):rn(this,i,E,!0),E+4},gt.prototype.writeInt32BE=function(i,E,k){return i=+i,E=E|0,k||Zr(this,i,E,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),gt.TYPED_ARRAY_SUPPORT?(this[E]=i>>>24,this[E+1]=i>>>16,this[E+2]=i>>>8,this[E+3]=i&255):rn(this,i,E,!1),E+4},gt.prototype.writeFloatLE=function(i,E,k){return hn(this,i,E,!0,k)},gt.prototype.writeFloatBE=function(i,E,k){return hn(this,i,E,!1,k)},gt.prototype.writeDoubleLE=function(i,E,k){return tr(this,i,E,!0,k)},gt.prototype.writeDoubleBE=function(i,E,k){return tr(this,i,E,!1,k)},gt.prototype.copy=function(i,E,k,N){if(k||(k=0),!N&&N!==0&&(N=this.length),E>=i.length&&(E=i.length),E||(E=0),N>0&&N=this.length)throw new RangeError("sourceStart out of bounds");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),i.length-E=0;--C)i[C+E]=this[C+k];else if(x<1e3||!gt.TYPED_ARRAY_SUPPORT)for(C=0;C>>0,k=k===void 0?this.length:k>>>0,i||(i=0);var C;if(typeof i=="number")for(C=E;C{Ui()}),po=c((i,E)=>{A(),M(),B(),St(),ve();var k=Symbol.for("nodejs.util.inspect.custom");E.exports=k}),Vi=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.crc16=void 0;function E(k){let N=0,x=gt.alloc(k.length+2);x.set(k);for(let C of x){let P=128;for(;P>0;)N<<=1,C&P&&(N+=1),P>>=1,N>65535&&(N&=65535,N^=4129)}return gt.from([Math.floor(N/256),N%256])}i.crc16=E}),qi=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__importDefault||function(z){return z&&z.__esModule?z:{default:z}},k;Object.defineProperty(i,"__esModule",{value:!0}),i.address=i.Address=void 0;var N=E(po()),x=Vi(),C=17,P=81,H=128;function G(z){let ce=gt.isBuffer(z)?z:gt.from(z,"base64");if(ce.length!==36)throw new Error("Unknown address type: byte length is not equal to 36");let Ie=ce.subarray(0,34),Oe=ce.subarray(34,36),Xe=(0,x.crc16)(Ie);if(!(Xe[0]===Oe[0]&&Xe[1]===Oe[1]))throw new Error("Invalid checksum: "+z);let Qe=Ie[0],Le=!1,tt=!1;if(Qe&H&&(Le=!0,Qe=Qe^H),Qe!==C&&Qe!==P)throw"Unknown address tag";tt=Qe===C;let ot=null;Ie[1]===255?ot=-1:ot=Ie[1];let Ct=Ie.subarray(2,34);return{isTestOnly:Le,isBounceable:tt,workchain:ot,hashPart:Ct}}var K=class{static isAddress(z){return z instanceof K}static isFriendly(z){return z.indexOf(":")<0}static normalize(z){return typeof z=="string"?K.parse(z).toString():z.toString()}static parse(z){return K.isFriendly(z)?this.parseFriendly(z).address:this.parseRaw(z)}static parseRaw(z){let ce=parseInt(z.split(":")[0]),Ie=gt.from(z.split(":")[1],"hex");return new K(ce,Ie)}static parseFriendly(z){if(gt.isBuffer(z)){let ce=G(z);return{isBounceable:ce.isBounceable,isTestOnly:ce.isTestOnly,address:new K(ce.workchain,ce.hashPart)}}else{let ce=z.replace(/\-/g,"+").replace(/_/g,"/"),Ie=G(ce);return{isBounceable:Ie.isBounceable,isTestOnly:Ie.isTestOnly,address:new K(Ie.workchain,Ie.hashPart)}}}constructor(z,ce){this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{let Ie=gt.alloc(36);return Ie.set(this.hash),Ie.set([this.workChain,this.workChain,this.workChain,this.workChain],32),Ie},this.toStringBuffer=Ie=>{let Oe=Ie&&Ie.testOnly!==void 0?Ie.testOnly:!1,Xe=!(Ie&&Ie.bounceable!==void 0)||Ie.bounceable?C:P;Oe&&(Xe|=H);let Qe=gt.alloc(34);Qe[0]=Xe,Qe[1]=this.workChain,Qe.set(this.hash,2);let Le=gt.alloc(36);return Le.set(Qe),Le.set((0,x.crc16)(Qe),34),Le},this.toString=Ie=>{let Oe=Ie&&Ie.urlSafe!==void 0?Ie.urlSafe:!0,Xe=this.toStringBuffer(Ie);return Oe?Xe.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):Xe.toString("base64")},this[k]=()=>this.toString(),this.workChain=z,this.hash=ce,Object.freeze(this)}equals(z){return z.workChain!==this.workChain?!1:z.hash.equals(this.hash)}};i.Address=K,k=N.default;function re(z){return K.parse(z)}i.address=re}),Mo=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__importDefault||function(C){return C&&C.__esModule?C:{default:C}},k;Object.defineProperty(i,"__esModule",{value:!0}),i.ExternalAddress=void 0;var N=E(po()),x=class{static isAddress(C){return C instanceof x}constructor(C,P){this[k]=()=>this.toString(),this.value=C,this.bits=P}toString(){return`External<${this.bits}:${this.value}>`}};i.ExternalAddress=x,k=N.default}),ko=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.base32Decode=i.base32Encode=void 0;var E="abcdefghijklmnopqrstuvwxyz234567";function k(C){let P=C.byteLength,H=0,G=0,K="";for(let re=0;re=5;)K+=E[G>>>H-5&31],H-=5;return H>0&&(K+=E[G<<5-H&31]),K}i.base32Encode=k;function N(C,P){let H=C.indexOf(P);if(H===-1)throw new Error("Invalid character found: "+P);return H}function x(C){let P;P=C.toLowerCase();let{length:H}=P,G=0,K=0,re=0,z=gt.alloc(H*5/8|0);for(let ce=0;ce=8&&(z[re++]=K>>>G-8&255,G-=8);return z}i.base32Decode=x}),Yo=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__importDefault||function(H){return H&&H.__esModule?H:{default:H}},k;Object.defineProperty(i,"__esModule",{value:!0}),i.ADNLAddress=void 0;var N=E(po()),x=ko(),C=Vi(),P=class{static parseFriendly(H){if(H.length!==55)throw Error("Invalid address");H="f"+H;let G=(0,x.base32Decode)(H);if(G[0]!==45)throw Error("Invalid address");let K=G.slice(33);if(!(0,C.crc16)(G.slice(0,33)).equals(K))throw Error("Invalid address");return new P(G.slice(1,33))}static parseRaw(H){let G=gt.from(H,"base64");return new P(G)}constructor(H){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let G=gt.concat([gt.from([45]),this.address]),K=(0,C.crc16)(G);return G=gt.concat([G,K]),(0,x.base32Encode)(G).slice(1)},this[k]=()=>this.toString(),H.length!==32)throw Error("Invalid address");this.address=H}equals(H){return this.address.equals(H.address)}};i.ADNLAddress=P,k=N.default}),Lo=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.bitsToPaddedBuffer=void 0;var E=ti();function k(N){let x=new E.BitBuilder(Math.ceil(N.length/8)*8);x.writeBits(N);let C=Math.ceil(N.length/8)*8-N.length;for(let P=0;P{A(),M(),B(),St(),ve();var E=i&&i.__importDefault||function(P){return P&&P.__esModule?P:{default:P}},k;Object.defineProperty(i,"__esModule",{value:!0}),i.BitString=void 0;var N=Lo(),x=E(po()),C=class{constructor(P,H,G){if(this[k]=()=>this.toString(),G<0)throw new Error(`Length ${G} is out of bounds`);this._length=G,this._data=P,this._offset=H}get length(){return this._length}at(P){if(P>=this._length)throw new Error(`Index ${P} > ${this._length} is out of bounds`);if(P<0)throw new Error(`Index ${P} < 0 is out of bounds`);let H=this._offset+P>>3,G=7-(this._offset+P)%8;return(this._data[H]&1<=this._length)throw new Error(`Offset(${P}) > ${this._length} is out of bounds`);if(P<0)throw new Error(`Offset(${P}) < 0 is out of bounds`);if(P+H>this._length)throw new Error(`Offset ${P} + Length ${H} > ${this._length} is out of bounds`);return new C(this._data,this._offset+P,H)}subbuffer(P,H){if(P>=this._length)throw new Error(`Offset ${P} is out of bounds`);if(P<0)throw new Error(`Offset ${P} is out of bounds`);if(P+H>this._length)throw new Error(`Offset + Lenght = ${P+H} is out of bounds`);if(H%8!==0||(this._offset+P)%8!==0)return null;let G=this._offset+P>>3,K=G+(H>>3);return this._data.subarray(G,K)}equals(P){if(this._length!==P._length)return!1;for(let H=0;H{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.BitBuilder=void 0;var E=qi(),k=Mo(),N=Oo(),x=class{constructor(C=1023){this._buffer=gt.alloc(Math.ceil(C/8)),this._length=0}get length(){return this._length}writeBit(C){let P=this._length;if(P>this._buffer.length*8)throw new Error("BitBuilder overflow");(C===!0||C>0)&&(this._buffer[P/8|0]|=1<<7-P%8),this._length++}writeBits(C){for(let P=0;Pthis._buffer.length*8)throw new Error("BitBuilder overflow");C.copy(this._buffer,this._length/8),this._length+=C.length*8}else for(let P=0;P255||!Number.isSafeInteger(re))throw Error(`value is out of range for ${P} bits. Got ${C}`);this._buffer[this._length/8]=Number(C),this._length+=8;return}if(P===16&&this._length%8===0){let re=Number(C);if(re<0||re>65536||!Number.isSafeInteger(re))throw Error(`value is out of range for ${P} bits. Got ${C}`);this._buffer[this._length/8]=re>>8,this._buffer[this._length/8+1]=re&255,this._length+=16;return}let H=BigInt(C);if(P<0||!Number.isSafeInteger(P))throw Error(`invalid bit length. Got ${P}`);if(P===0){if(C!==0n)throw Error(`value is not zero for ${P} bits. Got ${C}`);return}let G=1n<=G)throw Error(`bitLength is too small for a value ${C}. Got ${P}`);let K=[];for(;H>0;)K.push(H%2n===1n),H/=2n;for(let re=0;re=G)throw Error(`value is out of range for ${P} bits. Got ${C}`);H<0?(this.writeBit(!0),H=(1n<0?H:-H,K=1+Math.ceil(G.toString(2).length/8),re=K*8;this.writeUint(K,P),this.writeInt(H,re)}writeCoins(C){this.writeVarUint(C,4)}writeAddress(C){if(C==null){this.writeUint(0,2);return}if(E.Address.isAddress(C)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(C.workChain,8),this.writeBuffer(C.hash);return}if(k.ExternalAddress.isAddress(C)){this.writeUint(1,2),this.writeUint(C.bits,9),this.writeUint(C.value,C.bits);return}throw Error(`Invalid address. Got ${C}`)}build(){return new N.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)}};i.BitBuilder=x}),Xo=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.CellType=void 0,function(E){E[E.Ordinary=-1]="Ordinary",E[E.PrunedBranch=1]="PrunedBranch",E[E.Library=2]="Library",E[E.MerkleProof=3]="MerkleProof",E[E.MerkleUpdate=4]="MerkleUpdate"}(i.CellType||(i.CellType={}))}),La=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.parseDict=void 0;function E(x){let C=0;for(;x.loadBit();)C++;return C}function k(x,C,P,H,G){let K=C.loadBit()?1:0,re=0,z=x;if(K===0){re=E(C);for(let ce=0;ce{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.findCommonPrefix=void 0;function E(k){if(k.length===0)return"";if(k.length===1)return k[0];let N=[...k].sort(),x=0;for(let C=0;C{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.serializeDict=i.detectLabelType=i.writeLabelSame=i.writeLabelLong=i.writeLabelShort=i.buildTree=void 0;var E=us(),k=sd();function N(We,Ye){for(;We.length{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.deserializeInternalKey=i.serializeInternalKey=void 0;var E=qi();function k(x){if(typeof x=="number"){if(!Number.isSafeInteger(x))throw Error("Invalid key type: not a safe integer: "+x);return"n:"+x.toString(10)}else{if(typeof x=="bigint")return"b:"+x.toString(10);if(E.Address.isAddress(x))return"a:"+x.toString();if(gt.isBuffer(x))return"f:"+x.toString("hex");throw Error("Invalid key type")}}i.serializeInternalKey=k;function N(x){let C=x.slice(0,2),P=x.slice(2);if(C==="n:")return parseInt(P,10);if(C==="b:")return BigInt(P);if(C==="a:")return E.Address.parse(P);if(C==="f:")return gt.from(P,"hex");throw Error("Invalid key type: "+C)}i.deserializeInternalKey=N}),sc=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.Dictionary=void 0;var E=qi(),k=us(),N=cd(),x=La(),C=ql(),P=ld(),H=class{static empty(it,$e){return it&&$e?new H(new Map,it,$e):new H(new Map,null,null)}static load(it,$e,Pe){let qe;if(Pe instanceof N.Cell){if(Pe.isExotic)return H.empty(it,$e);qe=Pe.beginParse()}else qe=Pe;let bt=qe.loadMaybeRef();return bt&&!bt.isExotic?H.loadDirect(it,$e,bt.beginParse()):H.empty(it,$e)}static loadDirect(it,$e,Pe){if(!Pe)return H.empty(it,$e);let qe;Pe instanceof N.Cell?qe=Pe.beginParse():qe=Pe;let bt=(0,x.parseDict)(qe,it.bits,$e.parse),Ft=new Map;for(let[pr,_r]of bt)Ft.set((0,P.serializeInternalKey)(it.parse(pr)),_r);return new H(Ft,it,$e)}constructor(it,$e,Pe){this._key=$e,this._value=Pe,this._map=it}get size(){return this._map.size}get(it){return this._map.get((0,P.serializeInternalKey)(it))}has(it){return this._map.has((0,P.serializeInternalKey)(it))}set(it,$e){return this._map.set((0,P.serializeInternalKey)(it),$e),this}delete(it){let $e=(0,P.serializeInternalKey)(it);return this._map.delete($e)}clear(){this._map.clear()}*[Symbol.iterator](){for(let[it,$e]of this._map)yield[(0,P.deserializeInternalKey)(it),$e]}keys(){return Array.from(this._map.keys()).map(it=>(0,P.deserializeInternalKey)(it))}values(){return Array.from(this._map.values())}store(it,$e,Pe){if(this._map.size===0)it.storeBit(0);else{let qe=this._key;$e!=null&&(qe=$e);let bt=this._value;if(Pe!=null&&(bt=Pe),!qe)throw Error("Key serializer is not defined");if(!bt)throw Error("Value serializer is not defined");let Ft=new Map;for(let[_r,Vr]of this._map)Ft.set(qe.serialize((0,P.deserializeInternalKey)(_r)),Vr);it.storeBit(1);let pr=(0,k.beginCell)();(0,C.serializeDict)(Ft,qe.bits,bt.serialize,pr),it.storeRef(pr.endCell())}}storeDirect(it,$e,Pe){if(this._map.size===0)throw Error("Cannot store empty dictionary directly");let qe=this._key;$e!=null&&(qe=$e);let bt=this._value;if(Pe!=null&&(bt=Pe),!qe)throw Error("Key serializer is not defined");if(!bt)throw Error("Value serializer is not defined");let Ft=new Map;for(let[pr,_r]of this._map)Ft.set(qe.serialize((0,P.deserializeInternalKey)(pr)),_r);(0,C.serializeDict)(Ft,qe.bits,bt.serialize,it)}};i.Dictionary=H,H.Keys={Address:()=>G(),BigInt:it=>K(it),Int:it=>re(it),BigUint:it=>z(it),Uint:it=>ce(it),Buffer:it=>Ie(it)},H.Values={BigInt:it=>Xe(it),Int:it=>Oe(it),BigVarInt:it=>Qe(it),BigUint:it=>ot(it),Uint:it=>tt(it),BigVarUint:it=>Le(it),Bool:()=>Ct(),Address:()=>We(),Cell:()=>Ye(),Buffer:it=>yt(it),Dictionary:(it,$e)=>vt(it,$e)};function G(){return{bits:267,serialize:it=>{if(!E.Address.isAddress(it))throw Error("Key is not an address");return(0,k.beginCell)().storeAddress(it).endCell().beginParse().preloadUintBig(267)},parse:it=>(0,k.beginCell)().storeUint(it,267).endCell().beginParse().loadAddress()}}function K(it){return{bits:it,serialize:$e=>{if(typeof $e!="bigint")throw Error("Key is not a bigint");return(0,k.beginCell)().storeInt($e,it).endCell().beginParse().loadUintBig(it)},parse:$e=>(0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadIntBig(it)}}function re(it){return{bits:it,serialize:$e=>{if(typeof $e!="number")throw Error("Key is not a number");if(!Number.isSafeInteger($e))throw Error("Key is not a safe integer: "+$e);return(0,k.beginCell)().storeInt($e,it).endCell().beginParse().loadUintBig(it)},parse:$e=>(0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadInt(it)}}function z(it){return{bits:it,serialize:$e=>{if(typeof $e!="bigint")throw Error("Key is not a bigint");if($e<0)throw Error("Key is negative: "+$e);return(0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadUintBig(it)},parse:$e=>(0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadUintBig(it)}}function ce(it){return{bits:it,serialize:$e=>{if(typeof $e!="number")throw Error("Key is not a number");if(!Number.isSafeInteger($e))throw Error("Key is not a safe integer: "+$e);if($e<0)throw Error("Key is negative: "+$e);return(0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadUintBig(it)},parse:$e=>Number((0,k.beginCell)().storeUint($e,it).endCell().beginParse().loadUint(it))}}function Ie(it){return{bits:it*8,serialize:$e=>{if(!gt.isBuffer($e))throw Error("Key is not a buffer");return(0,k.beginCell)().storeBuffer($e).endCell().beginParse().loadUintBig(it*8)},parse:$e=>(0,k.beginCell)().storeUint($e,it*8).endCell().beginParse().loadBuffer(it)}}function Oe(it){return{serialize:($e,Pe)=>{Pe.storeInt($e,it)},parse:$e=>$e.loadInt(it)}}function Xe(it){return{serialize:($e,Pe)=>{Pe.storeInt($e,it)},parse:$e=>$e.loadIntBig(it)}}function Qe(it){return{serialize:($e,Pe)=>{Pe.storeVarInt($e,it)},parse:$e=>$e.loadVarIntBig(it)}}function Le(it){return{serialize:($e,Pe)=>{Pe.storeVarUint($e,it)},parse:$e=>$e.loadVarUintBig(it)}}function tt(it){return{serialize:($e,Pe)=>{Pe.storeUint($e,it)},parse:$e=>$e.loadUint(it)}}function ot(it){return{serialize:($e,Pe)=>{Pe.storeUint($e,it)},parse:$e=>$e.loadUintBig(it)}}function Ct(){return{serialize:(it,$e)=>{$e.storeBit(it)},parse:it=>it.loadBit()}}function We(){return{serialize:(it,$e)=>{$e.storeAddress(it)},parse:it=>it.loadAddress()}}function Ye(){return{serialize:(it,$e)=>{$e.storeRef(it)},parse:it=>it.loadRef()}}function vt(it,$e){return{serialize:(Pe,qe)=>{Pe.store(qe)},parse:Pe=>H.load(it,$e,Pe)}}function yt(it){return{serialize:($e,Pe)=>{if($e.length!==it)throw Error("Invalid buffer size");Pe.storeBuffer($e)},parse:$e=>$e.loadBuffer(it)}}}),Yy=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.writeString=i.stringToCell=i.readString=void 0;var E=us();function k(H){if(H.remainingBits%8!==0)throw new Error(`Invalid string length: ${H.remainingBits}`);if(H.remainingRefs!==0&&H.remainingRefs!==1)throw new Error(`invalid number of refs: ${H.remainingRefs}`);if(H.remainingRefs===1&&1023-H.remainingBits>7)throw new Error(`invalid string length: ${H.remainingBits/8}`);let G;return H.remainingBits===0?G=gt.alloc(0):G=H.loadBuffer(H.remainingBits/8),H.remainingRefs===1&&(G=gt.concat([G,k(H.loadRef().beginParse())])),G}function N(H){return k(H).toString()}i.readString=N;function x(H,G){if(H.length>0){let K=Math.floor(G.availableBits/8);if(H.length>K){let re=H.subarray(0,K),z=H.subarray(K);G=G.storeBuffer(re);let ce=(0,E.beginCell)();x(z,ce),G=G.storeRef(ce.endCell())}else G=G.storeBuffer(H)}}function C(H){let G=(0,E.beginCell)();return x(gt.from(H),G),G.endCell()}i.stringToCell=C;function P(H,G){x(gt.from(H),G)}i.writeString=P}),Je=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__importDefault||function(G){return G&&G.__esModule?G:{default:G}},k;Object.defineProperty(i,"__esModule",{value:!0}),i.Slice=void 0;var N=E(po()),x=sc(),C=us(),P=Yy(),H=class{constructor(G,K){this[k]=()=>this.toString(),this._reader=G.clone(),this._refs=[...K]}get remainingBits(){return this._reader.remaining}get remainingRefs(){return this._refs.length}skip(G){return this._reader.skip(G),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(G){return this._reader.loadBits(G)}preloadBits(G){return this._reader.preloadBits(G)}loadUint(G){return this._reader.loadUint(G)}loadUintBig(G){return this._reader.loadUintBig(G)}preloadUint(G){return this._reader.preloadUint(G)}preloadUintBig(G){return this._reader.preloadUintBig(G)}loadMaybeUint(G){return this.loadBit()?this.loadUint(G):null}loadMaybeUintBig(G){return this.loadBit()?this.loadUintBig(G):null}loadInt(G){return this._reader.loadInt(G)}loadIntBig(G){return this._reader.loadIntBig(G)}preloadInt(G){return this._reader.preloadInt(G)}preloadIntBig(G){return this._reader.preloadIntBig(G)}loadMaybeInt(G){return this.loadBit()?this.loadInt(G):null}loadMaybeIntBig(G){return this.loadBit()?this.loadIntBig(G):null}loadVarUint(G){return this._reader.loadVarUint(G)}loadVarUintBig(G){return this._reader.loadVarUintBig(G)}preloadVarUint(G){return this._reader.preloadVarUint(G)}preloadVarUintBig(G){return this._reader.preloadVarUintBig(G)}loadVarInt(G){return this._reader.loadVarInt(G)}loadVarIntBig(G){return this._reader.loadVarIntBig(G)}preloadVarInt(G){return this._reader.preloadVarInt(G)}preloadVarIntBig(G){return this._reader.preloadVarIntBig(G)}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(G){return this._reader.loadBuffer(G)}preloadBuffer(G){return this._reader.preloadBuffer(G)}loadStringTail(){return(0,P.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,P.readString)(this):null}loadStringRefTail(){return(0,P.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){let G=this.loadMaybeRef();return G?(0,P.readString)(G.beginParse()):null}loadDict(G,K){return x.Dictionary.load(G,K,this)}loadDictDirect(G,K){return x.Dictionary.loadDirect(G,K,this)}endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw new Error("Slice is not empty")}asCell(){return(0,C.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,C.beginCell)().storeSlice(this)}clone(){return new H(this._reader,this._refs)}toString(){return this.asCell().toString()}};i.Slice=H,k=N.default}),Ue=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.BitReader=void 0;var E=qi(),k=Mo(),N=class{constructor(x,C=0){this._checkpoints=[],this._bits=x,this._offset=C}get remaining(){return this._bits.length-this._offset}skip(x){if(x<0||this._offset+x>this._bits.length)throw new Error(`Index ${this._offset+x} is out of bounds`);this._offset+=x}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let x=this._bits.at(this._offset);return this._offset++,x}preloadBit(){return this._bits.at(this._offset)}loadBits(x){let C=this._bits.substring(this._offset,x);return this._offset+=x,C}preloadBits(x){return this._bits.substring(this._offset,x)}loadBuffer(x){let C=this._preloadBuffer(x,this._offset);return this._offset+=x*8,C}preloadBuffer(x){return this._preloadBuffer(x,this._offset)}loadUint(x){return Number(this.loadUintBig(x))}loadUintBig(x){let C=this.preloadUintBig(x);return this._offset+=x,C}preloadUint(x){return Number(this._preloadUint(x,this._offset))}preloadUintBig(x){return this._preloadUint(x,this._offset)}loadInt(x){let C=this._preloadInt(x,this._offset);return this._offset+=x,Number(C)}loadIntBig(x){let C=this._preloadInt(x,this._offset);return this._offset+=x,C}preloadInt(x){return Number(this._preloadInt(x,this._offset))}preloadIntBig(x){return this._preloadInt(x,this._offset)}loadVarUint(x){let C=Number(this.loadUint(x));return Number(this.loadUintBig(C*8))}loadVarUintBig(x){let C=Number(this.loadUint(x));return this.loadUintBig(C*8)}preloadVarUint(x){let C=Number(this._preloadUint(x,this._offset));return Number(this._preloadUint(C*8,this._offset+x))}preloadVarUintBig(x){let C=Number(this._preloadUint(x,this._offset));return this._preloadUint(C*8,this._offset+x)}loadVarInt(x){let C=Number(this.loadUint(x));return Number(this.loadIntBig(C*8))}loadVarIntBig(x){let C=Number(this.loadUint(x));return this.loadIntBig(C*8)}preloadVarInt(x){let C=Number(this._preloadUint(x,this._offset));return Number(this._preloadInt(C*8,this._offset+x))}preloadVarIntBig(x){let C=Number(this._preloadUint(x,this._offset));return this._preloadInt(C*8,this._offset+x)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let x=Number(this._preloadUint(2,this._offset));if(x===2)return this._loadInternalAddress();throw new Error("Invalid address: "+x)}loadMaybeAddress(){let x=Number(this._preloadUint(2,this._offset));if(x===0)return this._offset+=2,null;if(x===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 x=Number(this._preloadUint(2,this._offset));if(x===0)return this._offset+=2,null;if(x===1)return this._loadExternalAddress();throw new Error("Invalid address")}loadAddressAny(){let x=Number(this._preloadUint(2,this._offset));if(x===0)return this._offset+=2,null;if(x===2)return this._loadInternalAddress();if(x===1)return this._loadExternalAddress();throw Error(x===3?"Unsupported":"Unreachable")}loadPaddedBits(x){if(x%8!==0)throw new Error("Invalid number of bits");let C=x;for(;;)if(this._bits.at(this._offset+C-1)){C--;break}else C--;let P=this._bits.substring(this._offset,C);return this._offset+=x,P}clone(){return new N(this._bits,this._offset)}_preloadInt(x,C){if(x==0)return 0n;let P=this._bits.at(C),H=0n;for(let G=0;G{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.exoticLibrary=void 0;var E=Ue();function k(N,x){let C=new E.BitReader(N),P=8+256;if(N.length!==P)throw new Error(`Library cell must have exactly (8 + 256) bits, got "${N.length}"`);let H=C.loadUint(8);if(H!==2)throw new Error(`Library cell must have type 2, got "${H}"`);return{}}i.exoticLibrary=k}),qt=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.exoticMerkleProof=void 0;var E=Ue();function k(N,x){let C=new E.BitReader(N),P=8+256+16;if(N.length!==P)throw new Error(`Merkle Proof cell must have exactly (8 + 256 + 16) bits, got "${N.length}"`);if(x.length!==1)throw new Error(`Merkle Proof cell must have exactly 1 ref, got "${x.length}"`);let H=C.loadUint(8);if(H!==3)throw new Error(`Merkle Proof cell must have type 3, got "${H}"`);let G=C.loadBuffer(32),K=C.loadUint(16),re=x[0].hash(0),z=x[0].depth(0);if(K!==z)throw new Error(`Merkle Proof cell ref depth must be exactly "${K}", got "${z}"`);if(!G.equals(re))throw new Error(`Merkle Proof cell ref hash must be exactly "${G.toString("hex")}", got "${re.toString("hex")}"`);return{proofDepth:K,proofHash:G}}i.exoticMerkleProof=k}),sr=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.exoticMerkleUpdate=void 0;var E=Ue();function k(N,x){let C=new E.BitReader(N),P=8+2*(256+16);if(N.length!==P)throw new Error(`Merkle Update cell must have exactly (8 + (2 * (256 + 16))) bits, got "${N.length}"`);if(x.length!==2)throw new Error(`Merkle Update cell must have exactly 2 refs, got "${x.length}"`);let H=C.loadUint(8);if(H!==4)throw new Error(`Merkle Update cell type must be exactly 4, got "${H}"`);let G=C.loadBuffer(32),K=C.loadBuffer(32),re=C.loadUint(16),z=C.loadUint(16);if(re!==x[0].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${re}", got "${x[0].depth(0)}"`);if(!G.equals(x[0].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${G.toString("hex")}", got "${x[0].hash(0).toString("hex")}"`);if(z!==x[1].depth(0))throw new Error(`Merkle Update cell ref depth must be exactly "${z}", got "${x[1].depth(0)}"`);if(!K.equals(x[1].hash(0)))throw new Error(`Merkle Update cell ref hash must be exactly "${K.toString("hex")}", got "${x[1].hash(0).toString("hex")}"`);return{proofDepth1:re,proofDepth2:z,proofHash1:G,proofHash2:K}}i.exoticMerkleUpdate=k}),Er=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.LevelMask=void 0;var E=class{constructor(N=0){this._mask=0,this._mask=N,this._hashIndex=k(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(N){return new E(this._mask&(1<>N-1)%2!==0}};i.LevelMask=E;function k(N){return N=N-(N>>1&1431655765),N=(N&858993459)+(N>>2&858993459),(N+(N>>4)&252645135)*16843009>>24}}),Fr=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.exoticPruned=void 0;var E=Ue(),k=Er();function N(x,C){let P=new E.BitReader(x),H=P.loadUint(8);if(H!==1)throw new Error(`Pruned branch cell must have type 1, got "${H}"`);if(C.length!==0)throw new Error(`Pruned Branch cell can't has refs, got "${C.length}"`);let G;if(x.length===280)G=new k.LevelMask(1);else{if(G=new k.LevelMask(P.loadUint(8)),G.level<1||G.level>3)throw new Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${G.level}/${G.value}"`);let ce=8+8+G.apply(G.level-1).hashCount*(256+16);if(x.length!==ce)throw new Error(`Pruned branch cell must have exactly ${ce} bits, got "${x.length}"`)}let K=[],re=[],z=[];for(let ce=0;ce{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.resolveExotic=void 0;var E=Ue(),k=Xo(),N=rt(),x=qt(),C=sr(),P=Fr(),H=Er();function G(Ie,Oe){let Xe=(0,P.exoticPruned)(Ie,Oe),Qe=[],Le=[],tt=new H.LevelMask(Xe.mask);for(let ot=0;ot>1);return{type:k.CellType.MerkleProof,depths:Xe,hashes:Qe,mask:Le}}function z(Ie,Oe){(0,C.exoticMerkleUpdate)(Ie,Oe);let Xe=[],Qe=[],Le=new H.LevelMask((Oe[0].level()|Oe[1].level())>>1);return{type:k.CellType.MerkleUpdate,depths:Xe,hashes:Qe,mask:Le}}function ce(Ie,Oe){let Xe=new E.BitReader(Ie).preloadUint(8);if(Xe===1)return G(Ie,Oe);if(Xe===2)return K(Ie,Oe);if(Xe===3)return re(Ie,Oe);if(Xe===4)return z(Ie,Oe);throw Error("Invalid exotic cell type: "+Xe)}i.resolveExotic=ce}),yn=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.getRepr=i.getBitsDescriptor=i.getRefsDescriptor=void 0;var E=Xo(),k=Lo();function N(P,H,G){return P.length+(G!==E.CellType.Ordinary?1:0)*8+H*32}i.getRefsDescriptor=N;function x(P){let H=P.length;return Math.ceil(H/8)+Math.floor(H/8)}i.getBitsDescriptor=x;function C(P,H,G,K){let re=Math.ceil(P.length/8),z=gt.alloc(2+re+(2+32)*H.length),ce=0;z[ce++]=N(H,G,K),z[ce++]=x(P),(0,k.bitsToPaddedBuffer)(P).copy(z,ce),ce+=re;for(let Ie of H){let Oe;K==E.CellType.MerkleProof||K==E.CellType.MerkleUpdate?Oe=Ie.depth(G+1):Oe=Ie.depth(G),z[ce++]=Math.floor(Oe/256),z[ce++]=Oe%256}for(let Ie of H){let Oe;K==E.CellType.MerkleProof||K==E.CellType.MerkleUpdate?Oe=Ie.hash(G+1):Oe=Ie.hash(G),Oe.copy(z,ce),ce+=32}return z}i.getRepr=C}),Ci=c((i,E)=>{A(),M(),B(),St(),ve(),function(k,N){typeof i=="object"&&typeof E<"u"?E.exports=N():(k=typeof globalThis<"u"?globalThis:k||self).jsSHA=N()}(i,function(){var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function N(Dt,Ge,kt,Bt){var Qt,ct,mt,nt=Ge||[0],It=(kt=kt||0)>>>3,lt=Bt===-1?3:0;for(Qt=0;Qt>>2,nt.length<=ct&&nt.push(0),nt[ct]|=Dt[Qt]<<8*(lt+Bt*(mt%4));return{value:nt,binLen:8*Dt.length+kt}}function x(Dt,Ge,kt){switch(Ge){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(Dt){case"HEX":return function(Bt,Qt,ct){return function(mt,nt,It,lt){var nr,cr,br,zr;if(mt.length%2!=0)throw new Error("String of HEX type must be in byte increments");var xt=nt||[0],jt=(It=It||0)>>>3,Cr=lt===-1?3:0;for(nr=0;nr>>1)+jt)>>>2;xt.length<=br;)xt.push(0);xt[br]|=cr<<8*(Cr+lt*(zr%4))}return{value:xt,binLen:4*mt.length+It}}(Bt,Qt,ct,kt)};case"TEXT":return function(Bt,Qt,ct){return function(mt,nt,It,lt,nr){var cr,br,zr,xt,jt,Cr,cn,$n,Yi=0,hi=It||[0],yi=(lt=lt||0)>>>3;if(nt==="UTF8")for(cn=nr===-1?3:0,zr=0;zr(cr=mt.charCodeAt(zr))?br.push(cr):2048>cr?(br.push(192|cr>>>6),br.push(128|63&cr)):55296>cr||57344<=cr?br.push(224|cr>>>12,128|cr>>>6&63,128|63&cr):(zr+=1,cr=65536+((1023&cr)<<10|1023&mt.charCodeAt(zr)),br.push(240|cr>>>18,128|cr>>>12&63,128|cr>>>6&63,128|63&cr)),xt=0;xt>>2;hi.length<=jt;)hi.push(0);hi[jt]|=br[xt]<<8*(cn+nr*(Cr%4)),Yi+=1}else for(cn=nr===-1?2:0,$n=nt==="UTF16LE"&&nr!==1||nt!=="UTF16LE"&&nr===1,zr=0;zr>>8),jt=(Cr=Yi+yi)>>>2;hi.length<=jt;)hi.push(0);hi[jt]|=cr<<8*(cn+nr*(Cr%4)),Yi+=2}return{value:hi,binLen:8*Yi+lt}}(Bt,Ge,Qt,ct,kt)};case"B64":return function(Bt,Qt,ct){return function(mt,nt,It,lt){var nr,cr,br,zr,xt,jt,Cr=0,cn=nt||[0],$n=(It=It||0)>>>3,Yi=lt===-1?3:0,hi=mt.indexOf("=");if(mt.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(mt=mt.replace(/=/g,""),hi!==-1&&hi0;){var z=K[re],ce=H[z];if(ce){var Ie=P[z],Oe=Ie===void 0||ce(Ie,z,P);if(Oe!==!0)throw new TypeError("option "+z+" must be "+Oe);continue}if(G!==!0)throw Error("Unknown option "+z)}}E.exports={assertOptions:C,validators:N}}),MG=c((i,E)=>{A(),M(),B(),St(),ve();var k=Bs(),N=JR(),x=pG(),C=EG(),P=iA(),H=CG(),G=H.validators;function K(re){this.defaults=re,this.interceptors={request:new x,response:new x}}K.prototype.request=function(re,z){if(typeof re=="string"?(z=z||{},z.url=re):z=re||{},!z.url)throw new Error("Provided config url is not valid");z=P(this.defaults,z),z.method?z.method=z.method.toLowerCase():this.defaults.method?z.method=this.defaults.method.toLowerCase():z.method="get";var ce=z.transitional;ce!==void 0&&H.assertOptions(ce,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1);var Ie=[],Oe=!0;this.interceptors.request.forEach(function(We){typeof We.runWhen=="function"&&We.runWhen(z)===!1||(Oe=Oe&&We.synchronous,Ie.unshift(We.fulfilled,We.rejected))});var Xe=[];this.interceptors.response.forEach(function(We){Xe.push(We.fulfilled,We.rejected)});var Qe;if(!Oe){var Le=[C,void 0];for(Array.prototype.unshift.apply(Le,Ie),Le=Le.concat(Xe),Qe=Promise.resolve(z);Le.length;)Qe=Qe.then(Le.shift(),Le.shift());return Qe}for(var tt=z;Ie.length;){var ot=Ie.shift(),Ct=Ie.shift();try{tt=ot(tt)}catch(We){Ct(We);break}}try{Qe=C(tt)}catch(We){return Promise.reject(We)}for(;Xe.length;)Qe=Qe.then(Xe.shift(),Xe.shift());return Qe},K.prototype.getUri=function(re){if(!re.url)throw new Error("Provided config url is not valid");return re=P(this.defaults,re),N(re.url,re.params,re.paramsSerializer).replace(/^\?/,"")},k.forEach(["delete","get","head","options"],function(re){K.prototype[re]=function(z,ce){return this.request(P(ce||{},{method:re,url:z,data:(ce||{}).data}))}}),k.forEach(["post","put","patch"],function(re){K.prototype[re]=function(z,ce,Ie){return this.request(P(Ie||{},{method:re,url:z,data:ce}))}}),E.exports=K}),kG=c((i,E)=>{A(),M(),B(),St(),ve();var k=r1();function N(x){if(typeof x!="function")throw new TypeError("executor must be a function.");var C;this.promise=new Promise(function(H){C=H});var P=this;this.promise.then(function(H){if(P._listeners){var G,K=P._listeners.length;for(G=0;G{A(),M(),B(),St(),ve(),E.exports=function(k){return function(N){return k.apply(null,N)}}}),AG=c((i,E)=>{A(),M(),B(),St(),ve();var k=Bs();E.exports=function(N){return k.isObject(N)&&N.isAxiosError===!0}}),TG=c((i,E)=>{A(),M(),B(),St(),ve();var k=Bs(),N=ZR(),x=MG(),C=iA(),P=n1();function H(K){var re=new x(K),z=N(x.prototype.request,re);return k.extend(z,x.prototype,re),k.extend(z,re),z.create=function(ce){return H(C(K,ce))},z}var G=H(P);G.Axios=x,G.Cancel=r1(),G.CancelToken=kG(),G.isCancel=nA(),G.VERSION=oA().version,G.all=function(K){return Promise.all(K)},G.spread=RG(),G.isAxiosError=AG(),E.exports=G,E.exports.default=G}),aA=c((i,E)=>{A(),M(),B(),St(),ve(),E.exports=TG()}),IG=c((i,E)=>{E.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"}}),sA=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__createBinding||(Object.create?function(qe,bt,Ft,pr){pr===void 0&&(pr=Ft),Object.defineProperty(qe,pr,{enumerable:!0,get:function(){return bt[Ft]}})}:function(qe,bt,Ft,pr){pr===void 0&&(pr=Ft),qe[pr]=bt[Ft]}),k=i&&i.__setModuleDefault||(Object.create?function(qe,bt){Object.defineProperty(qe,"default",{enumerable:!0,value:bt})}:function(qe,bt){qe.default=bt}),N=i&&i.__importStar||function(qe){if(qe&&qe.__esModule)return qe;var bt={};if(qe!=null)for(var Ft in qe)Ft!=="default"&&Object.prototype.hasOwnProperty.call(qe,Ft)&&E(bt,qe,Ft);return k(bt,qe),bt},x=i&&i.__importDefault||function(qe){return qe&&qe.__esModule?qe:{default:qe}};Object.defineProperty(i,"__esModule",{value:!0}),i.HttpApi=void 0;var C=N(x3()),P=w3(),H=x(fG()),G=dG(),K=x(hG()),re=x(aA()),z=IG().version,ce=C.type({"@type":C.literal("ton.blockIdExt"),workchain:C.number,shard:C.string,seqno:C.number,root_hash:C.string,file_hash:C.string}),Ie=C.type({balance:C.union([C.number,C.string]),state:C.union([C.literal("active"),C.literal("uninitialized"),C.literal("frozen")]),data:C.string,code:C.string,last_transaction_id:C.type({"@type":C.literal("internal.transactionId"),lt:C.string,hash:C.string}),block_id:ce,sync_utime:C.number}),Oe=C.type({"@type":C.literal("ok")}),Xe=C.type({"@type":C.literal("query.fees"),source_fees:C.type({"@type":C.literal("fees"),in_fwd_fee:C.number,storage_fee:C.number,gas_fee:C.number,fwd_fee:C.number})}),Qe=C.type({gas_used:C.number,exit_code:C.number,stack:C.array(C.unknown)}),Le=C.union([C.type({"@type":C.literal("msg.dataRaw"),body:C.string}),C.type({"@type":C.literal("msg.dataText"),text:C.string}),C.type({"@type":C.literal("msg.dataDecryptedText"),text:C.string}),C.type({"@type":C.literal("msg.dataEncryptedText"),text:C.string})]),tt=C.type({source:C.string,destination:C.string,value:C.string,fwd_fee:C.string,ihr_fee:C.string,created_lt:C.string,body_hash:C.string,msg_data:Le}),ot=C.type({data:C.string,utime:C.number,transaction_id:C.type({lt:C.string,hash:C.string}),fee:C.string,storage_fee:C.string,other_fee:C.string,in_msg:C.union([C.undefined,tt]),out_msgs:C.array(tt)}),Ct=C.array(ot),We=C.type({state_root_hash:C.string,last:ce,init:ce}),Ye=C.type({shards:C.array(ce)}),vt=C.type({"@type":C.literal("blocks.shortTxId"),mode:C.number,account:C.string,lt:C.string,hash:C.string}),yt=C.type({id:ce,req_count:C.number,incomplete:C.boolean,transactions:C.array(vt)}),it=class{constructor(qe,bt,Ft,pr){this.namespace=qe,this.cache=bt,this.codec=Ft,this.keyEncoder=pr}async get(qe){let bt=await this.cache.get(this.namespace,this.keyEncoder(qe));if(bt){let Ft=this.codec.decode(JSON.parse(bt));if((0,P.isRight)(Ft))return Ft.right}return null}async set(qe,bt){bt!==null?await this.cache.set(this.namespace,this.keyEncoder(qe),JSON.stringify(bt)):await this.cache.set(this.namespace,this.keyEncoder(qe),null)}},$e=class{constructor(qe,bt){this.endpoint=qe,this.cache=new G.InMemoryCache,this.parameters={timeout:bt?.timeout||3e4,apiKey:bt?.apiKey},this.shardCache=new it("ton-shard",this.cache,C.array(ce),Ft=>Ft+""),this.shardLoader=new K.default(async Ft=>await Promise.all(Ft.map(async pr=>{let _r=await this.shardCache.get(pr);if(_r)return _r;let Vr=(await this.doCall("shards",{seqno:pr},Ye)).shards;return await this.shardCache.set(pr,Vr),Vr}))),this.shardTransactionsCache=new it("ton-shard-tx",this.cache,yt,Ft=>Ft.workchain+":"+Ft.shard+":"+Ft.seqno),this.shardTransactionsLoader=new K.default(async Ft=>await Promise.all(Ft.map(async pr=>{let _r=await this.shardTransactionsCache.get(pr);if(_r)return _r;let Vr=await this.doCall("getBlockTransactions",{workchain:pr.workchain,seqno:pr.seqno,shard:pr.shard},yt);return await this.shardTransactionsCache.set(pr,Vr),Vr})),{cacheKeyFn:Ft=>Ft.workchain+":"+Ft.shard+":"+Ft.seqno})}getAddressInformation(qe){return this.doCall("getAddressInformation",{address:qe.toString()},Ie)}async getTransactions(qe,bt){let Ft=bt.inclusive;delete bt.inclusive;let pr;bt.hash&&(pr=gt.from(bt.hash,"base64").toString("hex"));let _r=bt.limit;bt.hash&&bt.lt&&Ft!==!0&&_r++;let Vr=await this.doCall("getTransactions",{address:qe.toString(),...bt,limit:_r,hash:pr},Ct);return Vr.length>_r&&(Vr=Vr.slice(0,_r)),bt.hash&&bt.lt&&Ft!==!0&&Vr.shift(),Vr}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},We)}async getShards(qe){return await this.shardLoader.load(qe)}async getBlockTransactions(qe,bt,Ft){return await this.shardTransactionsLoader.load({workchain:qe,seqno:bt,shard:Ft})}async getTransaction(qe,bt,Ft){let pr=gt.from(Ft,"base64").toString("hex");return(await this.doCall("getTransactions",{address:qe.toString(),lt:bt,hash:pr,limit:1},Ct)).find(Vr=>Vr.transaction_id.lt===bt&&Vr.transaction_id.hash===Ft)||null}async callGetMethod(qe,bt,Ft){return await this.doCall("runGetMethod",{address:qe.toString(),method:bt,stack:Pe(Ft)},Qe)}async sendBoc(qe){await this.doCall("sendBoc",{boc:qe.toString("base64")},Oe)}async estimateFee(qe,bt){return await this.doCall("estimateFee",{address:qe.toString(),body:bt.body.toBoc().toString("base64"),init_data:bt.initData?bt.initData.toBoc().toString("base64"):"",init_code:bt.initCode?bt.initCode.toBoc().toString("base64"):"",ignore_chksig:bt.ignoreSignature},Xe)}async doCall(qe,bt,Ft){let pr={"Content-Type":"application/json","X-Ton-Client-Version":z};this.parameters.apiKey&&(pr["X-API-Key"]=this.parameters.apiKey);let _r=await re.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:qe,params:bt}),{headers:pr,timeout:this.parameters.timeout});if(_r.status!==200||!_r.data.ok)throw Error("Received error: "+JSON.stringify(_r.data));let Vr=Ft.decode(_r.data.result);if((0,P.isRight)(Vr))return Vr.right;throw Error("Malformed response: "+H.default.report(Vr).join(", "))}};i.HttpApi=$e;function Pe(qe){let bt=[];for(let Ft of qe)if(Ft.type==="int")bt.push(["num",Ft.value.toString()]);else if(Ft.type==="cell")bt.push(["tvm.Cell",Ft.cell.toBoc().toString("base64")]);else if(Ft.type==="slice")bt.push(["tvm.Slice",Ft.cell.toBoc().toString("base64")]);else if(Ft.type==="builder")bt.push(["tvm.Builder",Ft.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+Ft.type);return bt}}),PG=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__classPrivateFieldSet||function(K,re,z,ce,Ie){if(ce==="m")throw new TypeError("Private method is not writable");if(ce==="a"&&!Ie)throw new TypeError("Private accessor was defined without a setter");if(typeof re=="function"?K!==re||!Ie:!re.has(K))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ce==="a"?Ie.call(K,z):Ie?Ie.value=z:re.set(K,z),z},k=i&&i.__classPrivateFieldGet||function(K,re,z,ce){if(z==="a"&&!ce)throw new TypeError("Private accessor was defined without a getter");if(typeof re=="function"?K!==re||!ce:!re.has(K))throw new TypeError("Cannot read private member from an object whose class did not declare it");return z==="m"?ce:z==="a"?ce.call(K):ce?ce.value:re.get(K)},N;Object.defineProperty(i,"__esModule",{value:!0}),i.TonClient=void 0;var x=sA(),C=cs(),P=class{constructor(K){N.set(this,void 0),this.parameters={endpoint:K.endpoint},E(this,N,new x.HttpApi(this.parameters.endpoint,{timeout:K.timeout,apiKey:K.apiKey,adapter:K.httpAdapter}),"f")}async getBalance(K){return(await this.getContractState(K)).balance}async runMethod(K,re,z=[]){let ce=await k(this,N,"f").callGetMethod(K,re,z);if(ce.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+ce.exit_code);return{gas_used:ce.gas_used,stack:H(ce.stack)}}async callGetMethod(K,re,z=[]){return this.runMethod(K,re,z)}async runMethodWithError(K,re,z=[]){let ce=await k(this,N,"f").callGetMethod(K,re,z);return{gas_used:ce.gas_used,stack:H(ce.stack),exit_code:ce.exit_code}}async callGetMethodWithError(K,re,z=[]){return this.runMethodWithError(K,re,z)}async getTransactions(K,re){let z=await k(this,N,"f").getTransactions(K,re),ce=[];for(let Ie of z)ce.push((0,C.loadTransaction)(C.Cell.fromBoc(gt.from(Ie.data,"base64"))[0].beginParse()));return ce}async getTransaction(K,re,z){let ce=await k(this,N,"f").getTransaction(K,re,z);return ce?(0,C.loadTransaction)(C.Cell.fromBoc(gt.from(ce.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let K=await k(this,N,"f").getMasterchainInfo();return{workchain:K.init.workchain,shard:K.last.shard,initSeqno:K.init.seqno,latestSeqno:K.last.seqno}}async getWorkchainShards(K){return(await k(this,N,"f").getShards(K)).map(re=>({workchain:re.workchain,shard:re.shard,seqno:re.seqno}))}async getShardTransactions(K,re,z){let ce=await k(this,N,"f").getBlockTransactions(K,re,z);if(ce.incomplete)throw Error("Unsupported");return ce.transactions.map(Ie=>({account:C.Address.parseRaw(Ie.account),lt:Ie.lt,hash:Ie.hash}))}async sendMessage(K){let re=(0,C.beginCell)().store((0,C.storeMessage)(K)).endCell().toBoc();await k(this,N,"f").sendBoc(re)}async sendFile(K){await k(this,N,"f").sendBoc(K)}async estimateExternalMessageFee(K,re){return await k(this,N,"f").estimateFee(K,{body:re.body,initCode:re.initCode,initData:re.initData,ignoreSignature:re.ignoreSignature})}async sendExternalMessage(K,re){if(await this.isContractDeployed(K.address)||!K.init){let z=(0,C.external)({to:K.address,body:re});await this.sendMessage(z)}else{let z=(0,C.external)({to:K.address,init:{code:K.init.code,data:K.init.data},body:re});await this.sendMessage(z)}}async isContractDeployed(K){return(await this.getContractState(K)).state==="active"}async getContractState(K){let re=await k(this,N,"f").getAddressInformation(K),z=BigInt(re.balance),ce=re.state;return{balance:z,state:ce,code:re.code!==""?gt.from(re.code,"base64"):null,data:re.data!==""?gt.from(re.data,"base64"):null,lastTransaction:re.last_transaction_id.lt!=="0"?{lt:re.last_transaction_id.lt,hash:re.last_transaction_id.hash}:null,blockId:{workchain:re.block_id.workchain,shard:re.block_id.shard,seqno:re.block_id.seqno},timestampt:re.sync_utime}}open(K){return(0,C.openContract)(K,re=>G(this,re.address,re.init))}provider(K,re){return G(this,K,re)}};i.TonClient=P,N=new WeakMap;function H(K){let re=[];for(let z of K)if(z[0]==="num"){let ce=z[1];ce.startsWith("-")?re.push({type:"int",value:-BigInt(ce.slice(1))}):re.push({type:"int",value:BigInt(ce)})}else if(z[0]==="null")re.push({type:"null"});else if(z[0]==="cell")re.push({type:"cell",cell:C.Cell.fromBoc(gt.from(z[1].bytes,"base64"))[0]});else if(z[0]==="slice")re.push({type:"slice",cell:C.Cell.fromBoc(gt.from(z[1].bytes,"base64"))[0]});else if(z[0]==="builder")re.push({type:"builder",cell:C.Cell.fromBoc(gt.from(z[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+z[0]);return new C.TupleReader(re)}function G(K,re,z){return{async getState(){let ce=await K.getContractState(re),Ie=ce.balance,Oe=ce.lastTransaction?{lt:BigInt(ce.lastTransaction.lt),hash:gt.from(ce.lastTransaction.hash,"base64")}:null,Xe;if(ce.state==="active")Xe={type:"active",code:ce.code?ce.code:null,data:ce.data?ce.data:null};else if(ce.state==="uninitialized")Xe={type:"uninit"};else if(ce.state==="frozen")Xe={type:"frozen",stateHash:gt.alloc(0)};else throw Error("Unsupported state");return{balance:Ie,last:Oe,state:Xe}},async get(ce,Ie){return{stack:(await K.callGetMethod(re,ce,Ie)).stack}},async external(ce){let Ie=null;z&&!await K.isContractDeployed(re)&&(Ie=z);let Oe=(0,C.external)({to:re,init:Ie?{code:Ie.code,data:Ie.data}:null,body:ce}),Xe=(0,C.beginCell)().store((0,C.storeMessage)(Oe)).endCell().toBoc();await K.sendFile(Xe)},async internal(ce,Ie){let Oe=null;z&&!await K.isContractDeployed(re)&&(Oe=z);let Xe=!0;Ie.bounce!==null&&Ie.bounce!==void 0&&(Xe=Ie.bounce);let Qe;typeof Ie.value=="string"?Qe=(0,C.toNano)(Ie.value):Qe=Ie.value;let Le=null;typeof Ie.body=="string"?Le=(0,C.comment)(Ie.body):Ie.body&&(Le=Ie.body),await ce.send({to:re,value:Qe,bounce:Xe,sendMode:Ie.sendMode,init:Oe,body:Le})}}}}),OG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUrlSafe=void 0;function E(k){for(;k.indexOf("/")>=0;)k=k.replace("/","_");for(;k.indexOf("+")>=0;)k=k.replace("+","-");for(;k.indexOf("=")>=0;)k=k.replace("=","");return k}i.toUrlSafe=E}),BG=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__createBinding||(Object.create?function(Pe,qe,bt,Ft){Ft===void 0&&(Ft=bt),Object.defineProperty(Pe,Ft,{enumerable:!0,get:function(){return qe[bt]}})}:function(Pe,qe,bt,Ft){Ft===void 0&&(Ft=bt),Pe[Ft]=qe[bt]}),k=i&&i.__setModuleDefault||(Object.create?function(Pe,qe){Object.defineProperty(Pe,"default",{enumerable:!0,value:qe})}:function(Pe,qe){Pe.default=qe}),N=i&&i.__importStar||function(Pe){if(Pe&&Pe.__esModule)return Pe;var qe={};if(Pe!=null)for(var bt in Pe)bt!=="default"&&Object.prototype.hasOwnProperty.call(Pe,bt)&&E(qe,Pe,bt);return k(qe,Pe),qe},x=i&&i.__classPrivateFieldSet||function(Pe,qe,bt,Ft,pr){if(Ft==="m")throw new TypeError("Private method is not writable");if(Ft==="a"&&!pr)throw new TypeError("Private accessor was defined without a setter");if(typeof qe=="function"?Pe!==qe||!pr:!qe.has(Pe))throw new TypeError("Cannot write private member to an object whose class did not declare it");return Ft==="a"?pr.call(Pe,bt):pr?pr.value=bt:qe.set(Pe,bt),bt},C=i&&i.__classPrivateFieldGet||function(Pe,qe,bt,Ft){if(bt==="a"&&!Ft)throw new TypeError("Private accessor was defined without a getter");if(typeof qe=="function"?Pe!==qe||!Ft:!qe.has(Pe))throw new TypeError("Cannot read private member from an object whose class did not declare it");return bt==="m"?Ft:bt==="a"?Ft.call(Pe):Ft?Ft.value:qe.get(Pe)},P=i&&i.__importDefault||function(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}},H,G,K;Object.defineProperty(i,"__esModule",{value:!0}),i.TonClient4=void 0;var re=P(aA()),z=N(x3()),ce=cs(),Ie=OG(),Oe=class{constructor(Pe){H.set(this,void 0),G.set(this,void 0),K.set(this,void 0),x(this,H,Pe.endpoint,"f"),x(this,G,Pe.timeout||5e3,"f"),x(this,K,Pe.httpAdapter,"f")}async getLastBlock(){let Pe=await re.default.get(C(this,H,"f")+"/block/latest",{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!Qe.is(Pe.data))throw Error("Mailformed response");return Pe.data}async getBlock(Pe){let qe=await re.default.get(C(this,H,"f")+"/block/"+Pe,{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!Le.is(qe.data))throw Error("Mailformed response");if(!qe.data.exist)throw Error("Block is out of scope");return qe.data.block}async getBlockByUtime(Pe){let qe=await re.default.get(C(this,H,"f")+"/block/utime/"+Pe,{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!Le.is(qe.data))throw Error("Mailformed response");if(!qe.data.exist)throw Error("Block is out of scope");return qe.data.block}async getAccount(Pe,qe){let bt=await re.default.get(C(this,H,"f")+"/block/"+Pe+"/"+qe.toString({urlSafe:!0}),{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!ot.is(bt.data))throw Error("Mailformed response");return bt.data}async getAccountLite(Pe,qe){let bt=await re.default.get(C(this,H,"f")+"/block/"+Pe+"/"+qe.toString({urlSafe:!0})+"/lite",{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!Ct.is(bt.data))throw Error("Mailformed response");return bt.data}async isContractDeployed(Pe,qe){return(await this.getAccountLite(Pe,qe)).account.state.type==="active"}async isAccountChanged(Pe,qe,bt){let Ft=await re.default.get(C(this,H,"f")+"/block/"+Pe+"/"+qe.toString({urlSafe:!0})+"/changed/"+bt.toString(10),{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!We.is(Ft.data))throw Error("Mailformed response");return Ft.data}async getTransaction(Pe,qe,bt){let Ft=qe.toString({urlSafe:!0}),pr=`/block/${Pe}/${Ft}/tx/${bt.toString(10)}`,_r=await re.default.get(new URL(pr,C(this,H,"f")).href,{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!$e.is(_r.data))throw Error("Mailformed response");let Vr=ce.Cell.fromBoc(gt.from(_r.data.boc,"base64"))[0];return{tx:(0,ce.loadTransaction)(Vr.beginParse()),..._r.data}}async getAccountTransactions(Pe,qe,bt){let Ft=await re.default.get(C(this,H,"f")+"/account/"+Pe.toString({urlSafe:!0})+"/tx/"+qe.toString(10)+"/"+(0,Ie.toUrlSafe)(bt.toString("base64")),{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!it.is(Ft.data))throw Error("Mailformed response");let pr=Ft.data,_r=[],Vr=ce.Cell.fromBoc(gt.from(pr.boc,"base64"));for(let Kn=0;Kn0&&(bt="/"+[...qe].sort().join(","));let Ft=await re.default.get(C(this,H,"f")+"/block/"+Pe+"/config"+bt,{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!vt.is(Ft.data))throw Error("Mailformed response");return Ft.data}async runMethod(Pe,qe,bt,Ft){let pr=Ft&&Ft.length>0?"/"+(0,Ie.toUrlSafe)((0,ce.serializeTuple)(Ft).toBoc({idx:!1,crc32:!1}).toString("base64")):"",_r=C(this,H,"f")+"/block/"+Pe+"/"+qe.toString({urlSafe:!0})+"/run/"+bt+pr,Vr=await re.default.get(_r,{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!Ye.is(Vr.data))throw Error("Mailformed response");let Kn=Vr.data.resultRaw?(0,ce.parseTuple)(ce.Cell.fromBoc(gt.from(Vr.data.resultRaw,"base64"))[0]):[];return{exitCode:Vr.data.exitCode,result:Kn,resultRaw:Vr.data.resultRaw,block:Vr.data.block,shardBlock:Vr.data.shardBlock,reader:new ce.TupleReader(Kn)}}async sendMessage(Pe){let qe=await re.default.post(C(this,H,"f")+"/send",{boc:Pe.toString("base64")},{adapter:C(this,K,"f"),timeout:C(this,G,"f")});if(!yt.is(qe.data))throw Error("Mailformed response");return{status:qe.data.status}}open(Pe){return(0,ce.openContract)(Pe,qe=>Xe(this,null,qe.address,qe.init))}openAt(Pe,qe){return(0,ce.openContract)(qe,bt=>Xe(this,Pe,bt.address,bt.init))}provider(Pe,qe){return Xe(this,null,Pe,qe||null)}providerAt(Pe,qe,bt){return Xe(this,Pe,qe,bt||null)}};i.TonClient4=Oe,H=new WeakMap,G=new WeakMap,K=new WeakMap;function Xe(Pe,qe,bt,Ft){return{async getState(){let pr=qe;pr===null&&(pr=(await Pe.getLastBlock()).last.seqno);let _r=await Pe.getAccount(pr,bt),Vr=_r.account.last?{lt:BigInt(_r.account.last.lt),hash:gt.from(_r.account.last.hash,"base64")}:null,Kn;if(_r.account.state.type==="active")Kn={type:"active",code:_r.account.state.code?gt.from(_r.account.state.code,"base64"):null,data:_r.account.state.data?gt.from(_r.account.state.data,"base64"):null};else if(_r.account.state.type==="uninit")Kn={type:"uninit"};else if(_r.account.state.type==="frozen")Kn={type:"frozen",stateHash:gt.from(_r.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(_r.account.balance.coins),last:Vr,state:Kn}},async get(pr,_r){let Vr=qe;Vr===null&&(Vr=(await Pe.getLastBlock()).last.seqno);let Kn=await Pe.runMethod(Vr,bt,pr,_r);if(Kn.exitCode!==0&&Kn.exitCode!==1)throw Error("Exit code: "+Kn.exitCode);return{stack:new ce.TupleReader(Kn.result)}},async external(pr){let _r=await Pe.getLastBlock(),Vr=null;Ft&&(await Pe.getAccountLite(_r.last.seqno,bt)).account.state.type!=="active"&&(Vr=Ft);let Kn=(0,ce.external)({to:bt,init:Vr?{code:Vr.code,data:Vr.data}:null,body:pr}),er=(0,ce.beginCell)().store((0,ce.storeMessage)(Kn)).endCell().toBoc();await Pe.sendMessage(er)},async internal(pr,_r){let Vr=await Pe.getLastBlock(),Kn=null;Ft&&(await Pe.getAccountLite(Vr.last.seqno,bt)).account.state.type!=="active"&&(Kn=Ft);let er=!0;_r.bounce!==null&&_r.bounce!==void 0&&(er=_r.bounce);let li;typeof _r.value=="string"?li=(0,ce.toNano)(_r.value):li=_r.value;let ci=null;typeof _r.body=="string"?ci=(0,ce.comment)(_r.body):_r.body&&(ci=_r.body),await pr.send({to:bt,value:li,bounce:er,sendMode:_r.sendMode,init:Kn,body:ci})}}}var Qe=z.type({last:z.type({seqno:z.number,shard:z.string,workchain:z.number,fileHash:z.string,rootHash:z.string}),init:z.type({fileHash:z.string,rootHash:z.string}),stateRootHash:z.string,now:z.number}),Le=z.union([z.type({exist:z.literal(!1)}),z.type({exist:z.literal(!0),block:z.type({shards:z.array(z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string,transactions:z.array(z.type({account:z.string,hash:z.string,lt:z.string}))}))})})]),tt=z.type({lastPaid:z.number,duePayment:z.union([z.null,z.string]),used:z.type({bits:z.number,cells:z.number,publicCells:z.number})}),ot=z.type({account:z.type({state:z.union([z.type({type:z.literal("uninit")}),z.type({type:z.literal("active"),code:z.union([z.string,z.null]),data:z.union([z.string,z.null])}),z.type({type:z.literal("frozen"),stateHash:z.string})]),balance:z.type({coins:z.string}),last:z.union([z.null,z.type({lt:z.string,hash:z.string})]),storageStat:z.union([z.null,tt])}),block:z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string})}),Ct=z.type({account:z.type({state:z.union([z.type({type:z.literal("uninit")}),z.type({type:z.literal("active"),codeHash:z.string,dataHash:z.string}),z.type({type:z.literal("frozen"),stateHash:z.string})]),balance:z.type({coins:z.string}),last:z.union([z.null,z.type({lt:z.string,hash:z.string})]),storageStat:z.union([z.null,tt])})}),We=z.type({changed:z.boolean,block:z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string})}),Ye=z.type({exitCode:z.number,resultRaw:z.union([z.string,z.null]),block:z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string}),shardBlock:z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string})}),vt=z.type({config:z.type({cell:z.string,address:z.string,globalBalance:z.type({coins:z.string})})}),yt=z.type({status:z.number}),it=z.type({blocks:z.array(z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string,fileHash:z.string})),boc:z.string}),$e=z.type({block:z.type({workchain:z.number,seqno:z.number,shard:z.string,rootHash:z.string}),boc:z.string,proof:z.string})}),Zc=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.createWalletTransferV4=i.createWalletTransferV3=i.createWalletTransferV2=i.createWalletTransferV1=void 0;var E=cs(),k=Ah();function N(H){let G=(0,E.beginCell)().storeUint(H.seqno,32);H.message&&(G.storeUint(H.sendMode,8),G.storeRef((0,E.beginCell)().store((0,E.storeMessageRelaxed)(H.message))));let K=(0,k.sign)(G.endCell().hash(),H.secretKey);return(0,E.beginCell)().storeBuffer(K).storeBuilder(G).endCell()}i.createWalletTransferV1=N;function x(H){if(H.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let G=(0,E.beginCell)().storeUint(H.seqno,32);if(H.seqno===0)for(let re=0;re<32;re++)G.storeBit(1);else G.storeUint(H.timeout||Math.floor(Date.now()/1e3)+60,32);for(let re of H.messages)G.storeUint(H.sendMode,8),G.storeRef((0,E.beginCell)().store((0,E.storeMessageRelaxed)(re)));let K=(0,k.sign)(G.endCell().hash(),H.secretKey);return(0,E.beginCell)().storeBuffer(K).storeBuilder(G).endCell()}i.createWalletTransferV2=x;function C(H){if(H.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let G=(0,E.beginCell)().storeUint(H.walletId,32);if(H.seqno===0)for(let re=0;re<32;re++)G.storeBit(1);else G.storeUint(H.timeout||Math.floor(Date.now()/1e3)+60,32);G.storeUint(H.seqno,32);for(let re of H.messages)G.storeUint(H.sendMode,8),G.storeRef((0,E.beginCell)().store((0,E.storeMessageRelaxed)(re)));let K=(0,k.sign)(G.endCell().hash(),H.secretKey);return(0,E.beginCell)().storeBuffer(K).storeBuilder(G).endCell()}i.createWalletTransferV3=C;function P(H){if(H.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let G=(0,E.beginCell)().storeUint(H.walletId,32);if(H.seqno===0)for(let re=0;re<32;re++)G.storeBit(1);else G.storeUint(H.timeout||Math.floor(Date.now()/1e3)+60,32);G.storeUint(H.seqno,32),G.storeUint(0,8);for(let re of H.messages)G.storeUint(H.sendMode,8),G.storeRef((0,E.beginCell)().store((0,E.storeMessageRelaxed)(re)));let K=(0,k.sign)(G.endCell().hash(),H.secretKey);return(0,E.beginCell)().storeBuffer(K).storeBuilder(G).endCell()}i.createWalletTransferV4=P}),UG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R1=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C){this.workchain=x,this.publicKey=C;let P=E.Cell.fromBoc(gt.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],H=(0,E.beginCell)().storeUint(0,32).storeBuffer(C).endCell();this.init={code:P,data:H},this.address=(0,E.contractAddress)(x,{code:P,data:H})}static create(x){return new N(x.workchain,x.publicKey)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){let C=await x.getState();return C.state.type==="active"?E.Cell.fromBoc(C.state.data)[0].beginParse().loadUint(32):0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV1)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,message:x.message})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,message:(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})});await this.send(x,G)}}}};i.WalletContractV1R1=N}),NG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R2=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C){this.workchain=x,this.publicKey=C;let P=E.Cell.fromBoc(gt.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],H=(0,E.beginCell)().storeUint(0,32).storeBuffer(C).endCell();this.init={code:P,data:H},this.address=(0,E.contractAddress)(x,{code:P,data:H})}static create(x){return new N(x.workchain,x.publicKey)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV1)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,message:x.message})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,message:(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})});await this.send(x,G)}}}};i.WalletContractV1R2=N}),LG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R3=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C){this.workchain=x,this.publicKey=C;let P=E.Cell.fromBoc(gt.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],H=(0,E.beginCell)().storeUint(0,32).storeBuffer(C).endCell();this.init={code:P,data:H},this.address=(0,E.contractAddress)(x,{code:P,data:H})}static create(x){return new N(x.workchain,x.publicKey)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV1)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,message:x.message})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,message:(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})});await this.send(x,G)}}}};i.WalletContractV1R3=N}),DG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV2R1=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C){this.workchain=x,this.publicKey=C;let P=E.Cell.fromBoc(gt.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],H=(0,E.beginCell)().storeUint(0,32).storeBuffer(C).endCell();this.init={code:P,data:H},this.address=(0,E.contractAddress)(x,{code:P,data:H})}static create(x){return new N(x.workchain,x.publicKey)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV2)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,messages:x.messages,timeout:x.timeout})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,messages:[(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})]});await this.send(x,G)}}}};i.WalletContractV2R1=N}),$G=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV2R2=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C){this.workchain=x,this.publicKey=C;let P=E.Cell.fromBoc(gt.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],H=(0,E.beginCell)().storeUint(0,32).storeBuffer(C).endCell();this.init={code:P,data:H},this.address=(0,E.contractAddress)(x,{code:P,data:H})}static create(x){return new N(x.workchain,x.publicKey)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV2)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,messages:x.messages,timeout:x.timeout})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,messages:[(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})]});await this.send(x,G)}}}};i.WalletContractV2R2=N}),FG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV3R1=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C,P){this.workchain=x,this.publicKey=C,P!=null?this.walletId=P:this.walletId=698983191+x;let H=E.Cell.fromBoc(gt.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],G=(0,E.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(C).endCell();this.init={code:H,data:G},this.address=(0,E.contractAddress)(x,{code:H,data:G})}static create(x){return new N(x.workchain,x.publicKey,x.walletId)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV3)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,messages:x.messages,timeout:x.timeout,walletId:this.walletId})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,messages:[(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})]});await this.send(x,G)}}}};i.WalletContractV3R1=N}),jG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV3R2=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C,P){this.workchain=x,this.publicKey=C,P!=null?this.walletId=P:this.walletId=698983191+x;let H=E.Cell.fromBoc(gt.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],G=(0,E.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(C).endCell();this.init={code:H,data:G},this.address=(0,E.contractAddress)(x,{code:H,data:G})}static create(x){return new N(x.workchain,x.publicKey,x.walletId)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV3)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,messages:x.messages,timeout:x.timeout,walletId:this.walletId})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,messages:[(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})]});await this.send(x,G)}}}};i.WalletContractV3R2=N}),WG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV4=void 0;var E=cs(),k=Zc(),N=class{constructor(x,C,P){this.workchain=x,this.publicKey=C,P!=null?this.walletId=P:this.walletId=698983191+x;let H=E.Cell.fromBoc(gt.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],G=(0,E.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:H,data:G},this.address=(0,E.contractAddress)(x,{code:H,data:G})}static create(x){return new N(x.workchain,x.publicKey,x.walletId)}async getBalance(x){return(await x.getState()).balance}async getSeqno(x){return(await x.getState()).state.type==="active"?(await x.get("seqno",[])).stack.readNumber():0}async send(x,C){await x.external(C)}async sendTransfer(x,C){let P=this.createTransfer(C);await this.send(x,P)}createTransfer(x){let C=E.SendMode.PAY_GAS_SEPARATELY;return x.sendMode!==null&&x.sendMode!==void 0&&(C=x.sendMode),(0,k.createWalletTransferV4)({seqno:x.seqno,sendMode:C,secretKey:x.secretKey,messages:x.messages,timeout:x.timeout,walletId:this.walletId})}sender(x,C){return{send:async P=>{let H=await this.getSeqno(x),G=this.createTransfer({seqno:H,secretKey:C,sendMode:P.sendMode,messages:[(0,E.internal)({to:P.to,value:P.value,init:P.init,body:P.body,bounce:P.bounce})]});await this.send(x,G)}}}};i.WalletContractV4=N}),zG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.JettonMaster=void 0;var E=cs(),k=class{constructor(N){this.address=N}static create(N){return new k(N)}async getWalletAddress(N,x){return(await N.get("get_wallet_address",[{type:"slice",cell:(0,E.beginCell)().storeAddress(x).endCell()}])).stack.readAddress()}async getJettonData(N){let x=await N.get("get_jetton_data",[]),C=x.stack.readBigNumber(),P=x.stack.readBoolean(),H=x.stack.readAddress(),G=x.stack.readCell(),K=x.stack.readCell();return{totalSupply:C,mintable:P,adminAddress:H,content:G,walletCode:K}}};i.JettonMaster=k}),HG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.JettonWallet=void 0;var E=class{constructor(k){this.address=k}static create(k){return new E(k)}async getBalance(k){return(await k.getState()).state.type!=="active"?0n:(await k.get("get_wallet_data",[])).stack.readBigNumber()}};i.JettonWallet=E}),lA=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigOrder=void 0;var E=Ah(),k=cs(),N=class{constructor(x){this.signatures={},this.payload=x}static fromCell(x){let C=x.beginParse(),P=C.loadMaybeRef()?.beginParse(),H=C.asCell(),G=new N(H);if(P){for(;P.remainingBits>0;){let K=P.loadBuffer(64),re=P.loadUint(8);G.signatures[re]=K,P.remainingRefs>0?P=P.loadRef().asSlice():P.skip(1)}P.endParse()}return G}static fromPayload(x){return new N(x)}addSignature(x,C,P){let H=this.payload.hash();if(!(0,E.signVerify)(H,C,P.owners.get(x).slice(0,-1)))throw Error("invalid signature");this.signatures[x]=C}sign(x,C){let P=this.payload.hash();return this.signatures[x]=(0,E.sign)(P,C),P}unionSignatures(x){this.signatures=Object.assign({},this.signatures,x.signatures)}clearSignatures(){this.signatures={}}toCell(x){let C=(0,k.beginCell)().storeBit(0);for(let P in this.signatures){let H=this.signatures[P];C=(0,k.beginCell)().storeBit(1).storeRef((0,k.beginCell)().storeBuffer(H).storeUint(parseInt(P),8).storeBuilder(C).endCell())}return(0,k.beginCell)().storeUint(x,8).storeBuilder(C).storeBuilder(this.payload.asBuilder()).endCell()}};i.MultisigOrder=N}),qG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigOrderBuilder=void 0;var E=cs(),k=lA(),N=class{constructor(x,C){this.messages=(0,E.beginCell)(),this.queryId=0n,this.walletId=x,this.queryOffset=C||7200}addMessage(x,C){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(C,8),this.messages.storeRef((0,E.beginCell)().store((0,E.storeMessageRelaxed)(x)).endCell())}clearMessages(){this.messages=(0,E.beginCell)()}build(){return k.MultisigOrder.fromPayload((0,E.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){let x=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=x<<32n}};i.MultisigOrderBuilder=N}),KG=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigWallet=void 0;var E=Ah(),k=cs(),N=k.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=="),x=class{constructor(C,P,H,G,K){this.provider=null,this.owners=k.Dictionary.empty(),this.workchain=P,this.walletId=H,this.k=G;for(let re=0;re{A(),M(),B(),St(),ve();var E=i&&i.__createBinding||(Object.create?function(ot,Ct,We,Ye){Ye===void 0&&(Ye=We),Object.defineProperty(ot,Ye,{enumerable:!0,get:function(){return Ct[We]}})}:function(ot,Ct,We,Ye){Ye===void 0&&(Ye=We),ot[Ye]=Ct[We]}),k=i&&i.__exportStar||function(ot,Ct){for(var We in ot)We!=="default"&&!Object.prototype.hasOwnProperty.call(Ct,We)&&E(Ct,ot,We)};Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigWallet=i.MultisigOrderBuilder=i.MultisigOrder=i.JettonWallet=i.JettonMaster=i.WalletContractV4=i.WalletContractV3R2=i.WalletContractV3R1=i.WalletContractV2R2=i.WalletContractV2R1=i.WalletContractV1R3=i.WalletContractV1R2=i.WalletContractV1R1=i.TonClient4=i.TonClient=i.HttpApi=void 0,k(cs(),i);var N=sA();Object.defineProperty(i,"HttpApi",{enumerable:!0,get:function(){return N.HttpApi}});var x=PG();Object.defineProperty(i,"TonClient",{enumerable:!0,get:function(){return x.TonClient}});var C=BG();Object.defineProperty(i,"TonClient4",{enumerable:!0,get:function(){return C.TonClient4}});var P=UG();Object.defineProperty(i,"WalletContractV1R1",{enumerable:!0,get:function(){return P.WalletContractV1R1}});var H=NG();Object.defineProperty(i,"WalletContractV1R2",{enumerable:!0,get:function(){return H.WalletContractV1R2}});var G=LG();Object.defineProperty(i,"WalletContractV1R3",{enumerable:!0,get:function(){return G.WalletContractV1R3}});var K=DG();Object.defineProperty(i,"WalletContractV2R1",{enumerable:!0,get:function(){return K.WalletContractV2R1}});var re=$G();Object.defineProperty(i,"WalletContractV2R2",{enumerable:!0,get:function(){return re.WalletContractV2R2}});var z=FG();Object.defineProperty(i,"WalletContractV3R1",{enumerable:!0,get:function(){return z.WalletContractV3R1}});var ce=jG();Object.defineProperty(i,"WalletContractV3R2",{enumerable:!0,get:function(){return ce.WalletContractV3R2}});var Ie=WG();Object.defineProperty(i,"WalletContractV4",{enumerable:!0,get:function(){return Ie.WalletContractV4}});var Oe=zG();Object.defineProperty(i,"JettonMaster",{enumerable:!0,get:function(){return Oe.JettonMaster}});var Xe=HG();Object.defineProperty(i,"JettonWallet",{enumerable:!0,get:function(){return Xe.JettonWallet}});var Qe=lA();Object.defineProperty(i,"MultisigOrder",{enumerable:!0,get:function(){return Qe.MultisigOrder}});var Le=qG();Object.defineProperty(i,"MultisigOrderBuilder",{enumerable:!0,get:function(){return Le.MultisigOrderBuilder}});var tt=KG();Object.defineProperty(i,"MultisigWallet",{enumerable:!0,get:function(){return tt.MultisigWallet}})}),GG=c((i,E)=>{A(),M(),B(),St(),ve(),function(k,N){N(typeof i=="object"&&typeof E<"u"?i:k.WHATWGFetch={})}(i,function(k){var N=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof N<"u"&&N,x={searchParams:"URLSearchParams"in N,iterable:"Symbol"in N&&"iterator"in Symbol,blob:"FileReader"in N&&"Blob"in N&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in N,arrayBuffer:"ArrayBuffer"in N};function C(Pe){return Pe&&DataView.prototype.isPrototypeOf(Pe)}if(x.arrayBuffer)var P=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],H=ArrayBuffer.isView||function(Pe){return Pe&&P.indexOf(Object.prototype.toString.call(Pe))>-1};function G(Pe){if(typeof Pe!="string"&&(Pe=String(Pe)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(Pe)||Pe==="")throw new TypeError('Invalid character in header field name: "'+Pe+'"');return Pe.toLowerCase()}function K(Pe){return typeof Pe!="string"&&(Pe=String(Pe)),Pe}function re(Pe){var qe={next:function(){var bt=Pe.shift();return{done:bt===void 0,value:bt}}};return x.iterable&&(qe[Symbol.iterator]=function(){return qe}),qe}function z(Pe){this.map={},Pe instanceof z?Pe.forEach(function(qe,bt){this.append(bt,qe)},this):Array.isArray(Pe)?Pe.forEach(function(qe){this.append(qe[0],qe[1])},this):Pe&&Object.getOwnPropertyNames(Pe).forEach(function(qe){this.append(qe,Pe[qe])},this)}z.prototype.append=function(Pe,qe){Pe=G(Pe),qe=K(qe);var bt=this.map[Pe];this.map[Pe]=bt?bt+", "+qe:qe},z.prototype.delete=function(Pe){delete this.map[G(Pe)]},z.prototype.get=function(Pe){return Pe=G(Pe),this.has(Pe)?this.map[Pe]:null},z.prototype.has=function(Pe){return this.map.hasOwnProperty(G(Pe))},z.prototype.set=function(Pe,qe){this.map[G(Pe)]=K(qe)},z.prototype.forEach=function(Pe,qe){for(var bt in this.map)this.map.hasOwnProperty(bt)&&Pe.call(qe,this.map[bt],bt,this)},z.prototype.keys=function(){var Pe=[];return this.forEach(function(qe,bt){Pe.push(bt)}),re(Pe)},z.prototype.values=function(){var Pe=[];return this.forEach(function(qe){Pe.push(qe)}),re(Pe)},z.prototype.entries=function(){var Pe=[];return this.forEach(function(qe,bt){Pe.push([bt,qe])}),re(Pe)},x.iterable&&(z.prototype[Symbol.iterator]=z.prototype.entries);function ce(Pe){if(Pe.bodyUsed)return Promise.reject(new TypeError("Already read"));Pe.bodyUsed=!0}function Ie(Pe){return new Promise(function(qe,bt){Pe.onload=function(){qe(Pe.result)},Pe.onerror=function(){bt(Pe.error)}})}function Oe(Pe){var qe=new FileReader,bt=Ie(qe);return qe.readAsArrayBuffer(Pe),bt}function Xe(Pe){var qe=new FileReader,bt=Ie(qe);return qe.readAsText(Pe),bt}function Qe(Pe){for(var qe=new Uint8Array(Pe),bt=new Array(qe.length),Ft=0;Ft-1?qe:Pe}function We(Pe,qe){if(!(this instanceof We))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');qe=qe||{};var bt=qe.body;if(Pe instanceof We){if(Pe.bodyUsed)throw new TypeError("Already read");this.url=Pe.url,this.credentials=Pe.credentials,qe.headers||(this.headers=new z(Pe.headers)),this.method=Pe.method,this.mode=Pe.mode,this.signal=Pe.signal,!bt&&Pe._bodyInit!=null&&(bt=Pe._bodyInit,Pe.bodyUsed=!0)}else this.url=String(Pe);if(this.credentials=qe.credentials||this.credentials||"same-origin",(qe.headers||!this.headers)&&(this.headers=new z(qe.headers)),this.method=Ct(qe.method||this.method||"GET"),this.mode=qe.mode||this.mode||null,this.signal=qe.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&bt)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(bt),(this.method==="GET"||this.method==="HEAD")&&(qe.cache==="no-store"||qe.cache==="no-cache")){var Ft=/([?&])_=[^&]*/;if(Ft.test(this.url))this.url=this.url.replace(Ft,"$1_="+new Date().getTime());else{var pr=/\?/;this.url+=(pr.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}We.prototype.clone=function(){return new We(this,{body:this._bodyInit})};function Ye(Pe){var qe=new FormData;return Pe.trim().split("&").forEach(function(bt){if(bt){var Ft=bt.split("="),pr=Ft.shift().replace(/\+/g," "),_r=Ft.join("=").replace(/\+/g," ");qe.append(decodeURIComponent(pr),decodeURIComponent(_r))}}),qe}function vt(Pe){var qe=new z,bt=Pe.replace(/\r?\n[\t ]+/g," ");return bt.split("\r").map(function(Ft){return Ft.indexOf(` -`)===0?Ft.substr(1,Ft.length):Ft}).forEach(function(Ft){var pr=Ft.split(":"),_r=pr.shift().trim();if(_r){var Vr=pr.join(":").trim();qe.append(_r,Vr)}}),qe}tt.call(We.prototype);function yt(Pe,qe){if(!(this instanceof yt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');qe||(qe={}),this.type="default",this.status=qe.status===void 0?200:qe.status,this.ok=this.status>=200&&this.status<300,this.statusText=qe.statusText===void 0?"":""+qe.statusText,this.headers=new z(qe.headers),this.url=qe.url||"",this._initBody(Pe)}tt.call(yt.prototype),yt.prototype.clone=function(){return new yt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new z(this.headers),url:this.url})},yt.error=function(){var Pe=new yt(null,{status:0,statusText:""});return Pe.type="error",Pe};var it=[301,302,303,307,308];yt.redirect=function(Pe,qe){if(it.indexOf(qe)===-1)throw new RangeError("Invalid status code");return new yt(null,{status:qe,headers:{location:Pe}})},k.DOMException=N.DOMException;try{new k.DOMException}catch{k.DOMException=function(Pe,qe){this.message=Pe,this.name=qe;var bt=Error(Pe);this.stack=bt.stack},k.DOMException.prototype=Object.create(Error.prototype),k.DOMException.prototype.constructor=k.DOMException}function $e(Pe,qe){return new Promise(function(bt,Ft){var pr=new We(Pe,qe);if(pr.signal&&pr.signal.aborted)return Ft(new k.DOMException("Aborted","AbortError"));var _r=new XMLHttpRequest;function Vr(){_r.abort()}_r.onload=function(){var er={status:_r.status,statusText:_r.statusText,headers:vt(_r.getAllResponseHeaders()||"")};er.url="responseURL"in _r?_r.responseURL:er.headers.get("X-Request-URL");var li="response"in _r?_r.response:_r.responseText;setTimeout(function(){bt(new yt(li,er))},0)},_r.onerror=function(){setTimeout(function(){Ft(new TypeError("Network request failed"))},0)},_r.ontimeout=function(){setTimeout(function(){Ft(new TypeError("Network request failed"))},0)},_r.onabort=function(){setTimeout(function(){Ft(new k.DOMException("Aborted","AbortError"))},0)};function Kn(er){try{return er===""&&N.location.href?N.location.href:er}catch{return er}}_r.open(pr.method,Kn(pr.url),!0),pr.credentials==="include"?_r.withCredentials=!0:pr.credentials==="omit"&&(_r.withCredentials=!1),"responseType"in _r&&(x.blob?_r.responseType="blob":x.arrayBuffer&&pr.headers.get("Content-Type")&&pr.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(_r.responseType="arraybuffer")),qe&&typeof qe.headers=="object"&&!(qe.headers instanceof z)?Object.getOwnPropertyNames(qe.headers).forEach(function(er){_r.setRequestHeader(er,K(qe.headers[er]))}):pr.headers.forEach(function(er,li){_r.setRequestHeader(li,er)}),pr.signal&&(pr.signal.addEventListener("abort",Vr),_r.onreadystatechange=function(){_r.readyState===4&&pr.signal.removeEventListener("abort",Vr)}),_r.send(typeof pr._bodyInit>"u"?null:pr._bodyInit)})}$e.polyfill=!0,N.fetch||(N.fetch=$e,N.Headers=z,N.Request=We,N.Response=yt),k.Headers=z,k.Request=We,k.Response=yt,k.fetch=$e,Object.defineProperty(k,"__esModule",{value:!0})})}),YG=c((i,E)=>{A(),M(),B(),St(),ve(),GG(),E.exports=self.fetch.bind(self)}),XG=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__awaiter||function(x,C,P,H){function G(K){return K instanceof P?K:new P(function(re){re(K)})}return new(P||(P=Promise))(function(K,re){function z(Oe){try{Ie(H.next(Oe))}catch(Xe){re(Xe)}}function ce(Oe){try{Ie(H.throw(Oe))}catch(Xe){re(Xe)}}function Ie(Oe){Oe.done?K(Oe.value):G(Oe.value).then(z,ce)}Ie((H=H.apply(x,C||[])).next())})};Object.defineProperty(i,"__esModule",{value:!0}),i.Nodes=void 0,YG();var k=2*60*1e3,N=class{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(x){return E(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let C=[];try{C=yield(yield fetch(x)).json()}catch(P){throw new Error(`exception in fetch(${x}): ${P}`)}for(let P of C)P.Healthy==="1"&&this.topology.push(P);if(this.topology.length===0)throw new Error("no healthy nodes retrieved")})}getHealthyFor(x){var C;let P=[];for(let H of this.topology)this.initTime-H.Mngr.successTS0&&!((C=H.Mngr)===null||C===void 0)&&C.health[x]&&P.push(H);return P}};i.Nodes=N}),QG=c((i,E)=>{E.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"}}}),ZG=c(i=>{A(),M(),B(),St(),ve();var E=i&&i.__awaiter||function(K,re,z,ce){function Ie(Oe){return Oe instanceof z?Oe:new z(function(Xe){Xe(Oe)})}return new(z||(z=Promise))(function(Oe,Xe){function Qe(ot){try{tt(ce.next(ot))}catch(Ct){Xe(Ct)}}function Le(ot){try{tt(ce.throw(ot))}catch(Ct){Xe(Ct)}}function tt(ot){ot.done?Oe(ot.value):Ie(ot.value).then(Qe,Le)}tt((ce=ce.apply(K,re||[])).next())})};Object.defineProperty(i,"__esModule",{value:!0}),i.getHttpV4Endpoint=i.getHttpV4Endpoints=i.getHttpEndpoint=i.getHttpEndpoints=i.Access=void 0;var k=XG(),N=class{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new k.Nodes}init(){return E(this,void 0,void 0,function*(){let K=QG();yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${K.version}`)})}makeProtonet(K,re){let z="";switch(K){case"toncenter-api-v2":z+="v2-";break;case"ton-api-v4":z+="v4-";break}return z+=re,z}weightedRandom(K){let re=0;for(let Ie of K)re+=Ie.Weight;let z=Math.floor(Math.random()*re),ce=0;for(let Ie of K){if(z>=ce&&zo1,__asyncDelegator:()=>fY,__asyncGenerator:()=>cY,__asyncValues:()=>dY,__await:()=>q0,__awaiter:()=>iY,__classPrivateFieldGet:()=>mY,__classPrivateFieldSet:()=>vY,__createBinding:()=>aY,__decorate:()=>tY,__exportStar:()=>sY,__extends:()=>JG,__generator:()=>oY,__importDefault:()=>gY,__importStar:()=>pY,__makeTemplateObject:()=>hY,__metadata:()=>nY,__param:()=>rY,__read:()=>uA,__rest:()=>eY,__spread:()=>lY,__spreadArrays:()=>uY,__values:()=>M3});function JG(i,E){i1(i,E);function k(){this.constructor=i}i.prototype=E===null?Object.create(E):(k.prototype=E.prototype,new k)}function eY(i,E){var k={};for(var N in i)Object.prototype.hasOwnProperty.call(i,N)&&E.indexOf(N)<0&&(k[N]=i[N]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,N=Object.getOwnPropertySymbols(i);x=0;H--)(P=i[H])&&(C=(x<3?P(C):x>3?P(E,k,C):P(E,k))||C);return x>3&&C&&Object.defineProperty(E,k,C),C}function rY(i,E){return function(k,N){E(k,N,i)}}function nY(i,E){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,E)}function iY(i,E,k,N){function x(C){return C instanceof k?C:new k(function(P){P(C)})}return new(k||(k=Promise))(function(C,P){function H(re){try{K(N.next(re))}catch(z){P(z)}}function G(re){try{K(N.throw(re))}catch(z){P(z)}}function K(re){re.done?C(re.value):x(re.value).then(H,G)}K((N=N.apply(i,E||[])).next())})}function oY(i,E){var k={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},N,x,C,P;return P={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(P[Symbol.iterator]=function(){return this}),P;function H(K){return function(re){return G([K,re])}}function G(K){if(N)throw new TypeError("Generator is already executing.");for(;k;)try{if(N=1,x&&(C=K[0]&2?x.return:K[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,K[1])).done)return C;switch(x=0,C&&(K=[K[0]&2,C.value]),K[0]){case 0:case 1:C=K;break;case 4:return k.label++,{value:K[1],done:!1};case 5:k.label++,x=K[1],K=[0];continue;case 7:K=k.ops.pop(),k.trys.pop();continue;default:if(C=k.trys,!(C=C.length>0&&C[C.length-1])&&(K[0]===6||K[0]===2)){k=0;continue}if(K[0]===3&&(!C||K[1]>C[0]&&K[1]=i.length&&(i=void 0),{value:i&&i[N++],done:!i}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")}function uA(i,E){var k=typeof Symbol=="function"&&i[Symbol.iterator];if(!k)return i;var N=k.call(i),x,C=[],P;try{for(;(E===void 0||E-- >0)&&!(x=N.next()).done;)C.push(x.value)}catch(H){P={error:H}}finally{try{x&&!x.done&&(k=N.return)&&k.call(N)}finally{if(P)throw P.error}}return C}function lY(){for(var i=[],E=0;E1||H(ce,Ie)})})}function H(ce,Ie){try{G(N[ce](Ie))}catch(Oe){z(C[0][3],Oe)}}function G(ce){ce.value instanceof q0?Promise.resolve(ce.value.v).then(K,re):z(C[0][2],ce)}function K(ce){H("next",ce)}function re(ce){H("throw",ce)}function z(ce,Ie){ce(Ie),C.shift(),C.length&&H(C[0][0],C[0][1])}}function fY(i){var E,k;return E={},N("next"),N("throw",function(x){throw x}),N("return"),E[Symbol.iterator]=function(){return this},E;function N(x,C){E[x]=i[x]?function(P){return(k=!k)?{value:q0(i[x](P)),done:x==="return"}:C?C(P):P}:C}}function dY(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=i[Symbol.asyncIterator],k;return E?E.call(i):(i=typeof M3=="function"?M3(i):i[Symbol.iterator](),k={},N("next"),N("throw"),N("return"),k[Symbol.asyncIterator]=function(){return this},k);function N(C){k[C]=i[C]&&function(P){return new Promise(function(H,G){P=i[C](P),x(H,G,P.done,P.value)})}}function x(C,P,H,G){Promise.resolve(G).then(function(K){C({value:K,done:H})},P)}}function hY(i,E){return Object.defineProperty?Object.defineProperty(i,"raw",{value:E}):i.raw=E,i}function pY(i){if(i&&i.__esModule)return i;var E={};if(i!=null)for(var k in i)Object.hasOwnProperty.call(i,k)&&(E[k]=i[k]);return E.default=i,E}function gY(i){return i&&i.__esModule?i:{default:i}}function mY(i,E){if(!E.has(i))throw new TypeError("attempted to get private field on non-instance");return E.get(i)}function vY(i,E,k){if(!E.has(i))throw new TypeError("attempted to set private field on non-instance");return E.set(i,k),k}var i1,o1,cA=l(()=>{A(),M(),B(),St(),ve(),i1=function(i,E){return i1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,N){k.__proto__=N}||function(k,N){for(var x in N)N.hasOwnProperty(x)&&(k[x]=N[x])},i1(i,E)},o1=function(){return o1=Object.assign||function(i){for(var E,k=1,N=arguments.length;k{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.MAX_HASHABLE_LENGTH=i.INIT=i.KEY=i.DIGEST_LENGTH=i.BLOCK_SIZE=void 0,i.BLOCK_SIZE=64,i.DIGEST_LENGTH=32,i.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]),i.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1}),yY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.RawSha256=void 0;var E=fA(),k=function(){function N(){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 N.prototype.update=function(x){if(this.finished)throw new Error("Attempted to update an already finished hash.");var C=0,P=x.byteLength;if(this.bytesHashed+=P,this.bytesHashed*8>E.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;P>0;)this.buffer[this.bufferLength++]=x[C++],P--,this.bufferLength===E.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},N.prototype.digest=function(){if(!this.finished){var x=this.bytesHashed*8,C=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),P=this.bufferLength;if(C.setUint8(this.bufferLength++,128),P%E.BLOCK_SIZE>=E.BLOCK_SIZE-8){for(var H=this.bufferLength;H>>24&255,G[H*4+1]=this.state[H]>>>16&255,G[H*4+2]=this.state[H]>>>8&255,G[H*4+3]=this.state[H]>>>0&255;return G},N.prototype.hashBuffer=function(){for(var x=this,C=x.buffer,P=x.state,H=P[0],G=P[1],K=P[2],re=P[3],z=P[4],ce=P[5],Ie=P[6],Oe=P[7],Xe=0;Xe>>17|Qe<<15)^(Qe>>>19|Qe<<13)^Qe>>>10;Qe=this.temp[Xe-15];var tt=(Qe>>>7|Qe<<25)^(Qe>>>18|Qe<<14)^Qe>>>3;this.temp[Xe]=(Le+this.temp[Xe-7]|0)+(tt+this.temp[Xe-16]|0)}var ot=(((z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7))+(z&ce^~z&Ie)|0)+(Oe+(E.KEY[Xe]+this.temp[Xe]|0)|0)|0,Ct=((H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10))+(H&G^H&K^G&K)|0;Oe=Ie,Ie=ce,ce=z,z=re+ot|0,re=K,K=G,G=H,H=ot+Ct|0}P[0]+=H,P[1]+=G,P[2]+=K,P[3]+=re,P[4]+=z,P[5]+=ce,P[6]+=Ie,P[7]+=Oe},N}();i.RawSha256=k}),bY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;var E=N=>{let x=[];for(let C=0,P=N.length;C>6|192,H&63|128);else if(C+1>18|240,G>>12&63|128,G>>6&63|128,G&63|128)}else x.push(H>>12|224,H>>6&63|128,H&63|128)}return Uint8Array.from(x)};i.fromUtf8=E;var k=N=>{let x="";for(let C=0,P=N.length;CK.toString(16)).join("%");x+=decodeURIComponent(G)}else x+=String.fromCharCode((H&15)<<12|(N[++C]&63)<<6|N[++C]&63)}return x};i.toUtf8=k}),wY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;function E(N){return new TextEncoder().encode(N)}i.fromUtf8=E;function k(N){return new TextDecoder("utf-8").decode(N)}i.toUtf8=k}),xY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;var E=bY(),k=wY(),N=C=>typeof TextEncoder=="function"?(0,k.fromUtf8)(C):(0,E.fromUtf8)(C);i.fromUtf8=N;var x=C=>typeof TextDecoder=="function"?(0,k.toUtf8)(C):(0,E.toUtf8)(C);i.toUtf8=x}),_Y=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.convertToBuffer=void 0;var E=xY(),k=typeof gt<"u"&>.from?function(x){return gt.from(x,"utf8")}:E.fromUtf8;function N(x){return x instanceof Uint8Array?x:typeof x=="string"?k(x):ArrayBuffer.isView(x)?new Uint8Array(x.buffer,x.byteOffset,x.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(x)}i.convertToBuffer=N}),SY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.isEmptyData=void 0;function E(k){return typeof k=="string"?k.length===0:k.byteLength===0}i.isEmptyData=E}),EY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.numToUint8=void 0;function E(k){return new Uint8Array([(k&4278190080)>>24,(k&16711680)>>16,(k&65280)>>8,k&255])}i.numToUint8=E}),CY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=void 0;function E(k){if(!Uint32Array.from){for(var N=new Uint32Array(k.length),x=0;x{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=i.numToUint8=i.isEmptyData=i.convertToBuffer=void 0;var E=_Y();Object.defineProperty(i,"convertToBuffer",{enumerable:!0,get:function(){return E.convertToBuffer}});var k=SY();Object.defineProperty(i,"isEmptyData",{enumerable:!0,get:function(){return k.isEmptyData}});var N=EY();Object.defineProperty(i,"numToUint8",{enumerable:!0,get:function(){return N.numToUint8}});var x=CY();Object.defineProperty(i,"uint32ArrayFrom",{enumerable:!0,get:function(){return x.uint32ArrayFrom}})}),kY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0}),i.Sha256=void 0;var E=(cA(),T(C3)),k=fA(),N=yY(),x=MY(),C=function(){function H(G){if(this.hash=new N.RawSha256,G){this.outer=new N.RawSha256;var K=P(G),re=new Uint8Array(k.BLOCK_SIZE);re.set(K);for(var z=0;zk.BLOCK_SIZE){var K=new N.RawSha256;K.update(G),G=K.digest()}var re=new Uint8Array(k.BLOCK_SIZE);return re.set(G),re}}),RY=c(i=>{A(),M(),B(),St(),ve(),Object.defineProperty(i,"__esModule",{value:!0});var E=(cA(),T(C3));E.__exportStar(kY(),i)}),AY=c((i,E)=>{A(),M(),B(),St(),ve();var k={exports:{}};function N(at){return at instanceof Map?at.clear=at.delete=at.set=function(){throw new Error("map is read-only")}:at instanceof Set&&(at.add=at.clear=at.delete=function(){throw new Error("set is read-only")}),Object.freeze(at),Object.getOwnPropertyNames(at).forEach(function(Br){var xn=at[Br];typeof xn=="object"&&!Object.isFrozen(xn)&&N(xn)}),at}k.exports=N,k.exports.default=N;var x=class{constructor(at){at.data===void 0&&(at.data={}),this.data=at.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function C(at){return at.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function P(at,...Br){let xn=Object.create(null);for(let Yn in at)xn[Yn]=at[Yn];return Br.forEach(function(Yn){for(let At in Yn)xn[At]=Yn[At]}),xn}var H="
    ",G=at=>!!at.scope||at.sublanguage&&at.language,K=(at,{prefix:Br})=>{if(at.includes(".")){let xn=at.split(".");return[`${Br}${xn.shift()}`,...xn.map((Yn,At)=>`${Yn}${"_".repeat(At+1)}`)].join(" ")}return`${Br}${at}`},re=class{constructor(at,Br){this.buffer="",this.classPrefix=Br.classPrefix,at.walk(this)}addText(at){this.buffer+=C(at)}openNode(at){if(!G(at))return;let Br="";at.sublanguage?Br=`language-${at.language}`:Br=K(at.scope,{prefix:this.classPrefix}),this.span(Br)}closeNode(at){G(at)&&(this.buffer+=H)}value(){return this.buffer}span(at){this.buffer+=``}},z=(at={})=>{let Br={children:[]};return Object.assign(Br,at),Br},ce=class{constructor(){this.rootNode=z(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(at){this.top.children.push(at)}openNode(at){let Br=z({scope:at});this.add(Br),this.stack.push(Br)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(at){return this.constructor._walk(at,this.rootNode)}static _walk(at,Br){return typeof Br=="string"?at.addText(Br):Br.children&&(at.openNode(Br),Br.children.forEach(xn=>this._walk(at,xn)),at.closeNode(Br)),at}static _collapse(at){typeof at!="string"&&at.children&&(at.children.every(Br=>typeof Br=="string")?at.children=[at.children.join("")]:at.children.forEach(Br=>{ce._collapse(Br)}))}},Ie=class extends ce{constructor(at){super(),this.options=at}addKeyword(at,Br){at!==""&&(this.openNode(Br),this.addText(at),this.closeNode())}addText(at){at!==""&&this.add(at)}addSublanguage(at,Br){let xn=at.root;xn.sublanguage=!0,xn.language=Br,this.add(xn)}toHTML(){return new re(this,this.options).value()}finalize(){return!0}};function Oe(at){return at?typeof at=="string"?at:at.source:null}function Xe(at){return tt("(?=",at,")")}function Qe(at){return tt("(?:",at,")*")}function Le(at){return tt("(?:",at,")?")}function tt(...at){return at.map(Br=>Oe(Br)).join("")}function ot(at){let Br=at[at.length-1];return typeof Br=="object"&&Br.constructor===Object?(at.splice(at.length-1,1),Br):{}}function Ct(...at){return"("+(ot(at).capture?"":"?:")+at.map(Br=>Oe(Br)).join("|")+")"}function We(at){return new RegExp(at.toString()+"|").exec("").length-1}function Ye(at,Br){let xn=at&&at.exec(Br);return xn&&xn.index===0}var vt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function yt(at,{joinWith:Br}){let xn=0;return at.map(Yn=>{xn+=1;let At=xn,Ot=Oe(Yn),Xt="";for(;Ot.length>0;){let se=vt.exec(Ot);if(!se){Xt+=Ot;break}Xt+=Ot.substring(0,se.index),Ot=Ot.substring(se.index+se[0].length),se[0][0]==="\\"&&se[1]?Xt+="\\"+String(Number(se[1])+At):(Xt+=se[0],se[0]==="("&&xn++)}return Xt}).map(Yn=>`(${Yn})`).join(Br)}var it=/\b\B/,$e="[a-zA-Z]\\w*",Pe="[a-zA-Z_]\\w*",qe="\\b\\d+(\\.\\d+)?",bt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ft="\\b(0b[01]+)",pr="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",_r=(at={})=>{let Br=/^#![ ]*\//;return at.binary&&(at.begin=tt(Br,/.*\b/,at.binary,/\b.*/)),P({scope:"meta",begin:Br,end:/$/,relevance:0,"on:begin":(xn,Yn)=>{xn.index!==0&&Yn.ignoreMatch()}},at)},Vr={begin:"\\\\[\\s\\S]",relevance:0},Kn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Vr]},er={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Vr]},li={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/},ci=function(at,Br,xn={}){let Yn=P({scope:"comment",begin:at,end:Br,contains:[]},xn);Yn.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 At=Ct("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 Yn.contains.push({begin:tt(/[ ]+/,"(",At,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Yn},Ii=ci("//","$"),Pi=ci("/\\*","\\*/"),ui=ci("#","$"),vi={scope:"number",begin:qe,relevance:0},Rn={scope:"number",begin:bt,relevance:0},Oi={scope:"number",begin:Ft,relevance:0},so={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Vr,{begin:/\[/,end:/\]/,relevance:0,contains:[Vr]}]}]},ji={scope:"title",begin:$e,relevance:0},or={scope:"title",begin:Pe,relevance:0},Rr={begin:"\\.\\s*"+Pe,relevance:0},pn=function(at){return Object.assign(at,{"on:begin":(Br,xn)=>{xn.data._beginMatch=Br[1]},"on:end":(Br,xn)=>{xn.data._beginMatch!==Br[1]&&xn.ignoreMatch()}})},Zn=Object.freeze({__proto__:null,MATCH_NOTHING_RE:it,IDENT_RE:$e,UNDERSCORE_IDENT_RE:Pe,NUMBER_RE:qe,C_NUMBER_RE:bt,BINARY_NUMBER_RE:Ft,RE_STARTERS_RE:pr,SHEBANG:_r,BACKSLASH_ESCAPE:Vr,APOS_STRING_MODE:Kn,QUOTE_STRING_MODE:er,PHRASAL_WORDS_MODE:li,COMMENT:ci,C_LINE_COMMENT_MODE:Ii,C_BLOCK_COMMENT_MODE:Pi,HASH_COMMENT_MODE:ui,NUMBER_MODE:vi,C_NUMBER_MODE:Rn,BINARY_NUMBER_MODE:Oi,REGEXP_MODE:so,TITLE_MODE:ji,UNDERSCORE_TITLE_MODE:or,METHOD_GUARD:Rr,END_SAME_AS_BEGIN:pn});function Wi(at,Br){at.input[at.index-1]==="."&&Br.ignoreMatch()}function to(at,Br){at.className!==void 0&&(at.scope=at.className,delete at.className)}function di(at,Br){Br&&at.beginKeywords&&(at.begin="\\b("+at.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",at.__beforeBegin=Wi,at.keywords=at.keywords||at.beginKeywords,delete at.beginKeywords,at.relevance===void 0&&(at.relevance=0))}function Ai(at,Br){Array.isArray(at.illegal)&&(at.illegal=Ct(...at.illegal))}function Mi(at,Br){if(at.match){if(at.begin||at.end)throw new Error("begin & end are not supported with match");at.begin=at.match,delete at.match}}function lo(at,Br){at.relevance===void 0&&(at.relevance=1)}var zi=(at,Br)=>{if(!at.beforeMatch)return;if(at.starts)throw new Error("beforeMatch cannot be used with starts");let xn=Object.assign({},at);Object.keys(at).forEach(Yn=>{delete at[Yn]}),at.keywords=xn.keywords,at.begin=tt(xn.beforeMatch,Xe(xn.begin)),at.starts={relevance:0,contains:[Object.assign(xn,{endsParent:!0})]},at.relevance=0,delete xn.beforeMatch},uo=["of","and","for","in","not","or","if","then","parent","list","value"],co="keyword";function ro(at,Br,xn=co){let Yn=Object.create(null);return typeof at=="string"?At(xn,at.split(" ")):Array.isArray(at)?At(xn,at):Object.keys(at).forEach(function(Ot){Object.assign(Yn,ro(at[Ot],Br,Ot))}),Yn;function At(Ot,Xt){Br&&(Xt=Xt.map(se=>se.toLowerCase())),Xt.forEach(function(se){let Ce=se.split("|");Yn[Ce[0]]=[Ot,Ao(Ce[0],Ce[1])]})}}function Ao(at,Br){return Br?Number(Br):Dt(at)?0:1}function Dt(at){return uo.includes(at.toLowerCase())}var Ge={},kt=at=>{console.error(at)},Bt=(at,...Br)=>{console.log(`WARN: ${at}`,...Br)},Qt=(at,Br)=>{Ge[`${at}/${Br}`]||(console.log(`Deprecated as of ${at}. ${Br}`),Ge[`${at}/${Br}`]=!0)},ct=new Error;function mt(at,Br,{key:xn}){let Yn=0,At=at[xn],Ot={},Xt={};for(let se=1;se<=Br.length;se++)Xt[se+Yn]=At[se],Ot[se+Yn]=!0,Yn+=We(Br[se-1]);at[xn]=Xt,at[xn]._emit=Ot,at[xn]._multi=!0}function nt(at){if(Array.isArray(at.begin)){if(at.skip||at.excludeBegin||at.returnBegin)throw kt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ct;if(typeof at.beginScope!="object"||at.beginScope===null)throw kt("beginScope must be object"),ct;mt(at,at.begin,{key:"beginScope"}),at.begin=yt(at.begin,{joinWith:""})}}function It(at){if(Array.isArray(at.end)){if(at.skip||at.excludeEnd||at.returnEnd)throw kt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ct;if(typeof at.endScope!="object"||at.endScope===null)throw kt("endScope must be object"),ct;mt(at,at.end,{key:"endScope"}),at.end=yt(at.end,{joinWith:""})}}function lt(at){at.scope&&typeof at.scope=="object"&&at.scope!==null&&(at.beginScope=at.scope,delete at.scope)}function nr(at){lt(at),typeof at.beginScope=="string"&&(at.beginScope={_wrap:at.beginScope}),typeof at.endScope=="string"&&(at.endScope={_wrap:at.endScope}),nt(at),It(at)}function cr(at){function Br(Xt,se){return new RegExp(Oe(Xt),"m"+(at.case_insensitive?"i":"")+(at.unicodeRegex?"u":"")+(se?"g":""))}class xn{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(se,Ce){Ce.position=this.position++,this.matchIndexes[this.matchAt]=Ce,this.regexes.push([Ce,se]),this.matchAt+=We(se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let se=this.regexes.map(Ce=>Ce[1]);this.matcherRe=Br(yt(se,{joinWith:"|"}),!0),this.lastIndex=0}exec(se){this.matcherRe.lastIndex=this.lastIndex;let Ce=this.matcherRe.exec(se);if(!Ce)return null;let Re=Ce.findIndex((ge,oe)=>oe>0&&ge!==void 0),W=this.matchIndexes[Re];return Ce.splice(0,Re),Object.assign(Ce,W)}}class Yn{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(se){if(this.multiRegexes[se])return this.multiRegexes[se];let Ce=new xn;return this.rules.slice(se).forEach(([Re,W])=>Ce.addRule(Re,W)),Ce.compile(),this.multiRegexes[se]=Ce,Ce}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(se,Ce){this.rules.push([se,Ce]),Ce.type==="begin"&&this.count++}exec(se){let Ce=this.getMatcher(this.regexIndex);Ce.lastIndex=this.lastIndex;let Re=Ce.exec(se);if(this.resumingScanAtSamePosition()&&!(Re&&Re.index===this.lastIndex)){let W=this.getMatcher(0);W.lastIndex=this.lastIndex+1,Re=W.exec(se)}return Re&&(this.regexIndex+=Re.position+1,this.regexIndex===this.count&&this.considerAll()),Re}}function At(Xt){let se=new Yn;return Xt.contains.forEach(Ce=>se.addRule(Ce.begin,{rule:Ce,type:"begin"})),Xt.terminatorEnd&&se.addRule(Xt.terminatorEnd,{type:"end"}),Xt.illegal&&se.addRule(Xt.illegal,{type:"illegal"}),se}function Ot(Xt,se){let Ce=Xt;if(Xt.isCompiled)return Ce;[to,Mi,nr,zi].forEach(W=>W(Xt,se)),at.compilerExtensions.forEach(W=>W(Xt,se)),Xt.__beforeBegin=null,[di,Ai,lo].forEach(W=>W(Xt,se)),Xt.isCompiled=!0;let Re=null;return typeof Xt.keywords=="object"&&Xt.keywords.$pattern&&(Xt.keywords=Object.assign({},Xt.keywords),Re=Xt.keywords.$pattern,delete Xt.keywords.$pattern),Re=Re||/\w+/,Xt.keywords&&(Xt.keywords=ro(Xt.keywords,at.case_insensitive)),Ce.keywordPatternRe=Br(Re,!0),se&&(Xt.begin||(Xt.begin=/\B|\b/),Ce.beginRe=Br(Ce.begin),!Xt.end&&!Xt.endsWithParent&&(Xt.end=/\B|\b/),Xt.end&&(Ce.endRe=Br(Ce.end)),Ce.terminatorEnd=Oe(Ce.end)||"",Xt.endsWithParent&&se.terminatorEnd&&(Ce.terminatorEnd+=(Xt.end?"|":"")+se.terminatorEnd)),Xt.illegal&&(Ce.illegalRe=Br(Xt.illegal)),Xt.contains||(Xt.contains=[]),Xt.contains=[].concat(...Xt.contains.map(function(W){return zr(W==="self"?Xt:W)})),Xt.contains.forEach(function(W){Ot(W,Ce)}),Xt.starts&&Ot(Xt.starts,se),Ce.matcher=At(Ce),Ce}if(at.compilerExtensions||(at.compilerExtensions=[]),at.contains&&at.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return at.classNameAliases=P(at.classNameAliases||{}),Ot(at)}function br(at){return at?at.endsWithParent||br(at.starts):!1}function zr(at){return at.variants&&!at.cachedVariants&&(at.cachedVariants=at.variants.map(function(Br){return P(at,{variants:null},Br)})),at.cachedVariants?at.cachedVariants:br(at)?P(at,{starts:at.starts?P(at.starts):null}):Object.isFrozen(at)?P(at):at}var xt="11.6.0",jt=class extends Error{constructor(at,Br){super(at),this.name="HTMLInjectionError",this.html=Br}},Cr=C,cn=P,$n=Symbol("nomatch"),Yi=7,hi=function(at){let Br=Object.create(null),xn=Object.create(null),Yn=[],At=!0,Ot="Could not find the language '{}', did you forget to load/include a language module?",Xt={disableAutodetect:!0,name:"Plain text",contains:[]},se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Ie};function Ce(fr){return se.noHighlightRe.test(fr)}function Re(fr){let Jt=fr.className+" ";Jt+=fr.parentNode?fr.parentNode.className:"";let ar=se.languageDetectRe.exec(Jt);if(ar){let Mr=bn(ar[1]);return Mr||(Bt(Ot.replace("{}",ar[1])),Bt("Falling back to no-highlight mode for this block.",fr)),Mr?ar[1]:"no-highlight"}return Jt.split(/\s+/).find(Mr=>Ce(Mr)||bn(Mr))}function W(fr,Jt,ar){let Mr="",xr="";typeof Jt=="object"?(Mr=fr,ar=Jt.ignoreIllegals,xr=Jt.language):(Qt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qt("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),xr=fr,Mr=Jt),ar===void 0&&(ar=!0);let Tr={code:Mr,language:xr};An("before:highlight",Tr);let jr=Tr.result?Tr.result:ge(Tr.language,Tr.code,ar);return jr.code=Tr.code,An("after:highlight",jr),jr}function ge(fr,Jt,ar,Mr){let xr=Object.create(null);function Tr(In,Xn){return In.keywords[Xn]}function jr(){if(!Ln.keywords){Ni.addText(bi);return}let In=0;Ln.keywordPatternRe.lastIndex=0;let Xn=Ln.keywordPatternRe.exec(bi),Bi="";for(;Xn;){Bi+=bi.substring(In,Xn.index);let mo=no.case_insensitive?Xn[0].toLowerCase():Xn[0],Fa=Tr(Ln,mo);if(Fa){let[ze,et]=Fa;if(Ni.addText(Bi),Bi="",xr[mo]=(xr[mo]||0)+1,xr[mo]<=Yi&&(Wo+=et),ze.startsWith("_"))Bi+=Xn[0];else{let Mt=no.classNameAliases[ze]||ze;Ni.addKeyword(Xn[0],Mt)}}else Bi+=Xn[0];In=Ln.keywordPatternRe.lastIndex,Xn=Ln.keywordPatternRe.exec(bi)}Bi+=bi.substring(In),Ni.addText(Bi)}function Wn(){if(bi==="")return;let In=null;if(typeof Ln.subLanguage=="string"){if(!Br[Ln.subLanguage]){Ni.addText(bi);return}In=ge(Ln.subLanguage,bi,!0,Bo[Ln.subLanguage]),Bo[Ln.subLanguage]=In._top}else In=he(bi,Ln.subLanguage.length?Ln.subLanguage:null);Ln.relevance>0&&(Wo+=In.relevance),Ni.addSublanguage(In._emitter,In.language)}function Hn(){Ln.subLanguage!=null?Wn():jr(),bi=""}function Ze(In,Xn){let Bi=1,mo=Xn.length-1;for(;Bi<=mo;){if(!In._emit[Bi]){Bi++;continue}let Fa=no.classNameAliases[In[Bi]]||In[Bi],ze=Xn[Bi];Fa?Ni.addKeyword(ze,Fa):(bi=ze,jr(),bi=""),Bi++}}function pt(In,Xn){return In.scope&&typeof In.scope=="string"&&Ni.openNode(no.classNameAliases[In.scope]||In.scope),In.beginScope&&(In.beginScope._wrap?(Ni.addKeyword(bi,no.classNameAliases[In.beginScope._wrap]||In.beginScope._wrap),bi=""):In.beginScope._multi&&(Ze(In.beginScope,Xn),bi="")),Ln=Object.create(In,{parent:{value:Ln}}),Ln}function ke(In,Xn,Bi){let mo=Ye(In.endRe,Bi);if(mo){if(In["on:end"]){let Fa=new x(In);In["on:end"](Xn,Fa),Fa.isMatchIgnored&&(mo=!1)}if(mo){for(;In.endsParent&&In.parent;)In=In.parent;return In}}if(In.endsWithParent)return ke(In.parent,Xn,Bi)}function hr(In){return Ln.matcher.regexIndex===0?(bi+=In[0],1):(V0=!0,0)}function tn(In){let Xn=In[0],Bi=In.rule,mo=new x(Bi),Fa=[Bi.__beforeBegin,Bi["on:begin"]];for(let ze of Fa)if(ze&&(ze(In,mo),mo.isMatchIgnored))return hr(Xn);return Bi.skip?bi+=Xn:(Bi.excludeBegin&&(bi+=Xn),Hn(),!Bi.returnBegin&&!Bi.excludeBegin&&(bi=Xn)),pt(Bi,In),Bi.returnBegin?0:Xn.length}function sn(In){let Xn=In[0],Bi=Jt.substring(In.index),mo=ke(Ln,In,Bi);if(!mo)return $n;let Fa=Ln;Ln.endScope&&Ln.endScope._wrap?(Hn(),Ni.addKeyword(Xn,Ln.endScope._wrap)):Ln.endScope&&Ln.endScope._multi?(Hn(),Ze(Ln.endScope,In)):Fa.skip?bi+=Xn:(Fa.returnEnd||Fa.excludeEnd||(bi+=Xn),Hn(),Fa.excludeEnd&&(bi=Xn));do Ln.scope&&Ni.closeNode(),!Ln.skip&&!Ln.subLanguage&&(Wo+=Ln.relevance),Ln=Ln.parent;while(Ln!==mo.parent);return mo.starts&&pt(mo.starts,In),Fa.returnEnd?0:Xn.length}function ni(){let In=[];for(let Xn=Ln;Xn!==no;Xn=Xn.parent)Xn.scope&&In.unshift(Xn.scope);In.forEach(Xn=>Ni.openNode(Xn))}let ki={};function $i(In,Xn){let Bi=Xn&&Xn[0];if(bi+=In,Bi==null)return Hn(),0;if(ki.type==="begin"&&Xn.type==="end"&&ki.index===Xn.index&&Bi===""){if(bi+=Jt.slice(Xn.index,Xn.index+1),!At){let mo=new Error(`0 width match regex (${fr})`);throw mo.languageName=fr,mo.badRule=ki.rule,mo}return 1}if(ki=Xn,Xn.type==="begin")return tn(Xn);if(Xn.type==="illegal"&&!ar){let mo=new Error('Illegal lexeme "'+Bi+'" for mode "'+(Ln.scope||"")+'"');throw mo.mode=Ln,mo}else if(Xn.type==="end"){let mo=sn(Xn);if(mo!==$n)return mo}if(Xn.type==="illegal"&&Bi==="")return 1;if(K0>1e5&&K0>Xn.index*3)throw new Error("potential infinite loop, way more iterations than matches");return bi+=Bi,Bi.length}let no=bn(fr);if(!no)throw kt(Ot.replace("{}",fr)),new Error('Unknown language: "'+fr+'"');let Ji=cr(no),To="",Ln=Mr||Ji,Bo={},Ni=new se.__emitter(se);ni();let bi="",Wo=0,Do=0,K0=0,V0=!1;try{for(Ln.matcher.considerAll();;){K0++,V0?V0=!1:Ln.matcher.considerAll(),Ln.matcher.lastIndex=Do;let In=Ln.matcher.exec(Jt);if(!In)break;let Xn=Jt.substring(Do,In.index),Bi=$i(Xn,In);Do=In.index+Bi}return $i(Jt.substring(Do)),Ni.closeAllNodes(),Ni.finalize(),To=Ni.toHTML(),{language:fr,value:To,relevance:Wo,illegal:!1,_emitter:Ni,_top:Ln}}catch(In){if(In.message&&In.message.includes("Illegal"))return{language:fr,value:Cr(Jt),illegal:!0,relevance:0,_illegalBy:{message:In.message,index:Do,context:Jt.slice(Do-100,Do+100),mode:In.mode,resultSoFar:To},_emitter:Ni};if(At)return{language:fr,value:Cr(Jt),illegal:!1,relevance:0,errorRaised:In,_emitter:Ni,_top:Ln};throw In}}function oe(fr){let Jt={value:Cr(fr),illegal:!1,relevance:0,_top:Xt,_emitter:new se.__emitter(se)};return Jt._emitter.addText(fr),Jt}function he(fr,Jt){Jt=Jt||se.languages||Object.keys(Br);let ar=oe(fr),Mr=Jt.filter(bn).filter(nn).map(Hn=>ge(Hn,fr,!1));Mr.unshift(ar);let xr=Mr.sort((Hn,Ze)=>{if(Hn.relevance!==Ze.relevance)return Ze.relevance-Hn.relevance;if(Hn.language&&Ze.language){if(bn(Hn.language).supersetOf===Ze.language)return 1;if(bn(Ze.language).supersetOf===Hn.language)return-1}return 0}),[Tr,jr]=xr,Wn=Tr;return Wn.secondBest=jr,Wn}function _e(fr,Jt,ar){let Mr=Jt&&xn[Jt]||ar;fr.classList.add("hljs"),fr.classList.add(`language-${Mr}`)}function le(fr){let Jt=null,ar=Re(fr);if(Ce(ar))return;if(An("before:highlightElement",{el:fr,language:ar}),fr.children.length>0&&(se.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(fr)),se.throwUnescapedHTML))throw new jt("One of your code blocks includes unescaped HTML.",fr.innerHTML);Jt=fr;let Mr=Jt.textContent,xr=ar?W(Mr,{language:ar,ignoreIllegals:!0}):he(Mr);fr.innerHTML=xr.value,_e(fr,ar,xr.language),fr.result={language:xr.language,re:xr.relevance,relevance:xr.relevance},xr.secondBest&&(fr.secondBest={language:xr.secondBest.language,relevance:xr.secondBest.relevance}),An("after:highlightElement",{el:fr,result:xr,text:Mr})}function Se(fr){se=cn(se,fr)}let Ne=()=>{rr(),Qt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function dt(){rr(),Qt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ft=!1;function rr(){if(document.readyState==="loading"){ft=!0;return}document.querySelectorAll(se.cssSelector).forEach(le)}function wr(){ft&&rr()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",wr,!1);function Gr(fr,Jt){let ar=null;try{ar=Jt(at)}catch(Mr){if(kt("Language definition for '{}' could not be registered.".replace("{}",fr)),At)kt(Mr);else throw Mr;ar=Xt}ar.name||(ar.name=fr),Br[fr]=ar,ar.rawDefinition=Jt.bind(null,at),ar.aliases&&Un(ar.aliases,{languageName:fr})}function Yr(fr){delete Br[fr];for(let Jt of Object.keys(xn))xn[Jt]===fr&&delete xn[Jt]}function en(){return Object.keys(Br)}function bn(fr){return fr=(fr||"").toLowerCase(),Br[fr]||Br[xn[fr]]}function Un(fr,{languageName:Jt}){typeof fr=="string"&&(fr=[fr]),fr.forEach(ar=>{xn[ar.toLowerCase()]=Jt})}function nn(fr){let Jt=bn(fr);return Jt&&!Jt.disableAutodetect}function Sn(fr){fr["before:highlightBlock"]&&!fr["before:highlightElement"]&&(fr["before:highlightElement"]=Jt=>{fr["before:highlightBlock"](Object.assign({block:Jt.el},Jt))}),fr["after:highlightBlock"]&&!fr["after:highlightElement"]&&(fr["after:highlightElement"]=Jt=>{fr["after:highlightBlock"](Object.assign({block:Jt.el},Jt))})}function Cn(fr){Sn(fr),Yn.push(fr)}function An(fr,Jt){let ar=fr;Yn.forEach(function(Mr){Mr[ar]&&Mr[ar](Jt)})}function Nn(fr){return Qt("10.7.0","highlightBlock will be removed entirely in v12.0"),Qt("10.7.0","Please use highlightElement now."),le(fr)}Object.assign(at,{highlight:W,highlightAuto:he,highlightAll:rr,highlightElement:le,highlightBlock:Nn,configure:Se,initHighlighting:Ne,initHighlightingOnLoad:dt,registerLanguage:Gr,unregisterLanguage:Yr,listLanguages:en,getLanguage:bn,registerAliases:Un,autoDetection:nn,inherit:cn,addPlugin:Cn}),at.debugMode=function(){At=!1},at.safeMode=function(){At=!0},at.versionString=xt,at.regex={concat:tt,lookahead:Xe,either:Ct,optional:Le,anyNumberOfTimes:Qe};for(let fr in Zn)typeof Zn[fr]=="object"&&k.exports(Zn[fr]);return Object.assign(at,Zn),at},yi=hi({});E.exports=yi,yi.HighlightJS=yi,yi.default=yi}),TY=c((i,E)=>{E.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}"}),IY=c((i,E)=>{E.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}"});A(),M(),B(),St(),ve(),A(),M(),B(),St(),ve();var Ih=_(VG()),PY=_(ZG()),OY=_(RY()),BY=Ih.Address.parse("EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"),UY=Ih.Address.parse("EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8");function NY(i){let E=new OY.Sha256;return E.update(i),gt.from(E.digestSync())}function LY(i,E){return i.replace("ipfs://",`https://tonsource${E?"-testnet":""}.infura-ipfs.io/ipfs/`)}function dA(i){return BigInt(`0x${i.toString("hex")}`)}var DY={async getSourcesJsonUrl(i,E){let k=new Ih.TonClient4({endpoint:E?.httpApiEndpointV4??await(0,PY.getHttpV4Endpoint)({network:E.testnet?"testnet":"mainnet"})}),{last:{seqno:N}}=await k.getLastBlock(),x=new Ih.TupleBuilder;x.writeNumber(dA(NY(E?.verifier??"orbs.com"))),x.writeNumber(dA(gt.from(i,"base64")));let{result:C}=await k.runMethod(N,E.testnet?UY:BY,"get_source_item_address",x.build()),P=new Ih.TupleReader(C),H=P.readAddress();if(await k.isContractDeployed(N,H)){let{result:G}=await k.runMethod(N,H,"get_source_item_data");P=new Ih.TupleReader(G);let K=P.skip(3).readCell().beginParse();if(K.loadUint(8)!==1)throw new Error("Unsupported version");return K.loadStringTail()}return null},async getSourcesData(i,E){let k=E.ipfsConverter??LY,N=k(i,!!E.testnet),x=await(await fetch(k(i,!!E.testnet))).json();return{files:(await Promise.all(x.sources.map(async C=>{let P=k(C.url,!!E.testnet),H=await fetch(P).then(G=>G.text());return{name:C.filename,content:H,isEntrypoint:C.isEntrypoint}}))).reverse().sort((C,P)=>Number(P.isEntrypoint)-Number(C.isEntrypoint)),verificationDate:new Date(x.verificationDate),compilerSettings:x.compilerSettings,compiler:x.compiler,ipfsHttpLink:N}}};A(),M(),B(),St(),ve(),A(),M(),B(),St(),ve();var $Y=_(AY(),1),hA=$Y.default;A(),M(),B(),St(),ve(),A(),M(),B(),St(),ve();var pA='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',gA=/\"[^\n\"]+\"[Hhcusa]?/,k3;try{k3=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:i.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:/[\[\{\}\],]/}]}}A(),M(),B(),St(),ve();var vA=/[a-zA-Z_][0-9a-zA-Z_]*/;function WY(i){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:[i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},{scope:"symbol",match:i.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function zY(i){i.registerLanguage("fift",jY),i.registerLanguage("func",FY),i.registerLanguage("tlb",WY)}A(),M(),B(),St(),ve();var Jc=(i,...E)=>bA("div",i,...E),yA=(i,...E)=>bA("img",i,...E);function HY(i,E){for(let k of E)if(k)switch(typeof k){case"string":let N=document.createTextNode(k);i.appendChild(N);break;default:i.appendChild(k);break}}function qY(i,E){typeof E=="string"?i.setAttribute("style",E):Object.assign(i.style,E)}function KY(i,E){E.split(/\s/).forEach(k=>{k&&i.classList.add(k)})}function VY(i,E){let k=/^on([a-z]+)$/i;for(let N in E)if(N)if(N==="style")qY(i,E[N]);else if(N==="className")KY(i,E[N]);else if(k.test(N)){let x=N.replace(k,"$1").toLowerCase();i.addEventListener(x,E[N])}else i.setAttribute(N,E[N])}function bA(i,E,...k){if(typeof i=="function")return i(E);{let N=document.createElement(i);return E&&typeof E=="object"&&VY(N,E),k&&HY(N,k),N}}A(),M(),B(),St(),ve();var GY=` - - - - - - - - - - -`,YY=` - - - - - - - - - - -`,XY=` - - -`,QY=` - - -`,ZY=` - - -`,JY=` - - -`,a1={dark:{file:GY,folder:{open:ZY,closed:XY}},light:{file:YY,folder:{open:JY,closed:QY}}},A3=i=>`data:image/svg+xml;base64,${gt.from(i,"utf8").toString("base64")}`,eX=({name:i},E)=>Jc({className:`${Vl.FILE} ${Vl.TREE_ITEM}`},yA({src:A3(a1[E].file)}),Jc(null,i));function tX(i,E){let k=E.target.classList.contains("folder-header")?E.target:E.target.parentElement,N=k.getAttribute("opened")!=="true";k.children[0].attributes.src.value=A3(N?a1[i].folder.open:a1[i].folder.closed);try{let x=k.nextElementSibling;N?x.classList.remove("hide"):x.classList.add("hide")}catch{console.warn(`No sibling of elem ${k} found ...`)}k.setAttribute("opened",N)}var rX=(i,E,...k)=>{let N=i.opened||!1,x=a1[E].folder[N?"open":"closed"],C=i.name||"unknown";return Jc({className:Vl.FOLDER_CONTAINER},Jc({onClick:tX.bind(void 0,E),className:`folder-header ${Vl.FOLDER} ${Vl.TREE_ITEM}`,opened:N},yA({src:A3(x)}),Jc(null,C)),Jc({className:`${N?"":"hide"} folder-content`},...k))},nX=`.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; -} -`;zY(hA);var Vl={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"},wA={_stylesPopulated:{internal:!1},_populateStyle(i){if(!this._stylesPopulated[i]){this._stylesPopulated[i]=!0;let E=document.createElement("style");E.innerHTML=`${i==="light"?TY().toString():IY().toString()}`,document.head.appendChild(E)}if(!this._stylesPopulated.internal){this._stylesPopulated.internal=!0;let E=document.createElement("style");E.innerHTML=nX,document.head.appendChild(E)}},_populateCode(i,E){let k=document.querySelector(i);k.classList.add(Vl.CODE_CONTAINER),k.classList.add(E),k.innerHTML=`
    `},_setCode({name:i,content:E},k,N,x){if(x?.classList.contains("active"))return;k.scrollTo(0,0),E=E.trim();let C=k.querySelector("code");C.innerHTML="",C.appendChild(Jc({className:Vl.CODE_LINES},E.split(` -`).map((H,G)=>G+1).join(` -`)));let P=Jc({className:Vl.CODE_CONTENT},E);C.appendChild(P),i.match(/\.fif(t)?$/)?P.classList.add("language-fift"):P.classList.add("language-func"),hA.highlightElement(P),N?.querySelector(`.${Vl.FILE}.active`)?.classList.remove("active"),x?.classList.add("active")},setCode(i,E){this._setCode({name:"",content:E},document.querySelector(i))},_populateFiles(i,E,k,N){let x=document.querySelector(i);x.innerHTML="",x.classList.add(N),x.classList.add(Vl.FILES);let C={type:"root",children:[]};k.forEach(H=>{let G=Array.from(H.name.matchAll(/(?:\/|^)([^\/\n]+)/g)).map(z=>z[1]),K=G.length>1?G.slice(0,G.length-1):[],re=C;K.forEach(z=>{let ce=re.children.find(Ie=>Ie.type==="folder"&&Ie.name===z);if(!ce){let Ie={type:"folder",name:z,children:[]};re.children.push(Ie),ce=Ie}re=ce}),re.children.push({type:"file",name:G[G.length-1],content:H.content})});function P(H){return H.children.filter(G=>G.type==="file").map(G=>{let K=eX({name:G.name},N);return K.onclick=()=>{wA._setCode({name:G.name,content:G.content},document.querySelector(E),document.querySelector(i),K)},K}).concat(H.children.filter(G=>G.type==="folder").map(G=>rX({name:G.name,opened:!0},N,...P(G))))}P(C).forEach(H=>x.appendChild(H))},_populateContainer(i,E){let k=document.querySelector(i);k.classList.add(Vl.CONTAINER),E||k.classList.add("lineNumbers")},loadSourcesData(i,E){this._populateContainer(E.containerSelector,!!E.hideLineNumbers),E.fileListSelector&&this._populateFiles(E.fileListSelector,E.contentSelector,i.files,E.theme),this._populateStyle(E.theme),this._populateCode(E.contentSelector,E.theme),this._setCode(i.files[0],document.querySelector(E.contentSelector),document.querySelector(E.fileListSelector),document.querySelector(`${E.fileListSelector} .contract-verifier-file`))}};window.ContractVerifier=DY,window.ContractVerifierUI=wA})();function ou(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:j8(e)?2:W8(e)?3:0}function bS(e,t){return N0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hke(e,t){return N0(e)===2?e.get(t):e[t]}function Vq(e,t,r){var n=N0(e);n===2?e.set(t,r):n===3?(e.delete(t),e.add(r)):e[t]=r}function pke(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function j8(e){return yke&&e instanceof Map}function W8(e){return bke&&e instanceof Set}function Cd(e){return e.o||e.t}function z8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=xke(e);delete t[cl];for(var r=V8(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=gke),Object.freeze(e),t&&mv(e,function(r,n){return H8(n,!0)},!0)),e}function gke(){ou(2)}function q8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Gu(e){var t=_ke[e];return t||ou(18,e),t}function XB(){return vv}function a6(e,t){t&&(Gu("Patches"),e.u=[],e.s=[],e.v=t)}function kw(e){wS(e),e.p.forEach(mke),e.p=null}function wS(e){e===vv&&(vv=e.l)}function QB(e){return vv={p:[],l:vv,h:e,m:!0,_:0}}function mke(e){var t=e[cl];t.i===0||t.i===1?t.j():t.O=!0}function s6(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.g||Gu("ES5").S(t,e,n),n?(r[cl].P&&(kw(t),ou(4)),ch(e)&&(e=Rw(t,e),t.l||Aw(t,e)),t.u&&Gu("Patches").M(r[cl].t,e,t.u,t.s)):e=Rw(t,r,[]),kw(t),t.u&&t.v(t.u,t.s),e!==Gq?e:void 0}function Rw(e,t,r){if(q8(t))return t;var n=t[cl];if(!n)return mv(t,function(o,s){return ZB(e,n,t,o,s,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Aw(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=z8(n.k):n.o;mv(n.i===3?new Set(a):a,function(o,s){return ZB(e,n,a,o,s,r)}),Aw(e,a,!1),r&&e.u&&Gu("Patches").N(n,r,e.u,e.s)}return n.o}function ZB(e,t,r,n,a,o){if(n0(a)){var s=Rw(e,a,o&&t&&t.i!==3&&!bS(t.R,n)?o.concat(n):void 0);if(Vq(r,n,s),!n0(s))return;e.m=!1}if(ch(a)&&!q8(a)){if(!e.h.D&&e._<1)return;Rw(e,a),t&&t.A.l||Aw(e,a)}}function Aw(e,t,r){r===void 0&&(r=!1),e.h.D&&e.m&&H8(t,r)}function l6(e,t){var r=e[cl];return(r?Cd(r):e)[t]}function JB(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function xS(e){e.P||(e.P=!0,e.l&&xS(e.l))}function u6(e){e.o||(e.o=z8(e.t))}function _S(e,t,r){var n=j8(t)?Gu("MapSet").F(t,r):W8(t)?Gu("MapSet").T(t,r):e.g?function(a,o){var s=Array.isArray(a),l={i:s?1:0,A:o?o.A:XB(),P:!1,I:!1,R:{},l:o,t:a,k:null,o:null,j:null,C:!1},c=l,p=SS;s&&(c=[l],p=tm);var m=Proxy.revocable(c,p),_=m.revoke,T=m.proxy;return l.k=T,l.j=_,T}(t,r):Gu("ES5").J(t,r);return(r?r.A:XB()).p.push(n),n}function vke(e){return n0(e)||ou(22,e),function t(r){if(!ch(r))return r;var n,a=r[cl],o=N0(r);if(a){if(!a.P&&(a.i<4||!Gu("ES5").K(a)))return a.t;a.I=!0,n=e9(r,o),a.I=!1}else n=e9(r,o);return mv(n,function(s,l){a&&hke(a.t,s)===l||Vq(n,s,t(l))}),o===3?new Set(n):n}(e)}function e9(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return z8(e)}var t9,vv,K8=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yke=typeof Map<"u",bke=typeof Set<"u",r9=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gq=K8?Symbol.for("immer-nothing"):((t9={})["immer-nothing"]=!0,t9),n9=K8?Symbol.for("immer-draftable"):"__$immer_draftable",cl=K8?Symbol.for("immer-state"):"__$immer_state",wke=""+Object.prototype.constructor,V8=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,xke=Object.getOwnPropertyDescriptors||function(e){var t={};return V8(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},_ke={},SS={get:function(e,t){if(t===cl)return e;var r=Cd(e);if(!bS(r,t))return function(a,o,s){var l,c=JB(o,s);return c?"value"in c?c.value:(l=c.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!ch(n)?n:n===l6(e.t,t)?(u6(e),e.o[t]=_S(e.A.h,n,e)):n},has:function(e,t){return t in Cd(e)},ownKeys:function(e){return Reflect.ownKeys(Cd(e))},set:function(e,t,r){var n=JB(Cd(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=l6(Cd(e),t),o=a?.[cl];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(pke(r,a)&&(r!==void 0||bS(e.t,t)))return!0;u6(e),xS(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 l6(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,u6(e),xS(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Cd(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ou(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ou(12)}},tm={};mv(SS,function(e,t){tm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tm.deleteProperty=function(e,t){return tm.set.call(this,e,t,void 0)},tm.set=function(e,t,r){return SS.set.call(this,e[0],t,r,e[0])};var Ske=function(){function e(r){var n=this;this.g=r9,this.D=!0,this.produce=function(a,o,s){if(typeof a=="function"&&typeof o!="function"){var l=o;o=a;var c=n;return function(M){var B=this;M===void 0&&(M=l);for(var L=arguments.length,U=Array(L>1?L-1:0),D=1;D1?m-1:0),T=1;T=0;a--){var o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));var s=Gu("Patches").$;return n0(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),fl=new Ske,Eke=fl.produce;fl.produceWithPatches.bind(fl);fl.setAutoFreeze.bind(fl);fl.setUseProxies.bind(fl);fl.applyPatches.bind(fl);fl.createDraft.bind(fl);fl.finishDraft.bind(fl);const Cke=e=>(t,r,n)=>(n.setState=(a,o,...s)=>{const l=typeof a=="function"?Eke(a):a;return t(l,o,...s)},e(n.setState,r,n)),l3=Cke;var Yq={},Xq={},Qq={};(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})(Qq);var Zq={};(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(c,p,m){return p>0&&p+c.length!==m.length&&c.search(t)>-1&&m.charAt(p-2)!==":"&&(m.charAt(p+c.length)!=="-"||m.charAt(p-1)==="-")&&m.charAt(p-1).search(/[^\s-]/)<0?c.toLowerCase():c.substr(1).search(/[A-Z]|\../)>-1?c:c.charAt(0).toUpperCase()+c.substr(1)})}function n(l){return typeof l=="string"&&l.indexOf("@")!==-1}var a="REDACTED (Potential Email Address)";function o(l){return n(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]:"",c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,m=l||"";return c&&(m=r(l)),p&&(m=o(m)),m}})(Zq);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=l(Qq),r=l(Zq),n=["eventCategory","eventAction","eventLabel","eventValue","hitType"],a=["title","location"],o=["page","hitType"],s=["action","category","label","value","nonInteraction","transport"];function l(v){return v&&v.__esModule?v:{default:v}}function c(v,u){if(v==null)return{};var f=p(v,u),y,S;if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(v);for(S=0;S=0)&&(!Object.prototype.propertyIsEnumerable.call(v,y)||(f[y]=v[y]))}return f}function p(v,u){if(v==null)return{};var f={},y=Object.keys(v),S,w;for(w=0;w=0)&&(f[S]=v[S]);return f}function m(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(f){return typeof f}:m=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},m(v)}function _(v){return A(v)||O(v)||D(v)||T()}function T(){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 O(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)}function A(v){if(Array.isArray(v))return Y(v)}function M(v,u){var f=Object.keys(v);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(v);u&&(y=y.filter(function(S){return Object.getOwnPropertyDescriptor(v,S).enumerable})),f.push.apply(f,y)}return f}function B(v){for(var u=1;uv.length)&&(u=v.length);for(var f=0,y=new Array(u);f"u"||typeof document>"u")&&!u._hasLoadedGA){var S=document.createElement("script");S.async=!0,S.src="https://www.googletagmanager.com/gtag/js?id=".concat(f),y&&S.setAttribute("nonce",y),document.body.appendChild(S),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},u._hasLoadedGA=!0}}),R(this,"_toGtagOptions",function(f){if(!!f){var y={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"},S=Object.entries(f).reduce(function(w,d){var I=L(d,2),$=I[0],b=I[1];return y[$]?w[y[$]]=b:w[$]=b,w},{});return S}}),R(this,"initialize",function(f){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!f)throw new Error("Require GA_MEASUREMENT_ID");var S=typeof f=="string"?[{trackingId:f}]:f;u._currentMeasurementId=S[0].trackingId;var w=y.gaOptions,d=y.gtagOptions,I=y.legacyDimensionMetric,$=I===void 0?!0:I,b=y.nonce,X=y.testMode,we=X===void 0?!1:X;if(u._testMode=we,we||u._loadGA(u._currentMeasurementId,b),u.isInitialized||(u._gtag("js",new Date),S.forEach(function(Vt){var De=u._appendCustomMap(B(B(B({send_page_view:!1},u._toGtagOptions(B(B({},w),Vt.gaOptions))),d),Vt.gtagOptions),$);u._gtag("config",Vt.trackingId,De)})),u.isInitialized=!0,!we){var Ae=_(u._queueGtag);for(u._queueGtag=[],u._isQueuing=!1;Ae.length;){var je=Ae.shift();u._gtag.apply(u,_(je)),je[0]==="get"&&(u._isQueuing=!0)}}}),R(this,"set",function(f){if(!f){console.warn("`fieldsObject` is required in .set()");return}if(m(f)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(f).length===0&&console.warn("empty `fieldsObject` given to .set()"),u._gaCommand("set",f)}),R(this,"_gaCommandSendEvent",function(f,y,S,w,d){u._gtag("event",y,B(B({event_category:f,event_label:S,value:w},d&&{non_interaction:d.nonInteraction}),u._toGtagOptions(d)))}),R(this,"_gaCommandSendEventParameters",function(){for(var f=arguments.length,y=new Array(f),S=0;S1?y-1:0),w=1;w1&&arguments[1]!==void 0?arguments[1]:!0;if(!y)return f;f.custom_map||(f.custom_map={});for(var S=1;S<=200;S++)f.custom_map["dimension".concat(S)]||(f.custom_map["dimension".concat(S)]="dimension".concat(S)),f.custom_map["metric".concat(S)]||(f.custom_map["metric".concat(S)]="metric".concat(S));return f}},{key:"outboundLink",value:function(f,y){var S=f.label;if(typeof y!="function"){console.warn("hitCallback function is required");return}if(!S){console.warn("args.label is required in outboundLink()");return}var w={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:(0,r.default)(S)},d=!1,I=function(){d=!0,y()},$=setTimeout(I,250),b=function(){clearTimeout($),d||y()};w.hitCallback=b,this._gaCommand("send",w)}}]),v}();e.GA4=h;var g=new h;e.default=g})(Xq);(function(e){function t(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(p){return typeof p}:t=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},t(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var r=a(Xq);function n(l){if(typeof WeakMap!="function")return null;var c=new WeakMap,p=new WeakMap;return(n=function(_){return _?p:c})(l)}function a(l,c){if(!c&&l&&l.__esModule)return l;if(l===null||t(l)!=="object"&&typeof l!="function")return{default:l};var p=n(c);if(p&&p.has(l))return p.get(l);var m={},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in l)if(T!=="default"&&Object.prototype.hasOwnProperty.call(l,T)){var O=_?Object.getOwnPropertyDescriptor(l,T):null;O&&(O.get||O.set)?Object.defineProperty(m,T,O):m[T]=l[T]}return m.default=l,p&&p.set(l,m),m}var o=r.GA4;e.ReactGAImplementation=o;var s=r.default;e.default=s})(Yq);const Tw=Hw(Yq);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 Ta=(e,t="")=>{if(!!Tw.isInitialized)try{Tw.event({category:"VERIFIER",action:e,label:t})}catch(r){console.log(r)}},Mke=()=>{try{Tw.initialize("G-2TB9KYGCFR"),Tw.send(window.location.pathname+window.location.search)}catch{}};let Iw=["fc","func","pkg"];({}).VITE_ALLOW_FIFT&&Iw.push("fift");const oc=P0(l3((e,t)=>({files:[],hasFiles:()=>t().files.length>0,addFiles:async r=>{const n=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=n.filter(s=>s.fileObj.name.match(new RegExp(`.*.(${Iw.join("|")})$`))&&!a.files.find(l=>l.fileObj.name===s.fileObj.name));o&&(Ta(Ca.ADD_FILE),a.files.push(...o))})},setInclueInCommand:(r,n)=>{e(a=>{a.files.find(o=>o.fileObj.name===r).includeInCommand=n})},setDirectory:(r,n)=>{e(a=>{a.files.find(o=>o.fileObj.name===r).folder=n})},removeFile:r=>{e(n=>{n.files=n.files.filter(a=>a.fileObj.name!==r)})},reorderFiles:(r,n)=>{e(a=>{const o=a.files,s=o.findIndex(p=>p.fileObj.name===r),l=o.findIndex(p=>p.fileObj.name===n),[c]=o.splice(s,1);o.splice(l,0,c)})},reset:()=>{e(r=>{r.files=[]})}}))),kke="https://raw.githubusercontent.com/ton-community/contract-verifier-config/main/config.json";function G8(){const[e,t]=ue.exports.useState(!0);return Tc(["remoteConfig"],async()=>{const{funcVersions:r,tactVersions:n}=await(await fetch(kke)).json();return t(!1),{funcVersions:r,tactVersions:n}},{enabled:e,initialData:{funcVersions:[],tactVersions:[]}})}const Rke=P0(l3((e,t)=>({compiler:"func",compilerSettings:{funcVersion:"",commandLine:""},_defaultFuncVersion:"",initialize:r=>{e(n=>{n._defaultFuncVersion=r,n.compilerSettings={funcVersion:n._defaultFuncVersion,commandLine:"",overrideCommandLine:null}})},setCompilerSettings:r=>{e(n=>{n.compilerSettings=r})},setOverrideCommandLine:r=>{e(n=>{if(n.compiler!=="func")throw new Error("not func compiler");n.compilerSettings.overrideCommandLine=r})},setFuncCliVersion:r=>{e(n=>{if(n.compiler!=="func")throw new Error("not func compiler");n.compilerSettings.funcVersion=r})},setTactCliVersion:r=>{e(n=>{if(n.compiler!=="tact")throw new Error("not tact compiler");n.compilerSettings={tactVersion:r}})},setCompiler:r=>{e(n=>{n.compiler=r,r==="func"?n.compilerSettings={funcVersion:n._defaultFuncVersion,commandLine:"",overrideCommandLine:null}:r==="tact"&&(n.compilerSettings={tactVersion:""})})}})));function Y8(){const{files:e,setInclueInCommand:t}=oc(),r=Rke(),{data:{tactVersions:n}}=G8();function a(){const s=e.filter(l=>l.includeInCommand).map(l=>(l.folder?l.folder+"/":"")+l.fileObj.name).join(" ");return e?`-SPA ${s}`:""}ue.exports.useEffect(()=>{const s=e.find(l=>l.fileObj.name.endsWith(".pkg"));(async()=>{if(!s)return;const l=await s.fileObj.text(),c=JSON.parse(l);if(r.setCompiler("tact"),!n.includes(c.compiler.version))throw new Error("Unsupported tact version "+c.compiler.version);r.setCompilerSettings({tactVersion:c.compiler.version})})()},[e]);const o={};return r.compiler==="func"&&(o.commandLine=r.compilerSettings.overrideCommandLine??a()),{...r,compilerSettings:{...r.compilerSettings,...o}}}const Ake=(e,t,r)=>{const n=()=>{a.invalidateQueries(["CustomMutation",e]),a.invalidateQueries(["CustomMutationError",e])},a=c2(),o=Tc(["CustomMutation",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),s=Tc(["CustomMutationError",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),l=nL(e,async(...p)=>(n(),a.setQueryData(["CustomMutationError",e],!1),await t(...p)),{...r,onSuccess:(p,m,_)=>{a.setQueryData(["CustomMutation",e],p),r?.onSuccess&&r.onSuccess(p,m,_)},onError:(p,m,_)=>{a.setQueryData(["CustomMutationError",e],p),r?.onError&&r.onError(p,m,_)}}),c=MJ(e);return{...l,data:o.data,isLoading:!!c,error:s.data,isError:!!s.data,invalidate:n}};function Tke(e=[]){return e.map(t=>{if(t instanceof ii.Cell)return["tvm.Slice",t.toBoc({idx:!1}).toString("base64")];if(t instanceof lh)return["num",t.toString(10)];throw new Error("unknown type!")})}function Ike(e){return e.map(([t,r])=>{switch(t){case"num":return new lh(r.replace("0x",""),"hex");case"cell":return ii.Cell.fromBoc(Buffer.from(r.bytes,"base64"))[0];case"list":if(r.elements.length===0)return null;throw new Error("list parsing not supported");default:throw new Error(`unknown type: ${t}, val: ${JSON.stringify(r)}`)}})}async function yv(e,t,r,n,a){const{stack:o}=await a.callGetMethod(e,t,Tke(r));return n(Ike(o))}function Pke(e){let t=e.toBuffer();return[t[0].toString(),t[1].toString(),t[2].toString(),t[3].toString()].join(".")}function zy(){const e=ii.Address.parse(window.verifierRegistryAddress);return Tc(["verifierRegistry",e],async()=>{const t=await Sh(),r=await yv(e,"get_verifiers",[],n=>n[0].beginParse().readDict(256,a=>({admin:a.readAddress().toFriendly(),quorum:a.readIntNumber(8),pubKeyEndpoints:Object.fromEntries(Array.from(a.readDict(256,o=>Pke(o.readUint(32))).entries()).map(([o,s])=>[new lh(o).toBuffer().toString("base64"),s.toString()])),name:a.readRef().readRemainingBytes().toString(),url:a.readRef().readRemainingBytes().toString()})),t);return Array.from(r.values())})}function Jq(e){return e[Math.floor(Math.random()*e.length)]}function Oke(e){return new Blob([JSON.stringify(e)],{type:"application/json"})}const yb=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(","),Bke=$y(e=>({status:null,setStatus:t=>e({status:t}),clear:()=>e({status:null})}));function ac(){const{contractAddress:e}=nc(),{data:t}=Eh(),{hasFiles:r,files:n}=oc(),{compiler:a,compilerSettings:o}=Y8(),s=n3(),{clear:l,setStatus:c,status:p}=Bke(),{data:m}=zy(),_=m?.find(O=>O.name===window.verifierId);return{...Ake(["submitSources"],async()=>{if(!e||!t?.codeCellHash.base64||!r()||!_)return;if(!s)throw new Error("Wallet is not connected");l();const O=_.quorum;let A=O,M;Ta(Ca.COMPILE_SUBMIT);const B=new FormData;for(const Z of n)B.append((Z.folder?Z.folder+"/":"")+Z.fileObj.name,Z.fileObj);B.append("json",Oke({compiler:a,compilerSettings:o,knownContractAddress:e,knownContractHash:t.codeCellHash.base64,sources:n.map(Z=>({includeInCommand:Z.includeInCommand,isEntrypoint:Z.isEntrypoint,isStdLib:Z.isStdlib,hasIncludeDirectives:Z.hasIncludeDirectives,folder:Z.folder})),senderAddress:s}));const L=yb[Math.floor(Math.random()*yb.length)],U=await fetch(`${L}/source`,{method:"POST",body:B});if(U.status!==200)throw Ta(Ca.COMPILE_SERVER_ERROR),new Error(`Error compiling on ${L} ${await U.text()}`);const D=await U.json(),Y=[];["unknown_error","compile_error"].includes(D.compileResult.result)&&(Ta(Ca.COMPILE_COMPILATION_ERROR),n.some(Z=>Z.isStdlib)?n[0].isStdlib||Y.push(Za.STDLIB_ORDER):Za.STDLIB_MISSING,n.some(Z=>Z.isEntrypoint)||Y.push(Za.ENTRYPOINT_MISSING),Y.push(Za.COMPILER_VERSION),Y.push(Za.REQUIRED_FILES),Y.push(Za.FILE_ORDER)),D.compileResult.result==="not_similar"&&(Ta(Ca.COMPILE_HASHES_NOT_SIMILAR),Y.push(Za.NOT_SIMILAR)),D.compileResult.result!=="similar"&&Y.push(Za.SUPPORT_GROUP),D.compileResult.result==="similar"&&Ta(Ca.COMPILE_SUCCESS_HASHES_MATCH);let q;if(D.msgCell){A--;const Z=new Set([L]);for(M=D.msgCell;A;){c(`Compile successful. Collected ${O-A}/${O}`);const V=Jq(yb.filter(h=>!Z.has(h)));if(!V)throw new Error("Not enough backends to collect signatures");console.log("Backends used: "+[...Z],"; next backend",V);const te=await fetch(`${V}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messageCell:M})});if(te.status!==200)throw Ta(Ca.SIGN_SERVER_ERROR),new Error(`Error collecting signatures from ${V} ${await te.text()}`);Ta(Ca.SIGN_SERVER_SUCCESS),M=(await te.json()).msgCell,A--}c(`Compile successful. Collected ${O-A}/${O}`),q=ii.Cell.fromBoc(Buffer.from(D.msgCell))[0].beginParse().readUint(64)}return{result:{...D,msgCell:M},hints:Y,queryId:q,status:p}}),compileStatus:p}}var Za=(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))(Za||{});const X8=()=>{const[e]=r3();return async(t,r,n,a)=>{try{let o;a&&(o=new ii.Cell,a.writeTo(o));const s={validUntil:Date.now()+5*60*1e3,messages:[{address:t,amount:r.toString(),stateInit:o?o.toBoc().toString("base64"):void 0,payload:n?.toBoc().toString("base64")}]};return await e.sendTransaction(s),"issued"}catch(o){return console.error(o),"rejected"}}},Uke=$y((e,t)=>({txns:{},updateTxn:(r,n)=>{e(a=>({txns:{...t().txns,[r]:n}}))}}));function eK(e,t){const r=X8(),{updateTxn:n,txns:a}=Uke();return ue.exports.useEffect(()=>{a[e]||n(e,"initial")},[]),{sendTXN:async(o,s,l,c)=>{n(e,"pending");const p=await r(o.toFriendly(),s,l,c);let m=1;if(p==="issued"){n(e,"issued");const _=setInterval(async()=>{const T=await t(m);m++,n(e,T),T!=="issued"&&clearInterval(_)},2e3)}else p==="rejected"&&n(e,"rejected")},data:{status:a[e]},clearTXN:()=>{n(e,"initial")}}}function tK(){const{data:e}=ac(),{data:t}=Eh(),{sendTXN:r,data:n,clearTXN:a}=eK("publishProof",async o=>{const s=await Q8(t.codeCellHash.base64);return o>20?"error":s?"success":"issued"});return ue.exports.useEffect(()=>{switch(n.status){case"pending":Ta(Ca.PUBLISH_CLICK);break;case"issued":Ta(Ca.TRANSACTION_ISSUED);break;case"rejected":Ta(Ca.TRANSACTION_REJECTED);break;case"error":Ta(Ca.TRANSACTION_ERROR);break;case"expired":Ta(Ca.TRANSACTION_EXPIRED);break;case"success":Ta(Ca.CONTRACT_DEPLOYED);break}},[n.status]),{sendTXN:()=>{r(ii.Address.parse(window.verifierRegistryAddress),ii.toNano(.5),ii.Cell.fromBoc(Buffer.from(e.result.msgCell))[0])},status:n.status,clearTXN:a}}const Nke=e=>{const t=new Bq.Sha256;return t.update(e),Buffer.from(t.digestSync())};async function Q8(e){return ContractVerifier.getSourcesJsonUrl(e,{verifier:window.verifierId,testnet:window.isTestnet})}function Vc(){const{contractAddress:e}=nc(),{data:t,error:r}=Eh(),{status:n}=tK(),{isLoading:a,error:o,data:s,refetch:l}=Tc([e,"proof"],async()=>{if(!e)return{hasOnchainProof:!1};const c=await Q8(t.codeCellHash.base64);return c?{hasOnchainProof:!0,...await ContractVerifier.getSourcesData(c,{testnet:window.isTestnet})}:{hasOnchainProof:!1,ipfsLink:c}},{enabled:!!e&&!!t?.codeCellHash.base64&&n==="initial",retry:2});return{isLoading:a,error:o??r,data:s,refetch:l}}function Lke(){const{data:e}=Vc();return ue.exports.useEffect(()=>{!e?.files||ContractVerifierUI.loadSourcesData(e,{containerSelector:"#myVerifierContainer",fileListSelector:"#myVerifierFiles",contentSelector:"#myVerifierContent",theme:"light"})},[e?.files]),{hasOnchainProof:e?.hasOnchainProof}}function Dke({button:e}){return Lke(),$t("div",{id:"myVerifierContainer",style:{color:"black"},children:[ne("div",{id:"myVerifierFiles"}),$t("div",{style:{position:"relative",overflow:"hidden",width:"100%"},children:[ne("div",{id:"myVerifierContent"}),ne("div",{style:{position:"absolute",top:-73,right:-24,zIndex:3},children:e})]})]})}var Z8={exports:{}};function J8(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)&&J8(r)}),e}Z8.exports=J8;Z8.exports.default=J8;class i9{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function rK(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function wf(e,...t){const r=Object.create(null);for(const n in e)r[n]=e[n];return t.forEach(function(n){for(const a in n)r[a]=n[a]}),r}const $ke="
    ",o9=e=>!!e.scope||e.sublanguage&&e.language,Fke=(e,{prefix:t})=>{if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((n,a)=>`${n}${"_".repeat(a+1)}`)].join(" ")}return`${t}${e}`};class jke{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=rK(t)}openNode(t){if(!o9(t))return;let r="";t.sublanguage?r=`language-${t.language}`:r=Fke(t.scope,{prefix:this.classPrefix}),this.span(r)}closeNode(t){!o9(t)||(this.buffer+=$ke)}value(){return this.buffer}span(t){this.buffer+=``}}const a9=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class eR{constructor(){this.rootNode=a9(),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=a9({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(n=>this._walk(t,n)),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=>{eR._collapse(r)})))}}class Wke extends eR{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 n=t.root;n.sublanguage=!0,n.language=r,this.add(n)}toHTML(){return new jke(this,this.options).value()}finalize(){return!0}}function bv(e){return e?typeof e=="string"?e:e.source:null}function nK(e){return Ch("(?=",e,")")}function zke(e){return Ch("(?:",e,")*")}function Hke(e){return Ch("(?:",e,")?")}function Ch(...e){return e.map(r=>bv(r)).join("")}function qke(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function tR(...e){return"("+(qke(e).capture?"":"?:")+e.map(n=>bv(n)).join("|")+")"}function iK(e){return new RegExp(e.toString()+"|").exec("").length-1}function Kke(e,t){const r=e&&e.exec(t);return r&&r.index===0}const Vke=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function rR(e,{joinWith:t}){let r=0;return e.map(n=>{r+=1;const a=r;let o=bv(n),s="";for(;o.length>0;){const l=Vke.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(n=>`(${n})`).join(t)}const Gke=/\b\B/,oK="[a-zA-Z]\\w*",nR="[a-zA-Z_]\\w*",aK="\\b\\d+(\\.\\d+)?",sK="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",lK="\\b(0b[01]+)",Yke="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Xke=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Ch(t,/.*\b/,e.binary,/\b.*/)),wf({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},e)},wv={begin:"\\\\[\\s\\S]",relevance:0},Qke={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[wv]},Zke={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[wv]},Jke={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/},u3=function(e,t,r={}){const n=wf({scope:"comment",begin:e,end:t,contains:[]},r);n.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=tR("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 n.contains.push({begin:Ch(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},e8e=u3("//","$"),t8e=u3("/\\*","\\*/"),r8e=u3("#","$"),n8e={scope:"number",begin:aK,relevance:0},i8e={scope:"number",begin:sK,relevance:0},o8e={scope:"number",begin:lK,relevance:0},a8e={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[wv,{begin:/\[/,end:/\]/,relevance:0,contains:[wv]}]}]},s8e={scope:"title",begin:oK,relevance:0},l8e={scope:"title",begin:nR,relevance:0},u8e={begin:"\\.\\s*"+nR,relevance:0},c8e=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 W1=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Gke,IDENT_RE:oK,UNDERSCORE_IDENT_RE:nR,NUMBER_RE:aK,C_NUMBER_RE:sK,BINARY_NUMBER_RE:lK,RE_STARTERS_RE:Yke,SHEBANG:Xke,BACKSLASH_ESCAPE:wv,APOS_STRING_MODE:Qke,QUOTE_STRING_MODE:Zke,PHRASAL_WORDS_MODE:Jke,COMMENT:u3,C_LINE_COMMENT_MODE:e8e,C_BLOCK_COMMENT_MODE:t8e,HASH_COMMENT_MODE:r8e,NUMBER_MODE:n8e,C_NUMBER_MODE:i8e,BINARY_NUMBER_MODE:o8e,REGEXP_MODE:a8e,TITLE_MODE:s8e,UNDERSCORE_TITLE_MODE:l8e,METHOD_GUARD:u8e,END_SAME_AS_BEGIN:c8e});function f8e(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function d8e(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function h8e(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=f8e,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function p8e(e,t){!Array.isArray(e.illegal)||(e.illegal=tR(...e.illegal))}function g8e(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 m8e(e,t){e.relevance===void 0&&(e.relevance=1)}const v8e=(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(n=>{delete e[n]}),e.keywords=r.keywords,e.begin=Ch(r.beforeMatch,nK(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},y8e=["of","and","for","in","not","or","if","then","parent","list","value"],b8e="keyword";function uK(e,t,r=b8e){const n=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(n,uK(e[o],t,o))}),n;function a(o,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const c=l.split("|");n[c[0]]=[o,w8e(c[0],c[1])]})}}function w8e(e,t){return t?Number(t):x8e(e)?0:1}function x8e(e){return y8e.includes(e.toLowerCase())}const s9={},Hd=e=>{console.error(e)},l9=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Hh=(e,t)=>{s9[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),s9[`${e}/${t}`]=!0)},Pw=new Error;function cK(e,t,{key:r}){let n=0;const a=e[r],o={},s={};for(let l=1;l<=t.length;l++)s[l+n]=a[l],o[l+n]=!0,n+=iK(t[l-1]);e[r]=s,e[r]._emit=o,e[r]._multi=!0}function _8e(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Hd("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Pw;if(typeof e.beginScope!="object"||e.beginScope===null)throw Hd("beginScope must be object"),Pw;cK(e,e.begin,{key:"beginScope"}),e.begin=rR(e.begin,{joinWith:""})}}function S8e(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Hd("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Pw;if(typeof e.endScope!="object"||e.endScope===null)throw Hd("endScope must be object"),Pw;cK(e,e.end,{key:"endScope"}),e.end=rR(e.end,{joinWith:""})}}function E8e(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function C8e(e){E8e(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),_8e(e),S8e(e)}function M8e(e){function t(s,l){return new RegExp(bv(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,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=iK(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t(rR(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const p=c.findIndex((_,T)=>T>0&&_!==void 0),m=this.matchIndexes[p];return c.splice(0,p),Object.assign(c,m)}}class n{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 c=new r;return this.rules.slice(l).forEach(([p,m])=>c.addRule(p,m)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let p=c.exec(l);if(this.resumingScanAtSamePosition()&&!(p&&p.index===this.lastIndex)){const m=this.getMatcher(0);m.lastIndex=this.lastIndex+1,p=m.exec(l)}return p&&(this.regexIndex+=p.position+1,this.regexIndex===this.count&&this.considerAll()),p}}function a(s){const l=new n;return s.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function o(s,l){const c=s;if(s.isCompiled)return c;[d8e,g8e,C8e,v8e].forEach(m=>m(s,l)),e.compilerExtensions.forEach(m=>m(s,l)),s.__beforeBegin=null,[h8e,p8e,m8e].forEach(m=>m(s,l)),s.isCompiled=!0;let p=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),p=s.keywords.$pattern,delete s.keywords.$pattern),p=p||/\w+/,s.keywords&&(s.keywords=uK(s.keywords,e.case_insensitive)),c.keywordPatternRe=t(p,!0),l&&(s.begin||(s.begin=/\B|\b/),c.beginRe=t(c.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(c.endRe=t(c.end)),c.terminatorEnd=bv(c.end)||"",s.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(c.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(m){return k8e(m==="self"?s:m)})),s.contains.forEach(function(m){o(m,c)}),s.starts&&o(s.starts,l),c.matcher=a(c),c}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=wf(e.classNameAliases||{}),o(e)}function fK(e){return e?e.endsWithParent||fK(e.starts):!1}function k8e(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return wf(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:fK(e)?wf(e,{starts:e.starts?wf(e.starts):null}):Object.isFrozen(e)?wf(e):e}var R8e="11.6.0";class A8e extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const c6=rK,u9=wf,c9=Symbol("nomatch"),T8e=7,I8e=function(e){const t=Object.create(null),r=Object.create(null),n=[];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:Wke};function c(y){return l.noHighlightRe.test(y)}function p(y){let S=y.className+" ";S+=y.parentNode?y.parentNode.className:"";const w=l.languageDetectRe.exec(S);if(w){const d=te(w[1]);return d||(l9(o.replace("{}",w[1])),l9("Falling back to no-highlight mode for this block.",y)),d?w[1]:"no-highlight"}return S.split(/\s+/).find(d=>c(d)||te(d))}function m(y,S,w){let d="",I="";typeof S=="object"?(d=y,w=S.ignoreIllegals,I=S.language):(Hh("10.7.0","highlight(lang, code, ...args) has been deprecated."),Hh("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),I=y,d=S),w===void 0&&(w=!0);const $={code:d,language:I};u("before:highlight",$);const b=$.result?$.result:_($.language,$.code,w);return b.code=$.code,u("after:highlight",b),b}function _(y,S,w,d){const I=Object.create(null);function $(ye,me){return ye.keywords[me]}function b(){if(!Ee.keywords){ut.addText(st);return}let ye=0;Ee.keywordPatternRe.lastIndex=0;let me=Ee.keywordPatternRe.exec(st),Q="";for(;me;){Q+=st.substring(ye,me.index);const j=ae.case_insensitive?me[0].toLowerCase():me[0],F=$(Ee,j);if(F){const[ie,de]=F;if(ut.addText(Q),Q="",I[j]=(I[j]||0)+1,I[j]<=T8e&&(_t+=de),ie.startsWith("_"))Q+=me[0];else{const pe=ae.classNameAliases[ie]||ie;ut.addKeyword(me[0],pe)}}else Q+=me[0];ye=Ee.keywordPatternRe.lastIndex,me=Ee.keywordPatternRe.exec(st)}Q+=st.substring(ye),ut.addText(Q)}function X(){if(st==="")return;let ye=null;if(typeof Ee.subLanguage=="string"){if(!t[Ee.subLanguage]){ut.addText(st);return}ye=_(Ee.subLanguage,st,!0,xe[Ee.subLanguage]),xe[Ee.subLanguage]=ye._top}else ye=O(st,Ee.subLanguage.length?Ee.subLanguage:null);Ee.relevance>0&&(_t+=ye.relevance),ut.addSublanguage(ye._emitter,ye.language)}function we(){Ee.subLanguage!=null?X():b(),st=""}function Ae(ye,me){let Q=1;const j=me.length-1;for(;Q<=j;){if(!ye._emit[Q]){Q++;continue}const F=ae.classNameAliases[ye[Q]]||ye[Q],ie=me[Q];F?ut.addKeyword(ie,F):(st=ie,b(),st=""),Q++}}function je(ye,me){return ye.scope&&typeof ye.scope=="string"&&ut.openNode(ae.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(ut.addKeyword(st,ae.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),st=""):ye.beginScope._multi&&(Ae(ye.beginScope,me),st="")),Ee=Object.create(ye,{parent:{value:Ee}}),Ee}function Vt(ye,me,Q){let j=Kke(ye.endRe,Q);if(j){if(ye["on:end"]){const F=new i9(ye);ye["on:end"](me,F),F.isMatchIgnored&&(j=!1)}if(j){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return Vt(ye.parent,me,Q)}function De(ye){return Ee.matcher.regexIndex===0?(st+=ye[0],1):(ve=!0,0)}function Fe(ye){const me=ye[0],Q=ye.rule,j=new i9(Q),F=[Q.__beforeBegin,Q["on:begin"]];for(const ie of F)if(!!ie&&(ie(ye,j),j.isMatchIgnored))return De(me);return Q.skip?st+=me:(Q.excludeBegin&&(st+=me),we(),!Q.returnBegin&&!Q.excludeBegin&&(st=me)),je(Q,ye),Q.returnBegin?0:me.length}function wt(ye){const me=ye[0],Q=S.substring(ye.index),j=Vt(Ee,ye,Q);if(!j)return c9;const F=Ee;Ee.endScope&&Ee.endScope._wrap?(we(),ut.addKeyword(me,Ee.endScope._wrap)):Ee.endScope&&Ee.endScope._multi?(we(),Ae(Ee.endScope,ye)):F.skip?st+=me:(F.returnEnd||F.excludeEnd||(st+=me),we(),F.excludeEnd&&(st=me));do Ee.scope&&ut.closeNode(),!Ee.skip&&!Ee.subLanguage&&(_t+=Ee.relevance),Ee=Ee.parent;while(Ee!==j.parent);return j.starts&&je(j.starts,ye),F.returnEnd?0:me.length}function Ke(){const ye=[];for(let me=Ee;me!==ae;me=me.parent)me.scope&&ye.unshift(me.scope);ye.forEach(me=>ut.openNode(me))}let ht={};function dr(ye,me){const Q=me&&me[0];if(st+=ye,Q==null)return we(),0;if(ht.type==="begin"&&me.type==="end"&&ht.index===me.index&&Q===""){if(st+=S.slice(me.index,me.index+1),!a){const j=new Error(`0 width match regex (${y})`);throw j.languageName=y,j.badRule=ht.rule,j}return 1}if(ht=me,me.type==="begin")return Fe(me);if(me.type==="illegal"&&!w){const j=new Error('Illegal lexeme "'+Q+'" for mode "'+(Ee.scope||"")+'"');throw j.mode=Ee,j}else if(me.type==="end"){const j=wt(me);if(j!==c9)return j}if(me.type==="illegal"&&Q==="")return 1;if(Ut>1e5&&Ut>me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return st+=Q,Q.length}const ae=te(y);if(!ae)throw Hd(o.replace("{}",y)),new Error('Unknown language: "'+y+'"');const Ve=M8e(ae);let Nt="",Ee=d||Ve;const xe={},ut=new l.__emitter(l);Ke();let st="",_t=0,Pt=0,Ut=0,ve=!1;try{for(Ee.matcher.considerAll();;){Ut++,ve?ve=!1:Ee.matcher.considerAll(),Ee.matcher.lastIndex=Pt;const ye=Ee.matcher.exec(S);if(!ye)break;const me=S.substring(Pt,ye.index),Q=dr(me,ye);Pt=ye.index+Q}return dr(S.substring(Pt)),ut.closeAllNodes(),ut.finalize(),Nt=ut.toHTML(),{language:y,value:Nt,relevance:_t,illegal:!1,_emitter:ut,_top:Ee}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:y,value:c6(S),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:Pt,context:S.slice(Pt-100,Pt+100),mode:ye.mode,resultSoFar:Nt},_emitter:ut};if(a)return{language:y,value:c6(S),illegal:!1,relevance:0,errorRaised:ye,_emitter:ut,_top:Ee};throw ye}}function T(y){const S={value:c6(y),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return S._emitter.addText(y),S}function O(y,S){S=S||l.languages||Object.keys(t);const w=T(y),d=S.filter(te).filter(h).map(we=>_(we,y,!1));d.unshift(w);const I=d.sort((we,Ae)=>{if(we.relevance!==Ae.relevance)return Ae.relevance-we.relevance;if(we.language&&Ae.language){if(te(we.language).supersetOf===Ae.language)return 1;if(te(Ae.language).supersetOf===we.language)return-1}return 0}),[$,b]=I,X=$;return X.secondBest=b,X}function A(y,S,w){const d=S&&r[S]||w;y.classList.add("hljs"),y.classList.add(`language-${d}`)}function M(y){let S=null;const w=p(y);if(c(w))return;if(u("before:highlightElement",{el:y,language:w}),y.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(y)),l.throwUnescapedHTML))throw new A8e("One of your code blocks includes unescaped HTML.",y.innerHTML);S=y;const d=S.textContent,I=w?m(d,{language:w,ignoreIllegals:!0}):O(d);y.innerHTML=I.value,A(y,w,I.language),y.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(y.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),u("after:highlightElement",{el:y,result:I,text:d})}function B(y){l=u9(l,y)}const L=()=>{Y(),Hh("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function U(){Y(),Hh("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let D=!1;function Y(){if(document.readyState==="loading"){D=!0;return}document.querySelectorAll(l.cssSelector).forEach(M)}function q(){D&&Y()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",q,!1);function Z(y,S){let w=null;try{w=S(e)}catch(d){if(Hd("Language definition for '{}' could not be registered.".replace("{}",y)),a)Hd(d);else throw d;w=s}w.name||(w.name=y),t[y]=w,w.rawDefinition=S.bind(null,e),w.aliases&&R(w.aliases,{languageName:y})}function ee(y){delete t[y];for(const S of Object.keys(r))r[S]===y&&delete r[S]}function V(){return Object.keys(t)}function te(y){return y=(y||"").toLowerCase(),t[y]||t[r[y]]}function R(y,{languageName:S}){typeof y=="string"&&(y=[y]),y.forEach(w=>{r[w.toLowerCase()]=S})}function h(y){const S=te(y);return S&&!S.disableAutodetect}function g(y){y["before:highlightBlock"]&&!y["before:highlightElement"]&&(y["before:highlightElement"]=S=>{y["before:highlightBlock"](Object.assign({block:S.el},S))}),y["after:highlightBlock"]&&!y["after:highlightElement"]&&(y["after:highlightElement"]=S=>{y["after:highlightBlock"](Object.assign({block:S.el},S))})}function v(y){g(y),n.push(y)}function u(y,S){const w=y;n.forEach(function(d){d[w]&&d[w](S)})}function f(y){return Hh("10.7.0","highlightBlock will be removed entirely in v12.0"),Hh("10.7.0","Please use highlightElement now."),M(y)}Object.assign(e,{highlight:m,highlightAuto:O,highlightAll:Y,highlightElement:M,highlightBlock:f,configure:B,initHighlighting:L,initHighlightingOnLoad:U,registerLanguage:Z,unregisterLanguage:ee,listLanguages:V,getLanguage:te,registerAliases:R,autoDetection:h,inherit:u9,addPlugin:v}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=R8e,e.regex={concat:Ch,lookahead:nK,either:tR,optional:Hke,anyNumberOfTimes:zke};for(const y in W1)typeof W1[y]=="object"&&Z8.exports(W1[y]);return Object.assign(e,W1),e};var xv=I8e({}),P8e=xv;xv.HighlightJS=xv;xv.default=xv;const dK=P8e,f9='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',d9=/\"[^\n\"]+\"[Hhcusa]?/;let ES;try{ES=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 p9=/[a-zA-Z_][0-9a-zA-Z_]*/;function U8e(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 N8e(e){e.registerLanguage("fift",B8e),e.registerLanguage("func",O8e),e.registerLanguage("tlb",U8e)}N8e(dK);function L8e({button:e}){const{data:t}=Eh(),r=_a(),n=ga(r.breakpoints.down("lg")),a=ue.exports.useRef(null);return ue.exports.useEffect(()=>{dK.highlightElement(a.current)},[t?.decompiled,a.current]),$t("pre",{style:{overflow:"auto",height:800,marginTop:0,lineHeight:"25px",fontSize:14,paddingTop:"0.5em",fontFamily:"monospace"},children:[$t("code",{className:"language-fift",style:{background:"#fff",display:"flex"},children:[ne("div",{style:{textAlign:"right",color:"#728a96",paddingLeft:n?0:20},children:t?.decompiled?.trim().split(` -`).map((o,s)=>s+1).join(` -`)}),ne("div",{style:{background:"transparent",paddingLeft:20},ref:a,children:t?.decompiled})]}),e]})}const D8e="/assets/verified-light.2c74da9f.svg",$8e="/assets/download.62d50798.svg",c3="/assets/copy.da496d78.svg";var hK={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(n,a,o){function s(p,m){if(!a[p]){if(!n[p]){var _=typeof nl=="function"&&nl;if(!m&&_)return _(p,!0);if(l)return l(p,!0);var T=new Error("Cannot find module '"+p+"'");throw T.code="MODULE_NOT_FOUND",T}var O=a[p]={exports:{}};n[p][0].call(O.exports,function(A){var M=n[p][1][A];return s(M||A)},O,O.exports,r,n,a,o)}return a[p].exports}for(var l=typeof nl=="function"&&nl,c=0;c>2,O=(3&p)<<4|m>>4,A=1>6:64,M=2>4,m=(15&T)<<4|(O=l.indexOf(c.charAt(M++)))>>2,_=(3&O)<<6|(A=l.indexOf(c.charAt(M++))),U[B++]=p,O!==64&&(U[B++]=m),A!==64&&(U[B++]=_);return U}},{"./support":30,"./utils":32}],2:[function(r,n,a){var o=r("./external"),s=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function p(m,_,T,O,A){this.compressedSize=m,this.uncompressedSize=_,this.crc32=T,this.compression=O,this.compressedContent=A}p.prototype={getContentWorker:function(){var m=new s(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),_=this;return m.on("end",function(){if(this.streamInfo.data_length!==_.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},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)}},p.createWorkerFrom=function(m,_,T){return m.pipe(new l).pipe(new c("uncompressedSize")).pipe(_.compressWorker(T)).pipe(new c("compressedSize")).withStreamInfo("compression",_)},n.exports=p},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,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,n,a){var o=r("./utils"),s=function(){for(var l,c=[],p=0;p<256;p++){l=p;for(var m=0;m<8;m++)l=1&l?3988292384^l>>>1:l>>>1;c[p]=l}return c}();n.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(p,m,_,T){var O=s,A=T+_;p^=-1;for(var M=T;M>>8^O[255&(p^m[M])];return-1^p}(0|c,l,l.length,0):function(p,m,_,T){var O=s,A=T+_;p^=-1;for(var M=T;M>>8^O[255&(p^m.charCodeAt(M))];return-1^p}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(r,n,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,n,a){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,a){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),l=r("./utils"),c=r("./stream/GenericWorker"),p=o?"uint8array":"array";function m(_,T){c.call(this,"FlateWorker/"+_),this._pako=null,this._pakoAction=_,this._pakoOptions=T,this.meta={}}a.magic="\b\0",l.inherits(m,c),m.prototype.processChunk=function(_){this.meta=_.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(p,_.data),!1)},m.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var _=this;this._pako.onData=function(T){_.push({data:T,meta:_.meta})}},a.compressWorker=function(_){return new m("Deflate",_)},a.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,a){function o(O,A){var M,B="";for(M=0;M>>=8;return B}function s(O,A,M,B,L,U){var D,Y,q=O.file,Z=O.compression,ee=U!==p.utf8encode,V=l.transformTo("string",U(q.name)),te=l.transformTo("string",p.utf8encode(q.name)),R=q.comment,h=l.transformTo("string",U(R)),g=l.transformTo("string",p.utf8encode(R)),v=te.length!==q.name.length,u=g.length!==R.length,f="",y="",S="",w=q.dir,d=q.date,I={crc32:0,compressedSize:0,uncompressedSize:0};A&&!M||(I.crc32=O.crc32,I.compressedSize=O.compressedSize,I.uncompressedSize=O.uncompressedSize);var $=0;A&&($|=8),ee||!v&&!u||($|=2048);var b=0,X=0;w&&(b|=16),L==="UNIX"?(X=798,b|=function(Ae,je){var Vt=Ae;return Ae||(Vt=je?16893:33204),(65535&Vt)<<16}(q.unixPermissions,w)):(X=20,b|=function(Ae){return 63&(Ae||0)}(q.dosPermissions)),D=d.getUTCHours(),D<<=6,D|=d.getUTCMinutes(),D<<=5,D|=d.getUTCSeconds()/2,Y=d.getUTCFullYear()-1980,Y<<=4,Y|=d.getUTCMonth()+1,Y<<=5,Y|=d.getUTCDate(),v&&(y=o(1,1)+o(m(V),4)+te,f+="up"+o(y.length,2)+y),u&&(S=o(1,1)+o(m(h),4)+g,f+="uc"+o(S.length,2)+S);var we="";return we+=` -\0`,we+=o($,2),we+=Z.magic,we+=o(D,2),we+=o(Y,2),we+=o(I.crc32,4),we+=o(I.compressedSize,4),we+=o(I.uncompressedSize,4),we+=o(V.length,2),we+=o(f.length,2),{fileRecord:_.LOCAL_FILE_HEADER+we+V+f,dirRecord:_.CENTRAL_FILE_HEADER+o(X,2)+we+o(h.length,2)+"\0\0\0\0"+o(b,4)+o(B,4)+V+f+h}}var l=r("../utils"),c=r("../stream/GenericWorker"),p=r("../utf8"),m=r("../crc32"),_=r("../signature");function T(O,A,M,B){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=A,this.zipPlatform=M,this.encodeFileName=B,this.streamFiles=O,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(T,c),T.prototype.push=function(O){var A=O.meta.percent||0,M=this.entriesCount,B=this._sources.length;this.accumulate?this.contentBuffer.push(O):(this.bytesWritten+=O.data.length,c.prototype.push.call(this,{data:O.data,meta:{currentFile:this.currentFile,percent:M?(A+100*(M-B-1))/M:100}}))},T.prototype.openedSource=function(O){this.currentSourceOffset=this.bytesWritten,this.currentFile=O.file.name;var A=this.streamFiles&&!O.file.dir;if(A){var M=s(O,A,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:M.fileRecord,meta:{percent:0}})}else this.accumulate=!0},T.prototype.closedSource=function(O){this.accumulate=!1;var A=this.streamFiles&&!O.file.dir,M=s(O,A,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(M.dirRecord),A)this.push({data:function(B){return _.DATA_DESCRIPTOR+o(B.crc32,4)+o(B.compressedSize,4)+o(B.uncompressedSize,4)}(O),meta:{percent:100}});else for(this.push({data:M.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},T.prototype.flush=function(){for(var O=this.bytesWritten,A=0;A=this.index;c--)p=(p<<8)+this.byteAt(c);return this.index+=l,p},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))}},n.exports=s},{"../utils":32}],19:[function(r,n,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 c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,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 c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,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 c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,a){var o=r("../utils"),s=r("../support"),l=r("./ArrayReader"),c=r("./StringReader"),p=r("./NodeBufferReader"),m=r("./Uint8ArrayReader");n.exports=function(_){var T=o.getTypeOf(_);return o.checkSupport(T),T!=="string"||s.uint8array?T==="nodebuffer"?new p(_):s.uint8array?new m(o.transformTo("uint8array",_)):new l(o.transformTo("array",_)):new c(_)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,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,n,a){var o=r("./GenericWorker"),s=r("../utils");function l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}s.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:s.transformTo(this.destType,c.data),meta:c.meta})},n.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,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(c){this.streamInfo.crc32=s(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,a){var o=r("../utils"),s=r("./GenericWorker");function l(c){s.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,s),l.prototype.processChunk=function(c){if(c){var p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+c.data.length}s.prototype.processChunk.call(this,c)},n.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,a){var o=r("../utils"),s=r("./GenericWorker");function l(c){s.call(this,"DataWorker");var p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(m){p.dataIsReady=!0,p.data=m,p.max=m&&m.length||0,p.type=o.getTypeOf(m),p.isPaused||p._tickAndRepeat()},function(m){p.error(m)})}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 c=null,p=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,p);break;case"uint8array":c=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":c=this.data.slice(this.index,p)}return this.index=p,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,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 c=0;c "+s:s}},n.exports=o},{}],29:[function(r,n,a){var o=r("../utils"),s=r("./ConvertWorker"),l=r("./GenericWorker"),c=r("../base64"),p=r("../support"),m=r("../external"),_=null;if(p.nodestream)try{_=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function T(A,M){return new m.Promise(function(B,L){var U=[],D=A._internalType,Y=A._outputType,q=A._mimeType;A.on("data",function(Z,ee){U.push(Z),M&&M(ee)}).on("error",function(Z){U=[],L(Z)}).on("end",function(){try{var Z=function(ee,V,te){switch(ee){case"blob":return o.newBlob(o.transformTo("arraybuffer",V),te);case"base64":return c.encode(V);default:return o.transformTo(ee,V)}}(Y,function(ee,V){var te,R=0,h=null,g=0;for(te=0;te"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,n,a){for(var o=r("./utils"),s=r("./support"),l=r("./nodejsUtils"),c=r("./stream/GenericWorker"),p=new Array(256),m=0;m<256;m++)p[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;p[254]=p[254]=1;function _(){c.call(this,"utf-8 decode"),this.leftOver=null}function T(){c.call(this,"utf-8 encode")}a.utf8encode=function(O){return s.nodebuffer?l.newBufferFrom(O,"utf-8"):function(A){var M,B,L,U,D,Y=A.length,q=0;for(U=0;U>>6:(B<65536?M[D++]=224|B>>>12:(M[D++]=240|B>>>18,M[D++]=128|B>>>12&63),M[D++]=128|B>>>6&63),M[D++]=128|63&B);return M}(O)},a.utf8decode=function(O){return s.nodebuffer?o.transformTo("nodebuffer",O).toString("utf-8"):function(A){var M,B,L,U,D=A.length,Y=new Array(2*D);for(M=B=0;M>10&1023,Y[B++]=56320|1023&L)}return Y.length!==B&&(Y.subarray?Y=Y.subarray(0,B):Y.length=B),o.applyFromCharCode(Y)}(O=o.transformTo(s.uint8array?"uint8array":"array",O))},o.inherits(_,c),_.prototype.processChunk=function(O){var A=o.transformTo(s.uint8array?"uint8array":"array",O.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var M=A;(A=new Uint8Array(M.length+this.leftOver.length)).set(this.leftOver,0),A.set(M,this.leftOver.length)}else A=this.leftOver.concat(A);this.leftOver=null}var B=function(U,D){var Y;for((D=D||U.length)>U.length&&(D=U.length),Y=D-1;0<=Y&&(192&U[Y])==128;)Y--;return Y<0||Y===0?D:Y+p[U[Y]]>D?Y:D}(A),L=A;B!==A.length&&(s.uint8array?(L=A.subarray(0,B),this.leftOver=A.subarray(B,A.length)):(L=A.slice(0,B),this.leftOver=A.slice(B,A.length))),this.push({data:a.utf8decode(L),meta:O.meta})},_.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:a.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},a.Utf8DecodeWorker=_,o.inherits(T,c),T.prototype.processChunk=function(O){this.push({data:a.utf8encode(O.data),meta:O.meta})},a.Utf8EncodeWorker=T},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,a){var o=r("./support"),s=r("./base64"),l=r("./nodejsUtils"),c=r("./external");function p(M){return M}function m(M,B){for(var L=0;L>8;this.dir=!!(16&this.externalFileAttributes),O==0&&(this.dosPermissions=63&this.externalFileAttributes),O==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var O=o(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=O.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=O.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=O.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=O.readInt(4))}},readExtraFields:function(O){var A,M,B,L=O.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});O.index+4>>6:(O<65536?T[B++]=224|O>>>12:(T[B++]=240|O>>>18,T[B++]=128|O>>>12&63),T[B++]=128|O>>>6&63),T[B++]=128|63&O);return T},a.buf2binstring=function(_){return m(_,_.length)},a.binstring2buf=function(_){for(var T=new o.Buf8(_.length),O=0,A=T.length;O>10&1023,U[A++]=56320|1023&M)}return m(U,A)},a.utf8border=function(_,T){var O;for((T=T||_.length)>_.length&&(T=_.length),O=T-1;0<=O&&(192&_[O])==128;)O--;return O<0||O===0?T:O+c[_[O]]>T?O:T}},{"./common":41}],43:[function(r,n,a){n.exports=function(o,s,l,c){for(var p=65535&o|0,m=o>>>16&65535|0,_=0;l!==0;){for(l-=_=2e3>>1:s>>>1;l[c]=s}return l}();n.exports=function(s,l,c,p){var m=o,_=p+c;s^=-1;for(var T=p;T<_;T++)s=s>>>8^m[255&(s^l[T])];return-1^s}},{}],46:[function(r,n,a){var o,s=r("../utils/common"),l=r("./trees"),c=r("./adler32"),p=r("./crc32"),m=r("./messages"),_=0,T=4,O=0,A=-2,M=-1,B=4,L=2,U=8,D=9,Y=286,q=30,Z=19,ee=2*Y+1,V=15,te=3,R=258,h=R+te+1,g=42,v=113,u=1,f=2,y=3,S=4;function w(ae,Ve){return ae.msg=m[Ve],Ve}function d(ae){return(ae<<1)-(4ae.avail_out&&(Nt=ae.avail_out),Nt!==0&&(s.arraySet(ae.output,Ve.pending_buf,Ve.pending_out,Nt,ae.next_out),ae.next_out+=Nt,Ve.pending_out+=Nt,ae.total_out+=Nt,ae.avail_out-=Nt,Ve.pending-=Nt,Ve.pending===0&&(Ve.pending_out=0))}function b(ae,Ve){l._tr_flush_block(ae,0<=ae.block_start?ae.block_start:-1,ae.strstart-ae.block_start,Ve),ae.block_start=ae.strstart,$(ae.strm)}function X(ae,Ve){ae.pending_buf[ae.pending++]=Ve}function we(ae,Ve){ae.pending_buf[ae.pending++]=Ve>>>8&255,ae.pending_buf[ae.pending++]=255&Ve}function Ae(ae,Ve){var Nt,Ee,xe=ae.max_chain_length,ut=ae.strstart,st=ae.prev_length,_t=ae.nice_match,Pt=ae.strstart>ae.w_size-h?ae.strstart-(ae.w_size-h):0,Ut=ae.window,ve=ae.w_mask,ye=ae.prev,me=ae.strstart+R,Q=Ut[ut+st-1],j=Ut[ut+st];ae.prev_length>=ae.good_match&&(xe>>=2),_t>ae.lookahead&&(_t=ae.lookahead);do if(Ut[(Nt=Ve)+st]===j&&Ut[Nt+st-1]===Q&&Ut[Nt]===Ut[ut]&&Ut[++Nt]===Ut[ut+1]){ut+=2,Nt++;do;while(Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&Ut[++ut]===Ut[++Nt]&&utPt&&--xe!=0);return st<=ae.lookahead?st:ae.lookahead}function je(ae){var Ve,Nt,Ee,xe,ut,st,_t,Pt,Ut,ve,ye=ae.w_size;do{if(xe=ae.window_size-ae.lookahead-ae.strstart,ae.strstart>=ye+(ye-h)){for(s.arraySet(ae.window,ae.window,ye,ye,0),ae.match_start-=ye,ae.strstart-=ye,ae.block_start-=ye,Ve=Nt=ae.hash_size;Ee=ae.head[--Ve],ae.head[Ve]=ye<=Ee?Ee-ye:0,--Nt;);for(Ve=Nt=ye;Ee=ae.prev[--Ve],ae.prev[Ve]=ye<=Ee?Ee-ye:0,--Nt;);xe+=ye}if(ae.strm.avail_in===0)break;if(st=ae.strm,_t=ae.window,Pt=ae.strstart+ae.lookahead,Ut=xe,ve=void 0,ve=st.avail_in,Ut=te)for(ut=ae.strstart-ae.insert,ae.ins_h=ae.window[ut],ae.ins_h=(ae.ins_h<=te&&(ae.ins_h=(ae.ins_h<=te)if(Ee=l._tr_tally(ae,ae.strstart-ae.match_start,ae.match_length-te),ae.lookahead-=ae.match_length,ae.match_length<=ae.max_lazy_match&&ae.lookahead>=te){for(ae.match_length--;ae.strstart++,ae.ins_h=(ae.ins_h<=te&&(ae.ins_h=(ae.ins_h<=te&&ae.match_length<=ae.prev_length){for(xe=ae.strstart+ae.lookahead-te,Ee=l._tr_tally(ae,ae.strstart-1-ae.prev_match,ae.prev_length-te),ae.lookahead-=ae.prev_length-1,ae.prev_length-=2;++ae.strstart<=xe&&(ae.ins_h=(ae.ins_h<ae.pending_buf_size-5&&(Nt=ae.pending_buf_size-5);;){if(ae.lookahead<=1){if(je(ae),ae.lookahead===0&&Ve===_)return u;if(ae.lookahead===0)break}ae.strstart+=ae.lookahead,ae.lookahead=0;var Ee=ae.block_start+Nt;if((ae.strstart===0||ae.strstart>=Ee)&&(ae.lookahead=ae.strstart-Ee,ae.strstart=Ee,b(ae,!1),ae.strm.avail_out===0)||ae.strstart-ae.block_start>=ae.w_size-h&&(b(ae,!1),ae.strm.avail_out===0))return u}return ae.insert=0,Ve===T?(b(ae,!0),ae.strm.avail_out===0?y:S):(ae.strstart>ae.block_start&&(b(ae,!1),ae.strm.avail_out),u)}),new Fe(4,4,8,4,Vt),new Fe(4,5,16,8,Vt),new Fe(4,6,32,32,Vt),new Fe(4,4,16,16,De),new Fe(8,16,32,32,De),new Fe(8,16,128,128,De),new Fe(8,32,128,256,De),new Fe(32,128,258,1024,De),new Fe(32,258,258,4096,De)],a.deflateInit=function(ae,Ve){return dr(ae,Ve,U,15,8,0)},a.deflateInit2=dr,a.deflateReset=ht,a.deflateResetKeep=Ke,a.deflateSetHeader=function(ae,Ve){return ae&&ae.state?ae.state.wrap!==2?A:(ae.state.gzhead=Ve,O):A},a.deflate=function(ae,Ve){var Nt,Ee,xe,ut;if(!ae||!ae.state||5>8&255),X(Ee,Ee.gzhead.time>>16&255),X(Ee,Ee.gzhead.time>>24&255),X(Ee,Ee.level===9?2:2<=Ee.strategy||Ee.level<2?4:0),X(Ee,255&Ee.gzhead.os),Ee.gzhead.extra&&Ee.gzhead.extra.length&&(X(Ee,255&Ee.gzhead.extra.length),X(Ee,Ee.gzhead.extra.length>>8&255)),Ee.gzhead.hcrc&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending,0)),Ee.gzindex=0,Ee.status=69):(X(Ee,0),X(Ee,0),X(Ee,0),X(Ee,0),X(Ee,0),X(Ee,Ee.level===9?2:2<=Ee.strategy||Ee.level<2?4:0),X(Ee,3),Ee.status=v);else{var st=U+(Ee.w_bits-8<<4)<<8;st|=(2<=Ee.strategy||Ee.level<2?0:Ee.level<6?1:Ee.level===6?2:3)<<6,Ee.strstart!==0&&(st|=32),st+=31-st%31,Ee.status=v,we(Ee,st),Ee.strstart!==0&&(we(Ee,ae.adler>>>16),we(Ee,65535&ae.adler)),ae.adler=1}if(Ee.status===69)if(Ee.gzhead.extra){for(xe=Ee.pending;Ee.gzindex<(65535&Ee.gzhead.extra.length)&&(Ee.pending!==Ee.pending_buf_size||(Ee.gzhead.hcrc&&Ee.pending>xe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),$(ae),xe=Ee.pending,Ee.pending!==Ee.pending_buf_size));)X(Ee,255&Ee.gzhead.extra[Ee.gzindex]),Ee.gzindex++;Ee.gzhead.hcrc&&Ee.pending>xe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),Ee.gzindex===Ee.gzhead.extra.length&&(Ee.gzindex=0,Ee.status=73)}else Ee.status=73;if(Ee.status===73)if(Ee.gzhead.name){xe=Ee.pending;do{if(Ee.pending===Ee.pending_buf_size&&(Ee.gzhead.hcrc&&Ee.pending>xe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),$(ae),xe=Ee.pending,Ee.pending===Ee.pending_buf_size)){ut=1;break}ut=Ee.gzindexxe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),ut===0&&(Ee.gzindex=0,Ee.status=91)}else Ee.status=91;if(Ee.status===91)if(Ee.gzhead.comment){xe=Ee.pending;do{if(Ee.pending===Ee.pending_buf_size&&(Ee.gzhead.hcrc&&Ee.pending>xe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),$(ae),xe=Ee.pending,Ee.pending===Ee.pending_buf_size)){ut=1;break}ut=Ee.gzindexxe&&(ae.adler=p(ae.adler,Ee.pending_buf,Ee.pending-xe,xe)),ut===0&&(Ee.status=103)}else Ee.status=103;if(Ee.status===103&&(Ee.gzhead.hcrc?(Ee.pending+2>Ee.pending_buf_size&&$(ae),Ee.pending+2<=Ee.pending_buf_size&&(X(Ee,255&ae.adler),X(Ee,ae.adler>>8&255),ae.adler=0,Ee.status=v)):Ee.status=v),Ee.pending!==0){if($(ae),ae.avail_out===0)return Ee.last_flush=-1,O}else if(ae.avail_in===0&&d(Ve)<=d(Nt)&&Ve!==T)return w(ae,-5);if(Ee.status===666&&ae.avail_in!==0)return w(ae,-5);if(ae.avail_in!==0||Ee.lookahead!==0||Ve!==_&&Ee.status!==666){var _t=Ee.strategy===2?function(Pt,Ut){for(var ve;;){if(Pt.lookahead===0&&(je(Pt),Pt.lookahead===0)){if(Ut===_)return u;break}if(Pt.match_length=0,ve=l._tr_tally(Pt,0,Pt.window[Pt.strstart]),Pt.lookahead--,Pt.strstart++,ve&&(b(Pt,!1),Pt.strm.avail_out===0))return u}return Pt.insert=0,Ut===T?(b(Pt,!0),Pt.strm.avail_out===0?y:S):Pt.last_lit&&(b(Pt,!1),Pt.strm.avail_out===0)?u:f}(Ee,Ve):Ee.strategy===3?function(Pt,Ut){for(var ve,ye,me,Q,j=Pt.window;;){if(Pt.lookahead<=R){if(je(Pt),Pt.lookahead<=R&&Ut===_)return u;if(Pt.lookahead===0)break}if(Pt.match_length=0,Pt.lookahead>=te&&0Pt.lookahead&&(Pt.match_length=Pt.lookahead)}if(Pt.match_length>=te?(ve=l._tr_tally(Pt,1,Pt.match_length-te),Pt.lookahead-=Pt.match_length,Pt.strstart+=Pt.match_length,Pt.match_length=0):(ve=l._tr_tally(Pt,0,Pt.window[Pt.strstart]),Pt.lookahead--,Pt.strstart++),ve&&(b(Pt,!1),Pt.strm.avail_out===0))return u}return Pt.insert=0,Ut===T?(b(Pt,!0),Pt.strm.avail_out===0?y:S):Pt.last_lit&&(b(Pt,!1),Pt.strm.avail_out===0)?u:f}(Ee,Ve):o[Ee.level].func(Ee,Ve);if(_t!==y&&_t!==S||(Ee.status=666),_t===u||_t===y)return ae.avail_out===0&&(Ee.last_flush=-1),O;if(_t===f&&(Ve===1?l._tr_align(Ee):Ve!==5&&(l._tr_stored_block(Ee,0,0,!1),Ve===3&&(I(Ee.head),Ee.lookahead===0&&(Ee.strstart=0,Ee.block_start=0,Ee.insert=0))),$(ae),ae.avail_out===0))return Ee.last_flush=-1,O}return Ve!==T?O:Ee.wrap<=0?1:(Ee.wrap===2?(X(Ee,255&ae.adler),X(Ee,ae.adler>>8&255),X(Ee,ae.adler>>16&255),X(Ee,ae.adler>>24&255),X(Ee,255&ae.total_in),X(Ee,ae.total_in>>8&255),X(Ee,ae.total_in>>16&255),X(Ee,ae.total_in>>24&255)):(we(Ee,ae.adler>>>16),we(Ee,65535&ae.adler)),$(ae),0=Nt.w_size&&(ut===0&&(I(Nt.head),Nt.strstart=0,Nt.block_start=0,Nt.insert=0),Ut=new s.Buf8(Nt.w_size),s.arraySet(Ut,Ve,ve-Nt.w_size,Nt.w_size,0),Ve=Ut,ve=Nt.w_size),st=ae.avail_in,_t=ae.next_in,Pt=ae.input,ae.avail_in=ve,ae.next_in=0,ae.input=Ve,je(Nt);Nt.lookahead>=te;){for(Ee=Nt.strstart,xe=Nt.lookahead-(te-1);Nt.ins_h=(Nt.ins_h<>>=te=V>>>24,D-=te,(te=V>>>16&255)===0)f[m++]=65535&V;else{if(!(16&te)){if((64&te)==0){V=Y[(65535&V)+(U&(1<>>=te,D-=te),D<15&&(U+=u[c++]<>>=te=V>>>24,D-=te,!(16&(te=V>>>16&255))){if((64&te)==0){V=q[(65535&V)+(U&(1<>>=te,D-=te,(te=m-_)>3,U&=(1<<(D-=R<<3))-1,o.next_in=c,o.next_out=m,o.avail_in=c>>24&255)+(g>>>8&65280)+((65280&g)<<8)+((255&g)<<24)}function U(){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 D(g){var v;return g&&g.state?(v=g.state,g.total_in=g.total_out=v.total=0,g.msg="",v.wrap&&(g.adler=1&v.wrap),v.mode=A,v.last=0,v.havedict=0,v.dmax=32768,v.head=null,v.hold=0,v.bits=0,v.lencode=v.lendyn=new o.Buf32(M),v.distcode=v.distdyn=new o.Buf32(B),v.sane=1,v.back=-1,T):O}function Y(g){var v;return g&&g.state?((v=g.state).wsize=0,v.whave=0,v.wnext=0,D(g)):O}function q(g,v){var u,f;return g&&g.state?(f=g.state,v<0?(u=0,v=-v):(u=1+(v>>4),v<48&&(v&=15)),v&&(v<8||15=S.wsize?(o.arraySet(S.window,v,u-S.wsize,S.wsize,0),S.wnext=0,S.whave=S.wsize):(f<(y=S.wsize-S.wnext)&&(y=f),o.arraySet(S.window,v,u-f,y,S.wnext),(f-=y)?(o.arraySet(S.window,v,u-f,f,0),S.wnext=f,S.whave=S.wsize):(S.wnext+=y,S.wnext===S.wsize&&(S.wnext=0),S.whave>>8&255,u.check=l(u.check,ut,2,0),b=$=0,u.mode=2;break}if(u.flags=0,u.head&&(u.head.done=!1),!(1&u.wrap)||(((255&$)<<8)+($>>8))%31){g.msg="incorrect header check",u.mode=30;break}if((15&$)!=8){g.msg="unknown compression method",u.mode=30;break}if(b-=4,ae=8+(15&($>>>=4)),u.wbits===0)u.wbits=ae;else if(ae>u.wbits){g.msg="invalid window size",u.mode=30;break}u.dmax=1<>8&1),512&u.flags&&(ut[0]=255&$,ut[1]=$>>>8&255,u.check=l(u.check,ut,2,0)),b=$=0,u.mode=3;case 3:for(;b<32;){if(d===0)break e;d--,$+=f[S++]<>>8&255,ut[2]=$>>>16&255,ut[3]=$>>>24&255,u.check=l(u.check,ut,4,0)),b=$=0,u.mode=4;case 4:for(;b<16;){if(d===0)break e;d--,$+=f[S++]<>8),512&u.flags&&(ut[0]=255&$,ut[1]=$>>>8&255,u.check=l(u.check,ut,2,0)),b=$=0,u.mode=5;case 5:if(1024&u.flags){for(;b<16;){if(d===0)break e;d--,$+=f[S++]<>>8&255,u.check=l(u.check,ut,2,0)),b=$=0}else u.head&&(u.head.extra=null);u.mode=6;case 6:if(1024&u.flags&&(d<(Ae=u.length)&&(Ae=d),Ae&&(u.head&&(ae=u.head.extra_len-u.length,u.head.extra||(u.head.extra=new Array(u.head.extra_len)),o.arraySet(u.head.extra,f,S,Ae,ae)),512&u.flags&&(u.check=l(u.check,f,Ae,S)),d-=Ae,S+=Ae,u.length-=Ae),u.length))break e;u.length=0,u.mode=7;case 7:if(2048&u.flags){if(d===0)break e;for(Ae=0;ae=f[S+Ae++],u.head&&ae&&u.length<65536&&(u.head.name+=String.fromCharCode(ae)),ae&&Ae>9&1,u.head.done=!0),g.adler=u.check=0,u.mode=12;break;case 10:for(;b<32;){if(d===0)break e;d--,$+=f[S++]<>>=7&b,b-=7&b,u.mode=27;break}for(;b<3;){if(d===0)break e;d--,$+=f[S++]<>>=1)){case 0:u.mode=14;break;case 1:if(R(u),u.mode=20,v!==6)break;$>>>=2,b-=2;break e;case 2:u.mode=17;break;case 3:g.msg="invalid block type",u.mode=30}$>>>=2,b-=2;break;case 14:for($>>>=7&b,b-=7&b;b<32;){if(d===0)break e;d--,$+=f[S++]<>>16^65535)){g.msg="invalid stored block lengths",u.mode=30;break}if(u.length=65535&$,b=$=0,u.mode=15,v===6)break e;case 15:u.mode=16;case 16:if(Ae=u.length){if(d>>=5,b-=5,u.ndist=1+(31&$),$>>>=5,b-=5,u.ncode=4+(15&$),$>>>=4,b-=4,286>>=3,b-=3}for(;u.have<19;)u.lens[st[u.have++]]=0;if(u.lencode=u.lendyn,u.lenbits=7,Nt={bits:u.lenbits},Ve=p(0,u.lens,0,19,u.lencode,0,u.work,Nt),u.lenbits=Nt.bits,Ve){g.msg="invalid code lengths set",u.mode=30;break}u.have=0,u.mode=19;case 19:for(;u.have>>16&255,wt=65535&xe,!((De=xe>>>24)<=b);){if(d===0)break e;d--,$+=f[S++]<>>=De,b-=De,u.lens[u.have++]=wt;else{if(wt===16){for(Ee=De+2;b>>=De,b-=De,u.have===0){g.msg="invalid bit length repeat",u.mode=30;break}ae=u.lens[u.have-1],Ae=3+(3&$),$>>>=2,b-=2}else if(wt===17){for(Ee=De+3;b>>=De)),$>>>=3,b-=3}else{for(Ee=De+7;b>>=De)),$>>>=7,b-=7}if(u.have+Ae>u.nlen+u.ndist){g.msg="invalid bit length repeat",u.mode=30;break}for(;Ae--;)u.lens[u.have++]=ae}}if(u.mode===30)break;if(u.lens[256]===0){g.msg="invalid code -- missing end-of-block",u.mode=30;break}if(u.lenbits=9,Nt={bits:u.lenbits},Ve=p(m,u.lens,0,u.nlen,u.lencode,0,u.work,Nt),u.lenbits=Nt.bits,Ve){g.msg="invalid literal/lengths set",u.mode=30;break}if(u.distbits=6,u.distcode=u.distdyn,Nt={bits:u.distbits},Ve=p(_,u.lens,u.nlen,u.ndist,u.distcode,0,u.work,Nt),u.distbits=Nt.bits,Ve){g.msg="invalid distances set",u.mode=30;break}if(u.mode=20,v===6)break e;case 20:u.mode=21;case 21:if(6<=d&&258<=I){g.next_out=w,g.avail_out=I,g.next_in=S,g.avail_in=d,u.hold=$,u.bits=b,c(g,we),w=g.next_out,y=g.output,I=g.avail_out,S=g.next_in,f=g.input,d=g.avail_in,$=u.hold,b=u.bits,u.mode===12&&(u.back=-1);break}for(u.back=0;Fe=(xe=u.lencode[$&(1<>>16&255,wt=65535&xe,!((De=xe>>>24)<=b);){if(d===0)break e;d--,$+=f[S++]<>Ke)])>>>16&255,wt=65535&xe,!(Ke+(De=xe>>>24)<=b);){if(d===0)break e;d--,$+=f[S++]<>>=Ke,b-=Ke,u.back+=Ke}if($>>>=De,b-=De,u.back+=De,u.length=wt,Fe===0){u.mode=26;break}if(32&Fe){u.back=-1,u.mode=12;break}if(64&Fe){g.msg="invalid literal/length code",u.mode=30;break}u.extra=15&Fe,u.mode=22;case 22:if(u.extra){for(Ee=u.extra;b>>=u.extra,b-=u.extra,u.back+=u.extra}u.was=u.length,u.mode=23;case 23:for(;Fe=(xe=u.distcode[$&(1<>>16&255,wt=65535&xe,!((De=xe>>>24)<=b);){if(d===0)break e;d--,$+=f[S++]<>Ke)])>>>16&255,wt=65535&xe,!(Ke+(De=xe>>>24)<=b);){if(d===0)break e;d--,$+=f[S++]<>>=Ke,b-=Ke,u.back+=Ke}if($>>>=De,b-=De,u.back+=De,64&Fe){g.msg="invalid distance code",u.mode=30;break}u.offset=wt,u.extra=15&Fe,u.mode=24;case 24:if(u.extra){for(Ee=u.extra;b>>=u.extra,b-=u.extra,u.back+=u.extra}if(u.offset>u.dmax){g.msg="invalid distance too far back",u.mode=30;break}u.mode=25;case 25:if(I===0)break e;if(Ae=we-I,u.offset>Ae){if((Ae=u.offset-Ae)>u.whave&&u.sane){g.msg="invalid distance too far back",u.mode=30;break}je=Ae>u.wnext?(Ae-=u.wnext,u.wsize-Ae):u.wnext-Ae,Ae>u.length&&(Ae=u.length),Vt=u.window}else Vt=y,je=w-u.offset,Ae=u.length;for(Iee?(te=je[Vt+B[v]],b[X+B[v]]):(te=96,0),U=1<>w)+(D-=U)]=V<<24|te<<16|R|0,D!==0;);for(U=1<>=1;if(U!==0?($&=U-1,$+=U):$=0,v++,--we[g]==0){if(g===f)break;g=_[T+B[v]]}if(y>>7)]}function X(xe,ut){xe.pending_buf[xe.pending++]=255&ut,xe.pending_buf[xe.pending++]=ut>>>8&255}function we(xe,ut,st){xe.bi_valid>L-st?(xe.bi_buf|=ut<>L-xe.bi_valid,xe.bi_valid+=st-L):(xe.bi_buf|=ut<>>=1,st<<=1,0<--ut;);return st>>>1}function Vt(xe,ut,st){var _t,Pt,Ut=new Array(B+1),ve=0;for(_t=1;_t<=B;_t++)Ut[_t]=ve=ve+st[_t-1]<<1;for(Pt=0;Pt<=ut;Pt++){var ye=xe[2*Pt+1];ye!==0&&(xe[2*Pt]=je(Ut[ye]++,ye))}}function De(xe){var ut;for(ut=0;ut>1;1<=st;st--)Ke(xe,Ut,st);for(Pt=me;st=xe.heap[1],xe.heap[1]=xe.heap[xe.heap_len--],Ke(xe,Ut,1),_t=xe.heap[1],xe.heap[--xe.heap_max]=st,xe.heap[--xe.heap_max]=_t,Ut[2*Pt]=Ut[2*st]+Ut[2*_t],xe.depth[Pt]=(xe.depth[st]>=xe.depth[_t]?xe.depth[st]:xe.depth[_t])+1,Ut[2*st+1]=Ut[2*_t+1]=Pt,xe.heap[1]=Pt++,Ke(xe,Ut,1),2<=xe.heap_len;);xe.heap[--xe.heap_max]=xe.heap[1],function(j,F){var ie,de,pe,be,Gt,Lt,Tt=F.dyn_tree,yr=F.max_code,zt=F.stat_desc.static_tree,Ht=F.stat_desc.has_stree,On=F.stat_desc.extra_bits,gr=F.stat_desc.extra_base,mr=F.stat_desc.max_length,gt=0;for(be=0;be<=B;be++)j.bl_count[be]=0;for(Tt[2*j.heap[j.heap_max]+1]=0,ie=j.heap_max+1;ie>=7;Pt>>=1)if(1&Q&&ye.dyn_ltree[2*me]!==0)return s;if(ye.dyn_ltree[18]!==0||ye.dyn_ltree[20]!==0||ye.dyn_ltree[26]!==0)return l;for(me=32;me<_;me++)if(ye.dyn_ltree[2*me]!==0)return l;return s}(xe)),dr(xe,xe.l_desc),dr(xe,xe.d_desc),ve=function(ye){var me;for(ae(ye,ye.dyn_ltree,ye.l_desc.max_code),ae(ye,ye.dyn_dtree,ye.d_desc.max_code),dr(ye,ye.bl_desc),me=A-1;3<=me&&ye.bl_tree[2*R[me]+1]===0;me--);return ye.opt_len+=3*(me+1)+5+5+4,me}(xe),Pt=xe.opt_len+3+7>>>3,(Ut=xe.static_len+3+7>>>3)<=Pt&&(Pt=Ut)):Pt=Ut=st+5,st+4<=Pt&&ut!==-1?Ee(xe,ut,st,_t):xe.strategy===4||Ut===Pt?(we(xe,2+(_t?1:0),3),ht(xe,h,g)):(we(xe,4+(_t?1:0),3),function(ye,me,Q,j){var F;for(we(ye,me-257,5),we(ye,Q-1,5),we(ye,j-4,4),F=0;F>>8&255,xe.pending_buf[xe.d_buf+2*xe.last_lit+1]=255&ut,xe.pending_buf[xe.l_buf+xe.last_lit]=255&st,xe.last_lit++,ut===0?xe.dyn_ltree[2*st]++:(xe.matches++,ut--,xe.dyn_ltree[2*(u[st]+_+1)]++,xe.dyn_dtree[2*b(ut)]++),xe.last_lit===xe.lit_bufsize-1},a._tr_align=function(xe){we(xe,2,3),Ae(xe,D,h),function(ut){ut.bi_valid===16?(X(ut,ut.bi_buf),ut.bi_buf=0,ut.bi_valid=0):8<=ut.bi_valid&&(ut.pending_buf[ut.pending++]=255&ut.bi_buf,ut.bi_buf>>=8,ut.bi_valid-=8)}(xe)}},{"../utils/common":41}],53:[function(r,n,a){n.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,n,a){(function(o){(function(s,l){if(!s.setImmediate){var c,p,m,_,T=1,O={},A=!1,M=s.document,B=Object.getPrototypeOf&&Object.getPrototypeOf(s);B=B&&B.setTimeout?B:s,c={}.toString.call(s.process)==="[object process]"?function(Y){process.nextTick(function(){U(Y)})}:function(){if(s.postMessage&&!s.importScripts){var Y=!0,q=s.onmessage;return s.onmessage=function(){Y=!1},s.postMessage("","*"),s.onmessage=q,Y}}()?(_="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",D,!1):s.attachEvent("onmessage",D),function(Y){s.postMessage(_+Y,"*")}):s.MessageChannel?((m=new MessageChannel).port1.onmessage=function(Y){U(Y.data)},function(Y){m.port2.postMessage(Y)}):M&&"onreadystatechange"in M.createElement("script")?(p=M.documentElement,function(Y){var q=M.createElement("script");q.onreadystatechange=function(){U(Y),q.onreadystatechange=null,p.removeChild(q),q=null},p.appendChild(q)}):function(Y){setTimeout(U,0,Y)},B.setImmediate=function(Y){typeof Y!="function"&&(Y=new Function(""+Y));for(var q=new Array(arguments.length-1),Z=0;Z"u"?o===void 0?this:o:self)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(hK);const F8e=hK.exports;var pK={exports:{}};(function(e,t){(function(r,n){n()})(Ir,function(){function r(p,m){return typeof m>"u"?m={autoBom:!1}:typeof m!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),m={autoBom:!m}),m.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(p.type)?new Blob(["\uFEFF",p],{type:p.type}):p}function n(p,m,_){var T=new XMLHttpRequest;T.open("GET",p),T.responseType="blob",T.onload=function(){c(T.response,m,_)},T.onerror=function(){console.error("could not download file")},T.send()}function a(p){var m=new XMLHttpRequest;m.open("HEAD",p,!1);try{m.send()}catch{}return 200<=m.status&&299>=m.status}function o(p){try{p.dispatchEvent(new MouseEvent("click"))}catch{var m=document.createEvent("MouseEvents");m.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),p.dispatchEvent(m)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ir=="object"&&Ir.global===Ir?Ir:void 0,l=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(p,m,_){var T=s.URL||s.webkitURL,O=document.createElement("a");m=m||p.name||"download",O.download=m,O.rel="noopener",typeof p=="string"?(O.href=p,O.origin===location.origin?o(O):a(O.href)?n(p,m,_):o(O,O.target="_blank")):(O.href=T.createObjectURL(p),setTimeout(function(){T.revokeObjectURL(O.href)},4e4),setTimeout(function(){o(O)},0))}:"msSaveOrOpenBlob"in navigator?function(p,m,_){if(m=m||p.name||"download",typeof p!="string")navigator.msSaveOrOpenBlob(r(p,_),m);else if(a(p))n(p,m,_);else{var T=document.createElement("a");T.href=p,T.target="_blank",setTimeout(function(){o(T)})}}:function(p,m,_,T){if(T=T||open("","_blank"),T&&(T.document.title=T.document.body.innerText="downloading..."),typeof p=="string")return n(p,m,_);var O=p.type==="application/octet-stream",A=/constructor/i.test(s.HTMLElement)||s.safari,M=/CriOS\/[\d]+/.test(navigator.userAgent);if((M||O&&A||l)&&typeof FileReader<"u"){var B=new FileReader;B.onloadend=function(){var D=B.result;D=M?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=D:location=D,T=null},B.readAsDataURL(p)}else{var L=s.URL||s.webkitURL,U=L.createObjectURL(p);T?T.location=U:location.href=U,T=null,setTimeout(function(){L.revokeObjectURL(U)},4e4)}});s.saveAs=c.saveAs=c,e.exports=c})})(pK);const j8e=pK.exports;function W8e(e){const t=new F8e;e.map(r=>t.file(r.name,r.content)),t.generateAsync({type:"blob"}).then(function(r){j8e.saveAs(r,"sources.zip")})}const z8e=ur(Fo)({fontSize:14,fontWeight:700}),H8e=ur(Fo)({fontSize:12,color:"#949597"}),gK=ur(Tn)({border:"1px solid #D9D9D988",overflow:"hidden",borderRadius:14,width:"100%",paddingBottom:6}),Dc=ur(Tn)({display:"flex",flexDirection:"column"}),f3=ur(Tn)({display:"flex",flexDirection:"row",alignItems:"center"}),mK=ur(f3)({background:"#F7F9FB",padding:"14px 20px"}),vK=ur(Dc)({fontSize:14}),d6=ur(HC)({padding:"10px 6px",borderBottom:0}),yK=ur(Tn)({border:"1px solid #D8D8D8",background:"white",borderRadius:6,padding:"0px 10px",fontSize:12,textAlign:"center",display:"inline-block","&:hover":{border:"1px solid #b0b0b0"}}),q8e=ur(Tn)({borderRadius:10,padding:"10px 14px",whiteSpace:"break-spaces",wordBreak:"break-all","&:hover":{background:"#f8f8f8"}}),K8e=ur("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"}}),V8e=ur("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 bK={exports:{}};(function(e,t){var r=r!==void 0?r:{},n=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(c){return a||(r=Object.assign({},r,c),a=new Promise(p=>{var m,_={};for(m in r)r.hasOwnProperty(m)&&(_[m]=r[m]);var T,O,A=[],M="./this.program",B=function(Je,Ue){throw Ue},L=!1,U=!1;L=typeof window=="object",U=typeof importScripts=="function",T=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",O=!L&&!T&&!U;var D,Y,q,Z,ee,V="";T?(V=U?Ud.dirname(V)+"/":__dirname+"/",D=function(Je,Ue){return Z||(Z=Ud),ee||(ee=Ud),Je=ee.normalize(Je),Z.readFileSync(Je,Ue?null:"utf8")},q=function(Je){var Ue=D(Je,!0);return Ue.buffer||(Ue=new Uint8Array(Ue)),$(Ue.buffer),Ue},process.argv.length>1&&(M=process.argv[1].replace(/\\/g,"/")),A=process.argv.slice(2),e.exports=r,B=function(Je){process.exit(Je)},r.inspect=function(){return"[Emscripten Module object]"}):O?(typeof read<"u"&&(D=function(Je){return read(Je)}),q=function(Je){var Ue;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Je)):($(typeof(Ue=read(Je,"binary"))=="object"),Ue)},typeof scriptArgs<"u"?A=scriptArgs:arguments!==void 0&&(A=arguments),typeof quit=="function"&&(B=function(Je){quit(Je)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(L||U)&&(U?V=self.location.href:o!==void 0&&o.currentScript&&(V=o.currentScript.src),V=V.indexOf("blob:")!==0?V.substr(0,V.lastIndexOf("/")+1):"",D=function(Je){var Ue=new XMLHttpRequest;return Ue.open("GET",Je,!1),Ue.send(null),Ue.responseText},U&&(q=function(Je){var Ue=new XMLHttpRequest;return Ue.open("GET",Je,!1),Ue.responseType="arraybuffer",Ue.send(null),new Uint8Array(Ue.response)}),Y=function(Je,Ue,rt){var qt=new XMLHttpRequest;qt.open("GET",Je,!0),qt.responseType="arraybuffer",qt.onload=function(){qt.status==200||qt.status==0&&qt.response?Ue(qt.response):rt()},qt.onerror=rt,qt.send(null)}),r.print||console.log.bind(console);var te=r.printErr||console.warn.bind(console);for(m in _)_.hasOwnProperty(m)&&(r[m]=_[m]);_=null,r.arguments&&(A=r.arguments),r.thisProgram&&(M=r.thisProgram),r.quit&&(B=r.quit);var R=16,h,g=[];function v(Je,Ue){if(!h){h=new WeakMap;for(var rt=0;rt>0]=Ue;break;case"i16":je[Je>>1]=Ue;break;case"i32":Vt[Je>>2]=Ue;break;case"i64":pe=[Ue>>>0,(de=Ue,+Math.abs(de)>=1?de>0?(0|Math.min(+Math.floor(de/4294967296),4294967295))>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],Vt[Je>>2]=pe[0],Vt[Je+4>>2]=pe[1];break;case"float":De[Je>>2]=Ue;break;case"double":Fe[Je>>3]=Ue;break;default:F("invalid type for setValue: "+rt)}}function d(Je,Ue,rt){switch((Ue=Ue||"i8").charAt(Ue.length-1)==="*"&&(Ue="i32"),Ue){case"i1":case"i8":return we[Je>>0];case"i16":return je[Je>>1];case"i32":case"i64":return Vt[Je>>2];case"float":return De[Je>>2];case"double":return Fe[Je>>3];default:F("invalid type for getValue: "+Ue)}return null}typeof WebAssembly!="object"&&F("no native wasm support detected");var I=!1;function $(Je,Ue){Je||F("Assertion failed: "+Ue)}var b=1,X,we,Ae,je,Vt,De,Fe,wt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ke(Je,Ue,rt){for(var qt=Ue+rt,sr=Ue;Je[sr]&&!(sr>=qt);)++sr;if(sr-Ue>16&&Je.subarray&&wt)return wt.decode(Je.subarray(Ue,sr));for(var Er="";Ue>10,56320|1023&Ci)}}else Er+=String.fromCharCode((31&Fr)<<6|Kr)}else Er+=String.fromCharCode(Fr)}return Er}function ht(Je,Ue){return Je?Ke(Ae,Je,Ue):""}function dr(Je,Ue,rt,qt){if(!(qt>0))return 0;for(var sr=rt,Er=rt+qt-1,Fr=0;Fr=55296&&Kr<=57343&&(Kr=65536+((1023&Kr)<<10)|1023&Je.charCodeAt(++Fr)),Kr<=127){if(rt>=Er)break;Ue[rt++]=Kr}else if(Kr<=2047){if(rt+1>=Er)break;Ue[rt++]=192|Kr>>6,Ue[rt++]=128|63&Kr}else if(Kr<=65535){if(rt+2>=Er)break;Ue[rt++]=224|Kr>>12,Ue[rt++]=128|Kr>>6&63,Ue[rt++]=128|63&Kr}else{if(rt+3>=Er)break;Ue[rt++]=240|Kr>>18,Ue[rt++]=128|Kr>>12&63,Ue[rt++]=128|Kr>>6&63,Ue[rt++]=128|63&Kr}}return Ue[rt]=0,rt-sr}function ae(Je,Ue,rt){return dr(Je,Ae,Ue,rt)}function Ve(Je){for(var Ue=0,rt=0;rt=55296&&qt<=57343&&(qt=65536+((1023&qt)<<10)|1023&Je.charCodeAt(++rt)),qt<=127?++Ue:Ue+=qt<=2047?2:qt<=65535?3:4}return Ue}function Nt(Je){var Ue=Ve(Je)+1,rt=Bn(Ue);return dr(Je,we,rt,Ue),rt}function Ee(Je){X=Je,r.HEAP8=we=new Int8Array(Je),r.HEAP16=je=new Int16Array(Je),r.HEAP32=Vt=new Int32Array(Je),r.HEAPU8=Ae=new Uint8Array(Je),r.HEAPU16=new Uint16Array(Je),r.HEAPU32=new Uint32Array(Je),r.HEAPF32=De=new Float32Array(Je),r.HEAPF64=Fe=new Float64Array(Je)}var xe=r.INITIAL_MEMORY||33554432;(y=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:xe/65536,maximum:32768}))&&(X=y.buffer),xe=X.byteLength,Ee(X);var ut=new WebAssembly.Table({initial:20,element:"anyfunc"}),st=[],_t=[],Pt=[],Ut=[],ve=!1,ye=0,me=null;function Q(Je){ye++,r.monitorRunDependencies&&r.monitorRunDependencies(ye)}function j(Je){if(ye--,r.monitorRunDependencies&&r.monitorRunDependencies(ye),ye==0&&me){var Ue=me;me=null,Ue()}}function F(Je){throw r.onAbort&&r.onAbort(Je),te(Je+=""),I=!0,Je="abort("+Je+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Je)}r.preloadedImages={},r.preloadedAudios={},r.preloadedWasm={};var ie,de,pe,be="data:application/octet-stream;base64,";function Gt(Je){return Je.startsWith(be)}function Lt(Je){return Je.startsWith("file://")}function Tt(Je){try{if(Je==ie&&u)return new Uint8Array(u);if(q)return q(Je);throw"both async and sync fetching of the wasm failed"}catch(Ue){F(Ue)}}Gt(ie="tree-sitter.wasm")||(ie=function(Je){return r.locateFile?r.locateFile(Je,V):V+Je}(ie));var yr={},zt={get:function(Je,Ue){return yr[Ue]||(yr[Ue]=new WebAssembly.Global({value:"i32",mutable:!0})),yr[Ue]}};function Ht(Je){for(;Je.length>0;){var Ue=Je.shift();if(typeof Ue!="function"){var rt=Ue.func;typeof rt=="number"?Ue.arg===void 0?ut.get(rt)():ut.get(rt)(Ue.arg):rt(Ue.arg===void 0?null:Ue.arg)}else Ue(r)}}function On(Je){var Ue=0;function rt(){for(var ei=0,Ri=1;;){var go=Je[Ue++];if(ei+=(127&go)*Ri,Ri*=128,!(128&go))break}return ei}if(Je instanceof WebAssembly.Module){var qt=WebAssembly.Module.customSections(Je,"dylink");$(qt.length!=0,"need dylink section"),Je=new Int8Array(qt[0])}else $(new Uint32Array(new Uint8Array(Je.subarray(0,24)).buffer)[0]==1836278016,"need to see wasm magic number"),$(Je[8]===0,"need the dylink section to be first"),Ue=9,rt(),$(Je[Ue]===6),$(Je[++Ue]==="d".charCodeAt(0)),$(Je[++Ue]==="y".charCodeAt(0)),$(Je[++Ue]==="l".charCodeAt(0)),$(Je[++Ue]==="i".charCodeAt(0)),$(Je[++Ue]==="n".charCodeAt(0)),$(Je[++Ue]==="k".charCodeAt(0)),Ue++;var sr={};sr.memorySize=rt(),sr.memoryAlign=rt(),sr.tableSize=rt(),sr.tableAlign=rt();var Er=rt();sr.neededDynlibs=[];for(var Fr=0;Fr0}function gt(Je){return Je.indexOf("dynCall_")==0||["stackAlloc","stackSave","stackRestore"].includes(Je)?Je:"_"+Je}function Pr(Je,Ue){for(var rt in Je)if(Je.hasOwnProperty(rt)){wn.hasOwnProperty(rt)||(wn[rt]=Je[rt]);var qt=gt(rt);r.hasOwnProperty(qt)||(r[qt]=Je[rt])}}var kr={nextHandle:1,loadedLibs:{},loadedLibNames:{}};function ai(Je,Ue,rt){return Je.includes("j")?function(qt,sr,Er){var Fr=r["dynCall_"+qt];return Er&&Er.length?Fr.apply(null,[sr].concat(Er)):Fr.call(null,sr)}(Je,Ue,rt):ut.get(Ue).apply(null,rt)}var $r=5251072;function Hr(Je){return["__cpp_exception","__wasm_apply_data_relocs","__dso_handle","__set_stack_limits"].includes(Je)}function Ti(Je,Ue){var rt={};for(var qt in Je){var sr=Je[qt];typeof sr=="object"&&(sr=sr.value),typeof sr=="number"&&(sr+=Ue),rt[qt]=sr}return function(Er){for(var Fr in Er)if(!Hr(Fr)){var Kr=!1,yn=Er[Fr];Fr.startsWith("orig$")&&(Fr=Fr.split("$")[1],Kr=!0),yr[Fr]||(yr[Fr]=new WebAssembly.Global({value:"i32",mutable:!0})),(Kr||yr[Fr].value==0)&&(typeof yn=="function"?yr[Fr].value=v(yn):typeof yn=="number"?yr[Fr].value=yn:te("unhandled export type for `"+Fr+"`: "+typeof yn))}}(rt),rt}function Wr(Je,Ue){var rt,qt;return Ue&&(rt=wn["orig$"+Je]),rt||(rt=wn[Je]),rt||(rt=r[gt(Je)]),!rt&&Je.startsWith("invoke_")&&(qt=Je.split("_")[1],rt=function(){var sr=_n();try{return ai(qt,arguments[0],Array.prototype.slice.call(arguments,1))}catch(Er){if(Dn(sr),Er!==Er+0&&Er!=="longjmp")throw Er;dn(1,0)}}),rt}function Dr(Je,Ue){var rt=On(Je);function qt(){var sr=Math.pow(2,rt.memoryAlign);sr=Math.max(sr,R);var Er,Fr,Kr,yn=(Er=function(Fi){if(ve)return Pn(Fi);var Gi=$r,Fn=Gi+Fi+15&-16;return $r=Fn,yr.__heap_base.value=Fn,Gi}(rt.memorySize+sr),(Fr=sr)||(Fr=R),Math.ceil(Er/Fr)*Fr),Ci=ut.length;ut.grow(rt.tableSize);for(var ei=yn;ei>2]=qt,-1;rt=Me()}return Vt[Ue>>2]=rt/1e3|0,Vt[Ue+4>>2]=rt%1e3*1e3*1e3|0,0}function Et(Je){try{return y.grow(Je-X.byteLength+65535>>>16),Ee(y.buffer),1}catch{}}function Kt(Je){un(Je)}Zt.sig="iii",Kt.sig="vi";var Lr={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(Je,Ue,rt){if(Ue[0]==="/")return Ue;var qt;if(Je===-100)qt=FS.cwd();else{var sr=FS.getStream(Je);if(!sr)throw new FS.ErrnoError(8);qt=sr.path}if(Ue.length==0){if(!rt)throw new FS.ErrnoError(44);return qt}return PATH.join2(qt,Ue)},doStat:function(Je,Ue,rt){try{var qt=Je(Ue)}catch(sr){if(sr&&sr.node&&PATH.normalize(Ue)!==PATH.normalize(FS.getPath(sr.node)))return-54;throw sr}return Vt[rt>>2]=qt.dev,Vt[rt+4>>2]=0,Vt[rt+8>>2]=qt.ino,Vt[rt+12>>2]=qt.mode,Vt[rt+16>>2]=qt.nlink,Vt[rt+20>>2]=qt.uid,Vt[rt+24>>2]=qt.gid,Vt[rt+28>>2]=qt.rdev,Vt[rt+32>>2]=0,pe=[qt.size>>>0,(de=qt.size,+Math.abs(de)>=1?de>0?(0|Math.min(+Math.floor(de/4294967296),4294967295))>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],Vt[rt+40>>2]=pe[0],Vt[rt+44>>2]=pe[1],Vt[rt+48>>2]=4096,Vt[rt+52>>2]=qt.blocks,Vt[rt+56>>2]=qt.atime.getTime()/1e3|0,Vt[rt+60>>2]=0,Vt[rt+64>>2]=qt.mtime.getTime()/1e3|0,Vt[rt+68>>2]=0,Vt[rt+72>>2]=qt.ctime.getTime()/1e3|0,Vt[rt+76>>2]=0,pe=[qt.ino>>>0,(de=qt.ino,+Math.abs(de)>=1?de>0?(0|Math.min(+Math.floor(de/4294967296),4294967295))>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],Vt[rt+80>>2]=pe[0],Vt[rt+84>>2]=pe[1],0},doMsync:function(Je,Ue,rt,qt,sr){var Er=Ae.slice(Je,Je+rt);FS.msync(Ue,Er,sr,rt,qt)},doMkdir:function(Je,Ue){return(Je=PATH.normalize(Je))[Je.length-1]==="/"&&(Je=Je.substr(0,Je.length-1)),FS.mkdir(Je,Ue,0),0},doMknod:function(Je,Ue,rt){switch(61440&Ue){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(Je,Ue,rt),0},doReadlink:function(Je,Ue,rt){if(rt<=0)return-28;var qt=FS.readlink(Je),sr=Math.min(rt,Ve(qt)),Er=we[Ue+sr];return ae(qt,Ue,rt+1),we[Ue+sr]=Er,sr},doAccess:function(Je,Ue){if(-8&Ue)return-28;var rt;if(!(rt=FS.lookupPath(Je,{follow:!0}).node))return-44;var qt="";return 4&Ue&&(qt+="r"),2&Ue&&(qt+="w"),1&Ue&&(qt+="x"),qt&&FS.nodePermissions(rt,qt)?-2:0},doDup:function(Je,Ue,rt){var qt=FS.getStream(rt);return qt&&FS.close(qt),FS.open(Je,Ue,0,rt,rt).fd},doReadv:function(Je,Ue,rt,qt){for(var sr=0,Er=0;Er>2],Kr=Vt[Ue+(8*Er+4)>>2],yn=FS.read(Je,we,Fr,Kr,qt);if(yn<0)return-1;if(sr+=yn,yn>2],Kr=Vt[Ue+(8*Er+4)>>2],yn=FS.write(Je,we,Fr,Kr,qt);if(yn<0)return-1;sr+=yn}return sr},varargs:void 0,get:function(){return Lr.varargs+=4,Vt[Lr.varargs-4>>2]},getStr:function(Je){return ht(Je)},getStreamFromFD:function(Je){var Ue=FS.getStream(Je);if(!Ue)throw new FS.ErrnoError(8);return Ue},get64:function(Je,Ue){return Je}};function Ur(Je){try{var Ue=Lr.getStreamFromFD(Je);return FS.close(Ue),0}catch(rt){return typeof FS<"u"&&rt instanceof FS.ErrnoError||F(rt),rt.errno}}function Ar(Je,Ue,rt,qt){try{var sr=Lr.getStreamFromFD(Je),Er=Lr.doWritev(sr,Ue,rt);return Vt[qt>>2]=Er,0}catch(Fr){return typeof FS<"u"&&Fr instanceof FS.ErrnoError||F(Fr),Fr.errno}}function Qn(Je){}Ur.sig="ii",Ar.sig="iiiii",Qn.sig="vi";var an,wn={__heap_base:$r,__indirect_function_table:ut,__memory_base:1024,__stack_pointer:Be,__table_base:1,abort:J,clock_gettime:Zt,emscripten_memcpy_big:function(Je,Ue,rt){Ae.copyWithin(Je,Ue,Ue+rt)},emscripten_resize_heap:function(Je){var Ue,rt,qt=Ae.length;if((Je>>>=0)>2147483648)return!1;for(var sr=1;sr<=4;sr*=2){var Er=qt*(1+.2/sr);if(Er=Math.min(Er,Je+100663296),Et(Math.min(2147483648,((Ue=Math.max(Je,Er))%(rt=65536)>0&&(Ue+=rt-Ue%rt),Ue))))return!0}return!1},exit:Kt,fd_close:Ur,fd_seek:function(Je,Ue,rt,qt,sr){try{var Er=Lr.getStreamFromFD(Je),Fr=4294967296*rt+(Ue>>>0);return Fr<=-9007199254740992||Fr>=9007199254740992?-61:(FS.llseek(Er,Fr,qt),pe=[Er.position>>>0,(de=Er.position,+Math.abs(de)>=1?de>0?(0|Math.min(+Math.floor(de/4294967296),4294967295))>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],Vt[sr>>2]=pe[0],Vt[sr+4>>2]=pe[1],Er.getdents&&Fr===0&&qt===0&&(Er.getdents=null),0)}catch(Kr){return typeof FS<"u"&&Kr instanceof FS.ErrnoError||F(Kr),Kr.errno}},fd_write:Ar,memory:y,setTempRet0:Qn,tree_sitter_log_callback:function(Je,Ue){if(ri){const rt=ht(Ue);ri(rt,Je!==0)}},tree_sitter_parse_callback:function(Je,Ue,rt,qt,sr){var Er=Ei(Ue,{row:rt,column:qt});typeof Er=="string"?(w(sr,Er.length,"i32"),function(Fr,Kr,yn){if(yn===void 0&&(yn=2147483647),yn<2)return 0;for(var Ci=(yn-=2)<2*Fr.length?yn/2:Fr.length,ei=0;ei>1]=Ri,Kr+=2}je[Kr>>1]=0}(Er,Je,10240)):w(sr,0,"i32")}},Pn=(function(){var Je={env:wn,wasi_snapshot_preview1:wn,"GOT.mem":new Proxy(wn,zt),"GOT.func":new Proxy(wn,zt)};function Ue(sr,Er){var Fr=sr.exports;Fr=Ti(Fr,1024),r.asm=Fr;var Kr,yn=On(Er);yn.neededDynlibs&&(f=yn.neededDynlibs.concat(f)),Pr(Fr),Kr=r.asm.__wasm_call_ctors,_t.unshift(Kr),j()}function rt(sr){Ue(sr.instance,sr.module)}function qt(sr){return function(){if(!u&&(L||U)){if(typeof fetch=="function"&&!Lt(ie))return fetch(ie,{credentials:"same-origin"}).then(function(Er){if(!Er.ok)throw"failed to load wasm binary file at '"+ie+"'";return Er.arrayBuffer()}).catch(function(){return Tt(ie)});if(Y)return new Promise(function(Er,Fr){Y(ie,function(Kr){Er(new Uint8Array(Kr))},Fr)})}return Promise.resolve().then(function(){return Tt(ie)})}().then(function(Er){return WebAssembly.instantiate(Er,Je)}).then(sr,function(Er){te("failed to asynchronously prepare wasm: "+Er),F(Er)})}if(Q(),r.instantiateWasm)try{return r.instantiateWasm(Je,Ue)}catch(sr){return te("Module.instantiateWasm callback failed with error: "+sr),!1}u||typeof WebAssembly.instantiateStreaming!="function"||Gt(ie)||Lt(ie)||typeof fetch!="function"?qt(rt):fetch(ie,{credentials:"same-origin"}).then(function(sr){return WebAssembly.instantiateStreaming(sr,Je).then(rt,function(Er){return te("wasm streaming compile failed: "+Er),te("falling back to ArrayBuffer instantiation"),qt(rt)})})}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r._malloc=function(){return(Pn=r._malloc=r.asm.malloc).apply(null,arguments)}),Xr=(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(Xr=r.___errno_location=r.asm.__errno_location).apply(null,arguments)}),_n=(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(_n=r.stackSave=r.asm.stackSave).apply(null,arguments)}),Dn=r.stackRestore=function(){return(Dn=r.stackRestore=r.asm.stackRestore).apply(null,arguments)},Bn=r.stackAlloc=function(){return(Bn=r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},dn=r._setThrew=function(){return(dn=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 Zr(Je){this.name="ExitStatus",this.message="Program terminated with exit("+Je+")",this.status=Je}r.allocate=function(Je,Ue){var rt;return rt=Ue==b?Bn(Je.length):Pn(Je.length),Je.subarray||Je.slice?Ae.set(Je,rt):Ae.set(new Uint8Array(Je),rt),rt},me=function Je(){an||rn(),an||(me=Je)};var gn=!1;function rn(Je){function Ue(){an||(an=!0,r.calledRun=!0,I||(ve=!0,Ht(_t),Ht(Pt),r.onRuntimeInitialized&&r.onRuntimeInitialized(),hn&&function(rt){var qt=r._main;if(qt){var sr=(rt=rt||[]).length+1,Er=Bn(4*(sr+1));Vt[Er>>2]=Nt(M);for(var Fr=1;Fr>2)+Fr]=Nt(rt[Fr-1]);Vt[(Er>>2)+sr]=0;try{un(qt(sr,Er),!0)}catch(yn){if(yn instanceof Zr||yn=="unwind")return;var Kr=yn;yn&&typeof yn=="object"&&yn.stack&&(Kr=[yn,yn.stack]),te("exception thrown: "+Kr),B(1,yn)}finally{}}}(Je),function(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)rt=r.postRun.shift(),Ut.unshift(rt);var rt;Ht(Ut)}()))}Je=Je||A,ye>0||!gn&&(function(){if(f.length){if(!q)return Q(),void f.reduce(function(rt,qt){return rt.then(function(){return ho(qt,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){j(),fe()});f.forEach(function(rt){ho(rt,{global:!0,nodelete:!0,allowUndefined:!0})}),fe()}else fe()}(),gn=!0,ye>0)||(function(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)rt=r.preRun.shift(),st.unshift(rt);var rt;Ht(st)}(),ye>0||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),Ue()},1)):Ue()))}function un(Je,Ue){Ue&&mr()&&Je===0||(mr()||(r.onExit&&r.onExit(Je),I=!0),B(Je,new Zr(Je)))}if(r.run=rn,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();var hn=!0;r.noInitialRun&&(hn=!1),rn();const tr=r,lr={},Yt=4,Or=5*Yt,Sr=2*Yt,Nr=2*Yt+2*Sr,qr={row:0,column:0},Gn=/[\w-.]*/g,si=1,xi=2,mi=/^_?tree_sitter_\w+/;var Rt,_i,mn,Ei,ri;class Ui{static init(){mn=tr._ts_init(),Rt=d(mn,"i32"),_i=d(mn+Yt,"i32")}initialize(){tr._ts_parser_new_wasm(),this[0]=d(mn,"i32"),this[1]=d(mn+Yt,"i32")}delete(){tr._ts_parser_delete(this[0]),tr._free(this[1]),this[0]=0,this[1]=0}setLanguage(Ue){let rt;if(Ue){if(Ue.constructor!==qi)throw new Error("Argument must be a Language");{rt=Ue[0];const qt=tr._ts_language_version(rt);if(qt<_i||RtUe.slice(yn,ei);else{if(typeof Ue!="function")throw new Error("Argument must be a string or a function");Ei=Ue}this.logCallback?(ri=this.logCallback,tr._ts_parser_enable_logger_wasm(this[0],1)):(ri=null,tr._ts_parser_enable_logger_wasm(this[0],0));let sr=0,Er=0;if(qt&&qt.includedRanges){sr=qt.includedRanges.length;let yn=Er=tr._calloc(sr,Nr);for(let Ci=0;Ci0){let Er=qt;for(let Fr=0;Fr0){let qt=rt;for(let sr=0;sr0){let qt=rt;for(let sr=0;sr0){let ei=yn;for(let Ri=0;Ri>0];if(!Er)return sr;sr+=String.fromCharCode(Er)}}(Ue);return tr._free(Ue),rt}}class Vi{constructor(Ue,rt){Lo(Ue),this.tree=rt,sd(this)}delete(){La(this),tr._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(Ue){ti(Ue),La(this,mn+Or),tr._ts_tree_cursor_reset_wasm(this.tree[0]),sd(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return La(this),tr._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return La(this),tr._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return La(this),tr._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return La(this),tr._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){La(this);const Ue=tr._ts_tree_cursor_start_index_wasm(this.tree[0]),rt=tr._ts_tree_cursor_end_index_wasm(this.tree[0]);return ko(this.tree,Ue,rt)}get startPosition(){return La(this),tr._ts_tree_cursor_start_position_wasm(this.tree[0]),ld(mn)}get endPosition(){return La(this),tr._ts_tree_cursor_end_position_wasm(this.tree[0]),ld(mn)}get startIndex(){return La(this),tr._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return La(this),tr._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return La(this),tr._ts_tree_cursor_current_node_wasm(this.tree[0]),Xo(this.tree)}currentFieldId(){return La(this),tr._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){La(this);const Ue=tr._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return sd(this),Ue===1}gotoNextSibling(){La(this);const Ue=tr._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return sd(this),Ue===1}gotoParent(){La(this);const Ue=tr._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return sd(this),Ue===1}}class qi{constructor(Ue,rt){Lo(Ue),this[0]=rt,this.types=new Array(tr._ts_language_symbol_count(this[0]));for(let qt=0,sr=this.types.length;qt0){if(Fn[0].type!=="string")throw new Error("Predicates must begin with a literal value");const ud=Fn[0].value;let Gc=!0;switch(ud){case"not-eq?":Gc=!1;case"eq?":if(Fn.length!==3)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${Fn.length-1}`);if(Fn[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${Fn[1].value}"`);if(Fn[2].type==="capture"){const Kl=Fn[1].name,lc=Fn[2].name;Da[fi].push(function(kh){let uc,W0;for(const Rh of kh)Rh.name===Kl&&(uc=Rh.node),Rh.name===lc&&(W0=Rh.node);return uc===void 0||W0===void 0||uc.text===W0.text===Gc})}else{const Kl=Fn[1].name,lc=Fn[2].value;Da[fi].push(function(kh){for(const uc of kh)if(uc.name===Kl)return uc.node.text===lc===Gc;return!0})}break;case"not-match?":Gc=!1;case"match?":if(Fn.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${Fn.length-1}.`);if(Fn[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${Fn[1].value}".`);if(Fn[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${Fn[2].value}.`);const Zy=Fn[1].name,v3=new RegExp(Fn[2].value);Da[fi].push(function(Kl){for(const lc of Kl)if(lc.name===Zy)return v3.test(lc.node.text)===Gc;return!0});break;case"set!":if(Fn.length<2||Fn.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${Fn.length-1}.`);if(Fn.some(Kl=>Kl.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');ei[fi]||(ei[fi]={}),ei[fi][Fn[1].value]=Fn[2]?Fn[2].value:null;break;case"is?":case"is-not?":if(Fn.length<2||Fn.length>3)throw new Error(`Wrong number of arguments to \`#${ud}\` predicate. Expected 1 or 2. Got ${Fn.length-1}.`);if(Fn.some(Kl=>Kl.type!=="string"))throw new Error(`Arguments to \`#${ud}\` predicate must be a strings.".`);const Mh=ud==="is?"?Ri:go;Mh[fi]||(Mh[fi]={}),Mh[fi][Fn[1].value]=Fn[2]?Fn[2].value:null;break;default:ra[fi].push({operator:ud,operands:Fn.slice(1)})}Fn.length=0}}Object.freeze(ei[fi]),Object.freeze(Ri[fi]),Object.freeze(go[fi])}return tr._free(qt),new Mo(lr,sr,yn,Da,ra,Object.freeze(ei),Object.freeze(Ri),Object.freeze(go))}static load(Ue){let rt;if(Ue instanceof Uint8Array)rt=Promise.resolve(Ue);else{const sr=Ue;if(typeof process<"u"&&process.versions&&process.versions.node){const Er=Ud;rt=Promise.resolve(Er.readFileSync(sr))}else rt=fetch(sr).then(Er=>Er.arrayBuffer().then(Fr=>{if(Er.ok)return new Uint8Array(Fr);{const Kr=new TextDecoder("utf-8").decode(Fr);throw new Error(`Language.load failed with status ${Er.status}. - -${Kr}`)}}))}const qt=typeof loadSideModule=="function"?loadSideModule:Dr;return rt.then(sr=>qt(sr,{loadAsync:!0})).then(sr=>{const Er=Object.keys(sr),Fr=Er.find(yn=>mi.test(yn)&&!yn.includes("external_scanner_"));Fr||console.log(`Couldn't find language function in WASM file. Symbols: -${JSON.stringify(Er,null,2)}`);const Kr=sr[Fr]();return new qi(lr,Kr)})}}class Mo{constructor(Ue,rt,qt,sr,Er,Fr,Kr,yn){Lo(Ue),this[0]=rt,this.captureNames=qt,this.textPredicates=sr,this.predicates=Er,this.setProperties=Fr,this.assertedProperties=Kr,this.refutedProperties=yn,this.exceededMatchLimit=!1}delete(){tr._ts_query_delete(this[0]),this[0]=0}matches(Ue,rt,qt,sr){rt||(rt=qr),qt||(qt=qr),sr||(sr={});let Er=sr.matchLimit;if(Er===void 0)Er=0;else if(typeof Er!="number")throw new Error("Arguments must be numbers");ti(Ue),tr._ts_query_matches_wasm(this[0],Ue.tree[0],rt.row,rt.column,qt.row,qt.column,Er);const Fr=d(mn,"i32"),Kr=d(mn+Yt,"i32"),yn=d(mn+2*Yt,"i32"),Ci=new Array(Fr);this.exceededMatchLimit=!!yn;let ei=0,Ri=Kr;for(let go=0;goFi(fi))){Ci[ei++]={pattern:ra,captures:fi};const Fi=this.setProperties[ra];Fi&&(Ci[go].setProperties=Fi);const Gi=this.assertedProperties[ra];Gi&&(Ci[go].assertedProperties=Gi);const Fn=this.refutedProperties[ra];Fn&&(Ci[go].refutedProperties=Fn)}}return Ci.length=ei,tr._free(Kr),Ci}captures(Ue,rt,qt,sr){rt||(rt=qr),qt||(qt=qr),sr||(sr={});let Er=sr.matchLimit;if(Er===void 0)Er=0;else if(typeof Er!="number")throw new Error("Arguments must be numbers");ti(Ue),tr._ts_query_captures_wasm(this[0],Ue.tree[0],rt.row,rt.column,qt.row,qt.column,Er);const Fr=d(mn,"i32"),Kr=d(mn+Yt,"i32"),yn=d(mn+2*Yt,"i32"),Ci=[];this.exceededMatchLimit=!!yn;const ei=[];let Ri=Kr;for(let go=0;goFi(ei))){const Fi=ei[fi],Gi=this.setProperties[ra];Gi&&(Fi.setProperties=Gi);const Fn=this.assertedProperties[ra];Fn&&(Fi.assertedProperties=Fn);const Ro=this.refutedProperties[ra];Ro&&(Fi.refutedProperties=Ro),Ci.push(Fi)}}return tr._free(Kr),Ci}predicatesForPattern(Ue){return this.predicates[Ue]}didExceedMatchLimit(){return this.exceededMatchLimit}}function ko(Je,Ue,rt){const qt=rt-Ue;let sr=Je.textCallback(Ue,null,rt);for(Ue+=sr.length;Ue0))break;Ue+=Er.length,sr+=Er}return Ue>rt&&(sr=sr.slice(0,qt)),sr}function Yo(Je,Ue,rt,qt){for(let sr=0,Er=qt.length;sr{Ui.init(),p()}}))}}return s}();e.exports=n})(bK);const CS=bK.exports,wK=()=>(()=>{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})(),G8e=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";let MS;const Y8e=async(e,t)=>{if(MS)return;const r={locateFile(){return e}};await CS.init(r),MS=await CS.Language.load(t)},X8e=()=>{const e=new CS;return e.setLanguage(MS),e.setTimeoutMicros(1e3*1e3),e};async function Q8e(e){return wK()?(Ta(Ca.GETTER_PARSE_START),await Y8e("./tree-sitter.wasm","./tree-sitter-func.wasm"),X8e().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(p=>!p.type.match(/[,()]/)).map(p=>p.text),l=o.children.find(p=>p.type==="function_name").text,c=o.children.find(p=>p.type==="parameter_list").children.filter(p=>p.type==="parameter_declaration").map(p=>({type:p.child(0).text,name:p.child(1).text}));return{returnTypes:s,name:l,parameters:c}})):[]}const Z8e=P0(l3((e,t)=>({name:"",setName:r=>{e(n=>{n.name=r})},parameters:[],addParameter:()=>{e(r=>{const n=Math.random();r.parameters.push({name:"",_id:n,possibleTypes:["int","slice","address"],selectedTypeIdx:0,setValue:a=>r.parameters.find(o=>o._id===n).value=a,setName:a=>{e(o=>{o.parameters.find(s=>s._id===n).name=a})},toggleNextType:()=>{e(a=>{const o=a.parameters.find(s=>s._id===n);o.selectedTypeIdx=(o.selectedTypeIdx+1)%o.possibleTypes.length})},type:()=>{const a=t().parameters.find(o=>o._id===n);return a.possibleTypes[a.selectedTypeIdx]},originalType:()=>t().parameters.find(o=>o._id===n).possibleTypes[0],value:""})})},returnTypes:[],removeParameter:()=>{e(r=>{r.parameters.pop()})},clear:()=>{e(r=>{r.name="",r.parameters=[]})}})));function xK(){return Z8e()}const z1=(e,t,r)=>e.find(n=>n.name===t).parameters.find(n=>n.name===r),_K=P0(l3((e,t)=>({getters:[],setGetters:r=>{e(n=>{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(c=>{const p=z1(c.getters,o.name,s.name);p.selectedTypeIdx=(p.selectedTypeIdx+1)%p.possibleTypes.length})},type:()=>{const c=z1(t().getters,o.name,s.name);return c.possibleTypes[c.selectedTypeIdx]},originalType:()=>z1(t().getters,o.name,s.name).possibleTypes[0],setValue:c=>{e(p=>{const m=z1(p.getters,o.name,s.name);m.value=c})}}}),returnTypes:o.returnTypes}));n.getters=a})}})));function iR(){const{getters:e}=_K();return{getters:e}}function J8e(){const{data:e}=Vc(),{setGetters:t}=_K(),{clear:r}=xK(),{contractAddress:n}=nc();ue.exports.useEffect(()=>{t([]),r()},[n]),ue.exports.useEffect(()=>{(async()=>{const a=[];for(const o of e?.files??[])!o.name.match(/\.(fc|func)/)||a.push(...await Q8e(o.content));t(a),r()})()},[e?.files])}function SK(e){const{contractAddress:t}=nc(),{getters:r}=iR();return nL([t,"getter",e.name],async()=>{const n=await Sh();return!t||!r?void 0:(Ta(Ca.RUN_GETTER),yv(ii.Address.parse(t),e.name,e.parameters.map(o=>{switch(o.possibleTypes[o.selectedTypeIdx]){case"int":return new lh(o.value);case"address":return ii.beginCell().storeAddress(ii.Address.parse(o.value)).endCell();default:return ii.Cell.fromBoc(Buffer.from(o.value,"base64"))[0]}}),o=>o.map(s=>{const l=[];if(s instanceof ii.Cell){try{s.beginParse().remaining===267&&l.push({type:"address",value:s.beginParse().readAddress().toFriendly()})}catch{}l.push({type:"base64",value:s.toBoc().toString("base64")}),l.push({type:"boc",value:s.toDebugString()})}else s instanceof lh?(l.push({type:"int",value:s.toString()}),l.push({type:"coins",value:ii.fromNano(s)}),l.push({type:"hex",value:s.toString("hex")}),l.push({type:"base64",value:Buffer.from(s.toString("hex"),"hex").toString("base64")})):l.push({type:"raw",value:String(s)});return l}),n))})}var Rs=(e=>(e.ERROR="Error",e.HINT="Hint",e.SUCCESS="Success",e.INFO="Info",e))(Rs||{});const eRe=ao(wa)(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 js({title:e,type:t,notificationBody:r,singleLine:n,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 $t(eRe,{singleLine:n,borderColor:s,backgroundColor:l,noBottomMargin:a,noTopMargin:o,children:[e,r]})}function tRe({parameter:e}){return $t(Dc,{sx:{gap:1},children:[$t(Dc,{sx:{gap:.5,flexDirection:"row"},children:[ne(Tn,{children:e.name}),ne(yK,{sx:{cursor:e.possibleTypes.length>1?"pointer":"inherit"},onClick:()=>{e.toggleNextType()},children:e.type()})]}),ne(K8e,{onChange:t=>{e.setValue(t.target.value)}})]})}function EK({getter:e}){return $t(Tn,{children:[ne(Tn,{sx:{mb:1},children:ne("b",{children:"Request"})}),$t(Dc,{sx:{gap:2},children:[e.parameters.map((t,r)=>ne(tRe,{parameter:t},t.name)),(e.parameters.length??0)===0&&ne(Tn,{sx:{color:"#949597"},children:"(No params)"})]})]})}function rRe({value:e}){const[t,r]=ue.exports.useState(0);return{onClick:()=>{r((t+1)%e.length)},type:e[t]?.type??"unknown",value:e[t].value}}function nRe({type:e,value:t}){const{type:r,value:n,onClick:a}=rRe({value:t}),{showNotification:o}=Dy();return $t(Oc,{sx:{gap:1,cursor:t.length>1?"pointer":"initial"},onClick:a,children:[ne(d6,{children:ne(yK,{children:r})}),ne(d6,{width:"100%",children:ne(q8e,{children:n})}),ne(d6,{children:ne(gl,{sx:{padding:0,opacity:.8},onClick:s=>{s.stopPropagation(),navigator.clipboard.writeText(n),o("Copied to clipboard!","success")},children:ne("img",{src:c3,alt:"Copy icon",width:15,height:15})})})]})}function CK({returnTypes:e,values:t,isLoading:r}){return $t(No,{children:[(t.length>0||r)&&ne(Tn,{children:ne("b",{children:"Response"})}),t.length>0&&ne(Dc,{sx:{gap:1.5},children:ne(WC,{children:ne(zC,{children:t.map((n,a)=>ne(nRe,{type:e[a],value:n}))})})}),t.length===0&&r&&ne(Dc,{sx:{gap:1},children:e.map(n=>ne(ps,{variant:"rounded",height:20}))})]})}function iRe({getter:e}){const{data:t,isLoading:r,mutate:n,error:a}=SK(e);return $t(gK,{children:[$t(mK,{children:[$t(Tn,{sx:{flexGrow:1},children:[$t(z8e,{children:[e.name,"(",e.parameters.map(o=>o.originalType()).join(", "),")"]}),$t(H8e,{children:[ne("b",{children:"returns"})," ",e.returnTypes.join(", ")]})]}),ne(Tn,{children:ne(ns,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{n()},children:"Run"})})]}),$t(vK,{sx:{padding:"10px 20px",gap:2},children:[ne(EK,{getter:e}),ne(CK,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!a&&ne(js,{noBottomMargin:!0,noTopMargin:!0,title:ne(Tn,{children:a.toString()}),type:Rs.ERROR,notificationBody:ne(Tn,{})})]})]})}function oRe({getter:e}){const{data:t,isLoading:r,mutate:n,error:a}=SK(e);return $t(gK,{children:[$t(mK,{children:[ne(Tn,{sx:{flexGrow:1},children:ne(V8e,{value:e.name,placeholder:"Get method name",onChange:o=>e.setName(o.target.value)})}),ne(Tn,{children:ne(ns,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{n()},children:"Run"})})]}),$t(vK,{sx:{padding:"10px 20px",gap:2},children:[ne(EK,{getter:e}),$t("div",{style:{width:300,display:"flex",gap:10},children:[ne(ns,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.addParameter()},children:"Add parameter"}),ne(ns,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.removeParameter()},children:"Remove parameter"})]}),ne(CK,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!a&&ne(js,{noBottomMargin:!0,noTopMargin:!0,title:ne(Tn,{children:a.toString()}),type:Rs.ERROR,notificationBody:ne(Tn,{})})]})]})}function aRe(){const{getters:e}=iR(),t=xK();return $t(Tn,{sx:{display:"flex",gap:4,flexDirection:"column",mt:2},children:[e?.map(r=>ne(iRe,{getter:r})),ne(oRe,{getter:t})]})}const sRe=ao(Vn)({justifyContent:"space-between",width:"100%"}),lRe=ao(Tn)({position:"relative"}),uRe=ao(Tn)({position:"absolute",top:"80px",right:"40px",zIndex:3}),cRe=ao(UD)({borderBottom:"1px solid #E8E8E8","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function fRe(){const{data:e}=Vc(),[t,r]=ue.exports.useState(void 0),n=ga("(max-width: 450px)"),a=ga("(max-width: 600px)"),{showNotification:o}=Dy(),s=(p,m)=>{r(m)},l=ue.exports.useCallback(async p=>{const m=document.querySelector(p===1?"#myVerifierContent > pre > code > .contract-verifier-code-content":"pre > code > div.hljs.language-fift");navigator.clipboard.writeText(m?.innerText),o("Copied to clipboard!","success")},[]);ue.exports.useEffect(()=>{r(e?.hasOnchainProof?0:1)},[e?.hasOnchainProof]);const{getters:c}=iR();return $t(Tn,{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:[ne(fx,{mb:1,children:$t(sRe,{children:[$t(Vn,{mb:n?2:0,sx:{width:"100%"},children:[ne(p0,{children:ne("img",{src:D8e,alt:"Block icon",width:41,height:41})}),$t(Qf,{children:[!!e?.hasOnchainProof&&"Verified"," Source ",n&&ne("br",{})," ","Code"]})]}),t===0&&ne(Tn,{sx:{alignSelf:"baseline",position:"relative",top:a?"5px":"3px"},children:$t(ns,{fontSize:12,fontWeight:500,hoverBackground:"#F5F5F5",background:"#F2F2F2",height:a?30:37,width:a?30:167,onClick:()=>{e?.files?.length&&W8e(e.files)},children:[ne("img",{src:$8e,alt:"Download icon",width:19,height:19}),a?"":"Download sources"]})})]})}),$t(lRe,{p:3,children:[$t(cRe,{value:t,onChange:s,children:[ne(m5,{sx:{textTransform:"none"},disabled:!e?.hasOnchainProof,label:"Sources"}),ne(m5,{sx:{textTransform:"none"},label:"Disassembled"}),ne(m5,{sx:{textTransform:"none"},label:`Getters (${c?.length??0})`})]}),ne(Tn,{sx:{display:t===0?"block":"none"},children:ne(Dke,{button:ne(g9,{onCopy:l,copyText:1})})}),ne(Tn,{sx:{display:t===1?"block":"none"},children:ne(L8e,{button:ne(g9,{onCopy:l,copyText:0})})}),ne(Tn,{sx:{display:t===2?"block":"none"},children:ne(aRe,{})})]})]})}const g9=({copyText:e,onCopy:t})=>ne(uRe,{children:ne(gl,{onClick:()=>t(e),children:ne("img",{alt:"Copy Icon",src:c3,width:16,height:16})})});async function MK(e,t){return yv(e,"get_admin_address",[],r=>r[0].beginParse().readAddress().toFriendly(),t)}function dRe(){const{contractAddress:e}=nc(),t=n3(),[r]=h2(),[n,a]=ue.exports.useState(!1);return ue.exports.useEffect(()=>{(async()=>{if(!(!t||!e)){if(r.get("override")!==null){const o=await Sh();if(await MK(ii.Address.parse(window.sourcesRegistryAddress),o)===t){a(!0);return}}a(!1)}})()},[t,e]),n}const Cc={COMPILE:"COMPILE",PUBLISH:"PUBLISH"},xc={SOURCES:"SOURCES",PUBLISH:"PUBLISH"},m9=()=>({step:Cc.COMPILE,currentSection:xc.SOURCES}),hRe=e=>({...m9(),proceedToPublish:()=>{e({step:Cc.PUBLISH,currentSection:xc.PUBLISH})},toggleSection:t=>{e({currentSection:t})},reset:()=>{e(m9())}}),d3=$y(hRe),kK=P0(e=>({isPreloaded:!1,markPreloaded:()=>{e({isPreloaded:!0})},clearPreloaded:()=>{e({isPreloaded:!1})}}));function pRe(){const{contractAddress:e}=nc(),t=ac(),{reset:r}=oc(),{reset:n}=d3(),{isPreloaded:a,clearPreloaded:o}=kK();ue.exports.useEffect(()=>{a?o():r(),n(),t.invalidate()},[e])}const oR="/assets/contract.ff46c407.svg",gRe=ao(h0)({minWidth:100}),mRe=ao(Tn)(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}})),vRe=ao(Vn)(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)"})),RK=ao(Fo)({fontSize:14,color:"#000",minWidth:90,fontWeight:800}),AK=ao(Fo)({width:"100%",wordBreak:"break-word",fontSize:14,color:"#728A96"}),yRe=ao(Vn)({minWidth:25,justifyContent:"flex-end"}),bRe=(e,t,r,n)=>$t(({children:s})=>r?ne(PD,{placement:"top-start",title:e,children:ne("span",{children:s})}):ne(No,{children:s}),{children:[ne(({children:s})=>t&&!!e?ne(Sc,{target:"_blank",href:t,sx:{textDecoration:"none",cursor:"pointer"},children:s}):ne(No,{children:s}),{children:e??"-"}),ne(Tn,{sx:{fontSize:12,opacity:.8},children:n??""})]});function aR({isFlexibleWrapper:e,icon:t,title:r,dataRows:n,isLoading:a}){const o=e?gRe:h0,{showNotification:s}=Dy(),l=ga("(max-width: 500px)"),c=ue.exports.useCallback(async p=>{navigator.clipboard.writeText(p),s("Copied to clipboard!","success")},[]);return $t(o,{pb:e?0:2,children:[$t(fx,{mb:1,children:[ne(p0,{children:ne("img",{src:t,alt:"Block icon",width:41,height:41})}),ne(Qf,{children:r})]}),ne(mRe,{mt:2.5,isShrinked:!e,isExtraSmallScreen:l,children:n.map(({title:p,value:m,showIcon:_,color:T,customLink:O,tooltip:A,onClick:M,subtitle:B})=>$t(vRe,{isExtraSmallScreen:l,isShrinked:!e,children:[ne(RK,{children:p}),ne(AK,{sx:{cursor:M?"pointer":"initial"},onClick:M,children:bRe(m,O,A,B)}),_&&ne(yRe,{children:m&&ne(gl,{sx:{padding:0},onClick:()=>c(m),children:ne("img",{src:c3,alt:"Copy icon",width:15,height:15})})})]},p))})]})}function TK(e){try{const t=ii.Address.parse(e);switch(t.workChain){case-1:return"Masterchain (-1)";case 0:return"Basic Workchain (0)";default:return`${t.workChain}`}}catch{return""}}const wRe=new Intl.NumberFormat("en-US",{minimumFractionDigits:4});function h6(e,t){const[r,n]=ue.exports.useState(e);return ue.exports.useEffect(()=>{n(e)},[e,t]),[r,()=>{n(r===e?t:e)}]}function xRe(){const{contractAddress:e,contractAddressHex:t}=nc(),{data:r,isLoading:n}=Eh(),{data:a}=Vc(),o=[],[s,l]=h6(e,t),[c,p]=h6(r?.codeCellHash.base64,r?.codeCellHash.hex),[m,_]=h6(r?.dataCellHash.base64,r?.dataCellHash.hex);return r&&(o.push({title:"Address",value:s??"",showIcon:!0,onClick:()=>{l()},tooltip:!0,subtitle:TK(e||"")}),o.push({title:"Balance",value:`${wRe.format(parseFloat(r.balance))} TON`}),o.push({title:"Code Hash",value:c??"",showIcon:!0,onClick:()=>{p()},tooltip:!0}),o.push({title:"Data Hash",value:m??"",showIcon:!0,onClick:()=>{_()},tooltip:!0})),ne(aR,{title:"Contract",icon:oR,dataRows:o,isLoading:n,isFlexibleWrapper:!!a?.hasOnchainProof})}const _Re="/assets/compiler.05d3a143.svg";var IK="en",sR={},kS={};function PK(){return IK}function SRe(e){IK=e}function ERe(e){return sR[e]}function CRe(e){if(!e)throw new Error("No locale data passed");sR[e.locale]=e,kS[e.locale.toLowerCase()]=e.locale}function v9(e){if(sR[e])return e;if(kS[e.toLowerCase()])return kS[e.toLowerCase()]}function OK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.localeMatcher||"lookup";switch(r){case"lookup":return y9(e);case"best fit":return y9(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function y9(e){var t=v9(e);if(t)return t;for(var r=e.split("-");e.length>1;){r.pop(),e=r.join("-");var n=v9(e);if(n)return n}}var ir={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("."),n=Number(r[0])==t,a=n&&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("."),n=!r[1];return t==1&&n?"one":"other"},be:function(t){var r=String(t).split("."),n=Number(r[0])==t,a=n&&r[0].slice(-1),o=n&&r[0].slice(-2);return a==1&&o!=11?"one":a>=2&&a<=4&&(o<12||o>14)?"few":n&&a==0||a>=5&&a<=9||o>=11&&o<=14?"many":"other"},br:function(t){var r=String(t).split("."),n=Number(r[0])==t,a=n&&r[0].slice(-1),o=n&&r[0].slice(-2),s=n&&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&&n&&s==0?"many":"other"},bs:function(t){var r=String(t).split("."),n=r[0],a=r[1]||"",o=!r[1],s=n.slice(-1),l=n.slice(-2),c=a.slice(-1),p=a.slice(-2);return o&&s==1&&l!=11||c==1&&p!=11?"one":o&&s>=2&&s<=4&&(l<12||l>14)||c>=2&&c<=4&&(p<12||p>14)?"few":"other"},ca:function(t){var r=String(t).split("."),n=r[0],a=!r[1],o=n.slice(-6);return t==1&&a?"one":n!=0&&o==0&&a?"many":"other"},ceb:function(t){var r=String(t).split("."),n=r[0],a=r[1]||"",o=!r[1],s=n.slice(-1),l=a.slice(-1);return o&&(n==1||n==2||n==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("."),n=r[0],a=!r[1];return t==1&&a?"one":n>=2&&n<=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("."),n=r[0],a=Number(r[0])==t;return t==1||!a&&(n==0||n==1)?"one":"other"},dsb:function(t){var r=String(t).split("."),n=r[0],a=r[1]||"",o=!r[1],s=n.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("."),n=r[0],a=!r[1],o=n.slice(-6);return t==1?"one":n!=0&&o==0&&a?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t){var r=String(t).split("."),n=r[0],a=!r[1],o=n.slice(-6);return t>=0&&t<2?"one":n!=0&&o==0&&a?"many":"other"},ga:function(t){var r=String(t).split("."),n=Number(r[0])==t;return t==1?"one":t==2?"two":n&&t>=3&&t<=6?"few":n&&t>=7&&t<=10?"many":"other"},gd:function(t){var r=String(t).split("."),n=Number(r[0])==t;return t==1||t==11?"one":t==2||t==12?"two":n&&t>=3&&t<=10||n&&t>=13&&t<=19?"few":"other"},he:function(t){var r=String(t).split("."),n=r[0],a=!r[1];return n==1&&a||n==0&&!a?"one":n==2&&a?"two":"other"},is:function(t){var r=String(t).split("."),n=r[0],a=(r[1]||"").replace(/0+$/,""),o=Number(r[0])==t,s=n.slice(-1),l=n.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("."),n=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":n!=0?"many":"other"},lv:function(t){var r=String(t).split("."),n=r[1]||"",a=n.length,o=Number(r[0])==t,s=o&&r[0].slice(-1),l=o&&r[0].slice(-2),c=n.slice(-2),p=n.slice(-1);return o&&s==0||l>=11&&l<=19||a==2&&c>=11&&c<=19?"zero":s==1&&l!=11||a==2&&p==1&&c!=11||a!=2&&p==1?"one":"other"},mk:function(t){var r=String(t).split("."),n=r[0],a=r[1]||"",o=!r[1],s=n.slice(-1),l=n.slice(-2),c=a.slice(-1),p=a.slice(-2);return o&&s==1&&l!=11||c==1&&p!=11?"one":"other"},mt:function(t){var r=String(t).split("."),n=Number(r[0])==t,a=n&&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("."),n=r[0],a=!r[1],o=n.slice(-1),s=n.slice(-2);return t==1&&a?"one":a&&o>=2&&o<=4&&(s<12||s>14)?"few":a&&n!=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("."),n=r[0],a=!r[1],o=n.slice(-6);return n==0||n==1?"one":n!=0&&o==0&&a?"many":"other"},ro:function(t){var r=String(t).split("."),n=!r[1],a=Number(r[0])==t,o=a&&r[0].slice(-2);return t==1&&n?"one":!n||t==0||t!=1&&o>=1&&o<=19?"few":"other"},ru:function(t){var r=String(t).split("."),n=r[0],a=!r[1],o=n.slice(-1),s=n.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("."),n=r[0],a=r[1]||"";return t==0||t==1||n==0&&a==1?"one":"other"},sl:function(t){var r=String(t).split("."),n=r[0],a=!r[1],o=n.slice(-2);return a&&o==1?"one":a&&o==2?"two":a&&(o==3||o==4)||!a?"few":"other"}};ir.as=ir.am;ir.az=ir.af;ir.bg=ir.af;ir.bn=ir.am;ir.brx=ir.af;ir.ce=ir.af;ir.chr=ir.af;ir.de=ir.ast;ir.ee=ir.af;ir.el=ir.af;ir.en=ir.ast;ir.et=ir.ast;ir.eu=ir.af;ir.fa=ir.am;ir.fi=ir.ast;ir.fil=ir.ceb;ir.fo=ir.af;ir.fur=ir.af;ir.fy=ir.ast;ir.gl=ir.ast;ir.gu=ir.am;ir.ha=ir.af;ir.hi=ir.am;ir.hr=ir.bs;ir.hsb=ir.dsb;ir.hu=ir.af;ir.hy=ir.ff;ir.ia=ir.ast;ir.id=ir.dz;ir.ig=ir.dz;ir.it=ir.ca;ir.ja=ir.dz;ir.jgo=ir.af;ir.jv=ir.dz;ir.ka=ir.af;ir.kea=ir.dz;ir.kk=ir.af;ir.kl=ir.af;ir.km=ir.dz;ir.kn=ir.am;ir.ko=ir.dz;ir.ks=ir.af;ir.ku=ir.af;ir.ky=ir.af;ir.lb=ir.af;ir.lkt=ir.dz;ir.lo=ir.dz;ir.ml=ir.af;ir.mn=ir.af;ir.mr=ir.af;ir.ms=ir.dz;ir.my=ir.dz;ir.nb=ir.af;ir.ne=ir.af;ir.nl=ir.ast;ir.nn=ir.af;ir.no=ir.af;ir.or=ir.af;ir.pcm=ir.am;ir.ps=ir.af;ir.rm=ir.af;ir.sah=ir.dz;ir.sc=ir.ast;ir.sd=ir.af;ir.sk=ir.cs;ir.so=ir.af;ir.sq=ir.af;ir.sr=ir.bs;ir.su=ir.dz;ir.sv=ir.ast;ir.sw=ir.ast;ir.ta=ir.af;ir.te=ir.af;ir.th=ir.dz;ir.ti=ir.pa;ir.tk=ir.af;ir.to=ir.dz;ir.tr=ir.af;ir.ug=ir.af;ir.uk=ir.ru;ir.ur=ir.ast;ir.uz=ir.af;ir.vi=ir.dz;ir.wae=ir.af;ir.wo=ir.dz;ir.xh=ir.af;ir.yi=ir.ast;ir.yo=ir.dz;ir.yue=ir.dz;ir.zh=ir.dz;ir.zu=ir.am;const b9=ir;function w9(e){return e==="pt-PT"?e:kRe(e)}var MRe=/^([a-z0-9]+)/i;function kRe(e){var t=e.match(MRe);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function RRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x9(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};URe(this,e);var n=r.numeric,a=r.style,o=r.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",n!==void 0){if(DRe.indexOf(n)<0)throw new RangeError('Invalid "numeric" option: '.concat(n));this.numeric=n}if(a!==void 0){if($Re.indexOf(a)<0)throw new RangeError('Invalid "style" option: '.concat(a));this.style=a}if(o!==void 0){if(FRe.indexOf(o)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(o));this.localeMatcher=o}if(typeof t=="string"&&(t=[t]),t.push(PK()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");RS.supportedLocalesOf(this.locale).length>0?this.pluralRules=new RS(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=OK(this.locale,{localeMatcher:this.localeMatcher})}return NRe(e,[{key:"format",value:function(){var r=k9(arguments),n=E9(r,2),a=n[0],o=n[1];return this.getRule(a,o).replace("{0}",this.formatNumber(Math.abs(a)))}},{key:"formatToParts",value:function(){var r=k9(arguments),n=E9(r,2),a=n[0],o=n[1],s=this.getRule(a,o),l=s.indexOf("{0}");if(l<0)return[{type:"literal",value:s}];var c=[];return l>0&&c.push({type:"literal",value:s.slice(0,l)}),c=c.concat(this.formatNumberToParts(Math.abs(a)).map(function(p){return S9(S9({},p),{},{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 OK(r,t)})};qf.addLocale=CRe;qf.setDefaultLocale=SRe;qf.getDefaultLocale=PK;qf.PluralRules=RS;var p6='Invalid "unit" argument';function jRe(e){if(AS(e)==="symbol")throw new TypeError(p6);if(typeof e!="string")throw new RangeError("".concat(p6,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),LRe.indexOf(e)<0)throw new RangeError("".concat(p6,": ").concat(e));return e}var WRe='Invalid "number" argument';function zRe(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(WRe,": ").concat(e));return e}function HRe(e){return 1/e===-1/0}function qRe(e){return e<0||e===0&&HRe(e)}function k9(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[zRe(e[0]),jRe(e[1])]}function Ow(e){return Ow=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},Ow(e)}function KRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R9(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 YRe(e,t){if(!!e){if(typeof e=="string")return T9(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 T9(e,t)}}function T9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=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 QRe(){var e=(typeof Intl>"u"?"undefined":TS(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}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 ZRe(e){return eAe(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 JRe={}.constructor;function eAe(e){return IS(e)!==void 0&&e!==null&&e.constructor===JRe}var yc=60,Bw=60*yc,qd=24*Bw,PS=7*qd,OS=30.44*qd,BK=146097/400*qd;function Sp(e){switch(e){case"second":return 1;case"minute":return yc;case"hour":return Bw;case"day":return qd;case"week":return PS;case"month":return OS;case"year":return BK}}function UK(e){return e.factor!==void 0?e.factor:Sp(e.unit||e.formatAs)||1}function _v(e){switch(e){case"floor":return Math.floor;default:return Math.round}}function lR(e){switch(e){case"floor":return 1;default:return .5}}function BS(e){return BS=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},BS(e)}function NK(e,t){var r=t.prevStep,n=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),BS(l)==="object"&&(r&&r.id&&l[r.id]!==void 0?l=l[r.id]:l=l.default),typeof l=="function"&&(l=l(n,{future:o,getMinTimeForUnit:function(p,m){return I9(p,m||r&&r.formatAs,{round:s})}})),l===void 0&&e.test&&(e.test(n,{now:a,future:o})?l=0:l=9007199254740991),l===void 0&&(r?e.formatAs&&r.formatAs&&(l=I9(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 I9(e,t,r){var n=r.round,a=Sp(e),o;if(t==="now"?o=Sp(e):o=Sp(t),a!==void 0&&o!==void 0)return a-o*(1-lR(n))}function P9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tAe(e){for(var t=1;t0)return e[s-1]}return l}}}function LK(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=NK(e[n],tAe({prevStep:e[n-1],timestamp:r.now-t*1e3},r));return a===void 0||Math.abs(t)=0:!0})}function aAe(e,t,r){var n=r.now,a=r.round;if(!!Sp(e)){var o=Sp(e)*1e3,s=t>n,l=Math.abs(t-n),c=_v(a)(l/o)*o;return s?c>0?l-c+lAe(a,o):l-c+1:-(l-c)+sAe(a,o)}}function sAe(e,t){return lR(e)*t}function lAe(e,t){return(1-lR(e))*t+1}var uAe=365*24*60*60*1e3,DK=1e3*uAe;function cAe(e,t,r){var n=r.prevStep,a=r.nextStep,o=r.now,s=r.future,l=r.round,c=e.getTime?e.getTime():e,p=function(A){return aAe(A,c,{now:o,round:l})},m=dAe(s?t:a,c,{future:s,now:o,round:l,prevStep:s?n:t});if(m!==void 0){var _;if(t&&(t.getTimeToNextUpdate&&(_=t.getTimeToNextUpdate(c,{getTimeToNextUpdateForUnit:p,getRoundFunction:_v,now:o,future:s,round:l})),_===void 0)){var T=t.unit||t.formatAs;T&&(_=p(T))}return _===void 0?m:Math.min(_,m)}}function fAe(e,t,r){var n=r.now,a=r.future,o=r.round,s=r.prevStep,l=NK(e,{timestamp:t,now:n,future:a,round:o,prevStep:s});if(l!==void 0)return a?t-l*1e3+1:l===0&&t===n?DK:t+l*1e3}function dAe(e,t,r){var n=r.now,a=r.future,o=r.round,s=r.prevStep;if(e){var l=fAe(e,t,{now:n,future:a,round:o,prevStep:s});return l===void 0?void 0:l-n}else return a?t-n+1:DK}var $K={};function hp(e){return $K[e]}function FK(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");$K[e.locale]=e}const hAe=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],US={steps:hAe,labels:"long"};function O9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function B9(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 PAe(e,t){return UAe(e)||BAe(e,t)||zK(e,t)||OAe()}function OAe(){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 zK(e,t){if(!!e){if(typeof e=="string")return Y9(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 Y9(e,t)}}function Y9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.polyfill;NAe(this,e),typeof t=="string"&&(t=[t]),this.locale=XRe(t.concat(e.getDefaultLocale()),hp),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),n===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=qf,this.IntlPluralRules=qf.PluralRules),this.relativeTimeFormatCache=new A9,this.pluralRulesCache=new A9}return LAe(e,[{key:"format",value:function(r,n,a){a||(n&&!WAe(n)?(a=n,n=void 0):a={}),n||(n=NS),typeof n=="string"&&(n=TAe(n));var o=DAe(r),s=this.getLabels(n.flavour||n.labels),l=s.labels,c=s.labelsType,p;n.now!==void 0&&(p=n.now),p===void 0&&a.now!==void 0&&(p=a.now),p===void 0&&(p=Date.now());var m=(p-o)/1e3,_=a.future||m<0,T=jAe(l,hp(this.locale).now,hp(this.locale).long,_);if(n.custom){var O=n.custom({now:p,date:new Date(o),time:o,elapsed:m,locale:this.locale});if(O!==void 0)return O}var A=FAe(n.units,l,T),M=a.round||n.round,B=nAe(n.gradation||n.steps||NS.steps,m,{now:p,units:A,round:M,future:_,getNextStep:!0}),L=PAe(B,3),U=L[0],D=L[1],Y=L[2],q=this.formatDateForStep(o,D,m,{labels:l,labelsType:c,nowLabel:T,now:p,future:_,round:M})||"";if(a.getTimeToNextUpdate){var Z=cAe(o,D,{nextStep:Y,prevStep:U,now:p,future:_,round:M});return[q,Z]}return q}},{key:"formatDateForStep",value:function(r,n,a,o){var s=this,l=o.labels,c=o.labelsType,p=o.nowLabel,m=o.now,_=o.future,T=o.round;if(!!n){if(n.format)return n.format(r,this.locale,{formatAs:function(L,U){return s.formatValue(U,L,{labels:l,future:_})},now:m,future:_});var O=n.unit||n.formatAs;if(!O)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(n)));if(O==="now")return p;var A=Math.abs(a)/UK(n);n.granularity&&(A=_v(T)(A/n.granularity)*n.granularity);var M=-1*Math.sign(a)*_v(T)(A);switch(M===0&&(_?M=0:M=-0),c){case"long":case"short":case"narrow":return this.getFormatter(c).format(M,O);default:return this.formatValue(M,O,{labels:l,future:_})}}}},{key:"formatValue",value:function(r,n,a){var o=a.labels,s=a.future;return this.getFormattingRule(o,n,r,{future:s}).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"getFormattingRule",value:function(r,n,a,o){var s=o.future;if(this.locale,r=r[n],typeof r=="string")return r;var l=a===0?s?"future":"past":a<0?"past":"future",c=r[l]||r;if(typeof c=="string")return c;var p=this.getPluralRules().select(Math.abs(a));return c[p]||c.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 n=hp(this.locale),a=IAe(r),o;!(o=a()).done;){var s=o.value;if(n[s])return{labelsType:s,labels:n[s]}}}}]),e}(),HK="en";Yu.getDefaultLocale=function(){return HK};Yu.setDefaultLocale=function(e){return HK=e};Yu.addDefaultLocale=function(e){if(Q9)return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");Q9=!0,Yu.setDefaultLocale(e.locale),Yu.addLocale(e)};var Q9;Yu.addLocale=function(e){FK(e),qf.addLocale(e)};Yu.locale=Yu.addLocale;Yu.addLabels=function(e,t,r){var n=hp(e);n||(FK({locale:e}),n=hp(e)),n[t]=r};function DAe(e){if(e.constructor===Date||$Ae(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(Uw(e),", ").concat(e))}function $Ae(e){return Uw(e)==="object"&&typeof e.getTime=="function"}function FAe(e,t,r){var n=Object.keys(t);return r&&n.push("now"),e&&(n=e.filter(function(a){return a==="now"||n.indexOf(a)>=0})),n}function jAe(e,t,r,n){var a=e.now||t&&t.now;if(a)return typeof a=="string"?a:n?a.future:a.past;if(r&&r.second&&r.second.current)return r.second.current}function WAe(e){return typeof e=="string"||ZRe(e)}const zAe={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"}}},HAe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/func`,qAe=e=>`https://github.com/ton-blockchain/ton/tree/func-${e}/crypto/fift`,KAe=e=>`https://github.com/tact-lang/tact/tree/v${e}`;Yu.addDefaultLocale(zAe);function VAe(){const{data:e}=Vc(),t=e.compilerSettings,r=[];if(e){if(r.push({title:"Compiler",value:`${e.compiler}`}),e.compiler==="func"){const n=t?.funcVersion;r.push({title:"Version",value:n,color:"#0088CC",customLink:n&&HAe(n)})}else if(e.compiler==="fift"){const n=t?.fiftVersion;r.push({title:"Version",value:n,color:"#0088CC",customLink:qAe(n)})}else if(e.compiler==="tact"){const n=t?.tactVersion;r.push({title:"Version",value:n,color:"#0088CC",customLink:KAe(n)})}e.compiler!=="tact"&&r.push({title:"Command",value:t?.commandLine,showIcon:!0,tooltip:!0}),r.push({title:"Verified on",value:e.verificationDate?.toLocaleDateString()??""})}return ne(aR,{title:"Compiler",icon:_Re,dataRows:r,isFlexibleWrapper:!0})}function L0(e,t,r,n){function a(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function l(m){try{p(n.next(m))}catch(_){s(_)}}function c(m){try{p(n.throw(m))}catch(_){s(_)}}function p(m){m.done?o(m.value):a(m.value).then(l,c)}p((n=n.apply(e,t||[])).next())})}function D0(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,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(p){return function(m){return c([p,m])}}function c(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,a&&(o=p[0]&2?a.return:p[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,p[1])).done)return o;switch(a=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]0)&&!(a=n.next()).done;)o.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function J9(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function YAe(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),a=GAe.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var XAe=[".DS_Store","Thumbs.db"];function QAe(e){return L0(this,void 0,void 0,function(){return D0(this,function(t){return Nw(e)&&ZAe(e.dataTransfer)?[2,rTe(e.dataTransfer,e.type)]:JAe(e)?[2,eTe(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,tTe(e)]:[2,[]]})})}function ZAe(e){return Nw(e)}function JAe(e){return Nw(e)&&Nw(e.target)}function Nw(e){return typeof e=="object"&&e!==null}function eTe(e){return jS(e.target.files).map(function(t){return Hy(t)})}function tTe(e){return L0(this,void 0,void 0,function(){var t;return D0(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return Hy(n)})]}})})}function rTe(e,t){return L0(this,void 0,void 0,function(){var r,n;return D0(this,function(a){switch(a.label){case 0:return e.items?(r=jS(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(nTe))]):[3,2];case 1:return n=a.sent(),[2,e7(qK(n))];case 2:return[2,e7(jS(e.files).map(function(o){return Hy(o)}))]}})})}function e7(e){return e.filter(function(t){return XAe.indexOf(t.name)===-1})}function jS(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,o7(r)];if(e.sizer)return[!1,o7(r)]}return[!0,null]}function Ad(e){return e!=null}function bTe(e){var t=e.files,r=e.accept,n=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(c){var p=YK(c,r),m=Ev(p,1),_=m[0],T=XK(c,n,a),O=Ev(T,1),A=O[0],M=l?l(c):null;return _&&A&&!M})}function Lw(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function q1(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 s7(e){e.preventDefault()}function wTe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function xTe(e){return e.indexOf("Edge/")!==-1}function _Te(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return wTe(e)||xTe(e)}function Tu(){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,n=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function $Te(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var uR=ue.exports.forwardRef(function(e,t){var r=e.children,n=Dw(e,RTe),a=tV(n),o=a.open,s=Dw(a,ATe);return ue.exports.useImperativeHandle(t,function(){return{open:o}},[o]),ne(ue.exports.Fragment,{children:r(na(na({},s),{},{open:o}))})});uR.displayName="Dropzone";var eV={disabled:!1,getFilesFromEvent:QAe,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};uR.defaultProps=eV;uR.propTypes={children:Io.exports.func,accept:Io.exports.objectOf(Io.exports.arrayOf(Io.exports.string)),multiple:Io.exports.bool,preventDropOnDocument:Io.exports.bool,noClick:Io.exports.bool,noKeyboard:Io.exports.bool,noDrag:Io.exports.bool,noDragEventsBubbling:Io.exports.bool,minSize:Io.exports.number,maxSize:Io.exports.number,maxFiles:Io.exports.number,disabled:Io.exports.bool,getFilesFromEvent:Io.exports.func,onFileDialogCancel:Io.exports.func,onFileDialogOpen:Io.exports.func,useFsAccessApi:Io.exports.bool,autoFocus:Io.exports.bool,onDragEnter:Io.exports.func,onDragLeave:Io.exports.func,onDragOver:Io.exports.func,onDrop:Io.exports.func,onDropAccepted:Io.exports.func,onDropRejected:Io.exports.func,onError:Io.exports.func,validator:Io.exports.func};var qS={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function tV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=na(na({},eV),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,p=t.onDragEnter,m=t.onDragLeave,_=t.onDragOver,T=t.onDrop,O=t.onDropAccepted,A=t.onDropRejected,M=t.onFileDialogCancel,B=t.onFileDialogOpen,L=t.useFsAccessApi,U=t.autoFocus,D=t.preventDropOnDocument,Y=t.noClick,q=t.noKeyboard,Z=t.noDrag,ee=t.noDragEventsBubbling,V=t.onError,te=t.validator,R=ue.exports.useMemo(function(){return CTe(r)},[r]),h=ue.exports.useMemo(function(){return ETe(r)},[r]),g=ue.exports.useMemo(function(){return typeof B=="function"?B:u7},[B]),v=ue.exports.useMemo(function(){return typeof M=="function"?M:u7},[M]),u=ue.exports.useRef(null),f=ue.exports.useRef(null),y=ue.exports.useReducer(FTe,qS),S=g6(y,2),w=S[0],d=S[1],I=w.isFocused,$=w.isFileDialogActive,b=ue.exports.useRef(typeof window<"u"&&window.isSecureContext&&L&&STe()),X=function(){!b.current&&$&&setTimeout(function(){if(f.current){var ye=f.current.files;ye.length||(d({type:"closeDialog"}),v())}},300)};ue.exports.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[f,$,v,b]);var we=ue.exports.useRef([]),Ae=function(ye){u.current&&u.current.contains(ye.target)||(ye.preventDefault(),we.current=[])};ue.exports.useEffect(function(){return D&&(document.addEventListener("dragover",s7,!1),document.addEventListener("drop",Ae,!1)),function(){D&&(document.removeEventListener("dragover",s7),document.removeEventListener("drop",Ae))}},[u,D]),ue.exports.useEffect(function(){return!n&&U&&u.current&&u.current.focus(),function(){}},[u,U,n]);var je=ue.exports.useCallback(function(ve){V?V(ve):console.error(ve)},[V]),Vt=ue.exports.useCallback(function(ve){ve.preventDefault(),ve.persist(),st(ve),we.current=[].concat(PTe(we.current),[ve.target]),q1(ve)&&Promise.resolve(a(ve)).then(function(ye){if(!(Lw(ve)&&!ee)){var me=ye.length,Q=me>0&&bTe({files:ye,accept:R,minSize:s,maxSize:o,multiple:l,maxFiles:c,validator:te}),j=me>0&&!Q;d({isDragAccept:Q,isDragReject:j,isDragActive:!0,type:"setDraggedFiles"}),p&&p(ve)}}).catch(function(ye){return je(ye)})},[a,p,je,ee,R,s,o,l,c,te]),De=ue.exports.useCallback(function(ve){ve.preventDefault(),ve.persist(),st(ve);var ye=q1(ve);if(ye&&ve.dataTransfer)try{ve.dataTransfer.dropEffect="copy"}catch{}return ye&&_&&_(ve),!1},[_,ee]),Fe=ue.exports.useCallback(function(ve){ve.preventDefault(),ve.persist(),st(ve);var ye=we.current.filter(function(Q){return u.current&&u.current.contains(Q)}),me=ye.indexOf(ve.target);me!==-1&&ye.splice(me,1),we.current=ye,!(ye.length>0)&&(d({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),q1(ve)&&m&&m(ve))},[u,m,ee]),wt=ue.exports.useCallback(function(ve,ye){var me=[],Q=[];ve.forEach(function(j){var F=YK(j,R),ie=g6(F,2),de=ie[0],pe=ie[1],be=XK(j,s,o),Gt=g6(be,2),Lt=Gt[0],Tt=Gt[1],yr=te?te(j):null;if(de&&Lt&&!yr)me.push(j);else{var zt=[pe,Tt];yr&&(zt=zt.concat(yr)),Q.push({file:j,errors:zt.filter(function(Ht){return Ht})})}}),(!l&&me.length>1||l&&c>=1&&me.length>c)&&(me.forEach(function(j){Q.push({file:j,errors:[yTe]})}),me.splice(0)),d({acceptedFiles:me,fileRejections:Q,type:"setFiles"}),T&&T(me,Q,ye),Q.length>0&&A&&A(Q,ye),me.length>0&&O&&O(me,ye)},[d,l,R,s,o,c,T,O,A,te]),Ke=ue.exports.useCallback(function(ve){ve.preventDefault(),ve.persist(),st(ve),we.current=[],q1(ve)&&Promise.resolve(a(ve)).then(function(ye){Lw(ve)&&!ee||wt(ye,ve)}).catch(function(ye){return je(ye)}),d({type:"reset"})},[a,wt,je,ee]),ht=ue.exports.useCallback(function(){if(b.current){d({type:"openDialog"}),g();var ve={multiple:l,types:h};window.showOpenFilePicker(ve).then(function(ye){return a(ye)}).then(function(ye){wt(ye,null),d({type:"closeDialog"})}).catch(function(ye){MTe(ye)?(v(ye),d({type:"closeDialog"})):kTe(ye)?(b.current=!1,f.current?(f.current.value=null,f.current.click()):je(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."))):je(ye)});return}f.current&&(d({type:"openDialog"}),g(),f.current.value=null,f.current.click())},[d,g,v,L,wt,je,h,l]),dr=ue.exports.useCallback(function(ve){!u.current||!u.current.isEqualNode(ve.target)||(ve.key===" "||ve.key==="Enter"||ve.keyCode===32||ve.keyCode===13)&&(ve.preventDefault(),ht())},[u,ht]),ae=ue.exports.useCallback(function(){d({type:"focus"})},[]),Ve=ue.exports.useCallback(function(){d({type:"blur"})},[]),Nt=ue.exports.useCallback(function(){Y||(_Te()?setTimeout(ht,0):ht())},[Y,ht]),Ee=function(ye){return n?null:ye},xe=function(ye){return q?null:Ee(ye)},ut=function(ye){return Z?null:Ee(ye)},st=function(ye){ee&&ye.stopPropagation()},_t=ue.exports.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=ve.refKey,me=ye===void 0?"ref":ye,Q=ve.role,j=ve.onKeyDown,F=ve.onFocus,ie=ve.onBlur,de=ve.onClick,pe=ve.onDragEnter,be=ve.onDragOver,Gt=ve.onDragLeave,Lt=ve.onDrop,Tt=Dw(ve,TTe);return na(na(HS({onKeyDown:xe(Tu(j,dr)),onFocus:xe(Tu(F,ae)),onBlur:xe(Tu(ie,Ve)),onClick:Ee(Tu(de,Nt)),onDragEnter:ut(Tu(pe,Vt)),onDragOver:ut(Tu(be,De)),onDragLeave:ut(Tu(Gt,Fe)),onDrop:ut(Tu(Lt,Ke)),role:typeof Q=="string"&&Q!==""?Q:"presentation"},me,u),!n&&!q?{tabIndex:0}:{}),Tt)}},[u,dr,ae,Ve,Nt,Vt,De,Fe,Ke,q,Z,n]),Pt=ue.exports.useCallback(function(ve){ve.stopPropagation()},[]),Ut=ue.exports.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=ve.refKey,me=ye===void 0?"ref":ye,Q=ve.onChange,j=ve.onClick,F=Dw(ve,ITe),ie=HS({accept:R,multiple:l,type:"file",style:{display:"none"},onChange:Ee(Tu(Q,Ke)),onClick:Ee(Tu(j,Pt)),tabIndex:-1},me,f);return na(na({},ie),F)}},[f,r,l,Ke,n]);return na(na({},w),{},{isFocused:I&&!n,getRootProps:_t,getInputProps:Ut,rootRef:u,inputRef:f,open:Ee(ht)})}function FTe(e,t){switch(t.type){case"focus":return na(na({},e),{},{isFocused:!0});case"blur":return na(na({},e),{},{isFocused:!1});case"openDialog":return na(na({},qS),{},{isFileDialogActive:!0});case"closeDialog":return na(na({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return na(na({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return na(na({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return na({},qS);default:return e}}function u7(){}const jTe="/assets/sources.bdd55da1.svg",rV="/assets/verified-bold.54828026.svg",WTe="/assets/upload.c0ad3052.svg",zTe=ao(Vn)({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 HTe(){const{addFiles:e,hasFiles:t}=oc(),{step:r}=d3(),n=ga("(max-width: 450px)"),{active:a}=i8(),o=p=>{e(p)},{getRootProps:s,getInputProps:l,isDragActive:c}=tV({onDrop:o,accept:{"text/plain":Iw.map(p=>`.${p}`)}});return $t(No,{children:[ne(fx,{mb:1,children:$t(Vn,{sx:{justifyContent:"space-between",width:"100%",flexDirection:n?"column":"inherit"},children:[$t(Vn,{mb:n?2:0,sx:{width:"100%"},children:[ne(p0,{children:ne("img",{src:r===Cc.PUBLISH?rV:jTe,alt:"Block icon",width:41,height:41})}),ne(Qf,{children:"Add sources"})]}),t()&&r!==Cc.PUBLISH&&ne("div",{...s(),children:$t(ns,{fontSize:12,fontWeight:700,hoverBackground:"#e3e3e3",background:"#F8F8F8",height:44,width:159,children:[ne("img",{src:WTe,alt:"Sources icon",width:19,height:19}),"Upload source"]})})]})}),$t(Tn,{sx:{padding:"15px 30px"},children:[ne(Tn,{sx:{position:"relative",zIndex:a?0:4,transition:a?"":"1.5s z-index"},children:!t()&&$t(zTe,{...s(),children:["Drop sources (",Iw.map(p=>`.${p}`).join(", "),") here"]})}),ne("input",{...l(),onClick:p=>{p.target.value=""},style:{display:"none"},id:"fileUpload",type:"file",multiple:!0,accept:".fc,.func,.fif"})]})]})}function qTe(){for(var e=arguments.length,t=new Array(e),r=0;rn=>{t.forEach(a=>a(n))},t)}const h3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $0(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function cR(e){return"nodeType"in e}function Qs(e){var t,r;return e?$0(e)?e:cR(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function fR(e){const{Document:t}=Qs(e);return e instanceof t}function qy(e){return $0(e)?!1:e instanceof Qs(e).HTMLElement}function KTe(e){return e instanceof Qs(e).SVGElement}function F0(e){return e?$0(e)?e.document:cR(e)?fR(e)?e:qy(e)?e.ownerDocument:document:document:document}const yu=h3?ue.exports.useLayoutEffect:ue.exports.useEffect;function dR(e){const t=ue.exports.useRef(e);return yu(()=>{t.current=e}),ue.exports.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a{e.current=setInterval(n,a)},[]),r=ue.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Cv(e,t){t===void 0&&(t=[e]);const r=ue.exports.useRef(e);return yu(()=>{r.current!==e&&(r.current=e)},t),r}function Ky(e,t){const r=ue.exports.useRef();return ue.exports.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function $w(e){const t=dR(e),r=ue.exports.useRef(null),n=ue.exports.useCallback(a=>{a!==r.current&&t?.(a,r.current),r.current=a},[]);return[r,n]}function KS(e){const t=ue.exports.useRef();return ue.exports.useEffect(()=>{t.current=e},[e]),t.current}let m6={};function Vy(e,t){return ue.exports.useMemo(()=>{if(t)return t;const r=m6[e]==null?0:m6[e]+1;return m6[e]=r,e+"-"+r},[e,t])}function nV(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a{const l=Object.entries(s);for(const[c,p]of l){const m=o[c];m!=null&&(o[c]=m+e*p)}return o},{...t})}}const Ep=nV(1),Mv=nV(-1);function GTe(e){return"clientX"in e&&"clientY"in e}function hR(e){if(!e)return!1;const{KeyboardEvent:t}=Qs(e.target);return t&&e instanceof t}function YTe(e){if(!e)return!1;const{TouchEvent:t}=Qs(e.target);return t&&e instanceof t}function VS(e){if(YTe(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 GTe(e)?{x:e.clientX,y:e.clientY}:null}const kv=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[kv.Translate.toString(e),kv.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),c7="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function XTe(e){return e.matches(c7)?e:e.querySelector(c7)}function QTe(e,t,r){const n={...e};return t.top+e.y<=r.top?n.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(n.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?n.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(n.x=r.left+r.width-t.right),n}const ZTe=e=>{let{containerNodeRect:t,draggingNodeRect:r,transform:n}=e;return!r||!t?n:QTe(n,r,t)},JTe=e=>{let{transform:t}=e;return{...t,x:0}},eIe={display:"none"};function tIe(e){let{id:t,value:r}=e;return ne("div",{id:t,style:eIe,children:r})}const rIe={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 nIe(e){let{id:t,announcement:r}=e;return ne("div",{id:t,style:rIe,role:"status","aria-live":"assertive","aria-atomic":!0,children:r})}function iIe(){const[e,t]=ue.exports.useState("");return{announce:ue.exports.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const iV=ue.exports.createContext(null);function oIe(e){const t=ue.exports.useContext(iV);ue.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function aIe(){const[e]=ue.exports.useState(()=>new Set),t=ue.exports.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[ue.exports.useCallback(n=>{let{type:a,event:o}=n;e.forEach(s=>{var l;return(l=s[a])==null?void 0:l.call(s,o)})},[e]),t]}const sIe={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. - `},lIe={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 uIe(e){let{announcements:t=lIe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:a=sIe}=e;const{announce:o,announcement:s}=iIe(),l=Vy("DndLiveRegion"),[c,p]=ue.exports.useState(!1);if(ue.exports.useEffect(()=>{p(!0)},[]),oIe(ue.exports.useMemo(()=>({onDragStart(_){let{active:T}=_;o(t.onDragStart({active:T}))},onDragMove(_){let{active:T,over:O}=_;t.onDragMove&&o(t.onDragMove({active:T,over:O}))},onDragOver(_){let{active:T,over:O}=_;o(t.onDragOver({active:T,over:O}))},onDragEnd(_){let{active:T,over:O}=_;o(t.onDragEnd({active:T,over:O}))},onDragCancel(_){let{active:T,over:O}=_;o(t.onDragCancel({active:T,over:O}))}}),[o,t])),!c)return null;const m=$t(No,{children:[ne(tIe,{id:n,value:a.draggable}),ne(nIe,{id:l,announcement:s})]});return r?Al.exports.createPortal(m,r):m}var Ia;(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"})(Ia||(Ia={}));function Fw(){}function v6(e,t){return ue.exports.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function cIe(){for(var e=arguments.length,t=new Array(e),r=0;r[...t].filter(n=>n!=null),[...t])}const bu=Object.freeze({x:0,y:0});function oV(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function aV(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function fIe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function f7(e){let{left:t,top:r,height:n,width:a}=e;return[{x:t,y:r},{x:t+a,y:r},{x:t,y:r+n},{x:t+a,y:r+n}]}function sV(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function d7(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 dIe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=d7(t,t.left,t.top),o=[];for(const s of n){const{id:l}=s,c=r.get(l);if(c){const p=oV(d7(c),a);o.push({id:l,data:{droppableContainer:s,value:p}})}}return o.sort(aV)},hIe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=f7(t),o=[];for(const s of n){const{id:l}=s,c=r.get(l);if(c){const p=f7(c),m=a.reduce((T,O,A)=>T+oV(p[A],O),0),_=Number((m/4).toFixed(4));o.push({id:l,data:{droppableContainer:s,value:_}})}}return o.sort(aV)};function pIe(e,t){const r=Math.max(t.top,e.top),n=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-n,l=o-r;if(n{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=[];for(const o of n){const{id:s}=o,l=r.get(s);if(l){const c=pIe(l,t);c>0&&a.push({id:s,data:{droppableContainer:o,value:c}})}}return a.sort(fIe)};function mIe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function lV(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:bu}function vIe(e){return function(r){for(var n=arguments.length,a=new Array(n>1?n-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 yIe=vIe(1);function bIe(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 wIe(e,t,r){const n=bIe(t);if(!n)return e;const{scaleX:a,scaleY:o,x:s,y:l}=n,c=e.left-s-(1-a)*parseFloat(r),p=e.top-l-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),m=a?e.width/a:e.width,_=o?e.height/o:e.height;return{width:m,height:_,top:p,right:c+m,bottom:p+_,left:c}}const xIe={ignoreTransform:!1};function j0(e,t){t===void 0&&(t=xIe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:p}=Qs(e),{transform:m,transformOrigin:_}=p(e);m&&(r=wIe(r,m,_))}const{top:n,left:a,width:o,height:s,bottom:l,right:c}=r;return{top:n,left:a,width:o,height:s,bottom:l,right:c}}function h7(e){return j0(e,{ignoreTransform:!0})}function _Ie(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function SIe(e,t){return t===void 0&&(t=Qs(e).getComputedStyle(e)),t.position==="fixed"}function EIe(e,t){t===void 0&&(t=Qs(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 p3(e,t){const r=[];function n(a){if(t!=null&&r.length>=t||!a)return r;if(fR(a)&&a.scrollingElement!=null&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!qy(a)||KTe(a)||r.includes(a))return r;const{getComputedStyle:o}=Qs(a),s=o(a);return a!==e&&EIe(a,s)&&r.push(a),SIe(a,s)?r:n(a.parentNode)}return e?n(e):r}function uV(e){const[t]=p3(e,1);return t??null}function y6(e){return!h3||!e?null:$0(e)?e:cR(e)?fR(e)||e===F0(e).scrollingElement?window:qy(e)?e:null:null}function cV(e){return $0(e)?e.scrollX:e.scrollLeft}function fV(e){return $0(e)?e.scrollY:e.scrollTop}function GS(e){return{x:cV(e),y:fV(e)}}var za;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(za||(za={}));function dV(e){return!h3||!e?!1:e===document.scrollingElement}function hV(e){const t={x:0,y:0},r=dV(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},a=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,l=e.scrollLeft>=n.x;return{isTop:a,isLeft:o,isBottom:s,isRight:l,maxScroll:n,minScroll:t}}const CIe={x:.2,y:.2};function MIe(e,t,r,n,a){let{top:o,left:s,right:l,bottom:c}=r;n===void 0&&(n=10),a===void 0&&(a=CIe);const{isTop:p,isBottom:m,isLeft:_,isRight:T}=hV(e),O={x:0,y:0},A={x:0,y:0},M={height:t.height*a.y,width:t.width*a.x};return!p&&o<=t.top+M.height?(O.y=za.Backward,A.y=n*Math.abs((t.top+M.height-o)/M.height)):!m&&c>=t.bottom-M.height&&(O.y=za.Forward,A.y=n*Math.abs((t.bottom-M.height-c)/M.height)),!T&&l>=t.right-M.width?(O.x=za.Forward,A.x=n*Math.abs((t.right-M.width-l)/M.width)):!_&&s<=t.left+M.width&&(O.x=za.Backward,A.x=n*Math.abs((t.left+M.width-s)/M.width)),{direction:O,speed:A}}function kIe(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:n,bottom:a}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:a,width:e.clientWidth,height:e.clientHeight}}function pV(e){return e.reduce((t,r)=>Ep(t,GS(r)),bu)}function RIe(e){return e.reduce((t,r)=>t+cV(r),0)}function AIe(e){return e.reduce((t,r)=>t+fV(r),0)}function TIe(e,t){if(t===void 0&&(t=j0),!e)return;const{top:r,left:n,bottom:a,right:o}=t(e);!uV(e)||(a<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const IIe=[["x",["left","right"],RIe],["y",["top","bottom"],AIe]];class pR{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 n=p3(r),a=pV(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,l]of IIe)for(const c of s)Object.defineProperty(this,c,{get:()=>{const p=l(n),m=a[o]-p;return this.rect[c]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class _m{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var a;(a=this.target)==null||a.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function PIe(e){const{EventTarget:t}=Qs(e);return e instanceof t?e:F0(e)}function b6(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ml;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ml||(Ml={}));function p7(e){e.preventDefault()}function OIe(e){e.stopPropagation()}var Xi;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Xi||(Xi={}));const gV={start:[Xi.Space,Xi.Enter],cancel:[Xi.Esc],end:[Xi.Space,Xi.Enter]},BIe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Xi.Right:return{...r,x:r.x+25};case Xi.Left:return{...r,x:r.x-25};case Xi.Down:return{...r,y:r.y+25};case Xi.Up:return{...r,y:r.y-25}}};class gR{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 _m(F0(r)),this.windowListeners=new _m(Qs(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ml.Resize,this.handleCancel),this.windowListeners.add(Ml.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ml.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&TIe(n),r(bu)}handleKeyDown(t){if(hR(t)){const{active:r,context:n,options:a}=this.props,{keyboardCodes:o=gV,coordinateGetter:s=BIe,scrollBehavior:l="smooth"}=a,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:p}=n.current,m=p?{x:p.left,y:p.top}:bu;this.referenceCoordinates||(this.referenceCoordinates=m);const _=s(t,{active:r,context:n.current,currentCoordinates:m});if(_){const T=Mv(_,m),O={x:0,y:0},{scrollableAncestors:A}=n.current;for(const M of A){const B=t.code,{isTop:L,isRight:U,isLeft:D,isBottom:Y,maxScroll:q,minScroll:Z}=hV(M),ee=kIe(M),V={x:Math.min(B===Xi.Right?ee.right-ee.width/2:ee.right,Math.max(B===Xi.Right?ee.left:ee.left+ee.width/2,_.x)),y:Math.min(B===Xi.Down?ee.bottom-ee.height/2:ee.bottom,Math.max(B===Xi.Down?ee.top:ee.top+ee.height/2,_.y))},te=B===Xi.Right&&!U||B===Xi.Left&&!D,R=B===Xi.Down&&!Y||B===Xi.Up&&!L;if(te&&V.x!==_.x){const h=M.scrollLeft+T.x,g=B===Xi.Right&&h<=q.x||B===Xi.Left&&h>=Z.x;if(g&&!T.y){M.scrollTo({left:h,behavior:l});return}g?O.x=M.scrollLeft-h:O.x=B===Xi.Right?M.scrollLeft-q.x:M.scrollLeft-Z.x,O.x&&M.scrollBy({left:-O.x,behavior:l});break}else if(R&&V.y!==_.y){const h=M.scrollTop+T.y,g=B===Xi.Down&&h<=q.y||B===Xi.Up&&h>=Z.y;if(g&&!T.x){M.scrollTo({top:h,behavior:l});return}g?O.y=M.scrollTop-h:O.y=B===Xi.Down?M.scrollTop-q.y:M.scrollTop-Z.y,O.y&&M.scrollBy({top:-O.y,behavior:l});break}}this.handleMove(t,Ep(Mv(_,this.referenceCoordinates),O))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(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()}}gR.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=gV,onActivation:a}=t,{active:o}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];function g7(e){return Boolean(e&&"distance"in e)}function m7(e){return Boolean(e&&"delay"in e)}class mR{constructor(t,r,n){var a;n===void 0&&(n=PIe(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=F0(s),this.documentListeners=new _m(this.document),this.listeners=new _m(n),this.windowListeners=new _m(Qs(s)),this.initialCoordinates=(a=VS(o))!=null?a:bu,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(Ml.Resize,this.handleCancel),this.windowListeners.add(Ml.DragStart,p7),this.windowListeners.add(Ml.VisibilityChange,this.handleCancel),this.windowListeners.add(Ml.ContextMenu,p7),this.documentListeners.add(Ml.Keydown,this.handleKeydown),r){if(g7(r))return;if(m7(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(Ml.Click,OIe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ml.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:a,props:o}=this,{onMove:s,options:{activationConstraint:l}}=o;if(!a)return;const c=(r=VS(t))!=null?r:bu,p=Mv(a,c);if(!n&&l){if(m7(l))return b6(p,l.tolerance)?this.handleCancel():void 0;if(g7(l))return l.tolerance!=null&&b6(p,l.tolerance)?this.handleCancel():b6(p,l.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Xi.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const UIe={move:{name:"pointermove"},end:{name:"pointerup"}};class mV extends mR{constructor(t){const{event:r}=t,n=F0(r.target);super(t,UIe,n)}}mV.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const NIe={move:{name:"mousemove"},end:{name:"mouseup"}};var YS;(function(e){e[e.RightClick=2]="RightClick"})(YS||(YS={}));class vV extends mR{constructor(t){super(t,NIe,F0(t.event.target))}}vV.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===YS.RightClick?!1:(n?.({event:r}),!0)}}];const w6={move:{name:"touchmove"},end:{name:"touchend"}};class yV extends mR{constructor(t){super(t,w6)}static setup(){return window.addEventListener(w6.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(w6.move.name,t)};function t(){}}}yV.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:a}=r;return a.length>1?!1:(n?.({event:r}),!0)}}];var Sm;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Sm||(Sm={}));var jw;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jw||(jw={}));function LIe(e){let{acceleration:t,activator:r=Sm.Pointer,canScroll:n,draggingRect:a,enabled:o,interval:s=5,order:l=jw.TreeOrder,pointerCoordinates:c,scrollableAncestors:p,scrollableAncestorRects:m,delta:_,threshold:T}=e;const O=$Ie({delta:_,disabled:!o}),[A,M]=VTe(),B=ue.exports.useRef({x:0,y:0}),L=ue.exports.useRef({x:0,y:0}),U=ue.exports.useMemo(()=>{switch(r){case Sm.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Sm.DraggableRect:return a}},[r,a,c]),D=ue.exports.useRef(null),Y=ue.exports.useCallback(()=>{const Z=D.current;if(!Z)return;const ee=B.current.x*L.current.x,V=B.current.y*L.current.y;Z.scrollBy(ee,V)},[]),q=ue.exports.useMemo(()=>l===jw.TreeOrder?[...p].reverse():p,[l,p]);ue.exports.useEffect(()=>{if(!o||!p.length||!U){M();return}for(const Z of q){if(n?.(Z)===!1)continue;const ee=p.indexOf(Z),V=m[ee];if(!V)continue;const{direction:te,speed:R}=MIe(Z,V,U,t,T);for(const h of["x","y"])O[h][te[h]]||(R[h]=0,te[h]=0);if(R.x>0||R.y>0){M(),D.current=Z,A(Y,s),B.current=R,L.current=te;return}}B.current={x:0,y:0},L.current={x:0,y:0},M()},[t,Y,n,M,o,s,JSON.stringify(U),JSON.stringify(O),A,p,q,m,JSON.stringify(T)])}const DIe={x:{[za.Backward]:!1,[za.Forward]:!1},y:{[za.Backward]:!1,[za.Forward]:!1}};function $Ie(e){let{delta:t,disabled:r}=e;const n=KS(t);return Ky(a=>{if(r||!n||!a)return DIe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[za.Backward]:a.x[za.Backward]||o.x===-1,[za.Forward]:a.x[za.Forward]||o.x===1},y:{[za.Backward]:a.y[za.Backward]||o.y===-1,[za.Forward]:a.y[za.Forward]||o.y===1}}},[r,t,n])}function FIe(e,t){const r=t!==null?e.get(t):void 0,n=r?r.node.current:null;return Ky(a=>{var o;return t===null?null:(o=n??a)!=null?o:null},[n,t])}function jIe(e,t){return ue.exports.useMemo(()=>e.reduce((r,n)=>{const{sensor:a}=n,o=a.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...o]},[]),[e,t])}var Rv;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Rv||(Rv={}));var XS;(function(e){e.Optimized="optimized"})(XS||(XS={}));const v7=new Map;function WIe(e,t){let{dragging:r,dependencies:n,config:a}=t;const[o,s]=ue.exports.useState(null),{frequency:l,measure:c,strategy:p}=a,m=ue.exports.useRef(e),_=B(),T=Cv(_),O=ue.exports.useCallback(function(L){L===void 0&&(L=[]),!T.current&&s(U=>U===null?L:U.concat(L.filter(D=>!U.includes(D))))},[T]),A=ue.exports.useRef(null),M=Ky(L=>{if(_&&!r)return v7;if(!L||L===v7||m.current!==e||o!=null){const U=new Map;for(let D of e){if(!D)continue;if(o&&o.length>0&&!o.includes(D.id)&&D.rect.current){U.set(D.id,D.rect.current);continue}const Y=D.node.current,q=Y?new pR(c(Y),Y):null;D.rect.current=q,q&&U.set(D.id,q)}return U}return L},[e,o,r,_,c]);return ue.exports.useEffect(()=>{m.current=e},[e]),ue.exports.useEffect(()=>{_||O()},[r,_]),ue.exports.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),ue.exports.useEffect(()=>{_||typeof l!="number"||A.current!==null||(A.current=setTimeout(()=>{O(),A.current=null},l))},[l,_,O,...n]),{droppableRects:M,measureDroppableContainers:O,measuringScheduled:o!=null};function B(){switch(p){case Rv.Always:return!1;case Rv.BeforeDragging:return r;default:return!r}}}function bV(e,t){return Ky(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function zIe(e,t){return bV(e,t)}function HIe(e){let{callback:t,disabled:r}=e;const n=dR(t),a=ue.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return ue.exports.useEffect(()=>()=>a?.disconnect(),[a]),a}function g3(e){let{callback:t,disabled:r}=e;const n=dR(t),a=ue.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return ue.exports.useEffect(()=>()=>a?.disconnect(),[a]),a}function qIe(e){return new pR(j0(e),e)}function y7(e,t,r){t===void 0&&(t=qIe);const[n,a]=ue.exports.useReducer(l,null),o=HIe({callback(c){if(!!e)for(const p of c){const{type:m,target:_}=p;if(m==="childList"&&_ instanceof HTMLElement&&_.contains(e)){a();break}}}}),s=g3({callback:a});return yu(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),n;function l(c){if(!e)return null;if(e.isConnected===!1){var p;return(p=c??r)!=null?p:null}const m=t(e);return JSON.stringify(c)===JSON.stringify(m)?c:m}}function KIe(e){const t=bV(e);return lV(e,t)}const b7=[];function VIe(e){const t=ue.exports.useRef(e),r=Ky(n=>e?n&&n!==b7&&e&&t.current&&e.parentNode===t.current.parentNode?n:p3(e):b7,[e]);return ue.exports.useEffect(()=>{t.current=e},[e]),r}function GIe(e){const[t,r]=ue.exports.useState(null),n=ue.exports.useRef(e),a=ue.exports.useCallback(o=>{const s=y6(o.target);!s||r(l=>l?(l.set(s,GS(s)),new Map(l)):null)},[]);return ue.exports.useEffect(()=>{const o=n.current;if(e!==o){s(o);const l=e.map(c=>{const p=y6(c);return p?(p.addEventListener("scroll",a,{passive:!0}),[p,GS(p)]):null}).filter(c=>c!=null);r(l.length?new Map(l):null),n.current=e}return()=>{s(e),s(o)};function s(l){l.forEach(c=>{const p=y6(c);p?.removeEventListener("scroll",a)})}},[a,e]),ue.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Ep(o,s),bu):pV(e):bu,[e,t])}function w7(e,t){t===void 0&&(t=[]);const r=ue.exports.useRef(null);return ue.exports.useEffect(()=>{r.current=null},t),ue.exports.useEffect(()=>{const n=e!==bu;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Mv(e,r.current):bu}function YIe(e){ue.exports.useEffect(()=>{if(!h3)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function XIe(e,t){return ue.exports.useMemo(()=>e.reduce((r,n)=>{let{eventName:a,handler:o}=n;return r[a]=s=>{o(s,t)},r},{}),[e,t])}function wV(e){return ue.exports.useMemo(()=>e?_Ie(e):null,[e])}const x6=[];function QIe(e,t){t===void 0&&(t=j0);const[r]=e,n=wV(r?Qs(r):null),[a,o]=ue.exports.useReducer(l,x6),s=g3({callback:o});return e.length>0&&a===x6&&o(),yu(()=>{e.length?e.forEach(c=>s?.observe(c)):(s?.disconnect(),o())},[e]),a;function l(){return e.length?e.map(c=>dV(c)?n:new pR(t(c),c)):x6}}function ZIe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return qy(t)?t:e}function JIe(e){let{measure:t}=e;const[r,n]=ue.exports.useState(null),a=ue.exports.useCallback(p=>{for(const{target:m}of p)if(qy(m)){n(_=>{const T=t(m);return _?{..._,width:T.width,height:T.height}:T});break}},[t]),o=g3({callback:a}),s=ue.exports.useCallback(p=>{const m=ZIe(p);o?.disconnect(),m&&o?.observe(m),n(m?t(m):null)},[t,o]),[l,c]=$w(s);return ue.exports.useMemo(()=>({nodeRef:l,rect:r,setRef:c}),[r,l,c])}const ePe=[{sensor:mV,options:{}},{sensor:gR,options:{}}],tPe={current:{}},bb={draggable:{measure:h7},droppable:{measure:h7,strategy:Rv.WhileDragging,frequency:XS.Optimized},dragOverlay:{measure:j0}};class Em 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,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const rPe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Em,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Fw},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bb,measureDroppableContainers:Fw,windowRect:null,measuringScheduled:!1},nPe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Fw,draggableNodes:new Map,over:null,measureDroppableContainers:Fw},m3=ue.exports.createContext(nPe),xV=ue.exports.createContext(rPe);function iPe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Em}}}function oPe(e,t){switch(t.type){case Ia.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ia.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 Ia.DragEnd:case Ia.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ia.RegisterDroppable:{const{element:r}=t,{id:n}=r,a=new Em(e.droppable.containers);return a.set(n,r),{...e,droppable:{...e.droppable,containers:a}}}case Ia.SetDroppableDisabled:{const{id:r,key:n,disabled:a}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const s=new Em(e.droppable.containers);return s.set(r,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:s}}}case Ia.UnregisterDroppable:{const{id:r,key:n}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new Em(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function aPe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:a}=ue.exports.useContext(m3),o=KS(n),s=KS(r?.id);return ue.exports.useEffect(()=>{if(!t&&!n&&o&&s!=null){if(!hR(o)||document.activeElement===o.target)return;const l=a.get(s);if(!l)return;const{activatorNode:c,node:p}=l;if(!c.current&&!p.current)return;requestAnimationFrame(()=>{for(const m of[c.current,p.current]){if(!m)continue;const _=XTe(m);if(_){_.focus();break}}})}},[n,t,a,s,o]),null}function sPe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((a,o)=>o({transform:a,...n}),r):r}function lPe(e){return ue.exports.useMemo(()=>({draggable:{...bb.draggable,...e?.draggable},droppable:{...bb.droppable,...e?.droppable},dragOverlay:{...bb.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function uPe(e){let{activeNode:t,measure:r,initialRect:n,config:a=!0}=e;const o=ue.exports.useRef(!1),{x:s,y:l}=typeof a=="boolean"?{x:a,y:a}:a;yu(()=>{if(!s&&!l||!t){o.current=!1;return}if(o.current||!n)return;const p=t?.node.current;if(!p||p.isConnected===!1)return;const m=r(p),_=lV(m,n);if(s||(_.x=0),l||(_.y=0),o.current=!0,Math.abs(_.x)>0||Math.abs(_.y)>0){const T=uV(p);T&&T.scrollBy({top:_.y,left:_.x})}},[t,s,l,n,r])}const _V=ue.exports.createContext({...bu,scaleX:1,scaleY:1});var cf;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(cf||(cf={}));const cPe=ue.exports.memo(function(t){var r,n,a,o;let{id:s,accessibility:l,autoScroll:c=!0,children:p,sensors:m=ePe,collisionDetection:_=gIe,measuring:T,modifiers:O,...A}=t;const M=ue.exports.useReducer(oPe,void 0,iPe),[B,L]=M,[U,D]=aIe(),[Y,q]=ue.exports.useState(cf.Uninitialized),Z=Y===cf.Initialized,{draggable:{active:ee,nodes:V,translate:te},droppable:{containers:R}}=B,h=ee?V.get(ee):null,g=ue.exports.useRef({initial:null,translated:null}),v=ue.exports.useMemo(()=>{var gr;return ee!=null?{id:ee,data:(gr=h?.data)!=null?gr:tPe,rect:g}:null},[ee,h]),u=ue.exports.useRef(null),[f,y]=ue.exports.useState(null),[S,w]=ue.exports.useState(null),d=Cv(A,Object.values(A)),I=Vy("DndDescribedBy",s),$=ue.exports.useMemo(()=>R.getEnabled(),[R]),b=lPe(T),{droppableRects:X,measureDroppableContainers:we,measuringScheduled:Ae}=WIe($,{dragging:Z,dependencies:[te.x,te.y],config:b.droppable}),je=FIe(V,ee),Vt=ue.exports.useMemo(()=>S?VS(S):null,[S]),De=On(),Fe=zIe(je,b.draggable.measure);uPe({activeNode:ee?V.get(ee):null,config:De.layoutShiftCompensation,initialRect:Fe,measure:b.draggable.measure});const wt=y7(je,b.draggable.measure,Fe),Ke=y7(je?je.parentElement:null),ht=ue.exports.useRef({activatorEvent:null,active:null,activeNode:je,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:V,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),dr=R.getNodeFor((r=ht.current.over)==null?void 0:r.id),ae=JIe({measure:b.dragOverlay.measure}),Ve=(n=ae.nodeRef.current)!=null?n:je,Nt=Z?(a=ae.rect)!=null?a:wt:null,Ee=Boolean(ae.nodeRef.current&&ae.rect),xe=KIe(Ee?null:wt),ut=wV(Ve?Qs(Ve):null),st=VIe(Z?dr??je:null),_t=QIe(st),Pt=sPe(O,{transform:{x:te.x-xe.x,y:te.y-xe.y,scaleX:1,scaleY:1},activatorEvent:S,active:v,activeNodeRect:wt,containerNodeRect:Ke,draggingNodeRect:Nt,over:ht.current.over,overlayNodeRect:ae.rect,scrollableAncestors:st,scrollableAncestorRects:_t,windowRect:ut}),Ut=Vt?Ep(Vt,te):null,ve=GIe(st),ye=w7(ve),me=w7(ve,[wt]),Q=Ep(Pt,ye),j=Nt?yIe(Nt,Pt):null,F=v&&j?_({active:v,collisionRect:j,droppableRects:X,droppableContainers:$,pointerCoordinates:Ut}):null,ie=sV(F,"id"),[de,pe]=ue.exports.useState(null),be=Ee?Pt:Ep(Pt,me),Gt=mIe(be,(o=de?.rect)!=null?o:null,wt),Lt=ue.exports.useCallback((gr,mr)=>{let{sensor:gt,options:Pr}=mr;if(u.current==null)return;const kr=V.get(u.current);if(!kr)return;const ai=gr.nativeEvent,$r=new gt({active:u.current,activeNode:kr,event:ai,options:Pr,context:ht,onStart(Ti){const Wr=u.current;if(Wr==null)return;const Dr=V.get(Wr);if(!Dr)return;const{onDragStart:ho}=d.current,fe={active:{id:Wr,data:Dr.data,rect:g}};Al.exports.unstable_batchedUpdates(()=>{ho?.(fe),q(cf.Initializing),L({type:Ia.DragStart,initialCoordinates:Ti,active:Wr}),U({type:"onDragStart",event:fe})})},onMove(Ti){L({type:Ia.DragMove,coordinates:Ti})},onEnd:Hr(Ia.DragEnd),onCancel:Hr(Ia.DragCancel)});Al.exports.unstable_batchedUpdates(()=>{y($r),w(gr.nativeEvent)});function Hr(Ti){return async function(){const{active:Dr,collisions:ho,over:fe,scrollAdjustedTranslate:Me}=ht.current;let Be=null;if(Dr&&Me){const{cancelDrop:J}=d.current;Be={activatorEvent:ai,active:Dr,collisions:ho,delta:Me,over:fe},Ti===Ia.DragEnd&&typeof J=="function"&&await Promise.resolve(J(Be))&&(Ti=Ia.DragCancel)}u.current=null,Al.exports.unstable_batchedUpdates(()=>{L({type:Ti}),q(cf.Uninitialized),pe(null),y(null),w(null);const J=Ti===Ia.DragEnd?"onDragEnd":"onDragCancel";if(Be){const Te=d.current[J];Te?.(Be),U({type:J,event:Be})}})}}},[V]),Tt=ue.exports.useCallback((gr,mr)=>(gt,Pr)=>{const kr=gt.nativeEvent,ai=V.get(Pr);if(u.current!==null||!ai||kr.dndKit||kr.defaultPrevented)return;const $r={active:ai};gr(gt,mr.options,$r)===!0&&(kr.dndKit={capturedBy:mr.sensor},u.current=Pr,Lt(gt,mr))},[V,Lt]),yr=jIe(m,Tt);YIe(m),yu(()=>{wt&&Y===cf.Initializing&&q(cf.Initialized)},[wt,Y]),ue.exports.useEffect(()=>{const{onDragMove:gr}=d.current,{active:mr,activatorEvent:gt,collisions:Pr,over:kr}=ht.current;if(!mr||!gt)return;const ai={active:mr,activatorEvent:gt,collisions:Pr,delta:{x:Q.x,y:Q.y},over:kr};Al.exports.unstable_batchedUpdates(()=>{gr?.(ai),U({type:"onDragMove",event:ai})})},[Q.x,Q.y]),ue.exports.useEffect(()=>{const{active:gr,activatorEvent:mr,collisions:gt,droppableContainers:Pr,scrollAdjustedTranslate:kr}=ht.current;if(!gr||u.current==null||!mr||!kr)return;const{onDragOver:ai}=d.current,$r=Pr.get(ie),Hr=$r&&$r.rect.current?{id:$r.id,rect:$r.rect.current,data:$r.data,disabled:$r.disabled}:null,Ti={active:gr,activatorEvent:mr,collisions:gt,delta:{x:kr.x,y:kr.y},over:Hr};Al.exports.unstable_batchedUpdates(()=>{pe(Hr),ai?.(Ti),U({type:"onDragOver",event:Ti})})},[ie]),yu(()=>{ht.current={activatorEvent:S,active:v,activeNode:je,collisionRect:j,collisions:F,droppableRects:X,draggableNodes:V,draggingNode:Ve,draggingNodeRect:Nt,droppableContainers:R,over:de,scrollableAncestors:st,scrollAdjustedTranslate:Q},g.current={initial:Nt,translated:j}},[v,je,F,j,V,Ve,Nt,X,R,de,st,Q]),LIe({...De,delta:te,draggingRect:j,pointerCoordinates:Ut,scrollableAncestors:st,scrollableAncestorRects:_t});const zt=ue.exports.useMemo(()=>({active:v,activeNode:je,activeNodeRect:wt,activatorEvent:S,collisions:F,containerNodeRect:Ke,dragOverlay:ae,draggableNodes:V,droppableContainers:R,droppableRects:X,over:de,measureDroppableContainers:we,scrollableAncestors:st,scrollableAncestorRects:_t,measuringConfiguration:b,measuringScheduled:Ae,windowRect:ut}),[v,je,wt,S,F,Ke,ae,V,R,X,de,we,st,_t,b,Ae,ut]),Ht=ue.exports.useMemo(()=>({activatorEvent:S,activators:yr,active:v,activeNodeRect:wt,ariaDescribedById:{draggable:I},dispatch:L,draggableNodes:V,over:de,measureDroppableContainers:we}),[S,yr,v,wt,L,I,V,de,we]);return $t(iV.Provider,{value:D,children:[$t(m3.Provider,{value:Ht,children:[ne(xV.Provider,{value:zt,children:ne(_V.Provider,{value:Gt,children:p})}),ne(aPe,{disabled:l?.restoreFocus===!1})]}),ne(uIe,{...l,hiddenTextDescribedById:I})]});function On(){const gr=f?.autoScrollEnabled===!1,mr=typeof c=="object"?c.enabled===!1:c===!1,gt=Z&&!gr&&!mr;return typeof c=="object"?{...c,enabled:gt}:{enabled:gt}}}),fPe=ue.exports.createContext(null),x7="button",dPe="Droppable";function hPe(e){let{id:t,data:r,disabled:n=!1,attributes:a}=e;const o=Vy(dPe),{activators:s,activatorEvent:l,active:c,activeNodeRect:p,ariaDescribedById:m,draggableNodes:_,over:T}=ue.exports.useContext(m3),{role:O=x7,roleDescription:A="draggable",tabIndex:M=0}=a??{},B=c?.id===t,L=ue.exports.useContext(B?_V:fPe),[U,D]=$w(),[Y,q]=$w(),Z=XIe(s,t),ee=Cv(r);yu(()=>(_.set(t,{id:t,key:o,node:U,activatorNode:Y,data:ee}),()=>{const te=_.get(t);te&&te.key===o&&_.delete(t)}),[_,t]);const V=ue.exports.useMemo(()=>({role:O,tabIndex:M,"aria-disabled":n,"aria-pressed":B&&O===x7?!0:void 0,"aria-roledescription":A,"aria-describedby":m.draggable}),[n,O,M,B,A,m.draggable]);return{active:c,activatorEvent:l,activeNodeRect:p,attributes:V,isDragging:B,listeners:n?void 0:Z,node:U,over:T,setNodeRef:D,setActivatorNodeRef:q,transform:L}}function pPe(){return ue.exports.useContext(xV)}const gPe="Droppable",mPe={timeout:25};function vPe(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:a}=e;const o=Vy(gPe),{active:s,dispatch:l,over:c,measureDroppableContainers:p}=ue.exports.useContext(m3),m=ue.exports.useRef({disabled:r}),_=ue.exports.useRef(!1),T=ue.exports.useRef(null),O=ue.exports.useRef(null),{disabled:A,updateMeasurementsFor:M,timeout:B}={...mPe,...a},L=Cv(M??n),U=ue.exports.useCallback(()=>{if(!_.current){_.current=!0;return}O.current!=null&&clearTimeout(O.current),O.current=setTimeout(()=>{p(Array.isArray(L.current)?L.current:[L.current]),O.current=null},B)},[B]),D=g3({callback:U,disabled:A||!s}),Y=ue.exports.useCallback((V,te)=>{!D||(te&&(D.unobserve(te),_.current=!1),V&&D.observe(V))},[D]),[q,Z]=$w(Y),ee=Cv(t);return ue.exports.useEffect(()=>{!D||!q.current||(D.disconnect(),_.current=!1,D.observe(q.current))},[q,D]),yu(()=>(l({type:Ia.RegisterDroppable,element:{id:n,key:o,disabled:r,node:q,rect:T,data:ee}}),()=>l({type:Ia.UnregisterDroppable,key:o,id:n})),[n]),ue.exports.useEffect(()=>{r!==m.current.disabled&&(l({type:Ia.SetDroppableDisabled,id:n,key:o,disabled:r}),m.current.disabled=r)},[n,o,r,l]),{active:s,rect:T,isOver:c?.id===n,node:q,over:c,setNodeRef:Z}}function SV(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function yPe(e,t){return e.reduce((r,n,a)=>{const o=t.get(n);return o&&(r[a]=o),r},Array(e.length))}function K1(e){return e!==null&&e>=0}function bPe(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:n,index:a}=e;const o=SV(t,n,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}},V1={scaleX:1,scaleY:1},xPe=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:a,rects:o,overIndex:s}=e;const l=(t=o[r])!=null?t:n;if(!l)return null;if(a===r){const p=o[s];return p?{x:0,y:rr&&a<=s?{x:0,y:-l.height-c,...V1}:a=s?{x:0,y:l.height+c,...V1}:{x:0,y:0,...V1}};function _Pe(e,t,r){const n=e[t],a=e[t-1],o=e[t+1];return n?rn.map(Z=>typeof Z=="object"&&"id"in Z?Z.id:Z),[n]),A=s!=null,M=s?O.indexOf(s.id):-1,B=p?O.indexOf(p.id):-1,L=ue.exports.useRef(O),U=!bPe(O,L.current),D=B!==-1&&M===-1||U,Y=wPe(o);yu(()=>{U&&A&&m(O)},[U,O,A,m]),ue.exports.useEffect(()=>{L.current=O},[O]);const q=ue.exports.useMemo(()=>({activeIndex:M,containerId:_,disabled:Y,disableTransforms:D,items:O,overIndex:B,useDragOverlay:T,sortedRects:yPe(O,c),strategy:a}),[M,_,Y.draggable,Y.droppable,D,O,B,c,T,a]);return ne(MV.Provider,{value:q,children:t})}const EPe=e=>{let{id:t,items:r,activeIndex:n,overIndex:a}=e;return SV(r,n,a).indexOf(t)},CPe=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:a,items:o,newIndex:s,previousItems:l,previousContainerId:c,transition:p}=e;return!p||!n||l!==o&&a===s?!1:r?!0:s!==a&&t===c},MPe={duration:200,easing:"ease"},kV="transform",kPe=kv.Transition.toString({property:kV,duration:0,easing:"linear"}),RPe={roleDescription:"sortable"};function APe(e){let{disabled:t,index:r,node:n,rect:a}=e;const[o,s]=ue.exports.useState(null),l=ue.exports.useRef(r);return yu(()=>{if(!t&&r!==l.current&&n.current){const c=a.current;if(c){const p=j0(n.current,{ignoreTransform:!0}),m={x:c.left-p.left,y:c.top-p.top,scaleX:c.width/p.width,scaleY:c.height/p.height};(m.x||m.y)&&s(m)}}r!==l.current&&(l.current=r)},[t,r,n,a]),ue.exports.useEffect(()=>{o&&s(null)},[o]),o}function RV(e){let{animateLayoutChanges:t=CPe,attributes:r,disabled:n,data:a,getNewIndex:o=EPe,id:s,strategy:l,resizeObserverConfig:c,transition:p=MPe}=e;const{items:m,containerId:_,activeIndex:T,disabled:O,disableTransforms:A,sortedRects:M,overIndex:B,useDragOverlay:L,strategy:U}=ue.exports.useContext(MV),D=TPe(n,O),Y=m.indexOf(s),q=ue.exports.useMemo(()=>({sortable:{containerId:_,index:Y,items:m},...a}),[_,a,Y,m]),Z=ue.exports.useMemo(()=>m.slice(m.indexOf(s)),[m,s]),{rect:ee,node:V,isOver:te,setNodeRef:R}=vPe({id:s,data:q,disabled:D.droppable,resizeObserverConfig:{updateMeasurementsFor:Z,...c}}),{active:h,activatorEvent:g,activeNodeRect:v,attributes:u,setNodeRef:f,listeners:y,isDragging:S,over:w,setActivatorNodeRef:d,transform:I}=hPe({id:s,data:q,attributes:{...RPe,...r},disabled:D.draggable}),$=qTe(R,f),b=Boolean(h),X=b&&!A&&K1(T)&&K1(B),we=!L&&S,Ae=we&&X?I:null,Vt=X?Ae??(l??U)({rects:M,activeNodeRect:v,activeIndex:T,overIndex:B,index:Y}):null,De=K1(T)&&K1(B)?o({id:s,items:m,activeIndex:T,overIndex:B}):Y,Fe=h?.id,wt=ue.exports.useRef({activeId:Fe,items:m,newIndex:De,containerId:_}),Ke=m!==wt.current.items,ht=t({active:h,containerId:_,isDragging:S,isSorting:b,id:s,index:Y,items:m,newIndex:wt.current.newIndex,previousItems:wt.current.items,previousContainerId:wt.current.containerId,transition:p,wasDragging:wt.current.activeId!=null}),dr=APe({disabled:!ht,index:Y,node:V,rect:ee});return ue.exports.useEffect(()=>{b&&wt.current.newIndex!==De&&(wt.current.newIndex=De),_!==wt.current.containerId&&(wt.current.containerId=_),m!==wt.current.items&&(wt.current.items=m)},[b,De,_,m]),ue.exports.useEffect(()=>{if(Fe===wt.current.activeId)return;if(Fe&&!wt.current.activeId){wt.current.activeId=Fe;return}const Ve=setTimeout(()=>{wt.current.activeId=Fe},50);return()=>clearTimeout(Ve)},[Fe]),{active:h,activeIndex:T,attributes:u,data:q,rect:ee,index:Y,newIndex:De,items:m,isOver:te,isSorting:b,isDragging:S,listeners:y,node:V,overIndex:B,over:w,setNodeRef:$,setActivatorNodeRef:d,setDroppableNodeRef:R,setDraggableNodeRef:f,transform:dr??Vt,transition:ae()};function ae(){if(dr||Ke&&wt.current.newIndex===Y)return kPe;if(!(we&&!hR(g)||!p)&&(b||ht))return kv.Transition.toString({...p,property:kV})}}function TPe(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(n=e?.droppable)!=null?n:t.droppable}}function Ww(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 IPe=[Xi.Down,Xi.Right,Xi.Up,Xi.Left],PPe=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:a,droppableContainers:o,over:s,scrollableAncestors:l}}=t;if(IPe.includes(e.code)){if(e.preventDefault(),!r||!n)return;const c=[];o.getEnabled().forEach(_=>{if(!_||_!=null&&_.disabled)return;const T=a.get(_.id);if(!!T)switch(e.code){case Xi.Down:n.topT.top&&c.push(_);break;case Xi.Left:n.left>T.left&&c.push(_);break;case Xi.Right:n.left1&&(m=p[1].id),m!=null){const _=o.get(r.id),T=o.get(m),O=T?a.get(T.id):null,A=T?.node.current;if(A&&O&&_&&T){const B=p3(A).some((Z,ee)=>l[ee]!==Z),L=AV(_,T),U=OPe(_,T),D=B||!L?{x:0,y:0}:{x:U?n.width-O.width:0,y:U?n.height-O.height:0},Y={x:O.left,y:O.top};return D.x&&D.y?Y:Mv(Y,D)}}}};function AV(e,t){return!Ww(e)||!Ww(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function OPe(e,t){return!Ww(e)||!Ww(t)||!AV(e,t)?!1:e.data.current.sortable.indext(!0),a=()=>t(!1);return ue.exports.useEffect(()=>{const o=r.current;if(o)return o.addEventListener("mouseover",n),o.addEventListener("mouseout",a),()=>{o.removeEventListener("mouseover",n),o.removeEventListener("mouseout",a)}},[r.current]),{hoverRef:r,isHover:e}}const UPe="/assets/delete.42fb1897.svg",NPe="/assets/dnd.dcf4594c.svg",LPe=ao("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"}}),vs=ao(HC)({border:"none",padding:0}),Xh=ao(HC)({fontWeight:700}),ru=ao("hr")({display:"block",width:"100%",height:1,backgroundColor:"#ccc",border:"none"}),DPe=e=>e.replace(/\/+/g,"/").replace(/^\/[^\/]/,"").replace(/\/$/,"");function _7({file:e,pos:t,isHover:r}){const n=e.fileObj.name,{attributes:a,listeners:o}=RV({id:n}),s=_a(),l=ga(s.breakpoints.down("lg")),{setInclueInCommand:c,setDirectory:p,removeFile:m}=oc(),{data:_}=ac(),T=!!_?.result?.msgCell;return $t(No,{children:[ne(vs,{sx:{paddingLeft:1},...a,...o,children:$t(Vn,{sx:{color:"#D8D8D8"},children:[t,".",ne(Vn,{ml:5,style:{cursor:"pointer",visibility:r?"visible":"hidden"},children:ne("img",{src:NPe,alt:"Drag n drop icon",width:24,height:24})})]})}),ne(vs,{children:ne(LPe,{disabled:T,value:e.folder,onBlur:O=>{p(n,DPe(O.target.value))},onChange:O=>{p(n,O.target.value)}})}),ne(vs,{sx:{paddingLeft:l?2:0},children:$t(Vn,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"flex-start"},children:[ne(Fo,{sx:{fontSize:14},children:e.fileObj.name}),$t(Fo,{sx:{fontSize:12,color:"#C1C1C1"},children:[e.fileObj.size," bytes"]})]})}),ne(vs,{children:ne(Lfe,{disabled:T,checked:e.includeInCommand,onChange:O=>{c(n,O.target.checked)}})}),ne(vs,{align:"right",children:ne(gl,{sx:{visibility:r?"visible":"hidden",opacity:.5,cursor:"pointer",marginRight:1},onClick:()=>{m(n)},children:ne("img",{src:UPe,alt:"Delete icon",width:18,height:18})})})]})}function $Pe({file:e,pos:t}){const r=e.fileObj.name,{hoverRef:n,isHover:a}=BPe(),{data:o}=ac(),s=!!o?.result?.msgCell,{setNodeRef:l,transform:c,transition:p,isDragging:m}=RV({id:r}),_={transform:kv.Transform.toString(c),transition:p};return s?ne(Oc,{sx:{height:60},children:ne(_7,{file:e,pos:t,isDragging:!1,isHover:!1})}):ne(Oc,{sx:{height:60,transition:".15s all","&:hover":{background:"#FAFAFA"}},ref:T=>{l(T),n.current=T},style:_,children:ne(_7,{file:e,pos:t,isDragging:m,isHover:a})},r)}function FPe(){const{files:e,reorderFiles:t}=oc(),{data:r}=ac(),n=_a(),a=ga(n.breakpoints.down("lg")),o=!!r?.result?.msgCell,s=cIe(v6(vV,{}),v6(yV,{}),v6(gR,{coordinateGetter:PPe}));function l(c){const{active:p,over:m}=c;p.id!==m.id&&t(p.id,m.id)}return ne(cPe,{sensors:s,collisionDetection:dIe,onDragEnd:l,modifiers:[JTe,ZTe],children:ne(gde,{children:$t(WC,{sx:{minWidth:650},children:[$t(BD,{sx:{"&.MuiTableHead-root th":{border:"none"}},children:[$t(Oc,{sx:{fontWeight:700},children:[ne(Xh,{sx:{paddingLeft:0,paddingBottom:a?0:2,width:100},children:"Order"}),ne(Xh,{sx:{paddingLeft:0,paddingBottom:a?0:2},children:"Directory"}),ne(Xh,{sx:{paddingLeft:a?2:0,width:300,paddingBottom:a?0:2},children:"File"}),ne(Xh,{sx:{paddingLeft:0,width:150,paddingBottom:a?0:2},children:"Include in command"}),ne(Xh,{sx:{paddingLeft:0,width:100,paddingBottom:a?0:2}})]}),$t(Oc,{children:[ne(vs,{sx:{paddingBottom:a?0:2},children:ne(ru,{})}),ne(vs,{sx:{paddingBottom:a?0:2},children:ne(ru,{})}),ne(vs,{sx:{paddingBottom:a?0:2},children:ne(ru,{})}),ne(vs,{sx:{paddingBottom:a?0:2},children:ne(ru,{})}),ne(vs,{sx:{paddingBottom:a?0:2},children:ne(ru,{})})]})]}),ne(zC,{children:ne(SPe,{disabled:o,items:e.map(c=>c.fileObj.name),strategy:xPe,children:e.map((c,p)=>ne($Pe,{file:c,pos:p+1},c.fileObj.name))})})]})})})}const _6=ao(yD)({flexGrow:1}),S6=ao(ID)(({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"}})),G1=ao(bD)(({theme:e})=>({color:"#000",fontSize:12,marginLeft:e.spacing(1),marginBottom:e.spacing(1)})),jPe=ao("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"}})),WPe="/assets/undo.944d3e45.svg";function zPe(){const{compilerSettings:e,setOverrideCommandLine:t,setFuncCliVersion:r,setTactCliVersion:n,compiler:a,setCompiler:o}=Y8(),{data:s}=ac(),l=_a(),c=ga(l.breakpoints.down("md")),p=!!s?.result?.msgCell,{data:{funcVersions:m,tactVersions:_}}=G8();return $t(wa,{mt:4,children:[ne(Fo,{variant:"h5",style:{fontWeight:800,fontSize:16,marginBottom:16},children:"Compiler"}),$t(Vn,{sx:{gap:1,alignItems:c?"center":"flex-end",flexDirection:c?"column":"inherit"},children:[ne(Vn,{mb:c?1:0,sx:{width:c?"100%":"inherit"},children:$t(_6,{children:[ne(G1,{children:"Compiler"}),$t(S6,{value:a,onChange:T=>{o(T.target.value)},children:[ne(ug,{value:"func",children:"func"}),ne(ug,{value:"tact",children:"tact"}),{}.VITE_ALLOW_FIFT&&ne(ug,{value:"fift",children:"fift"})]})]})}),a==="func"&&$t(No,{children:[ne(Vn,{mb:c?1:0,sx:{width:c?"100%":"inherit"},children:$t(_6,{disabled:p,children:[ne(G1,{children:"Version"}),ne(S6,{value:e.funcVersion,onChange:T=>{r(T.target.value)},children:m?.map(T=>ne(ug,{value:T,children:T},T))})]})}),$t(wa,{sx:{width:"100%",position:"relative"},children:[ne(G1,{sx:{display:"block"},children:"Func command"}),ne(jPe,{disabled:p,value:e.commandLine,onChange:T=>{t(T.target.value)}}),ne(fse,{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&&ne(gl,{sx:{color:"blue",position:"absolute",right:10,top:31},onClick:()=>{t(null)},children:ne("img",{src:WPe,alt:"Undo icon",width:15,height:15})})]})]}),a==="tact"&&ne(No,{children:ne(Vn,{mb:c?1:0,sx:{width:c?"100%":"inherit"},children:$t(_6,{disabled:p,children:[ne(G1,{children:"Version"}),ne(S6,{value:e.tactVersion,disabled:!0,children:_?.map(T=>ne(ug,{value:T,children:T},T))})]})})})]})]})}const HPe="/assets/reorder-hint.5f3a54fb.svg",qPe="/assets/light-bulb.7768be40.svg",TV="/assets/like.af7e7b33.svg",KPe=ur(Tn)({maxWidth:1160,width:"calc(100% - 50px)",margin:"auto"}),VPe=ur(Tn)({display:"flex",justifyContent:"space-between",height:73}),GPe=ur(Tn)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),YPe=ur(Tn)(({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`}}})),XPe=ur("hr")({height:"1px",backgroundColor:"#e6e6e6",border:"none"}),S7=ur(Sc)(({theme:e})=>({display:"inline-flex",alignItems:"center",color:"inherit",textDecoration:"none",[e.breakpoints.down("md")]:{justifyContent:"flex-end"}})),Gy=ur(Tn)({display:"flex",justifyContent:"center",alignItems:"center"}),QPe=ur(Gy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"100%",flex:2,order:3}})),IV=ur(Gy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"50%"}})),ZPe=ur(IV)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"start"},[e.breakpoints.down("sm")]:{minWidth:100}})),JPe=ur(IV)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"end"},[e.breakpoints.down("sm")]:{minWidth:100}})),eOe="/assets/heart.52fe96d0.svg",tOe="/assets/orbs.eb35e74b.svg",rOe="/assets/telegram.bcba2ca3.svg",nOe="/assets/telegram-hover.72b9d3ce.svg",iOe="/assets/github-footer.0bd3bbab.svg",oOe="/assets/github-hover.33daf3ef.svg",E7=ur(Tn)(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"}})),C7=({iconUrl:e,hoveredIconUrl:t,link:r})=>r.length?ne(Sc,{target:"_blank",href:r,children:ne(E7,{iconUrl:e,hoveredIconUrl:t})}):ne(E7,{iconUrl:e,hoveredIconUrl:t,disabled:!0});function PV(){const e=tC(),[t,r]=h2();return()=>{t.has("testnet")?t.delete("testnet"):t.append("testnet",""),r(t),e(0)}}function vR(){const e=PV();return ne(Tn,{sx:{background:"red",color:"white",py:2},children:$t(f3,{sx:{gap:4,px:4},children:[ne(Fo,{sx:{fontWeight:"bold",flexGrow:1},children:"Testnet"}),ne(Fo,{onClick:()=>{e()},sx:{cursor:"pointer"},children:"Switch to mainnet"})]})})}const QS="https://t.me/tonverifier";function zw(){const e=ga("(max-width: 450px)"),t=jc(),r=PV();return $t(KPe,{children:[$t(VPe,{mb:e?5:"inherit",sx:{flexDirection:e?"column":"inherit",alignItems:e?"center":"inherit"},children:[ne(Vn,{children:$t(ah,{sx:{color:"#000"},onClick:()=>t("/"),children:[ne("img",{src:p2,alt:"App icon",width:30,height:30}),ne(P_,{children:"TON VERIFIER"})]})}),$t(GPe,{children:[ne(C7,{iconUrl:rOe,hoveredIconUrl:nOe,link:QS}),ne(C7,{iconUrl:iOe,hoveredIconUrl:oOe,link:"https://github.com/orbs-network/ton-contract-verifier"})]})]}),ne(XPe,{}),$t(YPe,{children:[ne(ZPe,{children:ne(Fo,{variant:"body2",children:"\xA9 2023"})}),ne(QPe,{children:$t(Vn,{sx:{gap:.1},children:["Contributed with",ne(Vn,{mx:.4,children:ne("img",{src:eOe,alt:"Heart",width:12,height:12})}),"by",ne(Vn,{mx:.4,children:ne("img",{src:tOe,alt:"Orbs logo",width:12,height:12})}),ne(S7,{sx:{color:"#5E75E8"},target:"_blank",href:"https://orbs.com/powered-by",children:"Orbs"})]})}),$t(JPe,{children:[ne(S7,{target:"_blank",href:QS,children:ne(Fo,{variant:"body2",children:"Support"})}),!window.isTestnet&&ne(Fo,{onClick:()=>{r()},sx:{ml:2,cursor:"pointer"},variant:"body2",children:"Switch to Testnet"})]})]})]})}const aOe=ur("li")({maxWidth:650,fontSize:14,fontWeight:400,marginBottom:10});function sOe(e,t){switch(e){case Za.ENTRYPOINT_MISSING:return"There usually should be at least one file containing an entrypoint (recv_internal, main)";case Za.STDLIB_ORDER:return"stdlib.fc should usually be the first file in the list (unless it's imported from another file)";case Za.STDLIB_MISSING:return"You can try to add stdlib.fc to your sources.";case Za.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 Za.FILE_ORDER:return"Make sure all files in the command line are in the correct order";case Za.COMPILER_VERSION:return"Try to use the same compiler version as the contract was compiled with";case Za.REQUIRED_FILES:return"Make sure all required files are included in the command line";case Za.SUPPORT_GROUP:return $t("div",{children:["If you are still facing issues, you can use the"," ",ne(Sc,{target:"_blank",href:QS,sx:{textDecoration:"none",cursor:"pointer"},children:"Telegram support group"})]})}}const lOe=({hint:e})=>{const{data:t}=ac();return ne(aOe,{children:sOe(e,t?.result.compileResult)})},Kf=ur(Fo)({fontSize:14,fontWeight:400,marginBottom:"10px"}),M7=ur(Fo)({fontSize:14,fontWeight:700}),OV=ur(Fo)({fontSize:14,fontWeight:400}),k7=ur(Vn)({padding:"20px 30px",paddingLeft:0,"&:hover":{background:"transparent"}}),R7=ur(RK)({minWidth:200,fontSize:14,fontWeight:600}),uOe=ur(wa)({borderBottom:"1px solid rgba(0, 0, 0, 0.2)"}),A7=ur(AK)({color:"#000",fontSize:14,fontWeight:400});function cOe(){const{data:e,error:t}=ac(),{data:r}=Eh(),n=e?.result?.compileResult,a=e?.hints??[];return $t(wa,{my:3,children:[["similar"].includes(n?.result??"")&&ne(js,{singleLine:!0,type:Rs.SUCCESS,title:$t(Vn,{sx:{height:42},children:[ne(Vn,{mr:1,children:ne("img",{src:TV,alt:"Like icon",width:31,height:31})}),$t(OV,{children:[" ",ne("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:ne(wa,{})}),["not_similar"].includes(n?.result??"")&&ne(js,{type:Rs.ERROR,title:$t(Vn,{children:[ne(Vn,{mr:1,children:ne("img",{src:HPe,alt:"Reorder icon",width:39,height:26})}),ne(M7,{children:"Hashes are not similar"})]}),notificationBody:$t(wa,{sx:{display:"flex",flexDirection:"column"},children:[$t(k7,{children:[ne(R7,{children:"Contract hash"}),ne(A7,{children:r?.codeCellHash.base64??"-"})]}),ne(uOe,{}),$t(k7,{children:[ne(R7,{children:"Compile output hash"}),ne(A7,{children:n?.hash??"-"})]})]})}),n?.error&&ne(js,{type:Rs.ERROR,title:$t(Kf,{children:[ne("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:ne(wa,{sx:{overflow:"auto",maxHeight:300},children:ne("div",{children:ne("code",{children:n.error})})})}),!!t&&ne(js,{type:Rs.ERROR,title:$t(Kf,{children:[ne("span",{style:{color:"#FC5656"},children:"Error: "}),"Server error"]}),notificationBody:ne(wa,{sx:{overflow:"auto",maxHeight:300},children:ne("div",{children:ne("code",{children:t.toString()})})})}),a.length>0&&ne(js,{type:Rs.HINT,title:$t(Vn,{mb:2,children:[ne(Vn,{mr:1,children:ne("img",{src:qPe,alt:"Light bulb icon",width:21,height:22})}),ne(M7,{children:"Possible reasons for failure"})]}),notificationBody:ne("ul",{style:{paddingLeft:25},children:a.map(o=>ne(lOe,{hint:o},o))})})]})}function yR(){const[e]=r3();return ne(ns,{background:"#1976d2",hoverBackground:"#156cc2",height:37,fontSize:14,fontWeight:700,textColor:"#fff",type:"button",onClick:()=>e.connectWallet(),children:"Connect wallet"})}const fOe=ao(wa)({padding:"15px 24px"});function dOe(){const e=n3(),{hasFiles:t}=oc(),{step:r,proceedToPublish:n,toggleSection:a,currentSection:o}=d3(),{mutate:s,data:l,error:c,isLoading:p,compileStatus:m}=ac(),_=!!l?.result?.msgCell,T=()=>a(xc.SOURCES);return $t(h0,{children:[ne(wa,{sx:{cursor:r===Cc.PUBLISH&&_?"pointer":"inherit"},onClick:T,children:ne(HTe,{})}),o===xc.SOURCES&&ne(Wv,{in:o===xc.SOURCES,children:ne(fOe,{children:$t(No,{children:[t()&&$t(No,{children:[ne(FPe,{}),ne(zPe,{})]}),(l||c)&&ne(cOe,{}),t()&&ne(Vn,{sx:{justifyContent:"center"},mt:3,mb:"9px",children:e?l?.result?.msgCell?ne(ns,{disabled:r===Cc.PUBLISH,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:n,children:"Ready to publish"}):$t(ns,{disabled:!t(),fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(null)},children:[p&&ne(ux,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Compile"]}):ne(yR,{})})]})})})]})}const hOe=ur(sx)({borderRadius:40,fontFamily:"inherit",fontWeight:700,textTransform:"none",background:"#0088CC","&:disabled":{backgroundColor:"#e0e0e0"}});function Cp(e){return ne(hOe,{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 pOe="/assets/publish.83df630b.svg";function gOe(){const{data:e}=ac(),{sendTXN:t,status:r,clearTXN:n}=tK(),{step:a,toggleSection:o,currentSection:s}=d3();oc();const l=!!e?.result?.msgCell;let c;const p=()=>a===Cc.PUBLISH&&l&&o(xc.PUBLISH);switch(r){case"initial":c=ne("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":c="Transaction rejected, please retry.";break;case"pending":c="Check your wallet for a pending transaction.";break;case"issued":c="Transaction issued, monitoring proof deployment on-chain.";break;case"success":c="Your contract is now verified! Click below to view it.";break;case"expired":c="Transaction expired, please retry.";break;case"error":c="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 $t(h0,{mb:6,children:[$t(Vn,{p:s===xc.PUBLISH?"30px 24px 0 24px":"20px 24px",onClick:p,sx:{opacity:a===Cc.PUBLISH&&l?1:.25,cursor:a===Cc.PUBLISH&&l?"pointer":"inherit"},children:[ne(p0,{children:ne("img",{src:r==="success"?rV:pOe,alt:"publish icon",width:41,height:41})}),ne(Qf,{children:"Publish"})]}),s===xc.PUBLISH&&l&&ne(Wv,{in:s===xc.PUBLISH,children:$t(wa,{children:[ne(wa,{sx:{padding:"0 30px"},children:ne(js,{type:Rs.INFO,title:ne(No,{}),notificationBody:ne(Vn,{sx:{overflow:"auto",maxHeight:300},children:ne(Kf,{sx:{marginBottom:0},children:c})})})}),$t(Vn,{mb:3,sx:{justifyContent:"center"},children:[r!=="success"&&$t(ns,{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")&&ne(ux,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Publish"]}),r==="success"&&ne(Cp,{sx:{height:44},text:"View verified contract",onClick:()=>{location.reload()}})]})]})})]})}const mOe="/assets/verification-alert.0ebcec4f.svg",vOe="/assets/verification-binary.d6844d86.svg",yOe="/assets/verification-bomb.3bf48d9c.svg",bOe="/assets/verification-paper.34a39e79.svg",wOe="/assets/show.836c8f4f.svg",xOe="/assets/verification.fbd44dba.svg",_Oe=ao(gl)(()=>({color:"#000"})),SOe=ao(wa)({display:"flex",alignItems:"center",flexDirection:"column","& .title":{texAlign:"center",fontWeight:500,fontSize:20,marginBottom:20},"& .base-button":{height:40,marginTop:30}});function EOe({open:e,onClose:t,children:r,backgroundColor:n="rgba(48, 48, 48, 0.4)",blur:a=!0,className:o="",maxWidth:s,hideCloseButton:l,paddingTop:c}){return ne($C,{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:n}},children:$t(wa,{sx:{overflow:"scroll","::-webkit-scrollbar":{display:"none"}},children:[!l&&ne(wa,{sx:{display:"flex",justifyContent:"end",width:"100%"},children:ne(_Oe,{onClick:t,children:ne(l8,{style:{width:23,height:23}})})}),ne(SOe,{px:3,pb:3,pt:c?3:0,children:r})]})})}const COe="/assets/verification-popup.1a3fc640.svg",MOe=ur(WC)({overflow:"scroll",background:"#F7F9FB",borderRadius:"5px",width:"100%"}),kOe=ur(Tn)({background:"#F7F9FB",borderRadius:"5px",width:"100%"}),ROe=ur(BD)({"&.MuiTableHead-root th":{border:"none",fontSize:13}}),AOe=ur(Oc)({fontWeight:700}),qh=ur(Xh)({paddingLeft:0,paddingBottom:"2px"}),Kh=ur(vs)({paddingBottom:10}),TOe=ur(Vn)({width:59,height:21,background:"#08D088",borderRadius:40,color:"#fff",justifyContent:"space-around",fontSize:12}),xf=ur(vs)({paddingBottom:16}),IOe=ur(Sc)({textDecoration:"none",cursor:"pointer",color:"#0088CC"}),POe=ur(Tn)({width:"100%",display:"flex",justifyContent:"flex-end"}),E6=ur(Fo)({color:"#728A96",fontSize:14}),OOe=ur(Qf)({fontSize:18,fontWeight:800,color:"#000",textAlign:"center"}),BOe=ur(Tn)({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"});ur(BOe)({position:"relative",top:5,display:"inline-block",whiteSpace:"nowrap",lineHeight:"20px",width:"100%",maxWidth:600,overflow:"hidden",textOverflow:"ellipsis"});const UOe="/assets/verified.4e0dc210.svg",qg=()=>ne(ps,{width:"85%",variant:"text",sx:{transform:"none",background:"#e6e8eb"}}),NOe=()=>$t(ROe,{children:[$t(AOe,{children:[ne(qh,{sx:{width:80,paddingLeft:3},children:"Status"}),ne(qh,{sx:{width:370},children:"Public Key"}),ne(qh,{sx:{width:35}}),ne(qh,{sx:{width:105},children:"IP"}),ne(qh,{sx:{width:150},children:"Verification date"}),ne(qh,{sx:{width:100},children:"Verifier"})]}),$t(Oc,{children:[ne(Kh,{children:ne(ru,{})}),ne(Kh,{children:ne(ru,{})}),ne(Kh,{children:ne(ru,{})}),ne(Kh,{children:ne(ru,{})}),ne(Kh,{children:ne(ru,{})}),ne(Kh,{children:ne(ru,{})})]})]}),T7=()=>$t(Oc,{children:[ne(vs,{sx:{paddingLeft:3,paddingBottom:2},children:ne(qg,{})}),ne(xf,{children:ne(qg,{})}),ne(xf,{children:ne(ps,{width:25,variant:"text",sx:{transform:"none",background:"#e6e8eb"}})}),ne(xf,{children:ne(qg,{})}),ne(xf,{children:ne(qg,{})}),ne(vs,{sx:{paddingRight:3,paddingBottom:2},children:ne(qg,{})})]}),LOe=({pubKey:e,endpoint:t,name:r,onCopy:n,date:a,url:o})=>$t(Oc,{children:[ne(vs,{sx:{paddingLeft:3,paddingBottom:2},children:$t(TOe,{px:1,children:[ne("img",{src:UOe,alt:"Verified icon",width:11,height:11}),"Verified"]})}),ne(xf,{children:ne(E6,{children:e})}),ne(xf,{children:ne(gl,{onClick:()=>n(e),sx:{padding:.5},children:ne("img",{src:c3,alt:"Copy icon",width:16,height:16})})}),ne(xf,{children:ne(E6,{children:t})}),ne(xf,{children:ne(E6,{children:a})}),ne(vs,{sx:{paddingRight:3,paddingBottom:2},children:ne(Vn,{children:ne(IOe,{target:"_blank",href:o,children:r})})})]});function DOe(){const{data:e,isLoading:t,error:r}=Vc(),{data:n,isLoading:a,error:o}=zy(),{showNotification:s}=Dy(),l=n?.find(p=>p.name===window.verifierId),c=ue.exports.useCallback(async p=>{navigator.clipboard.writeText(p),s("Copied to clipboard!","success")},[]);return $t(Tn,{sx:{overflow:"scroll",borderRadius:"5px","::-webkit-scrollbar":{display:"none"}},children:[$t(MOe,{sx:{minWidth:900},children:[ne(NOe,{}),ne(zC,{children:t||a?$t(No,{children:[ne(T7,{}),ne(T7,{})]}):l&&e&&Object.entries(l.pubKeyEndpoints).map(([p,m])=>ne(LOe,{pubKey:p,onCopy:c,url:l.url,date:e?.verificationDate?.toLocaleDateString()||"",endpoint:m,name:l.name},p))})]}),(!!r||!!o)&&`${r} ${o} (App notification)`]})}const $Oe="modulepreload",FOe=function(e){return"/"+e},I7={},Kg=function(t,r,n){if(!r||r.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=FOe(o),o in I7)return;I7[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!n)for(let m=a.length-1;m>=0;m--){const _=a[m];if(_.href===o&&(!s||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const p=document.createElement("link");if(p.rel=s?"stylesheet":$Oe,s||(p.as="script",p.crossOrigin=""),p.href=o,document.head.appendChild(p),s)return new Promise((m,_)=>{p.addEventListener("load",m),p.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};var wb=(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))(wb||{});const jOe=["0.2.0","0.3.0","0.4.0","0.4.1"];function WOe(){const{data:e}=Vc(),{data:t}=Eh(),[r,n]=ue.exports.useState(null),[a,o]=ue.exports.useState(!1),[s,l]=ue.exports.useState(null),c=async()=>{Ta(Ca.IN_BROWSER_COMPILE_START),n(null),o(!0);const{FuncCompiler:_}=await Kg(()=>import("./index.848c2d4a.js").then(U=>U.i),[]),T=e?.files?.map(U=>({filename:U.name,content:U.content}))??[],O=e?.compilerSettings?.funcVersion;if(!O){n("FunC is not available for in-browser verification"),o(!1);return}let A;switch(O){case"0.2.0":{let{object:U}=await Kg(()=>import("./index.fbca1507.js").then(D=>D.i),[]);A=U;break}case"0.3.0":{let{object:U}=await Kg(()=>import("./index.f65cb428.js").then(D=>D.i),[]);A=U;break}case"0.4.0":{let{object:U}=await Kg(()=>import("./index.fb59a6c3.js").then(D=>D.i),[]);A=U;break}case"0.4.1":{let{object:U}=await Kg(()=>import("./index.bf0da248.js").then(D=>D.i),[]);A=U;break}}let B=await new _(A).compileFunc({sources:T,targets:(e?.compilerSettings).commandLine.split(" ").filter(U=>U.match(/\.(fc|func)$/))});if(B.status==="error"){n(B.message),o(!1),Ta(Ca.IN_BROWSER_COMPILE_ERROR);return}const L=ii.Cell.fromBoc(Buffer.from(B.codeBoc,"base64"))[0];o(!1),t?.codeCellHash.base64===L.hash().toString("base64")&&l(L.hash().toString("base64")),Ta(Ca.IN_BROWSER_COMPILE_SUCCESS)},p=()=>wK()?e?.compiler!=="func"?"Only FunC contracts can be verified":m()?"VALID":"FunC version is not supported":"WebAssembly is not supported",m=()=>jOe.some(_=>_===e?.compilerSettings?.funcVersion);return{verifyContract:c,isVerificationEnabled:p,loading:a,error:r,hash:s}}function zOe(){const{verifyContract:e,isVerificationEnabled:t,error:r,loading:n,hash:a}=WOe(),o=_a(),s=ga(o.breakpoints.down("md"));return $t(Tn,{p:2,children:[$t(Fo,{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"," ",ne(Sc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/func-js",target:"_blank",children:"WASM"}),".",!G8e()&&ne(Vn,{mt:1,sx:{overflow:"auto",maxHeight:300},children:$t(Kf,{sx:{margin:0},children:["The web page you're looking at is"," ",ne(Sc,{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()!==wb.VALID?ne(PD,{arrow:!0,title:ne(Fo,{sx:{fontSize:13},children:t()}),placement:"top",children:ne(Tn,{sx:{width:144,margin:"auto"},children:ne(ns,{onClick:()=>e(),disabled:t()!==wb.VALID||n||!!a,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:"Verify"})})}):$t(ns,{onClick:()=>e(),disabled:t()!==wb.VALID||n||!!a,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:[n&&ne(ux,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Verify"]}),r&&$t(No,{children:[ne(js,{noBottomMargin:!0,type:Rs.ERROR,title:$t(Kf,{children:[ne("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:ne(Tn,{sx:{overflow:"auto",maxHeight:300},children:ne("div",{children:ne("code",{children:r})})})}),$t(Fo,{sx:{marginTop:1,fontSize:13},children:["You can ask for help in our"," ",ne(Sc,{sx:{textDecoration:"none",cursor:"pointer",color:"#0088CC"},href:"https://t.me/tonverifier",target:"_blank",children:"Telegram support group"})]})]}),!!a&&ne(js,{noBottomMargin:!0,singleLine:!s,type:Rs.SUCCESS,title:$t(Vn,{sx:{height:42},children:[ne(Vn,{mr:1,children:ne("img",{src:TV,alt:"Like icon",width:31,height:31})}),$t(OV,{children:[" ",ne("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:ne(Tn,{})})]})}function HOe(){const{data:e,isLoading:t}=Vc(),{isLoading:r}=zy();return $t(Tn,{sx:{width:"100%"},children:[e&&!r&&$t(kOe,{pt:3,pb:1,children:[ne(OOe,{children:"Verify manually"}),ne(qOe,{})]}),(t||r)&&ne(ps,{width:"100%",height:250,sx:{transform:"none",borderRadius:"20px",background:"#e6e8eb"}})]})}ao(UD)({borderBottom:"none","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function qOe(){return ne(Tn,{sx:{width:"100%"},children:ne(zOe,{})})}function KOe({onClose:e}){const t=_a(),r=ga(t.breakpoints.down("lg"));return ne(EOe,{open:!0,maxWidth:r?"88%":1e3,hideCloseButton:!0,children:ne(EC,{onClickAway:e,children:$t(Tn,{sx:{width:"100%"},children:[ne(POe,{pt:2,children:ne(gl,{sx:{padding:0},onClick:e,children:ne("img",{src:SC,alt:"Close icon",width:15,height:15})})}),$t(Vn,{mb:4,justifyContent:"center",children:[ne("img",{src:COe,alt:"Popup icon",width:41,height:41}),ne(Qf,{pl:2,sx:{fontSize:18,fontWeight:800},children:"Verification Proof"})]}),ne(DOe,{}),ne(Vn,{mt:3,children:ne(HOe,{})})]})})})}const VOe=ao(Vn)(({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"}})),GOe=ao(Gy)({boxSizing:"border-box",display:"flex",minWidth:200,maxWidth:260,height:108,background:"#F7F9FB",borderRadius:14,padding:"28px 13px"}),YOe=ao(Fo)({fontSize:14,color:"#000"}),XOe=[{icon:bOe,description:"This source code compiles to the same exact bytecode that is found on-chain."},{icon:yOe,description:"You can review verification proofs and perform your own client-side verification."},{icon:mOe,description:"Variable/function names may not reflect actual usage. compiler may remove unused code."},{icon:vOe,description:"Comments may not be honest and should generally be ignored."}],QOe=()=>{const[e]=h2(),[t,r]=al.useState(e.get("showProof")!==null),n=_a(),a=ga(n.breakpoints.down("lg")),o=ga(n.breakpoints.down("md")),s=ga("(max-width: 450px)");return $t(h0,{children:[ne(fx,{mb:1,children:$t(Vn,{sx:{justifyContent:"space-between",flexDirection:s?"column":"inherit",width:"100%"},children:[$t(Vn,{mb:s?2:0,sx:{width:"100%"},children:[ne(p0,{children:ne("img",{src:xOe,alt:"Verification icon",width:41,height:41})}),ne(Qf,{children:"How is this contract verified?"})]}),$t("div",{children:[$t(ns,{fontSize:12,fontWeight:800,textColor:"#fff",background:"#1976d2",hoverBackground:"#156cc2",height:37,width:132,onClick:()=>{r(!0)},children:[ne("img",{src:wOe,alt:"Show icon",width:19,height:19}),"Show Proof"]}),t&&ne(KOe,{onClose:()=>r(!1)})]})]})}),ne(VOe,{makeFlexible:a,isMobile:o,children:XOe.map(c=>$t(GOe,{children:[ne(Gy,{sx:{alignSelf:"flex-start"},mr:1.5,children:ne("img",{alt:"Icon",src:c.icon,width:41,height:41})}),ne(YOe,{children:c.description})]},c.description))})]})};function ZOe(){const e=Jq(yb),{isLoading:t,error:r,data:n}=Tc(["latestVerifiedContracts"],async()=>(await(await fetch(`${e}/latestVerified`,{method:"GET"})).json()).slice(0,100));return{isLoading:t,error:r,data:n}}const JOe=ur(Tn)(({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}})),eBe=ur(Tn)(({theme:e})=>({maxWidth:1160,width:"calc(100% - 50px)",paddingTop:20,margin:"0 auto"})),tBe=ur(Tn)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,margin:"0 auto",justifyContent:"left",overflow:"auto",marginTop:24,"-webkit-text-size-adjust":"100%"}),rBe=ur(Tn)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,color:"#728A96"}),nBe=ur(Tn)({marginLeft:"auto",fontSize:14,background:"#F0F0F099",color:"#728A9699",padding:"2px 12px",borderRadius:4});function iBe(){const{data:e,isLoading:t}=ZOe(),r=jc(),n=ue.exports.useRef(new Array(30).fill(null).map(a=>Math.random()*100));return $t(eBe,{children:[ne(Fo,{variant:"h6",children:ne("b",{children:"Latest verified contracts"})}),$t(tBe,{children:[t&&n.current.map(a=>ne(ps,{sx:{borderRadius:2},variant:"rectangular",width:400+a,height:70})),e?.map(a=>$t(JOe,{onClick:o=>{r(`/${a.address}`)},children:[ne(rBe,{children:a.address}),$t("div",{style:{display:"flex",alignItems:"center",marginTop:6.5},children:[ne(Fo,{sx:{fontSize:14,color:"#728A9699"},children:a.mainFile}),ne(nBe,{children:a.compiler})]})]}))]})]})}const BV=ao(Tn)({maxWidth:1160,margin:"auto"}),UV=ao(Tn)(e=>({display:e.isMobile?"inherit":"flex",gap:20})),Y1=ao(Tn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,padding:20,color:"#000"});function P7(){const{isLoading:e,data:t,error:r}=Vc(),[n,a]=ue.exports.useState(!1),o=_a(),s=dRe(),{contractAddress:l,isAddressEmpty:c}=nc(),{hasFiles:p}=oc(),m=ue.exports.useRef(),_=ga(o.breakpoints.down("lg")),T=ga(o.breakpoints.down("md")),O=!r&&e&&l;kH(),pRe(),J8e(),ue.exports.useEffect(()=>{window.scrollTo({behavior:"auto",top:m.current?.offsetTop})},[window.location.pathname]);const{initialize:A}=Y8(),{data:{funcVersions:M}}=G8();return ue.exports.useEffect(()=>{(M?.length??0)>0&&A(M[0])},[M]),$t(Tn,{onDragEnter:()=>a(!0),onDrop:()=>a(!1),onClick:()=>a(!1),children:[ne(ax,{sx:{color:"#fff",zIndex:4},open:n,onDragEnd:()=>a(!1)}),ne(Tn,{ref:m}),window.isTestnet&&ne(vR,{}),ne(uMe,{}),l===null&&c&&ne(iBe,{}),l===null&&!c&&ne(Tn,{m:4,children:ne(js,{singleLine:!0,type:Rs.ERROR,title:$t(Vn,{sx:{height:42},children:[ne("span",{style:{color:"#FC5656",marginRight:4},children:"Error: "}),"Invalid address"]}),notificationBody:ne(Tn,{})})}),$t(BV,{px:_?"20px":0,children:[!!r&&ne(Tn,{mt:4,children:ne(js,{type:Rs.ERROR,title:$t(Kf,{children:[ne("span",{style:{color:"#FC5656"},children:"Error: "}),"Unable to fetch contract data"]}),notificationBody:ne(Tn,{sx:{overflow:"auto",maxHeight:300},children:ne("pre",{children:ne("code",{children:r.toString()})})})})}),O&&$t(Y1,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[$t(Vn,{mb:3,children:[ne(ps,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),ne(ps,{variant:"text",sx:{fontSize:"20px",width:200}})]}),ne(ps,{variant:"rectangular",width:"100%",height:250})]}),!e&&$t(UV,{isMobile:T,children:[ne(xRe,{}),t?.hasOnchainProof&&ne(VAe,{})]}),O&&$t(Y1,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[$t(Vn,{mb:3,children:[ne(ps,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),ne(ps,{variant:"text",sx:{fontSize:"20px",width:200}})]}),ne(ps,{variant:"rectangular",width:"100%",height:250})]}),!e&&t?.hasOnchainProof&&ne(QOe,{}),t&&(!t.hasOnchainProof||s)&&$t(No,{children:[ne(dOe,{}),p()&&ne(gOe,{})]}),t&&!p()?ne(Y1,{sx:{padding:0},mb:5,children:ne(fRe,{})}):ne(No,{children:O&&$t(Y1,{sx:{padding:"30px 24px 24px 24px"},mb:5,children:[$t(Vn,{mb:3,children:[ne(ps,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),ne(ps,{variant:"text",sx:{fontSize:"20px",width:250}})]}),ne(ps,{variant:"rectangular",width:"100%",height:500})]})}),t&&ne(zw,{})]}),!t&&ne(Gy,{sx:{bottom:0,width:"100%"},children:ne(zw,{})})]})}function NV({space:e}){return ne("div",{style:{height:e}})}function oBe(){const[e,t]=ue.exports.useState({spec:[],builder:ii.beginCell()});return $t("div",{children:[ne("h4",{children:"Build the cell"}),ne(jd,{required:!0,id:"outlined-required",label:"UINT",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const[n,a]=r.target.value.split(",");t(o=>({spec:[...o.spec,{type:"uint"+a,value:n}],builder:o.builder.storeUint(n,a)})),r.target.value=""}}}),ne(jd,{required:!0,id:"outlined-required",label:"Address",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const n=r.target.value;t(a=>({spec:[...a.spec,{type:"address",value:n}],builder:a.builder.storeAddress(ii.Address.parse(n))})),r.target.value=""}}}),ne("div",{children:JSON.stringify(e.spec)}),ne(NV,{space:30}),ne(sx,{variant:"outlined",children:"Send the message"})]})}function aBe(){return $t("div",{style:{margin:"0 auto",maxWidth:1100,padding:40},children:[ne(yR,{}),ne(NV,{space:35}),ne(jd,{required:!0,id:"outlined-required",label:"Contract address",fullWidth:!0}),ne(jd,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),$t("div",{children:[ne("h3",{children:"OPs"}),ne(jd,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),ne(oBe,{})]})]})}const sBe=_C({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 nu({label:e,data:t}){return $t("div",{className:"InfoPiece",children:[ne("div",{className:"InfoPiece-Label",children:e}),ne("div",{className:"InfoPiece-Data",children:t})]})}function lBe(){const e=ii.Address.parse(window.sourcesRegistryAddress);return Tc(["sourcesRegistry",e],async()=>{const t=await Sh(),r=await MK(e,t),n=await yv(e,"get_verifier_registry_address",[],s=>s[0].beginParse().readAddress().toFriendly(),t),a=await yv(e,"get_deployment_costs",[],s=>[ii.fromNano(s[0]),ii.fromNano(s[1])],t),o=ii.Cell.fromBoc((await t.getContractState(e)).code)[0].hash().toString("base64");return{admin:r,verifierRegistry:n,codeCellHash:o,address:e,deploymentCosts:a}})}function uBe(e){return ii.beginCell().storeUint(2003,32).storeUint(0,64).storeAddress(e).endCell()}function cBe(e){return ii.beginCell().storeUint(3004,32).storeUint(0,64).storeAddress(e).endCell()}function fBe(e,t){return ii.beginCell().storeUint(6007,32).storeUint(0,64).storeCoins(e).storeCoins(t).endCell()}function C6({text:e,action:t,address:r}){const[n,a]=al.useState(!1),[o,s]=al.useState(""),l=()=>{a(!1)},c=X8();return $t(No,{children:[ne(Cp,{text:e,onClick:()=>{a(!0)}}),$t($C,{open:n,onClose:l,children:[ne(dD,{children:e}),ne(fD,{children:ne(jd,{multiline:!0,autoFocus:!0,margin:"dense",id:"name",label:"Address",fullWidth:!0,variant:"standard",value:o,onChange:p=>{s(p.target.value)}})}),$t(cD,{children:[ne(Cp,{text:"Cancel",onClick:l}),ne(Cp,{text:"DOIT",onClick:()=>{c(r.toFriendly(),ii.toNano(.01),t(o))}})]})]})]})}function dBe(){const{data:e,isLoading:t}=lBe();return $t("div",{style:{padding:"20px 40px"},children:[ne("h1",{children:"Sources Registry"}),t&&ne("div",{children:"Loading..."}),e&&$t(No,{children:[ne(nu,{label:"Address",data:e.address.toFriendly()}),ne(nu,{label:"Admin",data:e.admin}),ne(nu,{label:"Verifier Reg.",data:e.verifierRegistry}),ne(nu,{label:"Min Ton",data:e.deploymentCosts[0]}),ne(nu,{label:"Max Ton",data:e.deploymentCosts[1]}),ne(nu,{label:"Code hash",data:e.codeCellHash}),$t("div",{style:{marginTop:20,gap:10,display:"flex"},children:[ne(C6,{text:"Change Verifier Registry",action:r=>uBe(ii.Address.parse(r)),address:e.address}),ne(C6,{text:"Change Admin",action:r=>cBe(ii.Address.parse(r)),address:e.address}),ne(C6,{text:"Set deployment costs",action:r=>{const[n,a]=r.split(",");return fBe(ii.toNano(n),ii.toNano(a))},address:e.address})]})]})]})}const hBe={removeVerifier:435836471,updateVerifier:1610798618,forwardMessage:1965127512};function pBe(e){return new lh(Nke(e))}function gBe(e){let t=e.split(".");return((+t[0]*256+ +t[1])*256+ +t[2])*256+ +t[3]}function mBe(e){let t=new ii.Cell;t.bits.writeUint(hBe.updateVerifier,32),t.bits.writeUint(e.queryId||0,64),t.bits.writeUint(e.id,256),t.bits.writeUint(e.quorum,8);let r=ii.beginDict(256);return e.endpoints.forEach(function(n,a){r.storeCell(a,ii.beginCell().storeUint(n,32).endCell())}),t.bits.writeBit(!0),t.refs.push(r.endCell()),t.refs.push(ii.beginCell().storeBuffer(Buffer.from(e.name)).endCell()),t.refs.push(ii.beginCell().storeBuffer(Buffer.from(e.marketingUrl)).endCell()),t}function vBe({verifier:e}){const[t,r]=ue.exports.useState(!1),n=X8();zy();const[a,o]=ue.exports.useState(JSON.stringify({quorum:e.quorum,pubKeyEndpoints:e.pubKeyEndpoints,name:e.name,url:e.url},null,3));return $t(No,{children:[ne(Cp,{style:{marginTop:8},text:"Update config",onClick:()=>{r(!0)}}),$t($C,{open:t,onClose:()=>{r(!1)},children:[ne(dD,{children:"s"}),ne(fD,{sx:{width:1e3},children:ne(jd,{multiline:!0,autoFocus:!0,margin:"dense",id:"name",label:"JSON",fullWidth:!0,variant:"standard",value:a,onChange:s=>{o(s.target.value)}})}),ne(cD,{children:ne(Cp,{text:"DOIT",onClick:()=>{const s=JSON.parse(a);n(window.verifierRegistryAddress,ii.toNano(.01),mBe({id:pBe(s.name),quorum:s.quorum,endpoints:new Map(Object.entries(s.pubKeyEndpoints).map(([l,c])=>[new lh(Buffer.from(l,"base64")),gBe(c)])),name:s.name,marketingUrl:s.url}))}})})]})]})}function yBe(){const{data:e,isLoading:t}=zy();return $t("div",{style:{padding:"20px 40px",background:"#00000011"},children:[ne("div",{style:{display:"flex",gap:30,alignItems:"center"},children:ne("h1",{children:"Verifier Registry"})}),ne(nu,{label:"Address",data:window.verifierRegistryAddress}),$t(No,{children:[t&&"Loading...",e?.map(r=>$t(No,{children:[$t("div",{style:{background:"#00000011",padding:"2px 20px",marginTop:10},children:[ne("h3",{children:r.name}),ne(nu,{label:"Admin",data:r.admin}),ne(nu,{label:"Quorum",data:String(r.quorum)}),ne(nu,{label:"Url",data:r.url}),ne("br",{}),ne("div",{children:"Public Key Endpoints"}),Object.entries(r.pubKeyEndpoints).map(([n,a])=>ne(nu,{label:n,data:`${a}`},n))]},r.name),ne(vBe,{verifier:r})]}))]})]})}function bBe(){return $t("div",{children:[window.isTestnet&&ne(vR,{}),$t(f3,{sx:{gap:30,px:4},children:[ne("h1",{children:"Admin"}),ne(yR,{})]}),ne(dBe,{}),ne(yBe,{}),ne(zw,{})]})}const wBe=ur(Tn)(({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 xBe(){const e=_a(),t=ga(e.breakpoints.down("md")),r=ga(e.breakpoints.down("lg"));return ne(wBe,{px:r?3.4:0,isMobile:t,children:$t(AH,{mb:5,children:[$t(ah,{children:[ne("img",{src:p2,width:30,height:30,alt:"App icon"}),ne(P_,{children:"TACT DEPLOYER"})]}),$t(RH,{children:[ne(Vn,{mr:t?0:2,children:ne(N8,{})}),!t&&$t(ah,{href:qC,target:"_blank",children:[ne("img",{src:rC,alt:"Github icon",width:20,height:20}),ne(o8,{children:"GitHub"})]})]})]})})}const _Be=ur("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"}}),SBe=ii.Cell.fromBoc(Buffer.from("te6cckEBAQEADgAAGJRqmLYAAAAAAAAAAOnNeQ0=","base64"))[0];async function M6(e){const t=`https://tact-deployer${window.isTestnet?"-testnet":""}.infura-ipfs.io`;return fetch(`${t}/ipfs/${e}`)}function bR({workchain:e}){const{ipfsHash:t}=cL(),{data:r,error:n,isLoading:a}=Tc(["tactDeploy",t],async()=>{if(!t)return null;const o=await Sh(),s=await M6(t).then(B=>B.json()),l=await M6(s.pkg).then(B=>B.json()),c=await M6(s.dataCell).then(B=>B.arrayBuffer()).then(B=>ii.Cell.fromBoc(Buffer.from(B))[0]),p=ii.Cell.fromBoc(Buffer.from(l.code,"base64"))[0],m=ii.contractAddress({workchain:e,initialCode:p,initialData:c}),_=new ii.StateInit({code:p,data:c}),T=c.hash().toString("base64"),O=p.hash().toString("base64"),A=await o.isContractDeployed(m),M=A&&await Q8(O);return{address:m,stateInit:_,pkg:l,codeCellHash:O,dataCellHash:T,isDeployed:A,hasProof:M}});return{data:r,error:n,isLoading:a}}function EBe(e,t,r){const{sendTXN:n,data:a,clearTXN:o}=eK("deployContract",async s=>{if(!r)throw new Error("No address");const l=await Sh();return s>20?"error":await l.isContractDeployed(r)?"success":"issued"});return{sendTXN:()=>{!r||n(r,ii.toNano(e),SBe,t)},status:a.status,clearTXN:o}}function CBe(){const e=[],{data:t,error:r}=bR({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:TK(t.address.toFriendly())})),ne(aR,{title:"Contract",icon:oR,dataRows:e,isLoading:!1,isFlexibleWrapper:!0})}function MBe(){const[e,t]=ue.exports.useState("0.5"),{data:r,error:n}=bR({workchain:0}),{sendTXN:a,status:o}=EBe(e,r?.stateInit,r?.address),{markPreloaded:s}=kK(),l=jc(),c=oc();let p="";if(n)p=n.toString();else if(r?.isDeployed)p=$t("div",{children:["Contract is already deployed.",!r.hasProof&&" You can publish its sources to verify it."]});else switch(o){case"initial":p="Contract is ready for deployment";break;case"pending":p="Please approve the transaction in your wallet";break;case"issued":p="Transaction was issued. Monitoring deployment...";break;case"rejected":p="Transaction was rejected. Please retry.";break;case"error":p="Transaction failed. Please retry.";break;case"expired":p="Transaction expired. Please retry.";break;case"success":p="Contract deployed successfully! You can now publish its sources to verify it.";break}let m=$t(ns,{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")&&ne(ux,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Deploy"]});return(o==="success"||r?.isDeployed&&!r.hasProof)&&(m=ne(ns,{fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(),l("/"+r.address.toFriendly()),c.addFiles([new File([JSON.stringify(r.pkg)],r.pkg.name+".pkg",{type:"text/plain"})])},children:"Verify"})),$t(h0,{mb:6,children:[$t(Vn,{p:"30px 24px 0 24px",children:[ne(p0,{children:ne("img",{src:oR,alt:"publish icon",width:41,height:41})}),ne(Qf,{children:"Deploy"})]}),$t(Tn,{children:[$t(Tn,{sx:{padding:"0 30px"},children:[$t(f3,{gap:2,sx:{mt:2},children:[ne(Dc,{children:ne("div",{children:"Value to initialize contract (TON)"})}),ne(Dc,{children:ne(_Be,{disabled:!!r?.isDeployed||o==="issued"||o=="pending",value:e,type:"number",onChange:_=>{t(_.target.value)}})})]}),ne(js,{type:Rs.HINT,title:ne(No,{}),notificationBody:ne(Vn,{sx:{overflow:"auto",maxHeight:300},children:$t(Kf,{sx:{marginBottom:0},children:[ne(Tn,{sx:{fontWeight:600},children:"Contract Address"}),ne(Tn,{sx:{fontSize:18,fontWeight:700,wordBreak:"break-all"},children:r?.address.toFriendly()})]})})}),ne(js,{type:Rs.INFO,title:ne(No,{}),notificationBody:ne(Vn,{sx:{overflow:"auto",maxHeight:300},children:ne(Kf,{sx:{marginBottom:0},children:p})})}),m]}),ne(Vn,{mb:3,sx:{justifyContent:"center"}})]})]})}function kBe(){const e=_a(),t=ga(e.breakpoints.down("md")),r=ga(e.breakpoints.down("lg")),{data:n,error:a,isLoading:o}=bR({workchain:0});return $t(Tn,{children:[window.isTestnet&&ne(vR,{}),ne(xBe,{}),$t(BV,{px:r?"20px":0,children:[o&&$t(Dc,{sx:{marginTop:3},children:[ne(ps,{height:330,variant:"rounded",sx:{marginBottom:3}}),ne(ps,{height:280,variant:"rounded"})]}),!o&&$t(No,{children:[ne(UV,{isMobile:t,children:ne(CBe,{})}),ne(MBe,{})]})]}),")",ne(zw,{})]})}const RBe=new TX({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});Mke();E4.createRoot(document.getElementById("root")).render(ne(J3e,{maxSnack:3,children:ne(vne,{theme:sBe,children:ne(hJ,{client:RBe,children:ne(nMe,{manifestUrl:"https://tonverifier.live/tonconnect-manifest.json",children:ne(Mee,{basename:"/",children:$t(Eee,{children:[ne(Vh,{path:"/interact",element:ne(aBe,{})}),ne(Vh,{path:"/admin",element:ne(bBe,{})}),ne(Vh,{path:"/tactDeployer/:ipfsHash",element:ne(kBe,{})}),ne(Vh,{path:"/:contractAddress",element:ne(P7,{})}),ne(Vh,{path:"/",element:ne(P7,{})})]})})})})})}));export{Hw as g}; diff --git a/index.html b/index.html index d0298ef..88ba9ea 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ - +