diff --git a/assets/pep.png b/assets/pep.png new file mode 100644 index 0000000..dc08dc9 Binary files /dev/null and b/assets/pep.png differ diff --git a/assets/rost.jpg b/assets/rost.jpg new file mode 100644 index 0000000..d442a71 Binary files /dev/null and b/assets/rost.jpg differ diff --git a/assets/theclash.jpg b/assets/theclash.jpg new file mode 100644 index 0000000..94c2d49 Binary files /dev/null and b/assets/theclash.jpg differ diff --git a/assets/veronika.jpg b/assets/veronika.jpg new file mode 100644 index 0000000..15d9ef8 Binary files /dev/null and b/assets/veronika.jpg differ diff --git a/assets/yula_g.jpg b/assets/yula_g.jpg new file mode 100644 index 0000000..1235cba Binary files /dev/null and b/assets/yula_g.jpg differ diff --git a/docs/assets/index-CfoHkv1i.css b/docs/assets/index-CfoHkv1i.css deleted file mode 100644 index fefea26..0000000 --- a/docs/assets/index-CfoHkv1i.css +++ /dev/null @@ -1 +0,0 @@ -.footer{padding:20px;display:flex;gap:20px;justify-content:flex-end;align-items:center;flex-wrap:wrap}.footer>div>label{color:#fff;margin-right:5px}.footer-checkbox-container{display:flex;flex-direction:column}.footer-checkbox-container>span{color:#fff;font-weight:700;margin-bottom:4px}.footer-checkbox-container input{margin-left:3px}header{align-items:right;justify-content:space-between}header>span{font-size:30px;line-height:34px;color:#66aaeee8;font-weight:700;margin:16px}header #wallet-connect-button-wrapper{display:inline-block}header #user-name{display:inline-block}header #header-row{display:flex;justify-content:space-between;margin-bottom:16px;margin-left:16px;align-items:center}#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center;min-height:88vh}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s;border-radius:50%}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}.card{padding:2em}.read-the-docs{color:#888}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}} diff --git a/docs/assets/index-CFHbMKh7.js b/docs/assets/index-Chq_XTR8.js similarity index 59% rename from docs/assets/index-CFHbMKh7.js rename to docs/assets/index-Chq_XTR8.js index 2bd167f..a2bcd89 100644 --- a/docs/assets/index-CFHbMKh7.js +++ b/docs/assets/index-Chq_XTR8.js @@ -1,4 +1,4 @@ -var qx=Object.defineProperty;var Gx=(e,t,n)=>t in e?qx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Je=(e,t,n)=>Gx(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var iw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ow={exports:{}},Td={},sw={exports:{}},vt={};/** +var Gx=Object.defineProperty;var Zx=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Je=(e,t,n)=>Zx(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ow=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var sw={exports:{}},Pd={},aw={exports:{}},yt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var qx=Object.defineProperty;var Gx=(e,t,n)=>t in e?qx(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $c=Symbol.for("react.element"),Qx=Symbol.for("react.portal"),Jx=Symbol.for("react.fragment"),Xx=Symbol.for("react.strict_mode"),e8=Symbol.for("react.profiler"),t8=Symbol.for("react.provider"),n8=Symbol.for("react.context"),r8=Symbol.for("react.forward_ref"),i8=Symbol.for("react.suspense"),o8=Symbol.for("react.memo"),s8=Symbol.for("react.lazy"),vm=Symbol.iterator;function a8(e){return e===null||typeof e!="object"?null:(e=vm&&e[vm]||e["@@iterator"],typeof e=="function"?e:null)}var aw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lw=Object.assign,cw={};function Ha(e,t,n){this.props=e,this.context=t,this.refs=cw,this.updater=n||aw}Ha.prototype.isReactComponent={};Ha.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")};Ha.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uw(){}uw.prototype=Ha.prototype;function ap(e,t,n){this.props=e,this.context=t,this.refs=cw,this.updater=n||aw}var lp=ap.prototype=new uw;lp.constructor=ap;lw(lp,Ha.prototype);lp.isPureReactComponent=!0;var ym=Array.isArray,fw=Object.prototype.hasOwnProperty,cp={current:null},dw={key:!0,ref:!0,__self:!0,__source:!0};function hw(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)fw.call(t,r)&&!dw.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t in e?qx(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var d8=Kt,h8=Symbol.for("react.element"),p8=Symbol.for("react.fragment"),g8=Object.prototype.hasOwnProperty,m8=d8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v8={key:!0,ref:!0,__self:!0,__source:!0};function gw(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)g8.call(t,r)&&!v8.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:h8,type:e,key:o,ref:s,props:i,_owner:m8.current}}Td.Fragment=p8;Td.jsx=gw;Td.jsxs=gw;ow.exports=Td;var Ht=ow.exports,A1={},mw={exports:{}},Rr={},vw={exports:{}},yw={};/** + */var h8=rn,p8=Symbol.for("react.element"),g8=Symbol.for("react.fragment"),m8=Object.prototype.hasOwnProperty,v8=h8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y8={key:!0,ref:!0,__self:!0,__source:!0};function mw(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)m8.call(t,r)&&!y8.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:p8,type:e,key:o,ref:s,props:i,_owner:v8.current}}Pd.Fragment=g8;Pd.jsx=mw;Pd.jsxs=mw;sw.exports=Pd;var gt=sw.exports,L1={},vw={exports:{}},Rr={},yw={exports:{}},ww={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var qx=Object.defineProperty;var Gx=(e,t,n)=>t in e?qx(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(Q,ue){var ge=Q.length;Q.push(ue);e:for(;0>>1,je=Q[Ze];if(0>>1;Zei(Pe,ge))tti(rr,Pe)?(Q[Ze]=rr,Q[tt]=ge,Ze=tt):(Q[Ze]=Pe,Q[ft]=ge,Ze=ft);else if(tti(rr,ge))Q[Ze]=rr,Q[tt]=ge,Ze=tt;else break e}}return ue}function i(Q,ue){var ge=Q.sortIndex-ue.sortIndex;return ge!==0?ge:Q.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,h=3,g=!1,m=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(Q){for(var ue=n(c);ue!==null;){if(ue.callback===null)r(c);else if(ue.startTime<=Q)r(c),ue.sortIndex=ue.expirationTime,t(l,ue);else break;ue=n(c)}}function M(Q){if(y=!1,w(Q),!m)if(n(l)!==null)m=!0,fe(E);else{var ue=n(c);ue!==null&&Ce(M,ue.startTime-Q)}}function E(Q,ue){m=!1,y&&(y=!1,C(P),P=-1),g=!0;var ge=h;try{for(w(ue),d=n(l);d!==null&&(!(d.expirationTime>ue)||Q&&!I());){var Ze=d.callback;if(typeof Ze=="function"){d.callback=null,h=d.priorityLevel;var je=Ze(d.expirationTime<=ue);ue=e.unstable_now(),typeof je=="function"?d.callback=je:d===n(l)&&r(l),w(ue)}else r(l);d=n(l)}if(d!==null)var st=!0;else{var ft=n(c);ft!==null&&Ce(M,ft.startTime-ue),st=!1}return st}finally{d=null,h=ge,g=!1}}var O=!1,T=null,P=-1,L=5,W=-1;function I(){return!(e.unstable_now()-WQ||125Ze?(Q.sortIndex=ge,t(c,Q),n(l)===null&&Q===n(c)&&(y?(C(P),P=-1):y=!0,Ce(M,ge-Ze))):(Q.sortIndex=je,t(l,Q),m||g||(m=!0,fe(E))),Q},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(Q){var ue=h;return function(){var ge=h;h=ue;try{return Q.apply(this,arguments)}finally{h=ge}}}})(yw);vw.exports=yw;var y8=vw.exports;/** + */(function(e){function t(Q,ue){var ge=Q.length;Q.push(ue);e:for(;0>>1,je=Q[Ze];if(0>>1;Zei(Pe,ge))tti(rr,Pe)?(Q[Ze]=rr,Q[tt]=ge,Ze=tt):(Q[Ze]=Pe,Q[ft]=ge,Ze=ft);else if(tti(rr,ge))Q[Ze]=rr,Q[tt]=ge,Ze=tt;else break e}}return ue}function i(Q,ue){var ge=Q.sortIndex-ue.sortIndex;return ge!==0?ge:Q.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,h=3,g=!1,m=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(Q){for(var ue=n(c);ue!==null;){if(ue.callback===null)r(c);else if(ue.startTime<=Q)r(c),ue.sortIndex=ue.expirationTime,t(l,ue);else break;ue=n(c)}}function M(Q){if(y=!1,w(Q),!m)if(n(l)!==null)m=!0,fe(E);else{var ue=n(c);ue!==null&&Ce(M,ue.startTime-Q)}}function E(Q,ue){m=!1,y&&(y=!1,C(P),P=-1),g=!0;var ge=h;try{for(w(ue),d=n(l);d!==null&&(!(d.expirationTime>ue)||Q&&!I());){var Ze=d.callback;if(typeof Ze=="function"){d.callback=null,h=d.priorityLevel;var je=Ze(d.expirationTime<=ue);ue=e.unstable_now(),typeof je=="function"?d.callback=je:d===n(l)&&r(l),w(ue)}else r(l);d=n(l)}if(d!==null)var st=!0;else{var ft=n(c);ft!==null&&Ce(M,ft.startTime-ue),st=!1}return st}finally{d=null,h=ge,g=!1}}var O=!1,T=null,P=-1,L=5,W=-1;function I(){return!(e.unstable_now()-WQ||125Ze?(Q.sortIndex=ge,t(c,Q),n(l)===null&&Q===n(c)&&(y?(C(P),P=-1):y=!0,Ce(M,ge-Ze))):(Q.sortIndex=je,t(l,Q),m||g||(m=!0,fe(E))),Q},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(Q){var ue=h;return function(){var ge=h;h=ue;try{return Q.apply(this,arguments)}finally{h=ge}}}})(ww);yw.exports=ww;var w8=yw.exports;/** * @license React * react-dom.production.min.js * @@ -30,18 +30,18 @@ var qx=Object.defineProperty;var Gx=(e,t,n)=>t in e?qx(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var w8=Kt,Lr=y8;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L1=Object.prototype.hasOwnProperty,x8=/^[: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]*$/,xm={},bm={};function b8(e){return L1.call(bm,e)?!0:L1.call(xm,e)?!1:x8.test(e)?bm[e]=!0:(xm[e]=!0,!1)}function _8(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C8(e,t,n,r){if(t===null||typeof t>"u"||_8(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 fr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vn[e]=new fr(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){Vn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var fp=/[\-:]([a-z])/g;function dp(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(fp,dp);Vn[t]=new fr(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(fp,dp);Vn[t]=new fr(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(fp,dp);Vn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Vn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function hp(e,t,n,r){var i=Vn.hasOwnProperty(t)?Vn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),O1=Object.prototype.hasOwnProperty,b8=/^[: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]*$/,bm={},_m={};function _8(e){return O1.call(_m,e)?!0:O1.call(bm,e)?!1:b8.test(e)?_m[e]=!0:(bm[e]=!0,!1)}function C8(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S8(e,t,n,r){if(t===null||typeof t>"u"||C8(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 fr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vn[e]=new fr(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){Vn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var dp=/[\-:]([a-z])/g;function hp(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(dp,hp);Vn[t]=new fr(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(dp,hp);Vn[t]=new fr(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(dp,hp);Vn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Vn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function pp(e,t,n,r){var i=Vn.hasOwnProperty(t)?Vn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ph=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yl(e):""}function S8(e){switch(e.tag){case 5:return yl(e.type);case 16:return yl("Lazy");case 13:return yl("Suspense");case 19:return yl("SuspenseList");case 0:case 2:case 15:return e=Ah(e.type,!1),e;case 11:return e=Ah(e.type.render,!1),e;case 1:return e=Ah(e.type,!0),e;default:return""}}function I1(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 ta:return"Fragment";case ea:return"Portal";case O1:return"Profiler";case pp:return"StrictMode";case R1:return"Suspense";case D1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bw:return(e.displayName||"Context")+".Consumer";case xw:return(e._context.displayName||"Context")+".Provider";case gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mp:return t=e.displayName||null,t!==null?t:I1(e.type)||"Memo";case xo:t=e._payload,e=e._init;try{return I1(e(t))}catch{}}return null}function k8(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 I1(t);case 8:return t===pp?"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 Yo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function E8(e){var t=Cw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function uu(e){e._valueTracker||(e._valueTracker=E8(e))}function Sw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Cw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bf(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 N1(e,t){var n=t.checked;return an({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function kw(e,t){t=t.checked,t!=null&&hp(e,"checked",t,!1)}function W1(e,t){kw(e,t);var n=Yo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$1(e,t.type,n):t.hasOwnProperty("defaultValue")&&$1(e,t.type,Yo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $1(e,t,n){(t!=="number"||bf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wl=Array.isArray;function ya(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ll={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},M8=["Webkit","ms","Moz","O"];Object.keys(Ll).forEach(function(e){M8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ll[t]=Ll[e]})});function Pw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ll.hasOwnProperty(e)&&Ll[e]?(""+t).trim():t+"px"}function Aw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Pw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var T8=an({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 B1(e,t){if(t){if(T8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function j1(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 H1=null;function vp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var z1=null,wa=null,xa=null;function Mm(e){if(e=Bc(e)){if(typeof z1!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Dd(t),z1(e.stateNode,e.type,t))}}function Lw(e){wa?xa?xa.push(e):xa=[e]:wa=e}function Ow(){if(wa){var e=wa,t=xa;if(xa=wa=null,Mm(e),t)for(e=0;e>>=0,e===0?32:31-(U8(e)/F8|0)|0}var du=64,hu=4194304;function xl(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 kf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=xl(a):(o&=s,o!==0&&(r=xl(o)))}else s=n&~i,s!==0?r=xl(s):o!==0&&(r=xl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Uc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ii(t),e[t]=n}function z8(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Rl),Nm=" ",Wm=!1;function Jw(e,t){switch(e){case"keyup":return yb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function xb(e,t){switch(e){case"compositionend":return Xw(t);case"keypress":return t.which!==32?null:(Wm=!0,Nm);case"textInput":return e=t.data,e===Nm&&Wm?null:e;default:return null}}function bb(e,t){if(na)return e==="compositionend"||!kp&&Jw(e,t)?(e=Zw(),Xu=_p=Eo=null,na=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Bm(n)}}function r5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?r5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function i5(){for(var e=window,t=bf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bf(e.document)}return t}function Ep(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 Ab(e){var t=i5(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&r5(n.ownerDocument.documentElement,n)){if(r!==null&&Ep(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=jm(n,o);var s=jm(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ra=null,Z1=null,Il=null,Q1=!1;function Hm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Q1||ra==null||ra!==bf(r)||(r=ra,"selectionStart"in r&&Ep(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Il&&lc(Il,r)||(Il=r,r=Tf(Z1,"onSelect"),0sa||(e.current=r0[sa],r0[sa]=null,sa--)}function zt(e,t){sa++,r0[sa]=e.current,e.current=t}var Ko={},nr=ts(Ko),wr=ts(!1),Ls=Ko;function Pa(e,t){var n=e.type.contextTypes;if(!n)return Ko;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xr(e){return e=e.childContextTypes,e!=null}function Af(){qt(wr),qt(nr)}function Zm(e,t,n){if(nr.current!==Ko)throw Error(ae(168));zt(nr,t),zt(wr,n)}function h5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,k8(e)||"Unknown",i));return an({},n,r)}function Lf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ko,Ls=nr.current,zt(nr,e),zt(wr,wr.current),!0}function Qm(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=h5(e,t,Ls),r.__reactInternalMemoizedMergedChildContext=e,qt(wr),qt(nr),zt(nr,e)):qt(wr),zt(wr,n)}var Bi=null,Id=!1,zh=!1;function p5(e){Bi===null?Bi=[e]:Bi.push(e)}function jb(e){Id=!0,p5(e)}function ns(){if(!zh&&Bi!==null){zh=!0;var e=0,t=$t;try{var n=Bi;for($t=1;e>=s,i-=s,Vi=1<<32-ii(t)+i|n<P?(L=T,T=null):L=T.sibling;var W=h(C,T,w[P],M);if(W===null){T===null&&(T=L);break}e&&T&&W.alternate===null&&t(C,T),v=o(W,v,P),O===null?E=W:O.sibling=W,O=W,T=L}if(P===w.length)return n(C,T),Xt&&fs(C,P),E;if(T===null){for(;PP?(L=T,T=null):L=T.sibling;var I=h(C,T,W.value,M);if(I===null){T===null&&(T=L);break}e&&T&&I.alternate===null&&t(C,T),v=o(I,v,P),O===null?E=I:O.sibling=I,O=I,T=L}if(W.done)return n(C,T),Xt&&fs(C,P),E;if(T===null){for(;!W.done;P++,W=w.next())W=d(C,W.value,M),W!==null&&(v=o(W,v,P),O===null?E=W:O.sibling=W,O=W);return Xt&&fs(C,P),E}for(T=r(C,T);!W.done;P++,W=w.next())W=g(T,C,P,W.value,M),W!==null&&(e&&W.alternate!==null&&T.delete(W.key===null?P:W.key),v=o(W,v,P),O===null?E=W:O.sibling=W,O=W);return e&&T.forEach(function(R){return t(C,R)}),Xt&&fs(C,P),E}function k(C,v,w,M){if(typeof w=="object"&&w!==null&&w.type===ta&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case cu:e:{for(var E=w.key,O=v;O!==null;){if(O.key===E){if(E=w.type,E===ta){if(O.tag===7){n(C,O.sibling),v=i(O,w.props.children),v.return=C,C=v;break e}}else if(O.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xo&&e2(E)===O.type){n(C,O.sibling),v=i(O,w.props),v.ref=sl(C,O,w),v.return=C,C=v;break e}n(C,O);break}else t(C,O);O=O.sibling}w.type===ta?(v=Cs(w.props.children,C.mode,M,w.key),v.return=C,C=v):(M=lf(w.type,w.key,w.props,null,C.mode,M),M.ref=sl(C,v,w),M.return=C,C=M)}return s(C);case ea:e:{for(O=w.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(C,v.sibling),v=i(v,w.children||[]),v.return=C,C=v;break e}else{n(C,v);break}else t(C,v);v=v.sibling}v=Jh(w,C.mode,M),v.return=C,C=v}return s(C);case xo:return O=w._init,k(C,v,O(w._payload),M)}if(wl(w))return m(C,v,w,M);if(tl(w))return y(C,v,w,M);xu(C,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(C,v.sibling),v=i(v,w),v.return=C,C=v):(n(C,v),v=Qh(w,C.mode,M),v.return=C,C=v),s(C)):n(C,v)}return k}var La=y5(!0),w5=y5(!1),Df=ts(null),If=null,ca=null,Ap=null;function Lp(){Ap=ca=If=null}function Op(e){var t=Df.current;qt(Df),e._currentValue=t}function s0(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _a(e,t){If=e,Ap=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(yr=!0),e.firstContext=null)}function Yr(e){var t=e._currentValue;if(Ap!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(If===null)throw Error(ae(308));ca=e,If.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var vs=null;function Rp(e){vs===null?vs=[e]:vs.push(e)}function x5(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Rp(t)):(n.next=i.next,i.next=n),t.interleaved=n,io(e,r)}function io(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var bo=!1;function Dp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function b5(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Tt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,io(e,n)}return i=r.interleaved,i===null?(t.next=t,Rp(r)):(t.next=i.next,i.next=t),r.interleaved=t,io(e,n)}function tf(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wp(e,n)}}function t2(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nf(e,t,n,r){var i=e.updateQueue;bo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane,g=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,g=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(g,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,h=typeof m=="function"?m.call(g,d,h):m,h==null)break e;d=an({},d,h);break e;case 2:bo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=g,l=d):u=u.next=g,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ds|=s,e.lanes=s,e.memoizedState=d}}function n2(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Yh.transition;Yh.transition={};try{e(!1),t()}finally{$t=n,Yh.transition=r}}function $5(){return Kr().memoizedState}function Yb(e,t,n){var r=Bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},U5(e))F5(t,n);else if(n=x5(e,t,n,r),n!==null){var i=ar();oi(n,e,r,i),B5(n,t,r)}}function Kb(e,t,n){var r=Bo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(U5(e))F5(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,li(a,s)){var l=t.interleaved;l===null?(i.next=i,Rp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=x5(e,t,i,r),n!==null&&(i=ar(),oi(n,e,r,i),B5(n,t,r))}}function U5(e){var t=e.alternate;return e===sn||t!==null&&t===sn}function F5(e,t){Nl=$f=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function B5(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wp(e,n)}}var Uf={readContext:Yr,useCallback:Gn,useContext:Gn,useEffect:Gn,useImperativeHandle:Gn,useInsertionEffect:Gn,useLayoutEffect:Gn,useMemo:Gn,useReducer:Gn,useRef:Gn,useState:Gn,useDebugValue:Gn,useDeferredValue:Gn,useTransition:Gn,useMutableSource:Gn,useSyncExternalStore:Gn,useId:Gn,unstable_isNewReconciler:!1},qb={readContext:Yr,useCallback:function(e,t){return gi().memoizedState=[e,t===void 0?null:t],e},useContext:Yr,useEffect:i2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rf(4194308,4,R5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rf(4194308,4,e,t)},useInsertionEffect:function(e,t){return rf(4,2,e,t)},useMemo:function(e,t){var n=gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Yb.bind(null,sn,e),[r.memoizedState,e]},useRef:function(e){var t=gi();return e={current:e},t.memoizedState=e},useState:r2,useDebugValue:jp,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=r2(!1),t=e[0];return e=Vb.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sn,i=gi();if(Xt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Wn===null)throw Error(ae(349));Rs&30||k5(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,i2(M5.bind(null,r,o,e),[e]),r.flags|=2048,mc(9,E5.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gi(),t=Wn.identifierPrefix;if(Xt){var n=Yi,r=Vi;n=(r&~(1<<32-ii(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pc++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ah=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wl(e):""}function k8(e){switch(e.tag){case 5:return wl(e.type);case 16:return wl("Lazy");case 13:return wl("Suspense");case 19:return wl("SuspenseList");case 0:case 2:case 15:return e=Lh(e.type,!1),e;case 11:return e=Lh(e.type.render,!1),e;case 1:return e=Lh(e.type,!0),e;default:return""}}function N1(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 na:return"Fragment";case ta:return"Portal";case R1:return"Profiler";case gp:return"StrictMode";case D1:return"Suspense";case I1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _w:return(e.displayName||"Context")+".Consumer";case bw:return(e._context.displayName||"Context")+".Provider";case mp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vp:return t=e.displayName||null,t!==null?t:N1(e.type)||"Memo";case xo:t=e._payload,e=e._init;try{return N1(e(t))}catch{}}return null}function E8(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 N1(t);case 8:return t===gp?"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 Yo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M8(e){var t=Sw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fu(e){e._valueTracker||(e._valueTracker=M8(e))}function kw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _f(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 W1(e,t){var n=t.checked;return an({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Sm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ew(e,t){t=t.checked,t!=null&&pp(e,"checked",t,!1)}function $1(e,t){Ew(e,t);var n=Yo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?U1(e,t.type,n):t.hasOwnProperty("defaultValue")&&U1(e,t.type,Yo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function km(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function U1(e,t,n){(t!=="number"||_f(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=du.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ol={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},T8=["Webkit","ms","Moz","O"];Object.keys(Ol).forEach(function(e){T8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ol[t]=Ol[e]})});function Aw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ol.hasOwnProperty(e)&&Ol[e]?(""+t).trim():t+"px"}function Lw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Aw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var P8=an({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 j1(e,t){if(t){if(P8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function H1(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 z1=null;function yp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var V1=null,xa=null,ba=null;function Tm(e){if(e=jc(e)){if(typeof V1!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Id(t),V1(e.stateNode,e.type,t))}}function Ow(e){xa?ba?ba.push(e):ba=[e]:xa=e}function Rw(){if(xa){var e=xa,t=ba;if(ba=xa=null,Tm(e),t)for(e=0;e>>=0,e===0?32:31-(F8(e)/B8|0)|0}var hu=64,pu=4194304;function bl(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 Ef(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=bl(a):(o&=s,o!==0&&(r=bl(o)))}else s=n&~i,s!==0?r=bl(s):o!==0&&(r=bl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ii(t),e[t]=n}function V8(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Dl),Wm=" ",$m=!1;function Xw(e,t){switch(e){case"keyup":return wb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function e5(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ra=!1;function bb(e,t){switch(e){case"compositionend":return e5(t);case"keypress":return t.which!==32?null:($m=!0,Wm);case"textInput":return e=t.data,e===Wm&&$m?null:e;default:return null}}function _b(e,t){if(ra)return e==="compositionend"||!Ep&&Xw(e,t)?(e=Qw(),ef=Cp=Eo=null,ra=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jm(n)}}function i5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?i5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function o5(){for(var e=window,t=_f();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_f(e.document)}return t}function Mp(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 Lb(e){var t=o5(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&i5(n.ownerDocument.documentElement,n)){if(r!==null&&Mp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Hm(n,o);var s=Hm(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ia=null,Q1=null,Nl=null,J1=!1;function zm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;J1||ia==null||ia!==_f(r)||(r=ia,"selectionStart"in r&&Mp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nl&&cc(Nl,r)||(Nl=r,r=Pf(Q1,"onSelect"),0aa||(e.current=i0[aa],i0[aa]=null,aa--)}function zt(e,t){aa++,i0[aa]=e.current,e.current=t}var Ko={},nr=ts(Ko),wr=ts(!1),Os=Ko;function Aa(e,t){var n=e.type.contextTypes;if(!n)return Ko;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xr(e){return e=e.childContextTypes,e!=null}function Lf(){Kt(wr),Kt(nr)}function Qm(e,t,n){if(nr.current!==Ko)throw Error(ae(168));zt(nr,t),zt(wr,n)}function p5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,E8(e)||"Unknown",i));return an({},n,r)}function Of(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ko,Os=nr.current,zt(nr,e),zt(wr,wr.current),!0}function Jm(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=p5(e,t,Os),r.__reactInternalMemoizedMergedChildContext=e,Kt(wr),Kt(nr),zt(nr,e)):Kt(wr),zt(wr,n)}var Bi=null,Nd=!1,Vh=!1;function g5(e){Bi===null?Bi=[e]:Bi.push(e)}function Hb(e){Nd=!0,g5(e)}function ns(){if(!Vh&&Bi!==null){Vh=!0;var e=0,t=Ut;try{var n=Bi;for(Ut=1;e>=s,i-=s,Vi=1<<32-ii(t)+i|n<P?(L=T,T=null):L=T.sibling;var W=h(C,T,w[P],M);if(W===null){T===null&&(T=L);break}e&&T&&W.alternate===null&&t(C,T),v=o(W,v,P),O===null?E=W:O.sibling=W,O=W,T=L}if(P===w.length)return n(C,T),Jt&&ds(C,P),E;if(T===null){for(;PP?(L=T,T=null):L=T.sibling;var I=h(C,T,W.value,M);if(I===null){T===null&&(T=L);break}e&&T&&I.alternate===null&&t(C,T),v=o(I,v,P),O===null?E=I:O.sibling=I,O=I,T=L}if(W.done)return n(C,T),Jt&&ds(C,P),E;if(T===null){for(;!W.done;P++,W=w.next())W=d(C,W.value,M),W!==null&&(v=o(W,v,P),O===null?E=W:O.sibling=W,O=W);return Jt&&ds(C,P),E}for(T=r(C,T);!W.done;P++,W=w.next())W=g(T,C,P,W.value,M),W!==null&&(e&&W.alternate!==null&&T.delete(W.key===null?P:W.key),v=o(W,v,P),O===null?E=W:O.sibling=W,O=W);return e&&T.forEach(function(R){return t(C,R)}),Jt&&ds(C,P),E}function k(C,v,w,M){if(typeof w=="object"&&w!==null&&w.type===na&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case uu:e:{for(var E=w.key,O=v;O!==null;){if(O.key===E){if(E=w.type,E===na){if(O.tag===7){n(C,O.sibling),v=i(O,w.props.children),v.return=C,C=v;break e}}else if(O.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xo&&t2(E)===O.type){n(C,O.sibling),v=i(O,w.props),v.ref=al(C,O,w),v.return=C,C=v;break e}n(C,O);break}else t(C,O);O=O.sibling}w.type===na?(v=Ss(w.props.children,C.mode,M,w.key),v.return=C,C=v):(M=cf(w.type,w.key,w.props,null,C.mode,M),M.ref=al(C,v,w),M.return=C,C=M)}return s(C);case ta:e:{for(O=w.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(C,v.sibling),v=i(v,w.children||[]),v.return=C,C=v;break e}else{n(C,v);break}else t(C,v);v=v.sibling}v=Xh(w,C.mode,M),v.return=C,C=v}return s(C);case xo:return O=w._init,k(C,v,O(w._payload),M)}if(xl(w))return m(C,v,w,M);if(nl(w))return y(C,v,w,M);bu(C,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(C,v.sibling),v=i(v,w),v.return=C,C=v):(n(C,v),v=Jh(w,C.mode,M),v.return=C,C=v),s(C)):n(C,v)}return k}var Oa=w5(!0),x5=w5(!1),If=ts(null),Nf=null,ua=null,Lp=null;function Op(){Lp=ua=Nf=null}function Rp(e){var t=If.current;Kt(If),e._currentValue=t}function a0(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ca(e,t){Nf=e,Lp=ua=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(yr=!0),e.firstContext=null)}function Yr(e){var t=e._currentValue;if(Lp!==e)if(e={context:e,memoizedValue:t,next:null},ua===null){if(Nf===null)throw Error(ae(308));ua=e,Nf.dependencies={lanes:0,firstContext:e}}else ua=ua.next=e;return t}var ys=null;function Dp(e){ys===null?ys=[e]:ys.push(e)}function b5(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Dp(t)):(n.next=i.next,i.next=n),t.interleaved=n,io(e,r)}function io(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var bo=!1;function Ip(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _5(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,io(e,n)}return i=r.interleaved,i===null?(t.next=t,Dp(r)):(t.next=i.next,i.next=t),r.interleaved=t,io(e,n)}function nf(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xp(e,n)}}function n2(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wf(e,t,n,r){var i=e.updateQueue;bo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane,g=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(h=t,g=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(g,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,h=typeof m=="function"?m.call(g,d,h):m,h==null)break e;d=an({},d,h);break e;case 2:bo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=g,l=d):u=u.next=g,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Is|=s,e.lanes=s,e.memoizedState=d}}function r2(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Kh.transition;Kh.transition={};try{e(!1),t()}finally{Ut=n,Kh.transition=r}}function U5(){return Kr().memoizedState}function Kb(e,t,n){var r=Bo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},F5(e))B5(t,n);else if(n=b5(e,t,n,r),n!==null){var i=ar();oi(n,e,r,i),j5(n,t,r)}}function qb(e,t,n){var r=Bo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(F5(e))B5(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,li(a,s)){var l=t.interleaved;l===null?(i.next=i,Dp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=b5(e,t,i,r),n!==null&&(i=ar(),oi(n,e,r,i),j5(n,t,r))}}function F5(e){var t=e.alternate;return e===sn||t!==null&&t===sn}function B5(e,t){Wl=Uf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function j5(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xp(e,n)}}var Ff={readContext:Yr,useCallback:Gn,useContext:Gn,useEffect:Gn,useImperativeHandle:Gn,useInsertionEffect:Gn,useLayoutEffect:Gn,useMemo:Gn,useReducer:Gn,useRef:Gn,useState:Gn,useDebugValue:Gn,useDeferredValue:Gn,useTransition:Gn,useMutableSource:Gn,useSyncExternalStore:Gn,useId:Gn,unstable_isNewReconciler:!1},Gb={readContext:Yr,useCallback:function(e,t){return gi().memoizedState=[e,t===void 0?null:t],e},useContext:Yr,useEffect:o2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,of(4194308,4,D5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return of(4194308,4,e,t)},useInsertionEffect:function(e,t){return of(4,2,e,t)},useMemo:function(e,t){var n=gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Kb.bind(null,sn,e),[r.memoizedState,e]},useRef:function(e){var t=gi();return e={current:e},t.memoizedState=e},useState:i2,useDebugValue:Hp,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=i2(!1),t=e[0];return e=Yb.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sn,i=gi();if(Jt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Wn===null)throw Error(ae(349));Ds&30||E5(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,o2(T5.bind(null,r,o,e),[e]),r.flags|=2048,vc(9,M5.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=gi(),t=Wn.identifierPrefix;if(Jt){var n=Yi,r=Vi;n=(r&~(1<<32-ii(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[vi]=t,e[fc]=r,Q5(e,t,!1,!1),t.stateNode=e;e:{switch(s=j1(n,r),n){case"dialog":Vt("cancel",e),Vt("close",e),i=r;break;case"iframe":case"object":case"embed":Vt("load",e),i=r;break;case"video":case"audio":for(i=0;iDa&&(t.flags|=128,r=!0,al(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),al(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Xt)return Zn(t),null}else 2*yn()-o.renderingStartTime>Da&&n!==1073741824&&(t.flags|=128,r=!0,al(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=yn(),t.sibling=null,n=on.current,zt(on,r?n&1|2:n&1),t):(Zn(t),null);case 22:case 23:return qp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Er&1073741824&&(Zn(t),t.subtreeFlags&6&&(t.flags|=8192)):Zn(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function n_(e,t){switch(Tp(t),t.tag){case 1:return xr(t.type)&&Af(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(),qt(wr),qt(nr),Wp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Np(t),null;case 13:if(qt(on),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(on),null;case 4:return Oa(),null;case 10:return Op(t.type._context),null;case 22:case 23:return qp(),null;case 24:return null;default:return null}}var _u=!1,Jn=!1,r_=typeof WeakSet=="function"?WeakSet:Set,_e=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pn(e,t,r)}else n.current=null}function g0(e,t,n){try{n()}catch(r){pn(e,t,r)}}var g2=!1;function i_(e,t){if(J1=Ef,e=i5(),Ep(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)h=d,d=g;for(;;){if(d===e)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(g=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(X1={focusedElem:e,selectionRange:n},Ef=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,k=m.memoizedState,C=t.stateNode,v=C.getSnapshotBeforeUpdate(t.elementType===t.type?y:Jr(t.type,y),k);C.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(M){pn(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return m=g2,g2=!1,m}function Wl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&g0(t,n,o)}i=i.next}while(i!==r)}}function $d(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function m0(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function e3(e){var t=e.alternate;t!==null&&(e.alternate=null,e3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vi],delete t[fc],delete t[n0],delete t[Fb],delete t[Bb])),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 t3(e){return e.tag===5||e.tag===3||e.tag===4}function m2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||t3(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 v0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pf));else if(r!==4&&(e=e.child,e!==null))for(v0(e,t,n),e=e.sibling;e!==null;)v0(e,t,n),e=e.sibling}function y0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(y0(e,t,n),e=e.sibling;e!==null;)y0(e,t,n),e=e.sibling}var Bn=null,Xr=!1;function vo(e,t,n){for(n=n.child;n!==null;)n3(e,t,n),n=n.sibling}function n3(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(Ad,n)}catch{}switch(n.tag){case 5:Jn||ua(n,t);case 6:var r=Bn,i=Xr;Bn=null,vo(e,t,n),Bn=r,Xr=i,Bn!==null&&(Xr?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(Xr?(e=Bn,n=n.stateNode,e.nodeType===8?Hh(e.parentNode,n):e.nodeType===1&&Hh(e,n),sc(e)):Hh(Bn,n.stateNode));break;case 4:r=Bn,i=Xr,Bn=n.stateNode.containerInfo,Xr=!0,vo(e,t,n),Bn=r,Xr=i;break;case 0:case 11:case 14:case 15:if(!Jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&g0(n,t,s),i=i.next}while(i!==r)}vo(e,t,n);break;case 1:if(!Jn&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){pn(n,t,a)}vo(e,t,n);break;case 21:vo(e,t,n);break;case 22:n.mode&1?(Jn=(r=Jn)||n.memoizedState!==null,vo(e,t,n),Jn=r):vo(e,t,n);break;default:vo(e,t,n)}}function v2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new r_),t.forEach(function(r){var i=h_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Qr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=yn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s_(r/1960))-r,10e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,jf=0,Tt&6)throw Error(ae(331));var i=Tt;for(Tt|=4,_e=e.current;_e!==null;){var o=_e,s=o.child;if(_e.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lyn()-Yp?_s(e,0):Vp|=n),br(e,t)}function u3(e,t){t===0&&(e.mode&1?(t=hu,hu<<=1,!(hu&130023424)&&(hu=4194304)):t=1);var n=ar();e=io(e,t),e!==null&&(Uc(e,t,n),br(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),u3(e,n)}function h_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),u3(e,n)}var f3;f3=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wr.current)yr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return yr=!1,e_(e,t,n);yr=!!(e.flags&131072)}else yr=!1,Xt&&t.flags&1048576&&g5(t,Rf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;of(e,t),e=t.pendingProps;var i=Pa(t,nr.current);_a(t,n),i=Up(null,t,r,e,i,n);var o=Fp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(o=!0,Lf(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Dp(t),i.updater=Wd,t.stateNode=i,i._reactInternals=t,l0(t,r,e,n),t=f0(null,t,r,!0,o,n)):(t.tag=0,Xt&&o&&Mp(t),sr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(of(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=g_(r),e=Jr(r,e),i){case 0:t=u0(null,t,r,e,n);break e;case 1:t=d2(null,t,r,e,n);break e;case 11:t=u2(null,t,r,e,n);break e;case 14:t=f2(null,t,r,Jr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),u0(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),d2(e,t,r,i,n);case 3:e:{if(q5(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,i=o.element,b5(e,t),Nf(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ra(Error(ae(423)),t),t=h2(e,t,r,n,i);break e}else if(r!==i){i=Ra(Error(ae(424)),t),t=h2(e,t,r,n,i);break e}else for(Mr=$o(t.stateNode.containerInfo.firstChild),Ar=t,Xt=!0,ti=null,n=w5(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Aa(),r===i){t=oo(e,t,n);break e}sr(e,t,r,n)}t=t.child}return t;case 5:return _5(t),e===null&&o0(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,e0(r,i)?s=null:o!==null&&e0(r,o)&&(t.flags|=32),K5(e,t),sr(e,t,s,n),t.child;case 6:return e===null&&o0(t),null;case 13:return G5(e,t,n);case 4:return Ip(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):sr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),u2(e,t,r,i,n);case 7:return sr(e,t,t.pendingProps,n),t.child;case 8:return sr(e,t,t.pendingProps.children,n),t.child;case 12:return sr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,zt(Df,r._currentValue),r._currentValue=s,o!==null)if(li(o.value,s)){if(o.children===i.children&&!wr.current){t=oo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Qi(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),s0(o.return,n,t),a.lanes|=n;break}l=l.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(ae(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),s0(s,n,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}sr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_a(t,n),i=Yr(i),r=r(i),t.flags|=1,sr(e,t,r,n),t.child;case 14:return r=t.type,i=Jr(r,t.pendingProps),i=Jr(r.type,i),f2(e,t,r,i,n);case 15:return V5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),of(e,t),t.tag=1,xr(r)?(e=!0,Lf(t)):e=!1,_a(t,n),j5(t,r,i),l0(t,r,i,n),f0(null,t,r,!0,e,n);case 19:return Z5(e,t,n);case 22:return Y5(e,t,n)}throw Error(ae(156,t.tag))};function d3(e,t){return Uw(e,t)}function p_(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(e,t,n,r){return new p_(e,t,n,r)}function Zp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function g_(e){if(typeof e=="function")return Zp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gp)return 11;if(e===mp)return 14}return 2}function jo(e,t){var n=e.alternate;return n===null?(n=jr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function lf(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Zp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ta:return Cs(n.children,i,o,t);case pp:s=8,i|=8;break;case O1:return e=jr(12,n,t,i|2),e.elementType=O1,e.lanes=o,e;case R1:return e=jr(13,n,t,i),e.elementType=R1,e.lanes=o,e;case D1:return e=jr(19,n,t,i),e.elementType=D1,e.lanes=o,e;case _w:return Fd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xw:s=10;break e;case bw:s=9;break e;case gp:s=11;break e;case mp:s=14;break e;case xo:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=jr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Cs(e,t,n,r){return e=jr(7,e,r,t),e.lanes=n,e}function Fd(e,t,n,r){return e=jr(22,e,r,t),e.elementType=_w,e.lanes=n,e.stateNode={isHidden:!1},e}function Qh(e,t,n){return e=jr(6,e,null,t),e.lanes=n,e}function Jh(e,t,n){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(e,t,n,r,i){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=Oh(0),this.expirationTimes=Oh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qp(e,t,n,r,i,o,s,a,l){return e=new m_(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=jr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dp(o),e}function v_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m3)}catch(e){console.error(e)}}m3(),mw.exports=Rr;var __=mw.exports,k2=__;A1.createRoot=k2.createRoot,A1.hydrateRoot=k2.hydrateRoot;var v3={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():(t.nacl||(t.nacl={}),t.nacl.util=n())})(iw,function(){var t={};function n(r){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(r){if(typeof r!="string")throw new TypeError("expected string");var i,o=unescape(encodeURIComponent(r)),s=new Uint8Array(o.length);for(i=0;i"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],s=r.length;for(i=0;i>24&255,p[x+1]=b>>16&255,p[x+2]=b>>8&255,p[x+3]=b&255,p[x+4]=f>>24&255,p[x+5]=f>>16&255,p[x+6]=f>>8&255,p[x+7]=f&255}function y(p,x,b,f,S){var $,U=0;for($=0;$>>8)-1}function k(p,x,b,f){return y(p,x,b,f,16)}function C(p,x,b,f){return y(p,x,b,f,32)}function v(p,x,b,f){for(var S=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,$=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,U=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,X=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,ce=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Me=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,he=x[0]&255|(x[1]&255)<<8|(x[2]&255)<<16|(x[3]&255)<<24,kt=x[4]&255|(x[5]&255)<<8|(x[6]&255)<<16|(x[7]&255)<<24,we=x[8]&255|(x[9]&255)<<8|(x[10]&255)<<16|(x[11]&255)<<24,Ve=x[12]&255|(x[13]&255)<<8|(x[14]&255)<<16|(x[15]&255)<<24,Ke=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,nt=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,et=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,qe=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Qe=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Ge=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,Se=S,Le=$,me=U,ke=X,Ee=ce,de=Me,j=he,H=kt,re=we,J=Ve,ee=Ke,se=nt,Fe=et,rt=qe,lt=Qe,it=Ge,A,pt=0;pt<20;pt+=2)A=Se+Fe|0,Ee^=A<<7|A>>>25,A=Ee+Se|0,re^=A<<9|A>>>23,A=re+Ee|0,Fe^=A<<13|A>>>19,A=Fe+re|0,Se^=A<<18|A>>>14,A=de+Le|0,J^=A<<7|A>>>25,A=J+de|0,rt^=A<<9|A>>>23,A=rt+J|0,Le^=A<<13|A>>>19,A=Le+rt|0,de^=A<<18|A>>>14,A=ee+j|0,lt^=A<<7|A>>>25,A=lt+ee|0,me^=A<<9|A>>>23,A=me+lt|0,j^=A<<13|A>>>19,A=j+me|0,ee^=A<<18|A>>>14,A=it+se|0,ke^=A<<7|A>>>25,A=ke+it|0,H^=A<<9|A>>>23,A=H+ke|0,se^=A<<13|A>>>19,A=se+H|0,it^=A<<18|A>>>14,A=Se+ke|0,Le^=A<<7|A>>>25,A=Le+Se|0,me^=A<<9|A>>>23,A=me+Le|0,ke^=A<<13|A>>>19,A=ke+me|0,Se^=A<<18|A>>>14,A=de+Ee|0,j^=A<<7|A>>>25,A=j+de|0,H^=A<<9|A>>>23,A=H+j|0,Ee^=A<<13|A>>>19,A=Ee+H|0,de^=A<<18|A>>>14,A=ee+J|0,se^=A<<7|A>>>25,A=se+ee|0,re^=A<<9|A>>>23,A=re+se|0,J^=A<<13|A>>>19,A=J+re|0,ee^=A<<18|A>>>14,A=it+lt|0,Fe^=A<<7|A>>>25,A=Fe+it|0,rt^=A<<9|A>>>23,A=rt+Fe|0,lt^=A<<13|A>>>19,A=lt+rt|0,it^=A<<18|A>>>14;Se=Se+S|0,Le=Le+$|0,me=me+U|0,ke=ke+X|0,Ee=Ee+ce|0,de=de+Me|0,j=j+he|0,H=H+kt|0,re=re+we|0,J=J+Ve|0,ee=ee+Ke|0,se=se+nt|0,Fe=Fe+et|0,rt=rt+qe|0,lt=lt+Qe|0,it=it+Ge|0,p[0]=Se>>>0&255,p[1]=Se>>>8&255,p[2]=Se>>>16&255,p[3]=Se>>>24&255,p[4]=Le>>>0&255,p[5]=Le>>>8&255,p[6]=Le>>>16&255,p[7]=Le>>>24&255,p[8]=me>>>0&255,p[9]=me>>>8&255,p[10]=me>>>16&255,p[11]=me>>>24&255,p[12]=ke>>>0&255,p[13]=ke>>>8&255,p[14]=ke>>>16&255,p[15]=ke>>>24&255,p[16]=Ee>>>0&255,p[17]=Ee>>>8&255,p[18]=Ee>>>16&255,p[19]=Ee>>>24&255,p[20]=de>>>0&255,p[21]=de>>>8&255,p[22]=de>>>16&255,p[23]=de>>>24&255,p[24]=j>>>0&255,p[25]=j>>>8&255,p[26]=j>>>16&255,p[27]=j>>>24&255,p[28]=H>>>0&255,p[29]=H>>>8&255,p[30]=H>>>16&255,p[31]=H>>>24&255,p[32]=re>>>0&255,p[33]=re>>>8&255,p[34]=re>>>16&255,p[35]=re>>>24&255,p[36]=J>>>0&255,p[37]=J>>>8&255,p[38]=J>>>16&255,p[39]=J>>>24&255,p[40]=ee>>>0&255,p[41]=ee>>>8&255,p[42]=ee>>>16&255,p[43]=ee>>>24&255,p[44]=se>>>0&255,p[45]=se>>>8&255,p[46]=se>>>16&255,p[47]=se>>>24&255,p[48]=Fe>>>0&255,p[49]=Fe>>>8&255,p[50]=Fe>>>16&255,p[51]=Fe>>>24&255,p[52]=rt>>>0&255,p[53]=rt>>>8&255,p[54]=rt>>>16&255,p[55]=rt>>>24&255,p[56]=lt>>>0&255,p[57]=lt>>>8&255,p[58]=lt>>>16&255,p[59]=lt>>>24&255,p[60]=it>>>0&255,p[61]=it>>>8&255,p[62]=it>>>16&255,p[63]=it>>>24&255}function w(p,x,b,f){for(var S=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,$=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,U=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,X=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,ce=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Me=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,he=x[0]&255|(x[1]&255)<<8|(x[2]&255)<<16|(x[3]&255)<<24,kt=x[4]&255|(x[5]&255)<<8|(x[6]&255)<<16|(x[7]&255)<<24,we=x[8]&255|(x[9]&255)<<8|(x[10]&255)<<16|(x[11]&255)<<24,Ve=x[12]&255|(x[13]&255)<<8|(x[14]&255)<<16|(x[15]&255)<<24,Ke=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,nt=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,et=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,qe=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Qe=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Ge=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,Se=S,Le=$,me=U,ke=X,Ee=ce,de=Me,j=he,H=kt,re=we,J=Ve,ee=Ke,se=nt,Fe=et,rt=qe,lt=Qe,it=Ge,A,pt=0;pt<20;pt+=2)A=Se+Fe|0,Ee^=A<<7|A>>>25,A=Ee+Se|0,re^=A<<9|A>>>23,A=re+Ee|0,Fe^=A<<13|A>>>19,A=Fe+re|0,Se^=A<<18|A>>>14,A=de+Le|0,J^=A<<7|A>>>25,A=J+de|0,rt^=A<<9|A>>>23,A=rt+J|0,Le^=A<<13|A>>>19,A=Le+rt|0,de^=A<<18|A>>>14,A=ee+j|0,lt^=A<<7|A>>>25,A=lt+ee|0,me^=A<<9|A>>>23,A=me+lt|0,j^=A<<13|A>>>19,A=j+me|0,ee^=A<<18|A>>>14,A=it+se|0,ke^=A<<7|A>>>25,A=ke+it|0,H^=A<<9|A>>>23,A=H+ke|0,se^=A<<13|A>>>19,A=se+H|0,it^=A<<18|A>>>14,A=Se+ke|0,Le^=A<<7|A>>>25,A=Le+Se|0,me^=A<<9|A>>>23,A=me+Le|0,ke^=A<<13|A>>>19,A=ke+me|0,Se^=A<<18|A>>>14,A=de+Ee|0,j^=A<<7|A>>>25,A=j+de|0,H^=A<<9|A>>>23,A=H+j|0,Ee^=A<<13|A>>>19,A=Ee+H|0,de^=A<<18|A>>>14,A=ee+J|0,se^=A<<7|A>>>25,A=se+ee|0,re^=A<<9|A>>>23,A=re+se|0,J^=A<<13|A>>>19,A=J+re|0,ee^=A<<18|A>>>14,A=it+lt|0,Fe^=A<<7|A>>>25,A=Fe+it|0,rt^=A<<9|A>>>23,A=rt+Fe|0,lt^=A<<13|A>>>19,A=lt+rt|0,it^=A<<18|A>>>14;p[0]=Se>>>0&255,p[1]=Se>>>8&255,p[2]=Se>>>16&255,p[3]=Se>>>24&255,p[4]=de>>>0&255,p[5]=de>>>8&255,p[6]=de>>>16&255,p[7]=de>>>24&255,p[8]=ee>>>0&255,p[9]=ee>>>8&255,p[10]=ee>>>16&255,p[11]=ee>>>24&255,p[12]=it>>>0&255,p[13]=it>>>8&255,p[14]=it>>>16&255,p[15]=it>>>24&255,p[16]=j>>>0&255,p[17]=j>>>8&255,p[18]=j>>>16&255,p[19]=j>>>24&255,p[20]=H>>>0&255,p[21]=H>>>8&255,p[22]=H>>>16&255,p[23]=H>>>24&255,p[24]=re>>>0&255,p[25]=re>>>8&255,p[26]=re>>>16&255,p[27]=re>>>24&255,p[28]=J>>>0&255,p[29]=J>>>8&255,p[30]=J>>>16&255,p[31]=J>>>24&255}function M(p,x,b,f){v(p,x,b,f)}function E(p,x,b,f){w(p,x,b,f)}var O=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(p,x,b,f,S,$,U){var X=new Uint8Array(16),ce=new Uint8Array(64),Me,he;for(he=0;he<16;he++)X[he]=0;for(he=0;he<8;he++)X[he]=$[he];for(;S>=64;){for(M(ce,X,U,O),he=0;he<64;he++)p[x+he]=b[f+he]^ce[he];for(Me=1,he=8;he<16;he++)Me=Me+(X[he]&255)|0,X[he]=Me&255,Me>>>=8;S-=64,x+=64,f+=64}if(S>0)for(M(ce,X,U,O),he=0;he=64;){for(M(U,$,S,O),ce=0;ce<64;ce++)p[x+ce]=U[ce];for(X=1,ce=8;ce<16;ce++)X=X+($[ce]&255)|0,$[ce]=X&255,X>>>=8;b-=64,x+=64}if(b>0)for(M(U,$,S,O),ce=0;ce>>13|b<<3)&8191,f=p[4]&255|(p[5]&255)<<8,this.r[2]=(b>>>10|f<<6)&7939,S=p[6]&255|(p[7]&255)<<8,this.r[3]=(f>>>7|S<<9)&8191,$=p[8]&255|(p[9]&255)<<8,this.r[4]=(S>>>4|$<<12)&255,this.r[5]=$>>>1&8190,U=p[10]&255|(p[11]&255)<<8,this.r[6]=($>>>14|U<<2)&8191,X=p[12]&255|(p[13]&255)<<8,this.r[7]=(U>>>11|X<<5)&8065,ce=p[14]&255|(p[15]&255)<<8,this.r[8]=(X>>>8|ce<<8)&8191,this.r[9]=ce>>>5&127,this.pad[0]=p[16]&255|(p[17]&255)<<8,this.pad[1]=p[18]&255|(p[19]&255)<<8,this.pad[2]=p[20]&255|(p[21]&255)<<8,this.pad[3]=p[22]&255|(p[23]&255)<<8,this.pad[4]=p[24]&255|(p[25]&255)<<8,this.pad[5]=p[26]&255|(p[27]&255)<<8,this.pad[6]=p[28]&255|(p[29]&255)<<8,this.pad[7]=p[30]&255|(p[31]&255)<<8};I.prototype.blocks=function(p,x,b){for(var f=this.fin?0:2048,S,$,U,X,ce,Me,he,kt,we,Ve,Ke,nt,et,qe,Qe,Ge,Se,Le,me,ke=this.h[0],Ee=this.h[1],de=this.h[2],j=this.h[3],H=this.h[4],re=this.h[5],J=this.h[6],ee=this.h[7],se=this.h[8],Fe=this.h[9],rt=this.r[0],lt=this.r[1],it=this.r[2],A=this.r[3],pt=this.r[4],Et=this.r[5],Mt=this.r[6],dt=this.r[7],bt=this.r[8],_t=this.r[9];b>=16;)S=p[x+0]&255|(p[x+1]&255)<<8,ke+=S&8191,$=p[x+2]&255|(p[x+3]&255)<<8,Ee+=(S>>>13|$<<3)&8191,U=p[x+4]&255|(p[x+5]&255)<<8,de+=($>>>10|U<<6)&8191,X=p[x+6]&255|(p[x+7]&255)<<8,j+=(U>>>7|X<<9)&8191,ce=p[x+8]&255|(p[x+9]&255)<<8,H+=(X>>>4|ce<<12)&8191,re+=ce>>>1&8191,Me=p[x+10]&255|(p[x+11]&255)<<8,J+=(ce>>>14|Me<<2)&8191,he=p[x+12]&255|(p[x+13]&255)<<8,ee+=(Me>>>11|he<<5)&8191,kt=p[x+14]&255|(p[x+15]&255)<<8,se+=(he>>>8|kt<<8)&8191,Fe+=kt>>>5|f,we=0,Ve=we,Ve+=ke*rt,Ve+=Ee*(5*_t),Ve+=de*(5*bt),Ve+=j*(5*dt),Ve+=H*(5*Mt),we=Ve>>>13,Ve&=8191,Ve+=re*(5*Et),Ve+=J*(5*pt),Ve+=ee*(5*A),Ve+=se*(5*it),Ve+=Fe*(5*lt),we+=Ve>>>13,Ve&=8191,Ke=we,Ke+=ke*lt,Ke+=Ee*rt,Ke+=de*(5*_t),Ke+=j*(5*bt),Ke+=H*(5*dt),we=Ke>>>13,Ke&=8191,Ke+=re*(5*Mt),Ke+=J*(5*Et),Ke+=ee*(5*pt),Ke+=se*(5*A),Ke+=Fe*(5*it),we+=Ke>>>13,Ke&=8191,nt=we,nt+=ke*it,nt+=Ee*lt,nt+=de*rt,nt+=j*(5*_t),nt+=H*(5*bt),we=nt>>>13,nt&=8191,nt+=re*(5*dt),nt+=J*(5*Mt),nt+=ee*(5*Et),nt+=se*(5*pt),nt+=Fe*(5*A),we+=nt>>>13,nt&=8191,et=we,et+=ke*A,et+=Ee*it,et+=de*lt,et+=j*rt,et+=H*(5*_t),we=et>>>13,et&=8191,et+=re*(5*bt),et+=J*(5*dt),et+=ee*(5*Mt),et+=se*(5*Et),et+=Fe*(5*pt),we+=et>>>13,et&=8191,qe=we,qe+=ke*pt,qe+=Ee*A,qe+=de*it,qe+=j*lt,qe+=H*rt,we=qe>>>13,qe&=8191,qe+=re*(5*_t),qe+=J*(5*bt),qe+=ee*(5*dt),qe+=se*(5*Mt),qe+=Fe*(5*Et),we+=qe>>>13,qe&=8191,Qe=we,Qe+=ke*Et,Qe+=Ee*pt,Qe+=de*A,Qe+=j*it,Qe+=H*lt,we=Qe>>>13,Qe&=8191,Qe+=re*rt,Qe+=J*(5*_t),Qe+=ee*(5*bt),Qe+=se*(5*dt),Qe+=Fe*(5*Mt),we+=Qe>>>13,Qe&=8191,Ge=we,Ge+=ke*Mt,Ge+=Ee*Et,Ge+=de*pt,Ge+=j*A,Ge+=H*it,we=Ge>>>13,Ge&=8191,Ge+=re*lt,Ge+=J*rt,Ge+=ee*(5*_t),Ge+=se*(5*bt),Ge+=Fe*(5*dt),we+=Ge>>>13,Ge&=8191,Se=we,Se+=ke*dt,Se+=Ee*Mt,Se+=de*Et,Se+=j*pt,Se+=H*A,we=Se>>>13,Se&=8191,Se+=re*it,Se+=J*lt,Se+=ee*rt,Se+=se*(5*_t),Se+=Fe*(5*bt),we+=Se>>>13,Se&=8191,Le=we,Le+=ke*bt,Le+=Ee*dt,Le+=de*Mt,Le+=j*Et,Le+=H*pt,we=Le>>>13,Le&=8191,Le+=re*A,Le+=J*it,Le+=ee*lt,Le+=se*rt,Le+=Fe*(5*_t),we+=Le>>>13,Le&=8191,me=we,me+=ke*_t,me+=Ee*bt,me+=de*dt,me+=j*Mt,me+=H*Et,we=me>>>13,me&=8191,me+=re*pt,me+=J*A,me+=ee*it,me+=se*lt,me+=Fe*rt,we+=me>>>13,me&=8191,we=(we<<2)+we|0,we=we+Ve|0,Ve=we&8191,we=we>>>13,Ke+=we,ke=Ve,Ee=Ke,de=nt,j=et,H=qe,re=Qe,J=Ge,ee=Se,se=Le,Fe=me,x+=16,b-=16;this.h[0]=ke,this.h[1]=Ee,this.h[2]=de,this.h[3]=j,this.h[4]=H,this.h[5]=re,this.h[6]=J,this.h[7]=ee,this.h[8]=se,this.h[9]=Fe},I.prototype.finish=function(p,x){var b=new Uint16Array(10),f,S,$,U;if(this.leftover){for(U=this.leftover,this.buffer[U++]=1;U<16;U++)this.buffer[U]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(f=this.h[1]>>>13,this.h[1]&=8191,U=2;U<10;U++)this.h[U]+=f,f=this.h[U]>>>13,this.h[U]&=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,b[0]=this.h[0]+5,f=b[0]>>>13,b[0]&=8191,U=1;U<10;U++)b[U]=this.h[U]+f,f=b[U]>>>13,b[U]&=8191;for(b[9]-=8192,S=(f^1)-1,U=0;U<10;U++)b[U]&=S;for(S=~S,U=0;U<10;U++)this.h[U]=this.h[U]&S|b[U];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,$=this.h[0]+this.pad[0],this.h[0]=$&65535,U=1;U<8;U++)$=(this.h[U]+this.pad[U]|0)+($>>>16)|0,this.h[U]=$&65535;p[x+0]=this.h[0]>>>0&255,p[x+1]=this.h[0]>>>8&255,p[x+2]=this.h[1]>>>0&255,p[x+3]=this.h[1]>>>8&255,p[x+4]=this.h[2]>>>0&255,p[x+5]=this.h[2]>>>8&255,p[x+6]=this.h[3]>>>0&255,p[x+7]=this.h[3]>>>8&255,p[x+8]=this.h[4]>>>0&255,p[x+9]=this.h[4]>>>8&255,p[x+10]=this.h[5]>>>0&255,p[x+11]=this.h[5]>>>8&255,p[x+12]=this.h[6]>>>0&255,p[x+13]=this.h[6]>>>8&255,p[x+14]=this.h[7]>>>0&255,p[x+15]=this.h[7]>>>8&255},I.prototype.update=function(p,x,b){var f,S;if(this.leftover){for(S=16-this.leftover,S>b&&(S=b),f=0;f=16&&(S=b-b%16,this.blocks(p,x,S),x+=S,b-=S),b){for(f=0;f>16&1),$[b-1]&=65535;$[15]=U[15]-32767-($[14]>>16&1),S=$[15]>>16&1,$[14]&=65535,Q(U,$,1-S)}for(b=0;b<16;b++)p[2*b]=U[b]&255,p[2*b+1]=U[b]>>8}function ge(p,x){var b=new Uint8Array(32),f=new Uint8Array(32);return ue(b,p),ue(f,x),C(b,0,f,0)}function Ze(p){var x=new Uint8Array(32);return ue(x,p),x[0]&1}function je(p,x){var b;for(b=0;b<16;b++)p[b]=x[2*b]+(x[2*b+1]<<8);p[15]&=32767}function st(p,x,b){for(var f=0;f<16;f++)p[f]=x[f]+b[f]}function ft(p,x,b){for(var f=0;f<16;f++)p[f]=x[f]-b[f]}function Pe(p,x,b){var f,S,$=0,U=0,X=0,ce=0,Me=0,he=0,kt=0,we=0,Ve=0,Ke=0,nt=0,et=0,qe=0,Qe=0,Ge=0,Se=0,Le=0,me=0,ke=0,Ee=0,de=0,j=0,H=0,re=0,J=0,ee=0,se=0,Fe=0,rt=0,lt=0,it=0,A=b[0],pt=b[1],Et=b[2],Mt=b[3],dt=b[4],bt=b[5],_t=b[6],gn=b[7],Wt=b[8],un=b[9],fn=b[10],dn=b[11],Mn=b[12],Yn=b[13],Kn=b[14],qn=b[15];f=x[0],$+=f*A,U+=f*pt,X+=f*Et,ce+=f*Mt,Me+=f*dt,he+=f*bt,kt+=f*_t,we+=f*gn,Ve+=f*Wt,Ke+=f*un,nt+=f*fn,et+=f*dn,qe+=f*Mn,Qe+=f*Yn,Ge+=f*Kn,Se+=f*qn,f=x[1],U+=f*A,X+=f*pt,ce+=f*Et,Me+=f*Mt,he+=f*dt,kt+=f*bt,we+=f*_t,Ve+=f*gn,Ke+=f*Wt,nt+=f*un,et+=f*fn,qe+=f*dn,Qe+=f*Mn,Ge+=f*Yn,Se+=f*Kn,Le+=f*qn,f=x[2],X+=f*A,ce+=f*pt,Me+=f*Et,he+=f*Mt,kt+=f*dt,we+=f*bt,Ve+=f*_t,Ke+=f*gn,nt+=f*Wt,et+=f*un,qe+=f*fn,Qe+=f*dn,Ge+=f*Mn,Se+=f*Yn,Le+=f*Kn,me+=f*qn,f=x[3],ce+=f*A,Me+=f*pt,he+=f*Et,kt+=f*Mt,we+=f*dt,Ve+=f*bt,Ke+=f*_t,nt+=f*gn,et+=f*Wt,qe+=f*un,Qe+=f*fn,Ge+=f*dn,Se+=f*Mn,Le+=f*Yn,me+=f*Kn,ke+=f*qn,f=x[4],Me+=f*A,he+=f*pt,kt+=f*Et,we+=f*Mt,Ve+=f*dt,Ke+=f*bt,nt+=f*_t,et+=f*gn,qe+=f*Wt,Qe+=f*un,Ge+=f*fn,Se+=f*dn,Le+=f*Mn,me+=f*Yn,ke+=f*Kn,Ee+=f*qn,f=x[5],he+=f*A,kt+=f*pt,we+=f*Et,Ve+=f*Mt,Ke+=f*dt,nt+=f*bt,et+=f*_t,qe+=f*gn,Qe+=f*Wt,Ge+=f*un,Se+=f*fn,Le+=f*dn,me+=f*Mn,ke+=f*Yn,Ee+=f*Kn,de+=f*qn,f=x[6],kt+=f*A,we+=f*pt,Ve+=f*Et,Ke+=f*Mt,nt+=f*dt,et+=f*bt,qe+=f*_t,Qe+=f*gn,Ge+=f*Wt,Se+=f*un,Le+=f*fn,me+=f*dn,ke+=f*Mn,Ee+=f*Yn,de+=f*Kn,j+=f*qn,f=x[7],we+=f*A,Ve+=f*pt,Ke+=f*Et,nt+=f*Mt,et+=f*dt,qe+=f*bt,Qe+=f*_t,Ge+=f*gn,Se+=f*Wt,Le+=f*un,me+=f*fn,ke+=f*dn,Ee+=f*Mn,de+=f*Yn,j+=f*Kn,H+=f*qn,f=x[8],Ve+=f*A,Ke+=f*pt,nt+=f*Et,et+=f*Mt,qe+=f*dt,Qe+=f*bt,Ge+=f*_t,Se+=f*gn,Le+=f*Wt,me+=f*un,ke+=f*fn,Ee+=f*dn,de+=f*Mn,j+=f*Yn,H+=f*Kn,re+=f*qn,f=x[9],Ke+=f*A,nt+=f*pt,et+=f*Et,qe+=f*Mt,Qe+=f*dt,Ge+=f*bt,Se+=f*_t,Le+=f*gn,me+=f*Wt,ke+=f*un,Ee+=f*fn,de+=f*dn,j+=f*Mn,H+=f*Yn,re+=f*Kn,J+=f*qn,f=x[10],nt+=f*A,et+=f*pt,qe+=f*Et,Qe+=f*Mt,Ge+=f*dt,Se+=f*bt,Le+=f*_t,me+=f*gn,ke+=f*Wt,Ee+=f*un,de+=f*fn,j+=f*dn,H+=f*Mn,re+=f*Yn,J+=f*Kn,ee+=f*qn,f=x[11],et+=f*A,qe+=f*pt,Qe+=f*Et,Ge+=f*Mt,Se+=f*dt,Le+=f*bt,me+=f*_t,ke+=f*gn,Ee+=f*Wt,de+=f*un,j+=f*fn,H+=f*dn,re+=f*Mn,J+=f*Yn,ee+=f*Kn,se+=f*qn,f=x[12],qe+=f*A,Qe+=f*pt,Ge+=f*Et,Se+=f*Mt,Le+=f*dt,me+=f*bt,ke+=f*_t,Ee+=f*gn,de+=f*Wt,j+=f*un,H+=f*fn,re+=f*dn,J+=f*Mn,ee+=f*Yn,se+=f*Kn,Fe+=f*qn,f=x[13],Qe+=f*A,Ge+=f*pt,Se+=f*Et,Le+=f*Mt,me+=f*dt,ke+=f*bt,Ee+=f*_t,de+=f*gn,j+=f*Wt,H+=f*un,re+=f*fn,J+=f*dn,ee+=f*Mn,se+=f*Yn,Fe+=f*Kn,rt+=f*qn,f=x[14],Ge+=f*A,Se+=f*pt,Le+=f*Et,me+=f*Mt,ke+=f*dt,Ee+=f*bt,de+=f*_t,j+=f*gn,H+=f*Wt,re+=f*un,J+=f*fn,ee+=f*dn,se+=f*Mn,Fe+=f*Yn,rt+=f*Kn,lt+=f*qn,f=x[15],Se+=f*A,Le+=f*pt,me+=f*Et,ke+=f*Mt,Ee+=f*dt,de+=f*bt,j+=f*_t,H+=f*gn,re+=f*Wt,J+=f*un,ee+=f*fn,se+=f*dn,Fe+=f*Mn,rt+=f*Yn,lt+=f*Kn,it+=f*qn,$+=38*Le,U+=38*me,X+=38*ke,ce+=38*Ee,Me+=38*de,he+=38*j,kt+=38*H,we+=38*re,Ve+=38*J,Ke+=38*ee,nt+=38*se,et+=38*Fe,qe+=38*rt,Qe+=38*lt,Ge+=38*it,S=1,f=$+S+65535,S=Math.floor(f/65536),$=f-S*65536,f=U+S+65535,S=Math.floor(f/65536),U=f-S*65536,f=X+S+65535,S=Math.floor(f/65536),X=f-S*65536,f=ce+S+65535,S=Math.floor(f/65536),ce=f-S*65536,f=Me+S+65535,S=Math.floor(f/65536),Me=f-S*65536,f=he+S+65535,S=Math.floor(f/65536),he=f-S*65536,f=kt+S+65535,S=Math.floor(f/65536),kt=f-S*65536,f=we+S+65535,S=Math.floor(f/65536),we=f-S*65536,f=Ve+S+65535,S=Math.floor(f/65536),Ve=f-S*65536,f=Ke+S+65535,S=Math.floor(f/65536),Ke=f-S*65536,f=nt+S+65535,S=Math.floor(f/65536),nt=f-S*65536,f=et+S+65535,S=Math.floor(f/65536),et=f-S*65536,f=qe+S+65535,S=Math.floor(f/65536),qe=f-S*65536,f=Qe+S+65535,S=Math.floor(f/65536),Qe=f-S*65536,f=Ge+S+65535,S=Math.floor(f/65536),Ge=f-S*65536,f=Se+S+65535,S=Math.floor(f/65536),Se=f-S*65536,$+=S-1+37*(S-1),S=1,f=$+S+65535,S=Math.floor(f/65536),$=f-S*65536,f=U+S+65535,S=Math.floor(f/65536),U=f-S*65536,f=X+S+65535,S=Math.floor(f/65536),X=f-S*65536,f=ce+S+65535,S=Math.floor(f/65536),ce=f-S*65536,f=Me+S+65535,S=Math.floor(f/65536),Me=f-S*65536,f=he+S+65535,S=Math.floor(f/65536),he=f-S*65536,f=kt+S+65535,S=Math.floor(f/65536),kt=f-S*65536,f=we+S+65535,S=Math.floor(f/65536),we=f-S*65536,f=Ve+S+65535,S=Math.floor(f/65536),Ve=f-S*65536,f=Ke+S+65535,S=Math.floor(f/65536),Ke=f-S*65536,f=nt+S+65535,S=Math.floor(f/65536),nt=f-S*65536,f=et+S+65535,S=Math.floor(f/65536),et=f-S*65536,f=qe+S+65535,S=Math.floor(f/65536),qe=f-S*65536,f=Qe+S+65535,S=Math.floor(f/65536),Qe=f-S*65536,f=Ge+S+65535,S=Math.floor(f/65536),Ge=f-S*65536,f=Se+S+65535,S=Math.floor(f/65536),Se=f-S*65536,$+=S-1+37*(S-1),p[0]=$,p[1]=U,p[2]=X,p[3]=ce,p[4]=Me,p[5]=he,p[6]=kt,p[7]=we,p[8]=Ve,p[9]=Ke,p[10]=nt,p[11]=et,p[12]=qe,p[13]=Qe,p[14]=Ge,p[15]=Se}function tt(p,x){Pe(p,x,x)}function rr(p,x){var b=n(),f;for(f=0;f<16;f++)b[f]=x[f];for(f=253;f>=0;f--)tt(b,b),f!==2&&f!==4&&Pe(b,b,x);for(f=0;f<16;f++)p[f]=b[f]}function K(p,x){var b=n(),f;for(f=0;f<16;f++)b[f]=x[f];for(f=250;f>=0;f--)tt(b,b),f!==1&&Pe(b,b,x);for(f=0;f<16;f++)p[f]=b[f]}function q(p,x,b){var f=new Uint8Array(32),S=new Float64Array(80),$,U,X=n(),ce=n(),Me=n(),he=n(),kt=n(),we=n();for(U=0;U<31;U++)f[U]=x[U];for(f[31]=x[31]&127|64,f[0]&=248,je(S,b),U=0;U<16;U++)ce[U]=S[U],he[U]=X[U]=Me[U]=0;for(X[0]=he[0]=1,U=254;U>=0;--U)$=f[U>>>3]>>>(U&7)&1,Q(X,ce,$),Q(Me,he,$),st(kt,X,Me),ft(X,X,Me),st(Me,ce,he),ft(ce,ce,he),tt(he,kt),tt(we,X),Pe(X,Me,X),Pe(Me,ce,kt),st(kt,X,Me),ft(X,X,Me),tt(ce,X),ft(Me,he,we),Pe(X,Me,l),st(X,X,he),Pe(Me,Me,X),Pe(X,he,we),Pe(he,ce,S),tt(ce,kt),Q(X,ce,$),Q(Me,he,$);for(U=0;U<16;U++)S[U+16]=X[U],S[U+32]=Me[U],S[U+48]=ce[U],S[U+64]=he[U];var Ve=S.subarray(32),Ke=S.subarray(16);return rr(Ve,Ve),Pe(Ke,Ke,Ve),ue(p,Ke),0}function B(p,x){return q(p,x,o)}function te(p,x){return r(x,32),B(p,x)}function ne(p,x,b){var f=new Uint8Array(32);return q(f,b,x),E(p,i,f,O)}var ie=Z,Te=Y;function Ae(p,x,b,f,S,$){var U=new Uint8Array(32);return ne(U,S,$),ie(p,x,b,f,U)}function Xe(p,x,b,f,S,$){var U=new Uint8Array(32);return ne(U,S,$),Te(p,x,b,f,U)}var Dt=[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 We(p,x,b,f){for(var S=new Int32Array(16),$=new Int32Array(16),U,X,ce,Me,he,kt,we,Ve,Ke,nt,et,qe,Qe,Ge,Se,Le,me,ke,Ee,de,j,H,re,J,ee,se,Fe=p[0],rt=p[1],lt=p[2],it=p[3],A=p[4],pt=p[5],Et=p[6],Mt=p[7],dt=x[0],bt=x[1],_t=x[2],gn=x[3],Wt=x[4],un=x[5],fn=x[6],dn=x[7],Mn=0;f>=128;){for(Ee=0;Ee<16;Ee++)de=8*Ee+Mn,S[Ee]=b[de+0]<<24|b[de+1]<<16|b[de+2]<<8|b[de+3],$[Ee]=b[de+4]<<24|b[de+5]<<16|b[de+6]<<8|b[de+7];for(Ee=0;Ee<80;Ee++)if(U=Fe,X=rt,ce=lt,Me=it,he=A,kt=pt,we=Et,Ve=Mt,Ke=dt,nt=bt,et=_t,qe=gn,Qe=Wt,Ge=un,Se=fn,Le=dn,j=Mt,H=dn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=(A>>>14|Wt<<18)^(A>>>18|Wt<<14)^(Wt>>>9|A<<23),H=(Wt>>>14|A<<18)^(Wt>>>18|A<<14)^(A>>>9|Wt<<23),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=A&pt^~A&Et,H=Wt&un^~Wt&fn,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=Dt[Ee*2],H=Dt[Ee*2+1],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=S[Ee%16],H=$[Ee%16],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,me=ee&65535|se<<16,ke=re&65535|J<<16,j=me,H=ke,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=(Fe>>>28|dt<<4)^(dt>>>2|Fe<<30)^(dt>>>7|Fe<<25),H=(dt>>>28|Fe<<4)^(Fe>>>2|dt<<30)^(Fe>>>7|dt<<25),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=Fe&rt^Fe<^rt<,H=dt&bt^dt&_t^bt&_t,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,Ve=ee&65535|se<<16,Le=re&65535|J<<16,j=Me,H=qe,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=me,H=ke,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,Me=ee&65535|se<<16,qe=re&65535|J<<16,rt=U,lt=X,it=ce,A=Me,pt=he,Et=kt,Mt=we,Fe=Ve,bt=Ke,_t=nt,gn=et,Wt=qe,un=Qe,fn=Ge,dn=Se,dt=Le,Ee%16===15)for(de=0;de<16;de++)j=S[de],H=$[de],re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=S[(de+9)%16],H=$[(de+9)%16],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,me=S[(de+1)%16],ke=$[(de+1)%16],j=(me>>>1|ke<<31)^(me>>>8|ke<<24)^me>>>7,H=(ke>>>1|me<<31)^(ke>>>8|me<<24)^(ke>>>7|me<<25),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,me=S[(de+14)%16],ke=$[(de+14)%16],j=(me>>>19|ke<<13)^(ke>>>29|me<<3)^me>>>6,H=(ke>>>19|me<<13)^(me>>>29|ke<<3)^(ke>>>6|me<<26),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,S[de]=ee&65535|se<<16,$[de]=re&65535|J<<16;j=Fe,H=dt,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[0],H=x[0],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[0]=Fe=ee&65535|se<<16,x[0]=dt=re&65535|J<<16,j=rt,H=bt,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[1],H=x[1],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[1]=rt=ee&65535|se<<16,x[1]=bt=re&65535|J<<16,j=lt,H=_t,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[2],H=x[2],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[2]=lt=ee&65535|se<<16,x[2]=_t=re&65535|J<<16,j=it,H=gn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[3],H=x[3],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[3]=it=ee&65535|se<<16,x[3]=gn=re&65535|J<<16,j=A,H=Wt,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[4],H=x[4],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[4]=A=ee&65535|se<<16,x[4]=Wt=re&65535|J<<16,j=pt,H=un,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[5],H=x[5],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[5]=pt=ee&65535|se<<16,x[5]=un=re&65535|J<<16,j=Et,H=fn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[6],H=x[6],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[6]=Et=ee&65535|se<<16,x[6]=fn=re&65535|J<<16,j=Mt,H=dn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[7],H=x[7],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[7]=Mt=ee&65535|se<<16,x[7]=dn=re&65535|J<<16,Mn+=128,f-=128}return f}function Qt(p,x,b){var f=new Int32Array(8),S=new Int32Array(8),$=new Uint8Array(256),U,X=b;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,S[0]=4089235720,S[1]=2227873595,S[2]=4271175723,S[3]=1595750129,S[4]=2917565137,S[5]=725511199,S[6]=4215389547,S[7]=327033209,We(f,S,x,b),b%=128,U=0;U=0;--S)f=b[S/8|0]>>(S&7)&1,dr(p,x,f),ln(x,p),ln(p,p),dr(p,x,f)}function ir(p,x){var b=[n(),n(),n(),n()];fe(b[0],d),fe(b[1],h),fe(b[2],a),Pe(b[3],d,h),En(p,b,x)}function Ue(p,x,b){var f=new Uint8Array(64),S=[n(),n(),n(),n()],$;for(b||r(x,32),Qt(f,x,32),f[0]&=248,f[31]&=127,f[31]|=64,ir(S,f),Cn(p,S),$=0;$<32;$++)x[$+32]=p[$];return 0}var yt=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 He(p,x){var b,f,S,$;for(f=63;f>=32;--f){for(b=0,S=f-32,$=f-12;S<$;++S)x[S]+=b-16*x[f]*yt[S-(f-32)],b=Math.floor((x[S]+128)/256),x[S]-=b*256;x[S]+=b,x[f]=0}for(b=0,S=0;S<32;S++)x[S]+=b-(x[31]>>4)*yt[S],b=x[S]>>8,x[S]&=255;for(S=0;S<32;S++)x[S]-=b*yt[S];for(f=0;f<32;f++)x[f+1]+=x[f]>>8,p[f]=x[f]&255}function Pt(p){var x=new Float64Array(64),b;for(b=0;b<64;b++)x[b]=p[b];for(b=0;b<64;b++)p[b]=0;He(p,x)}function Rn(p,x,b,f){var S=new Uint8Array(64),$=new Uint8Array(64),U=new Uint8Array(64),X,ce,Me=new Float64Array(64),he=[n(),n(),n(),n()];Qt(S,f,32),S[0]&=248,S[31]&=127,S[31]|=64;var kt=b+64;for(X=0;X>7&&ft(p[0],s,p[0]),Pe(p[3],p[0],p[1]),0)}function wt(p,x,b,f){var S,$=new Uint8Array(32),U=new Uint8Array(64),X=[n(),n(),n(),n()],ce=[n(),n(),n(),n()];if(b<64||hr(ce,f))return-1;for(S=0;S=0},t.sign.keyPair=function(){var p=new Uint8Array(ze),x=new Uint8Array(jt);return Ue(p,x),{publicKey:p,secretKey:x}},t.sign.keyPair.fromSecretKey=function(p){if(or(p),p.length!==jt)throw new Error("bad secret key size");for(var x=new Uint8Array(ze),b=0;b=e.length)throw new Error("Index is out of buffer");const n=e.slice(0,t),r=e.slice(t);return[n,r]}function Xh(e){let t="";return e.forEach(n=>{t+=("0"+(n&255).toString(16)).slice(-2)}),t}function Yf(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[vi]=t,e[dc]=r,J5(e,t,!1,!1),t.stateNode=e;e:{switch(s=H1(n,r),n){case"dialog":Vt("cancel",e),Vt("close",e),i=r;break;case"iframe":case"object":case"embed":Vt("load",e),i=r;break;case"video":case"audio":for(i=0;i<_l.length;i++)Vt(_l[i],e);i=r;break;case"source":Vt("error",e),i=r;break;case"img":case"image":case"link":Vt("error",e),Vt("load",e),i=r;break;case"details":Vt("toggle",e),i=r;break;case"input":Sm(e,r),i=W1(e,r),Vt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=an({},r,{value:void 0}),Vt("invalid",e);break;case"textarea":Em(e,r),i=F1(e,r),Vt("invalid",e);break;default:i=r}j1(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?Lw(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pw(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&rc(e,l):typeof l=="number"&&rc(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(nc.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Vt("scroll",e):l!=null&&pp(e,o,l,s))}switch(n){case"input":fu(e),km(e,r,!1);break;case"textarea":fu(e),Mm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Yo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?wa(e,!!r.multiple,o,!1):r.defaultValue!=null&&wa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Af)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Zn(t),null;case 6:if(e&&t.stateNode!=null)e3(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=ws(pc.current),ws(Si.current),xu(t)){if(r=t.stateNode,n=t.memoizedProps,r[vi]=t,(o=r.nodeValue!==n)&&(e=Ar,e!==null))switch(e.tag){case 3:wu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[vi]=t,t.stateNode=r}return Zn(t),null;case 13:if(Kt(on),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Jt&&Mr!==null&&t.mode&1&&!(t.flags&128))y5(),La(),t.flags|=98560,o=!1;else if(o=xu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ae(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ae(317));o[vi]=t}else La(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Zn(t),o=!1}else ti!==null&&(C0(ti),ti=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||on.current&1?Ln===0&&(Ln=3):Zp())),t.updateQueue!==null&&(t.flags|=4),Zn(t),null);case 4:return Ra(),g0(e,t),e===null&&uc(t.stateNode.containerInfo),Zn(t),null;case 10:return Rp(t.type._context),Zn(t),null;case 17:return xr(t.type)&&Lf(),Zn(t),null;case 19:if(Kt(on),o=t.memoizedState,o===null)return Zn(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)ll(o,!1);else{if(Ln!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=$f(e),s!==null){for(t.flags|=128,ll(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return zt(on,on.current&1|2),t.child}e=e.sibling}o.tail!==null&&yn()>Ia&&(t.flags|=128,r=!0,ll(o,!1),t.lanes=4194304)}else{if(!r)if(e=$f(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ll(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Jt)return Zn(t),null}else 2*yn()-o.renderingStartTime>Ia&&n!==1073741824&&(t.flags|=128,r=!0,ll(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=yn(),t.sibling=null,n=on.current,zt(on,r?n&1|2:n&1),t):(Zn(t),null);case 22:case 23:return Gp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Er&1073741824&&(Zn(t),t.subtreeFlags&6&&(t.flags|=8192)):Zn(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function r_(e,t){switch(Pp(t),t.tag){case 1:return xr(t.type)&&Lf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ra(),Kt(wr),Kt(nr),$p(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wp(t),null;case 13:if(Kt(on),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kt(on),null;case 4:return Ra(),null;case 10:return Rp(t.type._context),null;case 22:case 23:return Gp(),null;case 24:return null;default:return null}}var Cu=!1,Jn=!1,i_=typeof WeakSet=="function"?WeakSet:Set,_e=null;function fa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pn(e,t,r)}else n.current=null}function m0(e,t,n){try{n()}catch(r){pn(e,t,r)}}var m2=!1;function o_(e,t){if(X1=Mf,e=o5(),Mp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)h=d,d=g;for(;;){if(d===e)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(g=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(e0={focusedElem:e,selectionRange:n},Mf=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,k=m.memoizedState,C=t.stateNode,v=C.getSnapshotBeforeUpdate(t.elementType===t.type?y:Jr(t.type,y),k);C.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(M){pn(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return m=m2,m2=!1,m}function $l(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&m0(t,n,o)}i=i.next}while(i!==r)}}function Ud(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function v0(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function t3(e){var t=e.alternate;t!==null&&(e.alternate=null,t3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vi],delete t[dc],delete t[r0],delete t[Bb],delete t[jb])),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 n3(e){return e.tag===5||e.tag===3||e.tag===4}function v2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||n3(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 y0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Af));else if(r!==4&&(e=e.child,e!==null))for(y0(e,t,n),e=e.sibling;e!==null;)y0(e,t,n),e=e.sibling}function w0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}var Bn=null,Xr=!1;function vo(e,t,n){for(n=n.child;n!==null;)r3(e,t,n),n=n.sibling}function r3(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(Ld,n)}catch{}switch(n.tag){case 5:Jn||fa(n,t);case 6:var r=Bn,i=Xr;Bn=null,vo(e,t,n),Bn=r,Xr=i,Bn!==null&&(Xr?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(Xr?(e=Bn,n=n.stateNode,e.nodeType===8?zh(e.parentNode,n):e.nodeType===1&&zh(e,n),ac(e)):zh(Bn,n.stateNode));break;case 4:r=Bn,i=Xr,Bn=n.stateNode.containerInfo,Xr=!0,vo(e,t,n),Bn=r,Xr=i;break;case 0:case 11:case 14:case 15:if(!Jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&m0(n,t,s),i=i.next}while(i!==r)}vo(e,t,n);break;case 1:if(!Jn&&(fa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){pn(n,t,a)}vo(e,t,n);break;case 21:vo(e,t,n);break;case 22:n.mode&1?(Jn=(r=Jn)||n.memoizedState!==null,vo(e,t,n),Jn=r):vo(e,t,n);break;default:vo(e,t,n)}}function y2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i_),t.forEach(function(r){var i=p_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Qr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=yn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*a_(r/1960))-r,10e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,Hf=0,Pt&6)throw Error(ae(331));var i=Pt;for(Pt|=4,_e=e.current;_e!==null;){var o=_e,s=o.child;if(_e.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lyn()-Kp?Cs(e,0):Yp|=n),br(e,t)}function f3(e,t){t===0&&(e.mode&1?(t=pu,pu<<=1,!(pu&130023424)&&(pu=4194304)):t=1);var n=ar();e=io(e,t),e!==null&&(Fc(e,t,n),br(e,n))}function h_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),f3(e,n)}function p_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),f3(e,n)}var d3;d3=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wr.current)yr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return yr=!1,t_(e,t,n);yr=!!(e.flags&131072)}else yr=!1,Jt&&t.flags&1048576&&m5(t,Df,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;sf(e,t),e=t.pendingProps;var i=Aa(t,nr.current);Ca(t,n),i=Fp(null,t,r,e,i,n);var o=Bp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(o=!0,Of(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ip(t),i.updater=$d,t.stateNode=i,i._reactInternals=t,c0(t,r,e,n),t=d0(null,t,r,!0,o,n)):(t.tag=0,Jt&&o&&Tp(t),sr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(sf(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=m_(r),e=Jr(r,e),i){case 0:t=f0(null,t,r,e,n);break e;case 1:t=h2(null,t,r,e,n);break e;case 11:t=f2(null,t,r,e,n);break e;case 14:t=d2(null,t,r,Jr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),f0(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),h2(e,t,r,i,n);case 3:e:{if(G5(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_5(e,t),Wf(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Da(Error(ae(423)),t),t=p2(e,t,r,n,i);break e}else if(r!==i){i=Da(Error(ae(424)),t),t=p2(e,t,r,n,i);break e}else for(Mr=$o(t.stateNode.containerInfo.firstChild),Ar=t,Jt=!0,ti=null,n=x5(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(La(),r===i){t=oo(e,t,n);break e}sr(e,t,r,n)}t=t.child}return t;case 5:return C5(t),e===null&&s0(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,t0(r,i)?s=null:o!==null&&t0(r,o)&&(t.flags|=32),q5(e,t),sr(e,t,s,n),t.child;case 6:return e===null&&s0(t),null;case 13:return Z5(e,t,n);case 4:return Np(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):sr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),f2(e,t,r,i,n);case 7:return sr(e,t,t.pendingProps,n),t.child;case 8:return sr(e,t,t.pendingProps.children,n),t.child;case 12:return sr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,zt(If,r._currentValue),r._currentValue=s,o!==null)if(li(o.value,s)){if(o.children===i.children&&!wr.current){t=oo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Qi(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),a0(o.return,n,t),a.lanes|=n;break}l=l.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(ae(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),a0(s,n,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}sr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ca(t,n),i=Yr(i),r=r(i),t.flags|=1,sr(e,t,r,n),t.child;case 14:return r=t.type,i=Jr(r,t.pendingProps),i=Jr(r.type,i),d2(e,t,r,i,n);case 15:return Y5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),sf(e,t),t.tag=1,xr(r)?(e=!0,Of(t)):e=!1,Ca(t,n),H5(t,r,i),c0(t,r,i,n),d0(null,t,r,!0,e,n);case 19:return Q5(e,t,n);case 22:return K5(e,t,n)}throw Error(ae(156,t.tag))};function h3(e,t){return Fw(e,t)}function g_(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(e,t,n,r){return new g_(e,t,n,r)}function Qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function m_(e){if(typeof e=="function")return Qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mp)return 11;if(e===vp)return 14}return 2}function jo(e,t){var n=e.alternate;return n===null?(n=jr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cf(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Qp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case na:return Ss(n.children,i,o,t);case gp:s=8,i|=8;break;case R1:return e=jr(12,n,t,i|2),e.elementType=R1,e.lanes=o,e;case D1:return e=jr(13,n,t,i),e.elementType=D1,e.lanes=o,e;case I1:return e=jr(19,n,t,i),e.elementType=I1,e.lanes=o,e;case Cw:return Bd(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bw:s=10;break e;case _w:s=9;break e;case mp:s=11;break e;case vp:s=14;break e;case xo:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=jr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ss(e,t,n,r){return e=jr(7,e,r,t),e.lanes=n,e}function Bd(e,t,n,r){return e=jr(22,e,r,t),e.elementType=Cw,e.lanes=n,e.stateNode={isHidden:!1},e}function Jh(e,t,n){return e=jr(6,e,null,t),e.lanes=n,e}function Xh(e,t,n){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v_(e,t,n,r,i){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=Rh(0),this.expirationTimes=Rh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jp(e,t,n,r,i,o,s,a,l){return e=new v_(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=jr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ip(o),e}function y_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v3)}catch(e){console.error(e)}}v3(),vw.exports=Rr;var C_=vw.exports,E2=C_;L1.createRoot=E2.createRoot,L1.hydrateRoot=E2.hydrateRoot;var y3={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():(t.nacl||(t.nacl={}),t.nacl.util=n())})(ow,function(){var t={};function n(r){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(r){if(typeof r!="string")throw new TypeError("expected string");var i,o=unescape(encodeURIComponent(r)),s=new Uint8Array(o.length);for(i=0;i"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],s=r.length;for(i=0;i>24&255,p[x+1]=b>>16&255,p[x+2]=b>>8&255,p[x+3]=b&255,p[x+4]=f>>24&255,p[x+5]=f>>16&255,p[x+6]=f>>8&255,p[x+7]=f&255}function y(p,x,b,f,S){var $,U=0;for($=0;$>>8)-1}function k(p,x,b,f){return y(p,x,b,f,16)}function C(p,x,b,f){return y(p,x,b,f,32)}function v(p,x,b,f){for(var S=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,$=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,U=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,X=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,ce=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Me=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,he=x[0]&255|(x[1]&255)<<8|(x[2]&255)<<16|(x[3]&255)<<24,Et=x[4]&255|(x[5]&255)<<8|(x[6]&255)<<16|(x[7]&255)<<24,we=x[8]&255|(x[9]&255)<<8|(x[10]&255)<<16|(x[11]&255)<<24,Ve=x[12]&255|(x[13]&255)<<8|(x[14]&255)<<16|(x[15]&255)<<24,Ke=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,nt=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,et=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,qe=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Qe=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Ge=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,Se=S,Le=$,me=U,ke=X,Ee=ce,de=Me,j=he,H=Et,re=we,J=Ve,ee=Ke,se=nt,Fe=et,rt=qe,lt=Qe,it=Ge,A,pt=0;pt<20;pt+=2)A=Se+Fe|0,Ee^=A<<7|A>>>25,A=Ee+Se|0,re^=A<<9|A>>>23,A=re+Ee|0,Fe^=A<<13|A>>>19,A=Fe+re|0,Se^=A<<18|A>>>14,A=de+Le|0,J^=A<<7|A>>>25,A=J+de|0,rt^=A<<9|A>>>23,A=rt+J|0,Le^=A<<13|A>>>19,A=Le+rt|0,de^=A<<18|A>>>14,A=ee+j|0,lt^=A<<7|A>>>25,A=lt+ee|0,me^=A<<9|A>>>23,A=me+lt|0,j^=A<<13|A>>>19,A=j+me|0,ee^=A<<18|A>>>14,A=it+se|0,ke^=A<<7|A>>>25,A=ke+it|0,H^=A<<9|A>>>23,A=H+ke|0,se^=A<<13|A>>>19,A=se+H|0,it^=A<<18|A>>>14,A=Se+ke|0,Le^=A<<7|A>>>25,A=Le+Se|0,me^=A<<9|A>>>23,A=me+Le|0,ke^=A<<13|A>>>19,A=ke+me|0,Se^=A<<18|A>>>14,A=de+Ee|0,j^=A<<7|A>>>25,A=j+de|0,H^=A<<9|A>>>23,A=H+j|0,Ee^=A<<13|A>>>19,A=Ee+H|0,de^=A<<18|A>>>14,A=ee+J|0,se^=A<<7|A>>>25,A=se+ee|0,re^=A<<9|A>>>23,A=re+se|0,J^=A<<13|A>>>19,A=J+re|0,ee^=A<<18|A>>>14,A=it+lt|0,Fe^=A<<7|A>>>25,A=Fe+it|0,rt^=A<<9|A>>>23,A=rt+Fe|0,lt^=A<<13|A>>>19,A=lt+rt|0,it^=A<<18|A>>>14;Se=Se+S|0,Le=Le+$|0,me=me+U|0,ke=ke+X|0,Ee=Ee+ce|0,de=de+Me|0,j=j+he|0,H=H+Et|0,re=re+we|0,J=J+Ve|0,ee=ee+Ke|0,se=se+nt|0,Fe=Fe+et|0,rt=rt+qe|0,lt=lt+Qe|0,it=it+Ge|0,p[0]=Se>>>0&255,p[1]=Se>>>8&255,p[2]=Se>>>16&255,p[3]=Se>>>24&255,p[4]=Le>>>0&255,p[5]=Le>>>8&255,p[6]=Le>>>16&255,p[7]=Le>>>24&255,p[8]=me>>>0&255,p[9]=me>>>8&255,p[10]=me>>>16&255,p[11]=me>>>24&255,p[12]=ke>>>0&255,p[13]=ke>>>8&255,p[14]=ke>>>16&255,p[15]=ke>>>24&255,p[16]=Ee>>>0&255,p[17]=Ee>>>8&255,p[18]=Ee>>>16&255,p[19]=Ee>>>24&255,p[20]=de>>>0&255,p[21]=de>>>8&255,p[22]=de>>>16&255,p[23]=de>>>24&255,p[24]=j>>>0&255,p[25]=j>>>8&255,p[26]=j>>>16&255,p[27]=j>>>24&255,p[28]=H>>>0&255,p[29]=H>>>8&255,p[30]=H>>>16&255,p[31]=H>>>24&255,p[32]=re>>>0&255,p[33]=re>>>8&255,p[34]=re>>>16&255,p[35]=re>>>24&255,p[36]=J>>>0&255,p[37]=J>>>8&255,p[38]=J>>>16&255,p[39]=J>>>24&255,p[40]=ee>>>0&255,p[41]=ee>>>8&255,p[42]=ee>>>16&255,p[43]=ee>>>24&255,p[44]=se>>>0&255,p[45]=se>>>8&255,p[46]=se>>>16&255,p[47]=se>>>24&255,p[48]=Fe>>>0&255,p[49]=Fe>>>8&255,p[50]=Fe>>>16&255,p[51]=Fe>>>24&255,p[52]=rt>>>0&255,p[53]=rt>>>8&255,p[54]=rt>>>16&255,p[55]=rt>>>24&255,p[56]=lt>>>0&255,p[57]=lt>>>8&255,p[58]=lt>>>16&255,p[59]=lt>>>24&255,p[60]=it>>>0&255,p[61]=it>>>8&255,p[62]=it>>>16&255,p[63]=it>>>24&255}function w(p,x,b,f){for(var S=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,$=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,U=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,X=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,ce=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,Me=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,he=x[0]&255|(x[1]&255)<<8|(x[2]&255)<<16|(x[3]&255)<<24,Et=x[4]&255|(x[5]&255)<<8|(x[6]&255)<<16|(x[7]&255)<<24,we=x[8]&255|(x[9]&255)<<8|(x[10]&255)<<16|(x[11]&255)<<24,Ve=x[12]&255|(x[13]&255)<<8|(x[14]&255)<<16|(x[15]&255)<<24,Ke=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,nt=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,et=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,qe=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Qe=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Ge=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,Se=S,Le=$,me=U,ke=X,Ee=ce,de=Me,j=he,H=Et,re=we,J=Ve,ee=Ke,se=nt,Fe=et,rt=qe,lt=Qe,it=Ge,A,pt=0;pt<20;pt+=2)A=Se+Fe|0,Ee^=A<<7|A>>>25,A=Ee+Se|0,re^=A<<9|A>>>23,A=re+Ee|0,Fe^=A<<13|A>>>19,A=Fe+re|0,Se^=A<<18|A>>>14,A=de+Le|0,J^=A<<7|A>>>25,A=J+de|0,rt^=A<<9|A>>>23,A=rt+J|0,Le^=A<<13|A>>>19,A=Le+rt|0,de^=A<<18|A>>>14,A=ee+j|0,lt^=A<<7|A>>>25,A=lt+ee|0,me^=A<<9|A>>>23,A=me+lt|0,j^=A<<13|A>>>19,A=j+me|0,ee^=A<<18|A>>>14,A=it+se|0,ke^=A<<7|A>>>25,A=ke+it|0,H^=A<<9|A>>>23,A=H+ke|0,se^=A<<13|A>>>19,A=se+H|0,it^=A<<18|A>>>14,A=Se+ke|0,Le^=A<<7|A>>>25,A=Le+Se|0,me^=A<<9|A>>>23,A=me+Le|0,ke^=A<<13|A>>>19,A=ke+me|0,Se^=A<<18|A>>>14,A=de+Ee|0,j^=A<<7|A>>>25,A=j+de|0,H^=A<<9|A>>>23,A=H+j|0,Ee^=A<<13|A>>>19,A=Ee+H|0,de^=A<<18|A>>>14,A=ee+J|0,se^=A<<7|A>>>25,A=se+ee|0,re^=A<<9|A>>>23,A=re+se|0,J^=A<<13|A>>>19,A=J+re|0,ee^=A<<18|A>>>14,A=it+lt|0,Fe^=A<<7|A>>>25,A=Fe+it|0,rt^=A<<9|A>>>23,A=rt+Fe|0,lt^=A<<13|A>>>19,A=lt+rt|0,it^=A<<18|A>>>14;p[0]=Se>>>0&255,p[1]=Se>>>8&255,p[2]=Se>>>16&255,p[3]=Se>>>24&255,p[4]=de>>>0&255,p[5]=de>>>8&255,p[6]=de>>>16&255,p[7]=de>>>24&255,p[8]=ee>>>0&255,p[9]=ee>>>8&255,p[10]=ee>>>16&255,p[11]=ee>>>24&255,p[12]=it>>>0&255,p[13]=it>>>8&255,p[14]=it>>>16&255,p[15]=it>>>24&255,p[16]=j>>>0&255,p[17]=j>>>8&255,p[18]=j>>>16&255,p[19]=j>>>24&255,p[20]=H>>>0&255,p[21]=H>>>8&255,p[22]=H>>>16&255,p[23]=H>>>24&255,p[24]=re>>>0&255,p[25]=re>>>8&255,p[26]=re>>>16&255,p[27]=re>>>24&255,p[28]=J>>>0&255,p[29]=J>>>8&255,p[30]=J>>>16&255,p[31]=J>>>24&255}function M(p,x,b,f){v(p,x,b,f)}function E(p,x,b,f){w(p,x,b,f)}var O=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function T(p,x,b,f,S,$,U){var X=new Uint8Array(16),ce=new Uint8Array(64),Me,he;for(he=0;he<16;he++)X[he]=0;for(he=0;he<8;he++)X[he]=$[he];for(;S>=64;){for(M(ce,X,U,O),he=0;he<64;he++)p[x+he]=b[f+he]^ce[he];for(Me=1,he=8;he<16;he++)Me=Me+(X[he]&255)|0,X[he]=Me&255,Me>>>=8;S-=64,x+=64,f+=64}if(S>0)for(M(ce,X,U,O),he=0;he=64;){for(M(U,$,S,O),ce=0;ce<64;ce++)p[x+ce]=U[ce];for(X=1,ce=8;ce<16;ce++)X=X+($[ce]&255)|0,$[ce]=X&255,X>>>=8;b-=64,x+=64}if(b>0)for(M(U,$,S,O),ce=0;ce>>13|b<<3)&8191,f=p[4]&255|(p[5]&255)<<8,this.r[2]=(b>>>10|f<<6)&7939,S=p[6]&255|(p[7]&255)<<8,this.r[3]=(f>>>7|S<<9)&8191,$=p[8]&255|(p[9]&255)<<8,this.r[4]=(S>>>4|$<<12)&255,this.r[5]=$>>>1&8190,U=p[10]&255|(p[11]&255)<<8,this.r[6]=($>>>14|U<<2)&8191,X=p[12]&255|(p[13]&255)<<8,this.r[7]=(U>>>11|X<<5)&8065,ce=p[14]&255|(p[15]&255)<<8,this.r[8]=(X>>>8|ce<<8)&8191,this.r[9]=ce>>>5&127,this.pad[0]=p[16]&255|(p[17]&255)<<8,this.pad[1]=p[18]&255|(p[19]&255)<<8,this.pad[2]=p[20]&255|(p[21]&255)<<8,this.pad[3]=p[22]&255|(p[23]&255)<<8,this.pad[4]=p[24]&255|(p[25]&255)<<8,this.pad[5]=p[26]&255|(p[27]&255)<<8,this.pad[6]=p[28]&255|(p[29]&255)<<8,this.pad[7]=p[30]&255|(p[31]&255)<<8};I.prototype.blocks=function(p,x,b){for(var f=this.fin?0:2048,S,$,U,X,ce,Me,he,Et,we,Ve,Ke,nt,et,qe,Qe,Ge,Se,Le,me,ke=this.h[0],Ee=this.h[1],de=this.h[2],j=this.h[3],H=this.h[4],re=this.h[5],J=this.h[6],ee=this.h[7],se=this.h[8],Fe=this.h[9],rt=this.r[0],lt=this.r[1],it=this.r[2],A=this.r[3],pt=this.r[4],Mt=this.r[5],Tt=this.r[6],dt=this.r[7],_t=this.r[8],Ct=this.r[9];b>=16;)S=p[x+0]&255|(p[x+1]&255)<<8,ke+=S&8191,$=p[x+2]&255|(p[x+3]&255)<<8,Ee+=(S>>>13|$<<3)&8191,U=p[x+4]&255|(p[x+5]&255)<<8,de+=($>>>10|U<<6)&8191,X=p[x+6]&255|(p[x+7]&255)<<8,j+=(U>>>7|X<<9)&8191,ce=p[x+8]&255|(p[x+9]&255)<<8,H+=(X>>>4|ce<<12)&8191,re+=ce>>>1&8191,Me=p[x+10]&255|(p[x+11]&255)<<8,J+=(ce>>>14|Me<<2)&8191,he=p[x+12]&255|(p[x+13]&255)<<8,ee+=(Me>>>11|he<<5)&8191,Et=p[x+14]&255|(p[x+15]&255)<<8,se+=(he>>>8|Et<<8)&8191,Fe+=Et>>>5|f,we=0,Ve=we,Ve+=ke*rt,Ve+=Ee*(5*Ct),Ve+=de*(5*_t),Ve+=j*(5*dt),Ve+=H*(5*Tt),we=Ve>>>13,Ve&=8191,Ve+=re*(5*Mt),Ve+=J*(5*pt),Ve+=ee*(5*A),Ve+=se*(5*it),Ve+=Fe*(5*lt),we+=Ve>>>13,Ve&=8191,Ke=we,Ke+=ke*lt,Ke+=Ee*rt,Ke+=de*(5*Ct),Ke+=j*(5*_t),Ke+=H*(5*dt),we=Ke>>>13,Ke&=8191,Ke+=re*(5*Tt),Ke+=J*(5*Mt),Ke+=ee*(5*pt),Ke+=se*(5*A),Ke+=Fe*(5*it),we+=Ke>>>13,Ke&=8191,nt=we,nt+=ke*it,nt+=Ee*lt,nt+=de*rt,nt+=j*(5*Ct),nt+=H*(5*_t),we=nt>>>13,nt&=8191,nt+=re*(5*dt),nt+=J*(5*Tt),nt+=ee*(5*Mt),nt+=se*(5*pt),nt+=Fe*(5*A),we+=nt>>>13,nt&=8191,et=we,et+=ke*A,et+=Ee*it,et+=de*lt,et+=j*rt,et+=H*(5*Ct),we=et>>>13,et&=8191,et+=re*(5*_t),et+=J*(5*dt),et+=ee*(5*Tt),et+=se*(5*Mt),et+=Fe*(5*pt),we+=et>>>13,et&=8191,qe=we,qe+=ke*pt,qe+=Ee*A,qe+=de*it,qe+=j*lt,qe+=H*rt,we=qe>>>13,qe&=8191,qe+=re*(5*Ct),qe+=J*(5*_t),qe+=ee*(5*dt),qe+=se*(5*Tt),qe+=Fe*(5*Mt),we+=qe>>>13,qe&=8191,Qe=we,Qe+=ke*Mt,Qe+=Ee*pt,Qe+=de*A,Qe+=j*it,Qe+=H*lt,we=Qe>>>13,Qe&=8191,Qe+=re*rt,Qe+=J*(5*Ct),Qe+=ee*(5*_t),Qe+=se*(5*dt),Qe+=Fe*(5*Tt),we+=Qe>>>13,Qe&=8191,Ge=we,Ge+=ke*Tt,Ge+=Ee*Mt,Ge+=de*pt,Ge+=j*A,Ge+=H*it,we=Ge>>>13,Ge&=8191,Ge+=re*lt,Ge+=J*rt,Ge+=ee*(5*Ct),Ge+=se*(5*_t),Ge+=Fe*(5*dt),we+=Ge>>>13,Ge&=8191,Se=we,Se+=ke*dt,Se+=Ee*Tt,Se+=de*Mt,Se+=j*pt,Se+=H*A,we=Se>>>13,Se&=8191,Se+=re*it,Se+=J*lt,Se+=ee*rt,Se+=se*(5*Ct),Se+=Fe*(5*_t),we+=Se>>>13,Se&=8191,Le=we,Le+=ke*_t,Le+=Ee*dt,Le+=de*Tt,Le+=j*Mt,Le+=H*pt,we=Le>>>13,Le&=8191,Le+=re*A,Le+=J*it,Le+=ee*lt,Le+=se*rt,Le+=Fe*(5*Ct),we+=Le>>>13,Le&=8191,me=we,me+=ke*Ct,me+=Ee*_t,me+=de*dt,me+=j*Tt,me+=H*Mt,we=me>>>13,me&=8191,me+=re*pt,me+=J*A,me+=ee*it,me+=se*lt,me+=Fe*rt,we+=me>>>13,me&=8191,we=(we<<2)+we|0,we=we+Ve|0,Ve=we&8191,we=we>>>13,Ke+=we,ke=Ve,Ee=Ke,de=nt,j=et,H=qe,re=Qe,J=Ge,ee=Se,se=Le,Fe=me,x+=16,b-=16;this.h[0]=ke,this.h[1]=Ee,this.h[2]=de,this.h[3]=j,this.h[4]=H,this.h[5]=re,this.h[6]=J,this.h[7]=ee,this.h[8]=se,this.h[9]=Fe},I.prototype.finish=function(p,x){var b=new Uint16Array(10),f,S,$,U;if(this.leftover){for(U=this.leftover,this.buffer[U++]=1;U<16;U++)this.buffer[U]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(f=this.h[1]>>>13,this.h[1]&=8191,U=2;U<10;U++)this.h[U]+=f,f=this.h[U]>>>13,this.h[U]&=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,b[0]=this.h[0]+5,f=b[0]>>>13,b[0]&=8191,U=1;U<10;U++)b[U]=this.h[U]+f,f=b[U]>>>13,b[U]&=8191;for(b[9]-=8192,S=(f^1)-1,U=0;U<10;U++)b[U]&=S;for(S=~S,U=0;U<10;U++)this.h[U]=this.h[U]&S|b[U];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,$=this.h[0]+this.pad[0],this.h[0]=$&65535,U=1;U<8;U++)$=(this.h[U]+this.pad[U]|0)+($>>>16)|0,this.h[U]=$&65535;p[x+0]=this.h[0]>>>0&255,p[x+1]=this.h[0]>>>8&255,p[x+2]=this.h[1]>>>0&255,p[x+3]=this.h[1]>>>8&255,p[x+4]=this.h[2]>>>0&255,p[x+5]=this.h[2]>>>8&255,p[x+6]=this.h[3]>>>0&255,p[x+7]=this.h[3]>>>8&255,p[x+8]=this.h[4]>>>0&255,p[x+9]=this.h[4]>>>8&255,p[x+10]=this.h[5]>>>0&255,p[x+11]=this.h[5]>>>8&255,p[x+12]=this.h[6]>>>0&255,p[x+13]=this.h[6]>>>8&255,p[x+14]=this.h[7]>>>0&255,p[x+15]=this.h[7]>>>8&255},I.prototype.update=function(p,x,b){var f,S;if(this.leftover){for(S=16-this.leftover,S>b&&(S=b),f=0;f=16&&(S=b-b%16,this.blocks(p,x,S),x+=S,b-=S),b){for(f=0;f>16&1),$[b-1]&=65535;$[15]=U[15]-32767-($[14]>>16&1),S=$[15]>>16&1,$[14]&=65535,Q(U,$,1-S)}for(b=0;b<16;b++)p[2*b]=U[b]&255,p[2*b+1]=U[b]>>8}function ge(p,x){var b=new Uint8Array(32),f=new Uint8Array(32);return ue(b,p),ue(f,x),C(b,0,f,0)}function Ze(p){var x=new Uint8Array(32);return ue(x,p),x[0]&1}function je(p,x){var b;for(b=0;b<16;b++)p[b]=x[2*b]+(x[2*b+1]<<8);p[15]&=32767}function st(p,x,b){for(var f=0;f<16;f++)p[f]=x[f]+b[f]}function ft(p,x,b){for(var f=0;f<16;f++)p[f]=x[f]-b[f]}function Pe(p,x,b){var f,S,$=0,U=0,X=0,ce=0,Me=0,he=0,Et=0,we=0,Ve=0,Ke=0,nt=0,et=0,qe=0,Qe=0,Ge=0,Se=0,Le=0,me=0,ke=0,Ee=0,de=0,j=0,H=0,re=0,J=0,ee=0,se=0,Fe=0,rt=0,lt=0,it=0,A=b[0],pt=b[1],Mt=b[2],Tt=b[3],dt=b[4],_t=b[5],Ct=b[6],gn=b[7],$t=b[8],un=b[9],fn=b[10],dn=b[11],Mn=b[12],Yn=b[13],Kn=b[14],qn=b[15];f=x[0],$+=f*A,U+=f*pt,X+=f*Mt,ce+=f*Tt,Me+=f*dt,he+=f*_t,Et+=f*Ct,we+=f*gn,Ve+=f*$t,Ke+=f*un,nt+=f*fn,et+=f*dn,qe+=f*Mn,Qe+=f*Yn,Ge+=f*Kn,Se+=f*qn,f=x[1],U+=f*A,X+=f*pt,ce+=f*Mt,Me+=f*Tt,he+=f*dt,Et+=f*_t,we+=f*Ct,Ve+=f*gn,Ke+=f*$t,nt+=f*un,et+=f*fn,qe+=f*dn,Qe+=f*Mn,Ge+=f*Yn,Se+=f*Kn,Le+=f*qn,f=x[2],X+=f*A,ce+=f*pt,Me+=f*Mt,he+=f*Tt,Et+=f*dt,we+=f*_t,Ve+=f*Ct,Ke+=f*gn,nt+=f*$t,et+=f*un,qe+=f*fn,Qe+=f*dn,Ge+=f*Mn,Se+=f*Yn,Le+=f*Kn,me+=f*qn,f=x[3],ce+=f*A,Me+=f*pt,he+=f*Mt,Et+=f*Tt,we+=f*dt,Ve+=f*_t,Ke+=f*Ct,nt+=f*gn,et+=f*$t,qe+=f*un,Qe+=f*fn,Ge+=f*dn,Se+=f*Mn,Le+=f*Yn,me+=f*Kn,ke+=f*qn,f=x[4],Me+=f*A,he+=f*pt,Et+=f*Mt,we+=f*Tt,Ve+=f*dt,Ke+=f*_t,nt+=f*Ct,et+=f*gn,qe+=f*$t,Qe+=f*un,Ge+=f*fn,Se+=f*dn,Le+=f*Mn,me+=f*Yn,ke+=f*Kn,Ee+=f*qn,f=x[5],he+=f*A,Et+=f*pt,we+=f*Mt,Ve+=f*Tt,Ke+=f*dt,nt+=f*_t,et+=f*Ct,qe+=f*gn,Qe+=f*$t,Ge+=f*un,Se+=f*fn,Le+=f*dn,me+=f*Mn,ke+=f*Yn,Ee+=f*Kn,de+=f*qn,f=x[6],Et+=f*A,we+=f*pt,Ve+=f*Mt,Ke+=f*Tt,nt+=f*dt,et+=f*_t,qe+=f*Ct,Qe+=f*gn,Ge+=f*$t,Se+=f*un,Le+=f*fn,me+=f*dn,ke+=f*Mn,Ee+=f*Yn,de+=f*Kn,j+=f*qn,f=x[7],we+=f*A,Ve+=f*pt,Ke+=f*Mt,nt+=f*Tt,et+=f*dt,qe+=f*_t,Qe+=f*Ct,Ge+=f*gn,Se+=f*$t,Le+=f*un,me+=f*fn,ke+=f*dn,Ee+=f*Mn,de+=f*Yn,j+=f*Kn,H+=f*qn,f=x[8],Ve+=f*A,Ke+=f*pt,nt+=f*Mt,et+=f*Tt,qe+=f*dt,Qe+=f*_t,Ge+=f*Ct,Se+=f*gn,Le+=f*$t,me+=f*un,ke+=f*fn,Ee+=f*dn,de+=f*Mn,j+=f*Yn,H+=f*Kn,re+=f*qn,f=x[9],Ke+=f*A,nt+=f*pt,et+=f*Mt,qe+=f*Tt,Qe+=f*dt,Ge+=f*_t,Se+=f*Ct,Le+=f*gn,me+=f*$t,ke+=f*un,Ee+=f*fn,de+=f*dn,j+=f*Mn,H+=f*Yn,re+=f*Kn,J+=f*qn,f=x[10],nt+=f*A,et+=f*pt,qe+=f*Mt,Qe+=f*Tt,Ge+=f*dt,Se+=f*_t,Le+=f*Ct,me+=f*gn,ke+=f*$t,Ee+=f*un,de+=f*fn,j+=f*dn,H+=f*Mn,re+=f*Yn,J+=f*Kn,ee+=f*qn,f=x[11],et+=f*A,qe+=f*pt,Qe+=f*Mt,Ge+=f*Tt,Se+=f*dt,Le+=f*_t,me+=f*Ct,ke+=f*gn,Ee+=f*$t,de+=f*un,j+=f*fn,H+=f*dn,re+=f*Mn,J+=f*Yn,ee+=f*Kn,se+=f*qn,f=x[12],qe+=f*A,Qe+=f*pt,Ge+=f*Mt,Se+=f*Tt,Le+=f*dt,me+=f*_t,ke+=f*Ct,Ee+=f*gn,de+=f*$t,j+=f*un,H+=f*fn,re+=f*dn,J+=f*Mn,ee+=f*Yn,se+=f*Kn,Fe+=f*qn,f=x[13],Qe+=f*A,Ge+=f*pt,Se+=f*Mt,Le+=f*Tt,me+=f*dt,ke+=f*_t,Ee+=f*Ct,de+=f*gn,j+=f*$t,H+=f*un,re+=f*fn,J+=f*dn,ee+=f*Mn,se+=f*Yn,Fe+=f*Kn,rt+=f*qn,f=x[14],Ge+=f*A,Se+=f*pt,Le+=f*Mt,me+=f*Tt,ke+=f*dt,Ee+=f*_t,de+=f*Ct,j+=f*gn,H+=f*$t,re+=f*un,J+=f*fn,ee+=f*dn,se+=f*Mn,Fe+=f*Yn,rt+=f*Kn,lt+=f*qn,f=x[15],Se+=f*A,Le+=f*pt,me+=f*Mt,ke+=f*Tt,Ee+=f*dt,de+=f*_t,j+=f*Ct,H+=f*gn,re+=f*$t,J+=f*un,ee+=f*fn,se+=f*dn,Fe+=f*Mn,rt+=f*Yn,lt+=f*Kn,it+=f*qn,$+=38*Le,U+=38*me,X+=38*ke,ce+=38*Ee,Me+=38*de,he+=38*j,Et+=38*H,we+=38*re,Ve+=38*J,Ke+=38*ee,nt+=38*se,et+=38*Fe,qe+=38*rt,Qe+=38*lt,Ge+=38*it,S=1,f=$+S+65535,S=Math.floor(f/65536),$=f-S*65536,f=U+S+65535,S=Math.floor(f/65536),U=f-S*65536,f=X+S+65535,S=Math.floor(f/65536),X=f-S*65536,f=ce+S+65535,S=Math.floor(f/65536),ce=f-S*65536,f=Me+S+65535,S=Math.floor(f/65536),Me=f-S*65536,f=he+S+65535,S=Math.floor(f/65536),he=f-S*65536,f=Et+S+65535,S=Math.floor(f/65536),Et=f-S*65536,f=we+S+65535,S=Math.floor(f/65536),we=f-S*65536,f=Ve+S+65535,S=Math.floor(f/65536),Ve=f-S*65536,f=Ke+S+65535,S=Math.floor(f/65536),Ke=f-S*65536,f=nt+S+65535,S=Math.floor(f/65536),nt=f-S*65536,f=et+S+65535,S=Math.floor(f/65536),et=f-S*65536,f=qe+S+65535,S=Math.floor(f/65536),qe=f-S*65536,f=Qe+S+65535,S=Math.floor(f/65536),Qe=f-S*65536,f=Ge+S+65535,S=Math.floor(f/65536),Ge=f-S*65536,f=Se+S+65535,S=Math.floor(f/65536),Se=f-S*65536,$+=S-1+37*(S-1),S=1,f=$+S+65535,S=Math.floor(f/65536),$=f-S*65536,f=U+S+65535,S=Math.floor(f/65536),U=f-S*65536,f=X+S+65535,S=Math.floor(f/65536),X=f-S*65536,f=ce+S+65535,S=Math.floor(f/65536),ce=f-S*65536,f=Me+S+65535,S=Math.floor(f/65536),Me=f-S*65536,f=he+S+65535,S=Math.floor(f/65536),he=f-S*65536,f=Et+S+65535,S=Math.floor(f/65536),Et=f-S*65536,f=we+S+65535,S=Math.floor(f/65536),we=f-S*65536,f=Ve+S+65535,S=Math.floor(f/65536),Ve=f-S*65536,f=Ke+S+65535,S=Math.floor(f/65536),Ke=f-S*65536,f=nt+S+65535,S=Math.floor(f/65536),nt=f-S*65536,f=et+S+65535,S=Math.floor(f/65536),et=f-S*65536,f=qe+S+65535,S=Math.floor(f/65536),qe=f-S*65536,f=Qe+S+65535,S=Math.floor(f/65536),Qe=f-S*65536,f=Ge+S+65535,S=Math.floor(f/65536),Ge=f-S*65536,f=Se+S+65535,S=Math.floor(f/65536),Se=f-S*65536,$+=S-1+37*(S-1),p[0]=$,p[1]=U,p[2]=X,p[3]=ce,p[4]=Me,p[5]=he,p[6]=Et,p[7]=we,p[8]=Ve,p[9]=Ke,p[10]=nt,p[11]=et,p[12]=qe,p[13]=Qe,p[14]=Ge,p[15]=Se}function tt(p,x){Pe(p,x,x)}function rr(p,x){var b=n(),f;for(f=0;f<16;f++)b[f]=x[f];for(f=253;f>=0;f--)tt(b,b),f!==2&&f!==4&&Pe(b,b,x);for(f=0;f<16;f++)p[f]=b[f]}function K(p,x){var b=n(),f;for(f=0;f<16;f++)b[f]=x[f];for(f=250;f>=0;f--)tt(b,b),f!==1&&Pe(b,b,x);for(f=0;f<16;f++)p[f]=b[f]}function q(p,x,b){var f=new Uint8Array(32),S=new Float64Array(80),$,U,X=n(),ce=n(),Me=n(),he=n(),Et=n(),we=n();for(U=0;U<31;U++)f[U]=x[U];for(f[31]=x[31]&127|64,f[0]&=248,je(S,b),U=0;U<16;U++)ce[U]=S[U],he[U]=X[U]=Me[U]=0;for(X[0]=he[0]=1,U=254;U>=0;--U)$=f[U>>>3]>>>(U&7)&1,Q(X,ce,$),Q(Me,he,$),st(Et,X,Me),ft(X,X,Me),st(Me,ce,he),ft(ce,ce,he),tt(he,Et),tt(we,X),Pe(X,Me,X),Pe(Me,ce,Et),st(Et,X,Me),ft(X,X,Me),tt(ce,X),ft(Me,he,we),Pe(X,Me,l),st(X,X,he),Pe(Me,Me,X),Pe(X,he,we),Pe(he,ce,S),tt(ce,Et),Q(X,ce,$),Q(Me,he,$);for(U=0;U<16;U++)S[U+16]=X[U],S[U+32]=Me[U],S[U+48]=ce[U],S[U+64]=he[U];var Ve=S.subarray(32),Ke=S.subarray(16);return rr(Ve,Ve),Pe(Ke,Ke,Ve),ue(p,Ke),0}function B(p,x){return q(p,x,o)}function te(p,x){return r(x,32),B(p,x)}function ne(p,x,b){var f=new Uint8Array(32);return q(f,b,x),E(p,i,f,O)}var ie=Z,Te=Y;function Ae(p,x,b,f,S,$){var U=new Uint8Array(32);return ne(U,S,$),ie(p,x,b,f,U)}function Xe(p,x,b,f,S,$){var U=new Uint8Array(32);return ne(U,S,$),Te(p,x,b,f,U)}var It=[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 We(p,x,b,f){for(var S=new Int32Array(16),$=new Int32Array(16),U,X,ce,Me,he,Et,we,Ve,Ke,nt,et,qe,Qe,Ge,Se,Le,me,ke,Ee,de,j,H,re,J,ee,se,Fe=p[0],rt=p[1],lt=p[2],it=p[3],A=p[4],pt=p[5],Mt=p[6],Tt=p[7],dt=x[0],_t=x[1],Ct=x[2],gn=x[3],$t=x[4],un=x[5],fn=x[6],dn=x[7],Mn=0;f>=128;){for(Ee=0;Ee<16;Ee++)de=8*Ee+Mn,S[Ee]=b[de+0]<<24|b[de+1]<<16|b[de+2]<<8|b[de+3],$[Ee]=b[de+4]<<24|b[de+5]<<16|b[de+6]<<8|b[de+7];for(Ee=0;Ee<80;Ee++)if(U=Fe,X=rt,ce=lt,Me=it,he=A,Et=pt,we=Mt,Ve=Tt,Ke=dt,nt=_t,et=Ct,qe=gn,Qe=$t,Ge=un,Se=fn,Le=dn,j=Tt,H=dn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=(A>>>14|$t<<18)^(A>>>18|$t<<14)^($t>>>9|A<<23),H=($t>>>14|A<<18)^($t>>>18|A<<14)^(A>>>9|$t<<23),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=A&pt^~A&Mt,H=$t&un^~$t&fn,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=It[Ee*2],H=It[Ee*2+1],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=S[Ee%16],H=$[Ee%16],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,me=ee&65535|se<<16,ke=re&65535|J<<16,j=me,H=ke,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=(Fe>>>28|dt<<4)^(dt>>>2|Fe<<30)^(dt>>>7|Fe<<25),H=(dt>>>28|Fe<<4)^(Fe>>>2|dt<<30)^(Fe>>>7|dt<<25),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,j=Fe&rt^Fe<^rt<,H=dt&_t^dt&Ct^_t&Ct,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,Ve=ee&65535|se<<16,Le=re&65535|J<<16,j=Me,H=qe,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=me,H=ke,re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,Me=ee&65535|se<<16,qe=re&65535|J<<16,rt=U,lt=X,it=ce,A=Me,pt=he,Mt=Et,Tt=we,Fe=Ve,_t=Ke,Ct=nt,gn=et,$t=qe,un=Qe,fn=Ge,dn=Se,dt=Le,Ee%16===15)for(de=0;de<16;de++)j=S[de],H=$[de],re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=S[(de+9)%16],H=$[(de+9)%16],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,me=S[(de+1)%16],ke=$[(de+1)%16],j=(me>>>1|ke<<31)^(me>>>8|ke<<24)^me>>>7,H=(ke>>>1|me<<31)^(ke>>>8|me<<24)^(ke>>>7|me<<25),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,me=S[(de+14)%16],ke=$[(de+14)%16],j=(me>>>19|ke<<13)^(ke>>>29|me<<3)^me>>>6,H=(ke>>>19|me<<13)^(me>>>29|ke<<3)^(ke>>>6|me<<26),re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,S[de]=ee&65535|se<<16,$[de]=re&65535|J<<16;j=Fe,H=dt,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[0],H=x[0],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[0]=Fe=ee&65535|se<<16,x[0]=dt=re&65535|J<<16,j=rt,H=_t,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[1],H=x[1],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[1]=rt=ee&65535|se<<16,x[1]=_t=re&65535|J<<16,j=lt,H=Ct,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[2],H=x[2],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[2]=lt=ee&65535|se<<16,x[2]=Ct=re&65535|J<<16,j=it,H=gn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[3],H=x[3],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[3]=it=ee&65535|se<<16,x[3]=gn=re&65535|J<<16,j=A,H=$t,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[4],H=x[4],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[4]=A=ee&65535|se<<16,x[4]=$t=re&65535|J<<16,j=pt,H=un,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[5],H=x[5],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[5]=pt=ee&65535|se<<16,x[5]=un=re&65535|J<<16,j=Mt,H=fn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[6],H=x[6],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[6]=Mt=ee&65535|se<<16,x[6]=fn=re&65535|J<<16,j=Tt,H=dn,re=H&65535,J=H>>>16,ee=j&65535,se=j>>>16,j=p[7],H=x[7],re+=H&65535,J+=H>>>16,ee+=j&65535,se+=j>>>16,J+=re>>>16,ee+=J>>>16,se+=ee>>>16,p[7]=Tt=ee&65535|se<<16,x[7]=dn=re&65535|J<<16,Mn+=128,f-=128}return f}function Zt(p,x,b){var f=new Int32Array(8),S=new Int32Array(8),$=new Uint8Array(256),U,X=b;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,S[0]=4089235720,S[1]=2227873595,S[2]=4271175723,S[3]=1595750129,S[4]=2917565137,S[5]=725511199,S[6]=4215389547,S[7]=327033209,We(f,S,x,b),b%=128,U=0;U=0;--S)f=b[S/8|0]>>(S&7)&1,dr(p,x,f),ln(x,p),ln(p,p),dr(p,x,f)}function ir(p,x){var b=[n(),n(),n(),n()];fe(b[0],d),fe(b[1],h),fe(b[2],a),Pe(b[3],d,h),En(p,b,x)}function Ue(p,x,b){var f=new Uint8Array(64),S=[n(),n(),n(),n()],$;for(b||r(x,32),Zt(f,x,32),f[0]&=248,f[31]&=127,f[31]|=64,ir(S,f),_n(p,S),$=0;$<32;$++)x[$+32]=p[$];return 0}var wt=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 He(p,x){var b,f,S,$;for(f=63;f>=32;--f){for(b=0,S=f-32,$=f-12;S<$;++S)x[S]+=b-16*x[f]*wt[S-(f-32)],b=Math.floor((x[S]+128)/256),x[S]-=b*256;x[S]+=b,x[f]=0}for(b=0,S=0;S<32;S++)x[S]+=b-(x[31]>>4)*wt[S],b=x[S]>>8,x[S]&=255;for(S=0;S<32;S++)x[S]-=b*wt[S];for(f=0;f<32;f++)x[f+1]+=x[f]>>8,p[f]=x[f]&255}function At(p){var x=new Float64Array(64),b;for(b=0;b<64;b++)x[b]=p[b];for(b=0;b<64;b++)p[b]=0;He(p,x)}function Rn(p,x,b,f){var S=new Uint8Array(64),$=new Uint8Array(64),U=new Uint8Array(64),X,ce,Me=new Float64Array(64),he=[n(),n(),n(),n()];Zt(S,f,32),S[0]&=248,S[31]&=127,S[31]|=64;var Et=b+64;for(X=0;X>7&&ft(p[0],s,p[0]),Pe(p[3],p[0],p[1]),0)}function xt(p,x,b,f){var S,$=new Uint8Array(32),U=new Uint8Array(64),X=[n(),n(),n(),n()],ce=[n(),n(),n(),n()];if(b<64||hr(ce,f))return-1;for(S=0;S=0},t.sign.keyPair=function(){var p=new Uint8Array(ze),x=new Uint8Array(Ht);return Ue(p,x),{publicKey:p,secretKey:x}},t.sign.keyPair.fromSecretKey=function(p){if(or(p),p.length!==Ht)throw new Error("bad secret key size");for(var x=new Uint8Array(ze),b=0;b=e.length)throw new Error("Index is out of buffer");const n=e.slice(0,t),r=e.slice(t);return[n,r]}function e1(e){let t="";return e.forEach(n=>{t+=("0"+(n&255).toString(16)).slice(-2)}),t}function Kf(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n{var i,o;if(!((i=void 0)===null||i===void 0)&&i.aborted){r(new Ie("Delay aborted"));return}const s=setTimeout(()=>n(),e);(o=void 0)===null||o===void 0||o.addEventListener("abort",()=>{clearTimeout(s),r(new Ie("Delay aborted"))})})})}function ni(e){const t=new AbortController;return e!=null&&e.aborted?t.abort():e==null||e.addEventListener("abort",()=>t.abort(),{once:!0}),t}function Fl(e,t){var n,r;return xe(this,void 0,void 0,function*(){const i=(n=t==null?void 0:t.attempts)!==null&&n!==void 0?n:10,o=(r=t==null?void 0:t.delayMs)!==null&&r!==void 0?r:200,s=ni(t==null?void 0:t.signal);if(typeof e!="function")throw new Ie(`Expected a function, got ${typeof e}`);let a=0,l;for(;axe(this,void 0,void 0,function*(){if(o=d??null,s==null||s.abort(),s=ni(d),s.signal.aborted)throw new Ie("Resource creation was aborted");r=h??null;const g=e(s.signal,...h);i=g;const m=yield g;if(i!==g&&m!==n)throw yield t(m),new Ie("Resource creation was aborted by a new resource creation");return n=m,n});return{create:a,current:()=>n??null,dispose:()=>xe(this,void 0,void 0,function*(){try{const d=n;n=null;const h=i;i=null;try{s==null||s.abort()}catch{}yield Promise.allSettled([d?t(d):Promise.resolve(),h?t(yield h):Promise.resolve()])}catch{}}),recreate:d=>xe(this,void 0,void 0,function*(){const h=n,g=i,m=r,y=o;if(yield b3(d),h===n&&g===i&&m===r&&y===o)return yield a(o,...m??[]);throw new Ie("Resource recreation was aborted by a new resource creation")})}}function V_(e,t){const n=t==null?void 0:t.timeout,r=t==null?void 0:t.signal,i=ni(r);return new Promise((o,s)=>{if(i.signal.aborted){s(new Ie("Operation aborted"));return}let a;typeof n<"u"&&(a=setTimeout(()=>{i.abort(),s(new Ie(`Timeout after ${n}ms`))},n)),i.signal.addEventListener("abort",()=>{clearTimeout(a),s(new Ie("Operation aborted"))},{once:!0});const l={timeout:n,abort:i.signal};e(o,s,l).finally(()=>clearTimeout(a))})}class e1{constructor(t,n,r,i,o){this.bridgeUrl=n,this.sessionId=r,this.listener=i,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=5e3,this.eventSource=z_((s,a)=>xe(this,void 0,void 0,function*(){const l={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:s,openingDeadlineMS:a};return yield Y_(l)}),s=>xe(this,void 0,void 0,function*(){s.close()})),this.bridgeGatewayStorage=new B_(t,n)}get isReady(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.OPEN}get isClosed(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)!==EventSource.OPEN}get isConnecting(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.CONNECTING}registerSession(t){return xe(this,void 0,void 0,function*(){yield this.eventSource.create(t==null?void 0:t.signal,t==null?void 0:t.openingDeadlineMS)})}send(t,n,r,i){var o;return xe(this,void 0,void 0,function*(){const s={};typeof i=="number"?s.ttl=i:(s.ttl=i==null?void 0:i.ttl,s.signal=i==null?void 0:i.signal,s.attempts=i==null?void 0:i.attempts);const a=new URL(w3(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",n),a.searchParams.append("ttl",((s==null?void 0:s.ttl)||this.defaultTtl).toString()),a.searchParams.append("topic",r);const l=tg.encode(t);yield Fl(c=>xe(this,void 0,void 0,function*(){const u=yield this.post(a,l,c.signal);if(!u.ok)throw new Ie(`Bridge send failed, status ${u.status}`)}),{attempts:(o=s==null?void 0:s.attempts)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:s==null?void 0:s.signal})})}pause(){this.eventSource.dispose().catch(t=>ki(`Bridge pause failed, ${t}`))}unPause(){return xe(this,void 0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return xe(this,void 0,void 0,function*(){yield this.eventSource.dispose().catch(t=>ki(`Bridge close failed, ${t}`))})}setListener(t){this.listener=t}setErrorsListener(t){this.errorsListener=t}post(t,n,r){return xe(this,void 0,void 0,function*(){const i=yield fetch(t,{method:"post",body:n,signal:r});if(!i.ok)throw new Ie(`Bridge send failed, status ${i.status}`);return i})}errorsHandler(t,n){return xe(this,void 0,void 0,function*(){if(this.isConnecting){ki("Bridge error",JSON.stringify(n));return}if(this.isReady){try{this.errorsListener(n)}catch{}return}if(this.isClosed)return t.close(),Tn(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new Ie("Bridge error, unknown state")})}messagesHandler(t){return xe(this,void 0,void 0,function*(){if(t.data===this.heartbeatMessage||(yield this.bridgeGatewayStorage.storeLastEventId(t.lastEventId),this.isClosed))return;let n;try{n=JSON.parse(t.data)}catch(r){throw new Ie(`Bridge message parse failed, message ${r.data}`)}this.listener(n)})}}function Y_(e){return xe(this,void 0,void 0,function*(){return yield V_((t,n,r)=>xe(this,void 0,void 0,function*(){var i;const s=ni(r.signal).signal;if(s.aborted){n(new Ie("Bridge connection aborted"));return}const a=new URL(w3(e.bridgeUrl,e.ssePath));a.searchParams.append("client_id",e.sessionId);const l=yield e.bridgeGatewayStorage.getLastEventId();if(l&&a.searchParams.append("last_event_id",l),s.aborted){n(new Ie("Bridge connection aborted"));return}const c=new EventSource(a.toString());c.onerror=u=>xe(this,void 0,void 0,function*(){if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}try{const d=yield e.errorHandler(c,u);d!==c&&c.close(),d&&d!==c&&t(d)}catch(d){c.close(),n(d)}}),c.onopen=()=>{if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}t(c)},c.onmessage=u=>{if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}e.messageHandler(u)},(i=e.signal)===null||i===void 0||i.addEventListener("abort",()=>{c.close(),n(new Ie("Bridge connection aborted"))})}),{timeout:e.openingDeadlineMS,signal:e.signal})})}function Bl(e){return!("connectEvent"in e)}class wc{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return xe(this,void 0,void 0,function*(){if(t.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(t));if(!Bl(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))}const n={type:"http",connectionSource:t.connectionSource,sessionCrypto:t.sessionCrypto.stringifyKeypair()};return this.storage.setItem(this.storeKey,JSON.stringify(n))})}removeConnection(){return xe(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);if(!t)return null;const n=JSON.parse(t);if(n.type==="injected")return n;if("connectEvent"in n){const r=new C0(n.session.sessionKeyPair);return{type:"http",connectEvent:n.connectEvent,lastWalletEventId:n.lastWalletEventId,nextRpcRequestId:n.nextRpcRequestId,session:{sessionCrypto:r,bridgeUrl:n.session.bridgeUrl,walletPublicKey:n.session.walletPublicKey}}}return{type:"http",sessionCrypto:new C0(n.sessionCrypto),connectionSource:n.connectionSource}})}getHttpConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Ie("Trying to read HTTP connection source while injected connection is stored");return t})}getHttpPendingConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Ie("Trying to read HTTP connection source while injected connection is stored");if(!Bl(t))throw new Ie("Trying to read HTTP-pending connection while http connection is stored");return t})}getInjectedConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read Injected bridge connection source while nothing is stored");if((t==null?void 0:t.type)==="http")throw new Ie("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return xe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return xe(this,void 0,void 0,function*(){const n=yield this.getConnection();if(n&&n.type==="http"&&!Bl(n))return n.lastWalletEventId=t,this.storeConnection(n)})}getLastWalletEventId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"nextRpcRequestId"in t){const n=t.nextRpcRequestId||0;return t.nextRpcRequestId=n+1,this.storeConnection(t)}})}getNextRpcRequestId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&"nextRpcRequestId"in t&&t.nextRpcRequestId||0})}}const _3=2;class xc{constructor(t,n){this.storage=t,this.walletConnectionSource=n,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=5e3,this.connectionStorage=new wc(t)}static fromStorage(t){return xe(this,void 0,void 0,function*(){const r=yield new wc(t).getHttpConnection();return Bl(r)?new xc(t,r.connectionSource):new xc(t,{bridgeUrl:r.session.bridgeUrl})})}connect(t,n){var r;const i=ni(n==null?void 0:n.signal);(r=this.abortController)===null||r===void 0||r.abort(),this.abortController=i,this.closeGateways();const o=new C0;this.session={sessionCrypto:o,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:o}).then(()=>xe(this,void 0,void 0,function*(){i.signal.aborted||(yield Fl(a=>this.openGateways(o,{openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:a==null?void 0:a.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:i.signal}))}));const s="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(s,t)}restoreConnection(t){var n,r;return xe(this,void 0,void 0,function*(){const i=ni(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=i,i.signal.aborted)return;this.closeGateways();const o=yield this.connectionStorage.getHttpConnection();if(!o||i.signal.aborted)return;const s=(r=t==null?void 0:t.openingDeadlineMS)!==null&&r!==void 0?r:this.defaultOpeningDeadlineMS;if(Bl(o))return this.session={sessionCrypto:o.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(o.sessionCrypto,{openingDeadlineMS:s,signal:i==null?void 0:i.signal});if(Array.isArray(this.walletConnectionSource))throw new Ie("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=o.session,this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new e1(this.storage,this.walletConnectionSource.bridgeUrl,o.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!i.signal.aborted){this.listeners.forEach(a=>a(o.connectEvent));try{yield Fl(a=>this.gateway.registerSession({openingDeadlineMS:s,signal:a.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:i.signal})}catch{yield this.disconnect({signal:i.signal});return}}})}sendRequest(t,n){const r={};return typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal,r.attempts=n==null?void 0:n.attempts),new Promise((i,o)=>xe(this,void 0,void 0,function*(){var s;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new Ie("Trying to send bridge request without session");const a=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Tn("Send http-bridge request:",Object.assign(Object.assign({},t),{id:a}));const l=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{id:a})),Yf(this.session.walletPublicKey));try{yield this.gateway.send(l,this.session.walletPublicKey,t.method,{attempts:r==null?void 0:r.attempts,signal:r==null?void 0:r.signal}),(s=r==null?void 0:r.onRequestSent)===null||s===void 0||s.call(r),this.pendingRequests.set(a.toString(),i)}catch(c){o(c)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(t){return xe(this,void 0,void 0,function*(){return new Promise(n=>xe(this,void 0,void 0,function*(){let r=!1,i=null;const o=()=>{r||(r=!0,this.removeBridgeAndSession().then(n))};try{this.closeGateways();const s=ni(t==null?void 0:t.signal);i=setTimeout(()=>{s.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:o,signal:s.signal,attempts:1})}catch(s){Tn("Disconnect error:",s),r||this.removeBridgeAndSession().then(n)}finally{i&&clearTimeout(i),o()}}))})}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(n=>n!==t)}pause(){var t;(t=this.gateway)===null||t===void 0||t.pause(),this.pendingGateways.forEach(n=>n.pause())}unPause(){return xe(this,void 0,void 0,function*(){const t=this.pendingGateways.map(n=>n.unPause());this.gateway&&t.push(this.gateway.unPause()),yield Promise.all(t)})}pendingGatewaysListener(t,n,r){return xe(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(t)){yield t.close();return}return this.closeGateways({except:t}),this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=n,this.gateway=t,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(r)})}gatewayListener(t){return xe(this,void 0,void 0,function*(){const n=JSON.parse(this.session.sessionCrypto.decrypt(tg.decode(t.message).toUint8Array(),Yf(t.from)));if(Tn("Wallet message received:",n),!("event"in n)){const i=n.id.toString(),o=this.pendingRequests.get(i);if(!o){Tn(`Response id ${i} doesn't match any request's id`);return}o(n),this.pendingRequests.delete(i);return}if(n.id!==void 0){const i=yield this.connectionStorage.getLastWalletEventId();if(i!==void 0&&n.id<=i){ki(`Received event id (=${n.id}) must be greater than stored last wallet event id (=${i}) `);return}n.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(n.id))}const r=this.listeners;n.event==="connect"&&(yield this.updateSession(n,t.from)),n.event==="disconnect"&&(Tn("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),r.forEach(i=>i(n))})}gatewayErrorsListener(t){return xe(this,void 0,void 0,function*(){throw new Ie(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,n){return xe(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:n});const r=t.payload.items.find(o=>o.name==="ton_addr"),i=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[r]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:i,nextRpcRequestId:0})})}removeBridgeAndSession(){return xe(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,n){return Ss(t)?this.generateTGUniversalLink(t,n):this.generateRegularUniversalLink(t,n)}generateRegularUniversalLink(t,n){const r=new URL(t);return r.searchParams.append("v",_3.toString()),r.searchParams.append("id",this.session.sessionCrypto.sessionId),r.searchParams.append("r",JSON.stringify(n)),r.toString()}generateTGUniversalLink(t,n){const i=this.generateRegularUniversalLink("about:blank",n).split("?")[1],o="tonconnect-"+x3(i),s=this.convertToDirectLink(t),a=new URL(s);return a.searchParams.append("startapp",o),a.toString()}convertToDirectLink(t){const n=new URL(t);return n.searchParams.has("attach")&&(n.searchParams.delete("attach"),n.pathname+="/start"),n.toString()}openGateways(t,n){return xe(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource)){this.pendingGateways.map(r=>r.close().catch()),this.pendingGateways=this.walletConnectionSource.map(r=>{const i=new e1(this.storage,r.bridgeUrl,t.sessionId,()=>{},()=>{});return i.setListener(o=>this.pendingGatewaysListener(i,r.bridgeUrl,o)),i}),yield Promise.allSettled(this.pendingGateways.map(r=>Fl(i=>this.pendingGateways.some(o=>o===r)?r.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:i.signal}):r.close(),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:n==null?void 0:n.signal})));return}else return this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new e1(this.storage,this.walletConnectionSource.bridgeUrl,t.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:n==null?void 0:n.signal})})}closeGateways(t){var n;(n=this.gateway)===null||n===void 0||n.close(),this.pendingGateways.filter(r=>r!==(t==null?void 0:t.except)).forEach(r=>r.close()),this.pendingGateways=[]}}function L2(e,t){return C3(e,[t])}function C3(e,t){return!e||typeof e!="object"?!1:t.every(n=>n in e)}function K_(e){try{return!L2(e,"tonconnect")||!L2(e.tonconnect,"walletInfo")?!1:C3(e.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch{return!1}}let q_=class _l{constructor(){this.storage={}}static getInstance(){return _l.instance||(_l.instance=new _l),_l.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(t){var n;return(n=this.storage[t])!==null&&n!==void 0?n:null}key(t){var n;const r=Object.keys(this.storage);return t<0||t>=r.length?null:(n=r[t])!==null&&n!==void 0?n:null}removeItem(t){delete this.storage[t]}setItem(t,n){this.storage[t]=n}};function Zd(){if(!(typeof window>"u"))return window}function G_(){const e=Zd();if(!e)return[];try{return Object.keys(e)}catch{return[]}}function Z_(){if(!(typeof document>"u"))return document}function Q_(){var e;const t=(e=Zd())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}function J_(){if(X_())return localStorage;if(e9())throw new Ie("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return q_.getInstance()}function X_(){try{return typeof localStorage<"u"}catch{return!1}}function e9(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}class mr{constructor(t,n){this.injectedWalletKey=n,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const r=mr.window;if(!mr.isWindowContainsWallet(r,n))throw new ig;this.connectionStorage=new wc(t),this.injectedWallet=r[n].tonconnect}static fromStorage(t){return xe(this,void 0,void 0,function*(){const r=yield new wc(t).getInjectedConnection();return new mr(t,r.jsBridgeKey)})}static isWalletInjected(t){return mr.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return mr.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?G_().filter(([r,i])=>K_(i)).map(([r,i])=>({name:i.tonconnect.walletInfo.name,appName:i.tonconnect.walletInfo.app_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,platforms:i.tonconnect.walletInfo.platforms})):[]}static isWindowContainsWallet(t,n){return!!t&&n in t&&typeof t[n]=="object"&&"tonconnect"in t[n]}connect(t){this._connect(_3,t)}restoreConnection(){return xe(this,void 0,void 0,function*(){try{Tn("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();Tn("Injected Provider restoring connection response",t),t.event==="connect"?(this.makeSubscriptions(),this.listeners.forEach(n=>n(t))):yield this.connectionStorage.removeConnection()}catch(t){yield this.connectionStorage.removeConnection(),console.error(t)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return xe(this,void 0,void 0,function*(){return new Promise(t=>{const n=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(t)};try{this.injectedWallet.disconnect(),n()}catch(r){Tn(r),this.sendRequest({method:"disconnect",params:[]},n)}})})}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(n=>n!==t)}sendRequest(t,n){var r;return xe(this,void 0,void 0,function*(){const i={};typeof n=="function"?i.onRequestSent=n:(i.onRequestSent=n==null?void 0:n.onRequestSent,i.signal=n==null?void 0:n.signal);const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Tn("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:o}));const s=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:o}));return s.then(a=>Tn("Wallet message received:",a)),(r=i==null?void 0:i.onRequestSent)===null||r===void 0||r.call(i),s})}_connect(t,n){return xe(this,void 0,void 0,function*(){try{Tn(`Injected Provider connect request: protocolVersion: ${t}, message:`,n);const r=yield this.injectedWallet.connect(t,n);Tn("Injected Provider connect response:",r),r.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(i=>i(r))}catch(r){Tn("Injected Provider connect error:",r);const i={event:"connect_error",payload:{code:0,message:r==null?void 0:r.toString()}};this.listeners.forEach(o=>o(i))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{Tn("Wallet message received:",t),this.listenSubscriptions&&this.listeners.forEach(n=>n(t)),t.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}mr.window=Zd();class t9{constructor(){this.localStorage=J_()}getItem(t){return xe(this,void 0,void 0,function*(){return this.localStorage.getItem(t)})}removeItem(t){return xe(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}setItem(t,n){return xe(this,void 0,void 0,function*(){this.localStorage.setItem(t,n)})}}function ks(e){return n9(e)&&e.injected}function Qd(e){return ks(e)&&e.embedded}function n9(e){return"jsBridgeKey"in e}function sg(e){return"bridgeUrl"in e}const r9=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",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",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"openmask",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"}],platforms:["chrome"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"dewallet",name:"DeWallet",image:"https://app.delabwallet.com/logo_black.png",about_url:"https://delabwallet.com",bridge:[{type:"js",key:"dewallet"}],platforms:["chrome"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];class S0{constructor(t){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",t!=null&&t.walletsListSource&&(this.walletsListSource=t.walletsListSource),t!=null&&t.cacheTTLMs&&(this.cacheTTLMs=t.cacheTTLMs)}getWallets(){return xe(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 xe(this,void 0,void 0,function*(){const n=(yield this.getWallets()).filter(Qd);return n.length!==1?null:n[0]})}fetchWalletsList(){return xe(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new og("Wrong wallets list format, wallets list must be an array.");const i=t.filter(o=>!this.isCorrectWalletConfigDTO(o));i.length&&(ki(`Wallet(s) ${i.map(o=>o.name).join(", ")} config format is wrong. They were removed from the wallets list.`),t=t.filter(o=>this.isCorrectWalletConfigDTO(o)))}catch(r){ki(r),t=r9}let n=[];try{n=mr.getCurrentlyInjectedWallets()}catch(r){ki(r)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),n)})}walletConfigDTOListToWalletConfigList(t){return t.map(n=>{const i={name:n.name,appName:n.app_name,imageUrl:n.image,aboutUrl:n.about_url,tondns:n.tondns,platforms:n.platforms};return n.bridge.forEach(o=>{if(o.type==="sse"&&(i.bridgeUrl=o.url,i.universalLink=n.universal_url,i.deepLink=n.deepLink),o.type==="js"){const s=o.key;i.jsBridgeKey=s,i.injected=mr.isWalletInjected(s),i.embedded=mr.isInsideWalletBrowser(s)}}),i})}mergeWalletsLists(t,n){return[...new Set(t.concat(n).map(i=>i.name)).values()].map(i=>{const o=t.find(a=>a.name===i),s=n.find(a=>a.name===i);return Object.assign(Object.assign({},o&&Object.assign({},o)),s&&Object.assign({},s))})}isCorrectWalletConfigDTO(t){if(!t||typeof t!="object")return!1;const n="name"in t,r="app_name"in t,i="image"in t,o="about_url"in t,s="platforms"in t;if(!n||!i||!o||!s||!r||!t.platforms||!Array.isArray(t.platforms)||!t.platforms.length||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const a=t.bridge;if(a.some(u=>!u||typeof u!="object"||!("type"in u)))return!1;const l=a.find(u=>u.type==="sse");if(l&&(!("url"in l)||!l.url||!t.universal_url))return!1;const c=a.find(u=>u.type==="js");return!(c&&(!("key"in c)||!c.key))}}class Gf extends Ie{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,Gf.prototype)}}function i9(e,t){const n=e.includes("SendTransaction"),r=e.find(i=>i&&typeof i=="object"&&i.name==="SendTransaction");if(!n&&!r)throw new Gf("Wallet doesn't support SendTransaction feature.");if(r&&r.maxMessages!==void 0){if(r.maxMessages{var a,l;return{address:(a=s.address)!==null&&a!==void 0?a:null,amount:(l=s.amount)!==null&&l!==void 0?l:null}})}}function O3(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},Ya(e,t)),ag(t,n))}function R3(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},Ya(e,t)),ag(t,n))}function D3(e,t,n,r,i){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:i??null},Ya(e,t)),ag(t,n))}function I3(e,t,n){return Object.assign({type:"disconnection",scope:n},Ya(e,t))}class N3{constructor(){this.window=Zd()}dispatchEvent(t,n){var r;return xe(this,void 0,void 0,function*(){const i=new CustomEvent(t,{detail:n});(r=this.window)===null||r===void 0||r.dispatchEvent(i)})}addEventListener(t,n,r){var i;return xe(this,void 0,void 0,function*(){return(i=this.window)===null||i===void 0||i.addEventListener(t,n,r),()=>{var o;return(o=this.window)===null||o===void 0?void 0:o.removeEventListener(t,n)}})}}class o9{constructor(t){var n;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!==null&&n!==void 0?n:new N3,this.tonConnectSdkVersion=t.tonConnectSdkVersion,this.init().catch()}get version(){return js({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return xe(this,void 0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch{}})}setRequestVersionHandler(){return xe(this,void 0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>xe(this,void 0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",k3(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return xe(this,void 0,void 0,function*(){return new Promise((t,n)=>xe(this,void 0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",S3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=E3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=M3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=T3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=P3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=A3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=L3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=I3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=R3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const s9="3.0.3";class Ns{constructor(t){if(this.walletsList=new S0,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(t==null?void 0:t.manifestUrl)||Q_(),storage:(t==null?void 0:t.storage)||new t9},this.walletsList=new S0({walletsListSource:t==null?void 0:t.walletsListSource,cacheTTLMs:t==null?void 0:t.walletsListCacheTTLMs}),this.tracker=new o9({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectSdkVersion:s9}),!this.dappSettings.manifestUrl)throw new ng("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new wc(this.dappSettings.storage),t!=null&&t.disableAutoPauseConnection||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return this._wallet!==null}get account(){var t;return((t=this._wallet)===null||t===void 0?void 0:t.account)||null}get wallet(){return this._wallet}set wallet(t){this._wallet=t,this.statusChangeSubscriptions.forEach(n=>n(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(t,n){return this.statusChangeSubscriptions.push(t),n&&this.statusChangeErrorSubscriptions.push(n),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(r=>r!==t),n&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(r=>r!==n))}}connect(t,n){var r,i;const o={};if(typeof n=="object"&&"tonProof"in n&&(o.request=n),typeof n=="object"&&("openingDeadlineMS"in n||"signal"in n||"request"in n)&&(o.request=n==null?void 0:n.request,o.openingDeadlineMS=n==null?void 0:n.openingDeadlineMS,o.signal=n==null?void 0:n.signal),this.connected)throw new rg;const s=ni(o==null?void 0:o.signal);if((r=this.abortController)===null||r===void 0||r.abort(),this.abortController=s,s.signal.aborted)throw new Ie("Connection was aborted");return(i=this.provider)===null||i===void 0||i.closeConnection(),this.provider=this.createProvider(t),s.signal.addEventListener("abort",()=>{var a;(a=this.provider)===null||a===void 0||a.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(o==null?void 0:o.request),{openingDeadlineMS:o==null?void 0:o.openingDeadlineMS,signal:s.signal})}restoreConnection(t){var n,r;return xe(this,void 0,void 0,function*(){this.tracker.trackConnectionRestoringStarted();const i=ni(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=i,i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}const[o,s]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}let a=null;try{switch(o){case"http":a=yield xc.fromStorage(this.dappSettings.storage);break;case"injected":a=yield mr.fromStorage(this.dappSettings.storage);break;default:if(s)a=this.createProvider(s);else return}}catch{this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),a==null||a.closeConnection(),a=null;return}if(i.signal.aborted){a==null||a.closeConnection(),this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}if(!a){ki("Provider is not restored"),this.tracker.trackConnectionRestoringError("Provider is not restored");return}(r=this.provider)===null||r===void 0||r.closeConnection(),this.provider=a,a.listen(this.walletEventsListener.bind(this));const l=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),a==null||a.closeConnection(),a=null};return i.signal.addEventListener("abort",l),yield Fl(c=>xe(this,void 0,void 0,function*(){yield a==null?void 0:a.restoreConnection({openingDeadlineMS:t==null?void 0:t.openingDeadlineMS,signal:c.signal}),i.signal.removeEventListener("abort",l),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:t==null?void 0:t.signal})})}sendTransaction(t,n){return xe(this,void 0,void 0,function*(){const r={};typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal);const i=ni(r==null?void 0:r.signal);if(i.signal.aborted)throw new Ie("Transaction sending was aborted");this.checkConnection(),i9(this.wallet.device.features,{requiredMessagesNumber:t.messages.length}),this.tracker.trackTransactionSentForSignature(this.wallet,t);const{validUntil:o}=t,s=I_(t,["validUntil"]),a=t.from||this.account.address,l=t.network||this.account.chain,c=yield this.provider.sendRequest(Eu.convertToRpcRequest(Object.assign(Object.assign({},s),{valid_until:o,from:a,network:l})),{onRequestSent:r.onRequestSent,signal:i.signal});if(Eu.isError(c))return this.tracker.trackTransactionSigningFailed(this.wallet,t,c.error.message,c.error.code),Eu.parseAndThrowError(c);const u=Eu.convertFromRpcResponse(c);return this.tracker.trackTransactionSigned(this.wallet,t,u),u})}disconnect(t){var n;return xe(this,void 0,void 0,function*(){if(!this.connected)throw new Kf;const r=ni(t==null?void 0:t.signal),i=this.abortController;if(this.abortController=r,r.signal.aborted)throw new Ie("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield(n=this.provider)===null||n===void 0?void 0:n.disconnect({signal:r.signal}),i==null||i.abort()})}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=Z_();if(t)try{t.addEventListener("visibilitychange",()=>{t.hidden?this.pauseConnection():this.unPauseConnection().catch()})}catch(n){ki("Cannot subscribe to the document.visibilitychange: ",n)}}createProvider(t){let n;return!Array.isArray(t)&&N_(t)?n=new mr(this.dappSettings.storage,t.jsBridgeKey):n=new xc(this.dappSettings.storage,t),n.listen(this.walletEventsListener.bind(this)),n}walletEventsListener(t){switch(t.event){case"connect":this.onWalletConnected(t.payload);break;case"connect_error":this.onWalletConnectError(t.payload);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(t){const n=t.items.find(o=>o.name==="ton_addr"),r=t.items.find(o=>o.name==="ton_proof");if(!n)throw new Ie("ton_addr connection item was not found");const i={device:t.device,provider:this.provider.type,account:{address:n.address,chain:n.network,walletStateInit:n.walletStateInit,publicKey:n.publicKey}};r&&(i.connectItems={tonProof:r}),this.wallet=i,this.tracker.trackConnectionCompleted(i)}onWalletConnectError(t){const n=$_.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(r=>r(n)),Tn(n),this.tracker.trackConnectionError(t.message,t.code),n instanceof Yd||n instanceof Vd)throw ki(n),n}onWalletDisconnected(t){this.tracker.trackDisconnection(this.wallet,t),this.wallet=null}checkConnection(){if(!this.connected)throw new Kf}createConnectRequest(t){const n=[{name:"ton_addr"}];return t!=null&&t.tonProof&&n.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:n}}}Ns.walletsList=new S0;Ns.isWalletInjected=e=>mr.isWalletInjected(e);Ns.isInsideWalletBrowser=e=>mr.isInsideWalletBrowser(e);const a9=81,l9=128;function W3(e,t=!1){const{wc:n,hex:r}=c9(e);let i=a9;t&&(i|=l9);const o=new Int8Array(34);o[0]=i,o[1]=n,o.set(r,2);const s=new Uint8Array(36);return s.set(o),s.set(u9(o),34),tg.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}function c9(e){if(!e.includes(":"))throw new ha(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new ha(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(n!==0&&n!==-1)throw new ha(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if((r==null?void 0:r.length)!==64)throw new ha(`Wrong address ${e}. Hex part must be 64bytes length, but ${r==null?void 0:r.length} received.`);return{wc:n,hex:f9(r)}}function u9(e){let n=0;const r=new Uint8Array(e.length+2);r.set(e);for(let i of r){let o=128;for(;o>0;)n<<=1,i&o&&(n+=1),o>>=1,n>65535&&(n&=65535,n^=4129)}return new Uint8Array([Math.floor(n/256),n%256])}const k0={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),k0[t]=e}function f9(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new qf("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let i=0;i0?wt.length===2?typeof wt[1]==a?this[wt[0]]=wt[1].call(this,Fn):this[wt[0]]=wt[1]:wt.length===3?typeof wt[1]===a&&!(wt[1].exec&&wt[1].test)?this[wt[0]]=Fn?wt[1].call(this,Fn,wt[2]):r:this[wt[0]]=Fn?Fn.replace(wt[1],wt[2]):r:wt.length===4&&(this[wt[0]]=Fn?wt[3].call(this,Fn.replace(wt[1],wt[2])):r):this[wt]=Fn||r;He+=2}},We=function(Ue,yt){for(var He in yt)if(typeof yt[He]===c&&yt[He].length>0){for(var Pt=0;Pt2&&(Re[h]="iPad",Re[m]=M),Re},this.getEngine=function(){var Re={};return Re[g]=r,Re[k]=r,Dt.call(Re,Pt,hr.engine),Re},this.getOS=function(){var Re={};return Re[g]=r,Re[k]=r,Dt.call(Re,Pt,hr.os),wt&&!Re[g]&&Rn&&Rn.platform&&Rn.platform!="Unknown"&&(Re[g]=Rn.platform.replace(/chrome os/i,q).replace(/macos/i,B)),Re},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Pt},this.setUA=function(Re){return Pt=typeof Re===u&&Re.length>P?Xe(Re,P):Re,this},this.setUA(Pt),this};Cn.VERSION=i,Cn.BROWSER=ne([g,k,d]),Cn.CPU=ne([C]),Cn.DEVICE=ne([h,y,m,v,w,E,M,O,T]),Cn.ENGINE=Cn.OS=ne([g,k]),e.exports&&(t=e.exports=Cn),t.UAParser=Cn;var En=typeof n!==l&&(n.jQuery||n.Zepto);if(En&&!En.ua){var ir=new Cn;En.ua=ir.getResult(),En.ua.get=function(){return ir.getUA()},En.ua.set=function(Ue){ir.setUA(Ue);var yt=ir.getResult();for(var He in yt)En.ua[He]=yt[He]}}})(typeof window=="object"?window:iw)})(E0,E0.exports);var d9=E0.exports;const h9=ja(d9);var p9=function(t){return g9(t)&&!m9(t)};function g9(e){return!!e&&typeof e=="object"}function m9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||w9(e)}var v9=typeof Symbol=="function"&&Symbol.for,y9=v9?Symbol.for("react.element"):60103;function w9(e){return e.$$typeof===y9}function x9(e){return Array.isArray(e)?[]:{}}function bc(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ia(x9(e),e,t):e}function b9(e,t,n){return e.concat(t).map(function(r){return bc(r,n)})}function _9(e,t){if(!t.customMerge)return Ia;var n=t.customMerge(e);return typeof n=="function"?n:Ia}function C9(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function O2(e){return Object.keys(e).concat(C9(e))}function $3(e,t){try{return t in e}catch{return!1}}function S9(e,t){return $3(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function k9(e,t,n){var r={};return n.isMergeableObject(e)&&O2(e).forEach(function(i){r[i]=bc(e[i],n)}),O2(t).forEach(function(i){S9(e,i)||($3(e,i)&&n.isMergeableObject(t[i])?r[i]=_9(i,n)(e[i],t[i],n):r[i]=bc(t[i],n))}),r}function Ia(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||b9,n.isMergeableObject=n.isMergeableObject||p9,n.cloneUnlessOtherwiseSpecified=bc;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):k9(e,t,n):bc(t,n)}Ia.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ia(r,i,n)},{})};var E9=Ia,M9=E9;const T9=ja(M9);var U3={exports:{}};/*! +***************************************************************************** */function N_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{var i,o;if(!((i=void 0)===null||i===void 0)&&i.aborted){r(new Ie("Delay aborted"));return}const s=setTimeout(()=>n(),e);(o=void 0)===null||o===void 0||o.addEventListener("abort",()=>{clearTimeout(s),r(new Ie("Delay aborted"))})})})}function ni(e){const t=new AbortController;return e!=null&&e.aborted?t.abort():e==null||e.addEventListener("abort",()=>t.abort(),{once:!0}),t}function Bl(e,t){var n,r;return xe(this,void 0,void 0,function*(){const i=(n=t==null?void 0:t.attempts)!==null&&n!==void 0?n:10,o=(r=t==null?void 0:t.delayMs)!==null&&r!==void 0?r:200,s=ni(t==null?void 0:t.signal);if(typeof e!="function")throw new Ie(`Expected a function, got ${typeof e}`);let a=0,l;for(;axe(this,void 0,void 0,function*(){if(o=d??null,s==null||s.abort(),s=ni(d),s.signal.aborted)throw new Ie("Resource creation was aborted");r=h??null;const g=e(s.signal,...h);i=g;const m=yield g;if(i!==g&&m!==n)throw yield t(m),new Ie("Resource creation was aborted by a new resource creation");return n=m,n});return{create:a,current:()=>n??null,dispose:()=>xe(this,void 0,void 0,function*(){try{const d=n;n=null;const h=i;i=null;try{s==null||s.abort()}catch{}yield Promise.allSettled([d?t(d):Promise.resolve(),h?t(yield h):Promise.resolve()])}catch{}}),recreate:d=>xe(this,void 0,void 0,function*(){const h=n,g=i,m=r,y=o;if(yield _3(d),h===n&&g===i&&m===r&&y===o)return yield a(o,...m??[]);throw new Ie("Resource recreation was aborted by a new resource creation")})}}function Y_(e,t){const n=t==null?void 0:t.timeout,r=t==null?void 0:t.signal,i=ni(r);return new Promise((o,s)=>{if(i.signal.aborted){s(new Ie("Operation aborted"));return}let a;typeof n<"u"&&(a=setTimeout(()=>{i.abort(),s(new Ie(`Timeout after ${n}ms`))},n)),i.signal.addEventListener("abort",()=>{clearTimeout(a),s(new Ie("Operation aborted"))},{once:!0});const l={timeout:n,abort:i.signal};e(o,s,l).finally(()=>clearTimeout(a))})}class t1{constructor(t,n,r,i,o){this.bridgeUrl=n,this.sessionId=r,this.listener=i,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=5e3,this.eventSource=V_((s,a)=>xe(this,void 0,void 0,function*(){const l={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:s,openingDeadlineMS:a};return yield K_(l)}),s=>xe(this,void 0,void 0,function*(){s.close()})),this.bridgeGatewayStorage=new j_(t,n)}get isReady(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.OPEN}get isClosed(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)!==EventSource.OPEN}get isConnecting(){const t=this.eventSource.current();return(t==null?void 0:t.readyState)===EventSource.CONNECTING}registerSession(t){return xe(this,void 0,void 0,function*(){yield this.eventSource.create(t==null?void 0:t.signal,t==null?void 0:t.openingDeadlineMS)})}send(t,n,r,i){var o;return xe(this,void 0,void 0,function*(){const s={};typeof i=="number"?s.ttl=i:(s.ttl=i==null?void 0:i.ttl,s.signal=i==null?void 0:i.signal,s.attempts=i==null?void 0:i.attempts);const a=new URL(x3(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",n),a.searchParams.append("ttl",((s==null?void 0:s.ttl)||this.defaultTtl).toString()),a.searchParams.append("topic",r);const l=ng.encode(t);yield Bl(c=>xe(this,void 0,void 0,function*(){const u=yield this.post(a,l,c.signal);if(!u.ok)throw new Ie(`Bridge send failed, status ${u.status}`)}),{attempts:(o=s==null?void 0:s.attempts)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:s==null?void 0:s.signal})})}pause(){this.eventSource.dispose().catch(t=>ki(`Bridge pause failed, ${t}`))}unPause(){return xe(this,void 0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return xe(this,void 0,void 0,function*(){yield this.eventSource.dispose().catch(t=>ki(`Bridge close failed, ${t}`))})}setListener(t){this.listener=t}setErrorsListener(t){this.errorsListener=t}post(t,n,r){return xe(this,void 0,void 0,function*(){const i=yield fetch(t,{method:"post",body:n,signal:r});if(!i.ok)throw new Ie(`Bridge send failed, status ${i.status}`);return i})}errorsHandler(t,n){return xe(this,void 0,void 0,function*(){if(this.isConnecting){ki("Bridge error",JSON.stringify(n));return}if(this.isReady){try{this.errorsListener(n)}catch{}return}if(this.isClosed)return t.close(),Tn(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new Ie("Bridge error, unknown state")})}messagesHandler(t){return xe(this,void 0,void 0,function*(){if(t.data===this.heartbeatMessage||(yield this.bridgeGatewayStorage.storeLastEventId(t.lastEventId),this.isClosed))return;let n;try{n=JSON.parse(t.data)}catch(r){throw new Ie(`Bridge message parse failed, message ${r.data}`)}this.listener(n)})}}function K_(e){return xe(this,void 0,void 0,function*(){return yield Y_((t,n,r)=>xe(this,void 0,void 0,function*(){var i;const s=ni(r.signal).signal;if(s.aborted){n(new Ie("Bridge connection aborted"));return}const a=new URL(x3(e.bridgeUrl,e.ssePath));a.searchParams.append("client_id",e.sessionId);const l=yield e.bridgeGatewayStorage.getLastEventId();if(l&&a.searchParams.append("last_event_id",l),s.aborted){n(new Ie("Bridge connection aborted"));return}const c=new EventSource(a.toString());c.onerror=u=>xe(this,void 0,void 0,function*(){if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}try{const d=yield e.errorHandler(c,u);d!==c&&c.close(),d&&d!==c&&t(d)}catch(d){c.close(),n(d)}}),c.onopen=()=>{if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}t(c)},c.onmessage=u=>{if(s.aborted){c.close(),n(new Ie("Bridge connection aborted"));return}e.messageHandler(u)},(i=e.signal)===null||i===void 0||i.addEventListener("abort",()=>{c.close(),n(new Ie("Bridge connection aborted"))})}),{timeout:e.openingDeadlineMS,signal:e.signal})})}function jl(e){return!("connectEvent"in e)}class xc{constructor(t){this.storage=t,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(t){return xe(this,void 0,void 0,function*(){if(t.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(t));if(!jl(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))}const n={type:"http",connectionSource:t.connectionSource,sessionCrypto:t.sessionCrypto.stringifyKeypair()};return this.storage.setItem(this.storeKey,JSON.stringify(n))})}removeConnection(){return xe(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);if(!t)return null;const n=JSON.parse(t);if(n.type==="injected")return n;if("connectEvent"in n){const r=new S0(n.session.sessionKeyPair);return{type:"http",connectEvent:n.connectEvent,lastWalletEventId:n.lastWalletEventId,nextRpcRequestId:n.nextRpcRequestId,session:{sessionCrypto:r,bridgeUrl:n.session.bridgeUrl,walletPublicKey:n.session.walletPublicKey}}}return{type:"http",sessionCrypto:new S0(n.sessionCrypto),connectionSource:n.connectionSource}})}getHttpConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Ie("Trying to read HTTP connection source while injected connection is stored");return t})}getHttpPendingConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read HTTP connection source while nothing is stored");if(t.type==="injected")throw new Ie("Trying to read HTTP connection source while injected connection is stored");if(!jl(t))throw new Ie("Trying to read HTTP-pending connection while http connection is stored");return t})}getInjectedConnection(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(!t)throw new Ie("Trying to read Injected bridge connection source while nothing is stored");if((t==null?void 0:t.type)==="http")throw new Ie("Trying to read Injected bridge connection source while HTTP connection is stored");return t})}storedConnectionType(){return xe(this,void 0,void 0,function*(){const t=yield this.storage.getItem(this.storeKey);return t?JSON.parse(t).type:null})}storeLastWalletEventId(t){return xe(this,void 0,void 0,function*(){const n=yield this.getConnection();if(n&&n.type==="http"&&!jl(n))return n.lastWalletEventId=t,this.storeConnection(n)})}getLastWalletEventId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"lastWalletEventId"in t)return t.lastWalletEventId})}increaseNextRpcRequestId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();if(t&&"nextRpcRequestId"in t){const n=t.nextRpcRequestId||0;return t.nextRpcRequestId=n+1,this.storeConnection(t)}})}getNextRpcRequestId(){return xe(this,void 0,void 0,function*(){const t=yield this.getConnection();return t&&"nextRpcRequestId"in t&&t.nextRpcRequestId||0})}}const C3=2;class bc{constructor(t,n){this.storage=t,this.walletConnectionSource=n,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=5e3,this.connectionStorage=new xc(t)}static fromStorage(t){return xe(this,void 0,void 0,function*(){const r=yield new xc(t).getHttpConnection();return jl(r)?new bc(t,r.connectionSource):new bc(t,{bridgeUrl:r.session.bridgeUrl})})}connect(t,n){var r;const i=ni(n==null?void 0:n.signal);(r=this.abortController)===null||r===void 0||r.abort(),this.abortController=i,this.closeGateways();const o=new S0;this.session={sessionCrypto:o,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:o}).then(()=>xe(this,void 0,void 0,function*(){i.signal.aborted||(yield Bl(a=>this.openGateways(o,{openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:a==null?void 0:a.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:i.signal}))}));const s="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(s,t)}restoreConnection(t){var n,r;return xe(this,void 0,void 0,function*(){const i=ni(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=i,i.signal.aborted)return;this.closeGateways();const o=yield this.connectionStorage.getHttpConnection();if(!o||i.signal.aborted)return;const s=(r=t==null?void 0:t.openingDeadlineMS)!==null&&r!==void 0?r:this.defaultOpeningDeadlineMS;if(jl(o))return this.session={sessionCrypto:o.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(o.sessionCrypto,{openingDeadlineMS:s,signal:i==null?void 0:i.signal});if(Array.isArray(this.walletConnectionSource))throw new Ie("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=o.session,this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new t1(this.storage,this.walletConnectionSource.bridgeUrl,o.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!i.signal.aborted){this.listeners.forEach(a=>a(o.connectEvent));try{yield Bl(a=>this.gateway.registerSession({openingDeadlineMS:s,signal:a.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:i.signal})}catch{yield this.disconnect({signal:i.signal});return}}})}sendRequest(t,n){const r={};return typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal,r.attempts=n==null?void 0:n.attempts),new Promise((i,o)=>xe(this,void 0,void 0,function*(){var s;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new Ie("Trying to send bridge request without session");const a=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Tn("Send http-bridge request:",Object.assign(Object.assign({},t),{id:a}));const l=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{id:a})),Kf(this.session.walletPublicKey));try{yield this.gateway.send(l,this.session.walletPublicKey,t.method,{attempts:r==null?void 0:r.attempts,signal:r==null?void 0:r.signal}),(s=r==null?void 0:r.onRequestSent)===null||s===void 0||s.call(r),this.pendingRequests.set(a.toString(),i)}catch(c){o(c)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(t){return xe(this,void 0,void 0,function*(){return new Promise(n=>xe(this,void 0,void 0,function*(){let r=!1,i=null;const o=()=>{r||(r=!0,this.removeBridgeAndSession().then(n))};try{this.closeGateways();const s=ni(t==null?void 0:t.signal);i=setTimeout(()=>{s.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:o,signal:s.signal,attempts:1})}catch(s){Tn("Disconnect error:",s),r||this.removeBridgeAndSession().then(n)}finally{i&&clearTimeout(i),o()}}))})}listen(t){return this.listeners.push(t),()=>this.listeners=this.listeners.filter(n=>n!==t)}pause(){var t;(t=this.gateway)===null||t===void 0||t.pause(),this.pendingGateways.forEach(n=>n.pause())}unPause(){return xe(this,void 0,void 0,function*(){const t=this.pendingGateways.map(n=>n.unPause());this.gateway&&t.push(this.gateway.unPause()),yield Promise.all(t)})}pendingGatewaysListener(t,n,r){return xe(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(t)){yield t.close();return}return this.closeGateways({except:t}),this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=n,this.gateway=t,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(r)})}gatewayListener(t){return xe(this,void 0,void 0,function*(){const n=JSON.parse(this.session.sessionCrypto.decrypt(ng.decode(t.message).toUint8Array(),Kf(t.from)));if(Tn("Wallet message received:",n),!("event"in n)){const i=n.id.toString(),o=this.pendingRequests.get(i);if(!o){Tn(`Response id ${i} doesn't match any request's id`);return}o(n),this.pendingRequests.delete(i);return}if(n.id!==void 0){const i=yield this.connectionStorage.getLastWalletEventId();if(i!==void 0&&n.id<=i){ki(`Received event id (=${n.id}) must be greater than stored last wallet event id (=${i}) `);return}n.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(n.id))}const r=this.listeners;n.event==="connect"&&(yield this.updateSession(n,t.from)),n.event==="disconnect"&&(Tn("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),r.forEach(i=>i(n))})}gatewayErrorsListener(t){return xe(this,void 0,void 0,function*(){throw new Ie(`Bridge error ${JSON.stringify(t)}`)})}updateSession(t,n){return xe(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:n});const r=t.payload.items.find(o=>o.name==="ton_addr"),i=Object.assign(Object.assign({},t),{payload:Object.assign(Object.assign({},t.payload),{items:[r]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:t.id,connectEvent:i,nextRpcRequestId:0})})}removeBridgeAndSession(){return xe(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(t,n){return ks(t)?this.generateTGUniversalLink(t,n):this.generateRegularUniversalLink(t,n)}generateRegularUniversalLink(t,n){const r=new URL(t);return r.searchParams.append("v",C3.toString()),r.searchParams.append("id",this.session.sessionCrypto.sessionId),r.searchParams.append("r",JSON.stringify(n)),r.toString()}generateTGUniversalLink(t,n){const i=this.generateRegularUniversalLink("about:blank",n).split("?")[1],o="tonconnect-"+b3(i),s=this.convertToDirectLink(t),a=new URL(s);return a.searchParams.append("startapp",o),a.toString()}convertToDirectLink(t){const n=new URL(t);return n.searchParams.has("attach")&&(n.searchParams.delete("attach"),n.pathname+="/start"),n.toString()}openGateways(t,n){return xe(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource)){this.pendingGateways.map(r=>r.close().catch()),this.pendingGateways=this.walletConnectionSource.map(r=>{const i=new t1(this.storage,r.bridgeUrl,t.sessionId,()=>{},()=>{});return i.setListener(o=>this.pendingGatewaysListener(i,r.bridgeUrl,o)),i}),yield Promise.allSettled(this.pendingGateways.map(r=>Bl(i=>this.pendingGateways.some(o=>o===r)?r.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:i.signal}):r.close(),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:n==null?void 0:n.signal})));return}else return this.gateway&&(Tn("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new t1(this.storage,this.walletConnectionSource.bridgeUrl,t.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:n==null?void 0:n.openingDeadlineMS,signal:n==null?void 0:n.signal})})}closeGateways(t){var n;(n=this.gateway)===null||n===void 0||n.close(),this.pendingGateways.filter(r=>r!==(t==null?void 0:t.except)).forEach(r=>r.close()),this.pendingGateways=[]}}function O2(e,t){return S3(e,[t])}function S3(e,t){return!e||typeof e!="object"?!1:t.every(n=>n in e)}function q_(e){try{return!O2(e,"tonconnect")||!O2(e.tonconnect,"walletInfo")?!1:S3(e.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch{return!1}}let G_=class Cl{constructor(){this.storage={}}static getInstance(){return Cl.instance||(Cl.instance=new Cl),Cl.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(t){var n;return(n=this.storage[t])!==null&&n!==void 0?n:null}key(t){var n;const r=Object.keys(this.storage);return t<0||t>=r.length?null:(n=r[t])!==null&&n!==void 0?n:null}removeItem(t){delete this.storage[t]}setItem(t,n){this.storage[t]=n}};function Qd(){if(!(typeof window>"u"))return window}function Z_(){const e=Qd();if(!e)return[];try{return Object.keys(e)}catch{return[]}}function Q_(){if(!(typeof document>"u"))return document}function J_(){var e;const t=(e=Qd())===null||e===void 0?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}function X_(){if(e9())return localStorage;if(t9())throw new Ie("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return G_.getInstance()}function e9(){try{return typeof localStorage<"u"}catch{return!1}}function t9(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}class mr{constructor(t,n){this.injectedWalletKey=n,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const r=mr.window;if(!mr.isWindowContainsWallet(r,n))throw new og;this.connectionStorage=new xc(t),this.injectedWallet=r[n].tonconnect}static fromStorage(t){return xe(this,void 0,void 0,function*(){const r=yield new xc(t).getInjectedConnection();return new mr(t,r.jsBridgeKey)})}static isWalletInjected(t){return mr.isWindowContainsWallet(this.window,t)}static isInsideWalletBrowser(t){return mr.isWindowContainsWallet(this.window,t)?this.window[t].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Z_().filter(([r,i])=>q_(i)).map(([r,i])=>({name:i.tonconnect.walletInfo.name,appName:i.tonconnect.walletInfo.app_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,platforms:i.tonconnect.walletInfo.platforms})):[]}static isWindowContainsWallet(t,n){return!!t&&n in t&&typeof t[n]=="object"&&"tonconnect"in t[n]}connect(t){this._connect(C3,t)}restoreConnection(){return xe(this,void 0,void 0,function*(){try{Tn("Injected Provider restoring connection...");const t=yield this.injectedWallet.restoreConnection();Tn("Injected Provider restoring connection response",t),t.event==="connect"?(this.makeSubscriptions(),this.listeners.forEach(n=>n(t))):yield this.connectionStorage.removeConnection()}catch(t){yield this.connectionStorage.removeConnection(),console.error(t)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return xe(this,void 0,void 0,function*(){return new Promise(t=>{const n=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(t)};try{this.injectedWallet.disconnect(),n()}catch(r){Tn(r),this.sendRequest({method:"disconnect",params:[]},n)}})})}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(n=>n!==t)}sendRequest(t,n){var r;return xe(this,void 0,void 0,function*(){const i={};typeof n=="function"?i.onRequestSent=n:(i.onRequestSent=n==null?void 0:n.onRequestSent,i.signal=n==null?void 0:n.signal);const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Tn("Send injected-bridge request:",Object.assign(Object.assign({},t),{id:o}));const s=this.injectedWallet.send(Object.assign(Object.assign({},t),{id:o}));return s.then(a=>Tn("Wallet message received:",a)),(r=i==null?void 0:i.onRequestSent)===null||r===void 0||r.call(i),s})}_connect(t,n){return xe(this,void 0,void 0,function*(){try{Tn(`Injected Provider connect request: protocolVersion: ${t}, message:`,n);const r=yield this.injectedWallet.connect(t,n);Tn("Injected Provider connect response:",r),r.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(i=>i(r))}catch(r){Tn("Injected Provider connect error:",r);const i={event:"connect_error",payload:{code:0,message:r==null?void 0:r.toString()}};this.listeners.forEach(o=>o(i))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(t=>{Tn("Wallet message received:",t),this.listenSubscriptions&&this.listeners.forEach(n=>n(t)),t.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}mr.window=Qd();class n9{constructor(){this.localStorage=X_()}getItem(t){return xe(this,void 0,void 0,function*(){return this.localStorage.getItem(t)})}removeItem(t){return xe(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}setItem(t,n){return xe(this,void 0,void 0,function*(){this.localStorage.setItem(t,n)})}}function Es(e){return r9(e)&&e.injected}function Jd(e){return Es(e)&&e.embedded}function r9(e){return"jsBridgeKey"in e}function ag(e){return"bridgeUrl"in e}const i9=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",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",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"openmask",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"}],platforms:["chrome"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"dewallet",name:"DeWallet",image:"https://app.delabwallet.com/logo_black.png",about_url:"https://delabwallet.com",bridge:[{type:"js",key:"dewallet"}],platforms:["chrome"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];class k0{constructor(t){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",t!=null&&t.walletsListSource&&(this.walletsListSource=t.walletsListSource),t!=null&&t.cacheTTLMs&&(this.cacheTTLMs=t.cacheTTLMs)}getWallets(){return xe(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 xe(this,void 0,void 0,function*(){const n=(yield this.getWallets()).filter(Jd);return n.length!==1?null:n[0]})}fetchWalletsList(){return xe(this,void 0,void 0,function*(){let t=[];try{if(t=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(t))throw new sg("Wrong wallets list format, wallets list must be an array.");const i=t.filter(o=>!this.isCorrectWalletConfigDTO(o));i.length&&(ki(`Wallet(s) ${i.map(o=>o.name).join(", ")} config format is wrong. They were removed from the wallets list.`),t=t.filter(o=>this.isCorrectWalletConfigDTO(o)))}catch(r){ki(r),t=i9}let n=[];try{n=mr.getCurrentlyInjectedWallets()}catch(r){ki(r)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(t),n)})}walletConfigDTOListToWalletConfigList(t){return t.map(n=>{const i={name:n.name,appName:n.app_name,imageUrl:n.image,aboutUrl:n.about_url,tondns:n.tondns,platforms:n.platforms};return n.bridge.forEach(o=>{if(o.type==="sse"&&(i.bridgeUrl=o.url,i.universalLink=n.universal_url,i.deepLink=n.deepLink),o.type==="js"){const s=o.key;i.jsBridgeKey=s,i.injected=mr.isWalletInjected(s),i.embedded=mr.isInsideWalletBrowser(s)}}),i})}mergeWalletsLists(t,n){return[...new Set(t.concat(n).map(i=>i.name)).values()].map(i=>{const o=t.find(a=>a.name===i),s=n.find(a=>a.name===i);return Object.assign(Object.assign({},o&&Object.assign({},o)),s&&Object.assign({},s))})}isCorrectWalletConfigDTO(t){if(!t||typeof t!="object")return!1;const n="name"in t,r="app_name"in t,i="image"in t,o="about_url"in t,s="platforms"in t;if(!n||!i||!o||!s||!r||!t.platforms||!Array.isArray(t.platforms)||!t.platforms.length||!("bridge"in t)||!Array.isArray(t.bridge)||!t.bridge.length)return!1;const a=t.bridge;if(a.some(u=>!u||typeof u!="object"||!("type"in u)))return!1;const l=a.find(u=>u.type==="sse");if(l&&(!("url"in l)||!l.url||!t.universal_url))return!1;const c=a.find(u=>u.type==="js");return!(c&&(!("key"in c)||!c.key))}}class Zf extends Ie{get info(){return"Wallet doesn't support requested feature method."}constructor(...t){super(...t),Object.setPrototypeOf(this,Zf.prototype)}}function o9(e,t){const n=e.includes("SendTransaction"),r=e.find(i=>i&&typeof i=="object"&&i.name==="SendTransaction");if(!n&&!r)throw new Zf("Wallet doesn't support SendTransaction feature.");if(r&&r.maxMessages!==void 0){if(r.maxMessages{var a,l;return{address:(a=s.address)!==null&&a!==void 0?a:null,amount:(l=s.amount)!==null&&l!==void 0?l:null}})}}function R3(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},Ka(e,t)),lg(t,n))}function D3(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},Ka(e,t)),lg(t,n))}function I3(e,t,n,r,i){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:i??null},Ka(e,t)),lg(t,n))}function N3(e,t,n){return Object.assign({type:"disconnection",scope:n},Ka(e,t))}class W3{constructor(){this.window=Qd()}dispatchEvent(t,n){var r;return xe(this,void 0,void 0,function*(){const i=new CustomEvent(t,{detail:n});(r=this.window)===null||r===void 0||r.dispatchEvent(i)})}addEventListener(t,n,r){var i;return xe(this,void 0,void 0,function*(){return(i=this.window)===null||i===void 0||i.addEventListener(t,n,r),()=>{var o;return(o=this.window)===null||o===void 0?void 0:o.removeEventListener(t,n)}})}}class s9{constructor(t){var n;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!==null&&n!==void 0?n:new W3,this.tonConnectSdkVersion=t.tonConnectSdkVersion,this.init().catch()}get version(){return Hs({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return xe(this,void 0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch{}})}setRequestVersionHandler(){return xe(this,void 0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>xe(this,void 0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",E3(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return xe(this,void 0,void 0,function*(){return new Promise((t,n)=>xe(this,void 0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",k3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=M3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=T3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=P3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=A3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=L3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=N3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=R3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=I3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const a9="3.0.3";class Ws{constructor(t){if(this.walletsList=new k0,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(t==null?void 0:t.manifestUrl)||J_(),storage:(t==null?void 0:t.storage)||new n9},this.walletsList=new k0({walletsListSource:t==null?void 0:t.walletsListSource,cacheTTLMs:t==null?void 0:t.walletsListCacheTTLMs}),this.tracker=new s9({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectSdkVersion:a9}),!this.dappSettings.manifestUrl)throw new rg("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new xc(this.dappSettings.storage),t!=null&&t.disableAutoPauseConnection||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return this._wallet!==null}get account(){var t;return((t=this._wallet)===null||t===void 0?void 0:t.account)||null}get wallet(){return this._wallet}set wallet(t){this._wallet=t,this.statusChangeSubscriptions.forEach(n=>n(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(t,n){return this.statusChangeSubscriptions.push(t),n&&this.statusChangeErrorSubscriptions.push(n),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(r=>r!==t),n&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(r=>r!==n))}}connect(t,n){var r,i;const o={};if(typeof n=="object"&&"tonProof"in n&&(o.request=n),typeof n=="object"&&("openingDeadlineMS"in n||"signal"in n||"request"in n)&&(o.request=n==null?void 0:n.request,o.openingDeadlineMS=n==null?void 0:n.openingDeadlineMS,o.signal=n==null?void 0:n.signal),this.connected)throw new ig;const s=ni(o==null?void 0:o.signal);if((r=this.abortController)===null||r===void 0||r.abort(),this.abortController=s,s.signal.aborted)throw new Ie("Connection was aborted");return(i=this.provider)===null||i===void 0||i.closeConnection(),this.provider=this.createProvider(t),s.signal.addEventListener("abort",()=>{var a;(a=this.provider)===null||a===void 0||a.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(o==null?void 0:o.request),{openingDeadlineMS:o==null?void 0:o.openingDeadlineMS,signal:s.signal})}restoreConnection(t){var n,r;return xe(this,void 0,void 0,function*(){this.tracker.trackConnectionRestoringStarted();const i=ni(t==null?void 0:t.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=i,i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}const[o,s]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}let a=null;try{switch(o){case"http":a=yield bc.fromStorage(this.dappSettings.storage);break;case"injected":a=yield mr.fromStorage(this.dappSettings.storage);break;default:if(s)a=this.createProvider(s);else return}}catch{this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),a==null||a.closeConnection(),a=null;return}if(i.signal.aborted){a==null||a.closeConnection(),this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}if(!a){ki("Provider is not restored"),this.tracker.trackConnectionRestoringError("Provider is not restored");return}(r=this.provider)===null||r===void 0||r.closeConnection(),this.provider=a,a.listen(this.walletEventsListener.bind(this));const l=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),a==null||a.closeConnection(),a=null};return i.signal.addEventListener("abort",l),yield Bl(c=>xe(this,void 0,void 0,function*(){yield a==null?void 0:a.restoreConnection({openingDeadlineMS:t==null?void 0:t.openingDeadlineMS,signal:c.signal}),i.signal.removeEventListener("abort",l),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:5e3,signal:t==null?void 0:t.signal})})}sendTransaction(t,n){return xe(this,void 0,void 0,function*(){const r={};typeof n=="function"?r.onRequestSent=n:(r.onRequestSent=n==null?void 0:n.onRequestSent,r.signal=n==null?void 0:n.signal);const i=ni(r==null?void 0:r.signal);if(i.signal.aborted)throw new Ie("Transaction sending was aborted");this.checkConnection(),o9(this.wallet.device.features,{requiredMessagesNumber:t.messages.length}),this.tracker.trackTransactionSentForSignature(this.wallet,t);const{validUntil:o}=t,s=N_(t,["validUntil"]),a=t.from||this.account.address,l=t.network||this.account.chain,c=yield this.provider.sendRequest(Mu.convertToRpcRequest(Object.assign(Object.assign({},s),{valid_until:o,from:a,network:l})),{onRequestSent:r.onRequestSent,signal:i.signal});if(Mu.isError(c))return this.tracker.trackTransactionSigningFailed(this.wallet,t,c.error.message,c.error.code),Mu.parseAndThrowError(c);const u=Mu.convertFromRpcResponse(c);return this.tracker.trackTransactionSigned(this.wallet,t,u),u})}disconnect(t){var n;return xe(this,void 0,void 0,function*(){if(!this.connected)throw new qf;const r=ni(t==null?void 0:t.signal),i=this.abortController;if(this.abortController=r,r.signal.aborted)throw new Ie("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield(n=this.provider)===null||n===void 0?void 0:n.disconnect({signal:r.signal}),i==null||i.abort()})}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=Q_();if(t)try{t.addEventListener("visibilitychange",()=>{t.hidden?this.pauseConnection():this.unPauseConnection().catch()})}catch(n){ki("Cannot subscribe to the document.visibilitychange: ",n)}}createProvider(t){let n;return!Array.isArray(t)&&W_(t)?n=new mr(this.dappSettings.storage,t.jsBridgeKey):n=new bc(this.dappSettings.storage,t),n.listen(this.walletEventsListener.bind(this)),n}walletEventsListener(t){switch(t.event){case"connect":this.onWalletConnected(t.payload);break;case"connect_error":this.onWalletConnectError(t.payload);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(t){const n=t.items.find(o=>o.name==="ton_addr"),r=t.items.find(o=>o.name==="ton_proof");if(!n)throw new Ie("ton_addr connection item was not found");const i={device:t.device,provider:this.provider.type,account:{address:n.address,chain:n.network,walletStateInit:n.walletStateInit,publicKey:n.publicKey}};r&&(i.connectItems={tonProof:r}),this.wallet=i,this.tracker.trackConnectionCompleted(i)}onWalletConnectError(t){const n=U_.parseError(t);if(this.statusChangeErrorSubscriptions.forEach(r=>r(n)),Tn(n),this.tracker.trackConnectionError(t.message,t.code),n instanceof Kd||n instanceof Yd)throw ki(n),n}onWalletDisconnected(t){this.tracker.trackDisconnection(this.wallet,t),this.wallet=null}checkConnection(){if(!this.connected)throw new qf}createConnectRequest(t){const n=[{name:"ton_addr"}];return t!=null&&t.tonProof&&n.push({name:"ton_proof",payload:t.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:n}}}Ws.walletsList=new k0;Ws.isWalletInjected=e=>mr.isWalletInjected(e);Ws.isInsideWalletBrowser=e=>mr.isInsideWalletBrowser(e);const l9=81,c9=128;function $3(e,t=!1){const{wc:n,hex:r}=u9(e);let i=l9;t&&(i|=c9);const o=new Int8Array(34);o[0]=i,o[1]=n,o.set(r,2);const s=new Uint8Array(36);return s.set(o),s.set(f9(o),34),ng.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}function u9(e){if(!e.includes(":"))throw new pa(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(t.length!==2)throw new pa(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(n!==0&&n!==-1)throw new pa(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if((r==null?void 0:r.length)!==64)throw new pa(`Wrong address ${e}. Hex part must be 64bytes length, but ${r==null?void 0:r.length} received.`);return{wc:n,hex:d9(r)}}function f9(e){let n=0;const r=new Uint8Array(e.length+2);r.set(e);for(let i of r){let o=128;for(;o>0;)n<<=1,i&o&&(n+=1),o>>=1,n>65535&&(n&=65535,n^=4129)}return new Uint8Array([Math.floor(n/256),n%256])}const E0={};for(let e=0;e<=255;e++){let t=e.toString(16);t.length<2&&(t="0"+t),E0[t]=e}function d9(e){e=e.toLowerCase();const t=e.length;if(t%2!==0)throw new Gf("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let i=0;i0?xt.length===2?typeof xt[1]==a?this[xt[0]]=xt[1].call(this,Fn):this[xt[0]]=xt[1]:xt.length===3?typeof xt[1]===a&&!(xt[1].exec&&xt[1].test)?this[xt[0]]=Fn?xt[1].call(this,Fn,xt[2]):r:this[xt[0]]=Fn?Fn.replace(xt[1],xt[2]):r:xt.length===4&&(this[xt[0]]=Fn?xt[3].call(this,Fn.replace(xt[1],xt[2])):r):this[xt]=Fn||r;He+=2}},We=function(Ue,wt){for(var He in wt)if(typeof wt[He]===c&&wt[He].length>0){for(var At=0;At2&&(Re[h]="iPad",Re[m]=M),Re},this.getEngine=function(){var Re={};return Re[g]=r,Re[k]=r,It.call(Re,At,hr.engine),Re},this.getOS=function(){var Re={};return Re[g]=r,Re[k]=r,It.call(Re,At,hr.os),xt&&!Re[g]&&Rn&&Rn.platform&&Rn.platform!="Unknown"&&(Re[g]=Rn.platform.replace(/chrome os/i,q).replace(/macos/i,B)),Re},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return At},this.setUA=function(Re){return At=typeof Re===u&&Re.length>P?Xe(Re,P):Re,this},this.setUA(At),this};_n.VERSION=i,_n.BROWSER=ne([g,k,d]),_n.CPU=ne([C]),_n.DEVICE=ne([h,y,m,v,w,E,M,O,T]),_n.ENGINE=_n.OS=ne([g,k]),e.exports&&(t=e.exports=_n),t.UAParser=_n;var En=typeof n!==l&&(n.jQuery||n.Zepto);if(En&&!En.ua){var ir=new _n;En.ua=ir.getResult(),En.ua.get=function(){return ir.getUA()},En.ua.set=function(Ue){ir.setUA(Ue);var wt=ir.getResult();for(var He in wt)En.ua[He]=wt[He]}}})(typeof window=="object"?window:ow)})(M0,M0.exports);var h9=M0.exports;const p9=Ha(h9);var g9=function(t){return m9(t)&&!v9(t)};function m9(e){return!!e&&typeof e=="object"}function v9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||x9(e)}var y9=typeof Symbol=="function"&&Symbol.for,w9=y9?Symbol.for("react.element"):60103;function x9(e){return e.$$typeof===w9}function b9(e){return Array.isArray(e)?[]:{}}function _c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Na(b9(e),e,t):e}function _9(e,t,n){return e.concat(t).map(function(r){return _c(r,n)})}function C9(e,t){if(!t.customMerge)return Na;var n=t.customMerge(e);return typeof n=="function"?n:Na}function S9(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function R2(e){return Object.keys(e).concat(S9(e))}function U3(e,t){try{return t in e}catch{return!1}}function k9(e,t){return U3(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function E9(e,t,n){var r={};return n.isMergeableObject(e)&&R2(e).forEach(function(i){r[i]=_c(e[i],n)}),R2(t).forEach(function(i){k9(e,i)||(U3(e,i)&&n.isMergeableObject(t[i])?r[i]=C9(i,n)(e[i],t[i],n):r[i]=_c(t[i],n))}),r}function Na(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||_9,n.isMergeableObject=n.isMergeableObject||g9,n.cloneUnlessOtherwiseSpecified=_c;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):E9(e,t,n):_c(t,n)}Na.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Na(r,i,n)},{})};var M9=Na,T9=M9;const P9=Ha(T9);var F3={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;st in e?A9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t)=>{for(var n in t||(t={}))R9.call(t,n)&&M0(e,n,t[n]);if(R2)for(var n of R2(t))D9.call(t,n)&&M0(e,n,t[n]);return e},Tr=(e,t)=>L9(e,O9(t)),$e=(e,t,n)=>(M0(e,typeof t!="symbol"?t+"":t,n),n),At=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(e,t)).next())}),D2,I2,N2,W2,$2,U2,F2,B2;const tn={};function I9(e){tn.context=e}const N9=(e,t)=>e===t,ci=Symbol("solid-proxy"),T0=Symbol("solid-track"),Zf={equals:N9};let F3=Y3;const uo=1,Qf=2,B3={owned:null,cleanups:null,context:null,owner:null},t1={};var An=null;let Es=null,rn=null,er=null,Ji=null,lg=0;function jl(e,t){const n=rn,r=An,i=e.length===0,o=i?B3:{owned:null,cleanups:null,context:null,owner:t===void 0?r:t},s=i?e:()=>e(()=>Un(()=>th(o)));An=o,rn=null;try{return Go(s,!0)}finally{rn=n,An=r}}function Be(e,t){t=t?Object.assign({},Zf,t):Zf;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),V3(n,i));return[z3.bind(n),r]}function Jf(e,t,n){const r=eh(e,t,!0,uo);Ka(r)}function ht(e,t,n){const r=eh(e,t,!1,uo);Ka(r)}function $n(e,t,n){F3=z9;const r=eh(e,t,!1,uo);r.user=!0,Ji?Ji.push(r):Ka(r)}function ve(e,t,n){n=n?Object.assign({},Zf,n):Zf;const r=eh(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ka(r),z3.bind(r)}function W9(e,t,n){let r,i,o;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,i=e,o={}):(r=e,i=t,o={});let s=null,a=t1,l=null,c=!1,u="initialValue"in o,d=typeof r=="function"&&ve(r);const h=new Set,[g,m]=(o.storage||Be)(o.initialValue),[y,k]=Be(void 0),[C,v]=Be(void 0,{equals:!1}),[w,M]=Be(u?"ready":"unresolved");if(tn.context){l=`${tn.context.id}${tn.context.count++}`;let L;o.ssrLoadFrom==="initial"?a=o.initialValue:tn.load&&(L=tn.load(l))&&(a=L[0])}function E(L,W,I,R){return s===L&&(s=null,u=!0,(L===a||W===a)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(R,{value:W})),a=t1,O(W,I)),W}function O(L,W){Go(()=>{W===void 0&&m(()=>L),M(W!==void 0?"errored":"ready"),k(W);for(const I of h.keys())I.decrement();h.clear()},!1)}function T(){const L=B9,W=g(),I=y();if(I!==void 0&&!s)throw I;return rn&&!rn.user&&L&&Jf(()=>{C(),s&&(L.resolved||h.has(L)||(L.increment(),h.add(L)))}),W}function P(L=!0){if(L!==!1&&c)return;c=!1;const W=d?d():r;if(W==null||W===!1){E(s,Un(g));return}const I=a!==t1?a:Un(()=>i(W,{value:g(),refetching:L}));return typeof I!="object"||!(I&&"then"in I)?(E(s,I,void 0,W),I):(s=I,c=!0,queueMicrotask(()=>c=!1),Go(()=>{M(u?"refreshing":"pending"),v()},!1),I.then(R=>E(I,R,void 0,W),R=>E(I,void 0,q3(R),W)))}return Object.defineProperties(T,{state:{get:()=>w()},error:{get:()=>y()},loading:{get(){const L=w();return L==="pending"||L==="refreshing"}},latest:{get(){if(!u)return T();const L=y();if(L&&!s)throw L;return g()}}}),d?Jf(()=>P(!1)):P(!1),[T,{refetch:P,mutate:m}]}function j3(e){return Go(e,!1)}function Un(e){if(rn===null)return e();const t=rn;rn=null;try{return e()}finally{rn=t}}function $9(e,t,n){const r=Array.isArray(e);let i;return o=>{let s;if(r){s=Array(e.length);for(let l=0;lt(s,i,o));return i=s,a}}function U9(e){$n(()=>Un(e))}function lr(e){return An===null||(An.cleanups===null?An.cleanups=[e]:An.cleanups.push(e)),e}function H3(){return rn}function F9(){return An}function Jd(e,t){const n=Symbol("context");return{id:n,Provider:V9(n),defaultValue:e}}function cr(e){let t;return(t=Z3(An,e.id))!==void 0?t:e.defaultValue}function Xd(e){const t=ve(e),n=ve(()=>P0(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let B9;function z3(){const e=Es;if(this.sources&&(this.state||e))if(this.state===uo||e)Ka(this);else{const t=er;er=null,Go(()=>ed(this),!1),er=t}if(rn){const t=this.observers?this.observers.length:0;rn.sources?(rn.sources.push(this),rn.sourceSlots.push(t)):(rn.sources=[this],rn.sourceSlots=[t]),this.observers?(this.observers.push(rn),this.observerSlots.push(rn.sources.length-1)):(this.observers=[rn],this.observerSlots=[rn.sources.length-1])}return this.value}function V3(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Go(()=>{for(let i=0;i1e6)throw er=[],new Error},!1)),t}function Ka(e){if(!e.fn)return;th(e);const t=An,n=rn,r=lg;rn=An=e,j9(e,e.value,r),rn=n,An=t}function j9(e,t,n){let r;try{r=e.fn(t)}catch(i){e.pure&&(e.state=uo,e.owned&&e.owned.forEach(th),e.owned=null),G3(i)}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?V3(e,r):e.value=r,e.updatedAt=n)}function eh(e,t,n,r=uo,i){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:An,context:null,pure:n};return An===null||An!==B3&&(An.owned?An.owned.push(o):An.owned=[o]),o}function Xf(e){const t=Es;if(e.state===0||t)return;if(e.state===Qf||t)return ed(e);if(e.suspense&&Un(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--)if(e=n[r],e.state===uo||t)Ka(e);else if(e.state===Qf||t){const i=er;er=null,Go(()=>ed(e,n[0]),!1),er=i}}function Go(e,t){if(er)return e();let n=!1;t||(er=[]),Ji?n=!0:Ji=[],lg++;try{const r=e();return H9(n),r}catch(r){n||(Ji=null),er=null,G3(r)}}function H9(e){if(er&&(Y3(er),er=null),e)return;const t=Ji;Ji=null,t.length&&Go(()=>F3(t),!1)}function Y3(e){for(let t=0;ti=Un(()=>(An.context={[e]:r.value},Xd(()=>r.children))),void 0),i}}const Y9=Symbol("fallback");function j2(e){for(let t=0;t1?[]:null;return lr(()=>j2(o)),()=>{let l=e()||[],c,u;return l[T0],Un(()=>{let h=l.length,g,m,y,k,C,v,w,M,E;if(h===0)s!==0&&(j2(o),o=[],r=[],i=[],s=0,a&&(a=[])),n.fallback&&(r=[Y9],i[0]=jl(O=>(o[0]=O,n.fallback())),s=1);else if(s===0){for(i=new Array(h),u=0;u=v&&M>=v&&r[w]===l[M];w--,M--)y[M]=i[w],k[M]=o[w],a&&(C[M]=a[w]);for(g=new Map,m=new Array(M+1),u=M;u>=v;u--)E=l[u],c=g.get(E),m[u]=c===void 0?-1:c,g.set(E,u);for(c=v;c<=w;c++)E=r[c],u=g.get(E),u!==void 0&&u!==-1?(y[u]=i[c],k[u]=o[c],a&&(C[u]=a[c]),u=m[u],g.set(E,u)):o[c]();for(u=v;ue(t||{}))}function Mu(){return!0}const A0={get(e,t,n){return t===ci?n:e.get(t)},has(e,t){return t===ci?!0:e.has(t)},set:Mu,deleteProperty:Mu,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Mu,deleteProperty:Mu}},ownKeys(e){return e.keys()}};function n1(e){return(e=typeof e=="function"?e():e)?e:{}}function Ei(...e){let t=!1;for(let r=0;r=0;i--){const o=n1(e[i])[r];if(o!==void 0)return o}},has(r){for(let i=e.length-1;i>=0;i--)if(r in n1(e[i]))return!0;return!1},keys(){const r=[];for(let i=0;i=0;r--)if(e[r]){const i=Object.getOwnPropertyDescriptors(e[r]);for(const o in i)o in n||Object.defineProperty(n,o,{enumerable:!0,get(){for(let s=e.length-1;s>=0;s--){const a=(e[s]||{})[o];if(a!==void 0)return a}}})}return n}function cg(e,...t){const n=new Set(t.flat());if(ci in e){const i=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)}},A0));return i.push(new Proxy({get(o){return n.has(o)?void 0:e[o]},has(o){return n.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!n.has(o))}},A0)),i}const r=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(r).filter(i=>!n.has(i))),t.map(i=>{const o={};for(let s=0;se.fallback};return ve(K9(()=>e.each,e.children,t||void 0))}function Ye(e){let t=!1;const n=e.keyed,r=ve(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return ve(()=>{const i=r();if(i){const o=e.children,s=typeof o=="function"&&o.length>0;return t=n||s,s?Un(()=>o(i)):o}return e.fallback},void 0,void 0)}function zc(e){let t=!1,n=!1;const r=(s,a)=>s[0]===a[0]&&(t?s[1]===a[1]:!s[1]==!a[1])&&s[2]===a[2],i=Xd(()=>e.children),o=ve(()=>{let s=i();Array.isArray(s)||(s=[s]);for(let a=0;a{const[s,a,l]=o();if(s<0)return e.fallback;const c=l.children,u=typeof c=="function"&&c.length>0;return t=n||u,u?Un(()=>c(a)):c},void 0,void 0)}function jn(e){return e}const q9=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],G9=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...q9]),Z9=new Set(["innerHTML","textContent","innerText","children"]),Q9=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),H2=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),J9=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),X9=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"]),e7={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function t7(e,t,n){let r=n.length,i=t.length,o=r,s=0,a=0,l=t[i-1].nextSibling,c=null;for(;su-a){const m=t[s];for(;a{i=o,t===document?e():Xn(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function gt(e,t,n){if(typeof window>"u")return null;const r=document.createElement("template");r.innerHTML=e;let i=r.content.firstChild;return n&&(i=i.firstChild),i}function r7(e,t=window.document){const n=t[z2]||(t[z2]=new Set);for(let r=0,i=e.length;ri.call(e,n[1],o))}else e.addEventListener(t,n)}function s7(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let o,s;for(o=0,s=i.length;oi.children=_c(e,t.children,i.children)),ht(()=>t.ref&&t.ref(e)),ht(()=>l7(e,t,n,!0,i,!0)),i}function Hl(e,t,n){return Un(()=>e(t,n))}function Xn(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return _c(e,t,r,n);ht(i=>_c(e,t(),i,n),r)}function l7(e,t,n,r,i={},o=!1){t||(t={});for(const s in i)if(!(s in t)){if(s==="children")continue;i[s]=Y2(e,s,null,i[s],n,o)}for(const s in t){if(s==="children")continue;const a=t[s];i[s]=Y2(e,s,a,i[s],n,o)}}function c7(e){let t,n;return!tn.context||!(t=tn.registry.get(n=d7()))?e.cloneNode(!0):(tn.completed&&tn.completed.add(t),tn.registry.delete(n),t)}function u7(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function V2(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,o=r.length;i-1&&e7[t.split(":")[0]];c?i7(e,c,t,n):Oe(e,Q9[t]||t,n)}return n}function f7(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),tn.registry&&!tn.done&&(tn.done=!0,document.querySelectorAll("[id^=pl-]").forEach(r=>{for(;r&&r.nodeType!==8&&r.nodeValue!=="pl-"+e;){let i=r.nextSibling;r.remove(),r=i}r&&r.remove()}));n;){const r=n[t];if(r&&!n.disabled){const i=n[`${t}Data`];if(i!==void 0?r.call(n,i,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function _c(e,t,n,r,i){for(tn.context&&!n&&(n=[...e.childNodes]);typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(tn.context)return n;if(o==="number"&&(t=t.toString()),s){let a=n[0];a&&a.nodeType===3?a.data=t:a=document.createTextNode(t),n=Zs(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(tn.context)return n;n=Zs(e,n,r)}else{if(o==="function")return ht(()=>{let a=t();for(;typeof a=="function";)a=a();n=_c(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(L0(a,t,n,i))return ht(()=>n=_c(e,a,n,r,!0)),()=>n;if(tn.context){if(!a.length)return n;for(let c=0;c=0;s--){const a=t[s];if(i!==a){const l=a.parentNode===e;!o&&!s?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else o=!0}}else e.insertBefore(i,n);return[i]}function d7(){const e=tn.context;return`${e.id}${e.count++}`}const h7="http://www.w3.org/2000/svg";function J3(e,t=!1){return t?document.createElementNS(h7,e):document.createElement(e)}function X3(e){const{useShadow:t}=e,n=document.createTextNode(""),r=e.mount||document.body;function i(){if(tn.context){const[o,s]=Be(!1);return queueMicrotask(()=>s(!0)),()=>o()&&e.children}else return()=>e.children}if(r instanceof HTMLHeadElement){const[o,s]=Be(!1),a=()=>s(!0);jl(l=>Xn(r,()=>o()?l():i()(),null)),lr(()=>{tn.context?queueMicrotask(a):a()})}else{const o=J3(e.isSVG?"g":"div",e.isSVG),s=t&&o.attachShadow?o.attachShadow({mode:"open"}):o;Object.defineProperty(o,"_$host",{get(){return n.parentNode},configurable:!0}),Xn(s,i()),r.appendChild(o),e.ref&&e.ref(o),lr(()=>r.removeChild(o))}return n}function Na(e){const[t,n]=cg(e,["component"]),r=ve(()=>t.component);return ve(()=>{const i=r();switch(typeof i){case"function":return Un(()=>i(n));case"string":const o=X9.has(i),s=tn.context?c7():J3(i,o);return Q3(s,n,o),s}})}var en=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(en||{});let p7={data:""},g7=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||p7,m7=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,v7=/\/\*[^]*?\*\/| +/g,q2=/\n+/g,gs=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?gs(s,o):o+"{"+gs(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=gs(s,t?t.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=gs.p?gs.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ni={},e4=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+e4(e[n]);return t}return e},y7=(e,t,n,r,i)=>{let o=e4(e),s=Ni[o]||(Ni[o]=(l=>{let c=0,u=11;for(;c>>0;return"go"+u})(o));if(!Ni[s]){let l=o!==e?e:(c=>{let u,d,h=[{}];for(;u=m7.exec(c.replace(v7,""));)u[4]?h.shift():u[3]?(d=u[3].replace(q2," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][u[1]]=u[2].replace(q2," ").trim();return h[0]})(e);Ni[s]=gs(i?{["@keyframes "+s]:l}:l,n?"":"."+s)}let a=n&&Ni.g?Ni.g:null;return n&&(Ni.g=Ni[s]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Ni[s],t,r,a),s},w7=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let a=s(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=l?"."+l:a&&typeof a=="object"?a.props?"":gs(a,""):a===!1?"":a}return r+i+(s??"")},"");function so(e){let t=this||{},n=e.call?e(t.p):e;return y7(n.unshift?n.raw?w7(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,g7(t.target),t.g,t.o,t.k)}so.bind({g:1});let x7=so.bind({k:1});const fg=Jd();function b7(e){return _(fg.Provider,{value:e.theme,get children(){return e.children}})}function Ft(){return cr(fg)}function t4(e){let t=this||{};return(...n)=>{const r=i=>{const o=cr(fg),s=Ei(i,{theme:o}),a=Ei(s,{get class(){const g=s.class,m="class"in s&&/^go[0-9]+/.test(g);let y=so.apply({target:t.target,o:m,p:s,g:t.g},n);return[g,y].filter(Boolean).join(" ")}}),[l,c]=cg(a,["as","theme"]),u=c,d=l.as||e;let h;return typeof d=="function"?h=d(u):t.g==1?(h=document.createElement(d),Q3(h,u)):h=Na(Ei({component:d},u)),h};return r.class=i=>Un(()=>so.apply({target:t.target,p:i,g:t.g},n)),r}}const V=new Proxy(t4,{get(e,t){return e(t)}});function _7(){const e=t4.call({g:1},"div").apply(null,arguments);return function(n){return e(n),null}}const ji="tc-root",dg="tc-disable-scroll",r1="tc-using-mouse",C7=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(r1)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(r1)});const e=_7` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;st in e?L9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dt=(e,t)=>{for(var n in t||(t={}))D9.call(t,n)&&T0(e,n,t[n]);if(D2)for(var n of D2(t))I9.call(t,n)&&T0(e,n,t[n]);return e},Tr=(e,t)=>O9(e,R9(t)),$e=(e,t,n)=>(T0(e,typeof t!="symbol"?t+"":t,n),n),Lt=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(e,t)).next())}),I2,N2,W2,$2,U2,F2,B2,j2;const en={};function N9(e){en.context=e}const W9=(e,t)=>e===t,ci=Symbol("solid-proxy"),P0=Symbol("solid-track"),Qf={equals:W9};let B3=K3;const uo=1,Jf=2,j3={owned:null,cleanups:null,context:null,owner:null},n1={};var An=null;let Ms=null,nn=null,er=null,Ji=null,cg=0;function Hl(e,t){const n=nn,r=An,i=e.length===0,o=i?j3:{owned:null,cleanups:null,context:null,owner:t===void 0?r:t},s=i?e:()=>e(()=>Un(()=>nh(o)));An=o,nn=null;try{return Go(s,!0)}finally{nn=n,An=r}}function Be(e,t){t=t?Object.assign({},Qf,t):Qf;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),Y3(n,i));return[V3.bind(n),r]}function Xf(e,t,n){const r=th(e,t,!0,uo);qa(r)}function ht(e,t,n){const r=th(e,t,!1,uo);qa(r)}function $n(e,t,n){B3=V9;const r=th(e,t,!1,uo);r.user=!0,Ji?Ji.push(r):qa(r)}function ve(e,t,n){n=n?Object.assign({},Qf,n):Qf;const r=th(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,qa(r),V3.bind(r)}function $9(e,t,n){let r,i,o;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,i=e,o={}):(r=e,i=t,o={});let s=null,a=n1,l=null,c=!1,u="initialValue"in o,d=typeof r=="function"&&ve(r);const h=new Set,[g,m]=(o.storage||Be)(o.initialValue),[y,k]=Be(void 0),[C,v]=Be(void 0,{equals:!1}),[w,M]=Be(u?"ready":"unresolved");if(en.context){l=`${en.context.id}${en.context.count++}`;let L;o.ssrLoadFrom==="initial"?a=o.initialValue:en.load&&(L=en.load(l))&&(a=L[0])}function E(L,W,I,R){return s===L&&(s=null,u=!0,(L===a||W===a)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(R,{value:W})),a=n1,O(W,I)),W}function O(L,W){Go(()=>{W===void 0&&m(()=>L),M(W!==void 0?"errored":"ready"),k(W);for(const I of h.keys())I.decrement();h.clear()},!1)}function T(){const L=j9,W=g(),I=y();if(I!==void 0&&!s)throw I;return nn&&!nn.user&&L&&Xf(()=>{C(),s&&(L.resolved||h.has(L)||(L.increment(),h.add(L)))}),W}function P(L=!0){if(L!==!1&&c)return;c=!1;const W=d?d():r;if(W==null||W===!1){E(s,Un(g));return}const I=a!==n1?a:Un(()=>i(W,{value:g(),refetching:L}));return typeof I!="object"||!(I&&"then"in I)?(E(s,I,void 0,W),I):(s=I,c=!0,queueMicrotask(()=>c=!1),Go(()=>{M(u?"refreshing":"pending"),v()},!1),I.then(R=>E(I,R,void 0,W),R=>E(I,void 0,G3(R),W)))}return Object.defineProperties(T,{state:{get:()=>w()},error:{get:()=>y()},loading:{get(){const L=w();return L==="pending"||L==="refreshing"}},latest:{get(){if(!u)return T();const L=y();if(L&&!s)throw L;return g()}}}),d?Xf(()=>P(!1)):P(!1),[T,{refetch:P,mutate:m}]}function H3(e){return Go(e,!1)}function Un(e){if(nn===null)return e();const t=nn;nn=null;try{return e()}finally{nn=t}}function U9(e,t,n){const r=Array.isArray(e);let i;return o=>{let s;if(r){s=Array(e.length);for(let l=0;lt(s,i,o));return i=s,a}}function F9(e){$n(()=>Un(e))}function lr(e){return An===null||(An.cleanups===null?An.cleanups=[e]:An.cleanups.push(e)),e}function z3(){return nn}function B9(){return An}function Xd(e,t){const n=Symbol("context");return{id:n,Provider:Y9(n),defaultValue:e}}function cr(e){let t;return(t=Q3(An,e.id))!==void 0?t:e.defaultValue}function eh(e){const t=ve(e),n=ve(()=>A0(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let j9;function V3(){const e=Ms;if(this.sources&&(this.state||e))if(this.state===uo||e)qa(this);else{const t=er;er=null,Go(()=>td(this),!1),er=t}if(nn){const t=this.observers?this.observers.length:0;nn.sources?(nn.sources.push(this),nn.sourceSlots.push(t)):(nn.sources=[this],nn.sourceSlots=[t]),this.observers?(this.observers.push(nn),this.observerSlots.push(nn.sources.length-1)):(this.observers=[nn],this.observerSlots=[nn.sources.length-1])}return this.value}function Y3(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Go(()=>{for(let i=0;i1e6)throw er=[],new Error},!1)),t}function qa(e){if(!e.fn)return;nh(e);const t=An,n=nn,r=cg;nn=An=e,H9(e,e.value,r),nn=n,An=t}function H9(e,t,n){let r;try{r=e.fn(t)}catch(i){e.pure&&(e.state=uo,e.owned&&e.owned.forEach(nh),e.owned=null),Z3(i)}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Y3(e,r):e.value=r,e.updatedAt=n)}function th(e,t,n,r=uo,i){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:An,context:null,pure:n};return An===null||An!==j3&&(An.owned?An.owned.push(o):An.owned=[o]),o}function ed(e){const t=Ms;if(e.state===0||t)return;if(e.state===Jf||t)return td(e);if(e.suspense&&Un(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--)if(e=n[r],e.state===uo||t)qa(e);else if(e.state===Jf||t){const i=er;er=null,Go(()=>td(e,n[0]),!1),er=i}}function Go(e,t){if(er)return e();let n=!1;t||(er=[]),Ji?n=!0:Ji=[],cg++;try{const r=e();return z9(n),r}catch(r){n||(Ji=null),er=null,Z3(r)}}function z9(e){if(er&&(K3(er),er=null),e)return;const t=Ji;Ji=null,t.length&&Go(()=>B3(t),!1)}function K3(e){for(let t=0;ti=Un(()=>(An.context={[e]:r.value},eh(()=>r.children))),void 0),i}}const K9=Symbol("fallback");function H2(e){for(let t=0;t1?[]:null;return lr(()=>H2(o)),()=>{let l=e()||[],c,u;return l[P0],Un(()=>{let h=l.length,g,m,y,k,C,v,w,M,E;if(h===0)s!==0&&(H2(o),o=[],r=[],i=[],s=0,a&&(a=[])),n.fallback&&(r=[K9],i[0]=Hl(O=>(o[0]=O,n.fallback())),s=1);else if(s===0){for(i=new Array(h),u=0;u=v&&M>=v&&r[w]===l[M];w--,M--)y[M]=i[w],k[M]=o[w],a&&(C[M]=a[w]);for(g=new Map,m=new Array(M+1),u=M;u>=v;u--)E=l[u],c=g.get(E),m[u]=c===void 0?-1:c,g.set(E,u);for(c=v;c<=w;c++)E=r[c],u=g.get(E),u!==void 0&&u!==-1?(y[u]=i[c],k[u]=o[c],a&&(C[u]=a[c]),u=m[u],g.set(E,u)):o[c]();for(u=v;ue(t||{}))}function Tu(){return!0}const L0={get(e,t,n){return t===ci?n:e.get(t)},has(e,t){return t===ci?!0:e.has(t)},set:Tu,deleteProperty:Tu,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Tu,deleteProperty:Tu}},ownKeys(e){return e.keys()}};function r1(e){return(e=typeof e=="function"?e():e)?e:{}}function Ei(...e){let t=!1;for(let r=0;r=0;i--){const o=r1(e[i])[r];if(o!==void 0)return o}},has(r){for(let i=e.length-1;i>=0;i--)if(r in r1(e[i]))return!0;return!1},keys(){const r=[];for(let i=0;i=0;r--)if(e[r]){const i=Object.getOwnPropertyDescriptors(e[r]);for(const o in i)o in n||Object.defineProperty(n,o,{enumerable:!0,get(){for(let s=e.length-1;s>=0;s--){const a=(e[s]||{})[o];if(a!==void 0)return a}}})}return n}function ug(e,...t){const n=new Set(t.flat());if(ci in e){const i=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)}},L0));return i.push(new Proxy({get(o){return n.has(o)?void 0:e[o]},has(o){return n.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!n.has(o))}},L0)),i}const r=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(r).filter(i=>!n.has(i))),t.map(i=>{const o={};for(let s=0;se.fallback};return ve(q9(()=>e.each,e.children,t||void 0))}function Ye(e){let t=!1;const n=e.keyed,r=ve(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return ve(()=>{const i=r();if(i){const o=e.children,s=typeof o=="function"&&o.length>0;return t=n||s,s?Un(()=>o(i)):o}return e.fallback},void 0,void 0)}function Vc(e){let t=!1,n=!1;const r=(s,a)=>s[0]===a[0]&&(t?s[1]===a[1]:!s[1]==!a[1])&&s[2]===a[2],i=eh(()=>e.children),o=ve(()=>{let s=i();Array.isArray(s)||(s=[s]);for(let a=0;a{const[s,a,l]=o();if(s<0)return e.fallback;const c=l.children,u=typeof c=="function"&&c.length>0;return t=n||u,u?Un(()=>c(a)):c},void 0,void 0)}function jn(e){return e}const G9=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Z9=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...G9]),Q9=new Set(["innerHTML","textContent","innerText","children"]),J9=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),z2=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),X9=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),e7=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"]),t7={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function n7(e,t,n){let r=n.length,i=t.length,o=r,s=0,a=0,l=t[i-1].nextSibling,c=null;for(;su-a){const m=t[s];for(;a{i=o,t===document?e():Xn(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function mt(e,t,n){if(typeof window>"u")return null;const r=document.createElement("template");r.innerHTML=e;let i=r.content.firstChild;return n&&(i=i.firstChild),i}function i7(e,t=window.document){const n=t[V2]||(t[V2]=new Set);for(let r=0,i=e.length;ri.call(e,n[1],o))}else e.addEventListener(t,n)}function a7(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let o,s;for(o=0,s=i.length;oi.children=Cc(e,t.children,i.children)),ht(()=>t.ref&&t.ref(e)),ht(()=>c7(e,t,n,!0,i,!0)),i}function zl(e,t,n){return Un(()=>e(t,n))}function Xn(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Cc(e,t,r,n);ht(i=>Cc(e,t(),i,n),r)}function c7(e,t,n,r,i={},o=!1){t||(t={});for(const s in i)if(!(s in t)){if(s==="children")continue;i[s]=K2(e,s,null,i[s],n,o)}for(const s in t){if(s==="children")continue;const a=t[s];i[s]=K2(e,s,a,i[s],n,o)}}function u7(e){let t,n;return!en.context||!(t=en.registry.get(n=h7()))?e.cloneNode(!0):(en.completed&&en.completed.add(t),en.registry.delete(n),t)}function f7(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Y2(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,o=r.length;i-1&&t7[t.split(":")[0]];c?o7(e,c,t,n):Oe(e,J9[t]||t,n)}return n}function d7(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),en.registry&&!en.done&&(en.done=!0,document.querySelectorAll("[id^=pl-]").forEach(r=>{for(;r&&r.nodeType!==8&&r.nodeValue!=="pl-"+e;){let i=r.nextSibling;r.remove(),r=i}r&&r.remove()}));n;){const r=n[t];if(r&&!n.disabled){const i=n[`${t}Data`];if(i!==void 0?r.call(n,i,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Cc(e,t,n,r,i){for(en.context&&!n&&(n=[...e.childNodes]);typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(en.context)return n;if(o==="number"&&(t=t.toString()),s){let a=n[0];a&&a.nodeType===3?a.data=t:a=document.createTextNode(t),n=Qs(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(en.context)return n;n=Qs(e,n,r)}else{if(o==="function")return ht(()=>{let a=t();for(;typeof a=="function";)a=a();n=Cc(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(O0(a,t,n,i))return ht(()=>n=Cc(e,a,n,r,!0)),()=>n;if(en.context){if(!a.length)return n;for(let c=0;c=0;s--){const a=t[s];if(i!==a){const l=a.parentNode===e;!o&&!s?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else o=!0}}else e.insertBefore(i,n);return[i]}function h7(){const e=en.context;return`${e.id}${e.count++}`}const p7="http://www.w3.org/2000/svg";function X3(e,t=!1){return t?document.createElementNS(p7,e):document.createElement(e)}function e4(e){const{useShadow:t}=e,n=document.createTextNode(""),r=e.mount||document.body;function i(){if(en.context){const[o,s]=Be(!1);return queueMicrotask(()=>s(!0)),()=>o()&&e.children}else return()=>e.children}if(r instanceof HTMLHeadElement){const[o,s]=Be(!1),a=()=>s(!0);Hl(l=>Xn(r,()=>o()?l():i()(),null)),lr(()=>{en.context?queueMicrotask(a):a()})}else{const o=X3(e.isSVG?"g":"div",e.isSVG),s=t&&o.attachShadow?o.attachShadow({mode:"open"}):o;Object.defineProperty(o,"_$host",{get(){return n.parentNode},configurable:!0}),Xn(s,i()),r.appendChild(o),e.ref&&e.ref(o),lr(()=>r.removeChild(o))}return n}function Wa(e){const[t,n]=ug(e,["component"]),r=ve(()=>t.component);return ve(()=>{const i=r();switch(typeof i){case"function":return Un(()=>i(n));case"string":const o=e7.has(i),s=en.context?u7():X3(i,o);return J3(s,n,o),s}})}var Xt=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(Xt||{});let g7={data:""},m7=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||g7,v7=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,y7=/\/\*[^]*?\*\/| +/g,G2=/\n+/g,ms=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?ms(s,o):o+"{"+ms(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=ms(s,t?t.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ms.p?ms.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ni={},t4=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+t4(e[n]);return t}return e},w7=(e,t,n,r,i)=>{let o=t4(e),s=Ni[o]||(Ni[o]=(l=>{let c=0,u=11;for(;c>>0;return"go"+u})(o));if(!Ni[s]){let l=o!==e?e:(c=>{let u,d,h=[{}];for(;u=v7.exec(c.replace(y7,""));)u[4]?h.shift():u[3]?(d=u[3].replace(G2," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][u[1]]=u[2].replace(G2," ").trim();return h[0]})(e);Ni[s]=ms(i?{["@keyframes "+s]:l}:l,n?"":"."+s)}let a=n&&Ni.g?Ni.g:null;return n&&(Ni.g=Ni[s]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Ni[s],t,r,a),s},x7=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let a=s(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=l?"."+l:a&&typeof a=="object"?a.props?"":ms(a,""):a===!1?"":a}return r+i+(s??"")},"");function so(e){let t=this||{},n=e.call?e(t.p):e;return w7(n.unshift?n.raw?x7(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,m7(t.target),t.g,t.o,t.k)}so.bind({g:1});let b7=so.bind({k:1});const dg=Xd();function _7(e){return _(dg.Provider,{value:e.theme,get children(){return e.children}})}function Bt(){return cr(dg)}function n4(e){let t=this||{};return(...n)=>{const r=i=>{const o=cr(dg),s=Ei(i,{theme:o}),a=Ei(s,{get class(){const g=s.class,m="class"in s&&/^go[0-9]+/.test(g);let y=so.apply({target:t.target,o:m,p:s,g:t.g},n);return[g,y].filter(Boolean).join(" ")}}),[l,c]=ug(a,["as","theme"]),u=c,d=l.as||e;let h;return typeof d=="function"?h=d(u):t.g==1?(h=document.createElement(d),J3(h,u)):h=Wa(Ei({component:d},u)),h};return r.class=i=>Un(()=>so.apply({target:t.target,p:i,g:t.g},n)),r}}const V=new Proxy(n4,{get(e,t){return e(t)}});function C7(){const e=n4.call({g:1},"div").apply(null,arguments);return function(n){return e(n),null}}const ji="tc-root",hg="tc-disable-scroll",i1="tc-using-mouse",S7=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(i1)),document.body.addEventListener("keydown",t=>{t.key==="Tab"&&document.body.classList.remove(i1)});const e=C7` ${ji} * { margin: 0; padding: 0; @@ -88,36 +88,36 @@ PERFORMANCE OF THIS SOFTWARE. outline: none; } - body.${dg} { + body.${hg} { position: fixed; overflow-y: scroll; right: 0; left: 0; } - body.${r1} ${ji} *:focus { + body.${i1} ${ji} *:focus { outline: none; } -`;return _(e,{})};function S7(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i].join(",")}function Vc(e,t){return e[0]==="#"&&(e=S7(e)),`rgba(${e}, ${t})`}function Mi(e){return e.toString()+"px"}const Cl=class{constructor(){$e(this,"storage",{})}static getInstance(){return Cl.instance||(Cl.instance=new Cl),Cl.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return(t=this.storage[e])!=null?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:(t=n[e])!=null?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}};let n4=Cl;$e(n4,"instance");class vn extends Ie{constructor(...t){super(...t),Object.setPrototypeOf(this,vn.prototype)}}function uf(...e){try{console.debug("[TON_CONNECT_UI]",...e)}catch{}}function k7(...e){try{console.error("[TON_CONNECT_UI]",...e)}catch{}}function E7(...e){try{console.warn("[TON_CONNECT_UI]",...e)}catch{}}function td(e,t="_self"){uf("openLink",e,t),window.open(e,t,"noopener noreferrer")}function Yt(e){td(e,"_blank")}function To(e,t){const n=()=>{ct("safari")||xi("android")&&ct("firefox")||t()},r=setTimeout(()=>n(),200);window.addEventListener("blur",()=>clearTimeout(r),{once:!0}),td(e,"_self")}function M7(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?en.LIGHT:en.DARK}function T7(e){const t=n=>e(n.matches?en.DARK:en.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function P7(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Mi(-document.documentElement.scrollTop),document.body.classList.add(dg))}function A7(){document.body.classList.remove(dg),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function L7(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function O7(){customElements.define(ji,class extends HTMLElement{})}function r4(e){return At(this,null,function*(){yield new Promise(t=>requestAnimationFrame(t)),e()})}function R7(e){return At(this,null,function*(){return yield new Promise(t=>requestAnimationFrame(t)),e()})}function i4(e){document.readyState!=="complete"?window.addEventListener("load",()=>r4(()=>i4(e)),{once:!0}):e.forEach(t=>{const n=new window.Image;n.src=t})}function fo(){if(typeof window<"u")return window}function hg(){if(D7())return localStorage;if(I7())throw new vn("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return n4.getInstance()}function D7(){try{return typeof localStorage<"u"}catch{return!1}}function I7(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}function pg(){var e,t,n;const r=new h9().getResult(),i=(e=r.os.name)==null?void 0:e.toLowerCase(),o=(t=r.device.model)==null?void 0:t.toLowerCase();let s;switch(!0){case o==="ipad":s="ipad";break;case i==="ios":s="ios";break;case i==="android":s="android";break;case i==="mac os":s="macos";break;case i==="linux":s="linux";break;case(i==null?void 0:i.includes("windows")):s="windows";break}const a=(n=r.browser.name)==null?void 0:n.toLowerCase();let l;switch(!0){case a==="chrome":l="chrome";break;case a==="firefox":l="firefox";break;case(a==null?void 0:a.includes("safari")):l="safari";break;case(a==null?void 0:a.includes("opera")):l="opera";break}return{os:s,browser:l}}function xi(...e){return e.includes(pg().os)}function ct(...e){return e.includes(pg().browser)}function Tu(e,t){const n=new URL(e);return t+n.search}class N7{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_wallet-info"),this.localStorage=hg()}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 W7{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_preferred-wallet"),this.localStorage=hg()}setPreferredWalletAppName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class o4{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_last-selected-wallet-info"),this.localStorage=hg()}setLastSelectedWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getLastSelectedWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[O0,G2]=Be({status:"closed",closeReason:null}),Z2=ve(()=>O0().status==="opened"),[nd,Q2]=Be({status:"closed",closeReason:null}),J2=ve(()=>nd().status==="opened"),$7=ve(()=>{const e=nd();return e.status==="opened"?e.walletInfo:null});let pa=typeof window<"u"?new o4:void 0;const[U7,F7]=Be((pa==null?void 0:pa.getLastSelectedWalletInfo())||null),Hn=e=>{pa||(pa=new o4),e?pa.setLastSelectedWalletInfo(e):pa.removeLastSelectedWalletInfo(),F7(e)},[zi,ga]=Be(null),B7={close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},j7={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},H7={confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},z7={walletOn:"Wallet On",recent:"Recent",installed:"Installed",popular:"Popular"},V7={loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your wallet",openWalletOnTelegramOrSelect:"Open Wallet in Telegram or select your wallet to connect",openWalletOnTelegram:"Open Wallet in Telegram",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueIn:"Continue in {{ name }}…",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueInExtension:"Continue in {{ name }} browser extension…",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",getWallet:"Get {{ name }}",continueOnDesktop:"Continue in {{ name }} on desktop…",openWalletOnTelegram:"Open Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"}},Y7={confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},K7={common:B7,button:j7,notifications:H7,walletItem:z7,walletModal:V7,actionModal:Y7},q7={close:"Закрыть",openWallet:"Открыть кошелёк",copyLink:"Копировать ссылку",linkCopied:"Ссылка скопирована",copied:"Ссылка скопирована",yourWallet:"Ваш кошелёк",retry:"Повторить",get:"Скачать",mobile:"Мобильный",browserExtension:"Расширение",desktop:"Десктоп"},G7={connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},Z7={confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."}},Q7={walletOn:"Wallet в",recent:"Недавний",installed:"Установлен",popular:"Популярен"},J7={loading:"Кошельки загружаются",wallets:"Кошельки",mobileUniversalModal:{connectYourWallet:"Подключите кошелёк",openWalletOnTelegramOrSelect:"Подключите Wallet в Telegram или выберете кошелёк для подключения",openWalletOnTelegram:"Открыть Wallet в Telegram",openLink:"Открыть ссылку",scan:"Отсканируйте камерой вашего телефона"},desktopUniversalModal:{connectYourWallet:"Подключите кошелёк",scan:"Отсканируйте QR-код камерой вашего телефона",availableWallets:"Доступные кошельки"},mobileConnectionModal:{showQR:"Показать QR-код",scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueIn:"Продолжите в {{ name }}…",connectionDeclined:"Подключение отклонено"},desktopConnectionModal:{scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueInExtension:"Откройте браузерное расширение {{ name }}",dontHaveExtension:"Похоже, у вас не установлено браузерное расширение {{ name }}",getWallet:"Скачать {{ name }}",continueOnDesktop:"Откройте {{ name }} на компьютере…",openWalletOnTelegram:"Открыть Wallet в Telegram",connectionDeclined:"Подключение отклонено"},infoModal:{whatIsAWallet:"Что такое кошелёк?",secureDigitalAssets:"Надежное хранилище цифровых активов",walletProtects:"Кошелёк защищает ваши цифровые активы, включая TON, токены и предметы коллекционирования, и управляет ими.",controlIdentity:"Контроль своей личности Web3",manageIdentity:"Управляйте своей цифровой идентификацией и с легкостью получайте доступ к децентрализованным приложениям. Сохраняйте контроль над своими данными и безопасно участвуйте в экосистеме блокчейна.",effortlessCryptoTransactions:"Простые криптотранзакции",easilySend:"Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.",getAWallet:"Скачать кошелёк"}},X7={confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},eC={common:q7,button:G7,notifications:Z7,walletItem:Q7,walletModal:J7,actionModal:X7},tC={en:X2(K7),ru:X2(eC)};function X2(e){const t="$",n=r=>{Object.entries(r).forEach(([i,o])=>{if(typeof o=="object"&&o)return n(o);if(typeof o=="string"){if(o[0]===t){const s=o.slice(1).split(".");let a=e;s.forEach(l=>{if(l in a)a=a[l];else throw new Error(`Cannot parse translations: there is no property ${l} in translation`)}),r[i]=a}o.slice(0,2)===`\\${t}`&&(r[i]=o.slice(1))}})};return n(e),e}const qa=Jd(),R0=Symbol("store-raw"),Cc=Symbol("store-node"),nC=Symbol("store-name");function s4(e,t){let n=e[ci];if(!n&&(Object.defineProperty(e,ci,{value:n=new Proxy(e,oC)}),!Array.isArray(e))){const r=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,s=r.length;oe[ci][t]),n}function a4(e){if(H3()){const t=gg(e);(t._||(t._=l4()))()}}function iC(e){return a4(e),Reflect.ownKeys(e)}function l4(e){const[t,n]=Be(e,{equals:!1,internal:!0});return t.$=n,t}const oC={get(e,t,n){if(t===R0)return e;if(t===ci)return n;if(t===T0)return a4(e),n;const r=gg(e),i=r.hasOwnProperty(t);let o=i?r[t]():e[t];if(t===Cc||t==="__proto__")return o;if(!i){const s=Object.getOwnPropertyDescriptor(e,t);H3()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(o=D0(r,t,o)())}return rd(o)?s4(o):o},has(e,t){return t===R0||t===ci||t===T0||t===Cc||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:iC,getOwnPropertyDescriptor:rC};function id(e,t,n,r=!1){if(!r&&e[t]===n)return;const i=e[t],o=e.length;n===void 0?delete e[t]:e[t]=n;let s=gg(e),a;(a=D0(s,t,i))&&a.$(()=>n),Array.isArray(e)&&e.length!==o&&(a=D0(s,"length",o))&&a.$(e.length),(a=s._)&&a.$()}function c4(e,t){const n=Object.keys(t);for(let r=0;r1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l1){Sl(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let o=t[0];typeof o=="function"&&(o=o(i,n),o===i)||r===void 0&&o==null||(o=Wa(o),r===void 0||rd(i)&&rd(o)&&!Array.isArray(o)?c4(i,o):id(e,r,o))}function mg(...[e,t]){const n=Wa(e||{}),r=Array.isArray(n),i=s4(n);function o(...s){j3(()=>{r&&s.length===1?sC(n,s[0]):Sl(n,s)})}return[i,o]}const u4={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},aC={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! +`;return _(e,{})};function k7(e){e[0]==="#"&&(e=e.slice(1));const t=parseInt(e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i].join(",")}function Yc(e,t){return e[0]==="#"&&(e=k7(e)),`rgba(${e}, ${t})`}function Mi(e){return e.toString()+"px"}const Sl=class{constructor(){$e(this,"storage",{})}static getInstance(){return Sl.instance||(Sl.instance=new Sl),Sl.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var t;return(t=this.storage[e])!=null?t:null}key(e){var t;const n=Object.keys(this.storage);return e<0||e>=n.length?null:(t=n[e])!=null?t:null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t}};let r4=Sl;$e(r4,"instance");class vn extends Ie{constructor(...t){super(...t),Object.setPrototypeOf(this,vn.prototype)}}function ff(...e){try{console.debug("[TON_CONNECT_UI]",...e)}catch{}}function E7(...e){try{console.error("[TON_CONNECT_UI]",...e)}catch{}}function M7(...e){try{console.warn("[TON_CONNECT_UI]",...e)}catch{}}function nd(e,t="_self"){ff("openLink",e,t),window.open(e,t,"noopener noreferrer")}function Yt(e){nd(e,"_blank")}function To(e,t){const n=()=>{ct("safari")||xi("android")&&ct("firefox")||t()},r=setTimeout(()=>n(),200);window.addEventListener("blur",()=>clearTimeout(r),{once:!0}),nd(e,"_self")}function T7(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?Xt.LIGHT:Xt.DARK}function P7(e){const t=n=>e(n.matches?Xt.DARK:Xt.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}function A7(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=Mi(-document.documentElement.scrollTop),document.body.classList.add(hg))}function L7(){document.body.classList.remove(hg),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function O7(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function R7(){customElements.define(ji,class extends HTMLElement{})}function i4(e){return Lt(this,null,function*(){yield new Promise(t=>requestAnimationFrame(t)),e()})}function D7(e){return Lt(this,null,function*(){return yield new Promise(t=>requestAnimationFrame(t)),e()})}function o4(e){document.readyState!=="complete"?window.addEventListener("load",()=>i4(()=>o4(e)),{once:!0}):e.forEach(t=>{const n=new window.Image;n.src=t})}function fo(){if(typeof window<"u")return window}function pg(){if(I7())return localStorage;if(N7())throw new vn("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return r4.getInstance()}function I7(){try{return typeof localStorage<"u"}catch{return!1}}function N7(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}function gg(){var e,t,n;const r=new p9().getResult(),i=(e=r.os.name)==null?void 0:e.toLowerCase(),o=(t=r.device.model)==null?void 0:t.toLowerCase();let s;switch(!0){case o==="ipad":s="ipad";break;case i==="ios":s="ios";break;case i==="android":s="android";break;case i==="mac os":s="macos";break;case i==="linux":s="linux";break;case(i==null?void 0:i.includes("windows")):s="windows";break}const a=(n=r.browser.name)==null?void 0:n.toLowerCase();let l;switch(!0){case a==="chrome":l="chrome";break;case a==="firefox":l="firefox";break;case(a==null?void 0:a.includes("safari")):l="safari";break;case(a==null?void 0:a.includes("opera")):l="opera";break}return{os:s,browser:l}}function xi(...e){return e.includes(gg().os)}function ct(...e){return e.includes(gg().browser)}function Pu(e,t){const n=new URL(e);return t+n.search}class W7{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_wallet-info"),this.localStorage=pg()}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 $7{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_preferred-wallet"),this.localStorage=pg()}setPreferredWalletAppName(t){this.localStorage.setItem(this.storageKey,t)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class s4{constructor(){$e(this,"localStorage"),$e(this,"storageKey","ton-connect-ui_last-selected-wallet-info"),this.localStorage=pg()}setLastSelectedWalletInfo(t){this.localStorage.setItem(this.storageKey,JSON.stringify(t))}getLastSelectedWalletInfo(){const t=this.localStorage.getItem(this.storageKey);return t?JSON.parse(t):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[R0,Z2]=Be({status:"closed",closeReason:null}),Q2=ve(()=>R0().status==="opened"),[rd,J2]=Be({status:"closed",closeReason:null}),X2=ve(()=>rd().status==="opened"),U7=ve(()=>{const e=rd();return e.status==="opened"?e.walletInfo:null});let ga=typeof window<"u"?new s4:void 0;const[F7,B7]=Be((ga==null?void 0:ga.getLastSelectedWalletInfo())||null),Hn=e=>{ga||(ga=new s4),e?ga.setLastSelectedWalletInfo(e):ga.removeLastSelectedWalletInfo(),B7(e)},[zi,ma]=Be(null),j7={close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},H7={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},z7={confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},V7={walletOn:"Wallet On",recent:"Recent",installed:"Installed",popular:"Popular"},Y7={loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your wallet",openWalletOnTelegramOrSelect:"Open Wallet in Telegram or select your wallet to connect",openWalletOnTelegram:"Open Wallet in Telegram",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueIn:"Continue in {{ name }}…",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phone’s or {{ name }}’s camera",continueInExtension:"Continue in {{ name }} browser extension…",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",getWallet:"Get {{ name }}",continueOnDesktop:"Continue in {{ name }} on desktop…",openWalletOnTelegram:"Open Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"}},K7={confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},q7={common:j7,button:H7,notifications:z7,walletItem:V7,walletModal:Y7,actionModal:K7},G7={close:"Закрыть",openWallet:"Открыть кошелёк",copyLink:"Копировать ссылку",linkCopied:"Ссылка скопирована",copied:"Ссылка скопирована",yourWallet:"Ваш кошелёк",retry:"Повторить",get:"Скачать",mobile:"Мобильный",browserExtension:"Расширение",desktop:"Десктоп"},Z7={connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},Q7={confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."}},J7={walletOn:"Wallet в",recent:"Недавний",installed:"Установлен",popular:"Популярен"},X7={loading:"Кошельки загружаются",wallets:"Кошельки",mobileUniversalModal:{connectYourWallet:"Подключите кошелёк",openWalletOnTelegramOrSelect:"Подключите Wallet в Telegram или выберете кошелёк для подключения",openWalletOnTelegram:"Открыть Wallet в Telegram",openLink:"Открыть ссылку",scan:"Отсканируйте камерой вашего телефона"},desktopUniversalModal:{connectYourWallet:"Подключите кошелёк",scan:"Отсканируйте QR-код камерой вашего телефона",availableWallets:"Доступные кошельки"},mobileConnectionModal:{showQR:"Показать QR-код",scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueIn:"Продолжите в {{ name }}…",connectionDeclined:"Подключение отклонено"},desktopConnectionModal:{scanQR:"Отсканируйте QR-код ниже камерой в приложении {{ name }}, или камерой телефона",continueInExtension:"Откройте браузерное расширение {{ name }}",dontHaveExtension:"Похоже, у вас не установлено браузерное расширение {{ name }}",getWallet:"Скачать {{ name }}",continueOnDesktop:"Откройте {{ name }} на компьютере…",openWalletOnTelegram:"Открыть Wallet в Telegram",connectionDeclined:"Подключение отклонено"},infoModal:{whatIsAWallet:"Что такое кошелёк?",secureDigitalAssets:"Надежное хранилище цифровых активов",walletProtects:"Кошелёк защищает ваши цифровые активы, включая TON, токены и предметы коллекционирования, и управляет ими.",controlIdentity:"Контроль своей личности Web3",manageIdentity:"Управляйте своей цифровой идентификацией и с легкостью получайте доступ к децентрализованным приложениям. Сохраняйте контроль над своими данными и безопасно участвуйте в экосистеме блокчейна.",effortlessCryptoTransactions:"Простые криптотранзакции",easilySend:"Легко отправляйте, получайте и отслеживайте свои криптовалюты. Оптимизируйте свои операции с помощью децентрализованных приложений.",getAWallet:"Скачать кошелёк"}},eC={confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"},tC={common:G7,button:Z7,notifications:Q7,walletItem:J7,walletModal:X7,actionModal:eC},nC={en:ev(q7),ru:ev(tC)};function ev(e){const t="$",n=r=>{Object.entries(r).forEach(([i,o])=>{if(typeof o=="object"&&o)return n(o);if(typeof o=="string"){if(o[0]===t){const s=o.slice(1).split(".");let a=e;s.forEach(l=>{if(l in a)a=a[l];else throw new Error(`Cannot parse translations: there is no property ${l} in translation`)}),r[i]=a}o.slice(0,2)===`\\${t}`&&(r[i]=o.slice(1))}})};return n(e),e}const Ga=Xd(),D0=Symbol("store-raw"),Sc=Symbol("store-node"),rC=Symbol("store-name");function a4(e,t){let n=e[ci];if(!n&&(Object.defineProperty(e,ci,{value:n=new Proxy(e,sC)}),!Array.isArray(e))){const r=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,s=r.length;oe[ci][t]),n}function l4(e){if(z3()){const t=mg(e);(t._||(t._=c4()))()}}function oC(e){return l4(e),Reflect.ownKeys(e)}function c4(e){const[t,n]=Be(e,{equals:!1,internal:!0});return t.$=n,t}const sC={get(e,t,n){if(t===D0)return e;if(t===ci)return n;if(t===P0)return l4(e),n;const r=mg(e),i=r.hasOwnProperty(t);let o=i?r[t]():e[t];if(t===Sc||t==="__proto__")return o;if(!i){const s=Object.getOwnPropertyDescriptor(e,t);z3()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(o=I0(r,t,o)())}return id(o)?a4(o):o},has(e,t){return t===D0||t===ci||t===P0||t===Sc||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:oC,getOwnPropertyDescriptor:iC};function od(e,t,n,r=!1){if(!r&&e[t]===n)return;const i=e[t],o=e.length;n===void 0?delete e[t]:e[t]=n;let s=mg(e),a;(a=I0(s,t,i))&&a.$(()=>n),Array.isArray(e)&&e.length!==o&&(a=I0(s,"length",o))&&a.$(e.length),(a=s._)&&a.$()}function u4(e,t){const n=Object.keys(t);for(let r=0;r1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l1){kl(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let o=t[0];typeof o=="function"&&(o=o(i,n),o===i)||r===void 0&&o==null||(o=$a(o),r===void 0||id(i)&&id(o)&&!Array.isArray(o)?u4(i,o):od(e,r,o))}function vg(...[e,t]){const n=$a(e||{}),r=Array.isArray(n),i=a4(n);function o(...s){H3(()=>{r&&s.length===1?aC(n,s[0]):kl(n,s)})}return[i,o]}const f4={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},lC={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function ev(e){return Object.prototype.toString.call(e)==="[object Object]"}function lC(e){var t,n;return ev(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(ev(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ho(e,t){return e?T9(t,e,{arrayMerge:(r,i,o)=>i,isMergeableObject:lC}):t}const[cC,vg]=mg({theme:en.LIGHT,colors:u4,borderRadius:"m"}),f4={[en.LIGHT]:u4,[en.DARK]:aC},yi={[en.LIGHT]:void 0,[en.DARK]:void 0};function i1(e,t){t&&(yi[en.DARK]=Ho(t[en.DARK],yi[en.DARK]),yi[en.LIGHT]=Ho(t[en.LIGHT],yi[en.LIGHT])),vg({theme:e,colors:Ho(yi[e],f4[e])})}function uC(e){vg({borderRadius:e})}function fC(e){yi[en.DARK]=Ho(e[en.DARK],yi[en.DARK]),yi[en.LIGHT]=Ho(e[en.LIGHT],yi[en.LIGHT]),vg(t=>({colors:Ho(yi[t.theme],f4[t.theme])}))}const dC=V.div` + */function tv(e){return Object.prototype.toString.call(e)==="[object Object]"}function cC(e){var t,n;return tv(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(tv(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ho(e,t){return e?P9(t,e,{arrayMerge:(r,i,o)=>i,isMergeableObject:cC}):t}const[uC,yg]=vg({theme:Xt.LIGHT,colors:f4,borderRadius:"m"}),d4={[Xt.LIGHT]:f4,[Xt.DARK]:lC},yi={[Xt.LIGHT]:void 0,[Xt.DARK]:void 0};function o1(e,t){t&&(yi[Xt.DARK]=Ho(t[Xt.DARK],yi[Xt.DARK]),yi[Xt.LIGHT]=Ho(t[Xt.LIGHT],yi[Xt.LIGHT])),yg({theme:e,colors:Ho(yi[e],d4[e])})}function fC(e){yg({borderRadius:e})}function dC(e){yi[Xt.DARK]=Ho(e[Xt.DARK],yi[Xt.DARK]),yi[Xt.LIGHT]=Ho(e[Xt.LIGHT],yi[Xt.LIGHT]),yg(t=>({colors:Ho(yi[t.theme],d4[t.theme])}))}const hC=V.div` background-color: ${e=>e.theme.colors.background.secondary}; -`,Hs=e=>{let t;const[n,r]=Be(null);return $n(()=>{const i=new window.Image;return i.src=e.src,i.alt=e.alt||"",i.setAttribute("draggable","false"),e.class&&i.classList.add(e.class),i.complete?r(i):(i.addEventListener("load",()=>r(i)),()=>i.removeEventListener("load",()=>r(i)))}),[_(Ye,{get when(){return n()},get children(){return n()}}),_(Ye,{get when(){return!n()},get children(){return _(dC,{get class(){return e.class},ref(i){const o=t;typeof o=="function"?o(i):t=i}})}})]};let Ms={};try{let e=location.hash.toString();Ms=hC(e)}catch{}let Sc="unknown";Ms!=null&&Ms.tgWebAppPlatform&&(Sc=(D2=Ms.tgWebAppPlatform)!=null?D2:"unknown");if(Sc==="unknown"){const e=fo();Sc=(W2=(N2=(I2=e==null?void 0:e.Telegram)==null?void 0:I2.WebApp)==null?void 0:N2.platform)!=null?W2:"unknown"}let od="6.0";Ms!=null&&Ms.tgWebAppVersion&&(od=Ms.tgWebAppVersion);if(!od){const e=fo();od=(F2=(U2=($2=e==null?void 0:e.Telegram)==null?void 0:$2.WebApp)==null?void 0:U2.version)!=null?F2:"6.0"}function Ki(...e){return e.includes(Sc)}function ao(){var e;return Sc!=="unknown"||!!((e=fo())!=null&&e.TelegramWebviewProxy)}function yg(){h4("web_app_expand",{})}function kl(e,t){const n=new URL(e);if(n.protocol!=="http:"&&n.protocol!=="https:"){if(t)return t();throw new vn(`Url protocol is not supported: ${n}`)}if(n.hostname!=="t.me"){if(t)return t();throw new vn(`Url host is not supported: ${n}`)}const r=n.pathname+n.search;d4()||mC("6.1")?h4("web_app_open_tg_link",{path_full:r}):Yt("https://t.me"+r)}function d4(){try{const e=fo();return e?e.parent!=null&&e!==e.parent:!1}catch{return!1}}function h4(e,t){try{const n=fo();if(!n)throw new vn("Can't post event to parent window: window is not defined");if(n.TelegramWebviewProxy!==void 0)uf("postEvent",e,t),n.TelegramWebviewProxy.postEvent(e,JSON.stringify(t));else if(n.external&&"notify"in n.external)uf("postEvent",e,t),n.external.notify(JSON.stringify({eventType:e,eventData:t}));else if(d4()){const r="*",i=JSON.stringify({eventType:e,eventData:t});uf("postEvent",e,t),n.parent.postMessage(i,r)}else throw new vn("Can't post event to TMA")}catch(n){k7(`Can't post event to parent window: ${n}`)}}function hC(e){e=e.replace(/^#/,"");let t={};if(!e.length)return t;if(e.indexOf("=")<0&&e.indexOf("?")<0)return t._path=sd(e),t;let n=e.indexOf("?");if(n>=0){let i=e.substr(0,n);t._path=sd(i),e=e.substr(n+1)}let r=pC(e);for(let i in r)t[i]=r[i];return t}function sd(e){try{return e=e.replace(/\+/g,"%20"),decodeURIComponent(e)}catch{return e}}function pC(e){let t={};if(!e.length)return t;let n=e.split("&"),r,i,o,s;for(r=0;ra?1:-1;return 0}function mC(e){return gC(od,e)>=0}const ws={mobile:440,tablet:1020};function ma(e){const t=fo();if(!t)return e==="desktop";if(Ki("weba"))return!0;const n=t.innerWidth;switch(e){case"desktop":return n>ws.tablet;case"tablet":return n>ws.mobile;default:case"mobile":return n<=ws.mobile||xi("ios","android","ipad")}}function Ir(e){switch(e){case"mobile":return`@media (max-width: ${ws.mobile}px)`;case"tablet":return`@media (max-width: ${ws.tablet}px) (min-width: ${ws.mobile}px)`;default:case"desktop":return`@media (min-width: ${ws.tablet}px)`}}const Yc="@media (hover: none)",Kc="@media not all and (hover: none)",vC={m:"100vh",s:"8px",none:"0"},o1={s:.02,m:.04},yC=V.button` +`,zs=e=>{let t;const[n,r]=Be(null);return $n(()=>{const i=new window.Image;return i.src=e.src,i.alt=e.alt||"",i.setAttribute("draggable","false"),e.class&&i.classList.add(e.class),i.complete?r(i):(i.addEventListener("load",()=>r(i)),()=>i.removeEventListener("load",()=>r(i)))}),[_(Ye,{get when(){return n()},get children(){return n()}}),_(Ye,{get when(){return!n()},get children(){return _(hC,{get class(){return e.class},ref(i){const o=t;typeof o=="function"?o(i):t=i}})}})]};let Ts={};try{let e=location.hash.toString();Ts=pC(e)}catch{}let kc="unknown";Ts!=null&&Ts.tgWebAppPlatform&&(kc=(I2=Ts.tgWebAppPlatform)!=null?I2:"unknown");if(kc==="unknown"){const e=fo();kc=($2=(W2=(N2=e==null?void 0:e.Telegram)==null?void 0:N2.WebApp)==null?void 0:W2.platform)!=null?$2:"unknown"}let sd="6.0";Ts!=null&&Ts.tgWebAppVersion&&(sd=Ts.tgWebAppVersion);if(!sd){const e=fo();sd=(B2=(F2=(U2=e==null?void 0:e.Telegram)==null?void 0:U2.WebApp)==null?void 0:F2.version)!=null?B2:"6.0"}function Ki(...e){return e.includes(kc)}function ao(){var e;return kc!=="unknown"||!!((e=fo())!=null&&e.TelegramWebviewProxy)}function wg(){p4("web_app_expand",{})}function El(e,t){const n=new URL(e);if(n.protocol!=="http:"&&n.protocol!=="https:"){if(t)return t();throw new vn(`Url protocol is not supported: ${n}`)}if(n.hostname!=="t.me"){if(t)return t();throw new vn(`Url host is not supported: ${n}`)}const r=n.pathname+n.search;h4()||vC("6.1")?p4("web_app_open_tg_link",{path_full:r}):Yt("https://t.me"+r)}function h4(){try{const e=fo();return e?e.parent!=null&&e!==e.parent:!1}catch{return!1}}function p4(e,t){try{const n=fo();if(!n)throw new vn("Can't post event to parent window: window is not defined");if(n.TelegramWebviewProxy!==void 0)ff("postEvent",e,t),n.TelegramWebviewProxy.postEvent(e,JSON.stringify(t));else if(n.external&&"notify"in n.external)ff("postEvent",e,t),n.external.notify(JSON.stringify({eventType:e,eventData:t}));else if(h4()){const r="*",i=JSON.stringify({eventType:e,eventData:t});ff("postEvent",e,t),n.parent.postMessage(i,r)}else throw new vn("Can't post event to TMA")}catch(n){E7(`Can't post event to parent window: ${n}`)}}function pC(e){e=e.replace(/^#/,"");let t={};if(!e.length)return t;if(e.indexOf("=")<0&&e.indexOf("?")<0)return t._path=ad(e),t;let n=e.indexOf("?");if(n>=0){let i=e.substr(0,n);t._path=ad(i),e=e.substr(n+1)}let r=gC(e);for(let i in r)t[i]=r[i];return t}function ad(e){try{return e=e.replace(/\+/g,"%20"),decodeURIComponent(e)}catch{return e}}function gC(e){let t={};if(!e.length)return t;let n=e.split("&"),r,i,o,s;for(r=0;ra?1:-1;return 0}function vC(e){return mC(sd,e)>=0}const xs={mobile:440,tablet:1020};function va(e){const t=fo();if(!t)return e==="desktop";if(Ki("weba"))return!0;const n=t.innerWidth;switch(e){case"desktop":return n>xs.tablet;case"tablet":return n>xs.mobile;default:case"mobile":return n<=xs.mobile||xi("ios","android","ipad")}}function Ir(e){switch(e){case"mobile":return`@media (max-width: ${xs.mobile}px)`;case"tablet":return`@media (max-width: ${xs.tablet}px) (min-width: ${xs.mobile}px)`;default:case"desktop":return`@media (min-width: ${xs.tablet}px)`}}const Kc="@media (hover: none)",qc="@media not all and (hover: none)",yC={m:"100vh",s:"8px",none:"0"},s1={s:.02,m:.04},wC=V.button` display: ${e=>e.leftIcon||e.rightIcon?"flex":"inline-block"}; gap: ${e=>e.leftIcon||e.rightIcon?"6px":"unset"}; align-items: ${e=>e.leftIcon||e.rightIcon?"center":"unset"}; justify-content: ${e=>e.leftIcon||e.rightIcon?"space-between":"unset"}; - background-color: ${e=>e.appearance==="flat"?"transparent":e.appearance==="secondary"?e.theme.colors.background.tint:Vc(e.theme.colors.accent,.12)}; + background-color: ${e=>e.appearance==="flat"?"transparent":e.appearance==="secondary"?e.theme.colors.background.tint:Yc(e.theme.colors.accent,.12)}; color: ${e=>e.appearance==="secondary"?e.theme.colors.text.primary:e.theme.colors.accent}; padding: ${e=>e.appearance==="flat"?"0":"9px 16px"}; padding-left: ${e=>e.leftIcon&&e.appearance!=="flat"?"12px":"16px"}; padding-right: ${e=>e.rightIcon&&e.appearance!=="flat"?"12px":"16px"}; border: none; - border-radius: ${e=>vC[e.theme.borderRadius]}; + border-radius: ${e=>yC[e.theme.borderRadius]}; cursor: ${e=>e.disabled?"not-allowed":"pointer"}; font-size: 14px; @@ -126,25 +126,25 @@ PERFORMANCE OF THIS SOFTWARE. transition: transform 0.125s ease-in-out; - ${Kc} { + ${qc} { &:hover { - transform: ${e=>e.disabled?"unset":`scale(${1+o1[e.scale]})`}; + transform: ${e=>e.disabled?"unset":`scale(${1+s1[e.scale]})`}; } } &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-o1[e.scale]})`}; + transform: ${e=>e.disabled?"unset":`scale(${1-s1[e.scale]})`}; } - ${Yc} { + ${Kc} { &:active { - transform: ${e=>e.disabled?"unset":`scale(${1-o1[e.scale]*2})`}; + transform: ${e=>e.disabled?"unset":`scale(${1-s1[e.scale]*2})`}; } } -`;function qc(e){const t=Un(()=>Object.keys(e).filter(r=>r.startsWith("data-"))),[n]=cg(e,t);return n}const wn=e=>{const t=qc(e);return _(yC,Ei({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:n=>{var r;return(r=e.onClick)==null?void 0:r.call(e,n)},onMouseEnter:n=>{var r;return(r=e.onMouseEnter)==null?void 0:r.call(e,n)},onMouseLeave:n=>{var r;return(r=e.onMouseLeave)==null?void 0:r.call(e,n)},ref(n){const r=e.ref;typeof r=="function"?r(n):e.ref=n},get disabled(){return e.disabled},get scale(){return e.scale||"m"},get leftIcon(){return!!e.leftIcon},get rightIcon(){return!!e.rightIcon},"data-tc-button":"true"},t,{get children(){return[ve(()=>e.leftIcon),ve(()=>e.children),ve(()=>e.rightIcon)]}}))};function ad(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const wg=e=>{let t,n=!0;const[r,i]=Be(),[o,s]=Be(),a=Xd(()=>e.children),{onBeforeEnter:l,onEnter:c,onAfterEnter:u,onBeforeExit:d,onExit:h,onAfterExit:g}=e,m=ve(()=>{const C=e.name||"s";return{enterActiveClass:e.enterActiveClass||C+"-enter-active",enterClass:e.enterClass||C+"-enter",enterToClass:e.enterToClass||C+"-enter-to",exitActiveClass:e.exitActiveClass||C+"-exit-active",exitClass:e.exitClass||C+"-exit",exitToClass:e.exitToClass||C+"-exit-to"}});function y(C,v){if(!n||e.appear){let w=function(T){C&&(!T||T.target===C)&&(C.removeEventListener("transitionend",w),C.removeEventListener("animationend",w),C.classList.remove(...E),C.classList.remove(...O),j3(()=>{r()!==C&&i(C),o()===C&&s(void 0)}),u&&u(C),e.mode==="inout"&&k(C,v))};const M=m().enterClass.split(" "),E=m().enterActiveClass.split(" "),O=m().enterToClass.split(" ");l&&l(C),C.classList.add(...M),C.classList.add(...E),ad(()=>{C.classList.remove(...M),C.classList.add(...O),c&&c(C,()=>w()),(!c||c.length<2)&&(C.addEventListener("transitionend",w),C.addEventListener("animationend",w))})}v&&!e.mode?s(C):i(C)}function k(C,v){const w=m().exitClass.split(" "),M=m().exitActiveClass.split(" "),E=m().exitToClass.split(" ");if(!v.parentNode)return O();d&&d(v),v.classList.add(...w),v.classList.add(...M),ad(()=>{v.classList.remove(...w),v.classList.add(...E)}),h&&h(v,()=>O()),(!h||h.length<2)&&(v.addEventListener("transitionend",O),v.addEventListener("animationend",O));function O(T){(!T||T.target===v)&&(v.removeEventListener("transitionend",O),v.removeEventListener("animationend",O),v.classList.remove(...M),v.classList.remove(...E),r()===v&&i(void 0),g&&g(v),e.mode==="outin"&&y(C,v))}}return Jf(C=>{for(t=a();typeof t=="function";)t=t();return Un(()=>(t&&t!==C&&(e.mode!=="outin"?y(t,C):n&&i(t)),C&&C!==t&&e.mode!=="inout"&&k(t,C),n=!1,t))}),[r,o]};function Pu(e){const{top:t,bottom:n,left:r,right:i,width:o,height:s}=e.getBoundingClientRect(),a=e.parentNode.getBoundingClientRect();return{top:t-a.top,bottom:n,left:r-a.left,right:i,width:o,height:s}}const wC=e=>{const t=Xd(()=>e.children),n=ve(()=>{const g=e.name||"s";return{enterActiveClass:e.enterActiveClass||g+"-enter-active",enterClass:e.enterClass||g+"-enter",enterToClass:e.enterToClass||g+"-enter-to",exitActiveClass:e.exitActiveClass||g+"-exit-active",exitClass:e.exitClass||g+"-exit",exitToClass:e.exitToClass||g+"-exit-to",moveClass:e.moveClass||g+"-move"}}),{onBeforeEnter:r,onEnter:i,onAfterEnter:o,onBeforeExit:s,onExit:a,onAfterExit:l}=e,[c,u]=Be();let d=[],h=!0;return Jf(()=>{const g=t(),m=[...g],y=new Set(g),k=new Set(d),C=n().enterClass.split(" "),v=n().enterActiveClass.split(" "),w=n().enterToClass.split(" "),M=n().exitClass.split(" "),E=n().exitActiveClass.split(" "),O=n().exitToClass.split(" ");for(let T=0;T{P.classList.remove(...C),P.classList.add(...w),i&&i(P,()=>L()),(!i||i.length<2)&&(P.addEventListener("transitionend",L),P.addEventListener("animationend",L))})}}for(let T=0;TI!==P),u(d))};m.splice(T,0,P),s&&s(P),P.classList.add(...M),P.classList.add(...E),ad(()=>{P.classList.remove(...M),P.classList.add(...O)}),a&&a(P,()=>L()),(!a||a.length<2)&&(P.addEventListener("transitionend",L),P.addEventListener("animationend",L))}}d=m,u(m)}),$n(g=>{const m=c();return m.forEach(y=>{let k;(k=g.get(y))?k.new&&(k.new=!1,k.newPos=Pu(y)):g.set(y,k={pos:Pu(y),new:!h}),k.new&&y.addEventListener("transitionend",()=>{k.new=!1,y.parentNode&&(k.newPos=Pu(y))},{once:!0}),k.newPos&&(k.pos=k.newPos),k.newPos=Pu(y)}),h?(h=!1,g):(m.forEach(y=>{const k=g.get(y),C=k.pos,v=k.newPos,w=C.left-v.left,M=C.top-v.top;if(w||M){k.moved=!0;const E=y.style;E.transform=`translate(${w}px,${M}px)`,E.transitionDuration="0s"}}),document.body.offsetHeight,m.forEach(y=>{const k=g.get(y);if(k.moved){let C=function(M){M&&M.target!==y||!y.parentNode||(!M||/transform$/.test(M.propertyName))&&(y.removeEventListener("transitionend",C),y.classList.remove(...w))};k.moved=!1;const v=y.style,w=n().moveClass.split(" ");y.classList.add(...w),v.transform=v.transitionDuration="",y.addEventListener("transitionend",C)}}),g)},new Map),c};function xC(e,t){const n=r=>{var i;return!e.contains(r.target)&&((i=t())==null?void 0:i())};document.body.addEventListener("click",n),lr(()=>document.body.removeEventListener("click",n))}function bC(e,t){const n=r=>{var i,o;r.key==="Escape"&&((i=document.activeElement)==null||i.blur(),(o=t())==null||o())};document.body.addEventListener("keydown",n),lr(()=>document.body.removeEventListener("keydown",n))}function _C(e,t){const{isEnabled:n,onClose:r}=t();if(!n||!(pg().os==="android"))return;window.history.pushState(CC,"");const o=s=>{s.preventDefault(),r()};window.addEventListener("popstate",o,{once:!0}),lr(()=>{window.removeEventListener("popstate",o),r4(()=>{var s;((s=window.history.state)==null?void 0:s[p4])===!0&&window.history.back()})})}const p4="androidBackHandler",CC={[p4]:!0},SC=gt('',4,!0),kC={left:0,top:90,right:180,bottom:270},g4=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary,r=()=>e.direction||"left",i=V("svg")` - transform: rotate(${o=>kC[o.svgDirection]}deg); +`;function Gc(e){const t=Un(()=>Object.keys(e).filter(r=>r.startsWith("data-"))),[n]=ug(e,t);return n}const wn=e=>{const t=Gc(e);return _(wC,Ei({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:n=>{var r;return(r=e.onClick)==null?void 0:r.call(e,n)},onMouseEnter:n=>{var r;return(r=e.onMouseEnter)==null?void 0:r.call(e,n)},onMouseLeave:n=>{var r;return(r=e.onMouseLeave)==null?void 0:r.call(e,n)},ref(n){const r=e.ref;typeof r=="function"?r(n):e.ref=n},get disabled(){return e.disabled},get scale(){return e.scale||"m"},get leftIcon(){return!!e.leftIcon},get rightIcon(){return!!e.rightIcon},"data-tc-button":"true"},t,{get children(){return[ve(()=>e.leftIcon),ve(()=>e.children),ve(()=>e.rightIcon)]}}))};function ld(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}const xg=e=>{let t,n=!0;const[r,i]=Be(),[o,s]=Be(),a=eh(()=>e.children),{onBeforeEnter:l,onEnter:c,onAfterEnter:u,onBeforeExit:d,onExit:h,onAfterExit:g}=e,m=ve(()=>{const C=e.name||"s";return{enterActiveClass:e.enterActiveClass||C+"-enter-active",enterClass:e.enterClass||C+"-enter",enterToClass:e.enterToClass||C+"-enter-to",exitActiveClass:e.exitActiveClass||C+"-exit-active",exitClass:e.exitClass||C+"-exit",exitToClass:e.exitToClass||C+"-exit-to"}});function y(C,v){if(!n||e.appear){let w=function(T){C&&(!T||T.target===C)&&(C.removeEventListener("transitionend",w),C.removeEventListener("animationend",w),C.classList.remove(...E),C.classList.remove(...O),H3(()=>{r()!==C&&i(C),o()===C&&s(void 0)}),u&&u(C),e.mode==="inout"&&k(C,v))};const M=m().enterClass.split(" "),E=m().enterActiveClass.split(" "),O=m().enterToClass.split(" ");l&&l(C),C.classList.add(...M),C.classList.add(...E),ld(()=>{C.classList.remove(...M),C.classList.add(...O),c&&c(C,()=>w()),(!c||c.length<2)&&(C.addEventListener("transitionend",w),C.addEventListener("animationend",w))})}v&&!e.mode?s(C):i(C)}function k(C,v){const w=m().exitClass.split(" "),M=m().exitActiveClass.split(" "),E=m().exitToClass.split(" ");if(!v.parentNode)return O();d&&d(v),v.classList.add(...w),v.classList.add(...M),ld(()=>{v.classList.remove(...w),v.classList.add(...E)}),h&&h(v,()=>O()),(!h||h.length<2)&&(v.addEventListener("transitionend",O),v.addEventListener("animationend",O));function O(T){(!T||T.target===v)&&(v.removeEventListener("transitionend",O),v.removeEventListener("animationend",O),v.classList.remove(...M),v.classList.remove(...E),r()===v&&i(void 0),g&&g(v),e.mode==="outin"&&y(C,v))}}return Xf(C=>{for(t=a();typeof t=="function";)t=t();return Un(()=>(t&&t!==C&&(e.mode!=="outin"?y(t,C):n&&i(t)),C&&C!==t&&e.mode!=="inout"&&k(t,C),n=!1,t))}),[r,o]};function Au(e){const{top:t,bottom:n,left:r,right:i,width:o,height:s}=e.getBoundingClientRect(),a=e.parentNode.getBoundingClientRect();return{top:t-a.top,bottom:n,left:r-a.left,right:i,width:o,height:s}}const xC=e=>{const t=eh(()=>e.children),n=ve(()=>{const g=e.name||"s";return{enterActiveClass:e.enterActiveClass||g+"-enter-active",enterClass:e.enterClass||g+"-enter",enterToClass:e.enterToClass||g+"-enter-to",exitActiveClass:e.exitActiveClass||g+"-exit-active",exitClass:e.exitClass||g+"-exit",exitToClass:e.exitToClass||g+"-exit-to",moveClass:e.moveClass||g+"-move"}}),{onBeforeEnter:r,onEnter:i,onAfterEnter:o,onBeforeExit:s,onExit:a,onAfterExit:l}=e,[c,u]=Be();let d=[],h=!0;return Xf(()=>{const g=t(),m=[...g],y=new Set(g),k=new Set(d),C=n().enterClass.split(" "),v=n().enterActiveClass.split(" "),w=n().enterToClass.split(" "),M=n().exitClass.split(" "),E=n().exitActiveClass.split(" "),O=n().exitToClass.split(" ");for(let T=0;T{P.classList.remove(...C),P.classList.add(...w),i&&i(P,()=>L()),(!i||i.length<2)&&(P.addEventListener("transitionend",L),P.addEventListener("animationend",L))})}}for(let T=0;TI!==P),u(d))};m.splice(T,0,P),s&&s(P),P.classList.add(...M),P.classList.add(...E),ld(()=>{P.classList.remove(...M),P.classList.add(...O)}),a&&a(P,()=>L()),(!a||a.length<2)&&(P.addEventListener("transitionend",L),P.addEventListener("animationend",L))}}d=m,u(m)}),$n(g=>{const m=c();return m.forEach(y=>{let k;(k=g.get(y))?k.new&&(k.new=!1,k.newPos=Au(y)):g.set(y,k={pos:Au(y),new:!h}),k.new&&y.addEventListener("transitionend",()=>{k.new=!1,y.parentNode&&(k.newPos=Au(y))},{once:!0}),k.newPos&&(k.pos=k.newPos),k.newPos=Au(y)}),h?(h=!1,g):(m.forEach(y=>{const k=g.get(y),C=k.pos,v=k.newPos,w=C.left-v.left,M=C.top-v.top;if(w||M){k.moved=!0;const E=y.style;E.transform=`translate(${w}px,${M}px)`,E.transitionDuration="0s"}}),document.body.offsetHeight,m.forEach(y=>{const k=g.get(y);if(k.moved){let C=function(M){M&&M.target!==y||!y.parentNode||(!M||/transform$/.test(M.propertyName))&&(y.removeEventListener("transitionend",C),y.classList.remove(...w))};k.moved=!1;const v=y.style,w=n().moveClass.split(" ");y.classList.add(...w),v.transform=v.transitionDuration="",y.addEventListener("transitionend",C)}}),g)},new Map),c};function bC(e,t){const n=r=>{var i;return!e.contains(r.target)&&((i=t())==null?void 0:i())};document.body.addEventListener("click",n),lr(()=>document.body.removeEventListener("click",n))}function _C(e,t){const n=r=>{var i,o;r.key==="Escape"&&((i=document.activeElement)==null||i.blur(),(o=t())==null||o())};document.body.addEventListener("keydown",n),lr(()=>document.body.removeEventListener("keydown",n))}function CC(e,t){const{isEnabled:n,onClose:r}=t();if(!n||!(gg().os==="android"))return;window.history.pushState(SC,"");const o=s=>{s.preventDefault(),r()};window.addEventListener("popstate",o,{once:!0}),lr(()=>{window.removeEventListener("popstate",o),i4(()=>{var s;((s=window.history.state)==null?void 0:s[g4])===!0&&window.history.back()})})}const g4="androidBackHandler",SC={[g4]:!0},kC=mt('',4,!0),EC={left:0,top:90,right:180,bottom:270},m4=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary,r=()=>e.direction||"left",i=V("svg")` + transform: rotate(${o=>EC[o.svgDirection]}deg); transition: transform 0.1s ease-in-out; - `;return _(i,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return r()},get children(){const o=SC.cloneNode(!0);return ht(()=>Oe(o,"fill",n())),o}})},EC=gt(''),MC=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=EC.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},TC=V.button` + `;return _(i,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return r()},get children(){const o=kC.cloneNode(!0);return ht(()=>Oe(o,"fill",n())),o}})},MC=mt(''),TC=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=MC.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},PC=V.button` padding: 0; display: flex; justify-content: center; @@ -158,7 +158,7 @@ PERFORMANCE OF THIS SOFTWARE. transition: transform 0.125s ease-in-out; - ${Kc} { + ${qc} { &:hover { transform: scale(1.04); } @@ -168,12 +168,12 @@ PERFORMANCE OF THIS SOFTWARE. transform: scale(0.96); } - ${Yc} { + ${Kc} { &:active { transform: scale(0.92); } } -`,zs=e=>{const t=qc(e),n=()=>e.icon||"close";return _(TC,Ei({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[_(Ye,{get when(){return!!e.children},get children(){return e.children}}),_(Ye,{get when(){return!e.children},get children(){return _(zc,{get children(){return[_(jn,{get when(){return n()==="close"},get children(){return _(MC,{get fill(){return e.fill}})}}),_(jn,{get when(){return n()==="arrow"},get children(){return _(g4,{get fill(){return e.fill}})}}),_(jn,{get when(){return n()==="question"},get children(){return _(OS,{get fill(){return e.fill}})}}),_(jn,{get when(){return typeof n()!="string"},get children(){return n()}})]}})}})]}}))},Sa={m:"24px",s:"16px",none:"0"},PC=V.div` +`,Vs=e=>{const t=Gc(e),n=()=>e.icon||"close";return _(PC,Ei({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[_(Ye,{get when(){return!!e.children},get children(){return e.children}}),_(Ye,{get when(){return!e.children},get children(){return _(Vc,{get children(){return[_(jn,{get when(){return n()==="close"},get children(){return _(TC,{get fill(){return e.fill}})}}),_(jn,{get when(){return n()==="arrow"},get children(){return _(m4,{get fill(){return e.fill}})}}),_(jn,{get when(){return n()==="question"},get children(){return _(RS,{get fill(){return e.fill}})}}),_(jn,{get when(){return typeof n()!="string"},get children(){return n()}})]}})}})]}}))},ka={m:"24px",s:"16px",none:"0"},AC=V.div` display: flex; position: fixed; z-index: 1000; @@ -188,7 +188,7 @@ PERFORMANCE OF THIS SOFTWARE. ${Ir("mobile")} { padding-bottom: 0; } -`,AC=so` +`,LC=so` box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16); width: fit-content; margin: auto; @@ -198,7 +198,7 @@ PERFORMANCE OF THIS SOFTWARE. height: fit-content; margin: auto 0 0 0; } -`,LC=V.div` +`,OC=V.div` position: relative; min-height: 100px; width: 416px; @@ -207,33 +207,33 @@ PERFORMANCE OF THIS SOFTWARE. box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04); background-color: ${e=>e.theme.colors.background.primary}; - border-radius: ${e=>Sa[e.theme.borderRadius]}; + border-radius: ${e=>ka[e.theme.borderRadius]}; ${Ir("mobile")} { width: 100%; } -`,OC=V(zs)` +`,RC=V(Vs)` position: absolute; right: 16px; top: 16px; -`,RC=V.div` +`,DC=V.div` display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 16px 18px; - border-radius: 0 0 ${e=>Sa[e.theme.borderRadius]} - ${e=>Sa[e.theme.borderRadius]}; -`,DC=V(zs)` - background-color: ${e=>Vc(e.theme.colors.icon.secondary,.12)}; -`;class IC{constructor(){$e(this,"currentTime",0)}}const El=class{constructor(){$e(this,"currentTime",0),$e(this,"playbackRate",1),$e(this,"startTime",null),$e(this,"timeline",new IC),$e(this,"finished",Promise.resolve(this)),$e(this,"effect",null),$e(this,"id",""),$e(this,"pending",!1),$e(this,"playState","finished"),$e(this,"replaceState","active"),$e(this,"ready",Promise.resolve(this)),$e(this,"oncancel",null),$e(this,"onfinish",null),$e(this,"onremove",null)}static create(){return El._instance||(E7("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),El._instance=new El),El._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(e,t,n){}dispatchEvent(e){return!1}removeEventListener(e,t,n){}updatePlaybackRate(e){}commitStyles(){}persist(){}};let m4=El;$e(m4,"_instance",null);function bi(e,t,n){return"animate"in e?e.animate(t,n):m4.create()}const NC=gt("
"),WC=xC,$C=bC,UC=_C,v4=e=>{const t=Ft(),n=qc(e);return $n(()=>{e.opened?P7():A7()}),_(wg,{onBeforeEnter:r=>{const i=ma("mobile")?200:100;bi(r,[{opacity:0},{opacity:1}],{duration:i}),ma("mobile")&&bi(r.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:i})},onExit:(r,i)=>{const o=ma("mobile")?200:100,s=bi(r,[{opacity:1},{opacity:0}],{duration:o});if(ma("mobile")){const a=bi(r.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:o});Promise.all([s.finished,a.finished]).then(i)}else s.finished.then(i)},get children(){return _(Ye,{get when(){return e.opened},get children(){return _(PC,Ei({"data-tc-modal":"true"},n,{get children(){const r=NC.cloneNode(!0);return Hl(UC,r,()=>({isEnabled:e.enableAndroidBackHandler,onClose:()=>e.onClose()})),Hl($C,r,()=>()=>e.onClose()),Hl(WC,r,()=>()=>e.onClose()),Xn(r,_(LC,{get class(){return e.class},get children(){return[_(OC,{icon:"close",onClick:()=>e.onClose()}),ve(()=>e.children)]}}),null),Xn(r,_(Ye,{get when(){return e.onClickQuestion},get children(){return _(RC,{get children(){return[_(AS,{}),_(DC,{get onClick(){return e.onClickQuestion},icon:"question"})]}})}}),null),ht(()=>ug(r,cf(AC,so` - border-radius: ${Sa[t.borderRadius]}; + border-radius: 0 0 ${e=>ka[e.theme.borderRadius]} + ${e=>ka[e.theme.borderRadius]}; +`,IC=V(Vs)` + background-color: ${e=>Yc(e.theme.colors.icon.secondary,.12)}; +`;class NC{constructor(){$e(this,"currentTime",0)}}const Ml=class{constructor(){$e(this,"currentTime",0),$e(this,"playbackRate",1),$e(this,"startTime",null),$e(this,"timeline",new NC),$e(this,"finished",Promise.resolve(this)),$e(this,"effect",null),$e(this,"id",""),$e(this,"pending",!1),$e(this,"playState","finished"),$e(this,"replaceState","active"),$e(this,"ready",Promise.resolve(this)),$e(this,"oncancel",null),$e(this,"onfinish",null),$e(this,"onremove",null)}static create(){return Ml._instance||(M7("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),Ml._instance=new Ml),Ml._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(e,t,n){}dispatchEvent(e){return!1}removeEventListener(e,t,n){}updatePlaybackRate(e){}commitStyles(){}persist(){}};let v4=Ml;$e(v4,"_instance",null);function bi(e,t,n){return"animate"in e?e.animate(t,n):v4.create()}const WC=mt("
"),$C=bC,UC=_C,FC=CC,y4=e=>{const t=Bt(),n=Gc(e);return $n(()=>{e.opened?A7():L7()}),_(xg,{onBeforeEnter:r=>{const i=va("mobile")?200:100;bi(r,[{opacity:0},{opacity:1}],{duration:i}),va("mobile")&&bi(r.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:i})},onExit:(r,i)=>{const o=va("mobile")?200:100,s=bi(r,[{opacity:1},{opacity:0}],{duration:o});if(va("mobile")){const a=bi(r.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:o});Promise.all([s.finished,a.finished]).then(i)}else s.finished.then(i)},get children(){return _(Ye,{get when(){return e.opened},get children(){return _(AC,Ei({"data-tc-modal":"true"},n,{get children(){const r=WC.cloneNode(!0);return zl(FC,r,()=>({isEnabled:e.enableAndroidBackHandler,onClose:()=>e.onClose()})),zl(UC,r,()=>()=>e.onClose()),zl($C,r,()=>()=>e.onClose()),Xn(r,_(OC,{get class(){return e.class},get children(){return[_(RC,{icon:"close",onClick:()=>e.onClose()}),ve(()=>e.children)]}}),null),Xn(r,_(Ye,{get when(){return e.onClickQuestion},get children(){return _(DC,{get children(){return[_(LS,{}),_(IC,{get onClick(){return e.onClickQuestion},icon:"question"})]}})}}),null),ht(()=>fg(r,uf(LC,so` + border-radius: ${ka[t.borderRadius]}; background-color: ${t.colors.background.tint}; ${Ir("mobile")} { - border-radius: ${Sa[t.borderRadius]} - ${Sa[t.borderRadius]} 0 0; + border-radius: ${ka[t.borderRadius]} + ${ka[t.borderRadius]} 0 0; } - `))),r}}))}})}})},FC={m:"22px",s:"12px",none:"0"},BC={m:"18px",s:"8px",none:"0"},jC=V.div` + `))),r}}))}})}})},BC={m:"22px",s:"12px",none:"0"},jC={m:"18px",s:"8px",none:"0"},HC=V.div` display: grid; grid-template: 1fr / 1fr 1fr; width: fit-content; @@ -242,10 +242,10 @@ PERFORMANCE OF THIS SOFTWARE. position: relative; padding: 4px; - border-radius: ${e=>FC[e.theme.borderRadius]}; + border-radius: ${e=>BC[e.theme.borderRadius]}; background-color: ${e=>e.theme.colors.background.secondary}; -`,HC=V.div` +`,zC=V.div` position: absolute; top: 4px; left: 4px; @@ -253,15 +253,15 @@ PERFORMANCE OF THIS SOFTWARE. height: calc(100% - 8px); width: calc(50% - 4px); - border-radius: ${e=>BC[e.theme.borderRadius]}; + border-radius: ${e=>jC[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; -`,tv=V.input` +`,nv=V.input` display: none; -`,nv=V.label` +`,rv=V.label` padding: 9px 12px; z-index: 1; @@ -276,7 +276,7 @@ PERFORMANCE OF THIS SOFTWARE. > * { ${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`} } -`,zC=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return _(jC,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[_(HC,{get right(){return e.selectedTabIndex===1}}),_(nv,{get isActive(){return e.selectedTabIndex===0},get children(){return[_(tv,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,0)}}),ve(()=>e.tab1)]}}),_(nv,{get isActive(){return e.selectedTabIndex===1},get children(){return[_(tv,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,1)}}),ve(()=>e.tab2)]}})]}})},VC={m:"16px",s:"12px",none:"0"},YC={m:"12px",s:"8px",none:"0"},y4=256,I0=60,rv=48,iv=24,ff=V.div` +`,VC=e=>{const t="tabBar"+Math.floor(Math.random()*1e4);return _(HC,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[_(zC,{get right(){return e.selectedTabIndex===1}}),_(rv,{get isActive(){return e.selectedTabIndex===0},get children(){return[_(nv,{type:"radio",name:t,get checked(){return e.selectedTabIndex===0},onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,0)}}),ve(()=>e.tab1)]}}),_(rv,{get isActive(){return e.selectedTabIndex===1},get children(){return[_(nv,{type:"radio",get checked(){return e.selectedTabIndex===1},name:t,onInput:()=>{var n;return(n=e.onSelectedTabIndexChange)==null?void 0:n.call(e,1)}}),ve(()=>e.tab2)]}})]}})},YC={m:"16px",s:"12px",none:"0"},KC={m:"12px",s:"8px",none:"0"},w4=256,N0=60,iv=48,ov=24,df=V.div` width: 52px; height: 52px; background: transparent; @@ -288,42 +288,42 @@ PERFORMANCE OF THIS SOFTWARE. align-items: center; justify-content: center; transition: transform 0.125s ease-in-out; -`,KC=V.button` +`,qC=V.button` display: flex; align-items: center; position: relative; background-color: ${e=>e.theme.colors.background.qr}; - border-radius: ${e=>VC[e.theme.borderRadius]}; - padding: ${Mi(iv)} 0; - height: ${Mi(y4+iv*2)}; + border-radius: ${e=>YC[e.theme.borderRadius]}; + padding: ${Mi(ov)} 0; + height: ${Mi(w4+ov*2)}; width: 100%; overflow: hidden; cursor: pointer; border: none; - ${Kc} { + ${qc} { &:hover { - ${ff.class} { + ${df.class} { transform: scale(1.04); } } } &:active { - ${ff.class} { + ${df.class} { transform: scale(0.96); } } - ${Yc} { + ${Kc} { &:active { - ${ff.class} { + ${df.class} { transform: scale(0.92); } } } -`,qC=V.div` +`,GC=V.div` position: relative; width: fit-content; @@ -342,21 +342,21 @@ PERFORMANCE OF THIS SOFTWARE. path { fill: ${e=>e.theme.colors.constant.black}; } -`,GC=V.div` +`,ZC=V.div` position: absolute; - width: ${Mi(I0)}; - height: ${Mi(I0)}; + width: ${Mi(N0)}; + height: ${Mi(N0)}; background: ${e=>e.theme.colors.background.qr}; display: flex; align-items: center; justify-content: center; -`,ZC=V(Hs)` +`,QC=V(zs)` width: ${e=>Mi(e.size)}; height: ${e=>Mi(e.size)}; - border-radius: ${e=>YC[e.theme.borderRadius]}; + border-radius: ${e=>KC[e.theme.borderRadius]}; background-color: ${e=>e.theme.colors.background.qr}; -`,QC=V.div` +`,JC=V.div` position: absolute; bottom: 14px; left: 50%; @@ -371,16 +371,16 @@ PERFORMANCE OF THIS SOFTWARE. filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); background-color: ${e=>e.theme.colors.background.segment}; -`;var w4={exports:{}};(function(e,t){var n=function(){var r=function(E,O){var T=236,P=17,L=E,W=o[O],I=null,R=0,G=null,Z=[],Y={},fe=function(K,q){R=L*4+17,I=function(B){for(var te=new Array(B),ne=0;ne=7&&Ze(K),G==null&&(G=Pe(L,W,Z)),st(G,q)},Ce=function(K,q){for(var B=-1;B<=7;B+=1)if(!(K+B<=-1||R<=K+B))for(var te=-1;te<=7;te+=1)q+te<=-1||R<=q+te||(0<=B&&B<=6&&(te==0||te==6)||0<=te&&te<=6&&(B==0||B==6)||2<=B&&B<=4&&2<=te&&te<=4?I[K+B][q+te]=!0:I[K+B][q+te]=!1)},Q=function(){for(var K=0,q=0,B=0;B<8;B+=1){fe(!0,B);var te=a.getLostPoint(Y);(B==0||K>te)&&(K=te,q=B)}return q},ue=function(){for(var K=8;K>B&1)==1;I[Math.floor(B/3)][B%3+R-8-3]=te}for(var B=0;B<18;B+=1){var te=!K&&(q>>B&1)==1;I[B%3+R-8-3][Math.floor(B/3)]=te}},je=function(K,q){for(var B=W<<3|q,te=a.getBCHTypeInfo(B),ne=0;ne<15;ne+=1){var ie=!K&&(te>>ne&1)==1;ne<6?I[ne][8]=ie:ne<8?I[ne+1][8]=ie:I[R-15+ne][8]=ie}for(var ne=0;ne<15;ne+=1){var ie=!K&&(te>>ne&1)==1;ne<8?I[8][R-ne-1]=ie:ne<9?I[8][15-ne-1+1]=ie:I[8][15-ne-1]=ie}I[R-8][8]=!K},st=function(K,q){for(var B=-1,te=R-1,ne=7,ie=0,Te=a.getMaskFunction(q),Ae=R-1;Ae>0;Ae-=2)for(Ae==6&&(Ae-=1);;){for(var Xe=0;Xe<2;Xe+=1)if(I[te][Ae-Xe]==null){var Dt=!1;ie>>ne&1)==1);var We=Te(te,Ae-Xe);We&&(Dt=!Dt),I[te][Ae-Xe]=Dt,ne-=1,ne==-1&&(ie+=1,ne=7)}if(te+=B,te<0||R<=te){te-=B,B=-B;break}}},ft=function(K,q){for(var B=0,te=0,ne=0,ie=new Array(q.length),Te=new Array(q.length),Ae=0;Ae=0?dr.getAt(Cn):0}}for(var En=0,We=0;WeAe*8)throw"code length overflow. ("+ne.getLengthInBits()+">"+Ae*8+")";for(ne.getLengthInBits()+4<=Ae*8&&ne.put(0,4);ne.getLengthInBits()%8!=0;)ne.putBit(!1);for(;!(ne.getLengthInBits()>=Ae*8||(ne.put(T,8),ne.getLengthInBits()>=Ae*8));)ne.put(P,8);return ft(ne,te)};Y.addData=function(K,q){q=q||"Byte";var B=null;switch(q){case"Numeric":B=h(K);break;case"Alphanumeric":B=g(K);break;case"Byte":B=m(K);break;case"Kanji":B=y(K);break;default:throw"mode:"+q}Z.push(B),G=null},Y.isDark=function(K,q){if(K<0||R<=K||q<0||R<=q)throw K+","+q;return I[K][q]},Y.getModuleCount=function(){return R},Y.make=function(){if(L<1){for(var K=1;K<40;K++){for(var q=u.getRSBlocks(K,W),B=d(),te=0;te"u"?K*4:q;var B="";B+='";for(var ne=0;ne';B+=""}return B+="",B+="
",B},Y.createSvgTag=function(K,q,B,te){var ne={};typeof arguments[0]=="object"&&(ne=arguments[0],K=ne.cellSize,q=ne.margin,B=ne.alt,te=ne.title),K=K||2,q=typeof q>"u"?K*4:q,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-description":null,te=typeof te=="string"?{text:te}:te||{},te.text=te.text||null,te.id=te.text?te.id||"qrcode-title":null;var ie=Y.getModuleCount()*K+q*2,Te,Ae,Xe,Dt,We="",Qt;for(Qt="l"+K+",0 0,"+K+" -"+K+",0 0,-"+K+"z ",We+=''+tt(te.text)+"":"",We+=B.text?''+tt(B.text)+"":"",We+='',We+='"u"?K*4:q;var B=Y.getModuleCount()*K+q*2,te=q,ne=B-q;return M(B,B,function(ie,Te){if(te<=ie&&ie"u"?K*4:q;var te=Y.getModuleCount()*K+q*2,ne="";return ne+="",ne};var tt=function(K){for(var q="",B=0;B":q+=">";break;case"&":q+="&";break;case'"':q+=""";break;default:q+=te;break}}return q},rr=function(K){var q=1;K=typeof K>"u"?q*2:K;var B=Y.getModuleCount()*q+K*2,te=K,ne=B-K,ie,Te,Ae,Xe,Dt,We={"██":"█","█ ":"▀"," █":"▄"," ":" "},Qt={"██":"▀","█ ":"▀"," █":" "," ":" "},ln="";for(ie=0;ie=ne?Qt[Dt]:We[Dt];ln+=` -`}return B%2&&K>0?ln.substring(0,ln.length-B-1)+Array(B+1).join("▀"):ln.substring(0,ln.length-1)};return Y.createASCII=function(K,q){if(K=K||1,K<2)return rr(q);K-=1,q=typeof q>"u"?K*2:q;var B=Y.getModuleCount()*K+q*2,te=q,ne=B-q,ie,Te,Ae,Xe,Dt=Array(K+1).join("██"),We=Array(K+1).join(" "),Qt="",ln="";for(ie=0;ie>>8),W.push(G&255)):W.push(P)}}return W}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},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},a=function(){var E=[[],[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]],O=1335,T=7973,P=21522,L={},W=function(I){for(var R=0;I!=0;)R+=1,I>>>=1;return R};return L.getBCHTypeInfo=function(I){for(var R=I<<10;W(R)-W(O)>=0;)R^=O<=0;)R^=T<5&&(G+=3+fe-5)}for(var Z=0;Z=256;)L-=255;return E[L]},P}();function c(E,O){if(typeof E.length>"u")throw E.length+"/"+O;var T=function(){for(var L=0;L"u")throw"bad rs block @ typeNumber:"+L+"/errorCorrectionLevel:"+W;for(var R=I.length/3,G=[],Z=0;Z>>7-P%8&1)==1},T.put=function(P,L){for(var W=0;W>>L-W-1&1)==1)},T.getLengthInBits=function(){return O},T.putBit=function(P){var L=Math.floor(O/8);E.length<=L&&E.push(0),P&&(E[L]|=128>>>O%8),O+=1},T},h=function(E){var O=i.MODE_NUMBER,T=E,P={};P.getMode=function(){return O},P.getLength=function(I){return T.length},P.write=function(I){for(var R=T,G=0;G+2>>8&255)*192+(G&255),W.put(G,13),R+=2}if(R>>8)},O.writeBytes=function(T,P,L){P=P||0,L=L||T.length;for(var W=0;W0&&(T+=","),T+=E[P];return T+="]",T},O},C=function(){var E=0,O=0,T=0,P="",L={},W=function(R){P+=String.fromCharCode(I(R&63))},I=function(R){if(!(R<0)){if(R<26)return 65+R;if(R<52)return 97+(R-26);if(R<62)return 48+(R-52);if(R==62)return 43;if(R==63)return 47}throw"n:"+R};return L.writeByte=function(R){for(E=E<<8|R&255,O+=8,T+=1;O>=6;)W(E>>>O-6),O-=6},L.flush=function(){if(O>0&&(W(E<<6-O),E=0,O=0),T%3!=0)for(var R=3-T%3,G=0;G=O.length){if(L==0)return-1;throw"unexpected end of file./"+L}var R=O.charAt(T);if(T+=1,R=="=")return L=0,-1;if(R.match(/^\s$/))continue;P=P<<6|I(R.charCodeAt(0)),L+=6}var G=P>>>L-8&255;return L-=8,G};var I=function(R){if(65<=R&&R<=90)return R-65;if(97<=R&&R<=122)return R-97+26;if(48<=R&&R<=57)return R-48+52;if(R==43)return 62;if(R==47)return 63;throw"c:"+R};return W},w=function(E,O){var T=E,P=O,L=new Array(E*O),W={};W.setPixel=function(Z,Y,fe){L[Y*T+Z]=fe},W.write=function(Z){Z.writeString("GIF87a"),Z.writeShort(T),Z.writeShort(P),Z.writeByte(128),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(255),Z.writeByte(255),Z.writeByte(255),Z.writeString(","),Z.writeShort(0),Z.writeShort(0),Z.writeShort(T),Z.writeShort(P),Z.writeByte(0);var Y=2,fe=R(Y);Z.writeByte(Y);for(var Ce=0;fe.length-Ce>255;)Z.writeByte(255),Z.writeBytes(fe,Ce,255),Ce+=255;Z.writeByte(fe.length-Ce),Z.writeBytes(fe,Ce,fe.length-Ce),Z.writeByte(0),Z.writeString(";")};var I=function(Z){var Y=Z,fe=0,Ce=0,Q={};return Q.write=function(ue,ge){if(ue>>>ge)throw"length over";for(;fe+ge>=8;)Y.writeByte(255&(ue<>>=8-fe,Ce=0,fe=0;Ce=ue<0&&Y.writeByte(Ce)},Q},R=function(Z){for(var Y=1<>6,128|l&63):l<55296||l>=57344?s.push(224|l>>12,128|l>>6&63,128|l&63):(a++,l=65536+((l&1023)<<10|o.charCodeAt(a)&1023),s.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return s}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(w4);const JC=w4.exports;function xg(e){return At(this,null,function*(){try{if(!(navigator!=null&&navigator.clipboard))throw new vn("Clipboard API not available");return yield navigator.clipboard.writeText(e)}catch{}XC(e)})}function XC(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)}}const eS=gt("
"),nh=e=>{let t,n,r;const[i,o]=Be(!1),[s,a]=Be(rv);$n(()=>{const h=JC(0,"L");h.addData(e.sourceUrl),h.make(),t.innerHTML=h.createSvgTag(4,0);const g=t.firstElementChild.clientWidth,m=Math.round(y4/g*1e5)/1e5;if(r){const y=Math.ceil(I0/(m*4))*4,k=Mi(Math.ceil((g-y)/(2*4))*4);r.style.top=k,r.style.left=k,r.style.height=Mi(y),r.style.width=Mi(y),a(Math.round(rv/m))}n.style.transform=`scale(${m})`});let l=null;return _(KC,{get class(){return e.class},onClick:()=>{o(!0),xg(e.sourceUrl),l!=null&&clearTimeout(l),l=setTimeout(()=>o(!1),1500)},get children(){return[_(qC,{ref(u){const d=n;typeof d=="function"?d(u):n=u},get children(){return[(()=>{const u=eS.cloneNode(!0),d=t;return typeof d=="function"?Hl(d,u):t=u,u})(),_(Ye,{get when(){return e.imageUrl},get children(){return _(GC,{ref(u){const d=r;typeof d=="function"?d(u):r=u},get children(){return _(ZC,{get src(){return e.imageUrl},alt:"",get size(){return s()}})}})}})]}}),_(wg,{onBeforeEnter:u=>{bi(u,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(u,d)=>{bi(u,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{d()})},get children(){return _(Ye,{get when(){return i()&&!e.disableCopy},get children(){return _(QC,{get children(){return[_(_g,{size:"xs"}),_(Or,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),_(Ye,{get when(){return!e.disableCopy},get children(){return _(ff,{get children(){return _(_4,{})}})}})]}})};var N0=(e,t,n)=>{const r=t.trim().split(".").reduce((i,o)=>i?i[o]:void 0,e);return r!==void 0?r:n},tS=(e,t,n=/{{(.*?)}}/g)=>e.replace(n,(r,i)=>N0(t,i,"")),nS=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[n,r]=Be(t),[i,o]=mg(e);return[(l,c,u)=>{const d=N0(i[n()],l,u||"");return typeof d=="function"?d(c):typeof d=="string"?tS(d,c||{}):d},{add(l,c){o(l,u=>Object.assign(u||{},c))},locale:l=>l?r(l):n(),dict:l=>N0(i,l)}]},x4=Jd({}),Oi=()=>cr(x4);const rS=V.div` +`;var x4={exports:{}};(function(e,t){var n=function(){var r=function(E,O){var T=236,P=17,L=E,W=o[O],I=null,R=0,G=null,Z=[],Y={},fe=function(K,q){R=L*4+17,I=function(B){for(var te=new Array(B),ne=0;ne=7&&Ze(K),G==null&&(G=Pe(L,W,Z)),st(G,q)},Ce=function(K,q){for(var B=-1;B<=7;B+=1)if(!(K+B<=-1||R<=K+B))for(var te=-1;te<=7;te+=1)q+te<=-1||R<=q+te||(0<=B&&B<=6&&(te==0||te==6)||0<=te&&te<=6&&(B==0||B==6)||2<=B&&B<=4&&2<=te&&te<=4?I[K+B][q+te]=!0:I[K+B][q+te]=!1)},Q=function(){for(var K=0,q=0,B=0;B<8;B+=1){fe(!0,B);var te=a.getLostPoint(Y);(B==0||K>te)&&(K=te,q=B)}return q},ue=function(){for(var K=8;K>B&1)==1;I[Math.floor(B/3)][B%3+R-8-3]=te}for(var B=0;B<18;B+=1){var te=!K&&(q>>B&1)==1;I[B%3+R-8-3][Math.floor(B/3)]=te}},je=function(K,q){for(var B=W<<3|q,te=a.getBCHTypeInfo(B),ne=0;ne<15;ne+=1){var ie=!K&&(te>>ne&1)==1;ne<6?I[ne][8]=ie:ne<8?I[ne+1][8]=ie:I[R-15+ne][8]=ie}for(var ne=0;ne<15;ne+=1){var ie=!K&&(te>>ne&1)==1;ne<8?I[8][R-ne-1]=ie:ne<9?I[8][15-ne-1+1]=ie:I[8][15-ne-1]=ie}I[R-8][8]=!K},st=function(K,q){for(var B=-1,te=R-1,ne=7,ie=0,Te=a.getMaskFunction(q),Ae=R-1;Ae>0;Ae-=2)for(Ae==6&&(Ae-=1);;){for(var Xe=0;Xe<2;Xe+=1)if(I[te][Ae-Xe]==null){var It=!1;ie>>ne&1)==1);var We=Te(te,Ae-Xe);We&&(It=!It),I[te][Ae-Xe]=It,ne-=1,ne==-1&&(ie+=1,ne=7)}if(te+=B,te<0||R<=te){te-=B,B=-B;break}}},ft=function(K,q){for(var B=0,te=0,ne=0,ie=new Array(q.length),Te=new Array(q.length),Ae=0;Ae=0?dr.getAt(_n):0}}for(var En=0,We=0;WeAe*8)throw"code length overflow. ("+ne.getLengthInBits()+">"+Ae*8+")";for(ne.getLengthInBits()+4<=Ae*8&&ne.put(0,4);ne.getLengthInBits()%8!=0;)ne.putBit(!1);for(;!(ne.getLengthInBits()>=Ae*8||(ne.put(T,8),ne.getLengthInBits()>=Ae*8));)ne.put(P,8);return ft(ne,te)};Y.addData=function(K,q){q=q||"Byte";var B=null;switch(q){case"Numeric":B=h(K);break;case"Alphanumeric":B=g(K);break;case"Byte":B=m(K);break;case"Kanji":B=y(K);break;default:throw"mode:"+q}Z.push(B),G=null},Y.isDark=function(K,q){if(K<0||R<=K||q<0||R<=q)throw K+","+q;return I[K][q]},Y.getModuleCount=function(){return R},Y.make=function(){if(L<1){for(var K=1;K<40;K++){for(var q=u.getRSBlocks(K,W),B=d(),te=0;te"u"?K*4:q;var B="";B+='";for(var ne=0;ne';B+=""}return B+="",B+="
",B},Y.createSvgTag=function(K,q,B,te){var ne={};typeof arguments[0]=="object"&&(ne=arguments[0],K=ne.cellSize,q=ne.margin,B=ne.alt,te=ne.title),K=K||2,q=typeof q>"u"?K*4:q,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-description":null,te=typeof te=="string"?{text:te}:te||{},te.text=te.text||null,te.id=te.text?te.id||"qrcode-title":null;var ie=Y.getModuleCount()*K+q*2,Te,Ae,Xe,It,We="",Zt;for(Zt="l"+K+",0 0,"+K+" -"+K+",0 0,-"+K+"z ",We+=''+tt(te.text)+"":"",We+=B.text?''+tt(B.text)+"":"",We+='',We+='"u"?K*4:q;var B=Y.getModuleCount()*K+q*2,te=q,ne=B-q;return M(B,B,function(ie,Te){if(te<=ie&&ie"u"?K*4:q;var te=Y.getModuleCount()*K+q*2,ne="";return ne+="",ne};var tt=function(K){for(var q="",B=0;B":q+=">";break;case"&":q+="&";break;case'"':q+=""";break;default:q+=te;break}}return q},rr=function(K){var q=1;K=typeof K>"u"?q*2:K;var B=Y.getModuleCount()*q+K*2,te=K,ne=B-K,ie,Te,Ae,Xe,It,We={"██":"█","█ ":"▀"," █":"▄"," ":" "},Zt={"██":"▀","█ ":"▀"," █":" "," ":" "},ln="";for(ie=0;ie=ne?Zt[It]:We[It];ln+=` +`}return B%2&&K>0?ln.substring(0,ln.length-B-1)+Array(B+1).join("▀"):ln.substring(0,ln.length-1)};return Y.createASCII=function(K,q){if(K=K||1,K<2)return rr(q);K-=1,q=typeof q>"u"?K*2:q;var B=Y.getModuleCount()*K+q*2,te=q,ne=B-q,ie,Te,Ae,Xe,It=Array(K+1).join("██"),We=Array(K+1).join(" "),Zt="",ln="";for(ie=0;ie>>8),W.push(G&255)):W.push(P)}}return W}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},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},a=function(){var E=[[],[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]],O=1335,T=7973,P=21522,L={},W=function(I){for(var R=0;I!=0;)R+=1,I>>>=1;return R};return L.getBCHTypeInfo=function(I){for(var R=I<<10;W(R)-W(O)>=0;)R^=O<=0;)R^=T<5&&(G+=3+fe-5)}for(var Z=0;Z=256;)L-=255;return E[L]},P}();function c(E,O){if(typeof E.length>"u")throw E.length+"/"+O;var T=function(){for(var L=0;L"u")throw"bad rs block @ typeNumber:"+L+"/errorCorrectionLevel:"+W;for(var R=I.length/3,G=[],Z=0;Z>>7-P%8&1)==1},T.put=function(P,L){for(var W=0;W>>L-W-1&1)==1)},T.getLengthInBits=function(){return O},T.putBit=function(P){var L=Math.floor(O/8);E.length<=L&&E.push(0),P&&(E[L]|=128>>>O%8),O+=1},T},h=function(E){var O=i.MODE_NUMBER,T=E,P={};P.getMode=function(){return O},P.getLength=function(I){return T.length},P.write=function(I){for(var R=T,G=0;G+2>>8&255)*192+(G&255),W.put(G,13),R+=2}if(R>>8)},O.writeBytes=function(T,P,L){P=P||0,L=L||T.length;for(var W=0;W0&&(T+=","),T+=E[P];return T+="]",T},O},C=function(){var E=0,O=0,T=0,P="",L={},W=function(R){P+=String.fromCharCode(I(R&63))},I=function(R){if(!(R<0)){if(R<26)return 65+R;if(R<52)return 97+(R-26);if(R<62)return 48+(R-52);if(R==62)return 43;if(R==63)return 47}throw"n:"+R};return L.writeByte=function(R){for(E=E<<8|R&255,O+=8,T+=1;O>=6;)W(E>>>O-6),O-=6},L.flush=function(){if(O>0&&(W(E<<6-O),E=0,O=0),T%3!=0)for(var R=3-T%3,G=0;G=O.length){if(L==0)return-1;throw"unexpected end of file./"+L}var R=O.charAt(T);if(T+=1,R=="=")return L=0,-1;if(R.match(/^\s$/))continue;P=P<<6|I(R.charCodeAt(0)),L+=6}var G=P>>>L-8&255;return L-=8,G};var I=function(R){if(65<=R&&R<=90)return R-65;if(97<=R&&R<=122)return R-97+26;if(48<=R&&R<=57)return R-48+52;if(R==43)return 62;if(R==47)return 63;throw"c:"+R};return W},w=function(E,O){var T=E,P=O,L=new Array(E*O),W={};W.setPixel=function(Z,Y,fe){L[Y*T+Z]=fe},W.write=function(Z){Z.writeString("GIF87a"),Z.writeShort(T),Z.writeShort(P),Z.writeByte(128),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(0),Z.writeByte(255),Z.writeByte(255),Z.writeByte(255),Z.writeString(","),Z.writeShort(0),Z.writeShort(0),Z.writeShort(T),Z.writeShort(P),Z.writeByte(0);var Y=2,fe=R(Y);Z.writeByte(Y);for(var Ce=0;fe.length-Ce>255;)Z.writeByte(255),Z.writeBytes(fe,Ce,255),Ce+=255;Z.writeByte(fe.length-Ce),Z.writeBytes(fe,Ce,fe.length-Ce),Z.writeByte(0),Z.writeString(";")};var I=function(Z){var Y=Z,fe=0,Ce=0,Q={};return Q.write=function(ue,ge){if(ue>>>ge)throw"length over";for(;fe+ge>=8;)Y.writeByte(255&(ue<>>=8-fe,Ce=0,fe=0;Ce=ue<0&&Y.writeByte(Ce)},Q},R=function(Z){for(var Y=1<>6,128|l&63):l<55296||l>=57344?s.push(224|l>>12,128|l>>6&63,128|l&63):(a++,l=65536+((l&1023)<<10|o.charCodeAt(a)&1023),s.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return s}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(x4);const XC=x4.exports;function bg(e){return Lt(this,null,function*(){try{if(!(navigator!=null&&navigator.clipboard))throw new vn("Clipboard API not available");return yield navigator.clipboard.writeText(e)}catch{}eS(e)})}function eS(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)}}const tS=mt("
"),rh=e=>{let t,n,r;const[i,o]=Be(!1),[s,a]=Be(iv);$n(()=>{const h=XC(0,"L");h.addData(e.sourceUrl),h.make(),t.innerHTML=h.createSvgTag(4,0);const g=t.firstElementChild.clientWidth,m=Math.round(w4/g*1e5)/1e5;if(r){const y=Math.ceil(N0/(m*4))*4,k=Mi(Math.ceil((g-y)/(2*4))*4);r.style.top=k,r.style.left=k,r.style.height=Mi(y),r.style.width=Mi(y),a(Math.round(iv/m))}n.style.transform=`scale(${m})`});let l=null;return _(qC,{get class(){return e.class},onClick:()=>{o(!0),bg(e.sourceUrl),l!=null&&clearTimeout(l),l=setTimeout(()=>o(!1),1500)},get children(){return[_(GC,{ref(u){const d=n;typeof d=="function"?d(u):n=u},get children(){return[(()=>{const u=tS.cloneNode(!0),d=t;return typeof d=="function"?zl(d,u):t=u,u})(),_(Ye,{get when(){return e.imageUrl},get children(){return _(ZC,{ref(u){const d=r;typeof d=="function"?d(u):r=u},get children(){return _(QC,{get src(){return e.imageUrl},alt:"",get size(){return s()}})}})}})]}}),_(xg,{onBeforeEnter:u=>{bi(u,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(u,d)=>{bi(u,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{d()})},get children(){return _(Ye,{get when(){return i()&&!e.disableCopy},get children(){return _(JC,{get children(){return[_(Cg,{size:"xs"}),_(Or,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),_(Ye,{get when(){return!e.disableCopy},get children(){return _(df,{get children(){return _(C4,{})}})}})]}})};var W0=(e,t,n)=>{const r=t.trim().split(".").reduce((i,o)=>i?i[o]:void 0,e);return r!==void 0?r:n},nS=(e,t,n=/{{(.*?)}}/g)=>e.replace(n,(r,i)=>W0(t,i,"")),rS=(e={},t=navigator.language in e?navigator.language:Object.keys(e)[0])=>{const[n,r]=Be(t),[i,o]=vg(e);return[(l,c,u)=>{const d=W0(i[n()],l,u||"");return typeof d=="function"?d(c):typeof d=="string"?nS(d,c||{}):d},{add(l,c){o(l,u=>Object.assign(u||{},c))},locale:l=>l?r(l):n(),dict:l=>W0(i,l)}]},b4=Xd({}),Oi=()=>cr(b4);const iS=V.div` font-style: normal; font-weight: ${e=>e.fontWeight}; font-size: ${e=>e.fontSize}; line-height: ${e=>e.lineHeight}; color: ${e=>e.color}; -`,Or=e=>{const t=Ft(),[n]=Oi();let r;const i=()=>e.color||t.colors.text.primary,o=Ei({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return $n(()=>{r&&o.cursor!=="unset"&&getComputedStyle(r).cursor!=="pointer"&&(r.style.cursor="default")}),_(rS,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return i()},get class(){return o.class},ref(s){const a=r;typeof a=="function"?a(s):r=s},"data-tc-text":"true",get children(){var s;return ve(()=>!!o.translationKey)()?n(o.translationKey,o.translationValues,(s=o.children)==null?void 0:s.toString()):o.children}})},iS=V.div` +`,Or=e=>{const t=Bt(),[n]=Oi();let r;const i=()=>e.color||t.colors.text.primary,o=Ei({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return $n(()=>{r&&o.cursor!=="unset"&&getComputedStyle(r).cursor!=="pointer"&&(r.style.cursor="default")}),_(iS,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return i()},get class(){return o.class},ref(s){const a=r;typeof a=="function"?a(s):r=s},"data-tc-text":"true",get children(){var s;return ve(()=>!!o.translationKey)()?n(o.translationKey,o.translationValues,(s=o.children)==null?void 0:s.toString()):o.children}})},oS=V.div` position: relative; &::after { @@ -395,11 +395,11 @@ PERFORMANCE OF THIS SOFTWARE. border-radius: inherit; } -`,oS=V(Hs)` +`,sS=V(zs)` width: 100%; height: 100%; border-radius: inherit; -`,b4=e=>_(iS,{get class(){return e.class},get children(){return _(oS,{get src(){return e.src}})}}),sS={m:"16px",s:"12px",none:"0"},aS={m:"6px",s:"6px",none:"0"},lS=V.button` +`,_4=e=>_(oS,{get class(){return e.class},get children(){return _(sS,{get src(){return e.src}})}}),aS={m:"16px",s:"12px",none:"0"},lS={m:"6px",s:"6px",none:"0"},cS=V.button` position: relative; cursor: pointer; border: none; @@ -412,7 +412,7 @@ PERFORMANCE OF THIS SOFTWARE. transition: transform 0.125s ease-in-out; - ${Kc} { + ${qc} { &:hover { transform: scale(1.04); } @@ -427,26 +427,26 @@ PERFORMANCE OF THIS SOFTWARE. width: 82px; } - ${Yc} { + ${Kc} { &:active { transform: scale(0.92); } } -`,cS=V(b4)` +`,uS=V(_4)` width: 60px; height: 60px; - border-radius: ${e=>sS[e.theme.borderRadius]}; + border-radius: ${e=>aS[e.theme.borderRadius]}; margin-bottom: 8px; -`,uS=V(Hs)` +`,fS=V(zs)` position: absolute; right: 10px; top: 50px; width: 24px; height: 24px; - border-radius: ${e=>aS[e.theme.borderRadius]}; + border-radius: ${e=>lS[e.theme.borderRadius]}; box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08); -`,fS=V(Or)` +`,dS=V(Or)` max-width: 90px; font-weight: 590; white-space: nowrap; @@ -456,7 +456,7 @@ PERFORMANCE OF THIS SOFTWARE. ${Ir("mobile")} { max-width: 80px; } -`,dS=V(Or)` +`,hS=V(Or)` font-weight: 510; max-width: 90px; white-space: nowrap; @@ -467,7 +467,7 @@ PERFORMANCE OF THIS SOFTWARE. ${Ir("mobile")} { max-width: 80px; } -`,ld=e=>_(lS,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[ve(()=>ve(()=>typeof e.icon=="string")()?_(cS,{get src(){return e.icon}}):e.icon),ve(()=>ve(()=>!!e.badgeUrl)()&&_(uS,{get src(){return e.badgeUrl}})),_(fS,{get children(){return e.name}}),ve(()=>ve(()=>!!e.secondLine)()&&_(dS,{get colorPrimary(){var t;return(t=e.secondLineColorPrimary)!=null?t:!0},get children(){return e.secondLine}}))]}}),hS=V.h1` +`,cd=e=>_(cS,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[ve(()=>ve(()=>typeof e.icon=="string")()?_(uS,{get src(){return e.icon}}):e.icon),ve(()=>ve(()=>!!e.badgeUrl)()&&_(fS,{get src(){return e.badgeUrl}})),_(dS,{get children(){return e.name}}),ve(()=>ve(()=>!!e.secondLine)()&&_(hS,{get colorPrimary(){var t;return(t=e.secondLineColorPrimary)!=null?t:!0},get children(){return e.secondLine}}))]}}),pS=V.h1` font-style: normal; font-weight: 700; font-size: 20px; @@ -481,7 +481,7 @@ PERFORMANCE OF THIS SOFTWARE. margin-bottom: 0; cursor: default; -`,Ri=e=>{const[t]=Oi();return _(hS,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},pS=V.h2` +`,Ri=e=>{const[t]=Oi();return _(pS,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},gS=V.h2` font-style: normal; font-weight: 510; font-size: 16px; @@ -495,7 +495,7 @@ PERFORMANCE OF THIS SOFTWARE. margin-bottom: 32px; cursor: default; -`,rs=e=>{const[t]=Oi();return _(pS,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},gS=V.h3` +`,rs=e=>{const[t]=Oi();return _(gS,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},mS=V.h3` font-style: normal; font-weight: 590; font-size: 16px; @@ -507,7 +507,7 @@ PERFORMANCE OF THIS SOFTWARE. margin-bottom: 0; cursor: default; -`,bg=e=>{const[t]=Oi();return _(gS,{"data-tc-h3":"true",get class(){return e.class},get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},mS=gt(''),vS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=mS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=n(),a=n();return s!==o._v$&&Oe(r,"fill",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},yS=gt(''),wS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=yS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},xS=gt(''),bS=gt(''),_S=gt(''),_g=e=>{const t=Ft(),n=()=>e.size||"s",r=()=>e.fill||t.colors.icon.success;return ve((()=>{const i=ve(()=>n()==="xs");return()=>i()?(()=>{const o=xS.cloneNode(!0),s=o.firstChild,a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$&&Oe(o,"class",c._v$=u),d!==c._v$2&&Oe(a,"fill",c._v$2=d),h!==c._v$3&&Oe(l,"stroke",c._v$3=h),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=ve(()=>n()==="s");return()=>o()?(()=>{const s=bS.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$4&&Oe(s,"class",c._v$4=u),d!==c._v$5&&Oe(a,"fill",c._v$5=d),h!==c._v$6&&Oe(l,"fill",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),s})():(()=>{const s=_S.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$7&&Oe(s,"class",c._v$7=u),d!==c._v$8&&Oe(a,"fill",c._v$8=d),h!==c._v$9&&Oe(l,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),s})()})()})())},CS=gt(''),SS=gt(''),kS=gt(''),rh=e=>{const t=Ft(),n=()=>e.size||"m",r=()=>e.fill||t.colors.icon.error;return ve((()=>{const i=ve(()=>n()==="m");return()=>i()?(()=>{const o=CS.cloneNode(!0),s=o.firstChild,a=s.nextSibling;return ht(l=>{const c=e.class,u=r(),d=t.colors.constant.white;return c!==l._v$&&Oe(o,"class",l._v$=c),u!==l._v$2&&Oe(s,"fill",l._v$2=u),d!==l._v$3&&Oe(a,"fill",l._v$3=d),l},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=ve(()=>n()==="s");return()=>o()?(()=>{const s=SS.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$4&&Oe(s,"class",c._v$4=u),d!==c._v$5&&Oe(a,"fill",c._v$5=d),h!==c._v$6&&Oe(l,"stroke",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),s})():(()=>{const s=kS.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$7&&Oe(s,"class",c._v$7=u),d!==c._v$8&&Oe(a,"fill",c._v$8=d),h!==c._v$9&&Oe(l,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),s})()})()})())},ES=gt(''),MS=gt(''),TS=gt(''),ho=e=>{const t=Ft(),n=()=>e.size||"xs",r=()=>e.fill||t.colors.icon.tertiary,i=x7` +`,_g=e=>{const[t]=Oi();return _(mS,{"data-tc-h3":"true",get class(){return e.class},get children(){var n;return ve(()=>!!e.translationKey)()?t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString()):e.children}})},vS=mt(''),yS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=vS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=n(),a=n();return s!==o._v$&&Oe(r,"fill",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},wS=mt(''),xS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=wS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},bS=mt(''),_S=mt(''),CS=mt(''),Cg=e=>{const t=Bt(),n=()=>e.size||"s",r=()=>e.fill||t.colors.icon.success;return ve((()=>{const i=ve(()=>n()==="xs");return()=>i()?(()=>{const o=bS.cloneNode(!0),s=o.firstChild,a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$&&Oe(o,"class",c._v$=u),d!==c._v$2&&Oe(a,"fill",c._v$2=d),h!==c._v$3&&Oe(l,"stroke",c._v$3=h),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=ve(()=>n()==="s");return()=>o()?(()=>{const s=_S.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$4&&Oe(s,"class",c._v$4=u),d!==c._v$5&&Oe(a,"fill",c._v$5=d),h!==c._v$6&&Oe(l,"fill",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),s})():(()=>{const s=CS.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$7&&Oe(s,"class",c._v$7=u),d!==c._v$8&&Oe(a,"fill",c._v$8=d),h!==c._v$9&&Oe(l,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),s})()})()})())},SS=mt(''),kS=mt(''),ES=mt(''),ih=e=>{const t=Bt(),n=()=>e.size||"m",r=()=>e.fill||t.colors.icon.error;return ve((()=>{const i=ve(()=>n()==="m");return()=>i()?(()=>{const o=SS.cloneNode(!0),s=o.firstChild,a=s.nextSibling;return ht(l=>{const c=e.class,u=r(),d=t.colors.constant.white;return c!==l._v$&&Oe(o,"class",l._v$=c),u!==l._v$2&&Oe(s,"fill",l._v$2=u),d!==l._v$3&&Oe(a,"fill",l._v$3=d),l},{_v$:void 0,_v$2:void 0,_v$3:void 0}),o})():(()=>{const o=ve(()=>n()==="s");return()=>o()?(()=>{const s=kS.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$4&&Oe(s,"class",c._v$4=u),d!==c._v$5&&Oe(a,"fill",c._v$5=d),h!==c._v$6&&Oe(l,"stroke",c._v$6=h),c},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),s})():(()=>{const s=ES.cloneNode(!0),a=s.firstChild,l=a.nextSibling;return ht(c=>{const u=e.class,d=r(),h=t.colors.constant.white;return u!==c._v$7&&Oe(s,"class",c._v$7=u),d!==c._v$8&&Oe(a,"fill",c._v$8=d),h!==c._v$9&&Oe(l,"fill",c._v$9=h),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),s})()})()})())},MS=mt(''),TS=mt(''),PS=mt(''),ho=e=>{const t=Bt(),n=()=>e.size||"xs",r=()=>e.fill||t.colors.icon.tertiary,i=b7` 0% { transform: rotate(0deg); } @@ -516,21 +516,21 @@ PERFORMANCE OF THIS SOFTWARE. } `,o=so` animation: ${i} 1s linear infinite; - `;return ve((()=>{const s=ve(()=>n()==="xs");return()=>s()?(()=>{const a=ES.cloneNode(!0),l=a.firstChild;return ht(c=>{const u=cf(o,e.class),d=r();return u!==c._v$&&Oe(a,"class",c._v$=u),d!==c._v$2&&Oe(l,"fill",c._v$2=d),c},{_v$:void 0,_v$2:void 0}),a})():(()=>{const a=ve(()=>n()==="s");return()=>a()?(()=>{const l=MS.cloneNode(!0),c=l.firstChild;return ht(u=>{const d=cf(o,e.class),h=r();return d!==u._v$3&&Oe(l,"class",u._v$3=d),h!==u._v$4&&Oe(c,"fill",u._v$4=h),u},{_v$3:void 0,_v$4:void 0}),l})():(()=>{const l=TS.cloneNode(!0),c=l.firstChild;return ht(u=>{const d=cf(o,e.class),h=r();return d!==u._v$5&&Oe(l,"class",u._v$5=d),h!==u._v$6&&Oe(c,"stroke",u._v$6=h),u},{_v$5:void 0,_v$6:void 0}),l})()})()})())},PS=gt(''),AS=()=>{const e=Ft(),t=()=>e.theme===en.DARK?e.colors.constant.white:e.colors.constant.black;return(()=>{const n=PS.cloneNode(!0),r=n.firstChild,i=r.nextSibling,o=i.nextSibling;return ht(()=>Oe(o,"fill",t())),n})()},LS=gt(''),OS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=LS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},RS=gt(''),DS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=RS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},IS=gt(''),NS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=IS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},WS=gt(''),$S=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=WS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},US=gt(''),zl=e=>{const t=Ft(),n=()=>e.fill||t.colors.accent;return(()=>{const r=US.cloneNode(!0),i=r.firstChild,o=i.firstChild;return ht(()=>Oe(o,"fill",n())),r})()},FS=gt(''),ov=e=>{const t=Ft(),n=()=>e.fill||t.colors.accent;return(()=>{const r=FS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},BS=gt(''),jS=e=>{const t=Ft(),n=()=>e.fill||t.colors.accent;return(()=>{const r=BS.cloneNode(!0),i=r.firstChild,o=i.firstChild;return ht(()=>Oe(o,"fill",n())),r})()},HS=gt(''),zS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=HS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},VS=gt(''),YS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=VS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},KS=gt(''),qS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=KS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},GS=gt(''),ZS=e=>{const t=Ft(),n=()=>e.fill||t.colors.constant.white;return(()=>{const r=GS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},QS=gt(''),JS=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=QS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},XS=gt(''),_4=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=XS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=n(),a=n();return s!==o._v$&&Oe(r,"fill",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},ek=gt(''),W0=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=ek.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},tk={m:"16px",s:"12px",none:"0"},nk={m:"6px",s:"6px",none:"0"},rk=V.div` + `;return ve((()=>{const s=ve(()=>n()==="xs");return()=>s()?(()=>{const a=MS.cloneNode(!0),l=a.firstChild;return ht(c=>{const u=uf(o,e.class),d=r();return u!==c._v$&&Oe(a,"class",c._v$=u),d!==c._v$2&&Oe(l,"fill",c._v$2=d),c},{_v$:void 0,_v$2:void 0}),a})():(()=>{const a=ve(()=>n()==="s");return()=>a()?(()=>{const l=TS.cloneNode(!0),c=l.firstChild;return ht(u=>{const d=uf(o,e.class),h=r();return d!==u._v$3&&Oe(l,"class",u._v$3=d),h!==u._v$4&&Oe(c,"fill",u._v$4=h),u},{_v$3:void 0,_v$4:void 0}),l})():(()=>{const l=PS.cloneNode(!0),c=l.firstChild;return ht(u=>{const d=uf(o,e.class),h=r();return d!==u._v$5&&Oe(l,"class",u._v$5=d),h!==u._v$6&&Oe(c,"stroke",u._v$6=h),u},{_v$5:void 0,_v$6:void 0}),l})()})()})())},AS=mt(''),LS=()=>{const e=Bt(),t=()=>e.theme===Xt.DARK?e.colors.constant.white:e.colors.constant.black;return(()=>{const n=AS.cloneNode(!0),r=n.firstChild,i=r.nextSibling,o=i.nextSibling;return ht(()=>Oe(o,"fill",t())),n})()},OS=mt(''),RS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=OS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},DS=mt(''),IS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=DS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},NS=mt(''),WS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=NS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},$S=mt(''),US=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=$S.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},FS=mt(''),Vl=e=>{const t=Bt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=FS.cloneNode(!0),i=r.firstChild,o=i.firstChild;return ht(()=>Oe(o,"fill",n())),r})()},BS=mt(''),sv=e=>{const t=Bt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=BS.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},jS=mt(''),HS=e=>{const t=Bt(),n=()=>e.fill||t.colors.accent;return(()=>{const r=jS.cloneNode(!0),i=r.firstChild,o=i.firstChild;return ht(()=>Oe(o,"fill",n())),r})()},zS=mt(''),VS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=zS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},YS=mt(''),KS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=YS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},qS=mt(''),GS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=qS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},ZS=mt(''),QS=e=>{const t=Bt(),n=()=>e.fill||t.colors.constant.white;return(()=>{const r=ZS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},JS=mt(''),XS=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=JS.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},ek=mt(''),C4=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=ek.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=n(),a=n();return s!==o._v$&&Oe(r,"fill",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},tk=mt(''),$0=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.secondary;return(()=>{const r=tk.cloneNode(!0),i=r.firstChild;return ht(()=>Oe(i,"fill",n())),r})()},nk={m:"16px",s:"12px",none:"0"},rk={m:"6px",s:"6px",none:"0"},ik=V.div` width: 60px; height: 60px; padding: 8px; margin-bottom: 8px; - border-radius: ${e=>tk[e.theme.borderRadius]}; + border-radius: ${e=>nk[e.theme.borderRadius]}; background-color: ${e=>e.theme.colors.background.tint}; display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 4px; -`,ik=V(b4)` +`,ok=V(_4)` width: 20px; height: 20px; - border-radius: ${e=>nk[e.theme.borderRadius]}; -`,C4=e=>_(ld,{get name(){return e.labelLine1},get secondLine(){return e.labelLine2},get icon(){return _(rk,{get children(){return _(Hc,{each:[0,1,2,3],children:t=>_(ik,{get src(){return e.images[t]}})})}})},onClick:()=>e.onClick()}),Xi="telegram-wallet",Gc={TON:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",TG:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png"},S4=e=>{const[t]=Oi(),n=()=>{if(e.wallet.appName!==Xi){if("isPreferred"in e.wallet&&e.wallet.isPreferred)return t("walletItem.recent",{},"Recent");if(ks(e.wallet))return t("walletItem.installed",{},"Installed");if(e.wallet.name==="Tonkeeper")return t("walletItem.popular",{},"Popular")}};return ve((()=>{const r=ve(()=>e.wallet.appName===Xi);return()=>r()?_(ld,{get icon(){return e.wallet.imageUrl},get name(){return t("walletItem.walletOn",{},"Wallet On")},secondLine:"Telegram",get badgeUrl(){return Gc.TG},onClick:()=>e.onClick()}):_(ld,{get icon(){return e.wallet.imageUrl},get name(){return e.wallet.name},get secondLine(){return n()},secondLineColorPrimary:!1,onClick:()=>e.onClick()})})())},ok=V.div` + border-radius: ${e=>rk[e.theme.borderRadius]}; +`,S4=e=>_(cd,{get name(){return e.labelLine1},get secondLine(){return e.labelLine2},get icon(){return _(ik,{get children(){return _(zc,{each:[0,1,2,3],children:t=>_(ok,{get src(){return e.images[t]}})})}})},onClick:()=>e.onClick()}),Xi="telegram-wallet",Zc={TON:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",TG:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png"},k4=e=>{const[t]=Oi(),n=()=>{if(e.wallet.appName!==Xi){if("isPreferred"in e.wallet&&e.wallet.isPreferred)return t("walletItem.recent",{},"Recent");if(Es(e.wallet))return t("walletItem.installed",{},"Installed");if(e.wallet.name==="Tonkeeper")return t("walletItem.popular",{},"Popular")}};return ve((()=>{const r=ve(()=>e.wallet.appName===Xi);return()=>r()?_(cd,{get icon(){return e.wallet.imageUrl},get name(){return t("walletItem.walletOn",{},"Wallet On")},secondLine:"Telegram",get badgeUrl(){return Zc.TG},onClick:()=>e.onClick()}):_(cd,{get icon(){return e.wallet.imageUrl},get name(){return e.wallet.name},get secondLine(){return n()},secondLineColorPrimary:!1,onClick:()=>e.onClick()})})())},sk=V.div` width: 100%; overflow-y: auto; max-height: ${e=>e.maxHeight}; @@ -547,7 +547,7 @@ PERFORMANCE OF THIS SOFTWARE. &&::-webkit-scrollbar-thumb { display: none; } -`,sk=V.div` +`,ak=V.div` height: 1px; margin: 0 -24px; width: calc(100% + 48px); @@ -559,21 +559,21 @@ PERFORMANCE OF THIS SOFTWARE. width: 100%; margin: 0; } -`,[ak,lk]=Be(((B2=fo())==null?void 0:B2.innerHeight)||0);fo()&&window.addEventListener("resize",()=>lk(window.innerHeight));const[$a,ck]=Be(ma("mobile")),cd=()=>ck(ma("mobile"));fo()&&(window.addEventListener("resize",()=>cd()),window.addEventListener("load",()=>cd(),{once:!0}));const k4=e=>{const[t,n]=Be(!1),r=s=>{n(s.target.scrollTop>0)},i=()=>$a()?150:200,o=()=>e.maxHeight!==void 0?`${e.maxHeight}px`:`${ak()-i()}px`;return[_(sk,{get isShown(){return t()}}),_(ok,{get maxHeight(){return o()},onScroll:r,get class(){return e.class},get children(){return e.children}})]},uk=V.a` +`,[lk,ck]=Be(((j2=fo())==null?void 0:j2.innerHeight)||0);fo()&&window.addEventListener("resize",()=>ck(window.innerHeight));const[Ua,uk]=Be(va("mobile")),ud=()=>uk(va("mobile"));fo()&&(window.addEventListener("resize",()=>ud()),window.addEventListener("load",()=>ud(),{once:!0}));const E4=e=>{const[t,n]=Be(!1),r=s=>{n(s.target.scrollTop>0)},i=()=>Ua()?150:200,o=()=>e.maxHeight!==void 0?`${e.maxHeight}px`:`${lk()-i()}px`;return[_(ak,{get isShown(){return t()}}),_(sk,{get maxHeight(){return o()},onScroll:r,get class(){return e.class},get children(){return e.children}})]},fk=V.a` display: block; text-decoration: unset; -`,ud=e=>_(uk,Ei({get href(){return e.href},get target(){return e.blank?"_blank":"_self"},get class(){return e.class}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),is=Jd(),fk=gt(''),dk=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=fk.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},hk=gt(''),pk=e=>{const t=Ft(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=hk.cloneNode(!0),i=r.firstChild,o=i.nextSibling;return ht(s=>{const a=n(),l=n();return a!==s._v$&&Oe(i,"fill",s._v$=a),l!==s._v$2&&Oe(o,"fill",s._v$2=l),s},{_v$:void 0,_v$2:void 0}),r})()},gk={m:"8px",s:"4px",none:"0"},mk={m:"16px",s:"8px",none:"0"},vk=V.div` +`,fd=e=>_(fk,Ei({get href(){return e.href},get target(){return e.blank?"_blank":"_self"},get class(){return e.class}},()=>e.blank?{rel:"noreferrer noopener"}:{},{get children(){return e.children}})),is=Xd(),dk=mt(''),hk=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=dk.cloneNode(!0),i=r.firstChild;return ht(o=>{const s=e.class,a=n();return s!==o._v$&&Oe(r,"class",o._v$=s),a!==o._v$2&&Oe(i,"fill",o._v$2=a),o},{_v$:void 0,_v$2:void 0}),r})()},pk=mt(''),gk=e=>{const t=Bt(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const r=pk.cloneNode(!0),i=r.firstChild,o=i.nextSibling;return ht(s=>{const a=n(),l=n();return a!==s._v$&&Oe(i,"fill",s._v$=a),l!==s._v$2&&Oe(o,"fill",s._v$2=l),s},{_v$:void 0,_v$2:void 0}),r})()},mk={m:"8px",s:"4px",none:"0"},vk={m:"16px",s:"8px",none:"0"},yk=V.div` width: 256px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>mk[e.theme.borderRadius]}; + border-radius: ${e=>vk[e.theme.borderRadius]}; background-color: ${e=>e.theme.colors.background.primary} color: ${e=>e.theme.colors.text.primary} -`,yk=V.ul` +`,wk=V.ul` background-color: ${e=>e.theme.colors.background.primary}; padding: 8px; -`,sv=V.button` +`,av=V.button` display: flex; align-items: center; gap: 8px; @@ -583,7 +583,7 @@ PERFORMANCE OF THIS SOFTWARE. background-color: ${e=>e.theme.colors.background.primary}; border: none; - border-radius: ${e=>gk[e.theme.borderRadius]}; + border-radius: ${e=>mk[e.theme.borderRadius]}; cursor: pointer; transition: background-color, transform 0.1s ease-in-out; @@ -595,7 +595,7 @@ PERFORMANCE OF THIS SOFTWARE. &:active { transform: scale(0.96); } -`,av=gt("
  • "),s1=e=>_(Or,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),wk=e=>{const t=cr(is),[n,r]=Be(!1),i=()=>At(void 0,null,function*(){const s=W3(t.account.address,t.account.chain===Vf.TESTNET);yield xg(s),r(!0),setTimeout(()=>r(!1),1e3)}),o=()=>{t.disconnect(),e.onClose()};return _(vk,{ref(s){const a=e.ref;typeof a=="function"?a(s):e.ref=s},get class(){return e.class},"data-tc-dropdown":"true",get children(){return _(yk,{get children(){return[(()=>{const s=av.cloneNode(!0);return Xn(s,_(sv,{onClick:()=>i(),get children(){return[_(dk,{}),_(Ye,{get when(){return!n()},get children(){return _(s1,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),_(Ye,{get when(){return n()},get children(){return _(s1,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),s})(),(()=>{const s=av.cloneNode(!0);return Xn(s,_(sv,{onClick:()=>o(),get children(){return[_(pk,{}),_(s1,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),s})()]}})}})},xk={m:"16px",s:"8px",none:"0"},bk=V.div` +`,lv=mt("
  • "),a1=e=>_(Or,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),xk=e=>{const t=cr(is),[n,r]=Be(!1),i=()=>Lt(void 0,null,function*(){const s=$3(t.account.address,t.account.chain===Yf.TESTNET);yield bg(s),r(!0),setTimeout(()=>r(!1),1e3)}),o=()=>{t.disconnect(),e.onClose()};return _(yk,{ref(s){const a=e.ref;typeof a=="function"?a(s):e.ref=s},get class(){return e.class},"data-tc-dropdown":"true",get children(){return _(wk,{get children(){return[(()=>{const s=lv.cloneNode(!0);return Xn(s,_(av,{onClick:()=>i(),get children(){return[_(hk,{}),_(Ye,{get when(){return!n()},get children(){return _(a1,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),_(Ye,{get when(){return n()},get children(){return _(a1,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),s})(),(()=>{const s=lv.cloneNode(!0);return Xn(s,_(av,{onClick:()=>o(),get children(){return[_(gk,{}),_(a1,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),s})()]}})}})},bk={m:"16px",s:"8px",none:"0"},_k=V.div` width: 256px; padding: 12px 16px; display: flex; @@ -603,68 +603,68 @@ PERFORMANCE OF THIS SOFTWARE. background-color: ${e=>e.theme.colors.background.primary}; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); - border-radius: ${e=>xk[e.theme.borderRadius]}; -`,_k=V.div` + border-radius: ${e=>bk[e.theme.borderRadius]}; +`,Ck=V.div` width: 192px; > h3 { font-size: 15px; } -`,Ck=V(Or)` +`,Sk=V(Or)` margin-top: 4px; color: ${e=>e.theme.colors.text.secondary}; -`,Cg=e=>{const t=qc(e);return _(bk,Ei({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[_(_k,{get children(){return[_(bg,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),_(Ye,{get when(){return e.text},get children(){return _(Ck,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),ve(()=>e.icon)]}}))},Sk=V(ho)` +`,Sg=e=>{const t=Gc(e);return _(_k,Ei({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[_(Ck,{get children(){return[_(_g,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),_(Ye,{get when(){return e.text},get children(){return _(Sk,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),ve(()=>e.icon)]}}))},kk=V(ho)` align-self: center; -`,kk=e=>{const t=cr(is),[n]=Oi(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return _(Cg,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:r()}}},get class(){return e.class},get icon(){return _(Sk,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Ek=V(rh)` +`,Ek=e=>{const t=cr(is),[n]=Oi(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return _(Sg,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:r()}}},get class(){return e.class},get icon(){return _(kk,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Mk=V(ih)` margin-top: 2px; -`,Mk=e=>_(Cg,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return _(Ek,{size:"xs"})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),Tk=V(_g)` +`,Tk=e=>_(Sg,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return _(Mk,{size:"xs"})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),Pk=V(Cg)` margin-top: 2px; -`,Pk=e=>_(Cg,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return _(Tk,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),a1=so` +`,Ak=e=>_(Sg,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return _(Pk,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),l1=so` transform: translateY(-8px); margin-bottom: 12px; -`,Ak={timeout:4500},[lv,Lk]=Be(null);function Ok(e){const{timeout:t}=Rt(Rt({},Ak),e),[n,r]=Be([]),[i,o]=Be([]);return $n($9(zi,s=>{var a;if(!s||!s.showNotification||lv()===s||((a=lv())==null?void 0:a.name)==="confirm-transaction"&&s.name==="confirm-transaction")return;Lk(s),r(u=>u.filter(d=>d.action!=="confirm-transaction"));const l={action:s.name};r(u=>[...u,l]);const c=setTimeout(()=>{r(u=>u.filter(d=>d!==l)),o(u=>u.filter(d=>d!==c))},t);o(u=>[...u,c])})),lr(()=>{i().forEach(s=>clearTimeout(s))}),n}const Rk=gt('
    '),Dk=e=>{const t=Ok();return(()=>{const n=Rk.cloneNode(!0);return Xn(n,_(wC,{onBeforeEnter:r=>{bi(r,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(r,i)=>{bi(r,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(i)},get children(){return _(Hc,{get each(){return t()},children:r=>_(zc,{get children(){return[_(jn,{get when(){return r.action==="transaction-sent"},get children(){return _(Pk,{class:a1})}}),_(jn,{get when(){return r.action==="transaction-canceled"},get children(){return _(Mk,{class:a1})}}),_(jn,{get when(){return r.action==="confirm-transaction"},get children(){return _(kk,{class:a1})}})]}})})}})),ht(()=>ug(n,e.class)),n})()},E4=V(wn)` +`,Lk={timeout:4500},[cv,Ok]=Be(null);function Rk(e){const{timeout:t}=Dt(Dt({},Lk),e),[n,r]=Be([]),[i,o]=Be([]);return $n(U9(zi,s=>{var a;if(!s||!s.showNotification||cv()===s||((a=cv())==null?void 0:a.name)==="confirm-transaction"&&s.name==="confirm-transaction")return;Ok(s),r(u=>u.filter(d=>d.action!=="confirm-transaction"));const l={action:s.name};r(u=>[...u,l]);const c=setTimeout(()=>{r(u=>u.filter(d=>d!==l)),o(u=>u.filter(d=>d!==c))},t);o(u=>[...u,c])})),lr(()=>{i().forEach(s=>clearTimeout(s))}),n}const Dk=mt('
    '),Ik=e=>{const t=Rk();return(()=>{const n=Dk.cloneNode(!0);return Xn(n,_(xC,{onBeforeEnter:r=>{bi(r,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(r,i)=>{bi(r,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(i)},get children(){return _(zc,{get each(){return t()},children:r=>_(Vc,{get children(){return[_(jn,{get when(){return r.action==="transaction-sent"},get children(){return _(Ak,{class:l1})}}),_(jn,{get when(){return r.action==="transaction-canceled"},get children(){return _(Tk,{class:l1})}}),_(jn,{get when(){return r.action==="confirm-transaction"},get children(){return _(Ek,{class:l1})}})]}})})}})),ht(()=>fg(n,e.class)),n})()},M4=V(wn)` background-color: ${e=>e.theme.colors.connectButton.background}; color: ${e=>e.theme.colors.connectButton.foreground}; - box-shadow: ${e=>`0 4px 24px ${Vc(e.theme.colors.constant.black,.16)}`}; + box-shadow: ${e=>`0 4px 24px ${Yc(e.theme.colors.constant.black,.16)}`}; padding: 8px 16px 8px 12px; display: flex; align-items: center; gap: 4px; height: 40px; -`,Ik=V(E4)` +`,Nk=V(M4)` padding: 12px 16px; min-width: 148px; justify-content: center; background-color: ${e=>e.theme.colors.background.primary}; -`,Nk=V(wn)` +`,Wk=V(wn)` 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 ${Vc(e.theme.colors.constant.black,.16)}`}; + box-shadow: ${e=>`0 4px 24px ${Yc(e.theme.colors.constant.black,.16)}`}; display: flex; align-items: center; justify-content: center; -`,Wk=V(ho)` +`,$k=V(ho)` height: 18px; width: 18px; -`,$k=V.div` +`,Uk=V.div` width: fit-content; display: flex; flex-direction: column; align-items: flex-end; -`,Uk=V(wk)` +`,Fk=V(xk)` box-sizing: border-box; overflow: hidden; margin-top: 12px; -`,Fk=V(Dk)` +`,Bk=V(Ik)` > div:first-child { margin-top: 20px; } -`;function M4(e){return e.split("-")[0]}function Bk(e){return e.split("-")[1]}function jk(e){return["top","bottom"].includes(M4(e))?"x":"y"}function Hk(e){return e==="y"?"height":"width"}function cv(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=jk(t),l=Hk(a),c=r[l]/2-i[l]/2,u=M4(t),d=a==="x";let h;switch(u){case"top":h={x:o,y:r.y-i.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:s};break;case"left":h={x:r.x-i.width,y:s};break;default:h={x:r.x,y:r.y}}switch(Bk(t)){case"start":h[a]-=c*(n&&d?-1:1);break;case"end":h[a]+=c*(n&&d?-1:1);break}return h}const zk=(e,t,n)=>At(void 0,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=yield s.isRTL==null?void 0:s.isRTL(t);let c=yield s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cv(c,r,l),h=r,g={},m=0;for(let y=0;yt.brand+"/"+t.version).join(" "),Au):navigator.userAgent}function Pi(e){return e instanceof po(e).HTMLElement}function zr(e){return e instanceof po(e).Element}function P4(e){return e instanceof po(e).Node}function fv(e){if(typeof ShadowRoot>"u")return!1;const t=po(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ih(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ti(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(i)}function Vk(e){return["table","td","th"].includes(Zo(e))}function Sg(e){const t=/firefox/i.test(T4()),n=Ti(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||(r?r!=="none":!1)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null?o.includes(i):!1})}function A4(){return!/^((?!chrome|android).)*safari/i.test(T4())}function kg(e){return["html","body","#document"].includes(Zo(e))}const dv=Math.min,Vl=Math.max,hv=Math.round,$0={x:1,y:1};function kc(e){const t=!zr(e)&&e.contextElement?e.contextElement:zr(e)?e:null;if(!t)return $0;const n=t.getBoundingClientRect(),r=Ti(t);if(r.boxSizing!=="border-box")return Pi(t)?{x:t.offsetWidth>0&&hv(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&hv(n.height)/t.offsetHeight||1}:$0;let i=n.width/parseFloat(r.width),o=n.height/parseFloat(r.height);return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}function Qo(e,t,n,r){var i,o,s,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect();let c=$0;t&&(r?zr(r)&&(c=kc(r)):c=kc(e));const u=zr(e)?po(e):window,d=!A4()&&n,h=(l.left+(d&&(i=(o=u.visualViewport)==null?void 0:o.offsetLeft)!=null?i:0))/c.x,g=(l.top+(d&&(s=(a=u.visualViewport)==null?void 0:a.offsetTop)!=null?s:0))/c.y,m=l.width/c.x,y=l.height/c.y;return{width:m,height:y,top:g,right:h+m,bottom:g+y,left:h,x:h,y:g}}function os(e){return((P4(e)?e.ownerDocument:e.document)||window.document).documentElement}function oh(e){return zr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function L4(e){return Qo(os(e)).left+oh(e).scrollLeft}function Yk(e,t,n){const r=Pi(t),i=os(t),o=Qo(e,!0,n==="fixed",t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((Zo(t)!=="body"||ih(i))&&(s=oh(t)),Pi(t)){const l=Qo(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else i&&(a.x=L4(i));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Ec(e){if(Zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(fv(e)?e.host:null)||os(e);return fv(t)?t.host:t}function pv(e){return!Pi(e)||Ti(e).position==="fixed"?null:e.offsetParent}function Kk(e){let t=Ec(e);for(;Pi(t)&&!kg(t);){if(Sg(t))return t;t=Ec(t)}return null}function gv(e){const t=po(e);let n=pv(e);for(;n&&Vk(n)&&Ti(n).position==="static";)n=pv(n);return n&&(Zo(n)==="html"||Zo(n)==="body"&&Ti(n).position==="static"&&!Sg(n))?t:n||Kk(e)||t}function qk(e){if(Pi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Qo(e);return{width:t.width,height:t.height}}function Gk(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Pi(n),o=os(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&r!=="fixed")&&((Zo(n)!=="body"||ih(o))&&(s=oh(n)),Pi(n))){const c=Qo(n);a=kc(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}}function Zk(e,t){const n=po(e),r=os(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=A4();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function Qk(e){var t;const n=os(e),r=oh(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Vl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-r.scrollLeft+L4(e);const l=-r.scrollTop;return Ti(i||n).direction==="rtl"&&(a+=Vl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function O4(e){const t=Ec(e);return kg(t)?e.ownerDocument.body:Pi(t)&&ih(t)?t:O4(t)}function Yl(e,t){var n;t===void 0&&(t=[]);const r=O4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=po(r);return i?t.concat(o,o.visualViewport||[],ih(r)?r:[]):t.concat(r,Yl(r))}function Jk(e,t){const n=Qo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pi(e)?kc(e):{x:1,y:1},s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}function mv(e,t,n){return t==="viewport"?uv(Zk(e,n)):zr(t)?Jk(t,n):uv(Qk(os(e)))}function Xk(e,t){const n=t.get(e);if(n)return n;let r=Yl(e).filter(a=>zr(a)&&Zo(a)!=="body"),i=null;const o=Ti(e).position==="fixed";let s=o?Ec(e):e;for(;zr(s)&&!kg(s);){const a=Ti(s),l=Sg(s);(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position))?r=r.filter(u=>u!==s):i=a,s=Ec(s)}return t.set(e,r),r}function eE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Xk(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=mv(t,u,i);return c.top=Vl(d.top,c.top),c.right=dv(d.right,c.right),c.bottom=dv(d.bottom,c.bottom),c.left=Vl(d.left,c.left),c},mv(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const tE={getClippingRect:eE,convertOffsetParentRelativeRectToViewportRelativeRect:Gk,isElement:zr,getDimensions:qk,getOffsetParent:gv,getDocumentElement:os,getScale:kc,getElementRects(e){return At(this,null,function*(){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||gv,o=this.getDimensions;return{reference:Yk(t,yield i(n),r),floating:Rt({x:0,y:0},yield o(n))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ti(e).direction==="rtl"};function nE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=i&&!a,c=l||o?[...zr(e)?Yl(e):e.contextElement?Yl(e.contextElement):[],...Yl(t)]:[];c.forEach(m=>{l&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});let u=null;if(s){let m=!0;u=new ResizeObserver(()=>{m||n(),m=!1}),zr(e)&&!a&&u.observe(e),!zr(e)&&e.contextElement&&!a&&u.observe(e.contextElement),u.observe(t)}let d,h=a?Qo(e):null;a&&g();function g(){const m=Qo(e);h&&(m.x!==h.x||m.y!==h.y||m.width!==h.width||m.height!==h.height)&&n(),h=m,d=requestAnimationFrame(g)}return n(),()=>{var m;c.forEach(y=>{l&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),(m=u)==null||m.disconnect(),u=null,a&&cancelAnimationFrame(d)}}const rE=(e,t,n)=>{const r=new Map,i=Rt({platform:tE},n),o=Tr(Rt({},i.platform),{_c:r});return zk(e,t,Tr(Rt({},i),{platform:o}))};function iE(e,t,n){let r=()=>{var d;return(d=n==null?void 0:n.placement)!=null?d:"bottom"},i=()=>{var d;return(d=n==null?void 0:n.strategy)!=null?d:"absolute"},[o,s]=Be({x:null,y:null,placement:r(),strategy:i(),middlewareData:{}}),[a,l]=Be();$n(()=>{let d=a();if(d)throw d.value});let c=ve(()=>(e(),t(),{}));function u(){let d=e(),h=t();if(d&&h){let g=c();rE(d,h,{middleware:n==null?void 0:n.middleware,placement:r(),strategy:i()}).then(m=>{g===c()&&s(m)},m=>{l(m)})}}return $n(()=>{let d=e(),h=t();if(n==null||n.middleware,r(),i(),d&&h)if(n!=null&&n.whileElementsMounted){let g=n.whileElementsMounted(d,h,u);g&&lr(g)}else u()}),{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:u}}const oE=gt(''),sE=()=>{const e=Ft(),t=cr(qa),n=cr(is),[r,i]=Be(!1),[o,s]=Be(t.account),[a,l]=Be(!t.account);let c;const[u,d]=Be(),[h,g]=Be(),m=iE(h,u,{whileElementsMounted:nE,placement:"bottom-end"}),y=()=>{const v=o();if(v){const w=W3(v.address,v.chain===Vf.TESTNET);return w.slice(0,4)+"…"+w.slice(-4)}return""};n.connectionRestored.then(()=>l(!1));const k=t.onStatusChange(v=>{if(!v){i(!1),s(null),l(!1);return}s(v.account),l(!1)}),C=v=>{if(!o()||!r())return;const w=h().contains(v.target),M=c.contains(v.target);!w&&!M&&i(!1)};return U9(()=>{document.body.addEventListener("click",C)}),lr(()=>{document.body.removeEventListener("click",C),k()}),_(Na,{component:ji,get children(){return[_(Ye,{get when(){return a()},get children(){return _(Nk,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return _(Wk,{})}})}}),_(Ye,{get when(){return!a()},get children(){return[_(Ye,{get when(){return!o()},get children(){return _(E4,{onClick:()=>n.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[_(wS,{get fill(){return e.colors.connectButton.foreground}}),_(Or,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),_(Ye,{get when(){return o()},get children(){return _($k,{get children(){return[_(Ik,{onClick:()=>i(v=>!v),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[_(Or,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return y()}}),_(g4,{direction:"bottom"})]}}),_(X3,{get children(){const v=Un(()=>document.importNode(oE,!0));return Hl(d,v),v.style.setProperty("z-index","999"),v._$owner=F9(),Xn(v,_(wg,{onBeforeEnter:w=>{bi(w,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(w,M)=>{bi(w,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(M)},get children(){return _(Ye,{get when(){return r()},get children(){return _(Uk,{get hidden(){return!r()},onClose:()=>i(!1),ref(w){const M=c;typeof M=="function"?M(w):c=w}})}})}}),null),Xn(v,_(Fk,{}),null),ht(w=>{var M,E;const O=m.strategy,T=`${(M=m.y)!=null?M:0}px`,P=`${(E=m.x)!=null?E:0}px`;return O!==w._v$&&v.style.setProperty("position",w._v$=O),T!==w._v$2&&v.style.setProperty("top",w._v$2=T),P!==w._v$3&&v.style.setProperty("left",w._v$3=P),w},{_v$:void 0,_v$2:void 0,_v$3:void 0}),v}})]}})}})]}})]}})},R4=V(v4)` +`;function T4(e){return e.split("-")[0]}function jk(e){return e.split("-")[1]}function Hk(e){return["top","bottom"].includes(T4(e))?"x":"y"}function zk(e){return e==="y"?"height":"width"}function uv(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=Hk(t),l=zk(a),c=r[l]/2-i[l]/2,u=T4(t),d=a==="x";let h;switch(u){case"top":h={x:o,y:r.y-i.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:s};break;case"left":h={x:r.x-i.width,y:s};break;default:h={x:r.x,y:r.y}}switch(jk(t)){case"start":h[a]-=c*(n&&d?-1:1);break;case"end":h[a]+=c*(n&&d?-1:1);break}return h}const Vk=(e,t,n)=>Lt(void 0,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=yield s.isRTL==null?void 0:s.isRTL(t);let c=yield s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=uv(c,r,l),h=r,g={},m=0;for(let y=0;yt.brand+"/"+t.version).join(" "),Lu):navigator.userAgent}function Pi(e){return e instanceof po(e).HTMLElement}function zr(e){return e instanceof po(e).Element}function A4(e){return e instanceof po(e).Node}function dv(e){if(typeof ShadowRoot>"u")return!1;const t=po(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ti(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(i)}function Yk(e){return["table","td","th"].includes(Zo(e))}function kg(e){const t=/firefox/i.test(P4()),n=Ti(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||(r?r!=="none":!1)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null?o.includes(i):!1})}function L4(){return!/^((?!chrome|android).)*safari/i.test(P4())}function Eg(e){return["html","body","#document"].includes(Zo(e))}const hv=Math.min,Yl=Math.max,pv=Math.round,U0={x:1,y:1};function Ec(e){const t=!zr(e)&&e.contextElement?e.contextElement:zr(e)?e:null;if(!t)return U0;const n=t.getBoundingClientRect(),r=Ti(t);if(r.boxSizing!=="border-box")return Pi(t)?{x:t.offsetWidth>0&&pv(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&pv(n.height)/t.offsetHeight||1}:U0;let i=n.width/parseFloat(r.width),o=n.height/parseFloat(r.height);return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}function Qo(e,t,n,r){var i,o,s,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect();let c=U0;t&&(r?zr(r)&&(c=Ec(r)):c=Ec(e));const u=zr(e)?po(e):window,d=!L4()&&n,h=(l.left+(d&&(i=(o=u.visualViewport)==null?void 0:o.offsetLeft)!=null?i:0))/c.x,g=(l.top+(d&&(s=(a=u.visualViewport)==null?void 0:a.offsetTop)!=null?s:0))/c.y,m=l.width/c.x,y=l.height/c.y;return{width:m,height:y,top:g,right:h+m,bottom:g+y,left:h,x:h,y:g}}function os(e){return((A4(e)?e.ownerDocument:e.document)||window.document).documentElement}function sh(e){return zr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function O4(e){return Qo(os(e)).left+sh(e).scrollLeft}function Kk(e,t,n){const r=Pi(t),i=os(t),o=Qo(e,!0,n==="fixed",t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((Zo(t)!=="body"||oh(i))&&(s=sh(t)),Pi(t)){const l=Qo(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else i&&(a.x=O4(i));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Mc(e){if(Zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(dv(e)?e.host:null)||os(e);return dv(t)?t.host:t}function gv(e){return!Pi(e)||Ti(e).position==="fixed"?null:e.offsetParent}function qk(e){let t=Mc(e);for(;Pi(t)&&!Eg(t);){if(kg(t))return t;t=Mc(t)}return null}function mv(e){const t=po(e);let n=gv(e);for(;n&&Yk(n)&&Ti(n).position==="static";)n=gv(n);return n&&(Zo(n)==="html"||Zo(n)==="body"&&Ti(n).position==="static"&&!kg(n))?t:n||qk(e)||t}function Gk(e){if(Pi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Qo(e);return{width:t.width,height:t.height}}function Zk(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Pi(n),o=os(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&r!=="fixed")&&((Zo(n)!=="body"||oh(o))&&(s=sh(n)),Pi(n))){const c=Qo(n);a=Ec(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}}function Qk(e,t){const n=po(e),r=os(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=L4();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function Jk(e){var t;const n=os(e),r=sh(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Yl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-r.scrollLeft+O4(e);const l=-r.scrollTop;return Ti(i||n).direction==="rtl"&&(a+=Yl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function R4(e){const t=Mc(e);return Eg(t)?e.ownerDocument.body:Pi(t)&&oh(t)?t:R4(t)}function Kl(e,t){var n;t===void 0&&(t=[]);const r=R4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=po(r);return i?t.concat(o,o.visualViewport||[],oh(r)?r:[]):t.concat(r,Kl(r))}function Xk(e,t){const n=Qo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Pi(e)?Ec(e):{x:1,y:1},s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}function vv(e,t,n){return t==="viewport"?fv(Qk(e,n)):zr(t)?Xk(t,n):fv(Jk(os(e)))}function eE(e,t){const n=t.get(e);if(n)return n;let r=Kl(e).filter(a=>zr(a)&&Zo(a)!=="body"),i=null;const o=Ti(e).position==="fixed";let s=o?Mc(e):e;for(;zr(s)&&!Eg(s);){const a=Ti(s),l=kg(s);(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position))?r=r.filter(u=>u!==s):i=a,s=Mc(s)}return t.set(e,r),r}function tE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?eE(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=vv(t,u,i);return c.top=Yl(d.top,c.top),c.right=hv(d.right,c.right),c.bottom=hv(d.bottom,c.bottom),c.left=Yl(d.left,c.left),c},vv(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const nE={getClippingRect:tE,convertOffsetParentRelativeRectToViewportRelativeRect:Zk,isElement:zr,getDimensions:Gk,getOffsetParent:mv,getDocumentElement:os,getScale:Ec,getElementRects(e){return Lt(this,null,function*(){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||mv,o=this.getDimensions;return{reference:Kk(t,yield i(n),r),floating:Dt({x:0,y:0},yield o(n))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ti(e).direction==="rtl"};function rE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=i&&!a,c=l||o?[...zr(e)?Kl(e):e.contextElement?Kl(e.contextElement):[],...Kl(t)]:[];c.forEach(m=>{l&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});let u=null;if(s){let m=!0;u=new ResizeObserver(()=>{m||n(),m=!1}),zr(e)&&!a&&u.observe(e),!zr(e)&&e.contextElement&&!a&&u.observe(e.contextElement),u.observe(t)}let d,h=a?Qo(e):null;a&&g();function g(){const m=Qo(e);h&&(m.x!==h.x||m.y!==h.y||m.width!==h.width||m.height!==h.height)&&n(),h=m,d=requestAnimationFrame(g)}return n(),()=>{var m;c.forEach(y=>{l&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),(m=u)==null||m.disconnect(),u=null,a&&cancelAnimationFrame(d)}}const iE=(e,t,n)=>{const r=new Map,i=Dt({platform:nE},n),o=Tr(Dt({},i.platform),{_c:r});return Vk(e,t,Tr(Dt({},i),{platform:o}))};function oE(e,t,n){let r=()=>{var d;return(d=n==null?void 0:n.placement)!=null?d:"bottom"},i=()=>{var d;return(d=n==null?void 0:n.strategy)!=null?d:"absolute"},[o,s]=Be({x:null,y:null,placement:r(),strategy:i(),middlewareData:{}}),[a,l]=Be();$n(()=>{let d=a();if(d)throw d.value});let c=ve(()=>(e(),t(),{}));function u(){let d=e(),h=t();if(d&&h){let g=c();iE(d,h,{middleware:n==null?void 0:n.middleware,placement:r(),strategy:i()}).then(m=>{g===c()&&s(m)},m=>{l(m)})}}return $n(()=>{let d=e(),h=t();if(n==null||n.middleware,r(),i(),d&&h)if(n!=null&&n.whileElementsMounted){let g=n.whileElementsMounted(d,h,u);g&&lr(g)}else u()}),{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:u}}const sE=mt(''),aE=()=>{const e=Bt(),t=cr(Ga),n=cr(is),[r,i]=Be(!1),[o,s]=Be(t.account),[a,l]=Be(!t.account);let c;const[u,d]=Be(),[h,g]=Be(),m=oE(h,u,{whileElementsMounted:rE,placement:"bottom-end"}),y=()=>{const v=o();if(v){const w=$3(v.address,v.chain===Yf.TESTNET);return w.slice(0,4)+"…"+w.slice(-4)}return""};n.connectionRestored.then(()=>l(!1));const k=t.onStatusChange(v=>{if(!v){i(!1),s(null),l(!1);return}s(v.account),l(!1)}),C=v=>{if(!o()||!r())return;const w=h().contains(v.target),M=c.contains(v.target);!w&&!M&&i(!1)};return F9(()=>{document.body.addEventListener("click",C)}),lr(()=>{document.body.removeEventListener("click",C),k()}),_(Wa,{component:ji,get children(){return[_(Ye,{get when(){return a()},get children(){return _(Wk,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return _($k,{})}})}}),_(Ye,{get when(){return!a()},get children(){return[_(Ye,{get when(){return!o()},get children(){return _(M4,{onClick:()=>n.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[_(xS,{get fill(){return e.colors.connectButton.foreground}}),_(Or,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),_(Ye,{get when(){return o()},get children(){return _(Uk,{get children(){return[_(Nk,{onClick:()=>i(v=>!v),ref:g,"data-tc-dropdown-button":"true",scale:"s",get children(){return[_(Or,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return y()}}),_(m4,{direction:"bottom"})]}}),_(e4,{get children(){const v=Un(()=>document.importNode(sE,!0));return zl(d,v),v.style.setProperty("z-index","999"),v._$owner=B9(),Xn(v,_(xg,{onBeforeEnter:w=>{bi(w,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(w,M)=>{bi(w,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(M)},get children(){return _(Ye,{get when(){return r()},get children(){return _(Fk,{get hidden(){return!r()},onClose:()=>i(!1),ref(w){const M=c;typeof M=="function"?M(w):c=w}})}})}}),null),Xn(v,_(Bk,{}),null),ht(w=>{var M,E;const O=m.strategy,T=`${(M=m.y)!=null?M:0}px`,P=`${(E=m.x)!=null?E:0}px`;return O!==w._v$&&v.style.setProperty("position",w._v$=O),T!==w._v$2&&v.style.setProperty("top",w._v$2=T),P!==w._v$3&&v.style.setProperty("left",w._v$3=P),w},{_v$:void 0,_v$2:void 0,_v$3:void 0}),v}})]}})}})]}})]}})},D4=V(y4)` padding-left: 24px; padding-right: 24px; padding-top: 18px; @@ -676,13 +676,13 @@ PERFORMANCE OF THIS SOFTWARE. min-height: 364px; } -`,D4=V(Ri)` +`,I4=V(Ri)` margin-top: 12px; ${Ir("mobile")} { padding: 0 10px; } -`,I4=V.div` +`,N4=V.div` margin: 30px 0; width: 100%; display: flex; @@ -696,13 +696,13 @@ PERFORMANCE OF THIS SOFTWARE. min-width: 84px; text-align: center; font-weight: 590; -`;V(zC)` +`;V(VC)` margin: 0 auto 22px; -`;const[Ct,Lu]=mg({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function aE(e){return[...new Set(e)]}function lE(e,t,n){return t.map(r=>{const i=n.find(o=>o[e]===r[e]);return n=n.filter(o=>o[e]!==r[e]),i===void 0?r:i}).concat(n)}function cE(e){return"jsBridgeKey"in e?Tr(Rt({},e),{injected:Ns.isWalletInjected(e.jsBridgeKey),embedded:Ns.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Eg(e,t){var n;return t&&(n=t.includeWallets)!=null&&n.length&&(e=lE("name",e,t.includeWallets.map(cE))),e}function vv(e){return e.platforms.some(t=>["macos","linux","windows"].includes(t))}function Kl(e){return e.platforms.some(t=>["ios","android"].includes(t))}function yv(e){return e.platforms.some(t=>["chrome","firefox","safari"].includes(t))}function ko(e,t){return t?e.name.toLowerCase()===t.toLowerCase()||e.appName.toLowerCase()===t.toLowerCase():!1}const uE=V.div` +`;const[St,Ou]=vg({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function lE(e){return[...new Set(e)]}function cE(e,t,n){return t.map(r=>{const i=n.find(o=>o[e]===r[e]);return n=n.filter(o=>o[e]!==r[e]),i===void 0?r:i}).concat(n)}function uE(e){return"jsBridgeKey"in e?Tr(Dt({},e),{injected:Ws.isWalletInjected(e.jsBridgeKey),embedded:Ws.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Mg(e,t){var n;return t&&(n=t.includeWallets)!=null&&n.length&&(e=cE("name",e,t.includeWallets.map(uE))),e}function yv(e){return e.platforms.some(t=>["macos","linux","windows"].includes(t))}function ql(e){return e.platforms.some(t=>["ios","android"].includes(t))}function wv(e){return e.platforms.some(t=>["chrome","firefox","safari"].includes(t))}function ko(e,t){return t?e.name.toLowerCase()===t.toLowerCase()||e.appName.toLowerCase()===t.toLowerCase():!1}const fE=V.div` display: flex; flex-direction: column; align-items: center; -`,fE=V(Ri)` +`,dE=V(Ri)` margin-bottom: 18px; `;V.div` height: 1px; @@ -715,7 +715,7 @@ PERFORMANCE OF THIS SOFTWARE. ${Ir("mobile")} { width: 100%; } -`;const dE=V.ul` +`;const hE=V.ul` display: grid; grid-template-columns: repeat(auto-fit, 92px); grid-template-rows: auto; @@ -740,16 +740,16 @@ PERFORMANCE OF THIS SOFTWARE. display: block; margin: 0 auto 1px; font-size: 15px; -`;const hE=V(zs)` +`;const pE=V(Vs)` position: absolute; top: 16px; left: 16px; -`,pE=V(S4)` +`,gE=V(k4)` height: 100%; -`,gE=gt("
  • "),mE=e=>{const t=()=>$a()?void 0:510,n=()=>$a()?e.walletsList.filter(Kl):e.walletsList;return _(uE,{"data-tc-wallets-modal-list":"true",get children(){return[_(hE,{icon:"arrow",onClick:()=>e.onBack()}),_(fE,{translationKey:"walletModal.wallets",children:"Wallets"}),_(k4,{get maxHeight(){return t()},get children(){return _(dE,{get children(){return _(Hc,{get each(){return n()},children:r=>(()=>{const i=gE.cloneNode(!0);return Xn(i,_(pE,{wallet:r,onClick:()=>e.onSelect(r)})),i})()})}})}})]}})},vE={m:"16px",s:"12px",none:"0"},yE={m:"6px",s:"6px",none:"0"},wE=V.div` +`,mE=mt("
  • "),vE=e=>{const t=()=>Ua()?void 0:510,n=()=>Ua()?e.walletsList.filter(ql):e.walletsList;return _(fE,{"data-tc-wallets-modal-list":"true",get children(){return[_(pE,{icon:"arrow",onClick:()=>e.onBack()}),_(dE,{translationKey:"walletModal.wallets",children:"Wallets"}),_(E4,{get maxHeight(){return t()},get children(){return _(hE,{get children(){return _(zc,{get each(){return n()},children:r=>(()=>{const i=mE.cloneNode(!0);return Xn(i,_(gE,{wallet:r,onClick:()=>e.onSelect(r)})),i})()})}})}})]}})},yE={m:"16px",s:"12px",none:"0"},wE={m:"6px",s:"6px",none:"0"},xE=V.div` display: flex; flex-direction: column; -`,xE=V.div` +`,bE=V.div` flex: 1; margin-top: ${e=>e.qr?"0":"18px"}; display: flex; @@ -757,76 +757,76 @@ PERFORMANCE OF THIS SOFTWARE. align-items: center; justify-content: center; min-height: 232px; -`,bE=V(nh)` +`,_E=V(rh)` margin-bottom: 24px; -`,_E=V(Ri)` +`,CE=V(Ri)` max-width: 288px; margin: 0 auto 2px; -`,CE=V(rs)` +`,SE=V(rs)` max-width: 288px; text-align: center; margin: 0 auto 20px; -`,SE=V(zs)` +`,kE=V(Vs)` position: absolute; top: 16px; left: 16px; -`,Ml=V.div` +`,Tl=V.div` display: flex; justify-content: center; gap: 8px; padding-bottom: 16px; -`,kE=V(Ml)` +`,EE=V(Tl)` padding-bottom: 0; -`,l1=V(wn)` +`,c1=V(wn)` margin-bottom: 24px; -`,EE=V(ho)` +`,ME=V(ho)` margin-bottom: 18px; margin-top: 2px; -`,ME=V(rh)` +`,TE=V(ih)` margin-bottom: 16px; -`,Ou=V(rs)` +`,Ru=V(rs)` color: ${e=>e.theme.colors.text.secondary}; text-align: center; margin-bottom: 20px; -`,TE=V(wn)` +`,PE=V(wn)` margin-top: -8px; margin-bottom: 24px; width: 100%; padding: 12px 12px 12px 20px; - border-radius: ${e=>vE[e.theme.borderRadius]}; + border-radius: ${e=>yE[e.theme.borderRadius]}; font-size: 16px; line-height: 20px; -`,PE=V(Hs)` +`,AE=V(zs)` width: 32px; height: 32px; - border-radius: ${e=>yE[e.theme.borderRadius]}; -`,Dn=e=>{const[t]=Oi();return ve(()=>{var n;return t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString())})};function It(e,t){let n;typeof t=="string"?n=t:n=ao()?t.twaReturnUrl||t.returnStrategy:"none";const r=AE(e,"ret",n);if(!Ss(e))return r;const i=r.slice(r.lastIndexOf("&")+1);return r.slice(0,r.lastIndexOf("&"))+"-"+x3(i)}function Zc(e,t){t=Rt({},t);const n=LE(e),r=new URL(n);if(r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect"),ao())Ki("ios","android","macos")?(t.returnStrategy="back",t.twaReturnUrl=void 0,kl(It(r.toString(),t))):Ki("tdesktop")||Ki("weba")?kl(It(r.toString(),t)):Ki("web")?(t.returnStrategy="back",t.twaReturnUrl=void 0,kl(It(r.toString(),t))):Yt(It(r.toString(),t));else if(xi("ios")){t.returnStrategy==="back"&&(ct("safari")?t.returnStrategy="back":ct("chrome")?t.returnStrategy="googlechrome://":ct("firefox")?t.returnStrategy="firefox://":ct("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=It(r.toString(),t.returnStrategy),l=Ru(a);To(l,()=>Yt(a))}else{const a=It(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("android")){t.returnStrategy="none";const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=It(r.toString(),t.returnStrategy),l=Ru(a);To(l,()=>Yt(a))}else{const a=It(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("ipad")){t.returnStrategy==="back"&&(ct("safari")?t.returnStrategy="back":ct("chrome")?t.returnStrategy="googlechrome://":ct("firefox")?t.returnStrategy="firefox://":ct("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=It(r.toString(),t.returnStrategy),l=Ru(a);To(l,()=>Yt(a))}else{const a=It(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("macos","windows","linux"))if(t.returnStrategy="none",t.twaReturnUrl=void 0,t.forceRedirect)Yt(It(r.toString(),t));else{const i=It(r.toString(),t),o=Ru(i);To(o,()=>Yt(i))}else Yt(It(r.toString(),t))}function Qc(e,t,n,r){if(n=Rt({},n),ao())if(Ki("ios","android")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve"),r("universal-link");const i=It(e,n.returnStrategy);kl(i,()=>{r("universal-link"),Yt(i)})}else if(Ki("macos","tdesktop")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve");const i=It(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Tu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else if(Ki("weba")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy=location.href:ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const i=It(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Tu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else if(Ki("web")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy=location.href:ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const i=It(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Tu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else{r("universal-link");const i=It(e,n.returnStrategy);Yt(i)}else if(xi("ios"))n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),ct("chrome")?(r("universal-link"),td(It(e,n.returnStrategy),"_self")):(r("universal-link"),Yt(It(e,n.returnStrategy)));else if(xi("android"))n.returnStrategy==="back"&&(ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),r("universal-link"),Yt(It(e,n.returnStrategy));else if(xi("ipad"))n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),ct("chrome")?(r("universal-link"),td(It(e,n.returnStrategy),"_self")):(r("universal-link"),Yt(It(e,n.returnStrategy)));else if(xi("macos","windows","linux")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy="none");const i=It(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Tu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else r("universal-link"),Yt(It(e,n.returnStrategy))}function AE(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}function LE(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}function Ru(e){const t=new URL(e),[,n,r]=t.pathname.split("/"),i=t.searchParams.get("startapp");return`tg://resolve?domain=${n}&appname=${r}&startapp=${i}`}const N4=e=>{const[t,n]=Be("mobile"),[r,i]=Be(!1),[o,s]=Be(),[a,l]=Be(!0),c=cr(qa),u=c.onStatusChange(()=>{},()=>{e.wallet.appName!==Xi&&i(!0)});lr(u);const d=()=>{try{const k=c.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest);s(k)}catch{}};$n(()=>{Un(t)!=="extension"&&(Kl(e.wallet)||vv(e.wallet))&&d()});const h=()=>{i(!1),t()==="extension"&&d(),n("mobile"),Hn(Tr(Rt({},e.wallet),{openMethod:"qrcode"}))},g=()=>{i(!1),t()==="extension"&&d(),n("desktop");const k=!a();l(!1),Qc(o(),e.wallet.deepLink,{returnStrategy:Ct.returnStrategy,forceRedirect:k},C=>{Hn(Tr(Rt({},e.wallet),{openMethod:C}))})},m=()=>{const k=!a();l(!1),Hn(Tr(Rt({},e.wallet),{openMethod:"universal-link"})),Zc(o(),{returnStrategy:Ct.returnStrategy,twaReturnUrl:Ct.twaReturnUrl,forceRedirect:k})},y=()=>{i(!1),n("extension"),ks(e.wallet)&&(Hn(e.wallet),c.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest))};return Kl(e.wallet)?h():yv(e.wallet)?y():g(),_(wE,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[_(Ye,{get when(){return!e.backDisabled},get children(){return _(SE,{icon:"arrow",onClick:()=>e.onBackClick()})}}),_(_E,{get children(){return e.wallet.name}}),_(Ye,{get when(){return t()==="mobile"},get children(){return _(CE,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan the QR code below with your phone’s or ",ve(()=>e.wallet.name),"’s camera"]}})}}),_(xE,{get qr(){return t()==="mobile"},get children(){return _(zc,{get children(){return[_(jn,{get when(){return t()==="mobile"},get children(){return _(bE,{disableCopy:!1,get sourceUrl(){return It(o(),"none")},get imageUrl(){return e.wallet.imageUrl}})}}),_(jn,{get when(){return r()},get children(){return[_(ME,{size:"s"}),_(Ou,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"}),_(Ml,{get children(){return _(wn,{get leftIcon(){return _(zl,{})},get onClick(){return t()==="extension"?y:g},get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}})}})]}}),_(jn,{get when(){return t()==="extension"},get children(){return[_(Ye,{get when(){return ks(e.wallet)},get children(){return[_(EE,{size:"s"}),_(Ou,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name)," browser extension…"]}}),_(Ml,{get children(){return _(wn,{get leftIcon(){return _(zl,{})},onClick:y,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}})}})]}}),_(Ye,{get when(){return!ks(e.wallet)},get children(){return[_(Ou,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Seems you don't have installed ",ve(()=>e.wallet.name)," browser extension"]}}),_(Ml,{get children(){return _(ud,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get rightIcon(){return _(ov,{})},onClick:y,get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ve(()=>e.wallet.name)]}})}})}})}})]}})]}}),_(jn,{get when(){return t()==="desktop"},get children(){return[_(ho,{size:"m"}),_(Ou,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name)," on desktop…"]}}),_(Ml,{get children(){return[_(wn,{get leftIcon(){return _(zl,{})},onClick:g,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(ud,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get rightIcon(){return _(ov,{})},get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ve(()=>e.wallet.name)]}})}})}})]}})]}})]}})}}),_(Ye,{get when(){return e.wallet.appName===Xi},get children(){return _(TE,{get rightIcon(){return _(PE,{get src(){return Gc.TG}})},scale:"s",onClick:m,get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),_(Ye,{get when(){return e.wallet.appName!==Xi},get children(){return _(kE,{get children(){return[_(Ye,{get when(){return ve(()=>t()!=="mobile")()&&Kl(e.wallet)},get children(){return _(l1,{appearance:"secondary",get leftIcon(){return _(NS,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.mobile",children:"Mobile"})}})}}),_(Ye,{get when(){return ve(()=>t()!=="extension")()&&yv(e.wallet)},get children(){return _(l1,{appearance:"secondary",get leftIcon(){return _(DS,{})},onClick:y,get children(){return _(Dn,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),_(Ye,{get when(){return ve(()=>t()!=="desktop")()&&vv(e.wallet)},get children(){return _(l1,{appearance:"secondary",get leftIcon(){return _($S,{})},onClick:g,get children(){return _(Dn,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},OE=V.div``,RE=V(zs)` + border-radius: ${e=>wE[e.theme.borderRadius]}; +`,Dn=e=>{const[t]=Oi();return ve(()=>{var n;return t(e.translationKey,e.translationValues,(n=e.children)==null?void 0:n.toString())})};function Nt(e,t){let n;typeof t=="string"?n=t:n=ao()?t.twaReturnUrl||t.returnStrategy:"none";const r=LE(e,"ret",n);if(!ks(e))return r;const i=r.slice(r.lastIndexOf("&")+1);return r.slice(0,r.lastIndexOf("&"))+"-"+b3(i)}function Qc(e,t){t=Dt({},t);const n=OE(e),r=new URL(n);if(r.searchParams.has("startapp")||r.searchParams.append("startapp","tonconnect"),ao())Ki("ios","android","macos")?(t.returnStrategy="back",t.twaReturnUrl=void 0,El(Nt(r.toString(),t))):Ki("tdesktop")||Ki("weba")?El(Nt(r.toString(),t)):Ki("web")?(t.returnStrategy="back",t.twaReturnUrl=void 0,El(Nt(r.toString(),t))):Yt(Nt(r.toString(),t));else if(xi("ios")){t.returnStrategy==="back"&&(ct("safari")?t.returnStrategy="back":ct("chrome")?t.returnStrategy="googlechrome://":ct("firefox")?t.returnStrategy="firefox://":ct("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=Nt(r.toString(),t.returnStrategy),l=Du(a);To(l,()=>Yt(a))}else{const a=Nt(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("android")){t.returnStrategy="none";const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=Nt(r.toString(),t.returnStrategy),l=Du(a);To(l,()=>Yt(a))}else{const a=Nt(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("ipad")){t.returnStrategy==="back"&&(ct("safari")?t.returnStrategy="back":ct("chrome")?t.returnStrategy="googlechrome://":ct("firefox")?t.returnStrategy="firefox://":ct("opera")?t.returnStrategy="opera-http://":t.returnStrategy=location.href);const i=ct("chrome"),o=ct("firefox");if((i||o)&&!t.forceRedirect){const a=Nt(r.toString(),t.returnStrategy),l=Du(a);To(l,()=>Yt(a))}else{const a=Nt(r.toString(),t.returnStrategy);Yt(a)}}else if(xi("macos","windows","linux"))if(t.returnStrategy="none",t.twaReturnUrl=void 0,t.forceRedirect)Yt(Nt(r.toString(),t));else{const i=Nt(r.toString(),t),o=Du(i);To(o,()=>Yt(i))}else Yt(Nt(r.toString(),t))}function Jc(e,t,n,r){if(n=Dt({},n),ao())if(Ki("ios","android")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve"),r("universal-link");const i=Nt(e,n.returnStrategy);El(i,()=>{r("universal-link"),Yt(i)})}else if(Ki("macos","tdesktop")){n.returnStrategy==="back"&&(n.returnStrategy="tg://resolve");const i=Nt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Pu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else if(Ki("weba")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy=location.href:ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const i=Nt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Pu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else if(Ki("web")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy=location.href:ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href);const i=Nt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Pu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else{r("universal-link");const i=Nt(e,n.returnStrategy);Yt(i)}else if(xi("ios"))n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),ct("chrome")?(r("universal-link"),nd(Nt(e,n.returnStrategy),"_self")):(r("universal-link"),Yt(Nt(e,n.returnStrategy)));else if(xi("android"))n.returnStrategy==="back"&&(ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),r("universal-link"),Yt(Nt(e,n.returnStrategy));else if(xi("ipad"))n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy=location.href),ct("chrome")?(r("universal-link"),nd(Nt(e,n.returnStrategy),"_self")):(r("universal-link"),Yt(Nt(e,n.returnStrategy)));else if(xi("macos","windows","linux")){n.returnStrategy==="back"&&(ct("safari")?n.returnStrategy="none":ct("chrome")?n.returnStrategy="googlechrome://":ct("firefox")?n.returnStrategy="firefox://":ct("opera")?n.returnStrategy="opera-http://":n.returnStrategy="none");const i=Nt(e,n.returnStrategy);!!t&&!n.forceRedirect?(r("custom-deeplink"),To(Pu(i,t),()=>{r("universal-link"),Yt(i)})):(r("universal-link"),Yt(i))}else r("universal-link"),Yt(Nt(e,n.returnStrategy))}function LE(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}function OE(e){const t=new URL(e);return t.searchParams.has("attach")&&(t.searchParams.delete("attach"),t.pathname+="/start"),t.toString()}function Du(e){const t=new URL(e),[,n,r]=t.pathname.split("/"),i=t.searchParams.get("startapp");return`tg://resolve?domain=${n}&appname=${r}&startapp=${i}`}const W4=e=>{const[t,n]=Be("mobile"),[r,i]=Be(!1),[o,s]=Be(),[a,l]=Be(!0),c=cr(Ga),u=c.onStatusChange(()=>{},()=>{e.wallet.appName!==Xi&&i(!0)});lr(u);const d=()=>{try{const k=c.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest);s(k)}catch{}};$n(()=>{Un(t)!=="extension"&&(ql(e.wallet)||yv(e.wallet))&&d()});const h=()=>{i(!1),t()==="extension"&&d(),n("mobile"),Hn(Tr(Dt({},e.wallet),{openMethod:"qrcode"}))},g=()=>{i(!1),t()==="extension"&&d(),n("desktop");const k=!a();l(!1),Jc(o(),e.wallet.deepLink,{returnStrategy:St.returnStrategy,forceRedirect:k},C=>{Hn(Tr(Dt({},e.wallet),{openMethod:C}))})},m=()=>{const k=!a();l(!1),Hn(Tr(Dt({},e.wallet),{openMethod:"universal-link"})),Qc(o(),{returnStrategy:St.returnStrategy,twaReturnUrl:St.twaReturnUrl,forceRedirect:k})},y=()=>{i(!1),n("extension"),Es(e.wallet)&&(Hn(e.wallet),c.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest))};return ql(e.wallet)?h():wv(e.wallet)?y():g(),_(xE,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[_(Ye,{get when(){return!e.backDisabled},get children(){return _(kE,{icon:"arrow",onClick:()=>e.onBackClick()})}}),_(CE,{get children(){return e.wallet.name}}),_(Ye,{get when(){return t()==="mobile"},get children(){return _(SE,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan the QR code below with your phone’s or ",ve(()=>e.wallet.name),"’s camera"]}})}}),_(bE,{get qr(){return t()==="mobile"},get children(){return _(Vc,{get children(){return[_(jn,{get when(){return t()==="mobile"},get children(){return _(_E,{disableCopy:!1,get sourceUrl(){return Nt(o(),"none")},get imageUrl(){return e.wallet.imageUrl}})}}),_(jn,{get when(){return r()},get children(){return[_(TE,{size:"s"}),_(Ru,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"}),_(Tl,{get children(){return _(wn,{get leftIcon(){return _(Vl,{})},get onClick(){return t()==="extension"?y:g},get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}})}})]}}),_(jn,{get when(){return t()==="extension"},get children(){return[_(Ye,{get when(){return Es(e.wallet)},get children(){return[_(ME,{size:"s"}),_(Ru,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name)," browser extension…"]}}),_(Tl,{get children(){return _(wn,{get leftIcon(){return _(Vl,{})},onClick:y,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}})}})]}}),_(Ye,{get when(){return!Es(e.wallet)},get children(){return[_(Ru,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:e.wallet.name}},get children(){return["Seems you don't have installed ",ve(()=>e.wallet.name)," browser extension"]}}),_(Tl,{get children(){return _(fd,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get rightIcon(){return _(sv,{})},onClick:y,get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ve(()=>e.wallet.name)]}})}})}})}})]}})]}}),_(jn,{get when(){return t()==="desktop"},get children(){return[_(ho,{size:"m"}),_(Ru,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name)," on desktop…"]}}),_(Tl,{get children(){return[_(wn,{get leftIcon(){return _(Vl,{})},onClick:g,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(fd,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get rightIcon(){return _(sv,{})},get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Get ",ve(()=>e.wallet.name)]}})}})}})]}})]}})]}})}}),_(Ye,{get when(){return e.wallet.appName===Xi},get children(){return _(PE,{get rightIcon(){return _(AE,{get src(){return Zc.TG}})},scale:"s",onClick:m,get children(){return _(Dn,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),_(Ye,{get when(){return e.wallet.appName!==Xi},get children(){return _(EE,{get children(){return[_(Ye,{get when(){return ve(()=>t()!=="mobile")()&&ql(e.wallet)},get children(){return _(c1,{appearance:"secondary",get leftIcon(){return _(WS,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.mobile",children:"Mobile"})}})}}),_(Ye,{get when(){return ve(()=>t()!=="extension")()&&wv(e.wallet)},get children(){return _(c1,{appearance:"secondary",get leftIcon(){return _(IS,{})},onClick:y,get children(){return _(Dn,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),_(Ye,{get when(){return ve(()=>t()!=="desktop")()&&yv(e.wallet)},get children(){return _(c1,{appearance:"secondary",get leftIcon(){return _(US,{})},onClick:g,get children(){return _(Dn,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},RE=V.div``,DE=V(Vs)` position: absolute; top: 16px; left: 16px; -`,DE=V(Ri)` +`,IE=V(Ri)` margin-bottom: 18px; -`,c1=V.div` +`,u1=V.div` padding: 16px 0; display: flex; flex-direction: column; align-items: center; -`,u1=so` +`,f1=so` margin-bottom: 12px; -`,f1=V(bg)` +`,d1=V(_g)` text-align: center; margin-bottom: 4px; -`,d1=V(Or)` +`,h1=V(Or)` text-align: center; max-width: 352px; color: ${e=>e.theme.colors.text.secondary}; -`,IE=V.div` +`,NE=V.div` padding: 16px 24px 24px; display: flex; align-items: center; justify-content: center; gap: 8px; -`,NE={GET_A_WALLET:"https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1"},W4=e=>_(OE,{"data-tc-wallets-modal-info":"true",get children(){return[_(RE,{icon:"arrow",onClick:()=>e.onBackClick()}),_(DE,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),_(k4,{get children(){return[_(c1,{get children(){return[_(zS,{class:u1}),_(f1,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),_(d1,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),_(c1,{get children(){return[_(YS,{class:u1}),_(f1,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),_(d1,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),_(c1,{get children(){return[_(qS,{class:u1}),_(f1,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),_(d1,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),_(IE,{get children(){return _(ud,{get href(){return NE.GET_A_WALLET},blank:!0,get children(){return _(wn,{get rightIcon(){return _(jS,{})},get children(){return _(Dn,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),WE=V.div``,$E=V.div` +`,WE={GET_A_WALLET:"https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1"},$4=e=>_(RE,{"data-tc-wallets-modal-info":"true",get children(){return[_(DE,{icon:"arrow",onClick:()=>e.onBackClick()}),_(IE,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),_(E4,{get children(){return[_(u1,{get children(){return[_(VS,{class:f1}),_(d1,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),_(h1,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),_(u1,{get children(){return[_(KS,{class:f1}),_(d1,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),_(h1,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),_(u1,{get children(){return[_(GS,{class:f1}),_(d1,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),_(h1,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),_(NE,{get children(){return _(fd,{get href(){return WE.GET_A_WALLET},blank:!0,get children(){return _(wn,{get rightIcon(){return _(HS,{})},get children(){return _(Dn,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),$E=V.div``,UE=V.div` flex: 1; margin-top: 18px; display: flex; @@ -834,49 +834,49 @@ PERFORMANCE OF THIS SOFTWARE. align-items: center; justify-content: center; min-height: 232px; -`,UE=V(Ri)` +`,FE=V(Ri)` max-width: 262px; margin: 0 auto 8px; -`,FE=V(zs)` +`,BE=V(Vs)` position: absolute; top: 16px; left: 16px; -`,BE=V.div` +`,jE=V.div` padding: 16px; display: flex; align-items: center; gap: 12px; - border-top: 0.5px solid ${e=>Vc(e.theme.colors.icon.secondary,.2)}; -`,jE=V(Hs)` + border-top: 0.5px solid ${e=>Yc(e.theme.colors.icon.secondary,.2)}; +`,HE=V(zs)` width: 36px; height: 36px; border-radius: 10px; -`,HE=V(ud)` +`,zE=V(fd)` margin-left: auto; -`,zE=V(ho)` +`,VE=V(ho)` margin-bottom: 18px; margin-top: 2px; -`,VE=V(rh)` +`,YE=V(ih)` margin-bottom: 16px; -`,wv=V(rs)` +`,xv=V(rs)` color: ${e=>e.theme.colors.text.secondary}; text-align: center; margin-bottom: 20px; -`,xv=V.div` +`,bv=V.div` display: flex; justify-content: center; gap: 8px; padding-bottom: 16px; -`,YE=V(Ri)` +`,KE=V(Ri)` margin-bottom: 2px; padding: 0 64px; -`,KE=V(rs)` +`,qE=V(rs)` margin-bottom: 20px; padding: 0 64px; min-height: 44px; -`,qE=V.div` +`,GE=V.div` padding: 0 24px 24px; -`,GE=e=>[_(YE,{get children(){return e.walletInfo.name}}),_(KE,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:e.walletInfo.name}},get children(){return["Scan the QR code below with your phone’s or ",ve(()=>e.walletInfo.name),"’s camera"]}}),_(qE,{get children(){return _(nh,{get imageUrl(){return e.walletInfo.imageUrl},get sourceUrl(){return It(e.universalLink,"none")},disableCopy:!0})}})],$4=e=>{const t=Ft(),[n,r]=Be(!0),[i,o]=Be(!1),[s,a]=Be(!1),l=cr(qa),c=l.onStatusChange(()=>{},()=>{a(!0)}),u=ve(()=>l.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)),d=()=>{Hn(Tr(Rt({},e.wallet),{openMethod:"universal-link"})),Zc(u(),{returnStrategy:Ct.returnStrategy,twaReturnUrl:Ct.twaReturnUrl,forceRedirect:!0})},h=()=>{const k=u();if(Ss(k))return d();a(!1);const C=!n();r(!1),Qc(u(),e.wallet.deepLink,{returnStrategy:Ct.returnStrategy,forceRedirect:C},v=>{Hn(Tr(Rt({},e.wallet),{openMethod:v}))})},g=()=>{a(!1),o(!0),Hn(Tr(Rt({},e.wallet),{openMethod:"qrcode"}))},m=()=>{o(!1),Hn(Tr(Rt({},e.wallet),{openMethod:"universal-link"}))},y=()=>{i()?m():e.onBackClick()};return lr(c),h(),_(WE,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[_(Ye,{get when(){return!e.backDisabled||i()},get children(){return _(FE,{icon:"arrow",onClick:y})}}),_(Ye,{get when(){return i()},get children(){return _(GE,{get universalLink(){return u()},get walletInfo(){return e.wallet}})}}),_(Ye,{get when(){return!i()},get children(){return[_(UE,{get children(){return e.wallet.name}}),_($E,{get children(){return[_(Ye,{get when(){return s()},get children(){return[_(VE,{size:"s"}),_(wv,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"}),_(xv,{get children(){return[_(wn,{get leftIcon(){return _(zl,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(wn,{get leftIcon(){return _(W0,{get fill(){return t.colors.accent}})},onClick:g,get children(){return _(Dn,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}}),_(Ye,{get when(){return!s()},get children(){return[_(zE,{size:"s"}),_(wv,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name),"…"]}}),_(xv,{get children(){return[_(wn,{get leftIcon(){return _(zl,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(wn,{get leftIcon(){return _(W0,{get fill(){return t.colors.accent}})},onClick:g,get children(){return _(Dn,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),_(BE,{get children(){return[_(jE,{get src(){return e.wallet.imageUrl}}),_(bg,{get children(){return e.wallet.name}}),_(HE,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get children(){return _(Dn,{translationKey:"common.get",children:"GET"})}})}})]}})]}})]}})},U4={m:"16px",s:"12px",none:"0"},ZE={m:"6px",s:"6px",none:"0"},QE=V.ul` +`,ZE=e=>[_(KE,{get children(){return e.walletInfo.name}}),_(qE,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:e.walletInfo.name}},get children(){return["Scan the QR code below with your phone’s or ",ve(()=>e.walletInfo.name),"’s camera"]}}),_(GE,{get children(){return _(rh,{get imageUrl(){return e.walletInfo.imageUrl},get sourceUrl(){return Nt(e.universalLink,"none")},disableCopy:!0})}})],U4=e=>{const t=Bt(),[n,r]=Be(!0),[i,o]=Be(!1),[s,a]=Be(!1),l=cr(Ga),c=l.onStatusChange(()=>{},()=>{a(!0)}),u=ve(()=>l.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)),d=()=>{Hn(Tr(Dt({},e.wallet),{openMethod:"universal-link"})),Qc(u(),{returnStrategy:St.returnStrategy,twaReturnUrl:St.twaReturnUrl,forceRedirect:!0})},h=()=>{const k=u();if(ks(k))return d();a(!1);const C=!n();r(!1),Jc(u(),e.wallet.deepLink,{returnStrategy:St.returnStrategy,forceRedirect:C},v=>{Hn(Tr(Dt({},e.wallet),{openMethod:v}))})},g=()=>{a(!1),o(!0),Hn(Tr(Dt({},e.wallet),{openMethod:"qrcode"}))},m=()=>{o(!1),Hn(Tr(Dt({},e.wallet),{openMethod:"universal-link"}))},y=()=>{i()?m():e.onBackClick()};return lr(c),h(),_($E,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[_(Ye,{get when(){return!e.backDisabled||i()},get children(){return _(BE,{icon:"arrow",onClick:y})}}),_(Ye,{get when(){return i()},get children(){return _(ZE,{get universalLink(){return u()},get walletInfo(){return e.wallet}})}}),_(Ye,{get when(){return!i()},get children(){return[_(FE,{get children(){return e.wallet.name}}),_(UE,{get children(){return[_(Ye,{get when(){return s()},get children(){return[_(YE,{size:"s"}),_(xv,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"}),_(bv,{get children(){return[_(wn,{get leftIcon(){return _(Vl,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(wn,{get leftIcon(){return _($0,{get fill(){return t.colors.accent}})},onClick:g,get children(){return _(Dn,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}}),_(Ye,{get when(){return!s()},get children(){return[_(VE,{size:"s"}),_(xv,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:e.wallet.name}},get children(){return["Continue in ",ve(()=>e.wallet.name),"…"]}}),_(bv,{get children(){return[_(wn,{get leftIcon(){return _(Vl,{})},onClick:h,get children(){return _(Dn,{translationKey:"common.retry",children:"Retry"})}}),_(wn,{get leftIcon(){return _($0,{get fill(){return t.colors.accent}})},onClick:g,get children(){return _(Dn,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),_(jE,{get children(){return[_(HE,{get src(){return e.wallet.imageUrl}}),_(_g,{get children(){return e.wallet.name}}),_(zE,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return _(wn,{get children(){return _(Dn,{translationKey:"common.get",children:"GET"})}})}})]}})]}})]}})},F4={m:"16px",s:"12px",none:"0"},QE={m:"6px",s:"6px",none:"0"},JE=V.ul` display: flex; justify-content: space-between; margin: 0 auto; @@ -898,7 +898,7 @@ PERFORMANCE OF THIS SOFTWARE. > li { height: fit-content; } -`,bv=V.li` +`,_v=V.li` width: 82px; min-width: 82px; height: 124px; @@ -912,7 +912,7 @@ PERFORMANCE OF THIS SOFTWARE. transition: transform 0.1s ease-in-out; - ${Kc} { + ${qc} { &:hover { transform: scale(1.04); } @@ -922,12 +922,12 @@ PERFORMANCE OF THIS SOFTWARE. transform: scale(0.96); } - ${Yc} { + ${Kc} { &:active { transform: scale(0.92); } } -`,JE=V.div` +`,XE=V.div` width: 1px; margin: 0 10px; height: 24px; @@ -936,31 +936,31 @@ PERFORMANCE OF THIS SOFTWARE. background-color: ${e=>e.theme.colors.icon.secondary}; opacity: 0.2; -`,_v=V.div` +`,Cv=V.div` width: 60px; height: 60px; - border-radius: ${e=>U4[e.theme.borderRadius]}; + border-radius: ${e=>F4[e.theme.borderRadius]}; display: flex; align-items: center; justify-content: center; background-color: ${e=>e.theme.colors.background.tint}; margin-bottom: 8px; -`,XE=V(Ri)` +`,eM=V(Ri)` margin-top: 38px; margin-bottom: 4px; padding: 0 24px; -`,eM=V(rs)` +`,tM=V(rs)` margin-bottom: 24px; padding: 0 24px; min-height: 44px; `;V(wn)` display: block; margin: 0 auto; -`;const tM=V(wn)` +`;const nM=V(wn)` margin: 0 24px 24px; width: calc(100% - 48px); - border-radius: ${e=>U4[e.theme.borderRadius]}; + border-radius: ${e=>F4[e.theme.borderRadius]}; padding: 14px 16px 14px 14px; background-color: ${e=>e.theme.colors.telegramButton}; @@ -968,36 +968,36 @@ PERFORMANCE OF THIS SOFTWARE. font-weight: 590; font-size: 16px; line-height: 20px; -`,nM=V(Hs)` - border-radius: ${e=>ZE[e.theme.borderRadius]}; +`,rM=V(zs)` + border-radius: ${e=>QE[e.theme.borderRadius]}; width: 24px; height: 24px; -`,Cv=V(zs)` +`,Sv=V(Vs)` position: absolute; top: 16px; left: 16px; -`,rM=V(Ri)` +`,iM=V(Ri)` margin-bottom: 2px; padding: 0 64px; -`,iM=V(rs)` +`,oM=V(rs)` margin-bottom: 20px; padding: 0 64px; -`,oM=V.div` +`,sM=V.div` padding: 0 24px 24px; -`,sM=e=>[_(rM,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(iM,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),_(oM,{get children(){return _(nh,{get imageUrl(){return Gc.TON},get sourceUrl(){return It(e.universalLink,"none")},disableCopy:!0})}})];function F4(e){const t=new Set(e.filter(sg).map(n=>n.bridgeUrl));return Array.from(t).map(n=>({bridgeUrl:n}))}function B4(e,t){const n=new Set(e==null?void 0:e.map(i=>i.bridgeUrl)),r=new Set(t==null?void 0:t.map(i=>i.bridgeUrl));return n.size===r.size&&[...n].every(i=>r.has(i))}const Sv=gt("
  • "),aM=gt('
    '),lM=e=>{const[t,n]=Be(!1),[r,i]=Be(!0),[o,s]=Be(null),a=Ct.connector,l=()=>e.walletsList.filter(w=>Kl(w)&&w.appName!==Xi),c=()=>l().length>7,u=ve(()=>F4(e.walletsList),null,{equals:B4}),d=()=>(o()||s(a.connect(u(),e.additionalRequest)),o());Hn({openMethod:"universal-link"});const[h,g]=Be(void 0),m=()=>At(void 0,null,function*(){h()!==void 0&&clearTimeout(h()),yield xg(d());const w=setTimeout(()=>g(void 0),1500);g(w)}),y=()=>{const w=!r();i(!1),Qc(d(),void 0,{returnStrategy:Ct.returnStrategy,forceRedirect:w},M=>{Hn({openMethod:M})})},k=()=>{s(null);const w=e.walletsList.find(O=>O.appName===Xi);if(!w||!sg(w))throw new vn("@wallet bot not found in the wallets list");const M=a.connect({bridgeUrl:w.bridgeUrl,universalLink:w.universalLink},e.additionalRequest),E=!r();i(!1),Zc(M,{returnStrategy:Ct.returnStrategy,twaReturnUrl:Ct.twaReturnUrl,forceRedirect:E})},C=()=>{n(!0),Hn({openMethod:"qrcode"})},v=()=>{n(!1),Hn({openMethod:"universal-link"})};return(()=>{const w=aM.cloneNode(!0);return Xn(w,_(Ye,{get when(){return t()},get children(){return[_(Cv,{icon:"arrow",onClick:v}),_(sM,{get universalLink(){return d()}})]}}),null),Xn(w,_(Ye,{get when(){return!t()},get children(){return[_(Cv,{get icon(){return _(W0,{})},onClick:C}),_(XE,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(eM,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOrSelect",children:"Open Wallet in Telegram or select your wallet to connect"}),_(tM,{get leftIcon(){return _(ZS,{})},get rightIcon(){return _(nM,{get src(){return Gc.TG}})},onClick:k,scale:"s",get children(){return _(Dn,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Open Wallet in Telegram"})}}),_(QE,{get children(){return[_(Hc,{get each(){return ve(()=>!!c())()?l().slice(0,4):l()},children:M=>(()=>{const E=Sv.cloneNode(!0);return Xn(E,_(ld,{get icon(){return M.imageUrl},get name(){return M.name},onClick:()=>e.onSelect(M)})),E})()}),_(Ye,{get when(){return c()},get children(){const M=Sv.cloneNode(!0);return Xn(M,_(C4,{labelLine1:"View all",labelLine2:"wallets",get images(){return l().slice(3,7).map(E=>E.imageUrl)},onClick:()=>e.onSelectAllWallets()})),M}}),_(JE,{children:" "}),_(bv,{onClick:y,get children(){return[_(_v,{get children(){return _(vS,{})}}),_(Or,{fontWeight:590,translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})]}}),_(bv,{onClick:m,get children(){return[_(_v,{get children(){return ve(()=>h()!==void 0)()?_(JS,{}):_(_4,{})}}),_(Or,{fontWeight:590,get translationKey(){return h()!==void 0?"common.copied":"common.copyLink"},get children(){return h()!==void 0?"Copied":"Copy Link"}})]}})]}})]}}),null),w})()},j4={m:"16px",s:"8px",none:"0"},cM={m:"8px",s:"4px",none:"0"},uM=V.div` +`,aM=e=>[_(iM,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(oM,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),_(sM,{get children(){return _(rh,{get imageUrl(){return Zc.TON},get sourceUrl(){return Nt(e.universalLink,"none")},disableCopy:!0})}})];function B4(e){const t=new Set(e.filter(ag).map(n=>n.bridgeUrl));return Array.from(t).map(n=>({bridgeUrl:n}))}function j4(e,t){const n=new Set(e==null?void 0:e.map(i=>i.bridgeUrl)),r=new Set(t==null?void 0:t.map(i=>i.bridgeUrl));return n.size===r.size&&[...n].every(i=>r.has(i))}const kv=mt("
  • "),lM=mt('
    '),cM=e=>{const[t,n]=Be(!1),[r,i]=Be(!0),[o,s]=Be(null),a=St.connector,l=()=>e.walletsList.filter(w=>ql(w)&&w.appName!==Xi),c=()=>l().length>7,u=ve(()=>B4(e.walletsList),null,{equals:j4}),d=()=>(o()||s(a.connect(u(),e.additionalRequest)),o());Hn({openMethod:"universal-link"});const[h,g]=Be(void 0),m=()=>Lt(void 0,null,function*(){h()!==void 0&&clearTimeout(h()),yield bg(d());const w=setTimeout(()=>g(void 0),1500);g(w)}),y=()=>{const w=!r();i(!1),Jc(d(),void 0,{returnStrategy:St.returnStrategy,forceRedirect:w},M=>{Hn({openMethod:M})})},k=()=>{s(null);const w=e.walletsList.find(O=>O.appName===Xi);if(!w||!ag(w))throw new vn("@wallet bot not found in the wallets list");const M=a.connect({bridgeUrl:w.bridgeUrl,universalLink:w.universalLink},e.additionalRequest),E=!r();i(!1),Qc(M,{returnStrategy:St.returnStrategy,twaReturnUrl:St.twaReturnUrl,forceRedirect:E})},C=()=>{n(!0),Hn({openMethod:"qrcode"})},v=()=>{n(!1),Hn({openMethod:"universal-link"})};return(()=>{const w=lM.cloneNode(!0);return Xn(w,_(Ye,{get when(){return t()},get children(){return[_(Sv,{icon:"arrow",onClick:v}),_(aM,{get universalLink(){return d()}})]}}),null),Xn(w,_(Ye,{get when(){return!t()},get children(){return[_(Sv,{get icon(){return _($0,{})},onClick:C}),_(eM,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(tM,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOrSelect",children:"Open Wallet in Telegram or select your wallet to connect"}),_(nM,{get leftIcon(){return _(QS,{})},get rightIcon(){return _(rM,{get src(){return Zc.TG}})},onClick:k,scale:"s",get children(){return _(Dn,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Open Wallet in Telegram"})}}),_(JE,{get children(){return[_(zc,{get each(){return ve(()=>!!c())()?l().slice(0,4):l()},children:M=>(()=>{const E=kv.cloneNode(!0);return Xn(E,_(cd,{get icon(){return M.imageUrl},get name(){return M.name},onClick:()=>e.onSelect(M)})),E})()}),_(Ye,{get when(){return c()},get children(){const M=kv.cloneNode(!0);return Xn(M,_(S4,{labelLine1:"View all",labelLine2:"wallets",get images(){return l().slice(3,7).map(E=>E.imageUrl)},onClick:()=>e.onSelectAllWallets()})),M}}),_(XE,{children:" "}),_(_v,{onClick:y,get children(){return[_(Cv,{get children(){return _(yS,{})}}),_(Or,{fontWeight:590,translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})]}}),_(_v,{onClick:m,get children(){return[_(Cv,{get children(){return ve(()=>h()!==void 0)()?_(XS,{}):_(C4,{})}}),_(Or,{fontWeight:590,get translationKey(){return h()!==void 0?"common.copied":"common.copyLink"},get children(){return h()!==void 0?"Copied":"Copy Link"}})]}})]}})]}}),null),w})()},H4={m:"16px",s:"8px",none:"0"},uM={m:"8px",s:"4px",none:"0"},fM=V.div` display: flex; flex-direction: column; align-items: center; padding-bottom: 16px; -`,fM=V(rs)` +`,dM=V(rs)` max-width: 320px; margin-top: 2px; margin-bottom: 20px; -`,dM=V(rs)` +`,hM=V(rs)` margin-bottom: 16px; -`,hM=V(nh)` +`,pM=V(rh)` margin-bottom: 24px; -`,pM=V.ul` +`,gM=V.ul` display: flex; `;V.div` display: flex; @@ -1010,7 +1010,7 @@ PERFORMANCE OF THIS SOFTWARE. width: 100%; padding: 0 16px; height: 56px; - border-radius: ${e=>j4[e.theme.borderRadius]}; + border-radius: ${e=>H4[e.theme.borderRadius]}; &:hover { ${e=>e.disableEventsAnimation?"transform: unset;":""} @@ -1029,7 +1029,7 @@ PERFORMANCE OF THIS SOFTWARE. transform: translateY(-16px); background-color: ${e=>e.theme.colors.background.primary}; - border-radius: ${e=>j4[e.theme.borderRadius]}; + border-radius: ${e=>H4[e.theme.borderRadius]}; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); `;V.li` padding: 8px; @@ -1039,7 +1039,7 @@ PERFORMANCE OF THIS SOFTWARE. gap: 8px; cursor: pointer; - border-radius: ${e=>cM[e.theme.borderRadius]}; + border-radius: ${e=>uM[e.theme.borderRadius]}; transition: background-color, transform 0.1s ease-in-out; @@ -1050,7 +1050,7 @@ PERFORMANCE OF THIS SOFTWARE. &:active { transform: scale(0.96); } -`;V(Hs)` +`;V(zs)` width: 24px; height: 24px; @@ -1065,14 +1065,14 @@ PERFORMANCE OF THIS SOFTWARE. `;V(Or)` color: ${e=>e.theme.colors.text.secondary}; font-size: 16px; -`;const gM=gt("
  • "),mM=e=>{const[t,n]=Be(!1),r=Ct.connector,i=ve(()=>F4(e.walletsList),null,{equals:B4});Hn({openMethod:"qrcode"});const o=ve(()=>r.connect(i(),e.additionalRequest));return _(uM,{onClick:()=>n(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[_(Ri,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(fM,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),_(hM,{get sourceUrl(){return It(o(),"none")},get disableCopy(){return t()},get imageUrl(){return Gc.TON}}),_(dM,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),_(pM,{get children(){return[_(Hc,{get each(){return e.walletsList.slice(0,3)},children:s=>(()=>{const a=gM.cloneNode(!0);return Xn(a,_(S4,{wallet:s,onClick:()=>e.onSelect(s)})),a})()}),_(C4,{labelLine1:"View all",labelLine2:"wallets",get images(){return e.walletsList.slice(3,7).map(s=>s.imageUrl)},onClick:()=>e.onSelectAllWallets()})]}})]}})},vM=()=>{const{locale:e}=Oi()[1];$n(()=>e(Ct.language)),$n(()=>{Z2()?cd():(o(null),a("universal"),c(!1))});const t=cr(qa),n=cr(is),[r]=W9(()=>n.getWallets()),[i,o]=Be(null),[s,a]=Be("universal"),[l,c]=Be(!1),u=ve(()=>{if(r.state!=="ready")return null;let v=Eg(r(),Ct.walletsListConfiguration);const w=v.filter(ks),M=v.filter(L=>!ks(L));v=(w||[]).concat(M);const E=Ct.preferredWalletAppName,O=v.find(L=>ko(L,E)),T=v.filter(L=>ko(L,E)).length>=2;E&&O&&!T&&(v=[Tr(Rt({},O),{isPreferred:!0})].concat(v.filter(L=>!ko(L,E))));const P=v.find(L=>ko(L,Xi));return P&&(v=[P].concat(v.filter(L=>!ko(L,Xi)))),v}),d=()=>{var v;return((v=Ct.connectRequestParameters)==null?void 0:v.state)==="loading"},h=ve(()=>{var v;if(!d())return(v=Ct.connectRequestParameters)==null?void 0:v.value}),g=v=>{n.closeModal(v)},m=t.onStatusChange(v=>{v&&g("wallet-selected")}),y=()=>{a("all-wallets")},k=()=>{a("universal")},C=()=>{o(null)};return lr(()=>{o(null),c(!1)}),lr(m),_(R4,{get opened(){return Z2()},get enableAndroidBackHandler(){return Ct.enableAndroidBackHandler},onClose:()=>g("action-cancelled"),onClickQuestion:()=>c(v=>!v),"data-tc-wallets-modal-container":"true",get children(){return[_(Ye,{get when(){return l()},get children(){return _(W4,{onBackClick:()=>c(!1)})}}),_(Ye,{get when(){return!l()},get children(){return[_(Ye,{get when(){return d()||!u()},get children(){return[_(D4,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),_(I4,{get children(){return _(ho,{size:"m"})}})]}}),_(Ye,{get when(){return ve(()=>!d())()&&u()},get children(){return _(zc,{get children(){return[_(jn,{get when(){return i()},get children(){return _(Na,{get component(){return $a()?$4:N4},get wallet(){return i()},get additionalRequest(){return h()},onBackClick:C})}}),_(jn,{get when(){return s()==="universal"},get children(){return _(Na,{get component(){return $a()?lM:mM},onSelect:o,get walletsList(){return u()},get additionalRequest(){return h()},onSelectAllWallets:y})}}),_(jn,{get when(){return s()==="all-wallets"},get children(){return _(mE,{get walletsList(){return u()},onBack:k,onSelect:o})}})]}})}})]}})]}})},yM=V.div` +`;const mM=mt("
  • "),vM=e=>{const[t,n]=Be(!1),r=St.connector,i=ve(()=>B4(e.walletsList),null,{equals:j4});Hn({openMethod:"qrcode"});const o=ve(()=>r.connect(i(),e.additionalRequest));return _(fM,{onClick:()=>n(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[_(Ri,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),_(dM,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),_(pM,{get sourceUrl(){return Nt(o(),"none")},get disableCopy(){return t()},get imageUrl(){return Zc.TON}}),_(hM,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),_(gM,{get children(){return[_(zc,{get each(){return e.walletsList.slice(0,3)},children:s=>(()=>{const a=mM.cloneNode(!0);return Xn(a,_(k4,{wallet:s,onClick:()=>e.onSelect(s)})),a})()}),_(S4,{labelLine1:"View all",labelLine2:"wallets",get images(){return e.walletsList.slice(3,7).map(s=>s.imageUrl)},onClick:()=>e.onSelectAllWallets()})]}})]}})},yM=()=>{const{locale:e}=Oi()[1];$n(()=>e(St.language)),$n(()=>{Q2()?ud():(o(null),a("universal"),c(!1))});const t=cr(Ga),n=cr(is),[r]=$9(()=>n.getWallets()),[i,o]=Be(null),[s,a]=Be("universal"),[l,c]=Be(!1),u=ve(()=>{if(r.state!=="ready")return null;let v=Mg(r(),St.walletsListConfiguration);const w=v.filter(Es),M=v.filter(L=>!Es(L));v=(w||[]).concat(M);const E=St.preferredWalletAppName,O=v.find(L=>ko(L,E)),T=v.filter(L=>ko(L,E)).length>=2;E&&O&&!T&&(v=[Tr(Dt({},O),{isPreferred:!0})].concat(v.filter(L=>!ko(L,E))));const P=v.find(L=>ko(L,Xi));return P&&(v=[P].concat(v.filter(L=>!ko(L,Xi)))),v}),d=()=>{var v;return((v=St.connectRequestParameters)==null?void 0:v.state)==="loading"},h=ve(()=>{var v;if(!d())return(v=St.connectRequestParameters)==null?void 0:v.value}),g=v=>{n.closeModal(v)},m=t.onStatusChange(v=>{v&&g("wallet-selected")}),y=()=>{a("all-wallets")},k=()=>{a("universal")},C=()=>{o(null)};return lr(()=>{o(null),c(!1)}),lr(m),_(D4,{get opened(){return Q2()},get enableAndroidBackHandler(){return St.enableAndroidBackHandler},onClose:()=>g("action-cancelled"),onClickQuestion:()=>c(v=>!v),"data-tc-wallets-modal-container":"true",get children(){return[_(Ye,{get when(){return l()},get children(){return _($4,{onBackClick:()=>c(!1)})}}),_(Ye,{get when(){return!l()},get children(){return[_(Ye,{get when(){return d()||!u()},get children(){return[_(I4,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),_(N4,{get children(){return _(ho,{size:"m"})}})]}}),_(Ye,{get when(){return ve(()=>!d())()&&u()},get children(){return _(Vc,{get children(){return[_(jn,{get when(){return i()},get children(){return _(Wa,{get component(){return Ua()?U4:W4},get wallet(){return i()},get additionalRequest(){return h()},onBackClick:C})}}),_(jn,{get when(){return s()==="universal"},get children(){return _(Wa,{get component(){return Ua()?cM:vM},onSelect:o,get walletsList(){return u()},get additionalRequest(){return h()},onSelectAllWallets:y})}}),_(jn,{get when(){return s()==="all-wallets"},get children(){return _(vE,{get walletsList(){return u()},onBack:k,onSelect:o})}})]}})}})]}})]}})},wM=V.div` display: flex; flex-direction: column; align-items: center; padding-bottom: 8px; -`,wM=V(Ri)` +`,xM=V(Ri)` margin-top: 16px; -`,xM=V(Or)` +`,bM=V(Or)` font-weight: 510; font-size: 16px; line-height: 20px; @@ -1080,15 +1080,15 @@ PERFORMANCE OF THIS SOFTWARE. max-width: 250px; color: ${e=>e.theme.colors.text.secondary}; -`,bM=V(wn)` +`,_M=V(wn)` min-width: 112px; margin-top: 32px; -`,_M=V(ho)` +`,CM=V(ho)` height: 16px; width: 16px; -`,kv=V(wn)` +`,Ev=V(wn)` margin-top: 32px; -`,Mg=e=>{const t=qc(e),n=cr(is),[r,i]=Be(!0),[o,s]=Be(!1);$n(()=>{const u=zi();s(!!u&&"sent"in u&&u.sent)});let a;n!=null&&n.wallet&&"universalLink"in n.wallet&&(n.wallet.openMethod==="universal-link"||Ss(n.wallet.universalLink)&&ao())&&(a=n.wallet.universalLink);let l;n!=null&&n.wallet&&"deepLink"in n.wallet&&(n.wallet.openMethod==="custom-deeplink"||Ss(n.wallet.deepLink)&&ao())&&(l=n.wallet.deepLink);const c=()=>{const u=zi(),d="returnStrategy"in u?u.returnStrategy:Ct.returnStrategy,h=!r();i(!1),Ss(a)?Zc(a,{returnStrategy:d,twaReturnUrl:"twaReturnUrl"in u?u.twaReturnUrl:Ct.twaReturnUrl,forceRedirect:h}):Qc(a,l,{returnStrategy:d,forceRedirect:h},()=>{})};return _(yM,Ei(t,{get children(){return[ve(()=>e.icon),_(wM,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),_(xM,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),_(Ye,{get when(){return!o()&&(e.showButton==="open-wallet"&&a||e.showButton!=="open-wallet")},get children(){return _(bM,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return _(_M,{})}})}}),_(Ye,{get when(){return o()},get children(){return[_(Ye,{get when(){return e.showButton!=="open-wallet"},get children(){return _(kv,{onClick:()=>e.onClose(),get children(){return _(Dn,{translationKey:"common.close",children:"Close"})}})}}),_(Ye,{get when(){return e.showButton==="open-wallet"&&a},get children(){return _(kv,{onClick:c,get children(){return _(Dn,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},CM=e=>{const t=cr(is),[n]=Oi(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return _(Mg,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:r()}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return _(ho,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},SM=e=>_(Mg,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return _(rh,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),kM=e=>_(Mg,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return _(_g,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),EM=()=>_(v4,{get opened(){var e;return ve(()=>zi()!==null)()&&((e=zi())==null?void 0:e.openModal)===!0},get enableAndroidBackHandler(){return Ct.enableAndroidBackHandler},onClose:()=>ga(null),"data-tc-actions-modal-container":"true",get children(){return _(zc,{get children(){return[_(jn,{get when(){return zi().name==="transaction-sent"},get children(){return _(kM,{onClose:()=>ga(null)})}}),_(jn,{get when(){return zi().name==="transaction-canceled"},get children(){return _(SM,{onClose:()=>ga(null)})}}),_(jn,{get when(){return zi().name==="confirm-transaction"},get children(){return _(CM,{onClose:()=>ga(null)})}})]}})}}),MM=()=>{const{locale:e}=Oi()[1];$n(()=>e(Ct.language)),$n(()=>{J2()&&cd()});const t=cr(qa),n=cr(is),[r,i]=Be(!1),o=()=>{var c;return((c=Ct.connectRequestParameters)==null?void 0:c.state)==="loading"},s=ve(()=>{var c;if(!o())return(c=Ct.connectRequestParameters)==null?void 0:c.value}),a=c=>{n.closeSingleWalletModal(c)},l=t.onStatusChange(c=>{c&&a("wallet-selected")});return lr(l),lr(()=>{i(!1)}),_(R4,{get opened(){return J2()},get enableAndroidBackHandler(){return Ct.enableAndroidBackHandler},onClose:()=>a("action-cancelled"),onClickQuestion:()=>i(c=>!c),"data-tc-wallets-modal-container":"true",get children(){return[_(Ye,{get when(){return r()},get children(){return _(W4,{onBackClick:()=>i(!1)})}}),_(Ye,{get when(){return!r()},get children(){return[_(Ye,{get when(){return o()},get children(){return[_(D4,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),_(I4,{get children(){return _(ho,{size:"m"})}})]}}),_(Ye,{get when(){return!o()},get children(){return _(Na,{get component(){return $a()?$4:N4},get wallet(){return $7()},get additionalRequest(){return s()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},TM=e=>{const t=nS(tC,Ct.language);return O7(),L7(),_(x4.Provider,{value:t,get children(){return _(is.Provider,{get value(){return e.tonConnectUI},get children(){return _(qa.Provider,{get value(){return Ct.connector},get children(){return[_(C7,{}),_(b7,{theme:cC,get children(){return[_(Ye,{get when(){return Ct.buttonRootId},get children(){return _(X3,{get mount(){return document.getElementById(Ct.buttonRootId)},get children(){return _(sE,{})}})}}),_(Na,{component:ji,get children(){return[_(vM,{}),_(MM,{}),_(EM,{})]}})]}})]}})}})}})},kr={openWalletsModal:()=>void setTimeout(()=>G2({status:"opened",closeReason:null})),closeWalletsModal:e=>void setTimeout(()=>G2({status:"closed",closeReason:e})),openSingleWalletModal:e=>{setTimeout(()=>Q2({status:"opened",closeReason:null,walletInfo:e}))},closeSingleWalletModal:e=>void setTimeout(()=>Q2({status:"closed",closeReason:e})),setAction:e=>void setTimeout(()=>ga(e)),clearAction:()=>void setTimeout(()=>ga(null)),getSelectedWalletInfo:()=>U7(),removeSelectedWalletInfo:()=>Hn(null),renderApp:(e,t)=>n7(()=>_(TM,{tonConnectUI:t}),document.getElementById(e))};class PM{constructor(t){$e(this,"connector"),$e(this,"setConnectRequestParametersCallback"),$e(this,"consumers",[]),$e(this,"tracker"),$e(this,"state",O0()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,$n(()=>{const n=O0();this.state=n,this.consumers.forEach(r=>r(n))})}open(){return At(this,null,function*(){this.tracker.trackConnectionStarted();const n=(yield this.connector.getWallets()).find(Qd);return n?this.connectEmbeddedWallet(n):this.openWalletsModal()})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),kr.closeWalletsModal(t)}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=Ct.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openWalletsModal(){return At(this,null,function*(){return ao()&&yg(),kr.openWalletsModal(),new Promise(t=>{const n=this.onStateChange(r=>{const{status:i}=r;i==="opened"&&(n(),t())})})})}}class AM{constructor(t){$e(this,"connector"),$e(this,"consumers",[]),this.connector=t.connector,$n(()=>{const n=zi();this.consumers.forEach(r=>r(n))})}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}}class LM{constructor(t){$e(this,"connector"),$e(this,"setConnectRequestParametersCallback"),$e(this,"consumers",[]),$e(this,"tracker"),$e(this,"state",nd()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,$n(()=>{const n=nd();this.state=n,this.consumers.forEach(r=>r(n))})}open(t){return At(this,null,function*(){this.tracker.trackConnectionStarted();const n=yield this.connector.getWallets(),r=Eg(n,Ct.walletsListConfiguration),i=r.find(Qd);if(!!i)return this.connectEmbeddedWallet(i);const a=r.filter(sg).find(u=>ko(u,t));if(!!a)return this.openSingleWalletModal(a);const c=`Trying to open modal window with unknown wallet "${t}".`;throw this.tracker.trackConnectionError(c),new vn(c)})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),kr.closeSingleWalletModal("action-cancelled")}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=Ct.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openSingleWalletModal(t){return At(this,null,function*(){return ao()&&yg(),kr.openSingleWalletModal(t),new Promise(n=>{const r=this.onStateChange(i=>{const{status:o}=i;o==="opened"&&(r(),n())})})})}}class OM{constructor(t){$e(this,"eventPrefix","ton-connect-ui-"),$e(this,"tonConnectUiVersion"),$e(this,"tonConnectSdkVersion",null),$e(this,"eventDispatcher");var n;this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!=null?n:new N3,this.tonConnectUiVersion=t.tonConnectUiVersion,this.init().catch()}get version(){return js({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return At(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch{}})}setRequestVersionHandler(){return At(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>At(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",k3(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return At(this,null,function*(){return new Promise((t,n)=>At(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",S3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){var n;try{(n=this.eventDispatcher)==null||n.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=E3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=M3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=T3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=P3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=A3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=L3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=I3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=R3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const RM="2.0.5";class DM{constructor(t){if($e(this,"walletInfoStorage",new N7),$e(this,"preferredWalletStorage",new W7),$e(this,"tracker"),$e(this,"walletInfo",null),$e(this,"systemThemeChangeUnsubscribe",null),$e(this,"actionsConfiguration"),$e(this,"walletsList"),$e(this,"connectRequestParametersCallback"),$e(this,"connector"),$e(this,"modal"),$e(this,"singleWalletModal"),$e(this,"transactionModal"),$e(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 Ns({manifestUrl:t.manifestUrl,eventDispatcher:t==null?void 0:t.eventDispatcher});else throw new vn("You have to specify a `manifestUrl` or a `connector` in the options.");this.tracker=new OM({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectUiVersion:RM}),this.modal=new PM({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.singleWalletModal=new LM({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.transactionModal=new AM({connector:this.connector}),this.walletsList=this.getWallets(),this.walletsList.then(i=>i4(aE(i.map(o=>o.imageUrl))));const n=this.normalizeWidgetRoot(t==null?void 0:t.widgetRootId);this.subscribeToWalletChange(),(t==null?void 0:t.restoreConnection)!==!1&&(this.connectionRestored=R7(()=>At(this,null,function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))),this.uiOptions=Ho(t,{uiPreferences:{theme:"SYSTEM"}});const r=this.preferredWalletStorage.getPreferredWalletAppName();Lu({connector:this.connector,preferredWalletAppName:r}),kr.renderApp(n,this)}static getWallets(){return Ns.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?Rt(Rt({},this.connector.wallet),this.walletInfo):null}set uiOptions(t){var n,r,i,o,s;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(n=t.uiPreferences)!=null&&n.theme?((r=t.uiPreferences)==null?void 0:r.theme)!=="SYSTEM"?((i=this.systemThemeChangeUnsubscribe)==null||i.call(this),i1(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(i1(M7(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=T7(i1))):(o=t.uiPreferences)!=null&&o.colorsSet&&fC(t.uiPreferences.colorsSet),(s=t.uiPreferences)!=null&&s.borderRadius&&uC(t.uiPreferences.borderRadius),Lu(a=>{var l,c;const u=Ho(Rt(Rt(Rt(Rt({},t.language&&{language:t.language}),!!((l=t.actionsConfiguration)!=null&&l.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!((c=t.actionsConfiguration)!=null&&c.twaReturnUrl)&&{twaReturnUrl:t.actionsConfiguration.twaReturnUrl}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),Wa(a));return t.buttonRootId!==void 0&&(u.buttonRootId=t.buttonRootId),t.enableAndroidBackHandler!==void 0&&(u.enableAndroidBackHandler=t.enableAndroidBackHandler),u})}setConnectRequestParameters(t){var n;Lu({connectRequestParameters:t}),((t==null?void 0:t.state)==="ready"||!t)&&((n=this.connectRequestParametersCallback)==null||n.call(this,t==null?void 0:t.value))}getWallets(){return At(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,n){return this.connector.onStatusChange(r=>At(this,null,function*(){if(r){const i=yield this.getSelectedWalletInfo(r);t(Rt(Rt({},r),i||this.walletInfoStorage.getWalletInfo()))}else t(r)}),n)}openModal(){return At(this,null,function*(){return this.modal.open()})}closeModal(t){this.modal.close(t)}onModalStateChange(t){return this.modal.onStateChange(t)}get modalState(){return this.modal.state}openSingleWalletModal(t){return At(this,null,function*(){return this.singleWalletModal.open(t)})}closeSingleWalletModal(t){this.singleWalletModal.close(t)}onSingleWalletModalStateChange(t){return this.singleWalletModal.onStateChange(t)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return At(this,null,function*(){const n=(yield this.getWallets()).find(Qd);return n?yield this.connectEmbeddedWallet(n):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),kr.clearAction(),kr.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,n){return At(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,t),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,t,"Wallet was not connected"),new vn("Connect wallet to send a transaction.");ao()&&yg();const{notifications:r,modals:i,returnStrategy:o,twaReturnUrl:s,skipRedirectToWallet:a}=this.getModalsAndNotificationsConfiguration(n);kr.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:i.includes("before"),sent:!1});const l=()=>{c.signal.aborted||(kr.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:i.includes("before"),sent:!0}),this.walletInfo&&"universalLink"in this.walletInfo&&(this.walletInfo.openMethod==="universal-link"||this.walletInfo.openMethod==="custom-deeplink")&&(Ss(this.walletInfo.universalLink)?Zc(this.walletInfo.universalLink,{returnStrategy:o,twaReturnUrl:s||Ct.twaReturnUrl,forceRedirect:!1}):Qc(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:o,forceRedirect:!1},()=>{})))},c=new AbortController,u=this.onTransactionModalStateChange(d=>{d!=null&&d.openModal||(u(),d||c.abort())});try{const d=yield this.waitForSendTransaction({transaction:t,signal:c.signal},l);return this.tracker.trackTransactionSigned(this.wallet,t,d),kr.setAction({name:"transaction-sent",showNotification:r.includes("success"),openModal:i.includes("success")}),d}catch(d){throw kr.setAction({name:"transaction-canceled",showNotification:r.includes("error"),openModal:i.includes("error")}),d instanceof Ie?d:(console.error(d),new vn("Unhandled error:"+d))}finally{u()}})}connectEmbeddedWallet(t){return At(this,null,function*(){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=Ct.connectRequestParameters;return(r==null?void 0:r.state)==="loading"?this.connectRequestParametersCallback=n:n(r==null?void 0:r.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return At(this,null,function*(){const t=new AbortController;kr.openWalletsModal();const n=this.onModalStateChange(r=>{const{status:i,closeReason:o}=r;i!=="opened"&&(n(),o==="action-cancelled"&&t.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:t.signal})})}waitForWalletConnection(t){return At(this,null,function*(){return new Promise((n,r)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:i=!1,signal:o=null}=t;if(o&&o.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),r(new vn("Wallet was not connected"));const s=c=>At(this,null,function*(){if(c)this.tracker.trackConnectionCompleted(c),l(),n(c);else{if(this.tracker.trackConnectionError("Connection was cancelled"),i)return;l(),r(new vn("Wallet was not connected"))}}),a=c=>{this.tracker.trackConnectionError(c.message),!i&&(l(),r(c))},l=this.onStatusChange(c=>s(c),c=>a(c));o&&o.addEventListener("abort",()=>{l(),r(new vn("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(t,n){return At(this,null,function*(){return new Promise((r,i)=>{const{transaction:o,signal:s}=t;if(s.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),i(new vn("Transaction was not sent"));const a=u=>At(this,null,function*(){r(u)}),l=u=>{i(u)},c=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),i(new vn("Transaction was not sent"))};s.addEventListener("abort",c,{once:!0}),this.connector.sendTransaction(o,{onRequestSent:n,signal:s}).then(u=>(s.removeEventListener("abort",c),a(u))).catch(u=>(s.removeEventListener("abort",c),l(u)))})})}onTransactionModalStateChange(t){return this.transactionModal.onStateChange(t)}subscribeToWalletChange(){this.connector.onStatusChange(t=>At(this,null,function*(){var n;t?(yield this.updateWalletInfo(t),this.setPreferredWalletAppName(((n=this.walletInfo)==null?void 0:n.appName)||t.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(t){this.preferredWalletStorage.setPreferredWalletAppName(t),Lu({preferredWalletAppName:t})}getSelectedWalletInfo(t){return At(this,null,function*(){let n=kr.getSelectedWalletInfo();if(!n)return null;let r;if("name"in n)r=n;else{const o=Eg(yield this.walletsList,Ct.walletsListConfiguration).find(s=>ko(s,t.device.appName));if(!o)throw new vn(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);r=Rt(Rt({},o),n)}return r})}updateWalletInfo(t){return At(this,null,function*(){const n=yield this.getSelectedWalletInfo(t);if(n){this.walletInfo=n,this.walletInfoStorage.setWalletInfo(n);return}const r=this.walletInfoStorage.getWalletInfo();if(r){this.walletInfo=r;return}this.walletInfo=(yield this.walletsList).find(i=>ko(i,t.device.appName))||null})}normalizeWidgetRoot(t){if(!t||!document.getElementById(t)){t="tc-widget-root";const n=document.createElement("div");n.id=t,document.body.appendChild(n)}return t}checkButtonRootExist(t){if(t!=null&&!document.getElementById(t))throw new vn(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var n,r,i,o,s,a;const l=["before","success","error"];let c=l;(n=this.actionsConfiguration)!=null&&n.notifications&&((r=this.actionsConfiguration)==null?void 0:r.notifications)!=="all"&&(c=this.actionsConfiguration.notifications),t!=null&&t.notifications&&(t.notifications==="all"?c=l:c=t.notifications);let u=["before"];(i=this.actionsConfiguration)!=null&&i.modals&&(this.actionsConfiguration.modals==="all"?u=l:u=this.actionsConfiguration.modals),t!=null&&t.modals&&(t.modals==="all"?u=l:u=t.modals);const d=(t==null?void 0:t.returnStrategy)||((o=this.actionsConfiguration)==null?void 0:o.returnStrategy)||"back",h=(t==null?void 0:t.twaReturnUrl)||((s=this.actionsConfiguration)==null?void 0:s.twaReturnUrl);let g=(t==null?void 0:t.skipRedirectToWallet)||((a=this.actionsConfiguration)==null?void 0:a.skipRedirectToWallet)||"ios";return ao()&&(g="never"),{notifications:c,modals:u,returnStrategy:d,twaReturnUrl:h,skipRedirectToWallet:g}}}var IM=Object.defineProperty,fd=Object.getOwnPropertySymbols,H4=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable,Ev=(e,t,n)=>t in e?IM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NM=(e,t)=>{for(var n in t||(t={}))H4.call(t,n)&&Ev(e,n,t[n]);if(fd)for(var n of fd(t))z4.call(t,n)&&Ev(e,n,t[n]);return e},WM=(e,t)=>{var n={};for(var r in e)H4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fd)for(var r of fd(e))t.indexOf(r)<0&&z4.call(e,r)&&(n[r]=e[r]);return n},V4={exports:{}},cl={};/** +`,Tg=e=>{const t=Gc(e),n=cr(is),[r,i]=Be(!0),[o,s]=Be(!1);$n(()=>{const u=zi();s(!!u&&"sent"in u&&u.sent)});let a;n!=null&&n.wallet&&"universalLink"in n.wallet&&(n.wallet.openMethod==="universal-link"||ks(n.wallet.universalLink)&&ao())&&(a=n.wallet.universalLink);let l;n!=null&&n.wallet&&"deepLink"in n.wallet&&(n.wallet.openMethod==="custom-deeplink"||ks(n.wallet.deepLink)&&ao())&&(l=n.wallet.deepLink);const c=()=>{const u=zi(),d="returnStrategy"in u?u.returnStrategy:St.returnStrategy,h=!r();i(!1),ks(a)?Qc(a,{returnStrategy:d,twaReturnUrl:"twaReturnUrl"in u?u.twaReturnUrl:St.twaReturnUrl,forceRedirect:h}):Jc(a,l,{returnStrategy:d,forceRedirect:h},()=>{})};return _(wM,Ei(t,{get children(){return[ve(()=>e.icon),_(xM,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),_(bM,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),_(Ye,{get when(){return!o()&&(e.showButton==="open-wallet"&&a||e.showButton!=="open-wallet")},get children(){return _(_M,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return _(CM,{})}})}}),_(Ye,{get when(){return o()},get children(){return[_(Ye,{get when(){return e.showButton!=="open-wallet"},get children(){return _(Ev,{onClick:()=>e.onClose(),get children(){return _(Dn,{translationKey:"common.close",children:"Close"})}})}}),_(Ye,{get when(){return e.showButton==="open-wallet"&&a},get children(){return _(Ev,{onClick:c,get children(){return _(Dn,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},SM=e=>{const t=cr(is),[n]=Oi(),r=()=>t.wallet&&"name"in t.wallet?t.wallet.name:n("common.yourWallet",{},"Your wallet");return _(Tg,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:r()}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return _(ho,{size:"m"})},onClose:()=>e.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},kM=e=>_(Tg,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return _(ih,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),EM=e=>_(Tg,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return _(Cg,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),MM=()=>_(y4,{get opened(){var e;return ve(()=>zi()!==null)()&&((e=zi())==null?void 0:e.openModal)===!0},get enableAndroidBackHandler(){return St.enableAndroidBackHandler},onClose:()=>ma(null),"data-tc-actions-modal-container":"true",get children(){return _(Vc,{get children(){return[_(jn,{get when(){return zi().name==="transaction-sent"},get children(){return _(EM,{onClose:()=>ma(null)})}}),_(jn,{get when(){return zi().name==="transaction-canceled"},get children(){return _(kM,{onClose:()=>ma(null)})}}),_(jn,{get when(){return zi().name==="confirm-transaction"},get children(){return _(SM,{onClose:()=>ma(null)})}})]}})}}),TM=()=>{const{locale:e}=Oi()[1];$n(()=>e(St.language)),$n(()=>{X2()&&ud()});const t=cr(Ga),n=cr(is),[r,i]=Be(!1),o=()=>{var c;return((c=St.connectRequestParameters)==null?void 0:c.state)==="loading"},s=ve(()=>{var c;if(!o())return(c=St.connectRequestParameters)==null?void 0:c.value}),a=c=>{n.closeSingleWalletModal(c)},l=t.onStatusChange(c=>{c&&a("wallet-selected")});return lr(l),lr(()=>{i(!1)}),_(D4,{get opened(){return X2()},get enableAndroidBackHandler(){return St.enableAndroidBackHandler},onClose:()=>a("action-cancelled"),onClickQuestion:()=>i(c=>!c),"data-tc-wallets-modal-container":"true",get children(){return[_(Ye,{get when(){return r()},get children(){return _($4,{onBackClick:()=>i(!1)})}}),_(Ye,{get when(){return!r()},get children(){return[_(Ye,{get when(){return o()},get children(){return[_(I4,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),_(N4,{get children(){return _(ho,{size:"m"})}})]}}),_(Ye,{get when(){return!o()},get children(){return _(Wa,{get component(){return Ua()?U4:W4},get wallet(){return U7()},get additionalRequest(){return s()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},PM=e=>{const t=rS(nC,St.language);return R7(),O7(),_(b4.Provider,{value:t,get children(){return _(is.Provider,{get value(){return e.tonConnectUI},get children(){return _(Ga.Provider,{get value(){return St.connector},get children(){return[_(S7,{}),_(_7,{theme:uC,get children(){return[_(Ye,{get when(){return St.buttonRootId},get children(){return _(e4,{get mount(){return document.getElementById(St.buttonRootId)},get children(){return _(aE,{})}})}}),_(Wa,{component:ji,get children(){return[_(yM,{}),_(TM,{}),_(MM,{})]}})]}})]}})}})}})},kr={openWalletsModal:()=>void setTimeout(()=>Z2({status:"opened",closeReason:null})),closeWalletsModal:e=>void setTimeout(()=>Z2({status:"closed",closeReason:e})),openSingleWalletModal:e=>{setTimeout(()=>J2({status:"opened",closeReason:null,walletInfo:e}))},closeSingleWalletModal:e=>void setTimeout(()=>J2({status:"closed",closeReason:e})),setAction:e=>void setTimeout(()=>ma(e)),clearAction:()=>void setTimeout(()=>ma(null)),getSelectedWalletInfo:()=>F7(),removeSelectedWalletInfo:()=>Hn(null),renderApp:(e,t)=>r7(()=>_(PM,{tonConnectUI:t}),document.getElementById(e))};class AM{constructor(t){$e(this,"connector"),$e(this,"setConnectRequestParametersCallback"),$e(this,"consumers",[]),$e(this,"tracker"),$e(this,"state",R0()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,$n(()=>{const n=R0();this.state=n,this.consumers.forEach(r=>r(n))})}open(){return Lt(this,null,function*(){this.tracker.trackConnectionStarted();const n=(yield this.connector.getWallets()).find(Jd);return n?this.connectEmbeddedWallet(n):this.openWalletsModal()})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),kr.closeWalletsModal(t)}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=St.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openWalletsModal(){return Lt(this,null,function*(){return ao()&&wg(),kr.openWalletsModal(),new Promise(t=>{const n=this.onStateChange(r=>{const{status:i}=r;i==="opened"&&(n(),t())})})})}}class LM{constructor(t){$e(this,"connector"),$e(this,"consumers",[]),this.connector=t.connector,$n(()=>{const n=zi();this.consumers.forEach(r=>r(n))})}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}}class OM{constructor(t){$e(this,"connector"),$e(this,"setConnectRequestParametersCallback"),$e(this,"consumers",[]),$e(this,"tracker"),$e(this,"state",rd()),this.connector=t.connector,this.tracker=t.tracker,this.setConnectRequestParametersCallback=t.setConnectRequestParametersCallback,$n(()=>{const n=rd();this.state=n,this.consumers.forEach(r=>r(n))})}open(t){return Lt(this,null,function*(){this.tracker.trackConnectionStarted();const n=yield this.connector.getWallets(),r=Mg(n,St.walletsListConfiguration),i=r.find(Jd);if(!!i)return this.connectEmbeddedWallet(i);const a=r.filter(ag).find(u=>ko(u,t));if(!!a)return this.openSingleWalletModal(a);const c=`Trying to open modal window with unknown wallet "${t}".`;throw this.tracker.trackConnectionError(c),new vn(c)})}close(t="action-cancelled"){t==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),kr.closeSingleWalletModal("action-cancelled")}onStateChange(t){return this.consumers.push(t),()=>{this.consumers=this.consumers.filter(n=>n!==t)}}connectEmbeddedWallet(t){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=St.connectRequestParameters;(r==null?void 0:r.state)==="loading"?this.setConnectRequestParametersCallback(n):n(r==null?void 0:r.value)}openSingleWalletModal(t){return Lt(this,null,function*(){return ao()&&wg(),kr.openSingleWalletModal(t),new Promise(n=>{const r=this.onStateChange(i=>{const{status:o}=i;o==="opened"&&(r(),n())})})})}}class RM{constructor(t){$e(this,"eventPrefix","ton-connect-ui-"),$e(this,"tonConnectUiVersion"),$e(this,"tonConnectSdkVersion",null),$e(this,"eventDispatcher");var n;this.eventDispatcher=(n=t==null?void 0:t.eventDispatcher)!=null?n:new W3,this.tonConnectUiVersion=t.tonConnectUiVersion,this.init().catch()}get version(){return Hs({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return Lt(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch{}})}setRequestVersionHandler(){return Lt(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>Lt(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",E3(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return Lt(this,null,function*(){return new Promise((t,n)=>Lt(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",r=>{t(r.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",k3())}catch(r){n(r)}}))})}dispatchUserActionEvent(t){var n;try{(n=this.eventDispatcher)==null||n.dispatchEvent(`${this.eventPrefix}${t.type}`,t).catch()}catch{}}trackConnectionStarted(...t){try{const n=M3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionCompleted(...t){try{const n=T3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionError(...t){try{const n=P3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringStarted(...t){try{const n=A3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringCompleted(...t){try{const n=L3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackConnectionRestoringError(...t){try{const n=O3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackDisconnection(...t){try{const n=N3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSentForSignature(...t){try{const n=R3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigned(...t){try{const n=D3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}trackTransactionSigningFailed(...t){try{const n=I3(this.version,...t);this.dispatchUserActionEvent(n)}catch{}}}const DM="2.0.5";class IM{constructor(t){if($e(this,"walletInfoStorage",new W7),$e(this,"preferredWalletStorage",new $7),$e(this,"tracker"),$e(this,"walletInfo",null),$e(this,"systemThemeChangeUnsubscribe",null),$e(this,"actionsConfiguration"),$e(this,"walletsList"),$e(this,"connectRequestParametersCallback"),$e(this,"connector"),$e(this,"modal"),$e(this,"singleWalletModal"),$e(this,"transactionModal"),$e(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 Ws({manifestUrl:t.manifestUrl,eventDispatcher:t==null?void 0:t.eventDispatcher});else throw new vn("You have to specify a `manifestUrl` or a `connector` in the options.");this.tracker=new RM({eventDispatcher:t==null?void 0:t.eventDispatcher,tonConnectUiVersion:DM}),this.modal=new AM({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.singleWalletModal=new OM({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.transactionModal=new LM({connector:this.connector}),this.walletsList=this.getWallets(),this.walletsList.then(i=>o4(lE(i.map(o=>o.imageUrl))));const n=this.normalizeWidgetRoot(t==null?void 0:t.widgetRootId);this.subscribeToWalletChange(),(t==null?void 0:t.restoreConnection)!==!1&&(this.connectionRestored=D7(()=>Lt(this,null,function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))),this.uiOptions=Ho(t,{uiPreferences:{theme:"SYSTEM"}});const r=this.preferredWalletStorage.getPreferredWalletAppName();Ou({connector:this.connector,preferredWalletAppName:r}),kr.renderApp(n,this)}static getWallets(){return Ws.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?Dt(Dt({},this.connector.wallet),this.walletInfo):null}set uiOptions(t){var n,r,i,o,s;this.checkButtonRootExist(t.buttonRootId),this.actionsConfiguration=t.actionsConfiguration,(n=t.uiPreferences)!=null&&n.theme?((r=t.uiPreferences)==null?void 0:r.theme)!=="SYSTEM"?((i=this.systemThemeChangeUnsubscribe)==null||i.call(this),o1(t.uiPreferences.theme,t.uiPreferences.colorsSet)):(o1(T7(),t.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=P7(o1))):(o=t.uiPreferences)!=null&&o.colorsSet&&dC(t.uiPreferences.colorsSet),(s=t.uiPreferences)!=null&&s.borderRadius&&fC(t.uiPreferences.borderRadius),Ou(a=>{var l,c;const u=Ho(Dt(Dt(Dt(Dt({},t.language&&{language:t.language}),!!((l=t.actionsConfiguration)!=null&&l.returnStrategy)&&{returnStrategy:t.actionsConfiguration.returnStrategy}),!!((c=t.actionsConfiguration)!=null&&c.twaReturnUrl)&&{twaReturnUrl:t.actionsConfiguration.twaReturnUrl}),!!t.walletsListConfiguration&&{walletsListConfiguration:t.walletsListConfiguration}),$a(a));return t.buttonRootId!==void 0&&(u.buttonRootId=t.buttonRootId),t.enableAndroidBackHandler!==void 0&&(u.enableAndroidBackHandler=t.enableAndroidBackHandler),u})}setConnectRequestParameters(t){var n;Ou({connectRequestParameters:t}),((t==null?void 0:t.state)==="ready"||!t)&&((n=this.connectRequestParametersCallback)==null||n.call(this,t==null?void 0:t.value))}getWallets(){return Lt(this,null,function*(){return this.connector.getWallets()})}onStatusChange(t,n){return this.connector.onStatusChange(r=>Lt(this,null,function*(){if(r){const i=yield this.getSelectedWalletInfo(r);t(Dt(Dt({},r),i||this.walletInfoStorage.getWalletInfo()))}else t(r)}),n)}openModal(){return Lt(this,null,function*(){return this.modal.open()})}closeModal(t){this.modal.close(t)}onModalStateChange(t){return this.modal.onStateChange(t)}get modalState(){return this.modal.state}openSingleWalletModal(t){return Lt(this,null,function*(){return this.singleWalletModal.open(t)})}closeSingleWalletModal(t){this.singleWalletModal.close(t)}onSingleWalletModalStateChange(t){return this.singleWalletModal.onStateChange(t)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return Lt(this,null,function*(){const n=(yield this.getWallets()).find(Jd);return n?yield this.connectEmbeddedWallet(n):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),kr.clearAction(),kr.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(t,n){return Lt(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,t),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,t,"Wallet was not connected"),new vn("Connect wallet to send a transaction.");ao()&&wg();const{notifications:r,modals:i,returnStrategy:o,twaReturnUrl:s,skipRedirectToWallet:a}=this.getModalsAndNotificationsConfiguration(n);kr.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:i.includes("before"),sent:!1});const l=()=>{c.signal.aborted||(kr.setAction({name:"confirm-transaction",showNotification:r.includes("before"),openModal:i.includes("before"),sent:!0}),this.walletInfo&&"universalLink"in this.walletInfo&&(this.walletInfo.openMethod==="universal-link"||this.walletInfo.openMethod==="custom-deeplink")&&(ks(this.walletInfo.universalLink)?Qc(this.walletInfo.universalLink,{returnStrategy:o,twaReturnUrl:s||St.twaReturnUrl,forceRedirect:!1}):Jc(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:o,forceRedirect:!1},()=>{})))},c=new AbortController,u=this.onTransactionModalStateChange(d=>{d!=null&&d.openModal||(u(),d||c.abort())});try{const d=yield this.waitForSendTransaction({transaction:t,signal:c.signal},l);return this.tracker.trackTransactionSigned(this.wallet,t,d),kr.setAction({name:"transaction-sent",showNotification:r.includes("success"),openModal:i.includes("success")}),d}catch(d){throw kr.setAction({name:"transaction-canceled",showNotification:r.includes("error"),openModal:i.includes("error")}),d instanceof Ie?d:(console.error(d),new vn("Unhandled error:"+d))}finally{u()}})}connectEmbeddedWallet(t){return Lt(this,null,function*(){const n=i=>{Hn(t),this.connector.connect({jsBridgeKey:t.jsBridgeKey},i)},r=St.connectRequestParameters;return(r==null?void 0:r.state)==="loading"?this.connectRequestParametersCallback=n:n(r==null?void 0:r.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return Lt(this,null,function*(){const t=new AbortController;kr.openWalletsModal();const n=this.onModalStateChange(r=>{const{status:i,closeReason:o}=r;i!=="opened"&&(n(),o==="action-cancelled"&&t.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:t.signal})})}waitForWalletConnection(t){return Lt(this,null,function*(){return new Promise((n,r)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:i=!1,signal:o=null}=t;if(o&&o.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),r(new vn("Wallet was not connected"));const s=c=>Lt(this,null,function*(){if(c)this.tracker.trackConnectionCompleted(c),l(),n(c);else{if(this.tracker.trackConnectionError("Connection was cancelled"),i)return;l(),r(new vn("Wallet was not connected"))}}),a=c=>{this.tracker.trackConnectionError(c.message),!i&&(l(),r(c))},l=this.onStatusChange(c=>s(c),c=>a(c));o&&o.addEventListener("abort",()=>{l(),r(new vn("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(t,n){return Lt(this,null,function*(){return new Promise((r,i)=>{const{transaction:o,signal:s}=t;if(s.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),i(new vn("Transaction was not sent"));const a=u=>Lt(this,null,function*(){r(u)}),l=u=>{i(u)},c=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,o,"Transaction was cancelled"),i(new vn("Transaction was not sent"))};s.addEventListener("abort",c,{once:!0}),this.connector.sendTransaction(o,{onRequestSent:n,signal:s}).then(u=>(s.removeEventListener("abort",c),a(u))).catch(u=>(s.removeEventListener("abort",c),l(u)))})})}onTransactionModalStateChange(t){return this.transactionModal.onStateChange(t)}subscribeToWalletChange(){this.connector.onStatusChange(t=>Lt(this,null,function*(){var n;t?(yield this.updateWalletInfo(t),this.setPreferredWalletAppName(((n=this.walletInfo)==null?void 0:n.appName)||t.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(t){this.preferredWalletStorage.setPreferredWalletAppName(t),Ou({preferredWalletAppName:t})}getSelectedWalletInfo(t){return Lt(this,null,function*(){let n=kr.getSelectedWalletInfo();if(!n)return null;let r;if("name"in n)r=n;else{const o=Mg(yield this.walletsList,St.walletsListConfiguration).find(s=>ko(s,t.device.appName));if(!o)throw new vn(`Cannot find WalletInfo for the '${t.device.appName}' wallet`);r=Dt(Dt({},o),n)}return r})}updateWalletInfo(t){return Lt(this,null,function*(){const n=yield this.getSelectedWalletInfo(t);if(n){this.walletInfo=n,this.walletInfoStorage.setWalletInfo(n);return}const r=this.walletInfoStorage.getWalletInfo();if(r){this.walletInfo=r;return}this.walletInfo=(yield this.walletsList).find(i=>ko(i,t.device.appName))||null})}normalizeWidgetRoot(t){if(!t||!document.getElementById(t)){t="tc-widget-root";const n=document.createElement("div");n.id=t,document.body.appendChild(n)}return t}checkButtonRootExist(t){if(t!=null&&!document.getElementById(t))throw new vn(`${t} element not found in the document.`)}getModalsAndNotificationsConfiguration(t){var n,r,i,o,s,a;const l=["before","success","error"];let c=l;(n=this.actionsConfiguration)!=null&&n.notifications&&((r=this.actionsConfiguration)==null?void 0:r.notifications)!=="all"&&(c=this.actionsConfiguration.notifications),t!=null&&t.notifications&&(t.notifications==="all"?c=l:c=t.notifications);let u=["before"];(i=this.actionsConfiguration)!=null&&i.modals&&(this.actionsConfiguration.modals==="all"?u=l:u=this.actionsConfiguration.modals),t!=null&&t.modals&&(t.modals==="all"?u=l:u=t.modals);const d=(t==null?void 0:t.returnStrategy)||((o=this.actionsConfiguration)==null?void 0:o.returnStrategy)||"back",h=(t==null?void 0:t.twaReturnUrl)||((s=this.actionsConfiguration)==null?void 0:s.twaReturnUrl);let g=(t==null?void 0:t.skipRedirectToWallet)||((a=this.actionsConfiguration)==null?void 0:a.skipRedirectToWallet)||"ios";return ao()&&(g="never"),{notifications:c,modals:u,returnStrategy:d,twaReturnUrl:h,skipRedirectToWallet:g}}}var NM=Object.defineProperty,dd=Object.getOwnPropertySymbols,z4=Object.prototype.hasOwnProperty,V4=Object.prototype.propertyIsEnumerable,Mv=(e,t,n)=>t in e?NM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WM=(e,t)=>{for(var n in t||(t={}))z4.call(t,n)&&Mv(e,n,t[n]);if(dd)for(var n of dd(t))V4.call(t,n)&&Mv(e,n,t[n]);return e},$M=(e,t)=>{var n={};for(var r in e)z4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dd)for(var r of dd(e))t.indexOf(r)<0&&V4.call(e,r)&&(n[r]=e[r]);return n},Y4={exports:{}},ul={};/** * @license React * react-jsx-runtime.production.min.js * @@ -1096,33 +1096,33 @@ PERFORMANCE OF THIS SOFTWARE. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Mv;function $M(){if(Mv)return cl;Mv=1;var e=Pd,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,c){var u,d={},h=null,g=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(g=l.ref);for(u in l)r.call(l,u)&&!o.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:h,ref:g,props:d,_owner:i.current}}return cl.Fragment=n,cl.jsx=s,cl.jsxs=s,cl}(function(e){e.exports=$M()})(V4);const Y4=V4.exports.jsx;function K4(){return typeof window<"u"}function UM(){return!K4()}const q4=Kt.createContext(null);let h1=null;const FM=e=>{var t=e,{children:n}=t,r=WM(t,["children"]);return K4()&&!h1&&(h1=new DM(r)),Y4(q4.Provider,{value:h1,children:n})},BM=Kt.memo(FM);class Tg extends vn{constructor(...t){super(...t),Object.setPrototypeOf(this,Tg.prototype)}}class Pg extends Tg{constructor(...t){super(...t),Object.setPrototypeOf(this,Pg.prototype)}}function jM(e){if(!e)throw new Pg("You should add on the top of the app to use TonConnect");return!0}function G4(){const e=Kt.useContext(q4),t=Kt.useCallback(n=>{e&&(e.uiOptions=n)},[e]);return UM()?[null,()=>{}]:(jM(e),[e,t])}const Tv="ton-connect-button",HM=({className:e,style:t})=>{const[n,r]=G4();return Kt.useEffect(()=>(r({buttonRootId:Tv}),()=>r({buttonRootId:null})),[r]),Y4("div",{id:Tv,className:e,style:NM({width:"fit-content"},t)})},zM=Kt.memo(HM),VM=()=>{const[e,t]=G4();return t({uiPreferences:{borderRadius:"m"}}),Ht.jsx("footer",{className:"footer"})},YM=()=>{const[e,t]=Kt.useState(null);return Kt.useEffect(()=>{let n;if(window.Telegram)n=window.Telegram.WebApp;else{console.error("Telegram WebApp is not available");return}n.ready();const r=n.initDataUnsafe.user;t(r||null),console.log("Telegram WebApp object:",n),console.log("User Info:",r),console.log("User Picture: ",r==null?void 0:r.photo_url)},[]),e?Ht.jsx("header",{children:Ht.jsxs("div",{id:"header-row",children:[Ht.jsx("div",{id:"user-name",children:Ht.jsxs("div",{children:[e.first_name," ",e.last_name||"Guest"]})}),Ht.jsx("div",{id:"wallet-connect-button-wrapper",children:Ht.jsx(zM,{})})]})}):Ht.jsx("div",{children:"Loading user information..."})},KM=""+new URL("coobot_23-C3PiL-Kj.jpg",import.meta.url).href;function Z4(e,t){return function(){return e.apply(t,arguments)}}const{toString:qM}=Object.prototype,{getPrototypeOf:Ag}=Object,sh=(e=>t=>{const n=qM.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>sh(t)===e),ah=e=>t=>typeof t===e,{isArray:Ga}=Array,Mc=ah("undefined");function GM(e){return e!==null&&!Mc(e)&&e.constructor!==null&&!Mc(e.constructor)&&Vr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Q4=di("ArrayBuffer");function ZM(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Q4(e.buffer),t}const QM=ah("string"),Vr=ah("function"),J4=ah("number"),lh=e=>e!==null&&typeof e=="object",JM=e=>e===!0||e===!1,df=e=>{if(sh(e)!=="object")return!1;const t=Ag(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},XM=di("Date"),eT=di("File"),tT=di("Blob"),nT=di("FileList"),rT=e=>lh(e)&&Vr(e.pipe),iT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Vr(e.append)&&((t=sh(e))==="formdata"||t==="object"&&Vr(e.toString)&&e.toString()==="[object FormData]"))},oT=di("URLSearchParams"),[sT,aT,lT,cT]=["ReadableStream","Request","Response","Headers"].map(di),uT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ga(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const e6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,t6=e=>!Mc(e)&&e!==e6;function U0(){const{caseless:e}=t6(this)&&this||{},t={},n=(r,i)=>{const o=e&&X4(t,i)||i;df(t[o])&&df(r)?t[o]=U0(t[o],r):df(r)?t[o]=U0({},r):Ga(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Jc(t,(i,o)=>{n&&Vr(i)?e[o]=Z4(i,n):e[o]=i},{allOwnKeys:r}),e),dT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hT=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},pT=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Ag(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gT=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},mT=e=>{if(!e)return null;if(Ga(e))return e;let t=e.length;if(!J4(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ag(Uint8Array)),yT=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},wT=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xT=di("HTMLFormElement"),bT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Pv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_T=di("RegExp"),n6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jc(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},CT=e=>{n6(e,(t,n)=>{if(Vr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Vr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ST=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Ga(e)?r(e):r(String(e).split(t)),n},kT=()=>{},ET=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,p1="abcdefghijklmnopqrstuvwxyz",Av="0123456789",r6={DIGIT:Av,ALPHA:p1,ALPHA_DIGIT:p1+p1.toUpperCase()+Av},MT=(e=16,t=r6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function TT(e){return!!(e&&Vr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const PT=e=>{const t=new Array(10),n=(r,i)=>{if(lh(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Ga(r)?[]:{};return Jc(r,(s,a)=>{const l=n(s,i+1);!Mc(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},AT=di("AsyncFunction"),LT=e=>e&&(lh(e)||Vr(e))&&Vr(e.then)&&Vr(e.catch),z={isArray:Ga,isArrayBuffer:Q4,isBuffer:GM,isFormData:iT,isArrayBufferView:ZM,isString:QM,isNumber:J4,isBoolean:JM,isObject:lh,isPlainObject:df,isReadableStream:sT,isRequest:aT,isResponse:lT,isHeaders:cT,isUndefined:Mc,isDate:XM,isFile:eT,isBlob:tT,isRegExp:_T,isFunction:Vr,isStream:rT,isURLSearchParams:oT,isTypedArray:vT,isFileList:nT,forEach:Jc,merge:U0,extend:fT,trim:uT,stripBOM:dT,inherits:hT,toFlatObject:pT,kindOf:sh,kindOfTest:di,endsWith:gT,toArray:mT,forEachEntry:yT,matchAll:wT,isHTMLForm:xT,hasOwnProperty:Pv,hasOwnProp:Pv,reduceDescriptors:n6,freezeMethods:CT,toObjectSet:ST,toCamelCase:bT,noop:kT,toFiniteNumber:ET,findKey:X4,global:e6,isContextDefined:t6,ALPHABET:r6,generateString:MT,isSpecCompliantForm:TT,toJSONObject:PT,isAsyncFn:AT,isThenable:LT};function ot(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}z.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const i6=ot.prototype,o6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{o6[e]={value:e}});Object.defineProperties(ot,o6);Object.defineProperty(i6,"isAxiosError",{value:!0});ot.from=(e,t,n,r,i,o)=>{const s=Object.create(i6);return z.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ot.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const OT=null;function F0(e){return z.isPlainObject(e)||z.isArray(e)}function s6(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function Lv(e,t,n){return e?e.concat(t).map(function(i,o){return i=s6(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function RT(e){return z.isArray(e)&&!e.some(F0)}const DT=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ch(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,k){return!z.isUndefined(k[y])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(z.isDate(m))return m.toISOString();if(!l&&z.isBlob(m))throw new ot("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(m)||z.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,y,k){let C=m;if(m&&!k&&typeof m=="object"){if(z.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&RT(m)||(z.isFileList(m)||z.endsWith(y,"[]"))&&(C=z.toArray(m)))return y=s6(y),C.forEach(function(w,M){!(z.isUndefined(w)||w===null)&&t.append(s===!0?Lv([y],M,o):s===null?y:y+"[]",c(w))}),!1}return F0(m)?!0:(t.append(Lv(k,y,o),c(m)),!1)}const d=[],h=Object.assign(DT,{defaultVisitor:u,convertValue:c,isVisitable:F0});function g(m,y){if(!z.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),z.forEach(m,function(C,v){(!(z.isUndefined(C)||C===null)&&i.call(t,C,z.isString(v)?v.trim():v,y,h))===!0&&g(C,y?y.concat(v):[v])}),d.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Ov(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lg(e,t){this._pairs=[],e&&ch(e,this,t)}const a6=Lg.prototype;a6.append=function(t,n){this._pairs.push([t,n])};a6.toString=function(t){const n=t?function(r){return t.call(this,r,Ov)}:Ov;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function IT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function l6(e,t,n){if(!t)return e;const r=n&&n.encode||IT,i=n&&n.serialize;let o;if(i?o=i(t,n):o=z.isURLSearchParams(t)?t.toString():new Lg(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Rv{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const c6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},NT=typeof URLSearchParams<"u"?URLSearchParams:Lg,WT=typeof FormData<"u"?FormData:null,$T=typeof Blob<"u"?Blob:null,UT={isBrowser:!0,classes:{URLSearchParams:NT,FormData:WT,Blob:$T},protocols:["http","https","file","blob","url","data"]},Og=typeof window<"u"&&typeof document<"u",FT=(e=>Og&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),BT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jT=Og&&window.location.href||"http://localhost",HT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Og,hasStandardBrowserEnv:FT,hasStandardBrowserWebWorkerEnv:BT,origin:jT},Symbol.toStringTag,{value:"Module"})),si={...HT,...UT};function zT(e,t){return ch(e,new si.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return si.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function VT(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function YT(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&z.isArray(i)?i.length:s,l?(z.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!z.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&z.isArray(i[s])&&(i[s]=YT(i[s])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,i)=>{t(VT(r),i,n,0)}),n}return null}function KT(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Xc={transitional:c6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return i?JSON.stringify(u6(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zT(t,this.formSerializer).toString();if((a=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ch(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),KT(t)):t}],transformResponse:[function(t){const n=this.transitional||Xc.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ot.from(a,ot.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:si.classes.FormData,Blob:si.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Xc.headers[e]={}});const qT=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GT=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&qT[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Dv=Symbol("internals");function ul(e){return e&&String(e).trim().toLowerCase()}function hf(e){return e===!1||e==null?e:z.isArray(e)?e.map(hf):String(e)}function ZT(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const QT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function g1(e,t,n,r,i){if(z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function JT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function XT(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class _r{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,c){const u=ul(l);if(!u)throw new Error("header name must be a non-empty string");const d=z.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=hf(a))}const s=(a,l)=>z.forEach(a,(c,u)=>o(c,u,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!QT(t))s(GT(t),n);else if(z.isHeaders(t))for(const[a,l]of t.entries())o(l,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=ul(t),t){const r=z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return ZT(i);if(z.isFunction(n))return n.call(this,i,r);if(z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ul(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||g1(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=ul(s),s){const a=z.findKey(r,s);a&&(!n||g1(r,r[a],a,n))&&(delete r[a],i=!0)}}return z.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||g1(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return z.forEach(this,(i,o)=>{const s=z.findKey(r,o);if(s){n[s]=hf(i),delete n[o];return}const a=t?JT(o):String(o).trim();a!==o&&delete n[o],n[a]=hf(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Dv]=this[Dv]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ul(s);r[a]||(XT(i,s),r[a]=!0)}return z.isArray(t)?t.forEach(o):o(t),this}}_r.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(_r.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(_r);function m1(e,t){const n=this||Xc,r=t||n,i=_r.from(r.headers);let o=r.data;return z.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function f6(e){return!!(e&&e.__CANCEL__)}function Za(e,t,n){ot.call(this,e??"canceled",ot.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(Za,ot,{__CANCEL__:!0});function d6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ot("Request failed with status code "+n.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function eP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-sr)return i&&(clearTimeout(i),i=null),n=a,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(a-n)))}}const dd=(e,t,n=3)=>{let r=0;const i=tP(50,250);return nP(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null};d[t?"download":"upload"]=!0,e(d)},n)},rP=si.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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 r=i(window.location.href),function(s){const a=z.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),iP=si.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),z.isString(r)&&s.push("path="+r),z.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function h6(e,t){return e&&!oP(t)?sP(e,t):t}const Iv=e=>e instanceof _r?{...e}:e;function Ws(e,t){t=t||{};const n={};function r(c,u,d){return z.isPlainObject(c)&&z.isPlainObject(u)?z.merge.call({caseless:d},c,u):z.isPlainObject(u)?z.merge({},u):z.isArray(u)?u.slice():u}function i(c,u,d){if(z.isUndefined(u)){if(!z.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!z.isUndefined(u))return r(void 0,u)}function s(c,u){if(z.isUndefined(u)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i(Iv(c),Iv(u),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,h=d(e[u],t[u],u);z.isUndefined(h)&&d!==a||(n[u]=h)}),n}const p6=e=>{const t=Ws({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=_r.from(s),t.url=l6(h6(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(z.isFormData(n)){if(si.hasStandardBrowserEnv||si.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(si.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&rP(t.url))){const c=i&&o&&iP.read(o);c&&s.set(i,c)}return t},aP=typeof XMLHttpRequest<"u",lP=aP&&function(e){return new Promise(function(n,r){const i=p6(e);let o=i.data;const s=_r.from(i.headers).normalize();let{responseType:a}=i,l;function c(){i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let u=new XMLHttpRequest;u.open(i.method.toUpperCase(),i.url,!0),u.timeout=i.timeout;function d(){if(!u)return;const g=_r.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),y={data:!a||a==="text"||a==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:g,config:e,request:u};d6(function(C){n(C),c()},function(C){r(C),c()},y),u=null}"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new ot("Request aborted",ot.ECONNABORTED,i,u)),u=null)},u.onerror=function(){r(new ot("Network Error",ot.ERR_NETWORK,i,u)),u=null},u.ontimeout=function(){let m=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const y=i.transitional||c6;i.timeoutErrorMessage&&(m=i.timeoutErrorMessage),r(new ot(m,y.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,i,u)),u=null},o===void 0&&s.setContentType(null),"setRequestHeader"in u&&z.forEach(s.toJSON(),function(m,y){u.setRequestHeader(y,m)}),z.isUndefined(i.withCredentials)||(u.withCredentials=!!i.withCredentials),a&&a!=="json"&&(u.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&u.addEventListener("progress",dd(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",dd(i.onUploadProgress)),(i.cancelToken||i.signal)&&(l=g=>{u&&(r(!g||g.type?new Za(null,e,u):g),u.abort(),u=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const h=eP(i.url);if(h&&si.protocols.indexOf(h)===-1){r(new ot("Unsupported protocol "+h+":",ot.ERR_BAD_REQUEST,e));return}u.send(o||null)})},cP=(e,t)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof ot?c:new Za(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{i(new ot(`timeout ${t} of ms exceeded`,ot.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},uP=function*(e,t){let n=e.byteLength;if(!t||n{const o=fP(e,t,i);let s=0;return new ReadableStream({type:"bytes",async pull(a){const{done:l,value:c}=await o.next();if(l){a.close(),r();return}let u=c.byteLength;n&&n(s+=u),a.enqueue(new Uint8Array(c))},cancel(a){return r(a),o.return()}},{highWaterMark:2})},Wv=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},uh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",g6=uh&&typeof ReadableStream=="function",B0=uh&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dP=g6&&(()=>{let e=!1;const t=new Request(si.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),$v=64*1024,j0=g6&&!!(()=>{try{return z.isReadableStream(new Response("").body)}catch{}})(),hd={stream:j0&&(e=>e.body)};uh&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!hd[t]&&(hd[t]=z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ot(`Response type '${t}' is not supported`,ot.ERR_NOT_SUPPORT,r)})})})(new Response);const hP=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(z.isArrayBufferView(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await B0(e)).byteLength},pP=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??hP(t)},gP=uh&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=p6(e);c=c?(c+"").toLowerCase():"text";let[g,m]=i||o||s?cP([i,o],s):[],y,k;const C=()=>{!y&&setTimeout(()=>{g&&g.unsubscribe()}),y=!0};let v;try{if(l&&dP&&n!=="get"&&n!=="head"&&(v=await pP(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),T;z.isFormData(r)&&(T=O.headers.get("content-type"))&&u.setContentType(T),O.body&&(r=Nv(O.body,$v,Wv(v,dd(l)),null,B0))}z.isString(d)||(d=d?"cors":"omit"),k=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let w=await fetch(k);const M=j0&&(c==="stream"||c==="response");if(j0&&(a||M)){const O={};["status","statusText","headers"].forEach(P=>{O[P]=w[P]});const T=z.toFiniteNumber(w.headers.get("content-length"));w=new Response(Nv(w.body,$v,a&&Wv(T,dd(a,!0)),M&&C,B0),O)}c=c||"text";let E=await hd[z.findKey(hd,c)||"text"](w,e);return!M&&C(),m&&m(),await new Promise((O,T)=>{d6(O,T,{data:E,headers:_r.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:k})})}catch(w){throw C(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new ot("Network Error",ot.ERR_NETWORK,e,k),{cause:w.cause||w}):ot.from(w,w&&w.code,e,k)}}),H0={http:OT,xhr:lP,fetch:gP};z.forEach(H0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Uv=e=>`- ${e}`,mP=e=>z.isFunction(e)||e===null||e===!1,m6={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : -`+o.map(Uv).join(` -`):" "+Uv(o[0]):"as no adapter specified";throw new ot("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:H0};function v1(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Za(null,e)}function Fv(e){return v1(e),e.headers=_r.from(e.headers),e.data=m1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),m6.getAdapter(e.adapter||Xc.adapter)(e).then(function(r){return v1(e),r.data=m1.call(e,e.transformResponse,r),r.headers=_r.from(r.headers),r},function(r){return f6(r)||(v1(e),r&&r.response&&(r.response.data=m1.call(e,e.transformResponse,r.response),r.response.headers=_r.from(r.response.headers))),Promise.reject(r)})}const v6="1.7.2",Rg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Rg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Bv={};Rg.transitional=function(t,n,r){function i(o,s){return"[Axios v"+v6+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new ot(i(s," has been removed"+(n?" in "+n:"")),ot.ERR_DEPRECATED);return n&&!Bv[s]&&(Bv[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function vP(e,t,n){if(typeof e!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new ot("option "+o+" must be "+l,ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ot("Unknown option "+o,ot.ERR_BAD_OPTION)}}const z0={assertOptions:vP,validators:Rg},yo=z0.validators;class Ts{constructor(t){this.defaults=t,this.interceptors={request:new Rv,response:new Rv}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ws(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&z0.assertOptions(r,{silentJSONParsing:yo.transitional(yo.boolean),forcedJSONParsing:yo.transitional(yo.boolean),clarifyTimeoutError:yo.transitional(yo.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:z0.assertOptions(i,{encode:yo.function,serialize:yo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&z.merge(o.common,o[n.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=_r.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,d=0,h;if(!l){const m=[Fv.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,c),h=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Za(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Dg(function(i){t=i}),cancel:t}}}function yP(e){return function(n){return e.apply(null,n)}}function wP(e){return z.isObject(e)&&e.isAxiosError===!0}const V0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(V0).forEach(([e,t])=>{V0[t]=e});function y6(e){const t=new Ts(e),n=Z4(Ts.prototype.request,t);return z.extend(n,Ts.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return y6(Ws(e,i))},n}const _n=y6(Xc);_n.Axios=Ts;_n.CanceledError=Za;_n.CancelToken=Dg;_n.isCancel=f6;_n.VERSION=v6;_n.toFormData=ch;_n.AxiosError=ot;_n.Cancel=_n.CanceledError;_n.all=function(t){return Promise.all(t)};_n.spread=yP;_n.isAxiosError=wP;_n.mergeConfig=Ws;_n.AxiosHeaders=_r;_n.formToJSON=e=>u6(z.isHTMLForm(e)?new FormData(e):e);_n.getAdapter=m6.getAdapter;_n.HttpStatusCode=V0;_n.default=_n;//! moment.js + */var Tv;function UM(){if(Tv)return ul;Tv=1;var e=Ad,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,c){var u,d={},h=null,g=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(g=l.ref);for(u in l)r.call(l,u)&&!o.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:h,ref:g,props:d,_owner:i.current}}return ul.Fragment=n,ul.jsx=s,ul.jsxs=s,ul}(function(e){e.exports=UM()})(Y4);const K4=Y4.exports.jsx;function q4(){return typeof window<"u"}function FM(){return!q4()}const G4=rn.createContext(null);let p1=null;const BM=e=>{var t=e,{children:n}=t,r=$M(t,["children"]);return q4()&&!p1&&(p1=new IM(r)),K4(G4.Provider,{value:p1,children:n})},jM=rn.memo(BM);class Pg extends vn{constructor(...t){super(...t),Object.setPrototypeOf(this,Pg.prototype)}}class Ag extends Pg{constructor(...t){super(...t),Object.setPrototypeOf(this,Ag.prototype)}}function HM(e){if(!e)throw new Ag("You should add on the top of the app to use TonConnect");return!0}function Z4(){const e=rn.useContext(G4),t=rn.useCallback(n=>{e&&(e.uiOptions=n)},[e]);return FM()?[null,()=>{}]:(HM(e),[e,t])}const Pv="ton-connect-button",zM=({className:e,style:t})=>{const[n,r]=Z4();return rn.useEffect(()=>(r({buttonRootId:Pv}),()=>r({buttonRootId:null})),[r]),K4("div",{id:Pv,className:e,style:WM({width:"fit-content"},t)})},VM=rn.memo(zM),YM=()=>{const[e,t]=Z4();return t({uiPreferences:{borderRadius:"m"}}),gt.jsx("footer",{className:"footer"})},KM=()=>{const[e,t]=rn.useState(null);return rn.useEffect(()=>{let n;if(window.Telegram)n=window.Telegram.WebApp;else{console.error("Telegram WebApp is not available");return}n.ready();const r=n.initDataUnsafe.user;t(r||null),console.log("Telegram WebApp object:",n),console.log("User Info:",r),console.log("User Picture: ",r==null?void 0:r.photo_url)},[]),e?gt.jsx("header",{children:gt.jsxs("div",{id:"header-row",children:[gt.jsx("div",{id:"user-name",children:gt.jsxs("div",{children:[e.first_name," ",e.last_name||"Guest"]})}),gt.jsx("div",{id:"wallet-connect-button-wrapper",children:gt.jsx(VM,{})})]})}):gt.jsx("div",{children:"Loading user information..."})},qM=""+new URL("coobot_23-C3PiL-Kj.jpg",import.meta.url).href;function Q4(e,t){return function(){return e.apply(t,arguments)}}const{toString:GM}=Object.prototype,{getPrototypeOf:Lg}=Object,ah=(e=>t=>{const n=GM.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>ah(t)===e),lh=e=>t=>typeof t===e,{isArray:Za}=Array,Tc=lh("undefined");function ZM(e){return e!==null&&!Tc(e)&&e.constructor!==null&&!Tc(e.constructor)&&Vr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const J4=di("ArrayBuffer");function QM(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&J4(e.buffer),t}const JM=lh("string"),Vr=lh("function"),X4=lh("number"),ch=e=>e!==null&&typeof e=="object",XM=e=>e===!0||e===!1,hf=e=>{if(ah(e)!=="object")return!1;const t=Lg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},eT=di("Date"),tT=di("File"),nT=di("Blob"),rT=di("FileList"),iT=e=>ch(e)&&Vr(e.pipe),oT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Vr(e.append)&&((t=ah(e))==="formdata"||t==="object"&&Vr(e.toString)&&e.toString()==="[object FormData]"))},sT=di("URLSearchParams"),[aT,lT,cT,uT]=["ReadableStream","Request","Response","Headers"].map(di),fT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Za(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const t6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,n6=e=>!Tc(e)&&e!==t6;function F0(){const{caseless:e}=n6(this)&&this||{},t={},n=(r,i)=>{const o=e&&e6(t,i)||i;hf(t[o])&&hf(r)?t[o]=F0(t[o],r):hf(r)?t[o]=F0({},r):Za(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Xc(t,(i,o)=>{n&&Vr(i)?e[o]=Q4(i,n):e[o]=i},{allOwnKeys:r}),e),hT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pT=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gT=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Lg(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},mT=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},vT=e=>{if(!e)return null;if(Za(e))return e;let t=e.length;if(!X4(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lg(Uint8Array)),wT=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},xT=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bT=di("HTMLFormElement"),_T=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Av=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),CT=di("RegExp"),r6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xc(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},ST=e=>{r6(e,(t,n)=>{if(Vr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Vr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kT=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Za(e)?r(e):r(String(e).split(t)),n},ET=()=>{},MT=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,g1="abcdefghijklmnopqrstuvwxyz",Lv="0123456789",i6={DIGIT:Lv,ALPHA:g1,ALPHA_DIGIT:g1+g1.toUpperCase()+Lv},TT=(e=16,t=i6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function PT(e){return!!(e&&Vr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const AT=e=>{const t=new Array(10),n=(r,i)=>{if(ch(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Za(r)?[]:{};return Xc(r,(s,a)=>{const l=n(s,i+1);!Tc(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},LT=di("AsyncFunction"),OT=e=>e&&(ch(e)||Vr(e))&&Vr(e.then)&&Vr(e.catch),z={isArray:Za,isArrayBuffer:J4,isBuffer:ZM,isFormData:oT,isArrayBufferView:QM,isString:JM,isNumber:X4,isBoolean:XM,isObject:ch,isPlainObject:hf,isReadableStream:aT,isRequest:lT,isResponse:cT,isHeaders:uT,isUndefined:Tc,isDate:eT,isFile:tT,isBlob:nT,isRegExp:CT,isFunction:Vr,isStream:iT,isURLSearchParams:sT,isTypedArray:yT,isFileList:rT,forEach:Xc,merge:F0,extend:dT,trim:fT,stripBOM:hT,inherits:pT,toFlatObject:gT,kindOf:ah,kindOfTest:di,endsWith:mT,toArray:vT,forEachEntry:wT,matchAll:xT,isHTMLForm:bT,hasOwnProperty:Av,hasOwnProp:Av,reduceDescriptors:r6,freezeMethods:ST,toObjectSet:kT,toCamelCase:_T,noop:ET,toFiniteNumber:MT,findKey:e6,global:t6,isContextDefined:n6,ALPHABET:i6,generateString:TT,isSpecCompliantForm:PT,toJSONObject:AT,isAsyncFn:LT,isThenable:OT};function ot(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}z.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o6=ot.prototype,s6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s6[e]={value:e}});Object.defineProperties(ot,s6);Object.defineProperty(o6,"isAxiosError",{value:!0});ot.from=(e,t,n,r,i,o)=>{const s=Object.create(o6);return z.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ot.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const RT=null;function B0(e){return z.isPlainObject(e)||z.isArray(e)}function a6(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function Ov(e,t,n){return e?e.concat(t).map(function(i,o){return i=a6(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function DT(e){return z.isArray(e)&&!e.some(B0)}const IT=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function uh(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,k){return!z.isUndefined(k[y])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(z.isDate(m))return m.toISOString();if(!l&&z.isBlob(m))throw new ot("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(m)||z.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,y,k){let C=m;if(m&&!k&&typeof m=="object"){if(z.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&DT(m)||(z.isFileList(m)||z.endsWith(y,"[]"))&&(C=z.toArray(m)))return y=a6(y),C.forEach(function(w,M){!(z.isUndefined(w)||w===null)&&t.append(s===!0?Ov([y],M,o):s===null?y:y+"[]",c(w))}),!1}return B0(m)?!0:(t.append(Ov(k,y,o),c(m)),!1)}const d=[],h=Object.assign(IT,{defaultVisitor:u,convertValue:c,isVisitable:B0});function g(m,y){if(!z.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),z.forEach(m,function(C,v){(!(z.isUndefined(C)||C===null)&&i.call(t,C,z.isString(v)?v.trim():v,y,h))===!0&&g(C,y?y.concat(v):[v])}),d.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Rv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Og(e,t){this._pairs=[],e&&uh(e,this,t)}const l6=Og.prototype;l6.append=function(t,n){this._pairs.push([t,n])};l6.toString=function(t){const n=t?function(r){return t.call(this,r,Rv)}:Rv;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function NT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function c6(e,t,n){if(!t)return e;const r=n&&n.encode||NT,i=n&&n.serialize;let o;if(i?o=i(t,n):o=z.isURLSearchParams(t)?t.toString():new Og(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Dv{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const u6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WT=typeof URLSearchParams<"u"?URLSearchParams:Og,$T=typeof FormData<"u"?FormData:null,UT=typeof Blob<"u"?Blob:null,FT={isBrowser:!0,classes:{URLSearchParams:WT,FormData:$T,Blob:UT},protocols:["http","https","file","blob","url","data"]},Rg=typeof window<"u"&&typeof document<"u",BT=(e=>Rg&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),jT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",HT=Rg&&window.location.href||"http://localhost",zT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rg,hasStandardBrowserEnv:BT,hasStandardBrowserWebWorkerEnv:jT,origin:HT},Symbol.toStringTag,{value:"Module"})),si={...zT,...FT};function VT(e,t){return uh(e,new si.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return si.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function YT(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function KT(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&z.isArray(i)?i.length:s,l?(z.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!z.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&z.isArray(i[s])&&(i[s]=KT(i[s])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,i)=>{t(YT(r),i,n,0)}),n}return null}function qT(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const eu={transitional:u6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return i?JSON.stringify(f6(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return VT(t,this.formSerializer).toString();if((a=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return uh(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),qT(t)):t}],transformResponse:[function(t){const n=this.transitional||eu.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ot.from(a,ot.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:si.classes.FormData,Blob:si.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{eu.headers[e]={}});const GT=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZT=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&>[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Iv=Symbol("internals");function fl(e){return e&&String(e).trim().toLowerCase()}function pf(e){return e===!1||e==null?e:z.isArray(e)?e.map(pf):String(e)}function QT(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const JT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function m1(e,t,n,r,i){if(z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function XT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function eP(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class _r{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,c){const u=fl(l);if(!u)throw new Error("header name must be a non-empty string");const d=z.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=pf(a))}const s=(a,l)=>z.forEach(a,(c,u)=>o(c,u,l));if(z.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(z.isString(t)&&(t=t.trim())&&!JT(t))s(ZT(t),n);else if(z.isHeaders(t))for(const[a,l]of t.entries())o(l,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=fl(t),t){const r=z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return QT(i);if(z.isFunction(n))return n.call(this,i,r);if(z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fl(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||m1(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=fl(s),s){const a=z.findKey(r,s);a&&(!n||m1(r,r[a],a,n))&&(delete r[a],i=!0)}}return z.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||m1(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return z.forEach(this,(i,o)=>{const s=z.findKey(r,o);if(s){n[s]=pf(i),delete n[o];return}const a=t?XT(o):String(o).trim();a!==o&&delete n[o],n[a]=pf(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Iv]=this[Iv]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=fl(s);r[a]||(eP(i,s),r[a]=!0)}return z.isArray(t)?t.forEach(o):o(t),this}}_r.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(_r.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(_r);function v1(e,t){const n=this||eu,r=t||n,i=_r.from(r.headers);let o=r.data;return z.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function d6(e){return!!(e&&e.__CANCEL__)}function Qa(e,t,n){ot.call(this,e??"canceled",ot.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(Qa,ot,{__CANCEL__:!0});function h6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ot("Request failed with status code "+n.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-sr)return i&&(clearTimeout(i),i=null),n=a,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(a-n)))}}const hd=(e,t,n=3)=>{let r=0;const i=nP(50,250);return rP(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null};d[t?"download":"upload"]=!0,e(d)},n)},iP=si.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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 r=i(window.location.href),function(s){const a=z.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),oP=si.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),z.isString(r)&&s.push("path="+r),z.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function p6(e,t){return e&&!sP(t)?aP(e,t):t}const Nv=e=>e instanceof _r?{...e}:e;function $s(e,t){t=t||{};const n={};function r(c,u,d){return z.isPlainObject(c)&&z.isPlainObject(u)?z.merge.call({caseless:d},c,u):z.isPlainObject(u)?z.merge({},u):z.isArray(u)?u.slice():u}function i(c,u,d){if(z.isUndefined(u)){if(!z.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!z.isUndefined(u))return r(void 0,u)}function s(c,u){if(z.isUndefined(u)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i(Nv(c),Nv(u),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,h=d(e[u],t[u],u);z.isUndefined(h)&&d!==a||(n[u]=h)}),n}const g6=e=>{const t=$s({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=_r.from(s),t.url=c6(p6(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(z.isFormData(n)){if(si.hasStandardBrowserEnv||si.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(si.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&iP(t.url))){const c=i&&o&&oP.read(o);c&&s.set(i,c)}return t},lP=typeof XMLHttpRequest<"u",cP=lP&&function(e){return new Promise(function(n,r){const i=g6(e);let o=i.data;const s=_r.from(i.headers).normalize();let{responseType:a}=i,l;function c(){i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let u=new XMLHttpRequest;u.open(i.method.toUpperCase(),i.url,!0),u.timeout=i.timeout;function d(){if(!u)return;const g=_r.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),y={data:!a||a==="text"||a==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:g,config:e,request:u};h6(function(C){n(C),c()},function(C){r(C),c()},y),u=null}"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new ot("Request aborted",ot.ECONNABORTED,i,u)),u=null)},u.onerror=function(){r(new ot("Network Error",ot.ERR_NETWORK,i,u)),u=null},u.ontimeout=function(){let m=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const y=i.transitional||u6;i.timeoutErrorMessage&&(m=i.timeoutErrorMessage),r(new ot(m,y.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,i,u)),u=null},o===void 0&&s.setContentType(null),"setRequestHeader"in u&&z.forEach(s.toJSON(),function(m,y){u.setRequestHeader(y,m)}),z.isUndefined(i.withCredentials)||(u.withCredentials=!!i.withCredentials),a&&a!=="json"&&(u.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&u.addEventListener("progress",hd(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",hd(i.onUploadProgress)),(i.cancelToken||i.signal)&&(l=g=>{u&&(r(!g||g.type?new Qa(null,e,u):g),u.abort(),u=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const h=tP(i.url);if(h&&si.protocols.indexOf(h)===-1){r(new ot("Unsupported protocol "+h+":",ot.ERR_BAD_REQUEST,e));return}u.send(o||null)})},uP=(e,t)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,s();const c=l instanceof Error?l:this.reason;n.abort(c instanceof ot?c:new Qa(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{i(new ot(`timeout ${t} of ms exceeded`,ot.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},fP=function*(e,t){let n=e.byteLength;if(!t||n{const o=dP(e,t,i);let s=0;return new ReadableStream({type:"bytes",async pull(a){const{done:l,value:c}=await o.next();if(l){a.close(),r();return}let u=c.byteLength;n&&n(s+=u),a.enqueue(new Uint8Array(c))},cancel(a){return r(a),o.return()}},{highWaterMark:2})},$v=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},fh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",m6=fh&&typeof ReadableStream=="function",j0=fh&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hP=m6&&(()=>{let e=!1;const t=new Request(si.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Uv=64*1024,H0=m6&&!!(()=>{try{return z.isReadableStream(new Response("").body)}catch{}})(),pd={stream:H0&&(e=>e.body)};fh&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!pd[t]&&(pd[t]=z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ot(`Response type '${t}' is not supported`,ot.ERR_NOT_SUPPORT,r)})})})(new Response);const pP=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(z.isArrayBufferView(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await j0(e)).byteLength},gP=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??pP(t)},mP=fh&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=g6(e);c=c?(c+"").toLowerCase():"text";let[g,m]=i||o||s?uP([i,o],s):[],y,k;const C=()=>{!y&&setTimeout(()=>{g&&g.unsubscribe()}),y=!0};let v;try{if(l&&hP&&n!=="get"&&n!=="head"&&(v=await gP(u,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),T;z.isFormData(r)&&(T=O.headers.get("content-type"))&&u.setContentType(T),O.body&&(r=Wv(O.body,Uv,$v(v,hd(l)),null,j0))}z.isString(d)||(d=d?"cors":"omit"),k=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let w=await fetch(k);const M=H0&&(c==="stream"||c==="response");if(H0&&(a||M)){const O={};["status","statusText","headers"].forEach(P=>{O[P]=w[P]});const T=z.toFiniteNumber(w.headers.get("content-length"));w=new Response(Wv(w.body,Uv,a&&$v(T,hd(a,!0)),M&&C,j0),O)}c=c||"text";let E=await pd[z.findKey(pd,c)||"text"](w,e);return!M&&C(),m&&m(),await new Promise((O,T)=>{h6(O,T,{data:E,headers:_r.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:k})})}catch(w){throw C(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new ot("Network Error",ot.ERR_NETWORK,e,k),{cause:w.cause||w}):ot.from(w,w&&w.code,e,k)}}),z0={http:RT,xhr:cP,fetch:mP};z.forEach(z0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fv=e=>`- ${e}`,vP=e=>z.isFunction(e)||e===null||e===!1,v6={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : +`+o.map(Fv).join(` +`):" "+Fv(o[0]):"as no adapter specified";throw new ot("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:z0};function y1(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qa(null,e)}function Bv(e){return y1(e),e.headers=_r.from(e.headers),e.data=v1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),v6.getAdapter(e.adapter||eu.adapter)(e).then(function(r){return y1(e),r.data=v1.call(e,e.transformResponse,r),r.headers=_r.from(r.headers),r},function(r){return d6(r)||(y1(e),r&&r.response&&(r.response.data=v1.call(e,e.transformResponse,r.response),r.response.headers=_r.from(r.response.headers))),Promise.reject(r)})}const y6="1.7.2",Dg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Dg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const jv={};Dg.transitional=function(t,n,r){function i(o,s){return"[Axios v"+y6+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new ot(i(s," has been removed"+(n?" in "+n:"")),ot.ERR_DEPRECATED);return n&&!jv[s]&&(jv[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function yP(e,t,n){if(typeof e!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new ot("option "+o+" must be "+l,ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ot("Unknown option "+o,ot.ERR_BAD_OPTION)}}const V0={assertOptions:yP,validators:Dg},yo=V0.validators;class Ps{constructor(t){this.defaults=t,this.interceptors={request:new Dv,response:new Dv}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$s(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&V0.assertOptions(r,{silentJSONParsing:yo.transitional(yo.boolean),forcedJSONParsing:yo.transitional(yo.boolean),clarifyTimeoutError:yo.transitional(yo.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:V0.assertOptions(i,{encode:yo.function,serialize:yo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&z.merge(o.common,o[n.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=_r.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let u,d=0,h;if(!l){const m=[Bv.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,c),h=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Qa(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ig(function(i){t=i}),cancel:t}}}function wP(e){return function(n){return e.apply(null,n)}}function xP(e){return z.isObject(e)&&e.isAxiosError===!0}const Y0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Y0).forEach(([e,t])=>{Y0[t]=e});function w6(e){const t=new Ps(e),n=Q4(Ps.prototype.request,t);return z.extend(n,Ps.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return w6($s(e,i))},n}const kn=w6(eu);kn.Axios=Ps;kn.CanceledError=Qa;kn.CancelToken=Ig;kn.isCancel=d6;kn.VERSION=y6;kn.toFormData=uh;kn.AxiosError=ot;kn.Cancel=kn.CanceledError;kn.all=function(t){return Promise.all(t)};kn.spread=wP;kn.isAxiosError=xP;kn.mergeConfig=$s;kn.AxiosHeaders=_r;kn.formToJSON=e=>f6(z.isHTMLForm(e)?new FormData(e):e);kn.getAdapter=v6.getAdapter;kn.HttpStatusCode=Y0;kn.default=kn;//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var w6;function pe(){return w6.apply(null,arguments)}function xP(e){w6=e}function ui(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ps(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Lt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ig(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Lt(e,t))return!1;return!0}function pr(e){return e===void 0}function lo(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function eu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function x6(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Ug=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Du=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,w1={},ka={};function Ne(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(ka[e]=i),t&&(ka[t[0]]=function(){return Ai(i.apply(this,arguments),t[1],t[2])}),n&&(ka[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function kP(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function EP(e){var t=e.match(Ug),n,r;for(n=0,r=t.length;n=0&&Du.test(e);)e=e.replace(Du,r),Du.lastIndex=0,n-=1;return e}var MP={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function TP(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Ug).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var PP="Invalid date";function AP(){return this._invalidDate}var LP="%d",OP=/\d{1,2}/;function RP(e){return this._ordinal.replace("%d",e)}var DP={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function IP(e,t,n,r){var i=this._relativeTime[n];return Ii(i)?i(e,t,n,r):i.replace(/%d/i,e)}function NP(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ii(n)?n(t):n.replace(/%s/i,t)}var zv={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Gr(e){return typeof e=="string"?zv[e]||zv[e.toLowerCase()]:void 0}function Fg(e){var t={},n,r;for(r in e)Lt(e,r)&&(n=Gr(r),n&&(t[n]=e[r]));return t}var WP={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function $P(e){var t=[],n;for(n in e)Lt(e,n)&&t.push({unit:n,priority:WP[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var S6=/\d/,Nr=/\d\d/,k6=/\d{3}/,Bg=/\d{4}/,dh=/[+-]?\d{6}/,Zt=/\d\d?/,E6=/\d\d\d\d?/,M6=/\d\d\d\d\d\d?/,hh=/\d{1,3}/,jg=/\d{1,4}/,ph=/[+-]?\d{1,6}/,Qa=/\d+/,gh=/[+-]?\d+/,UP=/Z|[+-]\d\d:?\d\d/gi,mh=/Z|[+-]\d\d(?::?\d\d)?/gi,FP=/[+-]?\d+(\.\d{1,3})?/,nu=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ja=/^[1-9]\d?/,Hg=/^([1-9]\d|\d)/,pd;pd={};function be(e,t,n){pd[e]=Ii(t)?t:function(r,i){return r&&n?n:t}}function BP(e,t){return Lt(pd,e)?pd[e](t._strict,t._locale):new RegExp(jP(e))}function jP(e){return eo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function eo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Br(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function xt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Br(t)),n}var G0={};function Bt(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),lo(t)&&(r=function(o,s){s[t]=xt(o)}),i=e.length,n=0;n68?1900:2e3)};var T6=Xa("FullYear",!0);function YP(){return vh(this.year())}function Xa(e,t){return function(n){return n!=null?(P6(this,e,n),pe.updateOffset(this,t),this):Tc(this,e)}}function Tc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function P6(e,t,n){var r,i,o,s,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,s=e.month(),a=e.date(),a=a===29&&s===1&&!vh(o)?28:a,i?r.setUTCFullYear(o,s,a):r.setFullYear(o,s,a)}}function KP(e){return e=Gr(e),Ii(this[e])?this[e]():this}function qP(e,t){if(typeof e=="object"){e=Fg(e);var n=$P(e),r,i=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Pc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function gd(e,t,n){var r=7+t-n,i=(7+Pc(e,0,r).getUTCDay()-t)%7;return-i+r-1}function I6(e,t,n,r,i){var o=(7+n-r)%7,s=gd(e,r,i),a=1+7*(t-1)+o+s,l,c;return a<=0?(l=e-1,c=ql(l)+a):a>ql(e)?(l=e+1,c=a-ql(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Ac(e,t,n){var r=gd(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,s;return i<1?(s=e.year()-1,o=i+to(s,t,n)):i>to(e.year(),t,n)?(o=i-to(e.year(),t,n),s=e.year()+1):(s=e.year(),o=i),{week:o,year:s}}function to(e,t,n){var r=gd(e,t,n),i=gd(e+1,t,n);return(ql(e)-r+i)/7}Ne("w",["ww",2],"wo","week");Ne("W",["WW",2],"Wo","isoWeek");be("w",Zt,Ja);be("ww",Zt,Nr);be("W",Zt,Ja);be("WW",Zt,Nr);ru(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=xt(e)});function aA(e){return Ac(e,this._week.dow,this._week.doy).week}var lA={dow:0,doy:6};function cA(){return this._week.dow}function uA(){return this._week.doy}function fA(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function dA(e){var t=Ac(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ne("d",0,"do","day");Ne("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ne("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ne("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ne("e",0,0,"weekday");Ne("E",0,0,"isoWeekday");be("d",Zt);be("e",Zt);be("E",Zt);be("dd",function(e,t){return t.weekdaysMinRegex(e)});be("ddd",function(e,t){return t.weekdaysShortRegex(e)});be("dddd",function(e,t){return t.weekdaysRegex(e)});ru(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ut(n).invalidWeekday=e});ru(["d","e","E"],function(e,t,n,r){t[r]=xt(e)});function hA(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function pA(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Vg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var gA="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),N6="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mA="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),vA=nu,yA=nu,wA=nu;function xA(e,t){var n=ui(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Vg(n,this._week.dow):e?n[e.day()]:n}function bA(e){return e===!0?Vg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function _A(e){return e===!0?Vg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function CA(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Di([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=mn.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=mn.call(this._weekdaysParse,s),i!==-1||(i=mn.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,s),i!==-1||(i=mn.call(this._weekdaysParse,s),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=mn.call(this._minWeekdaysParse,s),i!==-1||(i=mn.call(this._weekdaysParse,s),i!==-1)?i:(i=mn.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function SA(e,t,n){var r,i,o;if(this._weekdaysParseExact)return CA.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Di([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function kA(e){if(!this.isValid())return e!=null?this:NaN;var t=Tc(this,"Day");return e!=null?(e=hA(e,this.localeData()),this.add(e-t,"d")):t}function EA(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function MA(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=pA(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function TA(e){return this._weekdaysParseExact?(Lt(this,"_weekdaysRegex")||Yg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Lt(this,"_weekdaysRegex")||(this._weekdaysRegex=vA),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function PA(e){return this._weekdaysParseExact?(Lt(this,"_weekdaysRegex")||Yg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Lt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yA),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function AA(e){return this._weekdaysParseExact?(Lt(this,"_weekdaysRegex")||Yg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Lt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=wA),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yg(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],o,s,a,l,c;for(o=0;o<7;o++)s=Di([2e3,1]).day(o),a=eo(this.weekdaysMin(s,"")),l=eo(this.weekdaysShort(s,"")),c=eo(this.weekdays(s,"")),t.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Kg(){return this.hours()%12||12}function LA(){return this.hours()||24}Ne("H",["HH",2],0,"hour");Ne("h",["hh",2],0,Kg);Ne("k",["kk",2],0,LA);Ne("hmm",0,0,function(){return""+Kg.apply(this)+Ai(this.minutes(),2)});Ne("hmmss",0,0,function(){return""+Kg.apply(this)+Ai(this.minutes(),2)+Ai(this.seconds(),2)});Ne("Hmm",0,0,function(){return""+this.hours()+Ai(this.minutes(),2)});Ne("Hmmss",0,0,function(){return""+this.hours()+Ai(this.minutes(),2)+Ai(this.seconds(),2)});function W6(e,t){Ne(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}W6("a",!0);W6("A",!1);function $6(e,t){return t._meridiemParse}be("a",$6);be("A",$6);be("H",Zt,Hg);be("h",Zt,Ja);be("k",Zt,Ja);be("HH",Zt,Nr);be("hh",Zt,Nr);be("kk",Zt,Nr);be("hmm",E6);be("hmmss",M6);be("Hmm",E6);be("Hmmss",M6);Bt(["H","HH"],On);Bt(["k","kk"],function(e,t,n){var r=xt(e);t[On]=r===24?0:r});Bt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Bt(["h","hh"],function(e,t,n){t[On]=xt(e),ut(n).bigHour=!0});Bt("hmm",function(e,t,n){var r=e.length-2;t[On]=xt(e.substr(0,r)),t[ri]=xt(e.substr(r)),ut(n).bigHour=!0});Bt("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[On]=xt(e.substr(0,r)),t[ri]=xt(e.substr(r,2)),t[Gi]=xt(e.substr(i)),ut(n).bigHour=!0});Bt("Hmm",function(e,t,n){var r=e.length-2;t[On]=xt(e.substr(0,r)),t[ri]=xt(e.substr(r))});Bt("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[On]=xt(e.substr(0,r)),t[ri]=xt(e.substr(r,2)),t[Gi]=xt(e.substr(i))});function OA(e){return(e+"").toLowerCase().charAt(0)==="p"}var RA=/[ap]\.?m?\.?/i,DA=Xa("Hours",!0);function IA(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var U6={calendar:CP,longDateFormat:MP,invalidDate:PP,ordinal:LP,dayOfMonthOrdinalParse:OP,relativeTime:DP,months:ZP,monthsShort:A6,week:lA,weekdays:gA,weekdaysMin:mA,weekdaysShort:N6,meridiemParse:RA},Jt={},fl={},Lc;function NA(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=yh(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&NA(o,r)>=n-1)break;n--}t++}return Lc}function $A(e){return!!(e&&e.match("^[^/\\\\]*$"))}function yh(e){var t=null,n;if(Jt[e]===void 0&&typeof module<"u"&&module&&module.exports&&$A(e))try{t=Lc._abbr,n=require,n("./locale/"+e),zo(t)}catch{Jt[e]=null}return Jt[e]}function zo(e,t){var n;return e&&(pr(t)?n=go(e):n=qg(e,t),n?Lc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Lc._abbr}function qg(e,t){if(t!==null){var n,r=U6;if(t.abbr=e,Jt[e]!=null)_6("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jt[e]._config;else if(t.parentLocale!=null)if(Jt[t.parentLocale]!=null)r=Jt[t.parentLocale]._config;else if(n=yh(t.parentLocale),n!=null)r=n._config;else return fl[t.parentLocale]||(fl[t.parentLocale]=[]),fl[t.parentLocale].push({name:e,config:t}),null;return Jt[e]=new $g(K0(r,t)),fl[e]&&fl[e].forEach(function(i){qg(i.name,i.config)}),zo(e),Jt[e]}else return delete Jt[e],null}function UA(e,t){if(t!=null){var n,r,i=U6;Jt[e]!=null&&Jt[e].parentLocale!=null?Jt[e].set(K0(Jt[e]._config,t)):(r=yh(e),r!=null&&(i=r._config),t=K0(i,t),r==null&&(t.abbr=e),n=new $g(t),n.parentLocale=Jt[e],Jt[e]=n),zo(e)}else Jt[e]!=null&&(Jt[e].parentLocale!=null?(Jt[e]=Jt[e].parentLocale,e===zo()&&zo(e)):Jt[e]!=null&&delete Jt[e]);return Jt[e]}function go(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Lc;if(!ui(e)){if(t=yh(e),t)return t;e=[e]}return WA(e)}function FA(){return q0(Jt)}function Gg(e){var t,n=e._a;return n&&ut(e).overflow===-2&&(t=n[qi]<0||n[qi]>11?qi:n[wi]<1||n[wi]>zg(n[tr],n[qi])?wi:n[On]<0||n[On]>24||n[On]===24&&(n[ri]!==0||n[Gi]!==0||n[xs]!==0)?On:n[ri]<0||n[ri]>59?ri:n[Gi]<0||n[Gi]>59?Gi:n[xs]<0||n[xs]>999?xs:-1,ut(e)._overflowDayOfYear&&(twi)&&(t=wi),ut(e)._overflowWeeks&&t===-1&&(t=zP),ut(e)._overflowWeekday&&t===-1&&(t=VP),ut(e).overflow=t),e}var BA=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jA=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,HA=/Z|[+-]\d\d(?::?\d\d)?/,Iu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],x1=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],zA=/^\/?Date\((-?\d+)/i,VA=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,YA={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function F6(e){var t,n,r=e._i,i=BA.exec(r)||jA.exec(r),o,s,a,l,c=Iu.length,u=x1.length;if(i){for(ut(e).iso=!0,t=0,n=c;tql(s)||e._dayOfYear===0)&&(ut(e)._overflowDayOfYear=!0),n=Pc(s,0,e._dayOfYear),e._a[qi]=n.getUTCMonth(),e._a[wi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[On]===24&&e._a[ri]===0&&e._a[Gi]===0&&e._a[xs]===0&&(e._nextDay=!0,e._a[On]=0),e._d=(e._useUTC?Pc:sA).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[On]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ut(e).weekdayMismatch=!0)}}function eL(e){var t,n,r,i,o,s,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,s=4,n=Xs(t.GG,e._a[tr],Ac(Gt(),1,4).year),r=Xs(t.W,1),i=Xs(t.E,1),(i<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,c=Ac(Gt(),o,s),n=Xs(t.gg,e._a[tr],c.year),r=Xs(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>to(n,o,s)?ut(e)._overflowWeeks=!0:l!=null?ut(e)._overflowWeekday=!0:(a=I6(n,r,i,o,s),e._a[tr]=a.year,e._dayOfYear=a.dayOfYear)}pe.ISO_8601=function(){};pe.RFC_2822=function(){};function Qg(e){if(e._f===pe.ISO_8601){F6(e);return}if(e._f===pe.RFC_2822){B6(e);return}e._a=[],ut(e).empty=!0;var t=""+e._i,n,r,i,o,s,a=t.length,l=0,c,u;for(i=C6(e._f,e._locale).match(Ug)||[],u=i.length,n=0;n0&&ut(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),ka[o]?(r?ut(e).empty=!1:ut(e).unusedTokens.push(o),HP(o,r,e)):e._strict&&!r&&ut(e).unusedTokens.push(o);ut(e).charsLeftOver=a-l,t.length>0&&ut(e).unusedInput.push(t),e._a[On]<=12&&ut(e).bigHour===!0&&e._a[On]>0&&(ut(e).bigHour=void 0),ut(e).parsedDateParts=e._a.slice(0),ut(e).meridiem=e._meridiem,e._a[On]=tL(e._locale,e._a[On],e._meridiem),c=ut(e).era,c!==null&&(e._a[tr]=e._locale.erasConvertYear(c,e._a[tr])),Zg(e),Gg(e)}function tL(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function nL(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(l===0){ut(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:fh()});function z6(e,t){var n,r;if(t.length===1&&ui(t[0])&&(t=t[0]),!t.length)return Gt();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function CL(){if(!pr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Wg(e,this),e=j6(e),e._a?(t=e._isUTC?Di(e._a):Gt(e._a),this._isDSTShifted=this.isValid()&&pL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function SL(){return this.isValid()?!this._isUTC:!1}function kL(){return this.isValid()?this._isUTC:!1}function Y6(){return this.isValid()?this._isUTC&&this._offset===0:!1}var EL=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ML=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hi(e,t){var n=e,r=null,i,o,s;return gf(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:lo(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=EL.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:xt(r[wi])*i,h:xt(r[On])*i,m:xt(r[ri])*i,s:xt(r[Gi])*i,ms:xt(Z0(r[xs]*1e3))*i}):(r=ML.exec(e))?(i=r[1]==="-"?-1:1,n={y:ss(r[2],i),M:ss(r[3],i),w:ss(r[4],i),d:ss(r[5],i),h:ss(r[6],i),m:ss(r[7],i),s:ss(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=TL(Gt(n.from),Gt(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),o=new wh(n),gf(e)&&Lt(e,"_locale")&&(o._locale=e._locale),gf(e)&&Lt(e,"_isValid")&&(o._isValid=e._isValid),o}hi.fn=wh.prototype;hi.invalid=hL;function ss(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Yv(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function TL(e,t){var n;return e.isValid()&&t.isValid()?(t=Xg(t,e),e.isBefore(t)?n=Yv(e,t):(n=Yv(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function K6(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(_6(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=hi(n,r),q6(this,i,e),this}}function q6(e,t,n,r){var i=t._milliseconds,o=Z0(t._days),s=Z0(t._months);e.isValid()&&(r=r??!0,s&&O6(e,Tc(e,"Month")+s*n),o&&P6(e,"Date",Tc(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&pe.updateOffset(e,o||s))}var PL=K6(1,"add"),AL=K6(-1,"subtract");function G6(e){return typeof e=="string"||e instanceof String}function LL(e){return fi(e)||eu(e)||G6(e)||lo(e)||RL(e)||OL(e)||e===null||e===void 0}function OL(e){var t=Ps(e)&&!Ig(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?pf(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ii(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pf(n,"Z")):pf(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function KL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function qL(e){e||(e=this.isUtc()?pe.defaultFormatUtc:pe.defaultFormat);var t=pf(this,e);return this.localeData().postformat(t)}function GL(e,t){return this.isValid()&&(fi(e)&&e.isValid()||Gt(e).isValid())?hi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ZL(e){return this.from(Gt(),e)}function QL(e,t){return this.isValid()&&(fi(e)&&e.isValid()||Gt(e).isValid())?hi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function JL(e){return this.to(Gt(),e)}function Z6(e){var t;return e===void 0?this._locale._abbr:(t=go(e),t!=null&&(this._locale=t),this)}var Q6=qr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function J6(){return this._locale}var md=1e3,Ea=60*md,vd=60*Ea,X6=(365*400+97)*24*vd;function Ma(e,t){return(e%t+t)%t}function ex(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-X6:new Date(e,t,n).valueOf()}function tx(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-X6:Date.UTC(e,t,n)}function XL(e){var t,n;if(e=Gr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?tx:ex,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ma(t+(this._isUTC?0:this.utcOffset()*Ea),vd);break;case"minute":t=this._d.valueOf(),t-=Ma(t,Ea);break;case"second":t=this._d.valueOf(),t-=Ma(t,md);break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function eO(e){var t,n;if(e=Gr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?tx:ex,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=vd-Ma(t+(this._isUTC?0:this.utcOffset()*Ea),vd)-1;break;case"minute":t=this._d.valueOf(),t+=Ea-Ma(t,Ea)-1;break;case"second":t=this._d.valueOf(),t+=md-Ma(t,md)-1;break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function tO(){return this._d.valueOf()-(this._offset||0)*6e4}function nO(){return Math.floor(this.valueOf()/1e3)}function rO(){return new Date(this.valueOf())}function iO(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function oO(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function sO(){return this.isValid()?this.toISOString():null}function aO(){return Ng(this)}function lO(){return Po({},ut(this))}function cO(){return ut(this).overflow}function uO(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ne("N",0,0,"eraAbbr");Ne("NN",0,0,"eraAbbr");Ne("NNN",0,0,"eraAbbr");Ne("NNNN",0,0,"eraName");Ne("NNNNN",0,0,"eraNarrow");Ne("y",["y",1],"yo","eraYear");Ne("y",["yy",2],0,"eraYear");Ne("y",["yyy",3],0,"eraYear");Ne("y",["yyyy",4],0,"eraYear");be("N",em);be("NN",em);be("NNN",em);be("NNNN",bO);be("NNNNN",_O);Bt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ut(n).era=i:ut(n).invalidEra=e});be("y",Qa);be("yy",Qa);be("yyy",Qa);be("yyyy",Qa);be("yo",CO);Bt(["y","yy","yyy","yyyy"],tr);Bt(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[tr]=n._locale.eraYearOrdinalParse(e,i):t[tr]=parseInt(e,10)});function fO(e,t){var n,r,i,o=this._eras||go("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function hO(e,t){var n=e.since<=e.until?1:-1;return t===void 0?pe(e.since).year():pe(e.since).year()+(t-e.offset)*n}function pO(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),AO.call(this,e,t,n,r,i))}function AO(e,t,n,r,i){var o=I6(e,t,n,r,i),s=Pc(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Ne("Q",0,"Qo","quarter");be("Q",S6);Bt("Q",function(e,t){t[qi]=(xt(e)-1)*3});function LO(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ne("D",["DD",2],"Do","date");be("D",Zt,Ja);be("DD",Zt,Nr);be("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Bt(["D","DD"],wi);Bt("Do",function(e,t){t[wi]=xt(e.match(Zt)[0])});var rx=Xa("Date",!0);Ne("DDD",["DDDD",3],"DDDo","dayOfYear");be("DDD",hh);be("DDDD",k6);Bt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=xt(e)});function OO(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ne("m",["mm",2],0,"minute");be("m",Zt,Hg);be("mm",Zt,Nr);Bt(["m","mm"],ri);var RO=Xa("Minutes",!1);Ne("s",["ss",2],0,"second");be("s",Zt,Hg);be("ss",Zt,Nr);Bt(["s","ss"],Gi);var DO=Xa("Seconds",!1);Ne("S",0,0,function(){return~~(this.millisecond()/100)});Ne(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ne(0,["SSS",3],0,"millisecond");Ne(0,["SSSS",4],0,function(){return this.millisecond()*10});Ne(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ne(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ne(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ne(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ne(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});be("S",hh,S6);be("SS",hh,Nr);be("SSS",hh,k6);var Ao,ix;for(Ao="SSSS";Ao.length<=9;Ao+="S")be(Ao,Qa);function IO(e,t){t[xs]=xt(("0."+e)*1e3)}for(Ao="S";Ao.length<=9;Ao+="S")Bt(Ao,IO);ix=Xa("Milliseconds",!1);Ne("z",0,0,"zoneAbbr");Ne("zz",0,0,"zoneName");function NO(){return this._isUTC?"UTC":""}function WO(){return this._isUTC?"Coordinated Universal Time":""}var le=tu.prototype;le.add=PL;le.calendar=NL;le.clone=WL;le.diff=zL;le.endOf=eO;le.format=qL;le.from=GL;le.fromNow=ZL;le.to=QL;le.toNow=JL;le.get=KP;le.invalidAt=cO;le.isAfter=$L;le.isBefore=UL;le.isBetween=FL;le.isSame=BL;le.isSameOrAfter=jL;le.isSameOrBefore=HL;le.isValid=aO;le.lang=Q6;le.locale=Z6;le.localeData=J6;le.max=aL;le.min=sL;le.parsingFlags=lO;le.set=qP;le.startOf=XL;le.subtract=AL;le.toArray=iO;le.toObject=oO;le.toDate=rO;le.toISOString=YL;le.inspect=KL;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=sO;le.toString=VL;le.unix=nO;le.valueOf=tO;le.creationData=uO;le.eraName=pO;le.eraNarrow=gO;le.eraAbbr=mO;le.eraYear=vO;le.year=T6;le.isLeapYear=YP;le.weekYear=SO;le.isoWeekYear=kO;le.quarter=le.quarters=LO;le.month=R6;le.daysInMonth=rA;le.week=le.weeks=fA;le.isoWeek=le.isoWeeks=dA;le.weeksInYear=TO;le.weeksInWeekYear=PO;le.isoWeeksInYear=EO;le.isoWeeksInISOWeekYear=MO;le.date=rx;le.day=le.days=kA;le.weekday=EA;le.isoWeekday=MA;le.dayOfYear=OO;le.hour=le.hours=DA;le.minute=le.minutes=RO;le.second=le.seconds=DO;le.millisecond=le.milliseconds=ix;le.utcOffset=mL;le.utc=yL;le.local=wL;le.parseZone=xL;le.hasAlignedHourOffset=bL;le.isDST=_L;le.isLocal=SL;le.isUtcOffset=kL;le.isUtc=Y6;le.isUTC=Y6;le.zoneAbbr=NO;le.zoneName=WO;le.dates=qr("dates accessor is deprecated. Use date instead.",rx);le.months=qr("months accessor is deprecated. Use month instead",R6);le.years=qr("years accessor is deprecated. Use year instead",T6);le.zone=qr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vL);le.isDSTShifted=qr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",CL);function $O(e){return Gt(e*1e3)}function UO(){return Gt.apply(null,arguments).parseZone()}function ox(e){return e}var Ot=$g.prototype;Ot.calendar=SP;Ot.longDateFormat=TP;Ot.invalidDate=AP;Ot.ordinal=RP;Ot.preparse=ox;Ot.postformat=ox;Ot.relativeTime=IP;Ot.pastFuture=NP;Ot.set=_P;Ot.eras=fO;Ot.erasParse=dO;Ot.erasConvertYear=hO;Ot.erasAbbrRegex=wO;Ot.erasNameRegex=yO;Ot.erasNarrowRegex=xO;Ot.months=XP;Ot.monthsShort=eA;Ot.monthsParse=nA;Ot.monthsRegex=oA;Ot.monthsShortRegex=iA;Ot.week=aA;Ot.firstDayOfYear=uA;Ot.firstDayOfWeek=cA;Ot.weekdays=xA;Ot.weekdaysMin=_A;Ot.weekdaysShort=bA;Ot.weekdaysParse=SA;Ot.weekdaysRegex=TA;Ot.weekdaysShortRegex=PA;Ot.weekdaysMinRegex=AA;Ot.isPM=OA;Ot.meridiem=IA;function yd(e,t,n,r){var i=go(),o=Di().set(r,t);return i[n](o,e)}function sx(e,t,n){if(lo(e)&&(t=e,e=void 0),e=e||"",t!=null)return yd(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=yd(e,r,n,"month");return i}function nm(e,t,n,r){typeof e=="boolean"?(lo(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,lo(t)&&(n=t,t=void 0),t=t||"");var i=go(),o=e?i._week.dow:0,s,a=[];if(n!=null)return yd(t,(n+o)%7,r,"day");for(s=0;s<7;s++)a[s]=yd(t,(s+o)%7,r,"day");return a}function FO(e,t){return sx(e,t,"months")}function BO(e,t){return sx(e,t,"monthsShort")}function jO(e,t,n){return nm(e,t,n,"weekdays")}function HO(e,t,n){return nm(e,t,n,"weekdaysShort")}function zO(e,t,n){return nm(e,t,n,"weekdaysMin")}zo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=xt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});pe.lang=qr("moment.lang is deprecated. Use moment.locale instead.",zo);pe.langData=qr("moment.langData is deprecated. Use moment.localeData instead.",go);var Wi=Math.abs;function VO(){var e=this._data;return this._milliseconds=Wi(this._milliseconds),this._days=Wi(this._days),this._months=Wi(this._months),e.milliseconds=Wi(e.milliseconds),e.seconds=Wi(e.seconds),e.minutes=Wi(e.minutes),e.hours=Wi(e.hours),e.months=Wi(e.months),e.years=Wi(e.years),this}function ax(e,t,n,r){var i=hi(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function YO(e,t){return ax(this,e,t,1)}function KO(e,t){return ax(this,e,t,-1)}function Kv(e){return e<0?Math.floor(e):Math.ceil(e)}function qO(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,s,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Kv(J0(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Br(e/1e3),r.seconds=i%60,o=Br(i/60),r.minutes=o%60,s=Br(o/60),r.hours=s%24,t+=Br(s/24),l=Br(lx(t)),n+=l,t-=Kv(J0(l)),a=Br(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function lx(e){return e*4800/146097}function J0(e){return e*146097/4800}function GO(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Gr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+lx(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(J0(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function mo(e){return function(){return this.as(e)}}var cx=mo("ms"),ZO=mo("s"),QO=mo("m"),JO=mo("h"),XO=mo("d"),eR=mo("w"),tR=mo("M"),nR=mo("Q"),rR=mo("y"),iR=cx;function oR(){return hi(this)}function sR(e){return e=Gr(e),this.isValid()?this[e+"s"]():NaN}function Vs(e){return function(){return this.isValid()?this._data[e]:NaN}}var aR=Vs("milliseconds"),lR=Vs("seconds"),cR=Vs("minutes"),uR=Vs("hours"),fR=Vs("days"),dR=Vs("months"),hR=Vs("years");function pR(){return Br(this.days()/7)}var Fi=Math.round,va={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function gR(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function mR(e,t,n,r){var i=hi(e).abs(),o=Fi(i.as("s")),s=Fi(i.as("m")),a=Fi(i.as("h")),l=Fi(i.as("d")),c=Fi(i.as("M")),u=Fi(i.as("w")),d=Fi(i.as("y")),h=o<=n.ss&&["s",o]||o0,h[4]=r,gR.apply(null,h)}function vR(e){return e===void 0?Fi:typeof e=="function"?(Fi=e,!0):!1}function yR(e,t){return va[e]===void 0?!1:t===void 0?va[e]:(va[e]=t,e==="s"&&(va.ss=t-1),!0)}function wR(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=va,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},va,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=mR(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var b1=Math.abs;function Qs(e){return(e>0)-(e<0)||+e}function bh(){if(!this.isValid())return this.localeData().invalidDate();var e=b1(this._milliseconds)/1e3,t=b1(this._days),n=b1(this._months),r,i,o,s,a=this.asSeconds(),l,c,u,d;return a?(r=Br(e/60),i=Br(r/60),e%=60,r%=60,o=Br(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=Qs(this._months)!==Qs(a)?"-":"",u=Qs(this._days)!==Qs(a)?"-":"",d=Qs(this._milliseconds)!==Qs(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var St=wh.prototype;St.isValid=dL;St.abs=VO;St.add=YO;St.subtract=KO;St.as=GO;St.asMilliseconds=cx;St.asSeconds=ZO;St.asMinutes=QO;St.asHours=JO;St.asDays=XO;St.asWeeks=eR;St.asMonths=tR;St.asQuarters=nR;St.asYears=rR;St.valueOf=iR;St._bubble=qO;St.clone=oR;St.get=sR;St.milliseconds=aR;St.seconds=lR;St.minutes=cR;St.hours=uR;St.days=fR;St.weeks=pR;St.months=dR;St.years=hR;St.humanize=wR;St.toISOString=bh;St.toString=bh;St.toJSON=bh;St.locale=Z6;St.localeData=J6;St.toIsoString=qr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bh);St.lang=Q6;Ne("X",0,0,"unix");Ne("x",0,0,"valueOf");be("x",gh);be("X",FP);Bt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Bt("x",function(e,t,n){n._d=new Date(xt(e))});//! moment.js -pe.version="2.30.1";xP(Gt);pe.fn=le;pe.min=lL;pe.max=cL;pe.now=uL;pe.utc=Di;pe.unix=$O;pe.months=FO;pe.isDate=eu;pe.locale=zo;pe.invalid=fh;pe.duration=hi;pe.isMoment=fi;pe.weekdays=jO;pe.parseZone=UO;pe.localeData=go;pe.isDuration=gf;pe.monthsShort=BO;pe.weekdaysMin=zO;pe.defineLocale=qg;pe.updateLocale=UA;pe.locales=FA;pe.weekdaysShort=HO;pe.normalizeUnits=Gr;pe.relativeTimeRounding=vR;pe.relativeTimeThreshold=yR;pe.calendarFormat=IL;pe.prototype=le;pe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};/*! +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var zv={};function C6(e,t){pe.deprecationHandler!=null&&pe.deprecationHandler(e,t),zv[e]||(_6(t),zv[e]=!0)}pe.suppressDeprecationWarnings=!1;pe.deprecationHandler=null;function Ii(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function CP(e){var t,n;for(n in e)Ot(e,n)&&(t=e[n],Ii(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function q0(e,t){var n=Po({},e),r;for(r in t)Ot(t,r)&&(As(e[r])&&As(t[r])?(n[r]={},Po(n[r],e[r]),Po(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)Ot(e,r)&&!Ot(t,r)&&As(e[r])&&(n[r]=Po({},n[r]));return n}function Ug(e){e!=null&&this.set(e)}var G0;Object.keys?G0=Object.keys:G0=function(e){var t,n=[];for(t in e)Ot(e,t)&&n.push(t);return n};var SP={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function kP(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Ii(r)?r.call(t,n):r}function Ai(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Fg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Iu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,x1={},Ea={};function Ne(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Ea[e]=i),t&&(Ea[t[0]]=function(){return Ai(i.apply(this,arguments),t[1],t[2])}),n&&(Ea[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function EP(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function MP(e){var t=e.match(Fg),n,r;for(n=0,r=t.length;n=0&&Iu.test(e);)e=e.replace(Iu,r),Iu.lastIndex=0,n-=1;return e}var TP={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function PP(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Fg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var AP="Invalid date";function LP(){return this._invalidDate}var OP="%d",RP=/\d{1,2}/;function DP(e){return this._ordinal.replace("%d",e)}var IP={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function NP(e,t,n,r){var i=this._relativeTime[n];return Ii(i)?i(e,t,n,r):i.replace(/%d/i,e)}function WP(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ii(n)?n(t):n.replace(/%s/i,t)}var Vv={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Gr(e){return typeof e=="string"?Vv[e]||Vv[e.toLowerCase()]:void 0}function Bg(e){var t={},n,r;for(r in e)Ot(e,r)&&(n=Gr(r),n&&(t[n]=e[r]));return t}var $P={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function UP(e){var t=[],n;for(n in e)Ot(e,n)&&t.push({unit:n,priority:$P[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var k6=/\d/,Nr=/\d\d/,E6=/\d{3}/,jg=/\d{4}/,hh=/[+-]?\d{6}/,Gt=/\d\d?/,M6=/\d\d\d\d?/,T6=/\d\d\d\d\d\d?/,ph=/\d{1,3}/,Hg=/\d{1,4}/,gh=/[+-]?\d{1,6}/,Ja=/\d+/,mh=/[+-]?\d+/,FP=/Z|[+-]\d\d:?\d\d/gi,vh=/Z|[+-]\d\d(?::?\d\d)?/gi,BP=/[+-]?\d+(\.\d{1,3})?/,ru=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Xa=/^[1-9]\d?/,zg=/^([1-9]\d|\d)/,gd;gd={};function be(e,t,n){gd[e]=Ii(t)?t:function(r,i){return r&&n?n:t}}function jP(e,t){return Ot(gd,e)?gd[e](t._strict,t._locale):new RegExp(HP(e))}function HP(e){return eo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function eo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Br(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function bt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Br(t)),n}var Z0={};function jt(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),lo(t)&&(r=function(o,s){s[t]=bt(o)}),i=e.length,n=0;n68?1900:2e3)};var P6=el("FullYear",!0);function KP(){return yh(this.year())}function el(e,t){return function(n){return n!=null?(A6(this,e,n),pe.updateOffset(this,t),this):Pc(this,e)}}function Pc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function A6(e,t,n){var r,i,o,s,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,s=e.month(),a=e.date(),a=a===29&&s===1&&!yh(o)?28:a,i?r.setUTCFullYear(o,s,a):r.setFullYear(o,s,a)}}function qP(e){return e=Gr(e),Ii(this[e])?this[e]():this}function GP(e,t){if(typeof e=="object"){e=Bg(e);var n=UP(e),r,i=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Ac(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function md(e,t,n){var r=7+t-n,i=(7+Ac(e,0,r).getUTCDay()-t)%7;return-i+r-1}function N6(e,t,n,r,i){var o=(7+n-r)%7,s=md(e,r,i),a=1+7*(t-1)+o+s,l,c;return a<=0?(l=e-1,c=Gl(l)+a):a>Gl(e)?(l=e+1,c=a-Gl(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Lc(e,t,n){var r=md(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,s;return i<1?(s=e.year()-1,o=i+to(s,t,n)):i>to(e.year(),t,n)?(o=i-to(e.year(),t,n),s=e.year()+1):(s=e.year(),o=i),{week:o,year:s}}function to(e,t,n){var r=md(e,t,n),i=md(e+1,t,n);return(Gl(e)-r+i)/7}Ne("w",["ww",2],"wo","week");Ne("W",["WW",2],"Wo","isoWeek");be("w",Gt,Xa);be("ww",Gt,Nr);be("W",Gt,Xa);be("WW",Gt,Nr);iu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=bt(e)});function lA(e){return Lc(e,this._week.dow,this._week.doy).week}var cA={dow:0,doy:6};function uA(){return this._week.dow}function fA(){return this._week.doy}function dA(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function hA(e){var t=Lc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ne("d",0,"do","day");Ne("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ne("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ne("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ne("e",0,0,"weekday");Ne("E",0,0,"isoWeekday");be("d",Gt);be("e",Gt);be("E",Gt);be("dd",function(e,t){return t.weekdaysMinRegex(e)});be("ddd",function(e,t){return t.weekdaysShortRegex(e)});be("dddd",function(e,t){return t.weekdaysRegex(e)});iu(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ut(n).invalidWeekday=e});iu(["d","e","E"],function(e,t,n,r){t[r]=bt(e)});function pA(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function gA(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Yg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var mA="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),W6="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vA="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yA=ru,wA=ru,xA=ru;function bA(e,t){var n=ui(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Yg(n,this._week.dow):e?n[e.day()]:n}function _A(e){return e===!0?Yg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function CA(e){return e===!0?Yg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function SA(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Di([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=mn.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=mn.call(this._weekdaysParse,s),i!==-1||(i=mn.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,s),i!==-1||(i=mn.call(this._weekdaysParse,s),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=mn.call(this._minWeekdaysParse,s),i!==-1||(i=mn.call(this._weekdaysParse,s),i!==-1)?i:(i=mn.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function kA(e,t,n){var r,i,o;if(this._weekdaysParseExact)return SA.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Di([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function EA(e){if(!this.isValid())return e!=null?this:NaN;var t=Pc(this,"Day");return e!=null?(e=pA(e,this.localeData()),this.add(e-t,"d")):t}function MA(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function TA(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=gA(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function PA(e){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||Kg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ot(this,"_weekdaysRegex")||(this._weekdaysRegex=yA),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function AA(e){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||Kg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ot(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wA),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function LA(e){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||Kg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ot(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=xA),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kg(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],o,s,a,l,c;for(o=0;o<7;o++)s=Di([2e3,1]).day(o),a=eo(this.weekdaysMin(s,"")),l=eo(this.weekdaysShort(s,"")),c=eo(this.weekdays(s,"")),t.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function qg(){return this.hours()%12||12}function OA(){return this.hours()||24}Ne("H",["HH",2],0,"hour");Ne("h",["hh",2],0,qg);Ne("k",["kk",2],0,OA);Ne("hmm",0,0,function(){return""+qg.apply(this)+Ai(this.minutes(),2)});Ne("hmmss",0,0,function(){return""+qg.apply(this)+Ai(this.minutes(),2)+Ai(this.seconds(),2)});Ne("Hmm",0,0,function(){return""+this.hours()+Ai(this.minutes(),2)});Ne("Hmmss",0,0,function(){return""+this.hours()+Ai(this.minutes(),2)+Ai(this.seconds(),2)});function $6(e,t){Ne(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$6("a",!0);$6("A",!1);function U6(e,t){return t._meridiemParse}be("a",U6);be("A",U6);be("H",Gt,zg);be("h",Gt,Xa);be("k",Gt,Xa);be("HH",Gt,Nr);be("hh",Gt,Nr);be("kk",Gt,Nr);be("hmm",M6);be("hmmss",T6);be("Hmm",M6);be("Hmmss",T6);jt(["H","HH"],On);jt(["k","kk"],function(e,t,n){var r=bt(e);t[On]=r===24?0:r});jt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});jt(["h","hh"],function(e,t,n){t[On]=bt(e),ut(n).bigHour=!0});jt("hmm",function(e,t,n){var r=e.length-2;t[On]=bt(e.substr(0,r)),t[ri]=bt(e.substr(r)),ut(n).bigHour=!0});jt("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[On]=bt(e.substr(0,r)),t[ri]=bt(e.substr(r,2)),t[Gi]=bt(e.substr(i)),ut(n).bigHour=!0});jt("Hmm",function(e,t,n){var r=e.length-2;t[On]=bt(e.substr(0,r)),t[ri]=bt(e.substr(r))});jt("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[On]=bt(e.substr(0,r)),t[ri]=bt(e.substr(r,2)),t[Gi]=bt(e.substr(i))});function RA(e){return(e+"").toLowerCase().charAt(0)==="p"}var DA=/[ap]\.?m?\.?/i,IA=el("Hours",!0);function NA(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var F6={calendar:SP,longDateFormat:TP,invalidDate:AP,ordinal:OP,dayOfMonthOrdinalParse:RP,relativeTime:IP,months:QP,monthsShort:L6,week:cA,weekdays:mA,weekdaysMin:vA,weekdaysShort:W6,meridiemParse:DA},Qt={},dl={},Oc;function WA(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=wh(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&WA(o,r)>=n-1)break;n--}t++}return Oc}function UA(e){return!!(e&&e.match("^[^/\\\\]*$"))}function wh(e){var t=null,n;if(Qt[e]===void 0&&typeof module<"u"&&module&&module.exports&&UA(e))try{t=Oc._abbr,n=require,n("./locale/"+e),zo(t)}catch{Qt[e]=null}return Qt[e]}function zo(e,t){var n;return e&&(pr(t)?n=go(e):n=Gg(e,t),n?Oc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Oc._abbr}function Gg(e,t){if(t!==null){var n,r=F6;if(t.abbr=e,Qt[e]!=null)C6("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[e]._config;else if(t.parentLocale!=null)if(Qt[t.parentLocale]!=null)r=Qt[t.parentLocale]._config;else if(n=wh(t.parentLocale),n!=null)r=n._config;else return dl[t.parentLocale]||(dl[t.parentLocale]=[]),dl[t.parentLocale].push({name:e,config:t}),null;return Qt[e]=new Ug(q0(r,t)),dl[e]&&dl[e].forEach(function(i){Gg(i.name,i.config)}),zo(e),Qt[e]}else return delete Qt[e],null}function FA(e,t){if(t!=null){var n,r,i=F6;Qt[e]!=null&&Qt[e].parentLocale!=null?Qt[e].set(q0(Qt[e]._config,t)):(r=wh(e),r!=null&&(i=r._config),t=q0(i,t),r==null&&(t.abbr=e),n=new Ug(t),n.parentLocale=Qt[e],Qt[e]=n),zo(e)}else Qt[e]!=null&&(Qt[e].parentLocale!=null?(Qt[e]=Qt[e].parentLocale,e===zo()&&zo(e)):Qt[e]!=null&&delete Qt[e]);return Qt[e]}function go(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Oc;if(!ui(e)){if(t=wh(e),t)return t;e=[e]}return $A(e)}function BA(){return G0(Qt)}function Zg(e){var t,n=e._a;return n&&ut(e).overflow===-2&&(t=n[qi]<0||n[qi]>11?qi:n[wi]<1||n[wi]>Vg(n[tr],n[qi])?wi:n[On]<0||n[On]>24||n[On]===24&&(n[ri]!==0||n[Gi]!==0||n[bs]!==0)?On:n[ri]<0||n[ri]>59?ri:n[Gi]<0||n[Gi]>59?Gi:n[bs]<0||n[bs]>999?bs:-1,ut(e)._overflowDayOfYear&&(twi)&&(t=wi),ut(e)._overflowWeeks&&t===-1&&(t=VP),ut(e)._overflowWeekday&&t===-1&&(t=YP),ut(e).overflow=t),e}var jA=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,HA=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zA=/Z|[+-]\d\d(?::?\d\d)?/,Nu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],b1=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],VA=/^\/?Date\((-?\d+)/i,YA=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,KA={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function B6(e){var t,n,r=e._i,i=jA.exec(r)||HA.exec(r),o,s,a,l,c=Nu.length,u=b1.length;if(i){for(ut(e).iso=!0,t=0,n=c;tGl(s)||e._dayOfYear===0)&&(ut(e)._overflowDayOfYear=!0),n=Ac(s,0,e._dayOfYear),e._a[qi]=n.getUTCMonth(),e._a[wi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[On]===24&&e._a[ri]===0&&e._a[Gi]===0&&e._a[bs]===0&&(e._nextDay=!0,e._a[On]=0),e._d=(e._useUTC?Ac:aA).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[On]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(ut(e).weekdayMismatch=!0)}}function tL(e){var t,n,r,i,o,s,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,s=4,n=ea(t.GG,e._a[tr],Lc(qt(),1,4).year),r=ea(t.W,1),i=ea(t.E,1),(i<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,c=Lc(qt(),o,s),n=ea(t.gg,e._a[tr],c.year),r=ea(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>to(n,o,s)?ut(e)._overflowWeeks=!0:l!=null?ut(e)._overflowWeekday=!0:(a=N6(n,r,i,o,s),e._a[tr]=a.year,e._dayOfYear=a.dayOfYear)}pe.ISO_8601=function(){};pe.RFC_2822=function(){};function Jg(e){if(e._f===pe.ISO_8601){B6(e);return}if(e._f===pe.RFC_2822){j6(e);return}e._a=[],ut(e).empty=!0;var t=""+e._i,n,r,i,o,s,a=t.length,l=0,c,u;for(i=S6(e._f,e._locale).match(Fg)||[],u=i.length,n=0;n0&&ut(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ea[o]?(r?ut(e).empty=!1:ut(e).unusedTokens.push(o),zP(o,r,e)):e._strict&&!r&&ut(e).unusedTokens.push(o);ut(e).charsLeftOver=a-l,t.length>0&&ut(e).unusedInput.push(t),e._a[On]<=12&&ut(e).bigHour===!0&&e._a[On]>0&&(ut(e).bigHour=void 0),ut(e).parsedDateParts=e._a.slice(0),ut(e).meridiem=e._meridiem,e._a[On]=nL(e._locale,e._a[On],e._meridiem),c=ut(e).era,c!==null&&(e._a[tr]=e._locale.erasConvertYear(c,e._a[tr])),Qg(e),Zg(e)}function nL(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function rL(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(l===0){ut(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:dh()});function V6(e,t){var n,r;if(t.length===1&&ui(t[0])&&(t=t[0]),!t.length)return qt();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function SL(){if(!pr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return $g(e,this),e=H6(e),e._a?(t=e._isUTC?Di(e._a):qt(e._a),this._isDSTShifted=this.isValid()&&gL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function kL(){return this.isValid()?!this._isUTC:!1}function EL(){return this.isValid()?this._isUTC:!1}function K6(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ML=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,TL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hi(e,t){var n=e,r=null,i,o,s;return mf(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:lo(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=ML.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:bt(r[wi])*i,h:bt(r[On])*i,m:bt(r[ri])*i,s:bt(r[Gi])*i,ms:bt(Q0(r[bs]*1e3))*i}):(r=TL.exec(e))?(i=r[1]==="-"?-1:1,n={y:ss(r[2],i),M:ss(r[3],i),w:ss(r[4],i),d:ss(r[5],i),h:ss(r[6],i),m:ss(r[7],i),s:ss(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=PL(qt(n.from),qt(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),o=new xh(n),mf(e)&&Ot(e,"_locale")&&(o._locale=e._locale),mf(e)&&Ot(e,"_isValid")&&(o._isValid=e._isValid),o}hi.fn=xh.prototype;hi.invalid=pL;function ss(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kv(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function PL(e,t){var n;return e.isValid()&&t.isValid()?(t=em(t,e),e.isBefore(t)?n=Kv(e,t):(n=Kv(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function q6(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(C6(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=hi(n,r),G6(this,i,e),this}}function G6(e,t,n,r){var i=t._milliseconds,o=Q0(t._days),s=Q0(t._months);e.isValid()&&(r=r??!0,s&&R6(e,Pc(e,"Month")+s*n),o&&A6(e,"Date",Pc(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&pe.updateOffset(e,o||s))}var AL=q6(1,"add"),LL=q6(-1,"subtract");function Z6(e){return typeof e=="string"||e instanceof String}function OL(e){return fi(e)||tu(e)||Z6(e)||lo(e)||DL(e)||RL(e)||e===null||e===void 0}function RL(e){var t=As(e)&&!Ng(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?gf(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ii(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",gf(n,"Z")):gf(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function qL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function GL(e){e||(e=this.isUtc()?pe.defaultFormatUtc:pe.defaultFormat);var t=gf(this,e);return this.localeData().postformat(t)}function ZL(e,t){return this.isValid()&&(fi(e)&&e.isValid()||qt(e).isValid())?hi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function QL(e){return this.from(qt(),e)}function JL(e,t){return this.isValid()&&(fi(e)&&e.isValid()||qt(e).isValid())?hi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function XL(e){return this.to(qt(),e)}function Q6(e){var t;return e===void 0?this._locale._abbr:(t=go(e),t!=null&&(this._locale=t),this)}var J6=qr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function X6(){return this._locale}var vd=1e3,Ma=60*vd,yd=60*Ma,ex=(365*400+97)*24*yd;function Ta(e,t){return(e%t+t)%t}function tx(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ex:new Date(e,t,n).valueOf()}function nx(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ex:Date.UTC(e,t,n)}function eO(e){var t,n;if(e=Gr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?nx:tx,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ta(t+(this._isUTC?0:this.utcOffset()*Ma),yd);break;case"minute":t=this._d.valueOf(),t-=Ta(t,Ma);break;case"second":t=this._d.valueOf(),t-=Ta(t,vd);break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function tO(e){var t,n;if(e=Gr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?nx:tx,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=yd-Ta(t+(this._isUTC?0:this.utcOffset()*Ma),yd)-1;break;case"minute":t=this._d.valueOf(),t+=Ma-Ta(t,Ma)-1;break;case"second":t=this._d.valueOf(),t+=vd-Ta(t,vd)-1;break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function nO(){return this._d.valueOf()-(this._offset||0)*6e4}function rO(){return Math.floor(this.valueOf()/1e3)}function iO(){return new Date(this.valueOf())}function oO(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function sO(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function aO(){return this.isValid()?this.toISOString():null}function lO(){return Wg(this)}function cO(){return Po({},ut(this))}function uO(){return ut(this).overflow}function fO(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ne("N",0,0,"eraAbbr");Ne("NN",0,0,"eraAbbr");Ne("NNN",0,0,"eraAbbr");Ne("NNNN",0,0,"eraName");Ne("NNNNN",0,0,"eraNarrow");Ne("y",["y",1],"yo","eraYear");Ne("y",["yy",2],0,"eraYear");Ne("y",["yyy",3],0,"eraYear");Ne("y",["yyyy",4],0,"eraYear");be("N",tm);be("NN",tm);be("NNN",tm);be("NNNN",_O);be("NNNNN",CO);jt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ut(n).era=i:ut(n).invalidEra=e});be("y",Ja);be("yy",Ja);be("yyy",Ja);be("yyyy",Ja);be("yo",SO);jt(["y","yy","yyy","yyyy"],tr);jt(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[tr]=n._locale.eraYearOrdinalParse(e,i):t[tr]=parseInt(e,10)});function dO(e,t){var n,r,i,o=this._eras||go("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function pO(e,t){var n=e.since<=e.until?1:-1;return t===void 0?pe(e.since).year():pe(e.since).year()+(t-e.offset)*n}function gO(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),LO.call(this,e,t,n,r,i))}function LO(e,t,n,r,i){var o=N6(e,t,n,r,i),s=Ac(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Ne("Q",0,"Qo","quarter");be("Q",k6);jt("Q",function(e,t){t[qi]=(bt(e)-1)*3});function OO(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ne("D",["DD",2],"Do","date");be("D",Gt,Xa);be("DD",Gt,Nr);be("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});jt(["D","DD"],wi);jt("Do",function(e,t){t[wi]=bt(e.match(Gt)[0])});var ix=el("Date",!0);Ne("DDD",["DDDD",3],"DDDo","dayOfYear");be("DDD",ph);be("DDDD",E6);jt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=bt(e)});function RO(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ne("m",["mm",2],0,"minute");be("m",Gt,zg);be("mm",Gt,Nr);jt(["m","mm"],ri);var DO=el("Minutes",!1);Ne("s",["ss",2],0,"second");be("s",Gt,zg);be("ss",Gt,Nr);jt(["s","ss"],Gi);var IO=el("Seconds",!1);Ne("S",0,0,function(){return~~(this.millisecond()/100)});Ne(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ne(0,["SSS",3],0,"millisecond");Ne(0,["SSSS",4],0,function(){return this.millisecond()*10});Ne(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ne(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ne(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ne(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ne(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});be("S",ph,k6);be("SS",ph,Nr);be("SSS",ph,E6);var Ao,ox;for(Ao="SSSS";Ao.length<=9;Ao+="S")be(Ao,Ja);function NO(e,t){t[bs]=bt(("0."+e)*1e3)}for(Ao="S";Ao.length<=9;Ao+="S")jt(Ao,NO);ox=el("Milliseconds",!1);Ne("z",0,0,"zoneAbbr");Ne("zz",0,0,"zoneName");function WO(){return this._isUTC?"UTC":""}function $O(){return this._isUTC?"Coordinated Universal Time":""}var le=nu.prototype;le.add=AL;le.calendar=WL;le.clone=$L;le.diff=VL;le.endOf=tO;le.format=GL;le.from=ZL;le.fromNow=QL;le.to=JL;le.toNow=XL;le.get=qP;le.invalidAt=uO;le.isAfter=UL;le.isBefore=FL;le.isBetween=BL;le.isSame=jL;le.isSameOrAfter=HL;le.isSameOrBefore=zL;le.isValid=lO;le.lang=J6;le.locale=Q6;le.localeData=X6;le.max=lL;le.min=aL;le.parsingFlags=cO;le.set=GP;le.startOf=eO;le.subtract=LL;le.toArray=oO;le.toObject=sO;le.toDate=iO;le.toISOString=KL;le.inspect=qL;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=aO;le.toString=YL;le.unix=rO;le.valueOf=nO;le.creationData=fO;le.eraName=gO;le.eraNarrow=mO;le.eraAbbr=vO;le.eraYear=yO;le.year=P6;le.isLeapYear=KP;le.weekYear=kO;le.isoWeekYear=EO;le.quarter=le.quarters=OO;le.month=D6;le.daysInMonth=iA;le.week=le.weeks=dA;le.isoWeek=le.isoWeeks=hA;le.weeksInYear=PO;le.weeksInWeekYear=AO;le.isoWeeksInYear=MO;le.isoWeeksInISOWeekYear=TO;le.date=ix;le.day=le.days=EA;le.weekday=MA;le.isoWeekday=TA;le.dayOfYear=RO;le.hour=le.hours=IA;le.minute=le.minutes=DO;le.second=le.seconds=IO;le.millisecond=le.milliseconds=ox;le.utcOffset=vL;le.utc=wL;le.local=xL;le.parseZone=bL;le.hasAlignedHourOffset=_L;le.isDST=CL;le.isLocal=kL;le.isUtcOffset=EL;le.isUtc=K6;le.isUTC=K6;le.zoneAbbr=WO;le.zoneName=$O;le.dates=qr("dates accessor is deprecated. Use date instead.",ix);le.months=qr("months accessor is deprecated. Use month instead",D6);le.years=qr("years accessor is deprecated. Use year instead",P6);le.zone=qr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yL);le.isDSTShifted=qr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",SL);function UO(e){return qt(e*1e3)}function FO(){return qt.apply(null,arguments).parseZone()}function sx(e){return e}var Rt=Ug.prototype;Rt.calendar=kP;Rt.longDateFormat=PP;Rt.invalidDate=LP;Rt.ordinal=DP;Rt.preparse=sx;Rt.postformat=sx;Rt.relativeTime=NP;Rt.pastFuture=WP;Rt.set=CP;Rt.eras=dO;Rt.erasParse=hO;Rt.erasConvertYear=pO;Rt.erasAbbrRegex=xO;Rt.erasNameRegex=wO;Rt.erasNarrowRegex=bO;Rt.months=eA;Rt.monthsShort=tA;Rt.monthsParse=rA;Rt.monthsRegex=sA;Rt.monthsShortRegex=oA;Rt.week=lA;Rt.firstDayOfYear=fA;Rt.firstDayOfWeek=uA;Rt.weekdays=bA;Rt.weekdaysMin=CA;Rt.weekdaysShort=_A;Rt.weekdaysParse=kA;Rt.weekdaysRegex=PA;Rt.weekdaysShortRegex=AA;Rt.weekdaysMinRegex=LA;Rt.isPM=RA;Rt.meridiem=NA;function wd(e,t,n,r){var i=go(),o=Di().set(r,t);return i[n](o,e)}function ax(e,t,n){if(lo(e)&&(t=e,e=void 0),e=e||"",t!=null)return wd(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=wd(e,r,n,"month");return i}function rm(e,t,n,r){typeof e=="boolean"?(lo(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,lo(t)&&(n=t,t=void 0),t=t||"");var i=go(),o=e?i._week.dow:0,s,a=[];if(n!=null)return wd(t,(n+o)%7,r,"day");for(s=0;s<7;s++)a[s]=wd(t,(s+o)%7,r,"day");return a}function BO(e,t){return ax(e,t,"months")}function jO(e,t){return ax(e,t,"monthsShort")}function HO(e,t,n){return rm(e,t,n,"weekdays")}function zO(e,t,n){return rm(e,t,n,"weekdaysShort")}function VO(e,t,n){return rm(e,t,n,"weekdaysMin")}zo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=bt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});pe.lang=qr("moment.lang is deprecated. Use moment.locale instead.",zo);pe.langData=qr("moment.langData is deprecated. Use moment.localeData instead.",go);var Wi=Math.abs;function YO(){var e=this._data;return this._milliseconds=Wi(this._milliseconds),this._days=Wi(this._days),this._months=Wi(this._months),e.milliseconds=Wi(e.milliseconds),e.seconds=Wi(e.seconds),e.minutes=Wi(e.minutes),e.hours=Wi(e.hours),e.months=Wi(e.months),e.years=Wi(e.years),this}function lx(e,t,n,r){var i=hi(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function KO(e,t){return lx(this,e,t,1)}function qO(e,t){return lx(this,e,t,-1)}function qv(e){return e<0?Math.floor(e):Math.ceil(e)}function GO(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,s,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=qv(X0(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Br(e/1e3),r.seconds=i%60,o=Br(i/60),r.minutes=o%60,s=Br(o/60),r.hours=s%24,t+=Br(s/24),l=Br(cx(t)),n+=l,t-=qv(X0(l)),a=Br(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function cx(e){return e*4800/146097}function X0(e){return e*146097/4800}function ZO(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Gr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+cx(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(X0(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function mo(e){return function(){return this.as(e)}}var ux=mo("ms"),QO=mo("s"),JO=mo("m"),XO=mo("h"),eR=mo("d"),tR=mo("w"),nR=mo("M"),rR=mo("Q"),iR=mo("y"),oR=ux;function sR(){return hi(this)}function aR(e){return e=Gr(e),this.isValid()?this[e+"s"]():NaN}function Ys(e){return function(){return this.isValid()?this._data[e]:NaN}}var lR=Ys("milliseconds"),cR=Ys("seconds"),uR=Ys("minutes"),fR=Ys("hours"),dR=Ys("days"),hR=Ys("months"),pR=Ys("years");function gR(){return Br(this.days()/7)}var Fi=Math.round,ya={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function mR(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function vR(e,t,n,r){var i=hi(e).abs(),o=Fi(i.as("s")),s=Fi(i.as("m")),a=Fi(i.as("h")),l=Fi(i.as("d")),c=Fi(i.as("M")),u=Fi(i.as("w")),d=Fi(i.as("y")),h=o<=n.ss&&["s",o]||o0,h[4]=r,mR.apply(null,h)}function yR(e){return e===void 0?Fi:typeof e=="function"?(Fi=e,!0):!1}function wR(e,t){return ya[e]===void 0?!1:t===void 0?ya[e]:(ya[e]=t,e==="s"&&(ya.ss=t-1),!0)}function xR(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ya,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ya,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=vR(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var _1=Math.abs;function Js(e){return(e>0)-(e<0)||+e}function _h(){if(!this.isValid())return this.localeData().invalidDate();var e=_1(this._milliseconds)/1e3,t=_1(this._days),n=_1(this._months),r,i,o,s,a=this.asSeconds(),l,c,u,d;return a?(r=Br(e/60),i=Br(r/60),e%=60,r%=60,o=Br(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=Js(this._months)!==Js(a)?"-":"",u=Js(this._days)!==Js(a)?"-":"",d=Js(this._milliseconds)!==Js(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var kt=xh.prototype;kt.isValid=hL;kt.abs=YO;kt.add=KO;kt.subtract=qO;kt.as=ZO;kt.asMilliseconds=ux;kt.asSeconds=QO;kt.asMinutes=JO;kt.asHours=XO;kt.asDays=eR;kt.asWeeks=tR;kt.asMonths=nR;kt.asQuarters=rR;kt.asYears=iR;kt.valueOf=oR;kt._bubble=GO;kt.clone=sR;kt.get=aR;kt.milliseconds=lR;kt.seconds=cR;kt.minutes=uR;kt.hours=fR;kt.days=dR;kt.weeks=gR;kt.months=hR;kt.years=pR;kt.humanize=xR;kt.toISOString=_h;kt.toString=_h;kt.toJSON=_h;kt.locale=Q6;kt.localeData=X6;kt.toIsoString=qr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_h);kt.lang=J6;Ne("X",0,0,"unix");Ne("x",0,0,"valueOf");be("x",mh);be("X",BP);jt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});jt("x",function(e,t,n){n._d=new Date(bt(e))});//! moment.js +pe.version="2.30.1";bP(qt);pe.fn=le;pe.min=cL;pe.max=uL;pe.now=fL;pe.utc=Di;pe.unix=UO;pe.months=BO;pe.isDate=tu;pe.locale=zo;pe.invalid=dh;pe.duration=hi;pe.isMoment=fi;pe.weekdays=HO;pe.parseZone=FO;pe.localeData=go;pe.isDuration=mf;pe.monthsShort=jO;pe.weekdaysMin=VO;pe.defineLocale=Gg;pe.updateLocale=FA;pe.locales=BA;pe.weekdaysShort=zO;pe.normalizeUnits=Gr;pe.relativeTimeRounding=yR;pe.relativeTimeThreshold=wR;pe.calendarFormat=NL;pe.prototype=le;pe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License - */function iu(e){return e+.5|0}const Lo=(e,t,n)=>Math.max(Math.min(e,n),t);function Tl(e){return Lo(iu(e*2.55),0,255)}function Vo(e){return Lo(iu(e*255),0,255)}function Hi(e){return Lo(iu(e/2.55)/100,0,1)}function qv(e){return Lo(iu(e*100),0,100)}const $r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},X0=[..."0123456789ABCDEF"],xR=e=>X0[e&15],bR=e=>X0[(e&240)>>4]+X0[e&15],Nu=e=>(e&240)>>4===(e&15),_R=e=>Nu(e.r)&&Nu(e.g)&&Nu(e.b)&&Nu(e.a);function CR(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&$r[e[1]]*17,g:255&$r[e[2]]*17,b:255&$r[e[3]]*17,a:t===5?$r[e[4]]*17:255}:(t===7||t===9)&&(n={r:$r[e[1]]<<4|$r[e[2]],g:$r[e[3]]<<4|$r[e[4]],b:$r[e[5]]<<4|$r[e[6]],a:t===9?$r[e[7]]<<4|$r[e[8]]:255})),n}const SR=(e,t)=>e<255?t(e):"";function kR(e){var t=_R(e)?xR:bR;return e?"#"+t(e.r)+t(e.g)+t(e.b)+SR(e.a,t):void 0}const ER=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ux(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function MR(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function TR(e,t,n){const r=ux(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function PR(e,t,n,r,i){return e===i?(t-n)/r+(t.5?u/(2-o-s):u/(o+s),l=PR(n,r,i,u,o),l=l*60+.5),[l|0,c||0,a]}function im(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Vo)}function om(e,t,n){return im(ux,e,t,n)}function AR(e,t,n){return im(TR,e,t,n)}function LR(e,t,n){return im(MR,e,t,n)}function fx(e){return(e%360+360)%360}function OR(e){const t=ER.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Tl(+t[5]):Vo(+t[5]));const i=fx(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=AR(i,o,s):t[1]==="hsv"?r=LR(i,o,s):r=om(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function RR(e,t){var n=rm(e);n[0]=fx(n[0]+t),n=om(n),e.r=n[0],e.g=n[1],e.b=n[2]}function DR(e){if(!e)return;const t=rm(e),n=t[0],r=qv(t[1]),i=qv(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Hi(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Gv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Zv={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function IR(){const e={},t=Object.keys(Zv),n=Object.keys(Gv);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let Wu;function NR(e){Wu||(Wu=IR(),Wu.transparent=[0,0,0,0]);const t=Wu[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const WR=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function $R(e){const t=WR.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?Tl(s):Lo(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Tl(r):Lo(r,0,255)),i=255&(t[4]?Tl(i):Lo(i,0,255)),o=255&(t[6]?Tl(o):Lo(o,0,255)),{r,g:i,b:o,a:n}}}function UR(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Hi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const _1=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Js=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function FR(e,t,n){const r=Js(Hi(e.r)),i=Js(Hi(e.g)),o=Js(Hi(e.b));return{r:Vo(_1(r+n*(Js(Hi(t.r))-r))),g:Vo(_1(i+n*(Js(Hi(t.g))-i))),b:Vo(_1(o+n*(Js(Hi(t.b))-o))),a:e.a+n*(t.a-e.a)}}function $u(e,t,n){if(e){let r=rm(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=om(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function dx(e,t){return e&&Object.assign(t||{},e)}function Qv(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Vo(e[3]))):(t=dx(e,{r:0,g:0,b:0,a:1}),t.a=Vo(t.a)),t}function BR(e){return e.charAt(0)==="r"?$R(e):OR(e)}class Oc{constructor(t){if(t instanceof Oc)return t;const n=typeof t;let r;n==="object"?r=Qv(t):n==="string"&&(r=CR(t)||NR(t)||BR(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=dx(this._rgb);return t&&(t.a=Hi(t.a)),t}set rgb(t){this._rgb=Qv(t)}rgbString(){return this._valid?UR(this._rgb):void 0}hexString(){return this._valid?kR(this._rgb):void 0}hslString(){return this._valid?DR(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=FR(this._rgb,t._rgb,n)),this}clone(){return new Oc(this.rgb)}alpha(t){return this._rgb.a=Vo(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=iu(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return $u(this._rgb,2,t),this}darken(t){return $u(this._rgb,2,-t),this}saturate(t){return $u(this._rgb,1,t),this}desaturate(t){return $u(this._rgb,1,-t),this}rotate(t){return RR(this._rgb,t),this}}/*! + */function ou(e){return e+.5|0}const Lo=(e,t,n)=>Math.max(Math.min(e,n),t);function Pl(e){return Lo(ou(e*2.55),0,255)}function Vo(e){return Lo(ou(e*255),0,255)}function Hi(e){return Lo(ou(e/2.55)/100,0,1)}function Gv(e){return Lo(ou(e*100),0,100)}const $r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ep=[..."0123456789ABCDEF"],bR=e=>ep[e&15],_R=e=>ep[(e&240)>>4]+ep[e&15],Wu=e=>(e&240)>>4===(e&15),CR=e=>Wu(e.r)&&Wu(e.g)&&Wu(e.b)&&Wu(e.a);function SR(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&$r[e[1]]*17,g:255&$r[e[2]]*17,b:255&$r[e[3]]*17,a:t===5?$r[e[4]]*17:255}:(t===7||t===9)&&(n={r:$r[e[1]]<<4|$r[e[2]],g:$r[e[3]]<<4|$r[e[4]],b:$r[e[5]]<<4|$r[e[6]],a:t===9?$r[e[7]]<<4|$r[e[8]]:255})),n}const kR=(e,t)=>e<255?t(e):"";function ER(e){var t=CR(e)?bR:_R;return e?"#"+t(e.r)+t(e.g)+t(e.b)+kR(e.a,t):void 0}const MR=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function fx(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function TR(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function PR(e,t,n){const r=fx(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function AR(e,t,n,r,i){return e===i?(t-n)/r+(t.5?u/(2-o-s):u/(o+s),l=AR(n,r,i,u,o),l=l*60+.5),[l|0,c||0,a]}function om(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Vo)}function sm(e,t,n){return om(fx,e,t,n)}function LR(e,t,n){return om(PR,e,t,n)}function OR(e,t,n){return om(TR,e,t,n)}function dx(e){return(e%360+360)%360}function RR(e){const t=MR.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Pl(+t[5]):Vo(+t[5]));const i=dx(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=LR(i,o,s):t[1]==="hsv"?r=OR(i,o,s):r=sm(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function DR(e,t){var n=im(e);n[0]=dx(n[0]+t),n=sm(n),e.r=n[0],e.g=n[1],e.b=n[2]}function IR(e){if(!e)return;const t=im(e),n=t[0],r=Gv(t[1]),i=Gv(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Hi(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Zv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Qv={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function NR(){const e={},t=Object.keys(Qv),n=Object.keys(Zv);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let $u;function WR(e){$u||($u=NR(),$u.transparent=[0,0,0,0]);const t=$u[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const $R=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function UR(e){const t=$R.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?Pl(s):Lo(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Pl(r):Lo(r,0,255)),i=255&(t[4]?Pl(i):Lo(i,0,255)),o=255&(t[6]?Pl(o):Lo(o,0,255)),{r,g:i,b:o,a:n}}}function FR(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Hi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const C1=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Xs=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function BR(e,t,n){const r=Xs(Hi(e.r)),i=Xs(Hi(e.g)),o=Xs(Hi(e.b));return{r:Vo(C1(r+n*(Xs(Hi(t.r))-r))),g:Vo(C1(i+n*(Xs(Hi(t.g))-i))),b:Vo(C1(o+n*(Xs(Hi(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Uu(e,t,n){if(e){let r=im(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=sm(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function hx(e,t){return e&&Object.assign(t||{},e)}function Jv(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Vo(e[3]))):(t=hx(e,{r:0,g:0,b:0,a:1}),t.a=Vo(t.a)),t}function jR(e){return e.charAt(0)==="r"?UR(e):RR(e)}class Rc{constructor(t){if(t instanceof Rc)return t;const n=typeof t;let r;n==="object"?r=Jv(t):n==="string"&&(r=SR(t)||WR(t)||jR(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=hx(this._rgb);return t&&(t.a=Hi(t.a)),t}set rgb(t){this._rgb=Jv(t)}rgbString(){return this._valid?FR(this._rgb):void 0}hexString(){return this._valid?ER(this._rgb):void 0}hslString(){return this._valid?IR(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=BR(this._rgb,t._rgb,n)),this}clone(){return new Rc(this.rgb)}alpha(t){return this._rgb.a=Vo(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ou(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Uu(this._rgb,2,t),this}darken(t){return Uu(this._rgb,2,-t),this}saturate(t){return Uu(this._rgb,1,t),this}desaturate(t){return Uu(this._rgb,1,-t),this}rotate(t){return DR(this._rgb,t),this}}/*! * Chart.js v4.4.3 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License - */const jR=(()=>{let e=0;return()=>e++})();function nn(e){return e===null||typeof e>"u"}function xn(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Sr(e,t){return Nn(e)?e:t}function Ut(e,t){return typeof e>"u"?t:e}const HR=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function hn(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Qn(e,t,n,r){let i,o,s;if(xn(e))for(o=e.length,i=0;ie,x:e=>e.x,y:e=>e.y};function YR(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function KR(e){const t=YR(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function xd(e,t){return(Xv[t]||(Xv[t]=KR(t)))(e)}function sm(e){return e.charAt(0).toUpperCase()+e.slice(1)}const bd=e=>typeof e<"u",Jo=e=>typeof e=="function",ey=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function qR(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const kn=Math.PI,ai=2*kn,GR=ai+kn,_d=Number.POSITIVE_INFINITY,ZR=kn/180,Pr=kn/2,as=kn/4,ty=kn*2/3,Oo=Math.log10,Ua=Math.sign;function Zl(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Dc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function JR(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function px(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function lm(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const bs=(e,t,n,r)=>lm(e,n,r?i=>{const o=e[i][t];return oe[i][t]lm(e,n,r=>e[r][t]>=n);function iD(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+sm(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function oy(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(mx.forEach(o=>{delete e[o]}),delete e._chartjs)}function sD(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const vx=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function yx(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,vx.call(window,()=>{r=!1,e.apply(t,n)}))}}function aD(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const wx=e=>e==="start"?"left":e==="end"?"right":"center",Ql=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2;function lD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(i=_i(Math.min(bs(a,l,c).lo,n?r:bs(t,l,s.getPixelForValue(c)).lo),0,r-1)),h?o=_i(Math.max(bs(a,s.axis,u,!0).hi+1,n?0:bs(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function cD(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Uu=e=>e===0||e===1,sy=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ai/n)),ay=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ai/n)+1,Jl={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Pr)+1,easeOutSine:e=>Math.sin(e*Pr),easeInOutSine:e=>-.5*(Math.cos(kn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Uu(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Uu(e)?e:sy(e,.075,.3),easeOutElastic:e=>Uu(e)?e:ay(e,.075,.3),easeInOutElastic(e){return Uu(e)?e:e<.5?.5*sy(e*2,.1125,.45):.5+.5*ay(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Jl.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Jl.easeInBounce(e*2)*.5:Jl.easeOutBounce(e*2-1)*.5+.5};function cm(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ly(e){return cm(e)?e:new Oc(e)}function C1(e){return cm(e)?e:new Oc(e).saturate(.5).darken(.1).hexString()}const uD=["x","y","borderWidth","radius","tension"],fD=["color","borderColor","backgroundColor"];function dD(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:fD},numbers:{type:"number",properties:uD}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function hD(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const cy=new Map;function pD(e,t){t=t||{};const n=e+JSON.stringify(t);let r=cy.get(n);return r||(r=new Intl.NumberFormat(e,t),cy.set(n,r)),r}function um(e,t,n){return pD(t,n).format(e)}const xx={values(e){return xn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=gD(e,n)}const s=Oo(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),um(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Oo(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?xx.numeric.call(this,e,t,n):""}};function gD(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var _h={formatters:xx};function mD(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:_h.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const $s=Object.create(null),ep=Object.create(null);function Xl(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>C1(i.backgroundColor),this.hoverBorderColor=(r,i)=>C1(i.borderColor),this.hoverColor=(r,i)=>C1(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return S1(this,t,n)}get(t){return Xl(this,t)}describe(t,n){return S1(ep,t,n)}override(t,n){return S1($s,t,n)}route(t,n,r,i){const o=Xl(this,t),s=Xl(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return Nt(l)?Object.assign({},c,l):Ut(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var bn=new vD({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[dD,hD,mD]);function yD(e){return!e||nn(e.size)||nn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Cd(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function wD(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Zi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,SD(e,o),l=0;l+e||0;function Cx(e,t){const n={},r=Nt(t),i=r?Object.keys(t):t,o=Nt(e)?r?s=>Ut(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=LD(o(s));return n}function OD(e){return Cx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function RD(e){return Cx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Li(e){const t=OD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Xo(e,t){e=e||{},t=t||bn.font;let n=Ut(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ut(e.style,t.style);r&&!(""+r).match(PD)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ut(e.family,t.family),lineHeight:AD(Ut(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ut(e.weight,t.weight),string:""};return i.string=yD(i),i}function Fu(e,t,n,r){let i,o,s;for(i=0,o=e.length;in&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Ys(e,t){return Object.assign(Object.create(e),t)}function fm(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=Mx("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>fm([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return kx(a,l,()=>jD(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return dy(a).includes(l)},ownKeys(a){return dy(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Fa(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Sx(e,r),setContext:o=>Fa(e,o,n,r),override:o=>Fa(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return kx(o,s,()=>ND(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function Sx(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Jo(n)?n:()=>n,isIndexable:Jo(r)?r:()=>r}}const ID=(e,t)=>e?e+sm(t):t,dm=(e,t)=>Nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function kx(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function ND(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Jo(a)&&s.isScriptable(t)&&(a=WD(t,a,e,n)),xn(a)&&a.length&&(a=$D(t,a,e,s.isIndexable)),dm(t,a)&&(a=Fa(a,i,o&&o[t],s)),a}function WD(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||r);return a.delete(e),dm(e,l)&&(l=hm(i._scopes,i,e,l)),l}function $D(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Nt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=hm(c,i,e,u);t.push(Fa(d,o,s&&s[e],a))}}return t}function Ex(e,t,n){return Jo(e)?e(t,n):e}const UD=(e,t)=>e===!0?t:typeof e=="string"?xd(t,e):void 0;function FD(e,t,n,r,i){for(const o of t){const s=UD(n,o);if(s){e.add(s);const a=Ex(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function hm(e,t,n,r){const i=t._rootScopes,o=Ex(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=fy(a,s,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=fy(a,s,o,l,r),l===null)?!1:fm(Array.from(a),[""],i,o,()=>BD(t,n,r))}function fy(e,t,n,r,i){for(;n;)n=FD(e,t,n,r,i);return n}function BD(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return xn(i)&&Nt(n)?n:i||{}}function jD(e,t,n,r){let i;for(const o of t)if(i=Mx(ID(o,e),n),typeof i<"u")return dm(e,i)?hm(n,r,e,i):i}function Mx(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function dy(e){let t=e._keys;return t||(t=e._keys=HD(e._scopes)),t}function HD(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const zD=Number.EPSILON||1e-14,Ba=(e,t)=>te==="x"?"y":"x";function VD(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=iy(o,i),l=iy(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+h*(s.x-i.x),y:o.y+h*(s.y-i.y)}}}function YD(e,t,n){const r=e.length;let i,o,s,a,l,c=Ba(e,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")qD(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function QD(e,t){return Ch(e).getPropertyValue(t)}const JD=["top","right","bottom","left"];function As(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=JD[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const XD=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function eI(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(XD(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function hs(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Ch(n),o=i.boxSizing==="border-box",s=As(i,"padding"),a=As(i,"border","width"),{x:l,y:c,box:u}=eI(e,n),d=s.left+(u&&a.left),h=s.top+(u&&a.top);let{width:g,height:m}=t;return o&&(g-=s.width+a.width,m-=s.height+a.height),{x:Math.round((l-d)/g*n.width/r),y:Math.round((c-h)/m*n.height/r)}}function tI(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&gm(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Ch(o),l=As(a,"border","width"),c=As(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=Sd(a.maxWidth,o,"clientWidth"),i=Sd(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||_d,maxHeight:i||_d}}const ju=e=>Math.round(e*10)/10;function nI(e,t,n,r){const i=Ch(e),o=As(i,"margin"),s=Sd(i.maxWidth,e,"clientWidth")||_d,a=Sd(i.maxHeight,e,"clientHeight")||_d,l=tI(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const h=As(i,"border","width"),g=As(i,"padding");c-=g.width+h.width,u-=g.height+h.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=ju(Math.min(c,s,l.maxWidth)),u=ju(Math.min(u,a,l.maxHeight)),c&&!u&&(u=ju(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=ju(Math.floor(u*r))),{width:c,height:u}}function hy(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const rI=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};pm()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function py(e,t){const n=QD(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ps(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function iI(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function oI(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=ps(e,i,n),a=ps(i,o,n),l=ps(o,t,n),c=ps(s,a,n),u=ps(a,l,n);return ps(c,u,n)}function Px(e){return e==="angle"?{between:gx,compare:eD,normalize:ei}:{between:nD,compare:(t,n)=>t-n,normalize:t=>t}}function gy({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function sI(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=Px(r),l=t.length;let{start:c,end:u,loop:d}=e,h,g;if(d){for(c+=l,u+=l,h=0,g=l;hl(i,w,C)&&a(i,w)!==0,E=()=>a(o,C)===0||l(o,w,C),O=()=>y||M(),T=()=>!y||E();for(let P=u,L=u;P<=d;++P)v=t[P%s],!v.skip&&(C=c(v[r]),C!==w&&(y=l(C,i,o),k===null&&O()&&(k=a(C,i)===0?P:L),k!==null&&T()&&(m.push(gy({start:k,end:P,loop:h,count:s,style:g})),k=null),L=P,w=C));return k!==null&&m.push(gy({start:k,end:d,loop:h,count:s,style:g})),m}function lI(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function uI(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function fI(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=cI(n,i,o,r);if(r===!0)return my(e,[{start:s,end:a,loop:o}],n,t);const l=a{let e=0;return()=>e++})();function tn(e){return e===null||typeof e>"u"}function xn(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Wt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Sr(e,t){return Nn(e)?e:t}function Ft(e,t){return typeof e>"u"?t:e}const zR=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function hn(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Qn(e,t,n,r){let i,o,s;if(xn(e))for(o=e.length,i=0;ie,x:e=>e.x,y:e=>e.y};function KR(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function qR(e){const t=KR(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function bd(e,t){return(ey[t]||(ey[t]=qR(t)))(e)}function am(e){return e.charAt(0).toUpperCase()+e.slice(1)}const _d=e=>typeof e<"u",Jo=e=>typeof e=="function",ty=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function GR(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Sn=Math.PI,ai=2*Sn,ZR=ai+Sn,Cd=Number.POSITIVE_INFINITY,QR=Sn/180,Pr=Sn/2,as=Sn/4,ny=Sn*2/3,Oo=Math.log10,Fa=Math.sign;function Ql(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Ic(e){return!isNaN(parseFloat(e))&&isFinite(e)}function XR(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function gx(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function cm(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const _s=(e,t,n,r)=>cm(e,n,r?i=>{const o=e[i][t];return oe[i][t]cm(e,n,r=>e[r][t]>=n);function oD(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+am(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function sy(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(vx.forEach(o=>{delete e[o]}),delete e._chartjs)}function aD(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const yx=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function wx(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,yx.call(window,()=>{r=!1,e.apply(t,n)}))}}function lD(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const xx=e=>e==="start"?"left":e==="end"?"right":"center",Jl=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2;function cD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(i=_i(Math.min(_s(a,l,c).lo,n?r:_s(t,l,s.getPixelForValue(c)).lo),0,r-1)),h?o=_i(Math.max(_s(a,s.axis,u,!0).hi+1,n?0:_s(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function uD(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Fu=e=>e===0||e===1,ay=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ai/n)),ly=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ai/n)+1,Xl={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Pr)+1,easeOutSine:e=>Math.sin(e*Pr),easeInOutSine:e=>-.5*(Math.cos(Sn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Fu(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Fu(e)?e:ay(e,.075,.3),easeOutElastic:e=>Fu(e)?e:ly(e,.075,.3),easeInOutElastic(e){return Fu(e)?e:e<.5?.5*ay(e*2,.1125,.45):.5+.5*ly(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Xl.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Xl.easeInBounce(e*2)*.5:Xl.easeOutBounce(e*2-1)*.5+.5};function um(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function cy(e){return um(e)?e:new Rc(e)}function S1(e){return um(e)?e:new Rc(e).saturate(.5).darken(.1).hexString()}const fD=["x","y","borderWidth","radius","tension"],dD=["color","borderColor","backgroundColor"];function hD(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:dD},numbers:{type:"number",properties:fD}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function pD(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const uy=new Map;function gD(e,t){t=t||{};const n=e+JSON.stringify(t);let r=uy.get(n);return r||(r=new Intl.NumberFormat(e,t),uy.set(n,r)),r}function fm(e,t,n){return gD(t,n).format(e)}const bx={values(e){return xn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=mD(e,n)}const s=Oo(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),fm(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Oo(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?bx.numeric.call(this,e,t,n):""}};function mD(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Ch={formatters:bx};function vD(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ch.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Us=Object.create(null),tp=Object.create(null);function ec(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>S1(i.backgroundColor),this.hoverBorderColor=(r,i)=>S1(i.borderColor),this.hoverColor=(r,i)=>S1(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return k1(this,t,n)}get(t){return ec(this,t)}describe(t,n){return k1(tp,t,n)}override(t,n){return k1(Us,t,n)}route(t,n,r,i){const o=ec(this,t),s=ec(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return Wt(l)?Object.assign({},c,l):Ft(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var bn=new yD({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[hD,pD,vD]);function wD(e){return!e||tn(e.size)||tn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Sd(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function xD(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Zi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,kD(e,o),l=0;l+e||0;function Sx(e,t){const n={},r=Wt(t),i=r?Object.keys(t):t,o=Wt(e)?r?s=>Ft(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=OD(o(s));return n}function RD(e){return Sx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function DD(e){return Sx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Li(e){const t=RD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Xo(e,t){e=e||{},t=t||bn.font;let n=Ft(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ft(e.style,t.style);r&&!(""+r).match(AD)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ft(e.family,t.family),lineHeight:LD(Ft(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ft(e.weight,t.weight),string:""};return i.string=wD(i),i}function Bu(e,t,n,r){let i,o,s;for(i=0,o=e.length;in&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Ks(e,t){return Object.assign(Object.create(e),t)}function dm(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=Tx("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>dm([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Ex(a,l,()=>HD(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return hy(a).includes(l)},ownKeys(a){return hy(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Ba(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:kx(e,r),setContext:o=>Ba(e,o,n,r),override:o=>Ba(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return Ex(o,s,()=>WD(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function kx(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Jo(n)?n:()=>n,isIndexable:Jo(r)?r:()=>r}}const ND=(e,t)=>e?e+am(t):t,hm=(e,t)=>Wt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ex(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function WD(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Jo(a)&&s.isScriptable(t)&&(a=$D(t,a,e,n)),xn(a)&&a.length&&(a=UD(t,a,e,s.isIndexable)),hm(t,a)&&(a=Ba(a,i,o&&o[t],s)),a}function $D(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||r);return a.delete(e),hm(e,l)&&(l=pm(i._scopes,i,e,l)),l}function UD(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Wt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=pm(c,i,e,u);t.push(Ba(d,o,s&&s[e],a))}}return t}function Mx(e,t,n){return Jo(e)?e(t,n):e}const FD=(e,t)=>e===!0?t:typeof e=="string"?bd(t,e):void 0;function BD(e,t,n,r,i){for(const o of t){const s=FD(n,o);if(s){e.add(s);const a=Mx(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function pm(e,t,n,r){const i=t._rootScopes,o=Mx(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=dy(a,s,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=dy(a,s,o,l,r),l===null)?!1:dm(Array.from(a),[""],i,o,()=>jD(t,n,r))}function dy(e,t,n,r,i){for(;n;)n=BD(e,t,n,r,i);return n}function jD(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return xn(i)&&Wt(n)?n:i||{}}function HD(e,t,n,r){let i;for(const o of t)if(i=Tx(ND(o,e),n),typeof i<"u")return hm(e,i)?pm(n,r,e,i):i}function Tx(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function hy(e){let t=e._keys;return t||(t=e._keys=zD(e._scopes)),t}function zD(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const VD=Number.EPSILON||1e-14,ja=(e,t)=>te==="x"?"y":"x";function YD(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=oy(o,i),l=oy(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+h*(s.x-i.x),y:o.y+h*(s.y-i.y)}}}function KD(e,t,n){const r=e.length;let i,o,s,a,l,c=ja(e,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")GD(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function JD(e,t){return Sh(e).getPropertyValue(t)}const XD=["top","right","bottom","left"];function Ls(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=XD[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const eI=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function tI(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(eI(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ps(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Sh(n),o=i.boxSizing==="border-box",s=Ls(i,"padding"),a=Ls(i,"border","width"),{x:l,y:c,box:u}=tI(e,n),d=s.left+(u&&a.left),h=s.top+(u&&a.top);let{width:g,height:m}=t;return o&&(g-=s.width+a.width,m-=s.height+a.height),{x:Math.round((l-d)/g*n.width/r),y:Math.round((c-h)/m*n.height/r)}}function nI(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&mm(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=Sh(o),l=Ls(a,"border","width"),c=Ls(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=kd(a.maxWidth,o,"clientWidth"),i=kd(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Cd,maxHeight:i||Cd}}const Hu=e=>Math.round(e*10)/10;function rI(e,t,n,r){const i=Sh(e),o=Ls(i,"margin"),s=kd(i.maxWidth,e,"clientWidth")||Cd,a=kd(i.maxHeight,e,"clientHeight")||Cd,l=nI(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const h=Ls(i,"border","width"),g=Ls(i,"padding");c-=g.width+h.width,u-=g.height+h.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=Hu(Math.min(c,s,l.maxWidth)),u=Hu(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Hu(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Hu(Math.floor(u*r))),{width:c,height:u}}function py(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const iI=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};gm()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function gy(e,t){const n=JD(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function gs(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function oI(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function sI(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=gs(e,i,n),a=gs(i,o,n),l=gs(o,t,n),c=gs(s,a,n),u=gs(a,l,n);return gs(c,u,n)}function Ax(e){return e==="angle"?{between:mx,compare:tD,normalize:ei}:{between:rD,compare:(t,n)=>t-n,normalize:t=>t}}function my({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function aI(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=Ax(r),l=t.length;let{start:c,end:u,loop:d}=e,h,g;if(d){for(c+=l,u+=l,h=0,g=l;hl(i,w,C)&&a(i,w)!==0,E=()=>a(o,C)===0||l(o,w,C),O=()=>y||M(),T=()=>!y||E();for(let P=u,L=u;P<=d;++P)v=t[P%s],!v.skip&&(C=c(v[r]),C!==w&&(y=l(C,i,o),k===null&&O()&&(k=a(C,i)===0?P:L),k!==null&&T()&&(m.push(my({start:k,end:P,loop:h,count:s,style:g})),k=null),L=P,w=C));return k!==null&&m.push(my({start:k,end:d,loop:h,count:s,style:g})),m}function cI(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function fI(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function dI(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=uI(n,i,o,r);if(r===!0)return vy(e,[{start:s,end:a,loop:o}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=vx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var $i=new pI;const yy="transparent",gI={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=ly(e||yy),i=r.valid&&ly(t||yy);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class mI{constructor(t,n,r,i){const o=n[r];i=Fu([t.to,i,o,t.from]);const s=Fu([t.from,o,i]);this._active=!0,this._fn=t.fn||gI[t.type||typeof s],this._easing=Jl[t.easing]||Jl.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Fu([t.to,n,i,t.from]),this._from=Fu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!Nt(o))return;const s={};for(const a of n)s[a]=o[a];(xn(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=wI(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&yI(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const h=r.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}o[c]=d=new mI(h,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return $i.add(this._chart,r),!0}}function yI(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function Cy(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=CI(o,s,r),d=t.length;let h;for(let g=0;gn[r].axis===t).shift()}function EI(e,t){return Ys(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function MI(e,t,n){return Ys(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function hl(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const E1=e=>e==="reset"||e==="none",Sy=(e,t)=>t?e:Object.assign({},e),TI=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Ax(n,!0),values:null};class ec{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=by(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&hl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,h,g,m)=>d==="x"?h:d==="r"?m:g,o=n.xAxisID=Ut(r.xAxisID,k1(t,"x")),s=n.yAxisID=Ut(r.yAxisID,k1(t,"y")),a=n.rAxisID=Ut(r.rAxisID,k1(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),u=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&oy(this._data,this),t._stacked&&hl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Nt(n)){const i=this._cachedMeta;this._data=_I(n,i)}else if(r!==n){if(r){oy(r,this);const i=this._cachedMeta;hl(i),i._parsed=[]}n&&Object.isExtensible(n)&&oD(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=by(n.vScale,n),n.stack!==r.stack&&(i=!0,hl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&Cy(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,h;if(this._parsing===!1)r._parsed=i,r._sorted=!0,h=i;else{xn(i[t])?h=this.parseArrayData(r,i,t,n):Nt(i[t])?h=this.parseObjectData(r,i,t,n):h=this.parsePrimitiveData(r,i,t,n);const g=()=>d[a]===null||c&&d[a]y||d=0;--h)if(!m()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(h,g,m,d);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(Sy(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,r,n))}const c=new vI(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||E1(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){E1(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!E1(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a0&&this.getParsed(n-1);for(let E=0;E=v){T.skip=!0;continue}const P=this.getParsed(E),L=nn(P[g]),W=T[h]=s.getPixelForValue(P[h],E),I=T[g]=o||L?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,P,l):P[g],E);T.skip=isNaN(W)||isNaN(I)||L,T.stop=E>0&&Math.abs(P[h]-M[h])>k,y&&(T.parsed=P,T.raw=c.data[E]),d&&(T.options=u||this.resolveDataElementOptions(E,O.active?"active":i)),C||this.updateElement(O,E,T,i),M=P}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Je(vf,"id","line"),Je(vf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Je(vf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function cs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mm{constructor(t){Je(this,"options");this.options=t||{}}static override(t){Object.assign(mm.prototype,t)}init(){}formats(){return cs()}parse(){return cs()}format(){return cs()}add(){return cs()}diff(){return cs()}startOf(){return cs()}endOf(){return cs()}}var PI={_date:mm};function AI(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?rD:bs;if(r){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(o,t,n-u),h=l(o,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function ou(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var DI={evaluateInteractionItems:ou,modes:{index(e,t,n,r){const i=hs(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?M1(e,i,o,r,s):T1(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=hs(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?M1(e,i,o,r,s):T1(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===t)}function Ey(e,t){return e.filter(n=>Lx.indexOf(n.pos)===-1&&n.box.axis===t)}function gl(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function II(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=gl(pl(t,"left"),!0),i=gl(pl(t,"right")),o=gl(pl(t,"top"),!0),s=gl(pl(t,"bottom")),a=Ey(t,"x"),l=Ey(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:pl(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function My(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Ox(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function UI(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Nt(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Ox(s,o.getPadding());const a=Math.max(0,t.outerWidth-My(s,e,"left","right")),l=Math.max(0,t.outerHeight-My(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function FI(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function BI(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Pl(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,k)=>k.box.options&&k.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},i);Ox(h,Li(r));const g=Object.assign({maxPadding:h,w:o,h:s,x:i.left,y:i.top},i),m=WI(l.concat(c),d);Pl(a.fullSize,g,d,m),Pl(l,g,d,m),Pl(c,g,d,m)&&Pl(l,g,d,m),FI(g),Ty(a.leftAndTop,g,d,m),g.x+=g.w,g.y+=g.h,Ty(a.rightAndBottom,g,d,m),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},Qn(a.chartArea,y=>{const k=y.box;Object.assign(k,e.chartArea),k.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class Rx{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class jI extends Rx{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const yf="$chartjs",HI={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Py=e=>e===null||e==="";function zI(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[yf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Py(i)){const o=py(e,"width");o!==void 0&&(e.width=o)}if(Py(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=py(e,"height");o!==void 0&&(e.height=o)}return e}const Dx=rI?{passive:!0}:!1;function VI(e,t,n){e&&e.addEventListener(t,n,Dx)}function YI(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Dx)}function KI(e,t){const n=HI[e.type]||e.type,{x:r,y:i}=hs(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function kd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function qI(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||kd(a.addedNodes,r),s=s&&!kd(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function GI(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||kd(a.removedNodes,r),s=s&&!kd(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Nc=new Map;let Ay=0;function Ix(){const e=window.devicePixelRatio;e!==Ay&&(Ay=e,Nc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function ZI(e,t){Nc.size||window.addEventListener("resize",Ix),Nc.set(e,t)}function QI(e){Nc.delete(e),Nc.size||window.removeEventListener("resize",Ix)}function JI(e,t,n){const r=e.canvas,i=r&&gm(r);if(!i)return;const o=yx((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(i),ZI(e,o),s}function P1(e,t,n){n&&n.disconnect(),t==="resize"&&QI(e)}function XI(e,t,n){const r=e.canvas,i=yx(o=>{e.ctx!==null&&n(KI(o,e))},e);return VI(r,t,i),i}class eN extends Rx{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(zI(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[yf])return!1;const r=n[yf].initial;["height","width"].forEach(o=>{const s=r[o];nn(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[yf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:qI,detach:GI,resize:JI}[n]||XI;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:P1,detach:P1,resize:P1}[n]||YI)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return nI(t,n,r,i)}isAttached(t){const n=t&&gm(t);return!!(n&&n.isConnected)}}function tN(e){return!pm()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?jI:eN}class Us{constructor(){Je(this,"x");Je(this,"y");Je(this,"active",!1);Je(this,"options");Je(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Dc(this.x)&&Dc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}Je(Us,"defaults",{}),Je(Us,"defaultRoutes");function nN(e,t){const n=e.options.ticks,r=rN(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?oN(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return sN(t,c,o,s/i),c;const u=iN(o,t,i);if(s>0){let d,h;const g=s>1?Math.round((l-a)/(s-1)):null;for(zu(t,c,u,nn(g)?0:a-g,a),d=0,h=s-1;di)return l}return Math.max(i,1)}function oN(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,Ly=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Oy=(e,t)=>Math.min(t||e,e);function Ry(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function uN(e,t){Qn(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Sr(n,Sr(r,n)),max:Sr(r,Sr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){hn(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=DD(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,g=_i(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:g/(r-1),d+6>a&&(a=g/(r-(t.offset?.5:1)),l=this.maxHeight-ml(t.grid)-n.padding-Dy(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=am(Math.min(Math.asin(_i((u.highest.height+6)/a,-1,1)),Math.asin(_i(l/c,-1,1))-Math.asin(_i(h/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){hn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){hn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=Dy(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=ml(o)+l):(t.height=this.maxHeight,t.width=ml(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),g=r.padding*2,m=Ro(this.labelRotation),y=Math.cos(m),k=Math.sin(m);if(a){const C=r.mirror?0:k*d.width+y*h.height;t.height=Math.min(this.maxHeight,t.height+C+g)}else{const C=r.mirror?0:y*d.width+k*h.height;t.width=Math.min(this.maxWidth,t.width+C+g)}this._calculatePadding(c,u,k,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,g=0;l?c?(h=i*t.width,g=r*n.height):(h=r*t.height,g=i*n.width):o==="start"?g=n.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,g=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){hn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:s[L]||0,height:a[L]||0});return{first:P(0),last:P(n-1),widest:P(O),highest:P(T),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return tD(this._alignToPixels?ls(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=ml(o),g=[],m=a.setContext(this.getContext()),y=m.display?m.width:0,k=y/2,C=function(fe){return ls(r,fe,y)};let v,w,M,E,O,T,P,L,W,I,R,G;if(s==="top")v=C(this.bottom),T=this.bottom-h,L=v-k,I=C(t.top)+k,G=t.bottom;else if(s==="bottom")v=C(this.top),I=t.top,G=C(t.bottom)-k,T=v+k,L=this.top+h;else if(s==="left")v=C(this.right),O=this.right-h,P=v-k,W=C(t.left)+k,R=t.right;else if(s==="right")v=C(this.left),W=t.left,R=C(t.right)-k,O=v+k,P=this.left+h;else if(n==="x"){if(s==="center")v=C((t.top+t.bottom)/2+.5);else if(Nt(s)){const fe=Object.keys(s)[0],Ce=s[fe];v=C(this.chart.scales[fe].getPixelForValue(Ce))}I=t.top,G=t.bottom,T=v+k,L=T+h}else if(n==="y"){if(s==="center")v=C((t.left+t.right)/2);else if(Nt(s)){const fe=Object.keys(s)[0],Ce=s[fe];v=C(this.chart.scales[fe].getPixelForValue(Ce))}O=v-k,P=O-h,W=t.left,R=t.right}const Z=Ut(i.ticks.maxTicksLimit,d),Y=Math.max(1,Math.ceil(d/Z));for(w=0;w0&&(tt-=ft/2);break}Ze={left:tt,top:Pe,width:ft+je.width,height:st+je.height,color:Y.backdropColor}}k.push({label:M,font:L,textOffset:R,options:{rotation:y,color:Ce,strokeColor:Q,strokeWidth:ue,textAlign:ge,textBaseline:G,translation:[E,O],backdrop:Ze}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ro(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");bn.route(o,i,l,a)})}function vN(e){return"id"in e&&"defaults"in e}class yN{constructor(){this.controllers=new Vu(ec,"datasets",!0),this.elements=new Vu(Us,"elements"),this.plugins=new Vu(Object,"plugins"),this.scales=new Vu(Ks,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Qn(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=sm(t);hn(r["before"+i],[],r),n[t](r),hn(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function xN(e){const t={},n=[],r=Object.keys(mi.plugins.items);for(let o=0;o1&&Iy(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ny(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function MN(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Ny(e,"x",n[0])||Ny(e,"y",n[0])}return{}}function TN(e,t){const n=$s[e.type]||{scales:{}},r=t.scales||{},i=tp(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!Nt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=np(s,a,MN(s,e),bn.scales[a.type]),c=kN(l,i),u=n.scales||{};o[s]=Gl(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||tp(a,t),u=($s[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=SN(d,l),g=s[h+"AxisID"]||h;o[g]=o[g]||Object.create(null),Gl(o[g],[{axis:h},r[g],u[d]])})}),Object.keys(o).forEach(s=>{const a=o[s];Gl(a,[bn.scales[a.type],bn.scale])}),o}function Nx(e){const t=e.options||(e.options={});t.plugins=Ut(t.plugins,{}),t.scales=TN(e,t)}function Wx(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function PN(e){return e=e||{},e.data=Wx(e.data),Nx(e),e}const Wy=new Map,$x=new Set;function Yu(e,t){let n=Wy.get(e);return n||(n=t(),Wy.set(e,n),$x.add(n)),n}const vl=(e,t,n)=>{const r=xd(t,n);r!==void 0&&e.add(r)};class AN{constructor(t){this._config=PN(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Wx(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Nx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Yu(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Yu(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Yu(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Yu(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>vl(l,t,d))),u.forEach(d=>vl(l,i,d)),u.forEach(d=>vl(l,$s[o]||{},d)),u.forEach(d=>vl(l,bn,d)),u.forEach(d=>vl(l,ep,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),$x.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,$s[n]||{},bn.datasets[n]||{},{type:n},bn,ep]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=$y(this._resolverCache,t,i);let l=s;if(ON(s,n)){o.$shared=!1,r=Jo(r)?r():r;const c=this.createResolver(t,r,a);l=Fa(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=$y(this._resolverCache,t,r);return Nt(n)?Fa(o,n,void 0,i):o}}function $y(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:fm(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const LN=e=>Nt(e)&&Object.getOwnPropertyNames(e).some(t=>Jo(e[t]));function ON(e,t){const{isScriptable:n,isIndexable:r}=Sx(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Jo(a)||LN(a))||s&&xn(a))return!0}return!1}var RN="4.4.3";const DN=["top","bottom","left","right","chartArea"];function Uy(e,t){return e==="top"||e==="bottom"||DN.indexOf(e)===-1&&t==="x"}function Fy(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function By(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),hn(n&&n.onComplete,[e],t)}function IN(e){const t=e.chart,n=t.options.animation;hn(n&&n.onProgress,[e],t)}function Ux(e){return pm()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const wf={},jy=e=>{const t=Ux(e);return Object.values(wf).filter(n=>n.canvas===t).pop()};function NN(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function WN(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Ku(e,t,n){return e.options.clip?e[n]:t[n]}function $N(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Ku(n,t,"left"),right:Ku(n,t,"right"),top:Ku(r,t,"top"),bottom:Ku(r,t,"bottom")}:t}var wo;let Sh=(wo=class{static register(...t){mi.add(...t),Hy()}static unregister(...t){mi.remove(...t),Hy()}constructor(t,n){const r=this.config=new AN(n),i=Ux(t),o=jy(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||tN(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=jR(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new wN,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=aD(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],wf[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$i.listen(this,"complete",By),$i.listen(this,"progress",IN),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return nn(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hy(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return uy(this.canvas,this.ctx),this}stop(){return $i.stop(this),this}resize(t,n){$i.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,hy(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),hn(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Qn(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=np(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Qn(o,s=>{const a=s.options,l=a.id,c=np(l,a),u=Ut(a.type,s.dtype);(a.position===void 0||Uy(a.position,c)!==Uy(s.dposition))&&(a.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const h=mi.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Qn(i,(s,a)=>{s||delete r[a]}),Qn(r,s=>{Do.configure(this,s,s.options),Do.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fy("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Qn(this.scales,t=>{Do.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!ey(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;NN(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Do.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Qn(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=$N(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&bx(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&_x(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Zi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=DI.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ys(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);bd(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$i.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};Qn(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){Qn(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Qn(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!Jv(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=qR(t),c=WN(t,this._lastEvent,r,l);r&&(this._lastEvent=null,hn(o.onHover,[t,a,this],this),l&&hn(o.onClick,[t,a,this],this));const u=!Jv(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},Je(wo,"defaults",bn),Je(wo,"instances",wf),Je(wo,"overrides",$s),Je(wo,"registry",mi),Je(wo,"version",RN),Je(wo,"getChart",jy),wo);function Hy(){return Qn(Sh.instances,e=>e._plugins.invalidate())}function Fx(e,t,n=t){e.lineCap=Ut(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ut(n.borderDash,t.borderDash)),e.lineDashOffset=Ut(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ut(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ut(n.borderWidth,t.borderWidth),e.strokeStyle=Ut(n.borderColor,t.borderColor)}function UN(e,t,n){e.lineTo(n.x,n.y)}function FN(e){return e.stepped?_D:e.tension||e.cubicInterpolationMode==="monotone"?CD:UN}function Bx(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-M:M))%o,w=()=>{y!==k&&(e.lineTo(u,k),e.lineTo(u,y),e.lineTo(u,C))};for(l&&(g=i[v(0)],e.moveTo(g.x,g.y)),h=0;h<=a;++h){if(g=i[v(h)],g.skip)continue;const M=g.x,E=g.y,O=M|0;O===m?(Ek&&(k=E),u=(d*u+M)/++d):(w(),e.lineTo(M,E),m=O,d=0,y=k=E),C=E}w()}function rp(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?jN:BN}function HN(e){return e.stepped?iI:e.tension||e.cubicInterpolationMode==="monotone"?oI:ps}function zN(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Fx(e,t.options),e.stroke(i)}function VN(e,t,n,r){const{segments:i,options:o}=t,s=rp(t);for(const a of i)Fx(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const YN=typeof Path2D=="function";function KN(e,t,n,r){YN&&!t.options.segment?zN(e,t,n,r):VN(e,t,n,r)}class Al extends Us{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;ZD(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=fI(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=lI(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=HN(r);let c,u;for(c=0,u=s.length;ct!=="borderDash"&&t!=="fill"});function zy(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function QN(e,t,n,r){const i=e.indexOf(t);if(i===-1)return ZN(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const JN=(e,t)=>e===null?null:_i(Math.round(e),0,t);function Vy(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Je(ip,"id","category"),Je(ip,"defaults",{ticks:{callback:Vy}});function XN(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,g=o||1,m=u-1,{min:y,max:k}=t,C=!nn(s),v=!nn(a),w=!nn(c),M=(k-y)/(d+1);let E=ny((k-y)/m/g)*g,O,T,P,L;if(E<1e-14&&!C&&!v)return[{value:y},{value:k}];L=Math.ceil(k/E)-Math.floor(y/E),L>m&&(E=ny(L*E/m/g)*g),nn(l)||(O=Math.pow(10,l),E=Math.ceil(E*O)/O),i==="ticks"?(T=Math.floor(y/E)*E,P=Math.ceil(k/E)*E):(T=y,P=k),C&&v&&o&&JR((a-s)/o,E/1e3)?(L=Math.round(Math.min((a-s)/E,u)),E=(a-s)/L,T=s,P=a):w?(T=C?s:T,P=v?a:P,L=c-1,E=(P-T)/L):(L=(P-T)/E,Zl(L,Math.round(L),E/1e3)?L=Math.round(L):L=Math.ceil(L));const W=Math.max(ry(E),ry(T));O=Math.pow(10,nn(l)?W:l),T=Math.round(T*O)/O,P=Math.round(P*O)/O;let I=0;for(C&&(h&&T!==s?(n.push({value:s}),Ta)break;n.push({value:R})}return v&&h&&P!==a?n.length&&Zl(n[n.length-1].value,a,Yy(a,M,e))?n[n.length-1].value=a:n.push({value:a}):(!v||P===a)&&n.push({value:P}),n}function Yy(e,t,{horizontal:n,minRotation:r}){const i=Ro(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Ed extends Ks{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return nn(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=Ua(i),c=Ua(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=XN(i,o);return t.bounds==="ticks"&&px(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return um(t,this.chart.options.locale,this.options.ticks.format)}}class op extends Ed{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Nn(t)?t:0,this.max=Nn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ro(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Je(op,"id","linear"),Je(op,"defaults",{ticks:{callback:_h.formatters.numeric}});const Wc=e=>Math.floor(Oo(e)),us=(e,t)=>Math.pow(10,Wc(e)+t);function Ky(e){return e/Math.pow(10,Wc(e))===1}function qy(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function eW(e,t){const n=t-e;let r=Wc(n);for(;qy(e,t,r)>10;)r++;for(;qy(e,t,r)<10;)r--;return Math.min(r,Wc(e))}function tW(e,{min:t,max:n}){t=Sr(e.min,t);const r=[],i=Wc(t);let o=eW(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),h=Sr(e.min,Math.round((l+u+d*Math.pow(10,o))*s)/s);for(;h=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,s=o>=0?1:s),h=Math.round((l+u+d*Math.pow(10,o))*s)/s;const g=Sr(e.max,h);return r.push({value:g,major:Ky(g),significand:d}),r}class Gy extends Ks{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Ed.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Nn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Nn(t)?Math.max(0,t):null,this.max=Nn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Nn(this._userMin)&&(this.min=t===us(this.min,0)?us(this.min,-1):us(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(us(r,-1)),s(us(i,1)))),r<=0&&o(us(i,-1)),i<=0&&s(us(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=tW(n,this);return t.bounds==="ticks"&&px(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":um(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Oo(t),this._valueRange=Oo(this.max)-Oo(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Oo(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Je(Gy,"id","logarithmic"),Je(Gy,"defaults",{ticks:{callback:_h.formatters.logarithmic,major:{enabled:!0}}});function sp(e){const t=e.ticks;if(t.display&&e.display){const n=Li(t.backdropPadding);return Ut(t.font&&t.font.size,bn.font.size)+n.height}return 0}function nW(e,t,n){return n=xn(n)?n:[n],{w:wD(e,t.string,n),h:n.length*t.lineHeight}}function Zy(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function rW(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?kn/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function oW(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,l=e.getPointPosition(t,r+i+s,o),c=Math.round(am(ei(l.angle+Pr))),u=uW(l.y,a.h,c),d=lW(c),h=cW(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function sW(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Zi({x:n,y:r},t)||Zi({x:n,y:o},t)||Zi({x:i,y:r},t)||Zi({x:i,y:o},t))}function aW(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:sp(o)/2,additionalAngle:s?kn/i:0};let c;for(let u=0;u270||n<90)&&(e-=t),e}function fW(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!nn(a)){const l=RD(t.borderRadius),c=Li(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,h=o-r+c.width,g=s-i+c.height;Object.values(l).some(m=>m!==0)?(e.beginPath(),MD(e,{x:u,y:d,w:h,h:g,radius:l}),e.fill()):e.fillRect(u,d,h,g)}}function dW(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));fW(n,s,o);const a=Xo(s.font),{x:l,y:c,textAlign:u}=o;Ic(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:s.color,textAlign:u,textBaseline:"middle"})}}function Hx(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,ai);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=hn(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?rW(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=ai/(this._pointLabels.length||1),r=this.options.startAngle||0;return ei(t*n+Ro(r))}getDistanceFromCenterForValue(t){if(nn(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(nn(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),g=i.setContext(h),m=o.setContext(h);hW(this,g,l,s,m)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=Xo(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Li(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Ic(t,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Je(qu,"id","radialLinear"),Je(qu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:_h.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Je(qu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Je(qu,"descriptors",{angleLines:{_fallback:"grid"}});const kh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},vr=Object.keys(kh);function Qy(e,t){return e-t}function Jy(e,t){if(nn(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Nn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Dc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function Xy(e,t,n,r){const i=vr.length;for(let o=vr.indexOf(e);o=vr.indexOf(n);o--){const s=vr[o];if(kh[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return vr[n?vr.indexOf(n):0]}function mW(e){for(let t=vr.indexOf(e)+1,n=vr.length;t=t?n[r]:n[i];e[o]=!0}}function vW(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function tw(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=_i(n,0,s),r=_i(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||Xy(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ut(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=Dc(l)||l===!0,u={};let d=n,h,g;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=d,g=0;h+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return hn(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=r[n],g=c&&d&&h&&h.major;return this._adapter.format(t,i||(g?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=bs(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=bs(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class nw extends Md{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Gu(n,this.min),this._tableRange=Gu(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;si-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Gu(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Gu(this._table,r*this._tableRange+this._minPos,!0)}}Je(nw,"id","timeseries"),Je(nw,"defaults",Md.defaults);const zx="label";function rw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function yW(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Vx(e,t){e.labels=t}function Yx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zx;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function wW(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zx;const n={labels:[],datasets:[]};return Vx(n,e.labels),Yx(n,e.datasets,t),n}function xW(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...h}=e,g=Kt.useRef(null),m=Kt.useRef(),y=()=>{g.current&&(m.current=new Sh(g.current,{type:s,data:wW(a,o),options:l&&{...l},plugins:c}),rw(t,m.current))},k=()=>{rw(t,null),m.current&&(m.current.destroy(),m.current=null)};return Kt.useEffect(()=>{!i&&m.current&&l&&yW(m.current,l)},[i,l]),Kt.useEffect(()=>{!i&&m.current&&Vx(m.current.config.data,a.labels)},[i,a.labels]),Kt.useEffect(()=>{!i&&m.current&&a.datasets&&Yx(m.current.config.data,a.datasets,o)},[i,a.datasets]),Kt.useEffect(()=>{m.current&&(i?(k(),setTimeout(y)):m.current.update(d))},[i,l,a.labels,a.datasets,d]),Kt.useEffect(()=>{m.current&&(k(),setTimeout(y))},[s]),Kt.useEffect(()=>(y(),()=>k()),[]),Pd.createElement("canvas",Object.assign({ref:g,role:"img",height:n,width:r},h),u)}const bW=Kt.forwardRef(xW);function _W(e,t){return Sh.register(t),Kt.forwardRef((n,r)=>Pd.createElement(bW,Object.assign({},n,{ref:r,type:e})))}const CW=_W("line",vf);Sh.register(ip,op,xf,Al,GN);const SW=()=>{const[e,t]=Kt.useState({labels:[],datasets:[{label:"TON/USD",data:[],borderColor:"rgb(83, 91, 242)",tension:.1}]});Kt.useEffect(()=>{(async()=>{const o=(await _n("https://api.coingecko.com/api/v3/coins/the-open-network/market_chart?vs_currency=usd&days=120")).data.prices,s=o.map(l=>pe(l[0]).format("DD/MM/YYYY")),a=o.map(l=>l[1]);t({labels:s,datasets:[{...e.datasets[0],data:a}]})})()},[e.datasets]);const n={responsive:!0,plugins:{legend:{},title:{display:!0,text:"TON/USD Exchange Rate (Last 120 Days)"}}};return Ht.jsx(CW,{options:n,data:e})},kW=()=>{const[e,t]=Kt.useState(null),n='"7334784886:AAE5rbTxl-WgaPhdyLewYTg3utrJPupf53I";';console.log("botToken: ",n),Kt.useEffect(()=>{r()},[]);const r=async()=>{var i;try{const o=await _n.get(`https://api.telegram.org/bot${n}/getMyCommands`);t(JSON.parse(((i=o.data.result[0])==null?void 0:i.description)||"{}"))}catch(o){console.error("Error fetching data:",o)}};return Ht.jsx("div",{children:Ht.jsxs("h2",{children:["Max ⋅ ",e?JSON.stringify(e):"$3,666.69"]})})};function EW(){return Ht.jsx(BM,{manifestUrl:"https://rosticom.github.io/coobot-merkaba-tma/tonconnect-manifest.json",uiPreferences:{theme:en.DARK},walletsListConfiguration:{includeWallets:[{appName:"safepalwallet",name:"SafePal",imageUrl:"https://s.pvcliping.com/web/public_image/SafePal_x288.png",tondns:"",aboutUrl:"https://www.safepal.com",universalLink:"https://link.safepal.io/ton-connect",deepLink:"safepal-tc://",jsBridgeKey:"safepalwallet",bridgeUrl:"https://ton-bridge.safepal.com/tonbridge/v1/bridge",platforms:["ios","android","chrome","firefox"]},{appName:"bitgetTonWallet",name:"Bitget Wallet",imageUrl:"https://raw.githubusercontent.com/bitkeepwallet/download/main/logo/png/bitget%20wallet_logo_iOS.png",aboutUrl:"https://web3.bitget.com",deepLink:"bitkeep://",jsBridgeKey:"bitgetTonWallet",bridgeUrl:"https://bridge.tonapi.io/bridge",platforms:["ios","android","chrome"],universalLink:"https://bkcode.vip/ton-connect"},{appName:"tonwallet",name:"TON Wallet",imageUrl:"https://wallet.ton.org/assets/ui/qr-logo.png",aboutUrl:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",universalLink:"https://wallet.ton.org/ton-connect",jsBridgeKey:"tonwallet",bridgeUrl:"https://bridge.tonapi.io/bridge",platforms:["chrome","android"]}]},actionsConfiguration:{twaReturnUrl:"https://rosticom.github.io/coobot-merkaba-tma/"},children:Ht.jsxs("div",{className:"app",children:[Ht.jsx(YM,{}),Ht.jsx("div",{children:Ht.jsx("a",{href:"https://t.me/+JuO8mZMYOnRmN2Ux",children:Ht.jsx("img",{src:KM,className:"logo",alt:"Coobot chat"})})}),Ht.jsx(kW,{}),Ht.jsx("div",{className:"card",children:Ht.jsx("p",{children:Ht.jsx("a",{href:"https://t.me/gasPump_bot/app?startapp=eyJyZWZfdXNlcl9pZCI6NTY1ODY0MzE4LCJ0b2tlbl9hZGRyZXNzIjoiRVFEZGlyd3l5YXNST2tvUnc5bUJCekJkUUhjYUFjOUV5OFpoak1TdXRkdHJmU2M1In0",children:"Buy $COO and chill out. Dividend payout August 1st, 2024."})})}),Ht.jsx("p",{className:"read-the-docs"}),Ht.jsx(SW,{}),Ht.jsx(VM,{})]})})}var Kx={},Eh={};(function(){var e={},t="";try{t=location.hash.toString()}catch{}var n=l(t),r=C("initParams");if(r)for(var i in r)typeof n[i]>"u"&&(n[i]=r[i]);k("initParams",n);var o=!1,s;try{if(o=window.parent!=null&&window!=window.parent,o){window.addEventListener("message",function(v){if(v.source===window.parent){try{var w=JSON.parse(v.data)}catch{return}if(!(!w||!w.eventType))if(w.eventType=="set_custom_style")v.origin==="https://web.telegram.org"&&(s.innerHTML=w.eventData);else if(w.eventType=="reload_iframe"){try{window.parent.postMessage(JSON.stringify({eventType:"iframe_will_reload"}),"*")}catch{}location.reload()}else h(w.eventType,w.eventData)}}),s=document.createElement("style"),document.head.appendChild(s);try{window.parent.postMessage(JSON.stringify({eventType:"iframe_ready",eventData:{reload_supported:!0}}),"*")}catch{}}}catch{}function a(v){try{return v=v.replace(/\+/g,"%20"),decodeURIComponent(v)}catch{return v}}function l(v){v=v.replace(/^#/,"");var w={};if(!v.length)return w;if(v.indexOf("=")<0&&v.indexOf("?")<0)return w._path=a(v),w;var M=v.indexOf("?");if(M>=0){var E=v.substr(0,M);w._path=a(E),v=v.substr(M+1)}var O=c(v);for(var T in O)w[T]=O[T];return w}function c(v){var w={};if(!v.length)return w;var M=v.split("&"),E,O,T,P;for(E=0;E=0?v+"&"+w:E.length>0?v+"?"+w:v+w}function d(v,w,M){if(w||(w=function(){}),M===void 0&&(M=""),console.log("[Telegram.WebView] > postEvent",v,M),window.TelegramWebviewProxy!==void 0)TelegramWebviewProxy.postEvent(v,JSON.stringify(M)),w();else if(window.external&&"notify"in window.external)window.external.notify(JSON.stringify({eventType:v,eventData:M})),w();else if(o)try{var E="https://web.telegram.org";E="*",window.parent.postMessage(JSON.stringify({eventType:v,eventData:M}),E),w()}catch(O){w(O)}else w({notAvailable:!0})}function h(v,w){console.log("[Telegram.WebView] < receiveEvent",v,w),g(v,function(M){M(v,w)})}function g(v,w){var M=e[v];if(!(M===void 0||!M.length))for(var E=0;Emt?1:-1;return 0}function ie(D){return ne(c,D)>=0}function Te(D){if(window.Blob)try{return new Blob([D]).size}catch{}for(var N=D.length,F=D.length-1;F>=0;F--){var oe=D.charCodeAt(F);oe>127&&oe<=2047?N++:oe>2047&&oe<=65535&&(N+=2),oe>=56320&&oe<=57343&&F--}return N}var Ae=function(){var D=!1,N={};Object.defineProperty(N,"isVisible",{set:function(ze){at({is_visible:ze})},get:function(){return D},enumerable:!0});var F=null;t.onEvent("back_button_pressed",oe);function oe(){E("backButtonClicked")}function ye(){return{is_visible:D}}function mt(ze){return typeof ze>"u"&&(ze=ye()),JSON.stringify(ze)}function De(){return ie("6.1")?!0:(console.warn("[Telegram.WebApp] BackButton is not supported in version "+c),!1)}function cn(){var ze=ye(),jt=mt(ze);F!==jt&&(F=jt,t.postEvent("web_app_setup_back_button",!1,ze))}function at(ze){return De()&&(typeof ze.is_visible<"u"&&(D=!!ze.is_visible),cn()),N}return N.onClick=function(ze){return De()&&O("backButtonClicked",ze),N},N.offClick=function(ze){return De()&&T("backButtonClicked",ze),N},N.show=function(){return at({is_visible:!0})},N.hide=function(){return at({is_visible:!1})},N}(),Xe=0,Dt=function(){var D=!1,N=!0,F=!1,oe="CONTINUE",ye=!1,mt=!1,De={};Object.defineProperty(De,"text",{set:function(p){De.setParams({text:p})},get:function(){return oe},enumerable:!0}),Object.defineProperty(De,"color",{set:function(p){De.setParams({color:p})},get:function(){return ye||a.button_color||"#2481cc"},enumerable:!0}),Object.defineProperty(De,"textColor",{set:function(p){De.setParams({text_color:p})},get:function(){return mt||a.button_text_color||"#ffffff"},enumerable:!0}),Object.defineProperty(De,"isVisible",{set:function(p){De.setParams({is_visible:p})},get:function(){return D},enumerable:!0}),Object.defineProperty(De,"isProgressVisible",{get:function(){return F},enumerable:!0}),Object.defineProperty(De,"isActive",{set:function(p){De.setParams({is_active:p})},get:function(){return N},enumerable:!0});var cn=null;t.onEvent("main_button_pressed",Wr);var at=null,ze={};if(n.tgWebAppDebug){at=document.createElement("tg-main-button"),ze={font:"600 14px/18px sans-serif",display:"none",width:"100%",height:"48px",borderRadius:"0",background:"no-repeat right center",position:"fixed",left:"0",right:"0",bottom:"0",margin:"0",padding:"15px 20px",textAlign:"center",boxSizing:"border-box",zIndex:"10000"};for(var jt in ze)at.style[jt]=ze[jt];document.addEventListener("DOMContentLoaded",function p(x){document.removeEventListener("DOMContentLoaded",p),document.body.appendChild(at),at.addEventListener("click",Wr,!1)})}function Wr(){N&&E("mainButtonClicked")}function qs(){var p=De.color,x=De.textColor;return D?{is_visible:!0,is_active:N,is_progress_visible:F,text:oe,color:p,text_color:x}:{is_visible:!1}}function su(p){return typeof p>"u"&&(p=qs()),JSON.stringify(p)}function el(){var p=qs(),x=su(p);cn!==x&&(cn=x,t.postEvent("web_app_setup_main_button",!1,p),n.tgWebAppDebug&&or(p))}function or(p){p.is_visible?(at.style.display="block",Xe=48,at.style.opacity=p.is_active?"1":"0.8",at.style.cursor=p.is_active?"pointer":"auto",at.disabled=!p.is_active,at.innerText=p.text,at.style.backgroundImage=p.is_progress_visible?"url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewport%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%3Ccircle%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%20stroke-dashoffset%3D%22106%22%20r%3D%229%22%20stroke-dasharray%3D%2256.52%22%20rotate%3D%22-90%22%3E%3Canimate%20attributeName%3D%22stroke-dashoffset%22%20attributeType%3D%22XML%22%20dur%3D%22360s%22%20from%3D%220%22%20to%3D%2212500%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3CanimateTransform%20attributeName%3D%22transform%22%20attributeType%3D%22XML%22%20type%3D%22rotate%22%20dur%3D%221s%22%20from%3D%22-90%2024%2024%22%20to%3D%22630%2024%2024%22%20repeatCount%3D%22indefinite%22%3E%3C%2FanimateTransform%3E%3C%2Fcircle%3E%3C%2Fsvg%3E')":"none",at.style.backgroundColor=p.color,at.style.color=p.text_color):(at.style.display="none",Xe=0),document.documentElement&&(document.documentElement.style.boxSizing="border-box",document.documentElement.style.paddingBottom=Xe+"px"),Y()}function au(p){if(typeof p.text<"u"){var x=M(p.text);if(!x.length)throw console.error("[Telegram.WebApp] Main button text is required",p.text),Error("WebAppMainButtonParamInvalid");if(x.length>64)throw console.error("[Telegram.WebApp] Main button text is too long",x),Error("WebAppMainButtonParamInvalid");oe=x}if(typeof p.color<"u")if(p.color===!1||p.color===null)ye=!1;else{var b=B(p.color);if(!b)throw console.error("[Telegram.WebApp] Main button color format is invalid",p.color),Error("WebAppMainButtonParamInvalid");ye=b}if(typeof p.text_color<"u")if(p.text_color===!1||p.text_color===null)mt=!1;else{var f=B(p.text_color);if(!f)throw console.error("[Telegram.WebApp] Main button text color format is invalid",p.text_color),Error("WebAppMainButtonParamInvalid");mt=f}if(typeof p.is_visible<"u"){if(p.is_visible&&!De.text.length)throw console.error("[Telegram.WebApp] Main button text is required"),Error("WebAppMainButtonParamInvalid");D=!!p.is_visible}return typeof p.is_active<"u"&&(N=!!p.is_active),el(),De}return De.setText=function(p){return De.setParams({text:p})},De.onClick=function(p){return O("mainButtonClicked",p),De},De.offClick=function(p){return T("mainButtonClicked",p),De},De.show=function(){return De.setParams({is_visible:!0})},De.hide=function(){return De.setParams({is_visible:!1})},De.enable=function(){return De.setParams({is_active:!0})},De.disable=function(){return De.setParams({is_active:!1})},De.showProgress=function(p){return N=!!p,F=!0,el(),De},De.hideProgress=function(){return De.isActive||(N=!0),F=!1,el(),De},De.setParams=au,De}(),We=function(){var D=!1,N={};Object.defineProperty(N,"isVisible",{set:function(ze){at({is_visible:ze})},get:function(){return D},enumerable:!0});var F=null;t.onEvent("settings_button_pressed",oe);function oe(){E("settingsButtonClicked")}function ye(){return{is_visible:D}}function mt(ze){return typeof ze>"u"&&(ze=ye()),JSON.stringify(ze)}function De(){return ie("6.10")?!0:(console.warn("[Telegram.WebApp] SettingsButton is not supported in version "+c),!1)}function cn(){var ze=ye(),jt=mt(ze);F!==jt&&(F=jt,t.postEvent("web_app_setup_settings_button",!1,ze))}function at(ze){return De()&&(typeof ze.is_visible<"u"&&(D=!!ze.is_visible),cn()),N}return N.onClick=function(ze){return De()&&O("settingsButtonClicked",ze),N},N.offClick=function(ze){return De()&&T("settingsButtonClicked",ze),N},N.show=function(){return at({is_visible:!0})},N.hide=function(){return at({is_visible:!1})},N}(),Qt=function(){var D={};function N(F){if(!ie("6.1"))return console.warn("[Telegram.WebApp] HapticFeedback is not supported in version "+c),D;if(F.type=="impact"){if(F.impact_style!="light"&&F.impact_style!="medium"&&F.impact_style!="heavy"&&F.impact_style!="rigid"&&F.impact_style!="soft")throw console.error("[Telegram.WebApp] Haptic impact style is invalid",F.impact_style),Error("WebAppHapticImpactStyleInvalid")}else if(F.type=="notification"){if(F.notification_type!="error"&&F.notification_type!="success"&&F.notification_type!="warning")throw console.error("[Telegram.WebApp] Haptic notification type is invalid",F.notification_type),Error("WebAppHapticNotificationTypeInvalid")}else if(F.type!="selection_change")throw console.error("[Telegram.WebApp] Haptic feedback type is invalid",F.type),Error("WebAppHapticFeedbackTypeInvalid");return t.postEvent("web_app_trigger_haptic_feedback",!1,F),D}return D.impactOccurred=function(F){return N({type:"impact",impact_style:F})},D.notificationOccurred=function(F){return N({type:"notification",notification_type:F})},D.selectionChanged=function(){return N({type:"selection_change"})},D}(),ln=function(){var D={};function N(F,oe,ye){if(!ie("6.9"))throw console.error("[Telegram.WebApp] CloudStorage is not supported in version "+c),Error("WebAppMethodUnsupported");return Cr(F,oe,ye),D}return D.setItem=function(F,oe,ye){return N("saveStorageValue",{key:F,value:oe},ye)},D.getItem=function(F,oe){return D.getItems([F],oe?function(ye,mt){ye?oe(ye):oe(null,mt[F])}:null)},D.getItems=function(F,oe){return N("getStorageValues",{keys:F},oe)},D.removeItem=function(F,oe){return D.removeItems([F],oe)},D.removeItems=function(F,oe){return N("deleteStorageValues",{keys:F},oe)},D.getKeys=function(F){return N("getStorageKeys",{},F)},D}(),dr={};function Cn(D,N){if(N.slug&&dr[N.slug]){var F=dr[N.slug];delete dr[N.slug],F.callback&&F.callback(N.status),E("invoiceClosed",{url:F.url,status:N.status})}}var En=!1;function ir(D,N){if(En){var F=En;En=!1;var oe=null;typeof N.button_id<"u"&&(oe=N.button_id),F.callback&&F.callback(oe),E("popupClosed",{button_id:oe})}}var Ue=!1;function yt(D,N){if(Ue){var F=Ue,oe=null;typeof N.data<"u"&&(oe=N.data),F.callback&&F.callback(oe)&&(Ue=!1,t.postEvent("web_app_close_scan_qr_popup",!1)),E("qrTextReceived",{data:oe})}}function He(D,N){Ue=!1}function Pt(D,N){if(N.req_id&&W[N.req_id]){var F=W[N.req_id];delete W[N.req_id];var oe=null;typeof N.data<"u"&&(oe=N.data),F.callback&&F.callback(oe),E("clipboardTextReceived",{data:oe})}}var Rn=!1;function hr(D,N){if(Rn){var F=Rn;Rn=!1,F.callback&&F.callback(N.status=="allowed"),E("writeAccessRequested",{status:N.status})}}function wt(D,N){var F,oe,ye=0,mt=function(){Cr("getRequestedContact",{},function(cn,at){at&&at.length?(clearTimeout(oe),D(at)):(ye+=50,F=setTimeout(mt,ye))})},De=function(){clearTimeout(F),D("")};oe=setTimeout(De,N),mt()}var Re=!1;function Fn(D,N){if(Re){var F=Re;Re=!1;var oe=N.status=="sent",ye={status:N.status};oe?wt(function(mt){if(mt&&mt.length){ye.response=mt,ye.responseUnsafe=e.urlParseQueryString(mt);for(var De in ye.responseUnsafe){var cn=ye.responseUnsafe[De];try{(cn.substr(0,1)=="{"&&cn.substr(-1)=="}"||cn.substr(0,1)=="["&&cn.substr(-1)=="]")&&(ye.responseUnsafe[De]=JSON.parse(cn))}catch{}}}F.callback&&F.callback(oe,ye),E("contactRequested",ye)},3e3):(F.callback&&F.callback(oe,ye),E("contactRequested",ye))}}function Zr(D,N){if(N.req_id&&W[N.req_id]){var F=W[N.req_id];delete W[N.req_id];var oe=null,ye=null;typeof N.result<"u"&&(oe=N.result),typeof N.error<"u"&&(ye=N.error),F.callback&&F.callback(ye,oe)}}function Cr(D,N,F){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method invokeCustomMethod is not supported in version "+c),Error("WebAppMethodUnsupported");var oe=I(16),ye={req_id:oe,method:D,params:N||{}};W[oe]={callback:F},t.postEvent("web_app_invoke_custom_method",!1,ye)}window.Telegram||(window.Telegram={}),Object.defineProperty(i,"initData",{get:function(){return o},enumerable:!0}),Object.defineProperty(i,"initDataUnsafe",{get:function(){return s},enumerable:!0}),Object.defineProperty(i,"version",{get:function(){return c},enumerable:!0}),Object.defineProperty(i,"platform",{get:function(){return u},enumerable:!0}),Object.defineProperty(i,"colorScheme",{get:function(){return l},enumerable:!0}),Object.defineProperty(i,"themeParams",{get:function(){return a},enumerable:!0}),Object.defineProperty(i,"isExpanded",{get:function(){return Z},enumerable:!0}),Object.defineProperty(i,"viewportHeight",{get:function(){return(R===!1?window.innerHeight:R)-Xe},enumerable:!0}),Object.defineProperty(i,"viewportStableHeight",{get:function(){return(G===!1?window.innerHeight:G)-Xe},enumerable:!0}),Object.defineProperty(i,"isClosingConfirmationEnabled",{set:function(D){Ce(D)},get:function(){return fe},enumerable:!0}),Object.defineProperty(i,"headerColor",{set:function(D){Ze(D)},get:function(){return ge()},enumerable:!0}),Object.defineProperty(i,"backgroundColor",{set:function(D){rr(D)},get:function(){return tt()},enumerable:!0}),Object.defineProperty(i,"BackButton",{value:Ae,enumerable:!0}),Object.defineProperty(i,"MainButton",{value:Dt,enumerable:!0}),Object.defineProperty(i,"SettingsButton",{value:We,enumerable:!0}),Object.defineProperty(i,"HapticFeedback",{value:Qt,enumerable:!0}),Object.defineProperty(i,"CloudStorage",{value:ln,enumerable:!0}),i.setHeaderColor=function(D){i.headerColor=D},i.setBackgroundColor=function(D){i.backgroundColor=D},i.enableClosingConfirmation=function(){i.isClosingConfirmationEnabled=!0},i.disableClosingConfirmation=function(){i.isClosingConfirmationEnabled=!1},i.isVersionAtLeast=function(D){return ie(D)},i.onEvent=function(D,N){O(D,N)},i.offEvent=function(D,N){T(D,N)},i.sendData=function(D){if(!D||!D.length)throw console.error("[Telegram.WebApp] Data is required",D),Error("WebAppDataInvalid");if(Te(D)>4096)throw console.error("[Telegram.WebApp] Data is too long",D),Error("WebAppDataInvalid");t.postEvent("web_app_data_send",!1,{data:D})},i.switchInlineQuery=function(D,N){if(!ie("6.6"))throw console.error("[Telegram.WebApp] Method switchInlineQuery is not supported in version "+c),Error("WebAppMethodUnsupported");if(!n.tgWebAppBotInline)throw console.error("[Telegram.WebApp] Inline mode is disabled for this bot. Read more about inline mode: https://core.telegram.org/bots/inline"),Error("WebAppInlineModeDisabled");if(D=D||"",D.length>256)throw console.error("[Telegram.WebApp] Inline query is too long",D),Error("WebAppInlineQueryInvalid");var F=[];if(N){if(!Array.isArray(N))throw console.error("[Telegram.WebApp] Choose chat types should be an array",N),Error("WebAppInlineChooseChatTypesInvalid");for(var oe={users:1,bots:1,groups:1,channels:1},ye=0;ye64)throw console.error("[Telegram.WebApp] Popup title is too long",F),Error("WebAppPopupParamInvalid");F.length>0&&(mt.title=F)}if(typeof D.message<"u"&&(oe=M(D.message)),!oe.length)throw console.error("[Telegram.WebApp] Popup message is required",D.message),Error("WebAppPopupParamInvalid");if(oe.length>256)throw console.error("[Telegram.WebApp] Popup message is too long",oe),Error("WebAppPopupParamInvalid");if(mt.message=oe,typeof D.buttons<"u"){if(!Array.isArray(D.buttons))throw console.error("[Telegram.WebApp] Popup buttons should be an array",D.buttons),Error("WebAppPopupParamInvalid");for(var De=0;De64))throw console.error("[Telegram.WebApp] Popup button id is too long",ze),Error("WebAppPopupParamInvalid");at.id=ze;var jt=cn.type;if(typeof jt>"u"&&(jt="default"),at.type=jt,!(jt=="ok"||jt=="close"||jt=="cancel"))if(jt=="default"||jt=="destructive"){var Wr="";if(typeof cn.text<"u"&&(Wr=M(cn.text)),!Wr.length)throw console.error("[Telegram.WebApp] Popup button text is required for type "+jt,cn.text),Error("WebAppPopupParamInvalid");if(Wr.length>64)throw console.error("[Telegram.WebApp] Popup button text is too long",Wr),Error("WebAppPopupParamInvalid");at.text=Wr}else throw console.error("[Telegram.WebApp] Popup button type is invalid",jt),Error("WebAppPopupParamInvalid");ye.push(at)}}else ye.push({id:"",type:"close"});if(ye.length<1)throw console.error("[Telegram.WebApp] Popup should have at least one button"),Error("WebAppPopupParamInvalid");if(ye.length>3)throw console.error("[Telegram.WebApp] Popup should not have more than 3 buttons"),Error("WebAppPopupParamInvalid");mt.buttons=ye,En={callback:N},t.postEvent("web_app_open_popup",!1,mt)},i.showAlert=function(D,N){i.showPopup({message:D},N?function(){N()}:null)},i.showConfirm=function(D,N){i.showPopup({message:D,buttons:[{type:"ok",id:"ok"},{type:"cancel"}]},N?function(F){N(F=="ok")}:null)},i.showScanQrPopup=function(D,N){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method showScanQrPopup is not supported in version "+c),Error("WebAppMethodUnsupported");if(Ue)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppScanQrPopupOpened");var F="",oe={};if(typeof D.text<"u"){if(F=M(D.text),F.length>64)throw console.error("[Telegram.WebApp] Scan QR popup text is too long",F),Error("WebAppScanQrPopupParamInvalid");F.length>0&&(oe.text=F)}Ue={callback:N},t.postEvent("web_app_open_scan_qr_popup",!1,oe)},i.closeScanQrPopup=function(){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method closeScanQrPopup is not supported in version "+c),Error("WebAppMethodUnsupported");Ue=!1,t.postEvent("web_app_close_scan_qr_popup",!1)},i.readTextFromClipboard=function(D){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method readTextFromClipboard is not supported in version "+c),Error("WebAppMethodUnsupported");var N=I(16),F={req_id:N};W[N]={callback:D},t.postEvent("web_app_read_text_from_clipboard",!1,F)},i.requestWriteAccess=function(D){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method requestWriteAccess is not supported in version "+c),Error("WebAppMethodUnsupported");if(Rn)throw console.error("[Telegram.WebApp] Write access is already requested"),Error("WebAppWriteAccessRequested");Rn={callback:D},t.postEvent("web_app_request_write_access")},i.requestContact=function(D){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method requestContact is not supported in version "+c),Error("WebAppMethodUnsupported");if(Re)throw console.error("[Telegram.WebApp] Contact is already requested"),Error("WebAppContactRequested");Re={callback:D},t.postEvent("web_app_request_phone")},i.invokeCustomMethod=function(D,N,F){Cr(D,N,F)},i.ready=function(){t.postEvent("web_app_ready")},i.expand=function(){t.postEvent("web_app_expand")},i.close=function(){t.postEvent("web_app_close")},window.Telegram.WebApp=i,ft(),q(),Y(),n.tgWebAppShowSettings&&We.show(),window.addEventListener("resize",v),r&&document.addEventListener("click",w),t.onEvent("theme_changed",y),t.onEvent("viewport_changed",C),t.onEvent("invoice_closed",Cn),t.onEvent("popup_closed",ir),t.onEvent("qr_text_received",yt),t.onEvent("scan_qr_popup_closed",He),t.onEvent("clipboard_text_received",Pt),t.onEvent("write_access_requested",hr),t.onEvent("phone_requested",Fn),t.onEvent("custom_method_invoked",Zr),t.postEvent("web_app_request_theme"),t.postEvent("web_app_request_viewport")})();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.WebApp=void 0;var MW=window;Eh.WebApp=MW.Telegram.WebApp;Object.defineProperty(Kx,"__esModule",{value:!0});var TW=Eh,PW=Kx.default=TW.WebApp;PW.ready();A1.createRoot(document.getElementById("root")).render(Ht.jsx(Pd.StrictMode,{children:Ht.jsx(EW,{})})); + */class gI{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=yx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var $i=new gI;const wy="transparent",mI={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=cy(e||wy),i=r.valid&&cy(t||wy);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class vI{constructor(t,n,r,i){const o=n[r];i=Bu([t.to,i,o,t.from]);const s=Bu([t.from,o,i]);this._active=!0,this._fn=t.fn||mI[t.type||typeof s],this._easing=Xl[t.easing]||Xl.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Bu([t.to,n,i,t.from]),this._from=Bu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!Wt(o))return;const s={};for(const a of n)s[a]=o[a];(xn(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=xI(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&wI(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const h=r.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}o[c]=d=new vI(h,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return $i.add(this._chart,r),!0}}function wI(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function Sy(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=SI(o,s,r),d=t.length;let h;for(let g=0;gn[r].axis===t).shift()}function MI(e,t){return Ks(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function TI(e,t,n){return Ks(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pl(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const M1=e=>e==="reset"||e==="none",ky=(e,t)=>t?e:Object.assign({},e),PI=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Lx(n,!0),values:null};class tc{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=_y(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,h,g,m)=>d==="x"?h:d==="r"?m:g,o=n.xAxisID=Ft(r.xAxisID,E1(t,"x")),s=n.yAxisID=Ft(r.yAxisID,E1(t,"y")),a=n.rAxisID=Ft(r.rAxisID,E1(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),u=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&sy(this._data,this),t._stacked&&pl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Wt(n)){const i=this._cachedMeta;this._data=CI(n,i)}else if(r!==n){if(r){sy(r,this);const i=this._cachedMeta;pl(i),i._parsed=[]}n&&Object.isExtensible(n)&&sD(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=_y(n.vScale,n),n.stack!==r.stack&&(i=!0,pl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&Sy(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,h;if(this._parsing===!1)r._parsed=i,r._sorted=!0,h=i;else{xn(i[t])?h=this.parseArrayData(r,i,t,n):Wt(i[t])?h=this.parseObjectData(r,i,t,n):h=this.parsePrimitiveData(r,i,t,n);const g=()=>d[a]===null||c&&d[a]y||d=0;--h)if(!m()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(h,g,m,d);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(ky(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,r,n))}const c=new yI(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||M1(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){M1(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!M1(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a0&&this.getParsed(n-1);for(let E=0;E=v){T.skip=!0;continue}const P=this.getParsed(E),L=tn(P[g]),W=T[h]=s.getPixelForValue(P[h],E),I=T[g]=o||L?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,P,l):P[g],E);T.skip=isNaN(W)||isNaN(I)||L,T.stop=E>0&&Math.abs(P[h]-M[h])>k,y&&(T.parsed=P,T.raw=c.data[E]),d&&(T.options=u||this.resolveDataElementOptions(E,O.active?"active":i)),C||this.updateElement(O,E,T,i),M=P}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Je(yf,"id","line"),Je(yf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Je(yf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function cs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vm{constructor(t){Je(this,"options");this.options=t||{}}static override(t){Object.assign(vm.prototype,t)}init(){}formats(){return cs()}parse(){return cs()}format(){return cs()}add(){return cs()}diff(){return cs()}startOf(){return cs()}endOf(){return cs()}}var AI={_date:vm};function LI(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?iD:_s;if(r){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(o,t,n-u),h=l(o,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function su(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var II={evaluateInteractionItems:su,modes:{index(e,t,n,r){const i=ps(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?T1(e,i,o,r,s):P1(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=ps(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?T1(e,i,o,r,s):P1(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===t)}function My(e,t){return e.filter(n=>Ox.indexOf(n.pos)===-1&&n.box.axis===t)}function ml(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function NI(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=ml(gl(t,"left"),!0),i=ml(gl(t,"right")),o=ml(gl(t,"top"),!0),s=ml(gl(t,"bottom")),a=My(t,"x"),l=My(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:gl(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function Ty(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Rx(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function FI(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Wt(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Rx(s,o.getPadding());const a=Math.max(0,t.outerWidth-Ty(s,e,"left","right")),l=Math.max(0,t.outerHeight-Ty(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function BI(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function jI(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Al(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,k)=>k.box.options&&k.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},i);Rx(h,Li(r));const g=Object.assign({maxPadding:h,w:o,h:s,x:i.left,y:i.top},i),m=$I(l.concat(c),d);Al(a.fullSize,g,d,m),Al(l,g,d,m),Al(c,g,d,m)&&Al(l,g,d,m),BI(g),Py(a.leftAndTop,g,d,m),g.x+=g.w,g.y+=g.h,Py(a.rightAndBottom,g,d,m),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},Qn(a.chartArea,y=>{const k=y.box;Object.assign(k,e.chartArea),k.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class Dx{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class HI extends Dx{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wf="$chartjs",zI={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ay=e=>e===null||e==="";function VI(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[wf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ay(i)){const o=gy(e,"width");o!==void 0&&(e.width=o)}if(Ay(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=gy(e,"height");o!==void 0&&(e.height=o)}return e}const Ix=iI?{passive:!0}:!1;function YI(e,t,n){e&&e.addEventListener(t,n,Ix)}function KI(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ix)}function qI(e,t){const n=zI[e.type]||e.type,{x:r,y:i}=ps(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ed(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function GI(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ed(a.addedNodes,r),s=s&&!Ed(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function ZI(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ed(a.removedNodes,r),s=s&&!Ed(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Wc=new Map;let Ly=0;function Nx(){const e=window.devicePixelRatio;e!==Ly&&(Ly=e,Wc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function QI(e,t){Wc.size||window.addEventListener("resize",Nx),Wc.set(e,t)}function JI(e){Wc.delete(e),Wc.size||window.removeEventListener("resize",Nx)}function XI(e,t,n){const r=e.canvas,i=r&&mm(r);if(!i)return;const o=wx((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(i),QI(e,o),s}function A1(e,t,n){n&&n.disconnect(),t==="resize"&&JI(e)}function eN(e,t,n){const r=e.canvas,i=wx(o=>{e.ctx!==null&&n(qI(o,e))},e);return YI(r,t,i),i}class tN extends Dx{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(VI(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[wf])return!1;const r=n[wf].initial;["height","width"].forEach(o=>{const s=r[o];tn(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[wf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:GI,detach:ZI,resize:XI}[n]||eN;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:A1,detach:A1,resize:A1}[n]||KI)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return rI(t,n,r,i)}isAttached(t){const n=t&&mm(t);return!!(n&&n.isConnected)}}function nN(e){return!gm()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?HI:tN}class Fs{constructor(){Je(this,"x");Je(this,"y");Je(this,"active",!1);Je(this,"options");Je(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Ic(this.x)&&Ic(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}Je(Fs,"defaults",{}),Je(Fs,"defaultRoutes");function rN(e,t){const n=e.options.ticks,r=iN(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?sN(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return aN(t,c,o,s/i),c;const u=oN(o,t,i);if(s>0){let d,h;const g=s>1?Math.round((l-a)/(s-1)):null;for(Vu(t,c,u,tn(g)?0:a-g,a),d=0,h=s-1;di)return l}return Math.max(i,1)}function sN(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,Oy=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Ry=(e,t)=>Math.min(t||e,e);function Dy(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function fN(e,t){Qn(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Sr(n,Sr(r,n)),max:Sr(r,Sr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){hn(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ID(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,g=_i(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:g/(r-1),d+6>a&&(a=g/(r-(t.offset?.5:1)),l=this.maxHeight-vl(t.grid)-n.padding-Iy(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=lm(Math.min(Math.asin(_i((u.highest.height+6)/a,-1,1)),Math.asin(_i(l/c,-1,1))-Math.asin(_i(h/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){hn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){hn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=Iy(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=vl(o)+l):(t.height=this.maxHeight,t.width=vl(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),g=r.padding*2,m=Ro(this.labelRotation),y=Math.cos(m),k=Math.sin(m);if(a){const C=r.mirror?0:k*d.width+y*h.height;t.height=Math.min(this.maxHeight,t.height+C+g)}else{const C=r.mirror?0:y*d.width+k*h.height;t.width=Math.min(this.maxWidth,t.width+C+g)}this._calculatePadding(c,u,k,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,g=0;l?c?(h=i*t.width,g=r*n.height):(h=r*t.height,g=i*n.width):o==="start"?g=n.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,g=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){hn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:s[L]||0,height:a[L]||0});return{first:P(0),last:P(n-1),widest:P(O),highest:P(T),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return nD(this._alignToPixels?ls(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=vl(o),g=[],m=a.setContext(this.getContext()),y=m.display?m.width:0,k=y/2,C=function(fe){return ls(r,fe,y)};let v,w,M,E,O,T,P,L,W,I,R,G;if(s==="top")v=C(this.bottom),T=this.bottom-h,L=v-k,I=C(t.top)+k,G=t.bottom;else if(s==="bottom")v=C(this.top),I=t.top,G=C(t.bottom)-k,T=v+k,L=this.top+h;else if(s==="left")v=C(this.right),O=this.right-h,P=v-k,W=C(t.left)+k,R=t.right;else if(s==="right")v=C(this.left),W=t.left,R=C(t.right)-k,O=v+k,P=this.left+h;else if(n==="x"){if(s==="center")v=C((t.top+t.bottom)/2+.5);else if(Wt(s)){const fe=Object.keys(s)[0],Ce=s[fe];v=C(this.chart.scales[fe].getPixelForValue(Ce))}I=t.top,G=t.bottom,T=v+k,L=T+h}else if(n==="y"){if(s==="center")v=C((t.left+t.right)/2);else if(Wt(s)){const fe=Object.keys(s)[0],Ce=s[fe];v=C(this.chart.scales[fe].getPixelForValue(Ce))}O=v-k,P=O-h,W=t.left,R=t.right}const Z=Ft(i.ticks.maxTicksLimit,d),Y=Math.max(1,Math.ceil(d/Z));for(w=0;w0&&(tt-=ft/2);break}Ze={left:tt,top:Pe,width:ft+je.width,height:st+je.height,color:Y.backdropColor}}k.push({label:M,font:L,textOffset:R,options:{rotation:y,color:Ce,strokeColor:Q,strokeWidth:ue,textAlign:ge,textBaseline:G,translation:[E,O],backdrop:Ze}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ro(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");bn.route(o,i,l,a)})}function yN(e){return"id"in e&&"defaults"in e}class wN{constructor(){this.controllers=new Yu(tc,"datasets",!0),this.elements=new Yu(Fs,"elements"),this.plugins=new Yu(Object,"plugins"),this.scales=new Yu(qs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Qn(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=am(t);hn(r["before"+i],[],r),n[t](r),hn(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function bN(e){const t={},n=[],r=Object.keys(mi.plugins.items);for(let o=0;o1&&Ny(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Wy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function TN(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Wy(e,"x",n[0])||Wy(e,"y",n[0])}return{}}function PN(e,t){const n=Us[e.type]||{scales:{}},r=t.scales||{},i=np(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!Wt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=rp(s,a,TN(s,e),bn.scales[a.type]),c=EN(l,i),u=n.scales||{};o[s]=Zl(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||np(a,t),u=(Us[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=kN(d,l),g=s[h+"AxisID"]||h;o[g]=o[g]||Object.create(null),Zl(o[g],[{axis:h},r[g],u[d]])})}),Object.keys(o).forEach(s=>{const a=o[s];Zl(a,[bn.scales[a.type],bn.scale])}),o}function Wx(e){const t=e.options||(e.options={});t.plugins=Ft(t.plugins,{}),t.scales=PN(e,t)}function $x(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function AN(e){return e=e||{},e.data=$x(e.data),Wx(e),e}const $y=new Map,Ux=new Set;function Ku(e,t){let n=$y.get(e);return n||(n=t(),$y.set(e,n),Ux.add(n)),n}const yl=(e,t,n)=>{const r=bd(t,n);r!==void 0&&e.add(r)};class LN{constructor(t){this._config=AN(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=$x(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Wx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ku(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ku(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ku(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ku(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>yl(l,t,d))),u.forEach(d=>yl(l,i,d)),u.forEach(d=>yl(l,Us[o]||{},d)),u.forEach(d=>yl(l,bn,d)),u.forEach(d=>yl(l,tp,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ux.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Us[n]||{},bn.datasets[n]||{},{type:n},bn,tp]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Uy(this._resolverCache,t,i);let l=s;if(RN(s,n)){o.$shared=!1,r=Jo(r)?r():r;const c=this.createResolver(t,r,a);l=Ba(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Uy(this._resolverCache,t,r);return Wt(n)?Ba(o,n,void 0,i):o}}function Uy(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:dm(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const ON=e=>Wt(e)&&Object.getOwnPropertyNames(e).some(t=>Jo(e[t]));function RN(e,t){const{isScriptable:n,isIndexable:r}=kx(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Jo(a)||ON(a))||s&&xn(a))return!0}return!1}var DN="4.4.3";const IN=["top","bottom","left","right","chartArea"];function Fy(e,t){return e==="top"||e==="bottom"||IN.indexOf(e)===-1&&t==="x"}function By(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function jy(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),hn(n&&n.onComplete,[e],t)}function NN(e){const t=e.chart,n=t.options.animation;hn(n&&n.onProgress,[e],t)}function Fx(e){return gm()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const xf={},Hy=e=>{const t=Fx(e);return Object.values(xf).filter(n=>n.canvas===t).pop()};function WN(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function $N(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function qu(e,t,n){return e.options.clip?e[n]:t[n]}function UN(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:qu(n,t,"left"),right:qu(n,t,"right"),top:qu(r,t,"top"),bottom:qu(r,t,"bottom")}:t}var wo;let kh=(wo=class{static register(...t){mi.add(...t),zy()}static unregister(...t){mi.remove(...t),zy()}constructor(t,n){const r=this.config=new LN(n),i=Fx(t),o=Hy(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||nN(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=HR(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xN,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=lD(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],xf[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$i.listen(this,"complete",jy),$i.listen(this,"progress",NN),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return tn(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():py(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fy(this.canvas,this.ctx),this}stop(){return $i.stop(this),this}resize(t,n){$i.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,py(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),hn(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Qn(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=rp(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Qn(o,s=>{const a=s.options,l=a.id,c=rp(l,a),u=Ft(a.type,s.dtype);(a.position===void 0||Fy(a.position,c)!==Fy(s.dposition))&&(a.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const h=mi.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Qn(i,(s,a)=>{s||delete r[a]}),Qn(r,s=>{Do.configure(this,s,s.options),Do.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(By("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Qn(this.scales,t=>{Do.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!ty(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;WN(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Do.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Qn(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=UN(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&_x(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&Cx(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Zi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=II.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ks(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);_d(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$i.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};Qn(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){Qn(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Qn(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!Xv(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=GR(t),c=$N(t,this._lastEvent,r,l);r&&(this._lastEvent=null,hn(o.onHover,[t,a,this],this),l&&hn(o.onClick,[t,a,this],this));const u=!Xv(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},Je(wo,"defaults",bn),Je(wo,"instances",xf),Je(wo,"overrides",Us),Je(wo,"registry",mi),Je(wo,"version",DN),Je(wo,"getChart",Hy),wo);function zy(){return Qn(kh.instances,e=>e._plugins.invalidate())}function Bx(e,t,n=t){e.lineCap=Ft(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ft(n.borderDash,t.borderDash)),e.lineDashOffset=Ft(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ft(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ft(n.borderWidth,t.borderWidth),e.strokeStyle=Ft(n.borderColor,t.borderColor)}function FN(e,t,n){e.lineTo(n.x,n.y)}function BN(e){return e.stepped?CD:e.tension||e.cubicInterpolationMode==="monotone"?SD:FN}function jx(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-M:M))%o,w=()=>{y!==k&&(e.lineTo(u,k),e.lineTo(u,y),e.lineTo(u,C))};for(l&&(g=i[v(0)],e.moveTo(g.x,g.y)),h=0;h<=a;++h){if(g=i[v(h)],g.skip)continue;const M=g.x,E=g.y,O=M|0;O===m?(Ek&&(k=E),u=(d*u+M)/++d):(w(),e.lineTo(M,E),m=O,d=0,y=k=E),C=E}w()}function ip(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?HN:jN}function zN(e){return e.stepped?oI:e.tension||e.cubicInterpolationMode==="monotone"?sI:gs}function VN(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Bx(e,t.options),e.stroke(i)}function YN(e,t,n,r){const{segments:i,options:o}=t,s=ip(t);for(const a of i)Bx(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const KN=typeof Path2D=="function";function qN(e,t,n,r){KN&&!t.options.segment?VN(e,t,n,r):YN(e,t,n,r)}class Ll extends Fs{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;QD(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=dI(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=cI(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=zN(r);let c,u;for(c=0,u=s.length;ct!=="borderDash"&&t!=="fill"});function Vy(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function JN(e,t,n,r){const i=e.indexOf(t);if(i===-1)return QN(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const XN=(e,t)=>e===null?null:_i(Math.round(e),0,t);function Yy(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Je(op,"id","category"),Je(op,"defaults",{ticks:{callback:Yy}});function eW(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,g=o||1,m=u-1,{min:y,max:k}=t,C=!tn(s),v=!tn(a),w=!tn(c),M=(k-y)/(d+1);let E=ry((k-y)/m/g)*g,O,T,P,L;if(E<1e-14&&!C&&!v)return[{value:y},{value:k}];L=Math.ceil(k/E)-Math.floor(y/E),L>m&&(E=ry(L*E/m/g)*g),tn(l)||(O=Math.pow(10,l),E=Math.ceil(E*O)/O),i==="ticks"?(T=Math.floor(y/E)*E,P=Math.ceil(k/E)*E):(T=y,P=k),C&&v&&o&&XR((a-s)/o,E/1e3)?(L=Math.round(Math.min((a-s)/E,u)),E=(a-s)/L,T=s,P=a):w?(T=C?s:T,P=v?a:P,L=c-1,E=(P-T)/L):(L=(P-T)/E,Ql(L,Math.round(L),E/1e3)?L=Math.round(L):L=Math.ceil(L));const W=Math.max(iy(E),iy(T));O=Math.pow(10,tn(l)?W:l),T=Math.round(T*O)/O,P=Math.round(P*O)/O;let I=0;for(C&&(h&&T!==s?(n.push({value:s}),Ta)break;n.push({value:R})}return v&&h&&P!==a?n.length&&Ql(n[n.length-1].value,a,Ky(a,M,e))?n[n.length-1].value=a:n.push({value:a}):(!v||P===a)&&n.push({value:P}),n}function Ky(e,t,{horizontal:n,minRotation:r}){const i=Ro(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Md extends qs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return tn(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=Fa(i),c=Fa(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=eW(i,o);return t.bounds==="ticks"&&gx(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return fm(t,this.chart.options.locale,this.options.ticks.format)}}class sp extends Md{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Nn(t)?t:0,this.max=Nn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ro(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Je(sp,"id","linear"),Je(sp,"defaults",{ticks:{callback:Ch.formatters.numeric}});const $c=e=>Math.floor(Oo(e)),us=(e,t)=>Math.pow(10,$c(e)+t);function qy(e){return e/Math.pow(10,$c(e))===1}function Gy(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function tW(e,t){const n=t-e;let r=$c(n);for(;Gy(e,t,r)>10;)r++;for(;Gy(e,t,r)<10;)r--;return Math.min(r,$c(e))}function nW(e,{min:t,max:n}){t=Sr(e.min,t);const r=[],i=$c(t);let o=tW(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),h=Sr(e.min,Math.round((l+u+d*Math.pow(10,o))*s)/s);for(;h=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,s=o>=0?1:s),h=Math.round((l+u+d*Math.pow(10,o))*s)/s;const g=Sr(e.max,h);return r.push({value:g,major:qy(g),significand:d}),r}class Zy extends qs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Md.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Nn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Nn(t)?Math.max(0,t):null,this.max=Nn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Nn(this._userMin)&&(this.min=t===us(this.min,0)?us(this.min,-1):us(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(us(r,-1)),s(us(i,1)))),r<=0&&o(us(i,-1)),i<=0&&s(us(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=nW(n,this);return t.bounds==="ticks"&&gx(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":fm(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Oo(t),this._valueRange=Oo(this.max)-Oo(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Oo(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Je(Zy,"id","logarithmic"),Je(Zy,"defaults",{ticks:{callback:Ch.formatters.logarithmic,major:{enabled:!0}}});function ap(e){const t=e.ticks;if(t.display&&e.display){const n=Li(t.backdropPadding);return Ft(t.font&&t.font.size,bn.font.size)+n.height}return 0}function rW(e,t,n){return n=xn(n)?n:[n],{w:xD(e,t.string,n),h:n.length*t.lineHeight}}function Qy(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function iW(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Sn/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function sW(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,l=e.getPointPosition(t,r+i+s,o),c=Math.round(lm(ei(l.angle+Pr))),u=fW(l.y,a.h,c),d=cW(c),h=uW(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function aW(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Zi({x:n,y:r},t)||Zi({x:n,y:o},t)||Zi({x:i,y:r},t)||Zi({x:i,y:o},t))}function lW(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:ap(o)/2,additionalAngle:s?Sn/i:0};let c;for(let u=0;u270||n<90)&&(e-=t),e}function dW(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!tn(a)){const l=DD(t.borderRadius),c=Li(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,h=o-r+c.width,g=s-i+c.height;Object.values(l).some(m=>m!==0)?(e.beginPath(),TD(e,{x:u,y:d,w:h,h:g,radius:l}),e.fill()):e.fillRect(u,d,h,g)}}function hW(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));dW(n,s,o);const a=Xo(s.font),{x:l,y:c,textAlign:u}=o;Nc(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:s.color,textAlign:u,textBaseline:"middle"})}}function zx(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,ai);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=hn(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?iW(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=ai/(this._pointLabels.length||1),r=this.options.startAngle||0;return ei(t*n+Ro(r))}getDistanceFromCenterForValue(t){if(tn(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(tn(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),g=i.setContext(h),m=o.setContext(h);pW(this,g,l,s,m)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=Xo(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Li(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Nc(t,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Je(Gu,"id","radialLinear"),Je(Gu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ch.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Je(Gu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Je(Gu,"descriptors",{angleLines:{_fallback:"grid"}});const Eh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},vr=Object.keys(Eh);function Jy(e,t){return e-t}function Xy(e,t){if(tn(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Nn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Ic(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function ew(e,t,n,r){const i=vr.length;for(let o=vr.indexOf(e);o=vr.indexOf(n);o--){const s=vr[o];if(Eh[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return vr[n?vr.indexOf(n):0]}function vW(e){for(let t=vr.indexOf(e)+1,n=vr.length;t=t?n[r]:n[i];e[o]=!0}}function yW(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function nw(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=_i(n,0,s),r=_i(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||ew(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ft(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=Ic(l)||l===!0,u={};let d=n,h,g;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=d,g=0;h+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return hn(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=r[n],g=c&&d&&h&&h.major;return this._adapter.format(t,i||(g?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=_s(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=_s(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class rw extends Td{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Zu(n,this.min),this._tableRange=Zu(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;si-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Zu(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Zu(this._table,r*this._tableRange+this._minPos,!0)}}Je(rw,"id","timeseries"),Je(rw,"defaults",Td.defaults);const Vx="label";function iw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wW(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Yx(e,t){e.labels=t}function Kx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vx;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function xW(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vx;const n={labels:[],datasets:[]};return Yx(n,e.labels),Kx(n,e.datasets,t),n}function bW(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...h}=e,g=rn.useRef(null),m=rn.useRef(),y=()=>{g.current&&(m.current=new kh(g.current,{type:s,data:xW(a,o),options:l&&{...l},plugins:c}),iw(t,m.current))},k=()=>{iw(t,null),m.current&&(m.current.destroy(),m.current=null)};return rn.useEffect(()=>{!i&&m.current&&l&&wW(m.current,l)},[i,l]),rn.useEffect(()=>{!i&&m.current&&Yx(m.current.config.data,a.labels)},[i,a.labels]),rn.useEffect(()=>{!i&&m.current&&a.datasets&&Kx(m.current.config.data,a.datasets,o)},[i,a.datasets]),rn.useEffect(()=>{m.current&&(i?(k(),setTimeout(y)):m.current.update(d))},[i,l,a.labels,a.datasets,d]),rn.useEffect(()=>{m.current&&(k(),setTimeout(y))},[s]),rn.useEffect(()=>(y(),()=>k()),[]),Ad.createElement("canvas",Object.assign({ref:g,role:"img",height:n,width:r},h),u)}const _W=rn.forwardRef(bW);function CW(e,t){return kh.register(t),rn.forwardRef((n,r)=>Ad.createElement(_W,Object.assign({},n,{ref:r,type:e})))}const SW=CW("line",yf);kh.register(op,sp,bf,Ll,ZN);const kW=()=>{const[e,t]=rn.useState({labels:[],datasets:[{label:"TON/USD",data:[],borderColor:"rgb(83, 91, 242)",tension:.1}]});rn.useEffect(()=>{(async()=>{const o=(await kn("https://api.coingecko.com/api/v3/coins/the-open-network/market_chart?vs_currency=usd&days=120")).data.prices,s=o.map(l=>pe(l[0]).format("DD/MM/YYYY")),a=o.map(l=>l[1]);t({labels:s,datasets:[{...e.datasets[0],data:a}]})})()},[e.datasets]);const n={responsive:!0,plugins:{legend:{},title:{display:!0,text:"TON/USD Exchange Rate (Last 120 Days)"}}};return gt.jsx(SW,{options:n,data:e})},EW=()=>gt.jsx("div",{children:gt.jsx("h2",{children:"$COO ⋅ 98M"})});function MW({avatar:e="./../../../../src/assets/coobot_23.jpg",username:t="Coobot fund",gravity:n=0,profit:r="-",volume:i=0}){return gt.jsxs("div",{className:"holders-item",children:[gt.jsx("img",{src:e,alt:t,className:"avatar"}),gt.jsxs("div",{className:"info",children:[gt.jsxs("div",{className:"first_row",children:[gt.jsx("div",{className:"username",children:t}),gt.jsxs("div",{className:"volume",children:[i,"M $COO"]})]}),gt.jsxs("div",{className:"second_row",children:[gt.jsxs("div",{className:"profit",children:[r," USDT"]}),gt.jsxs("div",{className:"gravity",children:[n," %"]})]})]})]})}const fs=[{avatar:"./../../../../src/assets/coobot_23.jpg",username:"Coobot fund",gravity:1,profit:"+23.78",volume:66.6,price:2e6},{avatar:"./../../../../src/assets/yula_g.jpg",username:"Юлия Geraldina",gravity:1,profit:"+2.85",volume:8,price:2e6},{avatar:"./../../../../src/assets/veronika.jpg",username:"Veronika Alex",gravity:1,profit:"+2.49",volume:7,price:2e6},{avatar:"./../../../../src/assets/theclash.jpg",username:"Pavel | theclash",gravity:1,profit:"+2.46",volume:6.9,price:2e6},{avatar:"./../../../../src/assets/rost.jpg",username:"Rost G.",gravity:1,profit:"+1.71",volume:4.8,price:2e6},{avatar:"./../../../../src/assets/pep.png",username:"fOgTgc",gravity:1,profit:"+1.68",volume:4.7,price:2e6}];function TW(){let e=0;for(let t=0;tgt.jsx(MW,{...t},n))})]})}function PW(){return gt.jsx(jM,{manifestUrl:"https://rosticom.github.io/coobot-merkaba-tma/tonconnect-manifest.json",uiPreferences:{theme:Xt.DARK},walletsListConfiguration:{includeWallets:[{appName:"safepalwallet",name:"SafePal",imageUrl:"https://s.pvcliping.com/web/public_image/SafePal_x288.png",tondns:"",aboutUrl:"https://www.safepal.com",universalLink:"https://link.safepal.io/ton-connect",deepLink:"safepal-tc://",jsBridgeKey:"safepalwallet",bridgeUrl:"https://ton-bridge.safepal.com/tonbridge/v1/bridge",platforms:["ios","android","chrome","firefox"]},{appName:"bitgetTonWallet",name:"Bitget Wallet",imageUrl:"https://raw.githubusercontent.com/bitkeepwallet/download/main/logo/png/bitget%20wallet_logo_iOS.png",aboutUrl:"https://web3.bitget.com",deepLink:"bitkeep://",jsBridgeKey:"bitgetTonWallet",bridgeUrl:"https://bridge.tonapi.io/bridge",platforms:["ios","android","chrome"],universalLink:"https://bkcode.vip/ton-connect"},{appName:"tonwallet",name:"TON Wallet",imageUrl:"https://wallet.ton.org/assets/ui/qr-logo.png",aboutUrl:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",universalLink:"https://wallet.ton.org/ton-connect",jsBridgeKey:"tonwallet",bridgeUrl:"https://bridge.tonapi.io/bridge",platforms:["chrome","android"]}]},actionsConfiguration:{twaReturnUrl:"https://rosticom.github.io/coobot-merkaba-tma/"},children:gt.jsxs("div",{className:"app",children:[gt.jsx(KM,{}),gt.jsx("div",{children:gt.jsx("a",{href:"https://t.me/+JuO8mZMYOnRmN2Ux",children:gt.jsx("img",{src:qM,className:"logo",alt:"Coobot chat"})})}),gt.jsx(EW,{}),gt.jsx(TW,{}),gt.jsx("div",{className:"card",children:gt.jsx("p",{children:gt.jsx("a",{href:"https://t.me/gasPump_bot/app?startapp=eyJyZWZfdXNlcl9pZCI6NTY1ODY0MzE4LCJ0b2tlbl9hZGRyZXNzIjoiRVFEZGlyd3l5YXNST2tvUnc5bUJCekJkUUhjYUFjOUV5OFpoak1TdXRkdHJmU2M1In0",children:"Buy $COO and chill out. Dividend payout on September 1st, 2024."})})}),gt.jsx(kW,{}),gt.jsx(YM,{})]})})}var qx={},Mh={};(function(){var e={},t="";try{t=location.hash.toString()}catch{}var n=l(t),r=C("initParams");if(r)for(var i in r)typeof n[i]>"u"&&(n[i]=r[i]);k("initParams",n);var o=!1,s;try{if(o=window.parent!=null&&window!=window.parent,o){window.addEventListener("message",function(v){if(v.source===window.parent){try{var w=JSON.parse(v.data)}catch{return}if(!(!w||!w.eventType))if(w.eventType=="set_custom_style")v.origin==="https://web.telegram.org"&&(s.innerHTML=w.eventData);else if(w.eventType=="reload_iframe"){try{window.parent.postMessage(JSON.stringify({eventType:"iframe_will_reload"}),"*")}catch{}location.reload()}else h(w.eventType,w.eventData)}}),s=document.createElement("style"),document.head.appendChild(s);try{window.parent.postMessage(JSON.stringify({eventType:"iframe_ready",eventData:{reload_supported:!0}}),"*")}catch{}}}catch{}function a(v){try{return v=v.replace(/\+/g,"%20"),decodeURIComponent(v)}catch{return v}}function l(v){v=v.replace(/^#/,"");var w={};if(!v.length)return w;if(v.indexOf("=")<0&&v.indexOf("?")<0)return w._path=a(v),w;var M=v.indexOf("?");if(M>=0){var E=v.substr(0,M);w._path=a(E),v=v.substr(M+1)}var O=c(v);for(var T in O)w[T]=O[T];return w}function c(v){var w={};if(!v.length)return w;var M=v.split("&"),E,O,T,P;for(E=0;E=0?v+"&"+w:E.length>0?v+"?"+w:v+w}function d(v,w,M){if(w||(w=function(){}),M===void 0&&(M=""),console.log("[Telegram.WebView] > postEvent",v,M),window.TelegramWebviewProxy!==void 0)TelegramWebviewProxy.postEvent(v,JSON.stringify(M)),w();else if(window.external&&"notify"in window.external)window.external.notify(JSON.stringify({eventType:v,eventData:M})),w();else if(o)try{var E="https://web.telegram.org";E="*",window.parent.postMessage(JSON.stringify({eventType:v,eventData:M}),E),w()}catch(O){w(O)}else w({notAvailable:!0})}function h(v,w){console.log("[Telegram.WebView] < receiveEvent",v,w),g(v,function(M){M(v,w)})}function g(v,w){var M=e[v];if(!(M===void 0||!M.length))for(var E=0;Evt?1:-1;return 0}function ie(D){return ne(c,D)>=0}function Te(D){if(window.Blob)try{return new Blob([D]).size}catch{}for(var N=D.length,F=D.length-1;F>=0;F--){var oe=D.charCodeAt(F);oe>127&&oe<=2047?N++:oe>2047&&oe<=65535&&(N+=2),oe>=56320&&oe<=57343&&F--}return N}var Ae=function(){var D=!1,N={};Object.defineProperty(N,"isVisible",{set:function(ze){at({is_visible:ze})},get:function(){return D},enumerable:!0});var F=null;t.onEvent("back_button_pressed",oe);function oe(){E("backButtonClicked")}function ye(){return{is_visible:D}}function vt(ze){return typeof ze>"u"&&(ze=ye()),JSON.stringify(ze)}function De(){return ie("6.1")?!0:(console.warn("[Telegram.WebApp] BackButton is not supported in version "+c),!1)}function cn(){var ze=ye(),Ht=vt(ze);F!==Ht&&(F=Ht,t.postEvent("web_app_setup_back_button",!1,ze))}function at(ze){return De()&&(typeof ze.is_visible<"u"&&(D=!!ze.is_visible),cn()),N}return N.onClick=function(ze){return De()&&O("backButtonClicked",ze),N},N.offClick=function(ze){return De()&&T("backButtonClicked",ze),N},N.show=function(){return at({is_visible:!0})},N.hide=function(){return at({is_visible:!1})},N}(),Xe=0,It=function(){var D=!1,N=!0,F=!1,oe="CONTINUE",ye=!1,vt=!1,De={};Object.defineProperty(De,"text",{set:function(p){De.setParams({text:p})},get:function(){return oe},enumerable:!0}),Object.defineProperty(De,"color",{set:function(p){De.setParams({color:p})},get:function(){return ye||a.button_color||"#2481cc"},enumerable:!0}),Object.defineProperty(De,"textColor",{set:function(p){De.setParams({text_color:p})},get:function(){return vt||a.button_text_color||"#ffffff"},enumerable:!0}),Object.defineProperty(De,"isVisible",{set:function(p){De.setParams({is_visible:p})},get:function(){return D},enumerable:!0}),Object.defineProperty(De,"isProgressVisible",{get:function(){return F},enumerable:!0}),Object.defineProperty(De,"isActive",{set:function(p){De.setParams({is_active:p})},get:function(){return N},enumerable:!0});var cn=null;t.onEvent("main_button_pressed",Wr);var at=null,ze={};if(n.tgWebAppDebug){at=document.createElement("tg-main-button"),ze={font:"600 14px/18px sans-serif",display:"none",width:"100%",height:"48px",borderRadius:"0",background:"no-repeat right center",position:"fixed",left:"0",right:"0",bottom:"0",margin:"0",padding:"15px 20px",textAlign:"center",boxSizing:"border-box",zIndex:"10000"};for(var Ht in ze)at.style[Ht]=ze[Ht];document.addEventListener("DOMContentLoaded",function p(x){document.removeEventListener("DOMContentLoaded",p),document.body.appendChild(at),at.addEventListener("click",Wr,!1)})}function Wr(){N&&E("mainButtonClicked")}function Gs(){var p=De.color,x=De.textColor;return D?{is_visible:!0,is_active:N,is_progress_visible:F,text:oe,color:p,text_color:x}:{is_visible:!1}}function au(p){return typeof p>"u"&&(p=Gs()),JSON.stringify(p)}function tl(){var p=Gs(),x=au(p);cn!==x&&(cn=x,t.postEvent("web_app_setup_main_button",!1,p),n.tgWebAppDebug&&or(p))}function or(p){p.is_visible?(at.style.display="block",Xe=48,at.style.opacity=p.is_active?"1":"0.8",at.style.cursor=p.is_active?"pointer":"auto",at.disabled=!p.is_active,at.innerText=p.text,at.style.backgroundImage=p.is_progress_visible?"url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewport%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%3Ccircle%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%20stroke-dashoffset%3D%22106%22%20r%3D%229%22%20stroke-dasharray%3D%2256.52%22%20rotate%3D%22-90%22%3E%3Canimate%20attributeName%3D%22stroke-dashoffset%22%20attributeType%3D%22XML%22%20dur%3D%22360s%22%20from%3D%220%22%20to%3D%2212500%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3CanimateTransform%20attributeName%3D%22transform%22%20attributeType%3D%22XML%22%20type%3D%22rotate%22%20dur%3D%221s%22%20from%3D%22-90%2024%2024%22%20to%3D%22630%2024%2024%22%20repeatCount%3D%22indefinite%22%3E%3C%2FanimateTransform%3E%3C%2Fcircle%3E%3C%2Fsvg%3E')":"none",at.style.backgroundColor=p.color,at.style.color=p.text_color):(at.style.display="none",Xe=0),document.documentElement&&(document.documentElement.style.boxSizing="border-box",document.documentElement.style.paddingBottom=Xe+"px"),Y()}function lu(p){if(typeof p.text<"u"){var x=M(p.text);if(!x.length)throw console.error("[Telegram.WebApp] Main button text is required",p.text),Error("WebAppMainButtonParamInvalid");if(x.length>64)throw console.error("[Telegram.WebApp] Main button text is too long",x),Error("WebAppMainButtonParamInvalid");oe=x}if(typeof p.color<"u")if(p.color===!1||p.color===null)ye=!1;else{var b=B(p.color);if(!b)throw console.error("[Telegram.WebApp] Main button color format is invalid",p.color),Error("WebAppMainButtonParamInvalid");ye=b}if(typeof p.text_color<"u")if(p.text_color===!1||p.text_color===null)vt=!1;else{var f=B(p.text_color);if(!f)throw console.error("[Telegram.WebApp] Main button text color format is invalid",p.text_color),Error("WebAppMainButtonParamInvalid");vt=f}if(typeof p.is_visible<"u"){if(p.is_visible&&!De.text.length)throw console.error("[Telegram.WebApp] Main button text is required"),Error("WebAppMainButtonParamInvalid");D=!!p.is_visible}return typeof p.is_active<"u"&&(N=!!p.is_active),tl(),De}return De.setText=function(p){return De.setParams({text:p})},De.onClick=function(p){return O("mainButtonClicked",p),De},De.offClick=function(p){return T("mainButtonClicked",p),De},De.show=function(){return De.setParams({is_visible:!0})},De.hide=function(){return De.setParams({is_visible:!1})},De.enable=function(){return De.setParams({is_active:!0})},De.disable=function(){return De.setParams({is_active:!1})},De.showProgress=function(p){return N=!!p,F=!0,tl(),De},De.hideProgress=function(){return De.isActive||(N=!0),F=!1,tl(),De},De.setParams=lu,De}(),We=function(){var D=!1,N={};Object.defineProperty(N,"isVisible",{set:function(ze){at({is_visible:ze})},get:function(){return D},enumerable:!0});var F=null;t.onEvent("settings_button_pressed",oe);function oe(){E("settingsButtonClicked")}function ye(){return{is_visible:D}}function vt(ze){return typeof ze>"u"&&(ze=ye()),JSON.stringify(ze)}function De(){return ie("6.10")?!0:(console.warn("[Telegram.WebApp] SettingsButton is not supported in version "+c),!1)}function cn(){var ze=ye(),Ht=vt(ze);F!==Ht&&(F=Ht,t.postEvent("web_app_setup_settings_button",!1,ze))}function at(ze){return De()&&(typeof ze.is_visible<"u"&&(D=!!ze.is_visible),cn()),N}return N.onClick=function(ze){return De()&&O("settingsButtonClicked",ze),N},N.offClick=function(ze){return De()&&T("settingsButtonClicked",ze),N},N.show=function(){return at({is_visible:!0})},N.hide=function(){return at({is_visible:!1})},N}(),Zt=function(){var D={};function N(F){if(!ie("6.1"))return console.warn("[Telegram.WebApp] HapticFeedback is not supported in version "+c),D;if(F.type=="impact"){if(F.impact_style!="light"&&F.impact_style!="medium"&&F.impact_style!="heavy"&&F.impact_style!="rigid"&&F.impact_style!="soft")throw console.error("[Telegram.WebApp] Haptic impact style is invalid",F.impact_style),Error("WebAppHapticImpactStyleInvalid")}else if(F.type=="notification"){if(F.notification_type!="error"&&F.notification_type!="success"&&F.notification_type!="warning")throw console.error("[Telegram.WebApp] Haptic notification type is invalid",F.notification_type),Error("WebAppHapticNotificationTypeInvalid")}else if(F.type!="selection_change")throw console.error("[Telegram.WebApp] Haptic feedback type is invalid",F.type),Error("WebAppHapticFeedbackTypeInvalid");return t.postEvent("web_app_trigger_haptic_feedback",!1,F),D}return D.impactOccurred=function(F){return N({type:"impact",impact_style:F})},D.notificationOccurred=function(F){return N({type:"notification",notification_type:F})},D.selectionChanged=function(){return N({type:"selection_change"})},D}(),ln=function(){var D={};function N(F,oe,ye){if(!ie("6.9"))throw console.error("[Telegram.WebApp] CloudStorage is not supported in version "+c),Error("WebAppMethodUnsupported");return Cr(F,oe,ye),D}return D.setItem=function(F,oe,ye){return N("saveStorageValue",{key:F,value:oe},ye)},D.getItem=function(F,oe){return D.getItems([F],oe?function(ye,vt){ye?oe(ye):oe(null,vt[F])}:null)},D.getItems=function(F,oe){return N("getStorageValues",{keys:F},oe)},D.removeItem=function(F,oe){return D.removeItems([F],oe)},D.removeItems=function(F,oe){return N("deleteStorageValues",{keys:F},oe)},D.getKeys=function(F){return N("getStorageKeys",{},F)},D}(),dr={};function _n(D,N){if(N.slug&&dr[N.slug]){var F=dr[N.slug];delete dr[N.slug],F.callback&&F.callback(N.status),E("invoiceClosed",{url:F.url,status:N.status})}}var En=!1;function ir(D,N){if(En){var F=En;En=!1;var oe=null;typeof N.button_id<"u"&&(oe=N.button_id),F.callback&&F.callback(oe),E("popupClosed",{button_id:oe})}}var Ue=!1;function wt(D,N){if(Ue){var F=Ue,oe=null;typeof N.data<"u"&&(oe=N.data),F.callback&&F.callback(oe)&&(Ue=!1,t.postEvent("web_app_close_scan_qr_popup",!1)),E("qrTextReceived",{data:oe})}}function He(D,N){Ue=!1}function At(D,N){if(N.req_id&&W[N.req_id]){var F=W[N.req_id];delete W[N.req_id];var oe=null;typeof N.data<"u"&&(oe=N.data),F.callback&&F.callback(oe),E("clipboardTextReceived",{data:oe})}}var Rn=!1;function hr(D,N){if(Rn){var F=Rn;Rn=!1,F.callback&&F.callback(N.status=="allowed"),E("writeAccessRequested",{status:N.status})}}function xt(D,N){var F,oe,ye=0,vt=function(){Cr("getRequestedContact",{},function(cn,at){at&&at.length?(clearTimeout(oe),D(at)):(ye+=50,F=setTimeout(vt,ye))})},De=function(){clearTimeout(F),D("")};oe=setTimeout(De,N),vt()}var Re=!1;function Fn(D,N){if(Re){var F=Re;Re=!1;var oe=N.status=="sent",ye={status:N.status};oe?xt(function(vt){if(vt&&vt.length){ye.response=vt,ye.responseUnsafe=e.urlParseQueryString(vt);for(var De in ye.responseUnsafe){var cn=ye.responseUnsafe[De];try{(cn.substr(0,1)=="{"&&cn.substr(-1)=="}"||cn.substr(0,1)=="["&&cn.substr(-1)=="]")&&(ye.responseUnsafe[De]=JSON.parse(cn))}catch{}}}F.callback&&F.callback(oe,ye),E("contactRequested",ye)},3e3):(F.callback&&F.callback(oe,ye),E("contactRequested",ye))}}function Zr(D,N){if(N.req_id&&W[N.req_id]){var F=W[N.req_id];delete W[N.req_id];var oe=null,ye=null;typeof N.result<"u"&&(oe=N.result),typeof N.error<"u"&&(ye=N.error),F.callback&&F.callback(ye,oe)}}function Cr(D,N,F){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method invokeCustomMethod is not supported in version "+c),Error("WebAppMethodUnsupported");var oe=I(16),ye={req_id:oe,method:D,params:N||{}};W[oe]={callback:F},t.postEvent("web_app_invoke_custom_method",!1,ye)}window.Telegram||(window.Telegram={}),Object.defineProperty(i,"initData",{get:function(){return o},enumerable:!0}),Object.defineProperty(i,"initDataUnsafe",{get:function(){return s},enumerable:!0}),Object.defineProperty(i,"version",{get:function(){return c},enumerable:!0}),Object.defineProperty(i,"platform",{get:function(){return u},enumerable:!0}),Object.defineProperty(i,"colorScheme",{get:function(){return l},enumerable:!0}),Object.defineProperty(i,"themeParams",{get:function(){return a},enumerable:!0}),Object.defineProperty(i,"isExpanded",{get:function(){return Z},enumerable:!0}),Object.defineProperty(i,"viewportHeight",{get:function(){return(R===!1?window.innerHeight:R)-Xe},enumerable:!0}),Object.defineProperty(i,"viewportStableHeight",{get:function(){return(G===!1?window.innerHeight:G)-Xe},enumerable:!0}),Object.defineProperty(i,"isClosingConfirmationEnabled",{set:function(D){Ce(D)},get:function(){return fe},enumerable:!0}),Object.defineProperty(i,"headerColor",{set:function(D){Ze(D)},get:function(){return ge()},enumerable:!0}),Object.defineProperty(i,"backgroundColor",{set:function(D){rr(D)},get:function(){return tt()},enumerable:!0}),Object.defineProperty(i,"BackButton",{value:Ae,enumerable:!0}),Object.defineProperty(i,"MainButton",{value:It,enumerable:!0}),Object.defineProperty(i,"SettingsButton",{value:We,enumerable:!0}),Object.defineProperty(i,"HapticFeedback",{value:Zt,enumerable:!0}),Object.defineProperty(i,"CloudStorage",{value:ln,enumerable:!0}),i.setHeaderColor=function(D){i.headerColor=D},i.setBackgroundColor=function(D){i.backgroundColor=D},i.enableClosingConfirmation=function(){i.isClosingConfirmationEnabled=!0},i.disableClosingConfirmation=function(){i.isClosingConfirmationEnabled=!1},i.isVersionAtLeast=function(D){return ie(D)},i.onEvent=function(D,N){O(D,N)},i.offEvent=function(D,N){T(D,N)},i.sendData=function(D){if(!D||!D.length)throw console.error("[Telegram.WebApp] Data is required",D),Error("WebAppDataInvalid");if(Te(D)>4096)throw console.error("[Telegram.WebApp] Data is too long",D),Error("WebAppDataInvalid");t.postEvent("web_app_data_send",!1,{data:D})},i.switchInlineQuery=function(D,N){if(!ie("6.6"))throw console.error("[Telegram.WebApp] Method switchInlineQuery is not supported in version "+c),Error("WebAppMethodUnsupported");if(!n.tgWebAppBotInline)throw console.error("[Telegram.WebApp] Inline mode is disabled for this bot. Read more about inline mode: https://core.telegram.org/bots/inline"),Error("WebAppInlineModeDisabled");if(D=D||"",D.length>256)throw console.error("[Telegram.WebApp] Inline query is too long",D),Error("WebAppInlineQueryInvalid");var F=[];if(N){if(!Array.isArray(N))throw console.error("[Telegram.WebApp] Choose chat types should be an array",N),Error("WebAppInlineChooseChatTypesInvalid");for(var oe={users:1,bots:1,groups:1,channels:1},ye=0;ye64)throw console.error("[Telegram.WebApp] Popup title is too long",F),Error("WebAppPopupParamInvalid");F.length>0&&(vt.title=F)}if(typeof D.message<"u"&&(oe=M(D.message)),!oe.length)throw console.error("[Telegram.WebApp] Popup message is required",D.message),Error("WebAppPopupParamInvalid");if(oe.length>256)throw console.error("[Telegram.WebApp] Popup message is too long",oe),Error("WebAppPopupParamInvalid");if(vt.message=oe,typeof D.buttons<"u"){if(!Array.isArray(D.buttons))throw console.error("[Telegram.WebApp] Popup buttons should be an array",D.buttons),Error("WebAppPopupParamInvalid");for(var De=0;De64))throw console.error("[Telegram.WebApp] Popup button id is too long",ze),Error("WebAppPopupParamInvalid");at.id=ze;var Ht=cn.type;if(typeof Ht>"u"&&(Ht="default"),at.type=Ht,!(Ht=="ok"||Ht=="close"||Ht=="cancel"))if(Ht=="default"||Ht=="destructive"){var Wr="";if(typeof cn.text<"u"&&(Wr=M(cn.text)),!Wr.length)throw console.error("[Telegram.WebApp] Popup button text is required for type "+Ht,cn.text),Error("WebAppPopupParamInvalid");if(Wr.length>64)throw console.error("[Telegram.WebApp] Popup button text is too long",Wr),Error("WebAppPopupParamInvalid");at.text=Wr}else throw console.error("[Telegram.WebApp] Popup button type is invalid",Ht),Error("WebAppPopupParamInvalid");ye.push(at)}}else ye.push({id:"",type:"close"});if(ye.length<1)throw console.error("[Telegram.WebApp] Popup should have at least one button"),Error("WebAppPopupParamInvalid");if(ye.length>3)throw console.error("[Telegram.WebApp] Popup should not have more than 3 buttons"),Error("WebAppPopupParamInvalid");vt.buttons=ye,En={callback:N},t.postEvent("web_app_open_popup",!1,vt)},i.showAlert=function(D,N){i.showPopup({message:D},N?function(){N()}:null)},i.showConfirm=function(D,N){i.showPopup({message:D,buttons:[{type:"ok",id:"ok"},{type:"cancel"}]},N?function(F){N(F=="ok")}:null)},i.showScanQrPopup=function(D,N){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method showScanQrPopup is not supported in version "+c),Error("WebAppMethodUnsupported");if(Ue)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppScanQrPopupOpened");var F="",oe={};if(typeof D.text<"u"){if(F=M(D.text),F.length>64)throw console.error("[Telegram.WebApp] Scan QR popup text is too long",F),Error("WebAppScanQrPopupParamInvalid");F.length>0&&(oe.text=F)}Ue={callback:N},t.postEvent("web_app_open_scan_qr_popup",!1,oe)},i.closeScanQrPopup=function(){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method closeScanQrPopup is not supported in version "+c),Error("WebAppMethodUnsupported");Ue=!1,t.postEvent("web_app_close_scan_qr_popup",!1)},i.readTextFromClipboard=function(D){if(!ie("6.4"))throw console.error("[Telegram.WebApp] Method readTextFromClipboard is not supported in version "+c),Error("WebAppMethodUnsupported");var N=I(16),F={req_id:N};W[N]={callback:D},t.postEvent("web_app_read_text_from_clipboard",!1,F)},i.requestWriteAccess=function(D){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method requestWriteAccess is not supported in version "+c),Error("WebAppMethodUnsupported");if(Rn)throw console.error("[Telegram.WebApp] Write access is already requested"),Error("WebAppWriteAccessRequested");Rn={callback:D},t.postEvent("web_app_request_write_access")},i.requestContact=function(D){if(!ie("6.9"))throw console.error("[Telegram.WebApp] Method requestContact is not supported in version "+c),Error("WebAppMethodUnsupported");if(Re)throw console.error("[Telegram.WebApp] Contact is already requested"),Error("WebAppContactRequested");Re={callback:D},t.postEvent("web_app_request_phone")},i.invokeCustomMethod=function(D,N,F){Cr(D,N,F)},i.ready=function(){t.postEvent("web_app_ready")},i.expand=function(){t.postEvent("web_app_expand")},i.close=function(){t.postEvent("web_app_close")},window.Telegram.WebApp=i,ft(),q(),Y(),n.tgWebAppShowSettings&&We.show(),window.addEventListener("resize",v),r&&document.addEventListener("click",w),t.onEvent("theme_changed",y),t.onEvent("viewport_changed",C),t.onEvent("invoice_closed",_n),t.onEvent("popup_closed",ir),t.onEvent("qr_text_received",wt),t.onEvent("scan_qr_popup_closed",He),t.onEvent("clipboard_text_received",At),t.onEvent("write_access_requested",hr),t.onEvent("phone_requested",Fn),t.onEvent("custom_method_invoked",Zr),t.postEvent("web_app_request_theme"),t.postEvent("web_app_request_viewport")})();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.WebApp=void 0;var AW=window;Mh.WebApp=AW.Telegram.WebApp;Object.defineProperty(qx,"__esModule",{value:!0});var LW=Mh,OW=qx.default=LW.WebApp;OW.ready();L1.createRoot(document.getElementById("root")).render(gt.jsx(Ad.StrictMode,{children:gt.jsx(PW,{})})); diff --git a/docs/assets/index-Erui8dy_.css b/docs/assets/index-Erui8dy_.css new file mode 100644 index 0000000..8d87a8c --- /dev/null +++ b/docs/assets/index-Erui8dy_.css @@ -0,0 +1 @@ +@charset "UTF-8";.footer{padding:20px;display:flex;gap:20px;justify-content:flex-end;align-items:center;flex-wrap:wrap}.footer>div>label{color:#fff;margin-right:5px}.footer-checkbox-container{display:flex;flex-direction:column}.footer-checkbox-container>span{color:#fff;font-weight:700;margin-bottom:4px}.footer-checkbox-container input{margin-left:3px}header{align-items:right;justify-content:space-between}header>span{font-size:30px;line-height:34px;color:#66aaeee8;font-weight:700;margin:16px}header #wallet-connect-button-wrapper{display:inline-block}header #user-name{display:inline-block}header #header-row{display:flex;justify-content:space-between;margin-bottom:16px;margin-left:16px;align-items:center}#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center;min-height:88vh}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s;border-radius:50%}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}.card{padding:2em}.read-the-docs{color:#888}.holders-list{list-style:none;padding:0;margin:0}.avatar{width:36px;height:36px;border-radius:50%;margin-right:10px}.info{flex:1}.first_row,.second_row{justify-content:space-between;display:flex}.profit{font-size:12px;color:#1a6446}.gravity{font-size:12px;color:#333}.volume{font-size:14px;color:#000}.username{font-size:14px;font-weight:700;text-decoration:none;color:#000}.holders-item{display:flex;align-items:center;padding:8px 10px 10px;background-color:#f0f0f0;box-shadow:0 2px 4px #0000001a;position:relative}.holders-item:first-child{border-top-left-radius:10px;border-top-right-radius:10px}.holders-item:last-child{border-bottom-left-radius:10px;border-bottom-right-radius:10px;border-bottom:none}.holders-list-container{background-color:transparent;padding:20px}.holders-list-container h2{text-transform:uppercase;font-size:12px;color:#f0f0f0;margin-bottom:8px;margin-left:12px;text-align:left}.holders-item:before{content:"";position:absolute;top:56px;left:56px;width:calc(100% - 56px);height:.5px;background-color:#ccc}.holders-item:last-child:before{display:none}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}} diff --git a/docs/index.html b/docs/index.html index b070785..9e44adc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,8 +6,8 @@ Coobot - - + +
    diff --git a/package.json b/package.json index b8ec6e3..e22790e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coobot-merkaba", "private": true, - "version": "0.0.5", + "version": "0.0.6", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.tsx b/src/App.tsx index b83e85b..2e5cf26 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,7 @@ import viteLogo from './assets/coobot_23.jpg' import './App.css' import TonUsdChart from "./components/TonusdChart/TonusdChart"; import MarketCap from "./components/MarketCap/MarketCap"; +import HoldersList from "./components/HoldersList/HoldersList"; function App() { // const [count, setCount] = useState(0) @@ -74,23 +75,24 @@ function App() { */} + -

    + {/*

    */} {/* dividend payout August 1st, 2024 */} {/* buying or selling on the crypto market? doesn't matter with quantum technology! */} -

    + {/*

    */}