From 8a70f7468e031d41a2e79bab5b80254c62c578f4 Mon Sep 17 00:00:00 2001 From: capt-nemo429 Date: Mon, 29 Jan 2024 01:36:42 +0000 Subject: [PATCH] deploy: b86cadc146957a58472e8e31f96a03403df1d359 --- .../{index-W9mJsPu4.js => index-2TFXDjb2.js} | 20 +++++++++---------- index.html | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) rename assets/{index-W9mJsPu4.js => index-2TFXDjb2.js} (75%) diff --git a/assets/index-W9mJsPu4.js b/assets/index-2TFXDjb2.js similarity index 75% rename from assets/index-W9mJsPu4.js rename to assets/index-2TFXDjb2.js index 2b6c087..8839e69 100644 --- a/assets/index-W9mJsPu4.js +++ b/assets/index-2TFXDjb2.js @@ -1,24 +1,24 @@ -var tv=Object.defineProperty;var nv=(e,t,n)=>t in e?tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var be=(e,t,n)=>(nv(e,typeof t!="symbol"?t+"":t,n),n),el=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ie=(e,t,n)=>(el(e,t,"read from private field"),n?n.call(e):t.get(e)),ut=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ye=(e,t,n,r)=>(el(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Mr=(e,t,n,r)=>({set _(o){Ye(e,t,o,n)},get _(){return Ie(e,t,r)}}),Nc=(e,t,n)=>(el(e,t,"access private method"),n);var BP=rv((zn,Hn)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** +var tv=Object.defineProperty;var nv=(e,t,n)=>t in e?tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var be=(e,t,n)=>(nv(e,typeof t!="symbol"?t+"":t,n),n),el=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ie=(e,t,n)=>(el(e,t,"read from private field"),n?n.call(e):t.get(e)),ut=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ye=(e,t,n,r)=>(el(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Mr=(e,t,n,r)=>({set _(o){Ye(e,t,o,n)},get _(){return Ie(e,t,r)}}),Nc=(e,t,n)=>(el(e,t,"access private method"),n);var PP=rv((zn,Hn)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** * @vue/shared v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Cu(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const ot={},xo=[],tn=()=>{},ov=()=>!1,la=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Tu=e=>e.startsWith("onUpdate:"),St=Object.assign,Ou=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},iv=Object.prototype.hasOwnProperty,Le=(e,t)=>iv.call(e,t),we=Array.isArray,Eo=e=>ua(e)==="[object Map]",ip=e=>ua(e)==="[object Set]",Se=e=>typeof e=="function",dt=e=>typeof e=="string",Lo=e=>typeof e=="symbol",st=e=>e!==null&&typeof e=="object",sp=e=>(st(e)||Se(e))&&Se(e.then)&&Se(e.catch),ap=Object.prototype.toString,ua=e=>ap.call(e),sv=e=>ua(e).slice(8,-1),lp=e=>ua(e)==="[object Object]",Au=e=>dt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Cs=Cu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ca=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},av=/-(\w)/g,nn=ca(e=>e.replace(av,(t,n)=>n?n.toUpperCase():"")),lv=/\B([A-Z])/g,so=ca(e=>e.replace(lv,"-$1").toLowerCase()),da=ca(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ts=ca(e=>e?`on${da(e)}`:""),Sr=(e,t)=>!Object.is(e,t),Os=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Rl=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Vc;const up=()=>Vc||(Vc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qt(e){if(we(e)){const t={};for(let n=0;n{if(n){const r=n.split(cv);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if(dt(e))t=e;else if(we(e))for(let n=0;ndt(e)?e:e==null?"":we(e)||st(e)&&(e.toString===ap||!Se(e.toString))?JSON.stringify(e,dp,2):String(e),dp=(e,t)=>t&&t.__v_isRef?dp(e,t.value):Eo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[tl(r,i)+" =>"]=o,n),{})}:ip(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>tl(n))}:Lo(t)?tl(t):st(t)&&!we(t)&&!lp(t)?String(t):t,tl=(e,t="")=>{var n;return Lo(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function Cu(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const ot={},xo=[],tn=()=>{},ov=()=>!1,la=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Tu=e=>e.startsWith("onUpdate:"),St=Object.assign,Ou=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},iv=Object.prototype.hasOwnProperty,Le=(e,t)=>iv.call(e,t),we=Array.isArray,Eo=e=>ua(e)==="[object Map]",ip=e=>ua(e)==="[object Set]",Ee=e=>typeof e=="function",dt=e=>typeof e=="string",Lo=e=>typeof e=="symbol",st=e=>e!==null&&typeof e=="object",sp=e=>(st(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),ap=Object.prototype.toString,ua=e=>ap.call(e),sv=e=>ua(e).slice(8,-1),lp=e=>ua(e)==="[object Object]",Au=e=>dt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Cs=Cu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ca=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},av=/-(\w)/g,nn=ca(e=>e.replace(av,(t,n)=>n?n.toUpperCase():"")),lv=/\B([A-Z])/g,so=ca(e=>e.replace(lv,"-$1").toLowerCase()),da=ca(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ts=ca(e=>e?`on${da(e)}`:""),Sr=(e,t)=>!Object.is(e,t),Os=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Rl=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Vc;const up=()=>Vc||(Vc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qt(e){if(we(e)){const t={};for(let n=0;n{if(n){const r=n.split(cv);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if(dt(e))t=e;else if(we(e))for(let n=0;ndt(e)?e:e==null?"":we(e)||st(e)&&(e.toString===ap||!Ee(e.toString))?JSON.stringify(e,dp,2):String(e),dp=(e,t)=>t&&t.__v_isRef?dp(e,t.value):Eo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[tl(r,i)+" =>"]=o,n),{})}:ip(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>tl(n))}:Lo(t)?tl(t):st(t)&&!we(t)&&!lp(t)?String(t):t,tl=(e,t="")=>{var n;return Lo(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let jt;class fp{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=jt,!t&&jt&&(this.index=(jt.scopes||(jt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=jt;try{return jt=this,t()}finally{jt=n}}}on(){jt=this}off(){jt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),lo()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=_r,n=Kr;try{return _r=!0,Kr=this,this._runnings++,zc(this),this.fn()}finally{Hc(this),this._runnings--,Kr=n,_r=t}}stop(){var t;this.active&&(zc(this),Hc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function gv(e){return e.value}function zc(e){e._trackId++,e._depsLength=0}function Hc(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Fs=new WeakMap,qr=Symbol(""),Nl=Symbol("");function zt(e,t,n){if(_r&&Kr){let r=Fs.get(e);r||Fs.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=yp(()=>r.delete(n))),mp(Kr,o)}}function jn(e,t,n,r,o,i){const s=Fs.get(e);if(!s)return;let a=[];if(t==="clear")a=[...s.values()];else if(n==="length"&&we(e)){const l=Number(r);s.forEach((u,c)=>{(c==="length"||!Lo(c)&&c>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(s.get(n)),t){case"add":we(e)?Au(n)&&a.push(s.get("length")):(a.push(s.get(qr)),Eo(e)&&a.push(s.get(Nl)));break;case"delete":we(e)||(a.push(s.get(qr)),Eo(e)&&a.push(s.get(Nl)));break;case"set":Eo(e)&&a.push(s.get(qr));break}Pu();for(const l of a)l&&gp(l,2);Bu()}function vv(e,t){var n;return(n=Fs.get(e))==null?void 0:n.get(t)}const yv=Cu("__proto__,__v_isRef,__isVue"),bp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Lo)),jc=bv();function bv(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Fe(this);for(let i=0,s=this.length;i{e[t]=function(...n){ao(),Pu();const r=Fe(this)[t].apply(this,n);return Bu(),lo(),r}}),e}function wv(e){const t=Fe(this);return zt(t,"has",e),t.hasOwnProperty(e)}class wp{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,r){const o=this._isReadonly,i=this._shallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Tp:Cp:i?Sp:Ep).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=we(t);if(!o){if(s&&Le(jc,n))return Reflect.get(jc,n,r);if(n==="hasOwnProperty")return wv}const a=Reflect.get(t,n,r);return(Lo(n)?bp.has(n):yv(n))||(o||zt(t,"get",n),i)?a:at(a)?s&&Au(n)?a:a.value:st(a)?o?Ir(a):Tn(a):a}}class _p extends wp{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];if(!this._shallow){const l=Bo(i);if(!Ns(r)&&!Bo(r)&&(i=Fe(i),r=Fe(r)),!we(t)&&at(i)&&!at(r))return l?!1:(i.value=r,!0)}const s=we(t)&&Au(n)?Number(n)e,pa=e=>Reflect.getPrototypeOf(e);function Xi(e,t,n=!1,r=!1){e=e.__v_raw;const o=Fe(e),i=Fe(t);n||(Sr(t,i)&&zt(o,"get",t),zt(o,"get",i));const{has:s}=pa(o),a=r?$u:n?Mu:mi;if(s.call(o,t))return a(e.get(t));if(s.call(o,i))return a(e.get(i));e!==o&&e.get(t)}function Zi(e,t=!1){const n=this.__v_raw,r=Fe(n),o=Fe(e);return t||(Sr(e,o)&&zt(r,"has",e),zt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Qi(e,t=!1){return e=e.__v_raw,!t&&zt(Fe(e),"iterate",qr),Reflect.get(e,"size",e)}function Uc(e){e=Fe(e);const t=Fe(this);return pa(t).has.call(t,e)||(t.add(e),jn(t,"add",e,e)),this}function Wc(e,t){t=Fe(t);const n=Fe(this),{has:r,get:o}=pa(n);let i=r.call(n,e);i||(e=Fe(e),i=r.call(n,e));const s=o.call(n,e);return n.set(e,t),i?Sr(t,s)&&jn(n,"set",e,t):jn(n,"add",e,t),this}function Gc(e){const t=Fe(this),{has:n,get:r}=pa(t);let o=n.call(t,e);o||(e=Fe(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&jn(t,"delete",e,void 0),i}function Kc(){const e=Fe(this),t=e.size!==0,n=e.clear();return t&&jn(e,"clear",void 0,void 0),n}function Ji(e,t){return function(r,o){const i=this,s=i.__v_raw,a=Fe(s),l=t?$u:e?Mu:mi;return!e&&zt(a,"iterate",qr),s.forEach((u,c)=>r.call(o,l(u),l(c),i))}}function es(e,t,n){return function(...r){const o=this.__v_raw,i=Fe(o),s=Eo(i),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=o[e](...r),c=n?$u:t?Mu:mi;return!t&&zt(i,"iterate",l?Nl:qr),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}},[Symbol.iterator](){return this}}}}function ar(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Cv(){const e={get(i){return Xi(this,i)},get size(){return Qi(this)},has:Zi,add:Uc,set:Wc,delete:Gc,clear:Kc,forEach:Ji(!1,!1)},t={get(i){return Xi(this,i,!1,!0)},get size(){return Qi(this)},has:Zi,add:Uc,set:Wc,delete:Gc,clear:Kc,forEach:Ji(!1,!0)},n={get(i){return Xi(this,i,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:Ji(!0,!1)},r={get(i){return Xi(this,i,!0,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:Ji(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=es(i,!1,!1),n[i]=es(i,!0,!1),t[i]=es(i,!1,!0),r[i]=es(i,!0,!0)}),[e,n,t,r]}const[Tv,Ov,Av,Iv]=Cv();function ha(e,t){const n=t?e?Iv:Av:e?Ov:Tv;return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Le(n,o)&&o in r?n:r,o,i)}const kv={get:ha(!1,!1)},Pv={get:ha(!1,!0)},Bv={get:ha(!0,!1)},$v={get:ha(!0,!0)},Ep=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Tp=new WeakMap;function Mv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dv(e){return e.__v_skip||!Object.isExtensible(e)?0:Mv(sv(e))}function Tn(e){return Bo(e)?e:ma(e,!1,_v,kv,Ep)}function Rv(e){return ma(e,!1,Ev,Pv,Sp)}function Ir(e){return ma(e,!0,xv,Bv,Cp)}function po(e){return ma(e,!0,Sv,$v,Tp)}function ma(e,t,n,r,o){if(!st(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const s=Dv(e);if(s===0)return e;const a=new Proxy(e,s===2?r:n);return o.set(e,a),a}function xr(e){return Bo(e)?xr(e.__v_raw):!!(e&&e.__v_isReactive)}function Bo(e){return!!(e&&e.__v_isReadonly)}function Ns(e){return!!(e&&e.__v_isShallow)}function Op(e){return xr(e)||Bo(e)}function Fe(e){const t=e&&e.__v_raw;return t?Fe(t):e}function $o(e){return Ls(e,"__v_skip",!0),e}const mi=e=>st(e)?Tn(e):e,Mu=e=>st(e)?Ir(e):e;class Ap{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ku(()=>t(this._value),()=>ri(this,1),()=>this.dep&&vp(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=Fe(this);return(!t._cacheable||t.effect.dirty)&&Sr(t._value,t._value=t.effect.run())&&ri(t,2),Du(t),t.effect._dirtyLevel>=1&&ri(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Lv(e,t,n=!1){let r,o;const i=Se(e);return i?(r=e,o=tn):(r=e.get,o=e.set),new Ap(r,o,i||!o,n)}function Du(e){_r&&Kr&&(e=Fe(e),mp(Kr,e.dep||(e.dep=yp(()=>e.dep=void 0,e instanceof Ap?e:void 0))))}function ri(e,t=2,n){e=Fe(e);const r=e.dep;r&&gp(r,t)}function at(e){return!!(e&&e.__v_isRef===!0)}function U(e){return Ip(e,!1)}function ga(e){return Ip(e,!0)}function Ip(e,t){return at(e)?e:new Fv(e,t)}class Fv{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Fe(t),this._value=n?t:mi(t)}get value(){return Du(this),this._value}set value(t){const n=this.__v_isShallow||Ns(t)||Bo(t);t=n?t:Fe(t),Sr(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:mi(t),ri(this,2))}}function f(e){return at(e)?e.value:e}function De(e){return Se(e)?e():f(e)}const Nv={get:(e,t,n)=>f(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return at(o)&&!at(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function kp(e){return xr(e)?e:new Proxy(e,Nv)}class Vv{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Du(this),()=>ri(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function Pp(e){return new Vv(e)}function on(e){const t=we(e)?new Array(e.length):{};for(const n in e)t[n]=Bp(e,n);return t}class zv{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return vv(Fe(this._object),this._key)}}class Hv{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function vo(e,t,n){return at(e)?e:Se(e)?new Hv(e):st(e)&&arguments.length>1?Bp(e,t,n):U(e)}function Bp(e,t,n){const r=e[t];return at(r)?r:new zv(e,t,n)}/** +**/let jt;class fp{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=jt,!t&&jt&&(this.index=(jt.scopes||(jt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=jt;try{return jt=this,t()}finally{jt=n}}}on(){jt=this}off(){jt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),lo()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=_r,n=Kr;try{return _r=!0,Kr=this,this._runnings++,zc(this),this.fn()}finally{Hc(this),this._runnings--,Kr=n,_r=t}}stop(){var t;this.active&&(zc(this),Hc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function gv(e){return e.value}function zc(e){e._trackId++,e._depsLength=0}function Hc(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Fs=new WeakMap,qr=Symbol(""),Nl=Symbol("");function zt(e,t,n){if(_r&&Kr){let r=Fs.get(e);r||Fs.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=yp(()=>r.delete(n))),mp(Kr,o)}}function jn(e,t,n,r,o,i){const s=Fs.get(e);if(!s)return;let a=[];if(t==="clear")a=[...s.values()];else if(n==="length"&&we(e)){const l=Number(r);s.forEach((u,c)=>{(c==="length"||!Lo(c)&&c>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(s.get(n)),t){case"add":we(e)?Au(n)&&a.push(s.get("length")):(a.push(s.get(qr)),Eo(e)&&a.push(s.get(Nl)));break;case"delete":we(e)||(a.push(s.get(qr)),Eo(e)&&a.push(s.get(Nl)));break;case"set":Eo(e)&&a.push(s.get(qr));break}Pu();for(const l of a)l&&gp(l,2);Bu()}function vv(e,t){var n;return(n=Fs.get(e))==null?void 0:n.get(t)}const yv=Cu("__proto__,__v_isRef,__isVue"),bp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Lo)),jc=bv();function bv(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Fe(this);for(let i=0,s=this.length;i{e[t]=function(...n){ao(),Pu();const r=Fe(this)[t].apply(this,n);return Bu(),lo(),r}}),e}function wv(e){const t=Fe(this);return zt(t,"has",e),t.hasOwnProperty(e)}class wp{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,r){const o=this._isReadonly,i=this._shallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Tp:Cp:i?Sp:Ep).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=we(t);if(!o){if(s&&Le(jc,n))return Reflect.get(jc,n,r);if(n==="hasOwnProperty")return wv}const a=Reflect.get(t,n,r);return(Lo(n)?bp.has(n):yv(n))||(o||zt(t,"get",n),i)?a:at(a)?s&&Au(n)?a:a.value:st(a)?o?Ir(a):Tn(a):a}}class _p extends wp{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];if(!this._shallow){const l=Bo(i);if(!Ns(r)&&!Bo(r)&&(i=Fe(i),r=Fe(r)),!we(t)&&at(i)&&!at(r))return l?!1:(i.value=r,!0)}const s=we(t)&&Au(n)?Number(n)e,pa=e=>Reflect.getPrototypeOf(e);function Xi(e,t,n=!1,r=!1){e=e.__v_raw;const o=Fe(e),i=Fe(t);n||(Sr(t,i)&&zt(o,"get",t),zt(o,"get",i));const{has:s}=pa(o),a=r?$u:n?Mu:mi;if(s.call(o,t))return a(e.get(t));if(s.call(o,i))return a(e.get(i));e!==o&&e.get(t)}function Zi(e,t=!1){const n=this.__v_raw,r=Fe(n),o=Fe(e);return t||(Sr(e,o)&&zt(r,"has",e),zt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Qi(e,t=!1){return e=e.__v_raw,!t&&zt(Fe(e),"iterate",qr),Reflect.get(e,"size",e)}function Uc(e){e=Fe(e);const t=Fe(this);return pa(t).has.call(t,e)||(t.add(e),jn(t,"add",e,e)),this}function Wc(e,t){t=Fe(t);const n=Fe(this),{has:r,get:o}=pa(n);let i=r.call(n,e);i||(e=Fe(e),i=r.call(n,e));const s=o.call(n,e);return n.set(e,t),i?Sr(t,s)&&jn(n,"set",e,t):jn(n,"add",e,t),this}function Gc(e){const t=Fe(this),{has:n,get:r}=pa(t);let o=n.call(t,e);o||(e=Fe(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&jn(t,"delete",e,void 0),i}function Kc(){const e=Fe(this),t=e.size!==0,n=e.clear();return t&&jn(e,"clear",void 0,void 0),n}function Ji(e,t){return function(r,o){const i=this,s=i.__v_raw,a=Fe(s),l=t?$u:e?Mu:mi;return!e&&zt(a,"iterate",qr),s.forEach((u,c)=>r.call(o,l(u),l(c),i))}}function es(e,t,n){return function(...r){const o=this.__v_raw,i=Fe(o),s=Eo(i),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=o[e](...r),c=n?$u:t?Mu:mi;return!t&&zt(i,"iterate",l?Nl:qr),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}},[Symbol.iterator](){return this}}}}function ar(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Cv(){const e={get(i){return Xi(this,i)},get size(){return Qi(this)},has:Zi,add:Uc,set:Wc,delete:Gc,clear:Kc,forEach:Ji(!1,!1)},t={get(i){return Xi(this,i,!1,!0)},get size(){return Qi(this)},has:Zi,add:Uc,set:Wc,delete:Gc,clear:Kc,forEach:Ji(!1,!0)},n={get(i){return Xi(this,i,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:Ji(!0,!1)},r={get(i){return Xi(this,i,!0,!0)},get size(){return Qi(this,!0)},has(i){return Zi.call(this,i,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:Ji(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=es(i,!1,!1),n[i]=es(i,!0,!1),t[i]=es(i,!1,!0),r[i]=es(i,!0,!0)}),[e,n,t,r]}const[Tv,Ov,Av,Iv]=Cv();function ha(e,t){const n=t?e?Iv:Av:e?Ov:Tv;return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Le(n,o)&&o in r?n:r,o,i)}const kv={get:ha(!1,!1)},Pv={get:ha(!1,!0)},Bv={get:ha(!0,!1)},$v={get:ha(!0,!0)},Ep=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Tp=new WeakMap;function Mv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dv(e){return e.__v_skip||!Object.isExtensible(e)?0:Mv(sv(e))}function Tn(e){return Bo(e)?e:ma(e,!1,_v,kv,Ep)}function Rv(e){return ma(e,!1,Ev,Pv,Sp)}function Ir(e){return ma(e,!0,xv,Bv,Cp)}function po(e){return ma(e,!0,Sv,$v,Tp)}function ma(e,t,n,r,o){if(!st(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const s=Dv(e);if(s===0)return e;const a=new Proxy(e,s===2?r:n);return o.set(e,a),a}function xr(e){return Bo(e)?xr(e.__v_raw):!!(e&&e.__v_isReactive)}function Bo(e){return!!(e&&e.__v_isReadonly)}function Ns(e){return!!(e&&e.__v_isShallow)}function Op(e){return xr(e)||Bo(e)}function Fe(e){const t=e&&e.__v_raw;return t?Fe(t):e}function $o(e){return Ls(e,"__v_skip",!0),e}const mi=e=>st(e)?Tn(e):e,Mu=e=>st(e)?Ir(e):e;class Ap{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ku(()=>t(this._value),()=>ri(this,1),()=>this.dep&&vp(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=Fe(this);return(!t._cacheable||t.effect.dirty)&&Sr(t._value,t._value=t.effect.run())&&ri(t,2),Du(t),t.effect._dirtyLevel>=1&&ri(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Lv(e,t,n=!1){let r,o;const i=Ee(e);return i?(r=e,o=tn):(r=e.get,o=e.set),new Ap(r,o,i||!o,n)}function Du(e){_r&&Kr&&(e=Fe(e),mp(Kr,e.dep||(e.dep=yp(()=>e.dep=void 0,e instanceof Ap?e:void 0))))}function ri(e,t=2,n){e=Fe(e);const r=e.dep;r&&gp(r,t)}function at(e){return!!(e&&e.__v_isRef===!0)}function U(e){return Ip(e,!1)}function ga(e){return Ip(e,!0)}function Ip(e,t){return at(e)?e:new Fv(e,t)}class Fv{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Fe(t),this._value=n?t:mi(t)}get value(){return Du(this),this._value}set value(t){const n=this.__v_isShallow||Ns(t)||Bo(t);t=n?t:Fe(t),Sr(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:mi(t),ri(this,2))}}function f(e){return at(e)?e.value:e}function De(e){return Ee(e)?e():f(e)}const Nv={get:(e,t,n)=>f(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return at(o)&&!at(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function kp(e){return xr(e)?e:new Proxy(e,Nv)}class Vv{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Du(this),()=>ri(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function Pp(e){return new Vv(e)}function on(e){const t=we(e)?new Array(e.length):{};for(const n in e)t[n]=Bp(e,n);return t}class zv{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return vv(Fe(this._object),this._key)}}class Hv{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function vo(e,t,n){return at(e)?e:Ee(e)?new Hv(e):st(e)&&arguments.length>1?Bp(e,t,n):U(e)}function Bp(e,t,n){const r=e[t];return at(r)?r:new zv(e,t,n)}/** * @vue/runtime-core v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Er(e,t,n,r){let o;try{o=r?e(...r):e()}catch(i){va(i,t,n)}return o}function gn(e,t,n,r){if(Se(e)){const i=Er(e,t,n,r);return i&&sp(i)&&i.catch(s=>{va(s,t,n)}),i}const o=[];for(let i=0;i>>1,o=kt[r],i=vi(o);iEn&&kt.splice(t,1)}function Gv(e){we(e)?So.push(...e):(!yr||!yr.includes(e,e.allowRecurse?zr+1:zr))&&So.push(e),Mp()}function qc(e,t,n=gi?En+1:0){for(;nvi(n)-vi(r));if(So.length=0,yr){yr.push(...t);return}for(yr=t,zr=0;zre.id==null?1/0:e.id,Kv=(e,t)=>{const n=vi(e)-vi(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Rp(e){Vl=!1,gi=!0,kt.sort(Kv);try{for(En=0;Endt(h)?h.trim():h)),d&&(o=n.map(Rl))}let a,l=r[a=Ts(t)]||r[a=Ts(nn(t))];!l&&i&&(l=r[a=Ts(so(t))]),l&&gn(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,gn(u,e,6,o)}}function Lp(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let s={},a=!1;if(!Se(e)){const l=u=>{const c=Lp(u,t,!0);c&&(a=!0,St(s,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(st(e)&&r.set(e,null),null):(we(i)?i.forEach(l=>s[l]=null):St(s,i),st(e)&&r.set(e,s),s)}function ya(e,t){return!e||!la(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,so(t))||Le(e,t))}let mt=null,Fp=null;function Vs(e){const t=mt;return mt=e,Fp=e&&e.type.__scopeId||null,t}function B(e,t=mt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&sd(-1);const i=Vs(t);let s;try{s=e(...o)}finally{Vs(i),r._d&&sd(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function nl(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[s],slots:a,attrs:l,emit:u,render:c,renderCache:d,data:p,setupState:h,ctx:v,inheritAttrs:b}=e;let w,S;const _=Vs(e);try{if(n.shapeFlag&4){const F=o||r,V=F;w=xn(c.call(V,F,d,i,h,p,v)),S=l}else{const F=t;w=xn(F.length>1?F(i,{attrs:l,slots:a,emit:u}):F(i,null)),S=t.props?l:Yv(l)}}catch(F){ai.length=0,va(F,e,1),w=q(Cr)}let I=w;if(S&&b!==!1){const F=Object.keys(S),{shapeFlag:V}=I;F.length&&V&7&&(s&&F.some(Tu)&&(S=Xv(S,s)),I=Jr(I,S))}return n.dirs&&(I=Jr(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(I.transition=n.transition),w=I,Vs(_),w}const Yv=e=>{let t;for(const n in e)(n==="class"||n==="style"||la(n))&&((t||(t={}))[n]=e[n]);return t},Xv=(e,t)=>{const n={};for(const r in e)(!Tu(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Zv(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Yc(r,s,u):!!s;if(l&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function t0(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):Gv(e)}const n0=Symbol.for("v-scx"),r0=()=>Wt(n0);function vt(e,t){return Fu(e,null,t)}const ts={};function ye(e,t,n){return Fu(e,t,n)}function Fu(e,t,{immediate:n,deep:r,flush:o,once:i,onTrack:s,onTrigger:a}=ot){if(t&&i){const N=t;t=(...H)=>{N(...H),V()}}const l=_t,u=N=>r===!0?N:jr(N,r===!1?1:void 0);let c,d=!1,p=!1;if(at(e)?(c=()=>e.value,d=Ns(e)):xr(e)?(c=()=>u(e),d=!0):we(e)?(p=!0,d=e.some(N=>xr(N)||Ns(N)),c=()=>e.map(N=>{if(at(N))return N.value;if(xr(N))return u(N);if(Se(N))return Er(N,l,2)})):Se(e)?t?c=()=>Er(e,l,2):c=()=>(h&&h(),gn(e,l,3,[v])):c=tn,t&&r){const N=c;c=()=>jr(N())}let h,v=N=>{h=I.onStop=()=>{Er(N,l,4),h=I.onStop=void 0}},b;if(Sa)if(v=tn,t?n&&gn(t,l,3,[c(),p?[]:void 0,v]):c(),o==="sync"){const N=r0();b=N.__watcherHandles||(N.__watcherHandles=[])}else return tn;let w=p?new Array(e.length).fill(ts):ts;const S=()=>{if(!(!I.active||!I.dirty))if(t){const N=I.run();(r||d||(p?N.some((H,m)=>Sr(H,w[m])):Sr(N,w)))&&(h&&h(),gn(t,l,3,[N,w===ts?void 0:p&&w[0]===ts?[]:w,v]),w=N)}else I.run()};S.allowRecurse=!!t;let _;o==="sync"?_=S:o==="post"?_=()=>Nt(S,l&&l.suspense):(S.pre=!0,l&&(S.id=l.uid),_=()=>Lu(S));const I=new ku(c,tn,_),F=Wi(),V=()=>{I.stop(),F&&Ou(F.effects,I)};return t?n?S():w=I.run():o==="post"?Nt(I.run.bind(I),l&&l.suspense):I.run(),b&&b.push(V),V}function o0(e,t,n){const r=this.proxy,o=dt(e)?e.includes(".")?zp(r,e):()=>r[e]:e.bind(r,r);let i;Se(t)?i=t:(i=t.handler,n=t);const s=Gi(this),a=Fu(o,i.bind(r),n);return s(),a}function zp(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),at(e))jr(e.value,t,n,r);else if(we(e))for(let o=0;o{jr(o,t,n,r)});else if(lp(e))for(const o in e)jr(e[o],t,n,r);return e}function ba(e,t){if(mt===null)return e;const n=Ca(mt)||mt.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;oSt({name:e.name},t,{setup:e}))():e}const oi=e=>!!e.type.__asyncLoader,Hp=e=>e.type.__isKeepAlive;function i0(e,t){jp(e,"a",t)}function s0(e,t){jp(e,"da",t)}function jp(e,t,n=_t){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(wa(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Hp(o.parent.vnode)&&a0(r,t,n,o),o=o.parent}}function a0(e,t,n,r){const o=wa(t,e,r,!0);Bn(()=>{Ou(r[t],o)},n)}function wa(e,t,n=_t,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;ao();const a=Gi(n),l=gn(t,n,e,s);return a(),lo(),l});return r?o.unshift(i):o.push(i),i}}const Jn=e=>(t,n=_t)=>(!Sa||e==="sp")&&wa(e,(...r)=>t(...r),n),l0=Jn("bm"),Ue=Jn("m"),Up=Jn("bu"),Wp=Jn("u"),_a=Jn("bum"),Bn=Jn("um"),u0=Jn("sp"),c0=Jn("rtg"),d0=Jn("rtc");function f0(e,t=_t){wa("ec",e,t)}function Qr(e,t,n,r){let o;const i=n&&n[r];if(we(e)||dt(e)){o=new Array(e.length);for(let s=0,a=e.length;st(s,a,void 0,i&&i[a]));else{const s=Object.keys(e);o=new Array(s.length);for(let a=0,l=s.length;awi(t)?!(t.type===Cr||t.type===qe&&!Gp(t.children)):!0)?e:null}const zl=e=>e?ah(e)?Ca(e)||e.proxy:zl(e.parent):null,ii=St(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zl(e.parent),$root:e=>zl(e.root),$emit:e=>e.emit,$options:e=>Nu(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Lu(e.update)}),$nextTick:e=>e.n||(e.n=Ke.bind(e.proxy)),$watch:e=>o0.bind(e)}),rl=(e,t)=>e!==ot&&!e.__isScriptSetup&&Le(e,t),p0={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(rl(r,t))return s[t]=1,r[t];if(o!==ot&&Le(o,t))return s[t]=2,o[t];if((u=e.propsOptions[0])&&Le(u,t))return s[t]=3,i[t];if(n!==ot&&Le(n,t))return s[t]=4,n[t];jl&&(s[t]=0)}}const c=ii[t];let d,p;if(c)return t==="$attrs"&&zt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==ot&&Le(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,Le(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return rl(o,t)?(o[t]=n,!0):r!==ot&&Le(r,t)?(r[t]=n,!0):Le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},s){let a;return!!n[s]||e!==ot&&Le(e,s)||rl(t,s)||(a=i[0])&&Le(a,s)||Le(r,s)||Le(ii,s)||Le(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function h0(){return qp().slots}function Kp(){return qp().attrs}function qp(){const e=Rt();return e.setupContext||(e.setupContext=uh(e))}function Hl(e){return we(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function m0(e,t){const n=Hl(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?we(o)||Se(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n}let jl=!0;function g0(e){const t=Nu(e),n=e.proxy,r=e.ctx;jl=!1,t.beforeCreate&&Zc(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:v,activated:b,deactivated:w,beforeDestroy:S,beforeUnmount:_,destroyed:I,unmounted:F,render:V,renderTracked:N,renderTriggered:H,errorCaptured:m,serverPrefetch:g,expose:y,inheritAttrs:A,components:x,directives:C,filters:k}=t;if(u&&v0(u,r,null),s)for(const M in s){const $=s[M];Se($)&&(r[M]=$.bind(n))}if(o){const M=o.call(n,n);st(M)&&(e.data=Tn(M))}if(jl=!0,i)for(const M in i){const $=i[M],G=Se($)?$.bind(n,n):Se($.get)?$.get.bind(n,n):tn,de=!Se($)&&Se($.set)?$.set.bind(n):tn,ue=K({get:G,set:de});Object.defineProperty(r,M,{enumerable:!0,configurable:!0,get:()=>ue.value,set:ge=>ue.value=ge})}if(a)for(const M in a)Yp(a[M],r,n,M);if(l){const M=Se(l)?l.call(n):l;Reflect.ownKeys(M).forEach($=>{Fo($,M[$])})}c&&Zc(c,e,"c");function E(M,$){we($)?$.forEach(G=>M(G.bind(n))):$&&M($.bind(n))}if(E(l0,d),E(Ue,p),E(Up,h),E(Wp,v),E(i0,b),E(s0,w),E(f0,m),E(d0,N),E(c0,H),E(_a,_),E(Bn,F),E(u0,g),we(y))if(y.length){const M=e.exposed||(e.exposed={});y.forEach($=>{Object.defineProperty(M,$,{get:()=>n[$],set:G=>n[$]=G})})}else e.exposed||(e.exposed={});V&&e.render===tn&&(e.render=V),A!=null&&(e.inheritAttrs=A),x&&(e.components=x),C&&(e.directives=C)}function v0(e,t,n=tn){we(e)&&(e=Ul(e));for(const r in e){const o=e[r];let i;st(o)?"default"in o?i=Wt(o.from||r,o.default,!0):i=Wt(o.from||r):i=Wt(o),at(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[r]=i}}function Zc(e,t,n){gn(we(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Yp(e,t,n,r){const o=r.includes(".")?zp(n,r):()=>n[r];if(dt(e)){const i=t[e];Se(i)&&ye(o,i)}else if(Se(e))ye(o,e.bind(n));else if(st(e))if(we(e))e.forEach(i=>Yp(i,t,n,r));else{const i=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(i)&&ye(o,i,e)}}function Nu(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>zs(l,u,s,!0)),zs(l,t,s)),st(t)&&i.set(t,l),l}function zs(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&zs(e,i,n,!0),o&&o.forEach(s=>zs(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const a=y0[s]||n&&n[s];e[s]=a?a(e[s],t[s]):t[s]}return e}const y0={data:Qc,props:Jc,emits:Jc,methods:Jo,computed:Jo,beforeCreate:Bt,created:Bt,beforeMount:Bt,mounted:Bt,beforeUpdate:Bt,updated:Bt,beforeDestroy:Bt,beforeUnmount:Bt,destroyed:Bt,unmounted:Bt,activated:Bt,deactivated:Bt,errorCaptured:Bt,serverPrefetch:Bt,components:Jo,directives:Jo,watch:w0,provide:Qc,inject:b0};function Qc(e,t){return t?e?function(){return St(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function b0(e,t){return Jo(Ul(e),Ul(t))}function Ul(e){if(we(e)){const t={};for(let n=0;n1)return n&&Se(t)?t.call(r&&r.proxy):t}}function E0(){return!!(_t||mt||yi)}function S0(e,t,n,r=!1){const o={},i={};Ls(i,Ea,1),e.propsDefaults=Object.create(null),Zp(e,t,o,i);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:Rv(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function C0(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=Fe(o),[l]=e.propsOptions;let u=!1;if((r||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d{l=!0;const[p,h]=Qp(d,t,!0);St(s,p),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return st(e)&&r.set(e,xo),xo;if(we(i))for(let c=0;c-1,h[1]=b<0||v-1||Le(h,"default"))&&a.push(d)}}}const u=[s,a];return st(e)&&r.set(e,u),u}function ed(e){return e[0]!=="$"}function td(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function nd(e,t){return td(e)===td(t)}function rd(e,t){return we(t)?t.findIndex(n=>nd(n,e)):Se(t)&&nd(t,e)?0:-1}const Jp=e=>e[0]==="_"||e==="$stable",Vu=e=>we(e)?e.map(xn):[xn(e)],T0=(e,t,n)=>{if(t._n)return t;const r=B((...o)=>Vu(t(...o)),n);return r._c=!1,r},eh=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Jp(o))continue;const i=e[o];if(Se(i))t[o]=T0(o,i,r);else if(i!=null){const s=Vu(i);t[o]=()=>s}}},th=(e,t)=>{const n=Vu(t);e.slots.default=()=>n},O0=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Fe(t),Ls(t,"_",n)):eh(t,e.slots={})}else e.slots={},t&&th(e,t);Ls(e.slots,Ea,1)},A0=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=ot;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:(St(o,t),!n&&a===1&&delete o._):(i=!t.$stable,eh(t,o)),s=t}else t&&(th(e,t),s={default:1});if(i)for(const a in o)!Jp(a)&&s[a]==null&&delete o[a]};function Gl(e,t,n,r,o=!1){if(we(e)){e.forEach((p,h)=>Gl(p,t&&(we(t)?t[h]:t),n,r,o));return}if(oi(r)&&!o)return;const i=r.shapeFlag&4?Ca(r.component)||r.component.proxy:r.el,s=o?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===ot?a.refs={}:a.refs,d=a.setupState;if(u!=null&&u!==l&&(dt(u)?(c[u]=null,Le(d,u)&&(d[u]=null)):at(u)&&(u.value=null)),Se(l))Er(l,a,12,[s,c]);else{const p=dt(l),h=at(l),v=e.f;if(p||h){const b=()=>{if(v){const w=p?Le(d,l)?d[l]:c[l]:l.value;o?we(w)&&Ou(w,i):we(w)?w.includes(i)||w.push(i):p?(c[l]=[i],Le(d,l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else p?(c[l]=s,Le(d,l)&&(d[l]=s)):h&&(l.value=s,e.k&&(c[e.k]=s))};o||v?b():(b.id=-1,Nt(b,n))}}}const Nt=t0;function I0(e){return k0(e)}function k0(e,t){const n=up();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:s,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=tn,insertStaticContent:v}=e,b=(T,P,z,Z=null,Q=null,te=null,re=void 0,ne=null,oe=!!P.dynamicChildren)=>{if(T===P)return;T&&!Ko(T,P)&&(Z=ve(T),ge(T,Q,te,!0),T=null),P.patchFlag===-2&&(oe=!1,P.dynamicChildren=null);const{type:J,ref:fe,shapeFlag:me}=P;switch(J){case xa:w(T,P,z,Z);break;case Cr:S(T,P,z,Z);break;case il:T==null&&_(P,z,Z,re);break;case qe:x(T,P,z,Z,Q,te,re,ne,oe);break;default:me&1?V(T,P,z,Z,Q,te,re,ne,oe):me&6?C(T,P,z,Z,Q,te,re,ne,oe):(me&64||me&128)&&J.process(T,P,z,Z,Q,te,re,ne,oe,ht)}fe!=null&&Q&&Gl(fe,T&&T.ref,te,P||T,!P)},w=(T,P,z,Z)=>{if(T==null)r(P.el=a(P.children),z,Z);else{const Q=P.el=T.el;P.children!==T.children&&u(Q,P.children)}},S=(T,P,z,Z)=>{T==null?r(P.el=l(P.children||""),z,Z):P.el=T.el},_=(T,P,z,Z)=>{[T.el,T.anchor]=v(T.children,P,z,Z,T.el,T.anchor)},I=({el:T,anchor:P},z,Z)=>{let Q;for(;T&&T!==P;)Q=p(T),r(T,z,Z),T=Q;r(P,z,Z)},F=({el:T,anchor:P})=>{let z;for(;T&&T!==P;)z=p(T),o(T),T=z;o(P)},V=(T,P,z,Z,Q,te,re,ne,oe)=>{P.type==="svg"?re="svg":P.type==="math"&&(re="mathml"),T==null?N(P,z,Z,Q,te,re,ne,oe):g(T,P,Q,te,re,ne,oe)},N=(T,P,z,Z,Q,te,re,ne)=>{let oe,J;const{props:fe,shapeFlag:me,transition:pe,dirs:_e}=T;if(oe=T.el=s(T.type,te,fe&&fe.is,fe),me&8?c(oe,T.children):me&16&&m(T.children,oe,null,Z,Q,ol(T,te),re,ne),_e&&Dr(T,null,Z,"created"),H(oe,T,T.scopeId,re,Z),fe){for(const He in fe)He!=="value"&&!Cs(He)&&i(oe,He,null,fe[He],te,T.children,Z,Q,ie);"value"in fe&&i(oe,"value",null,fe.value,te),(J=fe.onVnodeBeforeMount)&&yn(J,Z,T)}_e&&Dr(T,null,Z,"beforeMount");const ke=P0(Q,pe);ke&&pe.beforeEnter(oe),r(oe,P,z),((J=fe&&fe.onVnodeMounted)||ke||_e)&&Nt(()=>{J&&yn(J,Z,T),ke&&pe.enter(oe),_e&&Dr(T,null,Z,"mounted")},Q)},H=(T,P,z,Z,Q)=>{if(z&&h(T,z),Z)for(let te=0;te{for(let J=oe;J{const ne=P.el=T.el;let{patchFlag:oe,dynamicChildren:J,dirs:fe}=P;oe|=T.patchFlag&16;const me=T.props||ot,pe=P.props||ot;let _e;if(z&&Rr(z,!1),(_e=pe.onVnodeBeforeUpdate)&&yn(_e,z,P,T),fe&&Dr(P,T,z,"beforeUpdate"),z&&Rr(z,!0),J?y(T.dynamicChildren,J,ne,z,Z,ol(P,Q),te):re||$(T,P,ne,null,z,Z,ol(P,Q),te,!1),oe>0){if(oe&16)A(ne,P,me,pe,z,Z,Q);else if(oe&2&&me.class!==pe.class&&i(ne,"class",null,pe.class,Q),oe&4&&i(ne,"style",me.style,pe.style,Q),oe&8){const ke=P.dynamicProps;for(let He=0;He{_e&&yn(_e,z,P,T),fe&&Dr(P,T,z,"updated")},Z)},y=(T,P,z,Z,Q,te,re)=>{for(let ne=0;ne{if(z!==Z){if(z!==ot)for(const ne in z)!Cs(ne)&&!(ne in Z)&&i(T,ne,z[ne],null,re,P.children,Q,te,ie);for(const ne in Z){if(Cs(ne))continue;const oe=Z[ne],J=z[ne];oe!==J&&ne!=="value"&&i(T,ne,J,oe,re,P.children,Q,te,ie)}"value"in Z&&i(T,"value",z.value,Z.value,re)}},x=(T,P,z,Z,Q,te,re,ne,oe)=>{const J=P.el=T?T.el:a(""),fe=P.anchor=T?T.anchor:a("");let{patchFlag:me,dynamicChildren:pe,slotScopeIds:_e}=P;_e&&(ne=ne?ne.concat(_e):_e),T==null?(r(J,z,Z),r(fe,z,Z),m(P.children||[],z,fe,Q,te,re,ne,oe)):me>0&&me&64&&pe&&T.dynamicChildren?(y(T.dynamicChildren,pe,z,Q,te,re,ne),(P.key!=null||Q&&P===Q.subTree)&&zu(T,P,!0)):$(T,P,z,fe,Q,te,re,ne,oe)},C=(T,P,z,Z,Q,te,re,ne,oe)=>{P.slotScopeIds=ne,T==null?P.shapeFlag&512?Q.ctx.activate(P,z,Z,re,oe):k(P,z,Z,Q,te,re,oe):O(T,P,oe)},k=(T,P,z,Z,Q,te,re)=>{const ne=T.component=V0(T,Z,Q);if(Hp(T)&&(ne.ctx.renderer=ht),z0(ne),ne.asyncDep){if(Q&&Q.registerDep(ne,E),!T.el){const oe=ne.subTree=q(Cr);S(null,oe,P,z)}}else E(ne,T,P,z,Q,te,re)},O=(T,P,z)=>{const Z=P.component=T.component;if(Zv(T,P,z))if(Z.asyncDep&&!Z.asyncResolved){M(Z,P,z);return}else Z.next=P,Wv(Z.update),Z.effect.dirty=!0,Z.update();else P.el=T.el,Z.vnode=P},E=(T,P,z,Z,Q,te,re)=>{const ne=()=>{if(T.isMounted){let{next:fe,bu:me,u:pe,parent:_e,vnode:ke}=T;{const se=nh(T);if(se){fe&&(fe.el=ke.el,M(T,fe,re)),se.asyncDep.then(()=>{T.isUnmounted||ne()});return}}let He=fe,R;Rr(T,!1),fe?(fe.el=ke.el,M(T,fe,re)):fe=ke,me&&Os(me),(R=fe.props&&fe.props.onVnodeBeforeUpdate)&&yn(R,_e,fe,ke),Rr(T,!0);const L=nl(T),Y=T.subTree;T.subTree=L,b(Y,L,d(Y.el),ve(Y),T,Q,te),fe.el=L.el,He===null&&Qv(T,L.el),pe&&Nt(pe,Q),(R=fe.props&&fe.props.onVnodeUpdated)&&Nt(()=>yn(R,_e,fe,ke),Q)}else{let fe;const{el:me,props:pe}=P,{bm:_e,m:ke,parent:He}=T,R=oi(P);if(Rr(T,!1),_e&&Os(_e),!R&&(fe=pe&&pe.onVnodeBeforeMount)&&yn(fe,He,P),Rr(T,!0),me&&ln){const L=()=>{T.subTree=nl(T),ln(me,T.subTree,T,Q,null)};R?P.type.__asyncLoader().then(()=>!T.isUnmounted&&L()):L()}else{const L=T.subTree=nl(T);b(null,L,z,Z,T,Q,te),P.el=L.el}if(ke&&Nt(ke,Q),!R&&(fe=pe&&pe.onVnodeMounted)){const L=P;Nt(()=>yn(fe,He,L),Q)}(P.shapeFlag&256||He&&oi(He.vnode)&&He.vnode.shapeFlag&256)&&T.a&&Nt(T.a,Q),T.isMounted=!0,P=z=Z=null}},oe=T.effect=new ku(ne,tn,()=>Lu(J),T.scope),J=T.update=()=>{oe.dirty&&oe.run()};J.id=T.uid,Rr(T,!0),J()},M=(T,P,z)=>{P.component=T;const Z=T.vnode.props;T.vnode=P,T.next=null,C0(T,P.props,Z,z),A0(T,P.children,z),ao(),qc(T),lo()},$=(T,P,z,Z,Q,te,re,ne,oe=!1)=>{const J=T&&T.children,fe=T?T.shapeFlag:0,me=P.children,{patchFlag:pe,shapeFlag:_e}=P;if(pe>0){if(pe&128){de(J,me,z,Z,Q,te,re,ne,oe);return}else if(pe&256){G(J,me,z,Z,Q,te,re,ne,oe);return}}_e&8?(fe&16&&ie(J,Q,te),me!==J&&c(z,me)):fe&16?_e&16?de(J,me,z,Z,Q,te,re,ne,oe):ie(J,Q,te,!0):(fe&8&&c(z,""),_e&16&&m(me,z,Z,Q,te,re,ne,oe))},G=(T,P,z,Z,Q,te,re,ne,oe)=>{T=T||xo,P=P||xo;const J=T.length,fe=P.length,me=Math.min(J,fe);let pe;for(pe=0;pefe?ie(T,Q,te,!0,!1,me):m(P,z,Z,Q,te,re,ne,oe,me)},de=(T,P,z,Z,Q,te,re,ne,oe)=>{let J=0;const fe=P.length;let me=T.length-1,pe=fe-1;for(;J<=me&&J<=pe;){const _e=T[J],ke=P[J]=oe?br(P[J]):xn(P[J]);if(Ko(_e,ke))b(_e,ke,z,null,Q,te,re,ne,oe);else break;J++}for(;J<=me&&J<=pe;){const _e=T[me],ke=P[pe]=oe?br(P[pe]):xn(P[pe]);if(Ko(_e,ke))b(_e,ke,z,null,Q,te,re,ne,oe);else break;me--,pe--}if(J>me){if(J<=pe){const _e=pe+1,ke=_epe)for(;J<=me;)ge(T[J],Q,te,!0),J++;else{const _e=J,ke=J,He=new Map;for(J=ke;J<=pe;J++){const Me=P[J]=oe?br(P[J]):xn(P[J]);Me.key!=null&&He.set(Me.key,J)}let R,L=0;const Y=pe-ke+1;let se=!1,xe=0;const he=new Array(Y);for(J=0;J=Y){ge(Me,Q,te,!0);continue}let Ve;if(Me.key!=null)Ve=He.get(Me.key);else for(R=ke;R<=pe;R++)if(he[R-ke]===0&&Ko(Me,P[R])){Ve=R;break}Ve===void 0?ge(Me,Q,te,!0):(he[Ve-ke]=J+1,Ve>=xe?xe=Ve:se=!0,b(Me,P[Ve],z,null,Q,te,re,ne,oe),L++)}const Ne=se?B0(he):xo;for(R=Ne.length-1,J=Y-1;J>=0;J--){const Me=ke+J,Ve=P[Me],bt=Me+1{const{el:te,type:re,transition:ne,children:oe,shapeFlag:J}=T;if(J&6){ue(T.component.subTree,P,z,Z);return}if(J&128){T.suspense.move(P,z,Z);return}if(J&64){re.move(T,P,z,ht);return}if(re===qe){r(te,P,z);for(let me=0;mene.enter(te),Q);else{const{leave:me,delayLeave:pe,afterLeave:_e}=ne,ke=()=>r(te,P,z),He=()=>{me(te,()=>{ke(),_e&&_e()})};pe?pe(te,ke,He):He()}else r(te,P,z)},ge=(T,P,z,Z=!1,Q=!1)=>{const{type:te,props:re,ref:ne,children:oe,dynamicChildren:J,shapeFlag:fe,patchFlag:me,dirs:pe}=T;if(ne!=null&&Gl(ne,null,z,T,!0),fe&256){P.ctx.deactivate(T);return}const _e=fe&1&&pe,ke=!oi(T);let He;if(ke&&(He=re&&re.onVnodeBeforeUnmount)&&yn(He,P,T),fe&6)ee(T.component,z,Z);else{if(fe&128){T.suspense.unmount(z,Z);return}_e&&Dr(T,null,P,"beforeUnmount"),fe&64?T.type.remove(T,P,z,Q,ht,Z):J&&(te!==qe||me>0&&me&64)?ie(J,P,z,!1,!0):(te===qe&&me&384||!Q&&fe&16)&&ie(oe,P,z),Z&&Oe(T)}(ke&&(He=re&&re.onVnodeUnmounted)||_e)&&Nt(()=>{He&&yn(He,P,T),_e&&Dr(T,null,P,"unmounted")},z)},Oe=T=>{const{type:P,el:z,anchor:Z,transition:Q}=T;if(P===qe){Je(z,Z);return}if(P===il){F(T);return}const te=()=>{o(z),Q&&!Q.persisted&&Q.afterLeave&&Q.afterLeave()};if(T.shapeFlag&1&&Q&&!Q.persisted){const{leave:re,delayLeave:ne}=Q,oe=()=>re(z,te);ne?ne(T.el,te,oe):oe()}else te()},Je=(T,P)=>{let z;for(;T!==P;)z=p(T),o(T),T=z;o(P)},ee=(T,P,z)=>{const{bum:Z,scope:Q,update:te,subTree:re,um:ne}=T;Z&&Os(Z),Q.stop(),te&&(te.active=!1,ge(re,T,P,z)),ne&&Nt(ne,P),Nt(()=>{T.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},ie=(T,P,z,Z=!1,Q=!1,te=0)=>{for(let re=te;reT.shapeFlag&6?ve(T.component.subTree):T.shapeFlag&128?T.suspense.next():p(T.anchor||T.el);let Pe=!1;const Ot=(T,P,z)=>{T==null?P._vnode&&ge(P._vnode,null,null,!0):b(P._vnode||null,T,P,null,null,null,z),Pe||(Pe=!0,qc(),Dp(),Pe=!1),P._vnode=T},ht={p:b,um:ge,m:ue,r:Oe,mt:k,mc:m,pc:$,pbc:y,n:ve,o:e};let Ge,ln;return t&&([Ge,ln]=t(ht)),{render:Ot,hydrate:Ge,createApp:x0(Ot,Ge)}}function ol({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Rr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function P0(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function zu(e,t,n=!1){const r=e.children,o=t.children;if(we(r)&&we(o))for(let i=0;i>1,e[n[a]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}function nh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:nh(t)}const $0=e=>e.__isTeleport,si=e=>e&&(e.disabled||e.disabled===""),od=e=>typeof SVGElement<"u"&&e instanceof SVGElement,id=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Kl=(e,t)=>{const n=e&&e.to;return dt(n)?t?t(n):null:n},M0={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,s,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:v,createText:b,createComment:w}}=u,S=si(t.props);let{shapeFlag:_,children:I,dynamicChildren:F}=t;if(e==null){const V=t.el=b(""),N=t.anchor=b("");h(V,n,r),h(N,n,r);const H=t.target=Kl(t.props,v),m=t.targetAnchor=b("");H&&(h(m,H),s==="svg"||od(H)?s="svg":(s==="mathml"||id(H))&&(s="mathml"));const g=(y,A)=>{_&16&&c(I,y,A,o,i,s,a,l)};S?g(n,N):H&&g(H,m)}else{t.el=e.el;const V=t.anchor=e.anchor,N=t.target=e.target,H=t.targetAnchor=e.targetAnchor,m=si(e.props),g=m?n:N,y=m?V:H;if(s==="svg"||od(N)?s="svg":(s==="mathml"||id(N))&&(s="mathml"),F?(p(e.dynamicChildren,F,g,o,i,s,a),zu(e,t,!0)):l||d(e,t,g,y,o,i,s,a,!1),S)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ns(t,n,V,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Kl(t.props,v);A&&ns(t,A,null,u,0)}else m&&ns(t,N,H,u,1)}oh(t)},remove(e,t,n,r,{um:o,o:{remove:i}},s){const{shapeFlag:a,children:l,anchor:u,targetAnchor:c,target:d,props:p}=e;if(d&&i(c),s&&i(u),a&16){const h=s||!si(p);for(let v=0;v0?hn||xo:null,R0(),bi>0&&hn&&hn.push(e),e}function Te(e,t,n,r,o,i){return ih(Ee(e,t,n,r,o,i,!0))}function j(e,t,n,r,o){return ih(q(e,t,n,r,o,!0))}function wi(e){return e?e.__v_isVNode===!0:!1}function Ko(e,t){return e.type===t.type&&e.key===t.key}const Ea="__vInternal",sh=({key:e})=>e??null,As=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?dt(e)||at(e)||Se(e)?{i:mt,r:e,k:t,f:!!n}:e:null);function Ee(e,t=null,n=null,r=0,o=null,i=e===qe?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&sh(t),ref:t&&As(t),scopeId:Fp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:mt};return a?(Hu(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=dt(n)?8:16),bi>0&&!s&&hn&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&hn.push(l),l}const q=L0;function L0(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===Vp)&&(e=Cr),wi(e)){const a=Jr(e,t,!0);return n&&Hu(a,n),bi>0&&!i&&hn&&(a.shapeFlag&6?hn[hn.indexOf(e)]=a:hn.push(a)),a.patchFlag|=-2,a}if(W0(e)&&(e=e.__vccOpts),t){t=Ct(t);let{class:a,style:l}=t;a&&!dt(a)&&(t.class=lt(a)),st(l)&&(Op(l)&&!we(l)&&(l=St({},l)),t.style=qt(l))}const s=dt(e)?1:e0(e)?128:$0(e)?64:st(e)?4:Se(e)?2:0;return Ee(e,t,n,r,o,s,i,!0)}function Ct(e){return e?Op(e)||Ea in e?St({},e):e:null}function Jr(e,t,n=!1){const{props:r,ref:o,patchFlag:i,children:s}=e,a=t?ce(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&sh(a),ref:t&&t.ref?n&&o?we(o)?o.concat(As(t)):[o,As(t)]:As(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Jr(e.ssContent),ssFallback:e.ssFallback&&Jr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Re(e=" ",t=0){return q(xa,null,e,t)}function pt(e="",t=!1){return t?(D(),j(Cr,null,e)):q(Cr,null,e)}function xn(e){return e==null||typeof e=="boolean"?q(Cr):we(e)?q(qe,null,e.slice()):typeof e=="object"?br(e):q(xa,null,String(e))}function br(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Jr(e)}function Hu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(we(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Hu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(Ea in t)?t._ctx=mt:o===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:mt},n=32):(t=String(t),r&64?(n=16,t=[Re(t)]):n=8);e.children=t,e.shapeFlag|=n}function ce(...e){const t={};for(let n=0;n_t||mt;let Hs,ql;{const e=up(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(s=>s(i)):o[0](i)}};Hs=t("__VUE_INSTANCE_SETTERS__",n=>_t=n),ql=t("__VUE_SSR_SETTERS__",n=>Sa=n)}const Gi=e=>{const t=_t;return Hs(e),e.scope.on(),()=>{e.scope.off(),Hs(t)}},ad=()=>{_t&&_t.scope.off(),Hs(null)};function ah(e){return e.vnode.shapeFlag&4}let Sa=!1;function z0(e,t=!1){t&&ql(t);const{props:n,children:r}=e.vnode,o=ah(e);S0(e,n,o,t),O0(e,r);const i=o?H0(e,t):void 0;return t&&ql(!1),i}function H0(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=$o(new Proxy(e.ctx,p0));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?uh(e):null,i=Gi(e);ao();const s=Er(r,e,0,[e.props,o]);if(lo(),i(),sp(s)){if(s.then(ad,ad),t)return s.then(a=>{ld(e,a,t)}).catch(a=>{va(a,e,0)});e.asyncDep=s}else ld(e,s,t)}else lh(e,t)}function ld(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:st(t)&&(e.setupState=kp(t)),lh(e,n)}let ud;function lh(e,t,n){const r=e.type;if(!e.render){if(!t&&ud&&!r.render){const o=r.template||Nu(e).template;if(o){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=St(St({isCustomElement:i,delimiters:a},s),l);r.render=ud(o,u)}}e.render=r.render||tn}{const o=Gi(e);ao();try{g0(e)}finally{lo(),o()}}}function j0(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return zt(e,"get","$attrs"),t[n]}}))}function uh(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return j0(e)},slots:e.slots,emit:e.emit,expose:t}}function Ca(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(kp($o(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ii)return ii[n](e)},has(t,n){return n in t||n in ii}}))}function U0(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function W0(e){return Se(e)&&"__vccOpts"in e}const K=(e,t)=>Lv(e,t,Sa);function On(e,t,n){const r=arguments.length;return r===2?st(t)&&!we(t)?wi(t)?q(e,null,[t]):q(e,t):q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&wi(n)&&(n=[n]),q(e,t,n))}const G0="3.4.15";/** +**/function Er(e,t,n,r){let o;try{o=r?e(...r):e()}catch(i){va(i,t,n)}return o}function gn(e,t,n,r){if(Ee(e)){const i=Er(e,t,n,r);return i&&sp(i)&&i.catch(s=>{va(s,t,n)}),i}const o=[];for(let i=0;i>>1,o=kt[r],i=vi(o);iEn&&kt.splice(t,1)}function Gv(e){we(e)?So.push(...e):(!yr||!yr.includes(e,e.allowRecurse?zr+1:zr))&&So.push(e),Mp()}function qc(e,t,n=gi?En+1:0){for(;nvi(n)-vi(r));if(So.length=0,yr){yr.push(...t);return}for(yr=t,zr=0;zre.id==null?1/0:e.id,Kv=(e,t)=>{const n=vi(e)-vi(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Rp(e){Vl=!1,gi=!0,kt.sort(Kv);try{for(En=0;Endt(h)?h.trim():h)),d&&(o=n.map(Rl))}let a,l=r[a=Ts(t)]||r[a=Ts(nn(t))];!l&&i&&(l=r[a=Ts(so(t))]),l&&gn(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,gn(u,e,6,o)}}function Lp(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let s={},a=!1;if(!Ee(e)){const l=u=>{const c=Lp(u,t,!0);c&&(a=!0,St(s,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(st(e)&&r.set(e,null),null):(we(i)?i.forEach(l=>s[l]=null):St(s,i),st(e)&&r.set(e,s),s)}function ya(e,t){return!e||!la(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,so(t))||Le(e,t))}let mt=null,Fp=null;function Vs(e){const t=mt;return mt=e,Fp=e&&e.type.__scopeId||null,t}function B(e,t=mt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&sd(-1);const i=Vs(t);let s;try{s=e(...o)}finally{Vs(i),r._d&&sd(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function nl(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[s],slots:a,attrs:l,emit:u,render:c,renderCache:d,data:p,setupState:h,ctx:v,inheritAttrs:b}=e;let w,S;const _=Vs(e);try{if(n.shapeFlag&4){const F=o||r,V=F;w=xn(c.call(V,F,d,i,h,p,v)),S=l}else{const F=t;w=xn(F.length>1?F(i,{attrs:l,slots:a,emit:u}):F(i,null)),S=t.props?l:Yv(l)}}catch(F){ai.length=0,va(F,e,1),w=K(Cr)}let I=w;if(S&&b!==!1){const F=Object.keys(S),{shapeFlag:V}=I;F.length&&V&7&&(s&&F.some(Tu)&&(S=Xv(S,s)),I=Jr(I,S))}return n.dirs&&(I=Jr(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(I.transition=n.transition),w=I,Vs(_),w}const Yv=e=>{let t;for(const n in e)(n==="class"||n==="style"||la(n))&&((t||(t={}))[n]=e[n]);return t},Xv=(e,t)=>{const n={};for(const r in e)(!Tu(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Zv(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Yc(r,s,u):!!s;if(l&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function t0(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):Gv(e)}const n0=Symbol.for("v-scx"),r0=()=>Wt(n0);function vt(e,t){return Fu(e,null,t)}const ts={};function ye(e,t,n){return Fu(e,t,n)}function Fu(e,t,{immediate:n,deep:r,flush:o,once:i,onTrack:s,onTrigger:a}=ot){if(t&&i){const N=t;t=(...H)=>{N(...H),V()}}const l=_t,u=N=>r===!0?N:jr(N,r===!1?1:void 0);let c,d=!1,p=!1;if(at(e)?(c=()=>e.value,d=Ns(e)):xr(e)?(c=()=>u(e),d=!0):we(e)?(p=!0,d=e.some(N=>xr(N)||Ns(N)),c=()=>e.map(N=>{if(at(N))return N.value;if(xr(N))return u(N);if(Ee(N))return Er(N,l,2)})):Ee(e)?t?c=()=>Er(e,l,2):c=()=>(h&&h(),gn(e,l,3,[v])):c=tn,t&&r){const N=c;c=()=>jr(N())}let h,v=N=>{h=I.onStop=()=>{Er(N,l,4),h=I.onStop=void 0}},b;if(Sa)if(v=tn,t?n&&gn(t,l,3,[c(),p?[]:void 0,v]):c(),o==="sync"){const N=r0();b=N.__watcherHandles||(N.__watcherHandles=[])}else return tn;let w=p?new Array(e.length).fill(ts):ts;const S=()=>{if(!(!I.active||!I.dirty))if(t){const N=I.run();(r||d||(p?N.some((H,m)=>Sr(H,w[m])):Sr(N,w)))&&(h&&h(),gn(t,l,3,[N,w===ts?void 0:p&&w[0]===ts?[]:w,v]),w=N)}else I.run()};S.allowRecurse=!!t;let _;o==="sync"?_=S:o==="post"?_=()=>Nt(S,l&&l.suspense):(S.pre=!0,l&&(S.id=l.uid),_=()=>Lu(S));const I=new ku(c,tn,_),F=Wi(),V=()=>{I.stop(),F&&Ou(F.effects,I)};return t?n?S():w=I.run():o==="post"?Nt(I.run.bind(I),l&&l.suspense):I.run(),b&&b.push(V),V}function o0(e,t,n){const r=this.proxy,o=dt(e)?e.includes(".")?zp(r,e):()=>r[e]:e.bind(r,r);let i;Ee(t)?i=t:(i=t.handler,n=t);const s=Gi(this),a=Fu(o,i.bind(r),n);return s(),a}function zp(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),at(e))jr(e.value,t,n,r);else if(we(e))for(let o=0;o{jr(o,t,n,r)});else if(lp(e))for(const o in e)jr(e[o],t,n,r);return e}function ba(e,t){if(mt===null)return e;const n=Ca(mt)||mt.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;oSt({name:e.name},t,{setup:e}))():e}const oi=e=>!!e.type.__asyncLoader,Hp=e=>e.type.__isKeepAlive;function i0(e,t){jp(e,"a",t)}function s0(e,t){jp(e,"da",t)}function jp(e,t,n=_t){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(wa(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Hp(o.parent.vnode)&&a0(r,t,n,o),o=o.parent}}function a0(e,t,n,r){const o=wa(t,e,r,!0);Bn(()=>{Ou(r[t],o)},n)}function wa(e,t,n=_t,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;ao();const a=Gi(n),l=gn(t,n,e,s);return a(),lo(),l});return r?o.unshift(i):o.push(i),i}}const Jn=e=>(t,n=_t)=>(!Sa||e==="sp")&&wa(e,(...r)=>t(...r),n),l0=Jn("bm"),Ue=Jn("m"),Up=Jn("bu"),Wp=Jn("u"),_a=Jn("bum"),Bn=Jn("um"),u0=Jn("sp"),c0=Jn("rtg"),d0=Jn("rtc");function f0(e,t=_t){wa("ec",e,t)}function Qr(e,t,n,r){let o;const i=n&&n[r];if(we(e)||dt(e)){o=new Array(e.length);for(let s=0,a=e.length;st(s,a,void 0,i&&i[a]));else{const s=Object.keys(e);o=new Array(s.length);for(let a=0,l=s.length;awi(t)?!(t.type===Cr||t.type===qe&&!Gp(t.children)):!0)?e:null}const zl=e=>e?ah(e)?Ca(e)||e.proxy:zl(e.parent):null,ii=St(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zl(e.parent),$root:e=>zl(e.root),$emit:e=>e.emit,$options:e=>Nu(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Lu(e.update)}),$nextTick:e=>e.n||(e.n=Ke.bind(e.proxy)),$watch:e=>o0.bind(e)}),rl=(e,t)=>e!==ot&&!e.__isScriptSetup&&Le(e,t),p0={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(rl(r,t))return s[t]=1,r[t];if(o!==ot&&Le(o,t))return s[t]=2,o[t];if((u=e.propsOptions[0])&&Le(u,t))return s[t]=3,i[t];if(n!==ot&&Le(n,t))return s[t]=4,n[t];jl&&(s[t]=0)}}const c=ii[t];let d,p;if(c)return t==="$attrs"&&zt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==ot&&Le(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,Le(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return rl(o,t)?(o[t]=n,!0):r!==ot&&Le(r,t)?(r[t]=n,!0):Le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},s){let a;return!!n[s]||e!==ot&&Le(e,s)||rl(t,s)||(a=i[0])&&Le(a,s)||Le(r,s)||Le(ii,s)||Le(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function h0(){return qp().slots}function Kp(){return qp().attrs}function qp(){const e=Rt();return e.setupContext||(e.setupContext=uh(e))}function Hl(e){return we(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function m0(e,t){const n=Hl(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?we(o)||Ee(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n}let jl=!0;function g0(e){const t=Nu(e),n=e.proxy,r=e.ctx;jl=!1,t.beforeCreate&&Zc(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:v,activated:b,deactivated:w,beforeDestroy:S,beforeUnmount:_,destroyed:I,unmounted:F,render:V,renderTracked:N,renderTriggered:H,errorCaptured:m,serverPrefetch:g,expose:y,inheritAttrs:A,components:x,directives:C,filters:k}=t;if(u&&v0(u,r,null),s)for(const M in s){const $=s[M];Ee($)&&(r[M]=$.bind(n))}if(o){const M=o.call(n,n);st(M)&&(e.data=Tn(M))}if(jl=!0,i)for(const M in i){const $=i[M],G=Ee($)?$.bind(n,n):Ee($.get)?$.get.bind(n,n):tn,de=!Ee($)&&Ee($.set)?$.set.bind(n):tn,ue=q({get:G,set:de});Object.defineProperty(r,M,{enumerable:!0,configurable:!0,get:()=>ue.value,set:ge=>ue.value=ge})}if(a)for(const M in a)Yp(a[M],r,n,M);if(l){const M=Ee(l)?l.call(n):l;Reflect.ownKeys(M).forEach($=>{Fo($,M[$])})}c&&Zc(c,e,"c");function E(M,$){we($)?$.forEach(G=>M(G.bind(n))):$&&M($.bind(n))}if(E(l0,d),E(Ue,p),E(Up,h),E(Wp,v),E(i0,b),E(s0,w),E(f0,m),E(d0,N),E(c0,H),E(_a,_),E(Bn,F),E(u0,g),we(y))if(y.length){const M=e.exposed||(e.exposed={});y.forEach($=>{Object.defineProperty(M,$,{get:()=>n[$],set:G=>n[$]=G})})}else e.exposed||(e.exposed={});V&&e.render===tn&&(e.render=V),A!=null&&(e.inheritAttrs=A),x&&(e.components=x),C&&(e.directives=C)}function v0(e,t,n=tn){we(e)&&(e=Ul(e));for(const r in e){const o=e[r];let i;st(o)?"default"in o?i=Wt(o.from||r,o.default,!0):i=Wt(o.from||r):i=Wt(o),at(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[r]=i}}function Zc(e,t,n){gn(we(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Yp(e,t,n,r){const o=r.includes(".")?zp(n,r):()=>n[r];if(dt(e)){const i=t[e];Ee(i)&&ye(o,i)}else if(Ee(e))ye(o,e.bind(n));else if(st(e))if(we(e))e.forEach(i=>Yp(i,t,n,r));else{const i=Ee(e.handler)?e.handler.bind(n):t[e.handler];Ee(i)&&ye(o,i,e)}}function Nu(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>zs(l,u,s,!0)),zs(l,t,s)),st(t)&&i.set(t,l),l}function zs(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&zs(e,i,n,!0),o&&o.forEach(s=>zs(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const a=y0[s]||n&&n[s];e[s]=a?a(e[s],t[s]):t[s]}return e}const y0={data:Qc,props:Jc,emits:Jc,methods:Jo,computed:Jo,beforeCreate:Bt,created:Bt,beforeMount:Bt,mounted:Bt,beforeUpdate:Bt,updated:Bt,beforeDestroy:Bt,beforeUnmount:Bt,destroyed:Bt,unmounted:Bt,activated:Bt,deactivated:Bt,errorCaptured:Bt,serverPrefetch:Bt,components:Jo,directives:Jo,watch:w0,provide:Qc,inject:b0};function Qc(e,t){return t?e?function(){return St(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function b0(e,t){return Jo(Ul(e),Ul(t))}function Ul(e){if(we(e)){const t={};for(let n=0;n1)return n&&Ee(t)?t.call(r&&r.proxy):t}}function E0(){return!!(_t||mt||yi)}function S0(e,t,n,r=!1){const o={},i={};Ls(i,Ea,1),e.propsDefaults=Object.create(null),Zp(e,t,o,i);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:Rv(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function C0(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=Fe(o),[l]=e.propsOptions;let u=!1;if((r||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d{l=!0;const[p,h]=Qp(d,t,!0);St(s,p),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return st(e)&&r.set(e,xo),xo;if(we(i))for(let c=0;c-1,h[1]=b<0||v-1||Le(h,"default"))&&a.push(d)}}}const u=[s,a];return st(e)&&r.set(e,u),u}function ed(e){return e[0]!=="$"}function td(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function nd(e,t){return td(e)===td(t)}function rd(e,t){return we(t)?t.findIndex(n=>nd(n,e)):Ee(t)&&nd(t,e)?0:-1}const Jp=e=>e[0]==="_"||e==="$stable",Vu=e=>we(e)?e.map(xn):[xn(e)],T0=(e,t,n)=>{if(t._n)return t;const r=B((...o)=>Vu(t(...o)),n);return r._c=!1,r},eh=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Jp(o))continue;const i=e[o];if(Ee(i))t[o]=T0(o,i,r);else if(i!=null){const s=Vu(i);t[o]=()=>s}}},th=(e,t)=>{const n=Vu(t);e.slots.default=()=>n},O0=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Fe(t),Ls(t,"_",n)):eh(t,e.slots={})}else e.slots={},t&&th(e,t);Ls(e.slots,Ea,1)},A0=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=ot;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:(St(o,t),!n&&a===1&&delete o._):(i=!t.$stable,eh(t,o)),s=t}else t&&(th(e,t),s={default:1});if(i)for(const a in o)!Jp(a)&&s[a]==null&&delete o[a]};function Gl(e,t,n,r,o=!1){if(we(e)){e.forEach((p,h)=>Gl(p,t&&(we(t)?t[h]:t),n,r,o));return}if(oi(r)&&!o)return;const i=r.shapeFlag&4?Ca(r.component)||r.component.proxy:r.el,s=o?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===ot?a.refs={}:a.refs,d=a.setupState;if(u!=null&&u!==l&&(dt(u)?(c[u]=null,Le(d,u)&&(d[u]=null)):at(u)&&(u.value=null)),Ee(l))Er(l,a,12,[s,c]);else{const p=dt(l),h=at(l),v=e.f;if(p||h){const b=()=>{if(v){const w=p?Le(d,l)?d[l]:c[l]:l.value;o?we(w)&&Ou(w,i):we(w)?w.includes(i)||w.push(i):p?(c[l]=[i],Le(d,l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else p?(c[l]=s,Le(d,l)&&(d[l]=s)):h&&(l.value=s,e.k&&(c[e.k]=s))};o||v?b():(b.id=-1,Nt(b,n))}}}const Nt=t0;function I0(e){return k0(e)}function k0(e,t){const n=up();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:s,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=tn,insertStaticContent:v}=e,b=(T,P,z,Z=null,Q=null,te=null,re=void 0,ne=null,oe=!!P.dynamicChildren)=>{if(T===P)return;T&&!Ko(T,P)&&(Z=ve(T),ge(T,Q,te,!0),T=null),P.patchFlag===-2&&(oe=!1,P.dynamicChildren=null);const{type:J,ref:fe,shapeFlag:me}=P;switch(J){case xa:w(T,P,z,Z);break;case Cr:S(T,P,z,Z);break;case il:T==null&&_(P,z,Z,re);break;case qe:x(T,P,z,Z,Q,te,re,ne,oe);break;default:me&1?V(T,P,z,Z,Q,te,re,ne,oe):me&6?C(T,P,z,Z,Q,te,re,ne,oe):(me&64||me&128)&&J.process(T,P,z,Z,Q,te,re,ne,oe,ht)}fe!=null&&Q&&Gl(fe,T&&T.ref,te,P||T,!P)},w=(T,P,z,Z)=>{if(T==null)r(P.el=a(P.children),z,Z);else{const Q=P.el=T.el;P.children!==T.children&&u(Q,P.children)}},S=(T,P,z,Z)=>{T==null?r(P.el=l(P.children||""),z,Z):P.el=T.el},_=(T,P,z,Z)=>{[T.el,T.anchor]=v(T.children,P,z,Z,T.el,T.anchor)},I=({el:T,anchor:P},z,Z)=>{let Q;for(;T&&T!==P;)Q=p(T),r(T,z,Z),T=Q;r(P,z,Z)},F=({el:T,anchor:P})=>{let z;for(;T&&T!==P;)z=p(T),o(T),T=z;o(P)},V=(T,P,z,Z,Q,te,re,ne,oe)=>{P.type==="svg"?re="svg":P.type==="math"&&(re="mathml"),T==null?N(P,z,Z,Q,te,re,ne,oe):g(T,P,Q,te,re,ne,oe)},N=(T,P,z,Z,Q,te,re,ne)=>{let oe,J;const{props:fe,shapeFlag:me,transition:pe,dirs:_e}=T;if(oe=T.el=s(T.type,te,fe&&fe.is,fe),me&8?c(oe,T.children):me&16&&m(T.children,oe,null,Z,Q,ol(T,te),re,ne),_e&&Dr(T,null,Z,"created"),H(oe,T,T.scopeId,re,Z),fe){for(const He in fe)He!=="value"&&!Cs(He)&&i(oe,He,null,fe[He],te,T.children,Z,Q,ie);"value"in fe&&i(oe,"value",null,fe.value,te),(J=fe.onVnodeBeforeMount)&&yn(J,Z,T)}_e&&Dr(T,null,Z,"beforeMount");const ke=P0(Q,pe);ke&&pe.beforeEnter(oe),r(oe,P,z),((J=fe&&fe.onVnodeMounted)||ke||_e)&&Nt(()=>{J&&yn(J,Z,T),ke&&pe.enter(oe),_e&&Dr(T,null,Z,"mounted")},Q)},H=(T,P,z,Z,Q)=>{if(z&&h(T,z),Z)for(let te=0;te{for(let J=oe;J{const ne=P.el=T.el;let{patchFlag:oe,dynamicChildren:J,dirs:fe}=P;oe|=T.patchFlag&16;const me=T.props||ot,pe=P.props||ot;let _e;if(z&&Rr(z,!1),(_e=pe.onVnodeBeforeUpdate)&&yn(_e,z,P,T),fe&&Dr(P,T,z,"beforeUpdate"),z&&Rr(z,!0),J?y(T.dynamicChildren,J,ne,z,Z,ol(P,Q),te):re||$(T,P,ne,null,z,Z,ol(P,Q),te,!1),oe>0){if(oe&16)A(ne,P,me,pe,z,Z,Q);else if(oe&2&&me.class!==pe.class&&i(ne,"class",null,pe.class,Q),oe&4&&i(ne,"style",me.style,pe.style,Q),oe&8){const ke=P.dynamicProps;for(let He=0;He{_e&&yn(_e,z,P,T),fe&&Dr(P,T,z,"updated")},Z)},y=(T,P,z,Z,Q,te,re)=>{for(let ne=0;ne{if(z!==Z){if(z!==ot)for(const ne in z)!Cs(ne)&&!(ne in Z)&&i(T,ne,z[ne],null,re,P.children,Q,te,ie);for(const ne in Z){if(Cs(ne))continue;const oe=Z[ne],J=z[ne];oe!==J&&ne!=="value"&&i(T,ne,J,oe,re,P.children,Q,te,ie)}"value"in Z&&i(T,"value",z.value,Z.value,re)}},x=(T,P,z,Z,Q,te,re,ne,oe)=>{const J=P.el=T?T.el:a(""),fe=P.anchor=T?T.anchor:a("");let{patchFlag:me,dynamicChildren:pe,slotScopeIds:_e}=P;_e&&(ne=ne?ne.concat(_e):_e),T==null?(r(J,z,Z),r(fe,z,Z),m(P.children||[],z,fe,Q,te,re,ne,oe)):me>0&&me&64&&pe&&T.dynamicChildren?(y(T.dynamicChildren,pe,z,Q,te,re,ne),(P.key!=null||Q&&P===Q.subTree)&&zu(T,P,!0)):$(T,P,z,fe,Q,te,re,ne,oe)},C=(T,P,z,Z,Q,te,re,ne,oe)=>{P.slotScopeIds=ne,T==null?P.shapeFlag&512?Q.ctx.activate(P,z,Z,re,oe):k(P,z,Z,Q,te,re,oe):O(T,P,oe)},k=(T,P,z,Z,Q,te,re)=>{const ne=T.component=V0(T,Z,Q);if(Hp(T)&&(ne.ctx.renderer=ht),z0(ne),ne.asyncDep){if(Q&&Q.registerDep(ne,E),!T.el){const oe=ne.subTree=K(Cr);S(null,oe,P,z)}}else E(ne,T,P,z,Q,te,re)},O=(T,P,z)=>{const Z=P.component=T.component;if(Zv(T,P,z))if(Z.asyncDep&&!Z.asyncResolved){M(Z,P,z);return}else Z.next=P,Wv(Z.update),Z.effect.dirty=!0,Z.update();else P.el=T.el,Z.vnode=P},E=(T,P,z,Z,Q,te,re)=>{const ne=()=>{if(T.isMounted){let{next:fe,bu:me,u:pe,parent:_e,vnode:ke}=T;{const se=nh(T);if(se){fe&&(fe.el=ke.el,M(T,fe,re)),se.asyncDep.then(()=>{T.isUnmounted||ne()});return}}let He=fe,R;Rr(T,!1),fe?(fe.el=ke.el,M(T,fe,re)):fe=ke,me&&Os(me),(R=fe.props&&fe.props.onVnodeBeforeUpdate)&&yn(R,_e,fe,ke),Rr(T,!0);const L=nl(T),Y=T.subTree;T.subTree=L,b(Y,L,d(Y.el),ve(Y),T,Q,te),fe.el=L.el,He===null&&Qv(T,L.el),pe&&Nt(pe,Q),(R=fe.props&&fe.props.onVnodeUpdated)&&Nt(()=>yn(R,_e,fe,ke),Q)}else{let fe;const{el:me,props:pe}=P,{bm:_e,m:ke,parent:He}=T,R=oi(P);if(Rr(T,!1),_e&&Os(_e),!R&&(fe=pe&&pe.onVnodeBeforeMount)&&yn(fe,He,P),Rr(T,!0),me&&ln){const L=()=>{T.subTree=nl(T),ln(me,T.subTree,T,Q,null)};R?P.type.__asyncLoader().then(()=>!T.isUnmounted&&L()):L()}else{const L=T.subTree=nl(T);b(null,L,z,Z,T,Q,te),P.el=L.el}if(ke&&Nt(ke,Q),!R&&(fe=pe&&pe.onVnodeMounted)){const L=P;Nt(()=>yn(fe,He,L),Q)}(P.shapeFlag&256||He&&oi(He.vnode)&&He.vnode.shapeFlag&256)&&T.a&&Nt(T.a,Q),T.isMounted=!0,P=z=Z=null}},oe=T.effect=new ku(ne,tn,()=>Lu(J),T.scope),J=T.update=()=>{oe.dirty&&oe.run()};J.id=T.uid,Rr(T,!0),J()},M=(T,P,z)=>{P.component=T;const Z=T.vnode.props;T.vnode=P,T.next=null,C0(T,P.props,Z,z),A0(T,P.children,z),ao(),qc(T),lo()},$=(T,P,z,Z,Q,te,re,ne,oe=!1)=>{const J=T&&T.children,fe=T?T.shapeFlag:0,me=P.children,{patchFlag:pe,shapeFlag:_e}=P;if(pe>0){if(pe&128){de(J,me,z,Z,Q,te,re,ne,oe);return}else if(pe&256){G(J,me,z,Z,Q,te,re,ne,oe);return}}_e&8?(fe&16&&ie(J,Q,te),me!==J&&c(z,me)):fe&16?_e&16?de(J,me,z,Z,Q,te,re,ne,oe):ie(J,Q,te,!0):(fe&8&&c(z,""),_e&16&&m(me,z,Z,Q,te,re,ne,oe))},G=(T,P,z,Z,Q,te,re,ne,oe)=>{T=T||xo,P=P||xo;const J=T.length,fe=P.length,me=Math.min(J,fe);let pe;for(pe=0;pefe?ie(T,Q,te,!0,!1,me):m(P,z,Z,Q,te,re,ne,oe,me)},de=(T,P,z,Z,Q,te,re,ne,oe)=>{let J=0;const fe=P.length;let me=T.length-1,pe=fe-1;for(;J<=me&&J<=pe;){const _e=T[J],ke=P[J]=oe?br(P[J]):xn(P[J]);if(Ko(_e,ke))b(_e,ke,z,null,Q,te,re,ne,oe);else break;J++}for(;J<=me&&J<=pe;){const _e=T[me],ke=P[pe]=oe?br(P[pe]):xn(P[pe]);if(Ko(_e,ke))b(_e,ke,z,null,Q,te,re,ne,oe);else break;me--,pe--}if(J>me){if(J<=pe){const _e=pe+1,ke=_epe)for(;J<=me;)ge(T[J],Q,te,!0),J++;else{const _e=J,ke=J,He=new Map;for(J=ke;J<=pe;J++){const Me=P[J]=oe?br(P[J]):xn(P[J]);Me.key!=null&&He.set(Me.key,J)}let R,L=0;const Y=pe-ke+1;let se=!1,xe=0;const he=new Array(Y);for(J=0;J=Y){ge(Me,Q,te,!0);continue}let Ve;if(Me.key!=null)Ve=He.get(Me.key);else for(R=ke;R<=pe;R++)if(he[R-ke]===0&&Ko(Me,P[R])){Ve=R;break}Ve===void 0?ge(Me,Q,te,!0):(he[Ve-ke]=J+1,Ve>=xe?xe=Ve:se=!0,b(Me,P[Ve],z,null,Q,te,re,ne,oe),L++)}const Ne=se?B0(he):xo;for(R=Ne.length-1,J=Y-1;J>=0;J--){const Me=ke+J,Ve=P[Me],bt=Me+1{const{el:te,type:re,transition:ne,children:oe,shapeFlag:J}=T;if(J&6){ue(T.component.subTree,P,z,Z);return}if(J&128){T.suspense.move(P,z,Z);return}if(J&64){re.move(T,P,z,ht);return}if(re===qe){r(te,P,z);for(let me=0;mene.enter(te),Q);else{const{leave:me,delayLeave:pe,afterLeave:_e}=ne,ke=()=>r(te,P,z),He=()=>{me(te,()=>{ke(),_e&&_e()})};pe?pe(te,ke,He):He()}else r(te,P,z)},ge=(T,P,z,Z=!1,Q=!1)=>{const{type:te,props:re,ref:ne,children:oe,dynamicChildren:J,shapeFlag:fe,patchFlag:me,dirs:pe}=T;if(ne!=null&&Gl(ne,null,z,T,!0),fe&256){P.ctx.deactivate(T);return}const _e=fe&1&&pe,ke=!oi(T);let He;if(ke&&(He=re&&re.onVnodeBeforeUnmount)&&yn(He,P,T),fe&6)ee(T.component,z,Z);else{if(fe&128){T.suspense.unmount(z,Z);return}_e&&Dr(T,null,P,"beforeUnmount"),fe&64?T.type.remove(T,P,z,Q,ht,Z):J&&(te!==qe||me>0&&me&64)?ie(J,P,z,!1,!0):(te===qe&&me&384||!Q&&fe&16)&&ie(oe,P,z),Z&&Oe(T)}(ke&&(He=re&&re.onVnodeUnmounted)||_e)&&Nt(()=>{He&&yn(He,P,T),_e&&Dr(T,null,P,"unmounted")},z)},Oe=T=>{const{type:P,el:z,anchor:Z,transition:Q}=T;if(P===qe){Je(z,Z);return}if(P===il){F(T);return}const te=()=>{o(z),Q&&!Q.persisted&&Q.afterLeave&&Q.afterLeave()};if(T.shapeFlag&1&&Q&&!Q.persisted){const{leave:re,delayLeave:ne}=Q,oe=()=>re(z,te);ne?ne(T.el,te,oe):oe()}else te()},Je=(T,P)=>{let z;for(;T!==P;)z=p(T),o(T),T=z;o(P)},ee=(T,P,z)=>{const{bum:Z,scope:Q,update:te,subTree:re,um:ne}=T;Z&&Os(Z),Q.stop(),te&&(te.active=!1,ge(re,T,P,z)),ne&&Nt(ne,P),Nt(()=>{T.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},ie=(T,P,z,Z=!1,Q=!1,te=0)=>{for(let re=te;reT.shapeFlag&6?ve(T.component.subTree):T.shapeFlag&128?T.suspense.next():p(T.anchor||T.el);let Pe=!1;const Ot=(T,P,z)=>{T==null?P._vnode&&ge(P._vnode,null,null,!0):b(P._vnode||null,T,P,null,null,null,z),Pe||(Pe=!0,qc(),Dp(),Pe=!1),P._vnode=T},ht={p:b,um:ge,m:ue,r:Oe,mt:k,mc:m,pc:$,pbc:y,n:ve,o:e};let Ge,ln;return t&&([Ge,ln]=t(ht)),{render:Ot,hydrate:Ge,createApp:x0(Ot,Ge)}}function ol({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Rr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function P0(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function zu(e,t,n=!1){const r=e.children,o=t.children;if(we(r)&&we(o))for(let i=0;i>1,e[n[a]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}function nh(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:nh(t)}const $0=e=>e.__isTeleport,si=e=>e&&(e.disabled||e.disabled===""),od=e=>typeof SVGElement<"u"&&e instanceof SVGElement,id=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Kl=(e,t)=>{const n=e&&e.to;return dt(n)?t?t(n):null:n},M0={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,s,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:v,createText:b,createComment:w}}=u,S=si(t.props);let{shapeFlag:_,children:I,dynamicChildren:F}=t;if(e==null){const V=t.el=b(""),N=t.anchor=b("");h(V,n,r),h(N,n,r);const H=t.target=Kl(t.props,v),m=t.targetAnchor=b("");H&&(h(m,H),s==="svg"||od(H)?s="svg":(s==="mathml"||id(H))&&(s="mathml"));const g=(y,A)=>{_&16&&c(I,y,A,o,i,s,a,l)};S?g(n,N):H&&g(H,m)}else{t.el=e.el;const V=t.anchor=e.anchor,N=t.target=e.target,H=t.targetAnchor=e.targetAnchor,m=si(e.props),g=m?n:N,y=m?V:H;if(s==="svg"||od(N)?s="svg":(s==="mathml"||id(N))&&(s="mathml"),F?(p(e.dynamicChildren,F,g,o,i,s,a),zu(e,t,!0)):l||d(e,t,g,y,o,i,s,a,!1),S)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ns(t,n,V,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Kl(t.props,v);A&&ns(t,A,null,u,0)}else m&&ns(t,N,H,u,1)}oh(t)},remove(e,t,n,r,{um:o,o:{remove:i}},s){const{shapeFlag:a,children:l,anchor:u,targetAnchor:c,target:d,props:p}=e;if(d&&i(c),s&&i(u),a&16){const h=s||!si(p);for(let v=0;v0?hn||xo:null,R0(),bi>0&&hn&&hn.push(e),e}function Te(e,t,n,r,o,i){return ih(Se(e,t,n,r,o,i,!0))}function j(e,t,n,r,o){return ih(K(e,t,n,r,o,!0))}function wi(e){return e?e.__v_isVNode===!0:!1}function Ko(e,t){return e.type===t.type&&e.key===t.key}const Ea="__vInternal",sh=({key:e})=>e??null,As=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?dt(e)||at(e)||Ee(e)?{i:mt,r:e,k:t,f:!!n}:e:null);function Se(e,t=null,n=null,r=0,o=null,i=e===qe?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&sh(t),ref:t&&As(t),scopeId:Fp,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:mt};return a?(Hu(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=dt(n)?8:16),bi>0&&!s&&hn&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&hn.push(l),l}const K=L0;function L0(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===Vp)&&(e=Cr),wi(e)){const a=Jr(e,t,!0);return n&&Hu(a,n),bi>0&&!i&&hn&&(a.shapeFlag&6?hn[hn.indexOf(e)]=a:hn.push(a)),a.patchFlag|=-2,a}if(W0(e)&&(e=e.__vccOpts),t){t=Ct(t);let{class:a,style:l}=t;a&&!dt(a)&&(t.class=lt(a)),st(l)&&(Op(l)&&!we(l)&&(l=St({},l)),t.style=qt(l))}const s=dt(e)?1:e0(e)?128:$0(e)?64:st(e)?4:Ee(e)?2:0;return Se(e,t,n,r,o,s,i,!0)}function Ct(e){return e?Op(e)||Ea in e?St({},e):e:null}function Jr(e,t,n=!1){const{props:r,ref:o,patchFlag:i,children:s}=e,a=t?ce(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&sh(a),ref:t&&t.ref?n&&o?we(o)?o.concat(As(t)):[o,As(t)]:As(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Jr(e.ssContent),ssFallback:e.ssFallback&&Jr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Re(e=" ",t=0){return K(xa,null,e,t)}function pt(e="",t=!1){return t?(D(),j(Cr,null,e)):K(Cr,null,e)}function xn(e){return e==null||typeof e=="boolean"?K(Cr):we(e)?K(qe,null,e.slice()):typeof e=="object"?br(e):K(xa,null,String(e))}function br(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Jr(e)}function Hu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(we(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Hu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(Ea in t)?t._ctx=mt:o===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:mt},n=32):(t=String(t),r&64?(n=16,t=[Re(t)]):n=8);e.children=t,e.shapeFlag|=n}function ce(...e){const t={};for(let n=0;n_t||mt;let Hs,ql;{const e=up(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(s=>s(i)):o[0](i)}};Hs=t("__VUE_INSTANCE_SETTERS__",n=>_t=n),ql=t("__VUE_SSR_SETTERS__",n=>Sa=n)}const Gi=e=>{const t=_t;return Hs(e),e.scope.on(),()=>{e.scope.off(),Hs(t)}},ad=()=>{_t&&_t.scope.off(),Hs(null)};function ah(e){return e.vnode.shapeFlag&4}let Sa=!1;function z0(e,t=!1){t&&ql(t);const{props:n,children:r}=e.vnode,o=ah(e);S0(e,n,o,t),O0(e,r);const i=o?H0(e,t):void 0;return t&&ql(!1),i}function H0(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=$o(new Proxy(e.ctx,p0));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?uh(e):null,i=Gi(e);ao();const s=Er(r,e,0,[e.props,o]);if(lo(),i(),sp(s)){if(s.then(ad,ad),t)return s.then(a=>{ld(e,a,t)}).catch(a=>{va(a,e,0)});e.asyncDep=s}else ld(e,s,t)}else lh(e,t)}function ld(e,t,n){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:st(t)&&(e.setupState=kp(t)),lh(e,n)}let ud;function lh(e,t,n){const r=e.type;if(!e.render){if(!t&&ud&&!r.render){const o=r.template||Nu(e).template;if(o){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=St(St({isCustomElement:i,delimiters:a},s),l);r.render=ud(o,u)}}e.render=r.render||tn}{const o=Gi(e);ao();try{g0(e)}finally{lo(),o()}}}function j0(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return zt(e,"get","$attrs"),t[n]}}))}function uh(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return j0(e)},slots:e.slots,emit:e.emit,expose:t}}function Ca(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(kp($o(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ii)return ii[n](e)},has(t,n){return n in t||n in ii}}))}function U0(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function W0(e){return Ee(e)&&"__vccOpts"in e}const q=(e,t)=>Lv(e,t,Sa);function On(e,t,n){const r=arguments.length;return r===2?st(t)&&!we(t)?wi(t)?K(e,null,[t]):K(e,t):K(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&wi(n)&&(n=[n]),K(e,t,n))}const G0="3.4.15";/** * @vue/runtime-dom v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const K0="http://www.w3.org/2000/svg",q0="http://www.w3.org/1998/Math/MathML",wr=typeof document<"u"?document:null,cd=wr&&wr.createElement("template"),Y0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?wr.createElementNS(K0,e):t==="mathml"?wr.createElementNS(q0,e):wr.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>wr.createTextNode(e),createComment:e=>wr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{cd.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const a=cd.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},X0=Symbol("_vtc");function Z0(e,t,n){const r=e[X0];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ju=Symbol("_vod"),ch={beforeMount(e,{value:t},{transition:n}){e[ju]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),qo(e,!0),r.enter(e)):r.leave(e,()=>{qo(e,!1)}):qo(e,t))},beforeUnmount(e,{value:t}){qo(e,t)}};function qo(e,t){e.style.display=t?e[ju]:"none"}const Q0=Symbol("");function J0(e,t,n){const r=e.style,o=r.display,i=dt(n);if(n&&!i){if(t&&!dt(t))for(const s in t)n[s]==null&&Yl(r,s,"");for(const s in n)Yl(r,s,n[s])}else if(i){if(t!==n){const s=r[Q0];s&&(n+=";"+s),r.cssText=n}}else t&&e.removeAttribute("style");ju in e&&(r.display=o)}const dd=/\s*!important$/;function Yl(e,t,n){if(we(n))n.forEach(r=>Yl(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=ey(e,t);dd.test(n)?e.setProperty(so(r),n.replace(dd,""),"important"):e[r]=n}}const fd=["Webkit","Moz","ms"],sl={};function ey(e,t){const n=sl[t];if(n)return n;let r=nn(t);if(r!=="filter"&&r in e)return sl[t]=r;r=da(r);for(let o=0;oal||(sy.then(()=>al=0),al=Date.now());function ly(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gn(uy(r,n.value),t,5,[r])};return n.value=e,n.attached=ay(),n}function uy(e,t){if(we(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const gd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cy=(e,t,n,r,o,i,s,a,l)=>{const u=o==="svg";t==="class"?Z0(e,r,u):t==="style"?J0(e,n,r):la(t)?Tu(t)||oy(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):dy(e,t,r,u))?ny(e,t,r,i,s,a,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ty(e,t,r,u))};function dy(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&gd(t)&&Se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return gd(t)&&dt(n)?!1:t in e}const vd=e=>{const t=e.props["onUpdate:modelValue"]||!1;return we(t)?n=>Os(t,n):t};function fy(e){e.target.composing=!0}function yd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ll=Symbol("_assign"),py={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[ll]=vd(o);const i=r||o.props&&o.props.type==="number";yo(e,t?"change":"input",s=>{if(s.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Rl(a)),e[ll](a)}),n&&yo(e,"change",()=>{e.value=e.value.trim()}),t||(yo(e,"compositionstart",fy),yo(e,"compositionend",yd),yo(e,"change",yd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e[ll]=vd(i),e.composing)return;const s=o||e.type==="number"?Rl(e.value):e.value,a=t??"";s!==a&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===a)||(e.value=a))}},hy=["ctrl","shift","alt","meta"],my={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>hy.some(n=>e[`${n}Key`]&&!t.includes(n))},eo=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let s=0;s{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=so(o.key);if(t.some(s=>s===i||gy[s]===i))return e(o)})},vy=St({patchProp:cy},Y0);let bd;function yy(){return bd||(bd=I0(vy))}const by=(...e)=>{const t=yy().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=_y(r);if(!o)return;const i=t._component;!Se(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,wy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};function wy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function _y(e){return dt(e)?document.querySelector(e):e}var xy=!1;/*! +**/const K0="http://www.w3.org/2000/svg",q0="http://www.w3.org/1998/Math/MathML",wr=typeof document<"u"?document:null,cd=wr&&wr.createElement("template"),Y0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?wr.createElementNS(K0,e):t==="mathml"?wr.createElementNS(q0,e):wr.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>wr.createTextNode(e),createComment:e=>wr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{cd.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const a=cd.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},X0=Symbol("_vtc");function Z0(e,t,n){const r=e[X0];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ju=Symbol("_vod"),ch={beforeMount(e,{value:t},{transition:n}){e[ju]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),qo(e,!0),r.enter(e)):r.leave(e,()=>{qo(e,!1)}):qo(e,t))},beforeUnmount(e,{value:t}){qo(e,t)}};function qo(e,t){e.style.display=t?e[ju]:"none"}const Q0=Symbol("");function J0(e,t,n){const r=e.style,o=r.display,i=dt(n);if(n&&!i){if(t&&!dt(t))for(const s in t)n[s]==null&&Yl(r,s,"");for(const s in n)Yl(r,s,n[s])}else if(i){if(t!==n){const s=r[Q0];s&&(n+=";"+s),r.cssText=n}}else t&&e.removeAttribute("style");ju in e&&(r.display=o)}const dd=/\s*!important$/;function Yl(e,t,n){if(we(n))n.forEach(r=>Yl(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=ey(e,t);dd.test(n)?e.setProperty(so(r),n.replace(dd,""),"important"):e[r]=n}}const fd=["Webkit","Moz","ms"],sl={};function ey(e,t){const n=sl[t];if(n)return n;let r=nn(t);if(r!=="filter"&&r in e)return sl[t]=r;r=da(r);for(let o=0;oal||(sy.then(()=>al=0),al=Date.now());function ly(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gn(uy(r,n.value),t,5,[r])};return n.value=e,n.attached=ay(),n}function uy(e,t){if(we(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const gd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cy=(e,t,n,r,o,i,s,a,l)=>{const u=o==="svg";t==="class"?Z0(e,r,u):t==="style"?J0(e,n,r):la(t)?Tu(t)||oy(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):dy(e,t,r,u))?ny(e,t,r,i,s,a,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ty(e,t,r,u))};function dy(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&gd(t)&&Ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return gd(t)&&dt(n)?!1:t in e}const vd=e=>{const t=e.props["onUpdate:modelValue"]||!1;return we(t)?n=>Os(t,n):t};function fy(e){e.target.composing=!0}function yd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ll=Symbol("_assign"),py={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[ll]=vd(o);const i=r||o.props&&o.props.type==="number";yo(e,t?"change":"input",s=>{if(s.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Rl(a)),e[ll](a)}),n&&yo(e,"change",()=>{e.value=e.value.trim()}),t||(yo(e,"compositionstart",fy),yo(e,"compositionend",yd),yo(e,"change",yd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e[ll]=vd(i),e.composing)return;const s=o||e.type==="number"?Rl(e.value):e.value,a=t??"";s!==a&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===a)||(e.value=a))}},hy=["ctrl","shift","alt","meta"],my={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>hy.some(n=>e[`${n}Key`]&&!t.includes(n))},eo=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let s=0;s{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=so(o.key);if(t.some(s=>s===i||gy[s]===i))return e(o)})},vy=St({patchProp:cy},Y0);let bd;function yy(){return bd||(bd=I0(vy))}const by=(...e)=>{const t=yy().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=_y(r);if(!o)return;const i=t._component;!Ee(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,wy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};function wy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function _y(e){return dt(e)?document.querySelector(e):e}var xy=!1;/*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let dh;const Ta=e=>dh=e,fh=Symbol();function Xl(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var li;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(li||(li={}));function Ey(){const e=Iu(!0),t=e.run(()=>U({}));let n=[],r=[];const o=$o({install(i){Ta(o),o._a=i,i.provide(fh,o),i.config.globalProperties.$pinia=o,r.forEach(s=>n.push(s)),r=[]},use(i){return!this._a&&!xy?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const ph=()=>{};function wd(e,t,n,r=ph){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Wi()&&fa(o),o}function ho(e,...t){e.slice().forEach(n=>{n(...t)})}const Sy=e=>e();function Zl(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];Xl(o)&&Xl(r)&&e.hasOwnProperty(n)&&!at(r)&&!xr(r)?e[n]=Zl(o,r):e[n]=r}return e}const Cy=Symbol();function Ty(e){return!Xl(e)||!e.hasOwnProperty(Cy)}const{assign:mr}=Object;function Oy(e){return!!(at(e)&&e.effect)}function Ay(e,t,n,r){const{state:o,actions:i,getters:s}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=o?o():{});const c=on(n.state.value[e]);return mr(c,i,Object.keys(s||{}).reduce((d,p)=>(d[p]=$o(K(()=>{Ta(n);const h=n._s.get(e);return s[p].call(h,h)})),d),{}))}return l=hh(e,u,t,n,r,!0),l}function hh(e,t,n={},r,o,i){let s;const a=mr({actions:{}},n),l={deep:!0};let u,c,d=[],p=[],h;const v=r.state.value[e];!i&&!v&&(r.state.value[e]={}),U({});let b;function w(m){let g;u=c=!1,typeof m=="function"?(m(r.state.value[e]),g={type:li.patchFunction,storeId:e,events:h}):(Zl(r.state.value[e],m),g={type:li.patchObject,payload:m,storeId:e,events:h});const y=b=Symbol();Ke().then(()=>{b===y&&(u=!0)}),c=!0,ho(d,g,r.state.value[e])}const S=i?function(){const{state:g}=n,y=g?g():{};this.$patch(A=>{mr(A,y)})}:ph;function _(){s.stop(),d=[],p=[],r._s.delete(e)}function I(m,g){return function(){Ta(r);const y=Array.from(arguments),A=[],x=[];function C(E){A.push(E)}function k(E){x.push(E)}ho(p,{args:y,name:m,store:V,after:C,onError:k});let O;try{O=g.apply(this&&this.$id===e?this:V,y)}catch(E){throw ho(x,E),E}return O instanceof Promise?O.then(E=>(ho(A,E),E)).catch(E=>(ho(x,E),Promise.reject(E))):(ho(A,O),O)}}const F={_p:r,$id:e,$onAction:wd.bind(null,p),$patch:w,$reset:S,$subscribe(m,g={}){const y=wd(d,m,g.detached,()=>A()),A=s.run(()=>ye(()=>r.state.value[e],x=>{(g.flush==="sync"?c:u)&&m({storeId:e,type:li.direct,events:h},x)},mr({},l,g)));return y},$dispose:_},V=Tn(F);r._s.set(e,V);const H=(r._a&&r._a.runWithContext||Sy)(()=>r._e.run(()=>(s=Iu()).run(t)));for(const m in H){const g=H[m];if(at(g)&&!Oy(g)||xr(g))i||(v&&Ty(g)&&(at(g)?g.value=v[m]:Zl(g,v[m])),r.state.value[e][m]=g);else if(typeof g=="function"){const y=I(m,g);H[m]=y,a.actions[m]=g}}return mr(V,H),mr(Fe(V),H),Object.defineProperty(V,"$state",{get:()=>r.state.value[e],set:m=>{w(g=>{mr(g,m)})}}),r._p.forEach(m=>{mr(V,s.run(()=>m({store:V,app:r._a,pinia:r,options:a})))}),v&&i&&n.hydrate&&n.hydrate(V.$state,v),u=!0,c=!0,V}function mh(e,t,n){let r,o;const i=typeof t=="function";typeof e=="string"?(r=e,o=i?n:t):(o=e,r=e.id);function s(a,l){const u=E0();return a=a||(u?Wt(fh,null):null),a&&Ta(a),a=dh,a._s.has(r)||(i?hh(r,t,o,a):Ay(r,o,a)),a._s.get(r)}return s.$id=r,s}/** + */let dh;const Ta=e=>dh=e,fh=Symbol();function Xl(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var li;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(li||(li={}));function Ey(){const e=Iu(!0),t=e.run(()=>U({}));let n=[],r=[];const o=$o({install(i){Ta(o),o._a=i,i.provide(fh,o),i.config.globalProperties.$pinia=o,r.forEach(s=>n.push(s)),r=[]},use(i){return!this._a&&!xy?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const ph=()=>{};function wd(e,t,n,r=ph){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Wi()&&fa(o),o}function ho(e,...t){e.slice().forEach(n=>{n(...t)})}const Sy=e=>e();function Zl(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];Xl(o)&&Xl(r)&&e.hasOwnProperty(n)&&!at(r)&&!xr(r)?e[n]=Zl(o,r):e[n]=r}return e}const Cy=Symbol();function Ty(e){return!Xl(e)||!e.hasOwnProperty(Cy)}const{assign:mr}=Object;function Oy(e){return!!(at(e)&&e.effect)}function Ay(e,t,n,r){const{state:o,actions:i,getters:s}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=o?o():{});const c=on(n.state.value[e]);return mr(c,i,Object.keys(s||{}).reduce((d,p)=>(d[p]=$o(q(()=>{Ta(n);const h=n._s.get(e);return s[p].call(h,h)})),d),{}))}return l=hh(e,u,t,n,r,!0),l}function hh(e,t,n={},r,o,i){let s;const a=mr({actions:{}},n),l={deep:!0};let u,c,d=[],p=[],h;const v=r.state.value[e];!i&&!v&&(r.state.value[e]={}),U({});let b;function w(m){let g;u=c=!1,typeof m=="function"?(m(r.state.value[e]),g={type:li.patchFunction,storeId:e,events:h}):(Zl(r.state.value[e],m),g={type:li.patchObject,payload:m,storeId:e,events:h});const y=b=Symbol();Ke().then(()=>{b===y&&(u=!0)}),c=!0,ho(d,g,r.state.value[e])}const S=i?function(){const{state:g}=n,y=g?g():{};this.$patch(A=>{mr(A,y)})}:ph;function _(){s.stop(),d=[],p=[],r._s.delete(e)}function I(m,g){return function(){Ta(r);const y=Array.from(arguments),A=[],x=[];function C(E){A.push(E)}function k(E){x.push(E)}ho(p,{args:y,name:m,store:V,after:C,onError:k});let O;try{O=g.apply(this&&this.$id===e?this:V,y)}catch(E){throw ho(x,E),E}return O instanceof Promise?O.then(E=>(ho(A,E),E)).catch(E=>(ho(x,E),Promise.reject(E))):(ho(A,O),O)}}const F={_p:r,$id:e,$onAction:wd.bind(null,p),$patch:w,$reset:S,$subscribe(m,g={}){const y=wd(d,m,g.detached,()=>A()),A=s.run(()=>ye(()=>r.state.value[e],x=>{(g.flush==="sync"?c:u)&&m({storeId:e,type:li.direct,events:h},x)},mr({},l,g)));return y},$dispose:_},V=Tn(F);r._s.set(e,V);const H=(r._a&&r._a.runWithContext||Sy)(()=>r._e.run(()=>(s=Iu()).run(t)));for(const m in H){const g=H[m];if(at(g)&&!Oy(g)||xr(g))i||(v&&Ty(g)&&(at(g)?g.value=v[m]:Zl(g,v[m])),r.state.value[e][m]=g);else if(typeof g=="function"){const y=I(m,g);H[m]=y,a.actions[m]=g}}return mr(V,H),mr(Fe(V),H),Object.defineProperty(V,"$state",{get:()=>r.state.value[e],set:m=>{w(g=>{mr(g,m)})}}),r._p.forEach(m=>{mr(V,s.run(()=>m({store:V,app:r._a,pinia:r,options:a})))}),v&&i&&n.hydrate&&n.hydrate(V.$state,v),u=!0,c=!0,V}function mh(e,t,n){let r,o;const i=typeof t=="function";typeof e=="string"?(r=e,o=i?n:t):(o=e,r=e.id);function s(a,l){const u=E0();return a=a||(u?Wt(fh,null):null),a&&Ta(a),a=dh,a._s.has(r)||(i?hh(r,t,o,a):Ay(r,o,a)),a._s.get(r)}return s.$id=r,s}/** * @license lucide-vue-next v0.314.0 - ISC * * This source code is licensed under the ISC license. @@ -93,11 +93,11 @@ var tv=Object.defineProperty;var nv=(e,t,n)=>t in e?tv(e,t,{enumerable:!0,config * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yh=Yt("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Vy={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",width:"1080",height:"1080",style:{"shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision","image-rendering":"optimizeQuality","fill-rule":"evenodd","clip-rule":"evenodd"},viewBox:"0 0 1080 1079.97"},zy=Ee("path",{d:"M1077.57 522.51 924.31 163.72a29.93 29.93 0 0 0-16.49-16.17L545.72 2.18a30.34 30.34 0 0 0-23.15.23L163.73 155.68a29.9 29.9 0 0 0-16.17 16.49L2.21 534.27a30.04 30.04 0 0 0 .22 23.14L155.7 916.26a29.93 29.93 0 0 0 16.49 16.17l362.1 145.35a30.2 30.2 0 0 0 10.79 2.19h.92c3.89-.06 7.76-.85 11.47-2.47l358.8-153.26a29.93 29.93 0 0 0 16.17-16.49l145.36-362.1a30.09 30.09 0 0 0-.23-23.14zM505.71 678.68h209.02v97.12H365.27v-88.28L502.79 535.3 365.93 392.69v-88.52h348.8v97.11H510.17L636.99 534.1 505.71 678.68z",style:{fill:"#ff5537","fill-rule":"nonzero"}},null,-1),Hy=[zy];function jy(e,t){return D(),Te("svg",Vy,[...Hy])}const Uy={render:jy};function bh(e){return Wi()?(fa(e),!0):!1}function Oa(e){return typeof e=="function"?e():f(e)}const Wy=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Gy=e=>typeof e<"u",Ky=Object.prototype.toString,qy=e=>Ky.call(e)==="[object Object]",wh=()=>{};function Yy(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}const _h=e=>e();function Xy(e=_h){const t=U(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...i)=>{t.value&&e(...i)};return{isActive:Ir(t),pause:n,resume:r,eventFilter:o}}function Zy(e){return e||Rt()}function Qy(...e){if(e.length!==1)return vo(...e);const t=e[0];return typeof t=="function"?Ir(Pp(()=>({get:t,set:wh}))):U(t)}function Jy(e,t,n={}){const{eventFilter:r=_h,...o}=n;return ye(e,Yy(r,t),o)}function eb(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:i,pause:s,resume:a,isActive:l}=Xy(r);return{stop:Jy(e,t,{...o,eventFilter:i}),pause:s,resume:a,isActive:l}}function xh(e,t=!0,n){Zy()?Ue(e,n):t?e():Ke(e)}function Eh(e){var t;const n=Oa(e);return(t=n==null?void 0:n.$el)!=null?t:n}const _i=Wy?window:void 0;function _d(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=_i):[t,n,r,o]=e,!t)return wh;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,p,h)=>(c.addEventListener(d,p,h),()=>c.removeEventListener(d,p,h)),l=ye(()=>[Eh(t),Oa(o)],([c,d])=>{if(s(),!c)return;const p=qy(d)?{...d}:d;i.push(...n.flatMap(h=>r.map(v=>a(c,h,v,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return bh(u),u}function tb(){const e=U(!1);return Rt()&&Ue(()=>{e.value=!0}),e}function nb(e){const t=tb();return K(()=>(t.value,!!e()))}function rb(e,t={}){const{window:n=_i}=t,r=nb(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const i=U(!1),s=u=>{i.value=u.matches},a=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",s):o.removeListener(s))},l=vt(()=>{r.value&&(a(),o=n.matchMedia(Oa(e)),"addEventListener"in o?o.addEventListener("change",s):o.addListener(s),i.value=o.matches)});return bh(()=>{l(),a(),o=void 0}),i}function ob(e){return JSON.parse(JSON.stringify(e))}const os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},is="__vueuse_ssr_handlers__",ib=sb();function sb(){return is in os||(os[is]=os[is]||{}),os[is]}function Sh(e,t){return ib[e]||t}function ab(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const lb={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},xd="vueuse-storage";function Co(e,t,n,r={}){var o;const{flush:i="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=_i,eventFilter:p,onError:h=g=>{console.error(g)},initOnMounted:v}=r,b=(c?ga:U)(typeof t=="function"?t():t);if(!n)try{n=Sh("getDefaultStorage",()=>{var g;return(g=_i)==null?void 0:g.localStorage})()}catch(g){h(g)}if(!n)return b;const w=Oa(t),S=ab(w),_=(o=r.serializer)!=null?o:lb[S],{pause:I,resume:F}=eb(b,()=>V(b.value),{flush:i,deep:s,eventFilter:p});return d&&a&&xh(()=>{_d(d,"storage",m),_d(d,xd,H),v&&m()}),v||m(),b;function V(g){try{if(g==null)n.removeItem(e);else{const y=_.write(g),A=n.getItem(e);A!==y&&(n.setItem(e,y),d&&d.dispatchEvent(new CustomEvent(xd,{detail:{key:e,oldValue:A,newValue:y,storageArea:n}})))}}catch(y){h(y)}}function N(g){const y=g?g.newValue:n.getItem(e);if(y==null)return l&&w!=null&&n.setItem(e,_.write(w)),w;if(!g&&u){const A=_.read(y);return typeof u=="function"?u(A,w):S==="object"&&!Array.isArray(A)?{...w,...A}:A}else return typeof y!="string"?y:_.read(y)}function H(g){m(g.detail)}function m(g){if(!(g&&g.storageArea!==n)){if(g&&g.key==null){b.value=w;return}if(!(g&&g.key!==e)){I();try{(g==null?void 0:g.newValue)!==_.write(b.value)&&(b.value=N(g))}catch(y){h(y)}finally{g?Ke(F):F()}}}}}function ub(e){return rb("(prefers-color-scheme: dark)",e)}function cb(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:o=_i,storage:i,storageKey:s="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:u,disableTransition:c=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=ub({window:o}),h=K(()=>p.value?"dark":"light"),v=l||(s==null?Qy(r):Co(s,r,i,{window:o,listenToStorageChanges:a})),b=K(()=>v.value==="auto"?h.value:v.value),w=Sh("updateHTMLAttrs",(F,V,N)=>{const H=typeof F=="string"?o==null?void 0:o.document.querySelector(F):Eh(F);if(!H)return;let m;if(c){m=o.document.createElement("style");const g="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";m.appendChild(document.createTextNode(g)),o.document.head.appendChild(m)}if(V==="class"){const g=N.split(/\s/g);Object.values(d).flatMap(y=>(y||"").split(/\s/g)).filter(Boolean).forEach(y=>{g.includes(y)?H.classList.add(y):H.classList.remove(y)})}else H.setAttribute(V,N);c&&(o.getComputedStyle(m).opacity,document.head.removeChild(m))});function S(F){var V;w(t,n,(V=d[F])!=null?V:F)}function _(F){e.onChanged?e.onChanged(F,S):S(F)}ye(b,_,{flush:"post",immediate:!0}),xh(()=>_(b.value));const I=K({get(){return u?v.value:b.value},set(F){v.value=F}});try{return Object.assign(I,{store:v,system:h,state:b})}catch{return I}}const db=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],fb={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function pb(e){return e.toISOString().slice(0,10)}function hb(e,t={},n=Date.now()){var r;const{max:o,messages:i=fb,fullDateFormatter:s=pb,units:a=db,showSecond:l=!1,rounding:u="round"}=t,c=typeof u=="number"?w=>+w.toFixed(u):Math[u],d=+n-+e,p=Math.abs(d);function h(w,S){return c(Math.abs(w)/S.value)}function v(w,S){const _=h(w,S),I=w>0,F=b(S.name,_,I);return b(I?"past":"future",F,I)}function b(w,S,_){const I=i[w];return typeof I=="function"?I(S,_):I.replace("{0}",S.toString())}if(p<6e4&&!l)return i.justNow;if(typeof o=="number"&&p>o)return s(new Date(e));if(typeof o=="string"){const w=(r=a.find(S=>S.name===o))==null?void 0:r.max;if(w&&p>w)return s(new Date(e))}for(const[w,S]of a.entries()){if(h(d,S)<=0&&a[w-1])return v(d,a[w-1]);if(pa?typeof a=="function"?a(I):ob(I):I,S=()=>Gy(e[t])?w(e[t]):d,_=I=>{p?p(I)&&v(b,I):v(b,I)};if(l){const I=S(),F=U(I);let V=!1;return ye(()=>e[t],N=>{V||(V=!0,F.value=w(N),Ke(()=>V=!1))}),ye(F,N=>{!V&&(N!==e[t]||c)&&_(N)},{deep:c}),F}else return K({get(){return S()},set(I){_(I)}})}function Ch(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Sd=gb,Uu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const p=Ed(c)||Ed(d);return o[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(v=>{let[b,w]=v;return Array.isArray(w)?w.includes({...i,...a}[b]):{...i,...a}[b]===w})?[...u,d,p]:u},[]);return Sd(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Th(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:s.classGroupId}const Cd=/^\[(.+)\]$/;function bb(e){if(Cd.test(e)){const t=Cd.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function wb(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xb(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ql(s,r,i,t)}),r}function Ql(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Td(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(_b(o)){Ql(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ql(s,Td(t,i),n,r)})})}function Td(e,t){let n=e;return t.split(Wu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function _b(e){return e.isThemeGetter}function xb(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Eb(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Ah="!";function Sb(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const a=[];let l=0,u=0,c;for(let b=0;bu?c-u:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:v}}}function Cb(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Tb(e){return{cache:Eb(e.cacheSize),splitModifiers:Sb(e),...yb(e)}}const Ob=/\s+/;function Ab(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Ob).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:c}=n(s);let d=r(c?u.substring(0,c):u),p=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:s};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:s};p=!1}const h=Cb(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Ah:h,classGroupId:d,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=s,c=a+l;return i.has(c)?!1:(i.add(c),o(l,u).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Ib(){let e=0,t,n,r="";for(;ed(c),e());return n=Tb(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=Ab(l,n);return o(l,c),c}return function(){return i(Ib.apply(null,arguments))}}function tt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,Pb=/^\d+\/\d+$/,Bb=new Set(["px","full","screen"]),$b=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Db=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rb=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Mn(e){return Ur(e)||Bb.has(e)||Pb.test(e)}function lr(e){return No(e,"length",Wb)}function Ur(e){return!!e&&!Number.isNaN(Number(e))}function ss(e){return No(e,"number",Ur)}function Yo(e){return!!e&&Number.isInteger(Number(e))}function Fb(e){return e.endsWith("%")&&Ur(e.slice(0,-1))}function Ae(e){return kh.test(e)}function ur(e){return $b.test(e)}const Nb=new Set(["length","size","percentage"]);function Vb(e){return No(e,Nb,Ph)}function zb(e){return No(e,"position",Ph)}const Hb=new Set(["image","url"]);function jb(e){return No(e,Hb,Kb)}function Ub(e){return No(e,"",Gb)}function Xo(){return!0}function No(e,t,n){const r=kh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Wb(e){return Mb.test(e)&&!Db.test(e)}function Ph(){return!1}function Gb(e){return Rb.test(e)}function Kb(e){return Lb.test(e)}function qb(){const e=tt("colors"),t=tt("spacing"),n=tt("blur"),r=tt("brightness"),o=tt("borderColor"),i=tt("borderRadius"),s=tt("borderSpacing"),a=tt("borderWidth"),l=tt("contrast"),u=tt("grayscale"),c=tt("hueRotate"),d=tt("invert"),p=tt("gap"),h=tt("gradientColorStops"),v=tt("gradientColorStopPositions"),b=tt("inset"),w=tt("margin"),S=tt("opacity"),_=tt("padding"),I=tt("saturate"),F=tt("scale"),V=tt("sepia"),N=tt("skew"),H=tt("space"),m=tt("translate"),g=()=>["auto","contain","none"],y=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",Ae,t],x=()=>[Ae,t],C=()=>["",Mn,lr],k=()=>["auto",Ur,Ae],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],$=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",Ae],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[Ur,ss],ge=()=>[Ur,Ae];return{cacheSize:500,separator:":",theme:{colors:[Xo],spacing:[Mn,lr],blur:["none","",ur,Ae],brightness:ue(),borderColor:[e],borderRadius:["none","","full",ur,Ae],borderSpacing:x(),borderWidth:C(),contrast:ue(),grayscale:G(),hueRotate:ge(),invert:G(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[Fb,lr],inset:A(),margin:A(),opacity:ue(),padding:x(),saturate:ue(),scale:ue(),sepia:G(),skew:ge(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[ur]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),Ae]}],overflow:[{overflow:y()}],"overflow-x":[{"overflow-x":y()}],"overflow-y":[{"overflow-y":y()}],overscroll:[{overscroll:g()}],"overscroll-x":[{"overscroll-x":g()}],"overscroll-y":[{"overscroll-y":g()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yo,Ae]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",Yo,Ae]}],"grid-cols":[{"grid-cols":[Xo]}],"col-start-end":[{col:["auto",{span:["full",Yo,Ae]},Ae]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Xo]}],"row-start-end":[{row:["auto",{span:[Yo,Ae]},Ae]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,t]}],"min-w":[{"min-w":[Ae,t,"min","max","fit"]}],"max-w":[{"max-w":[Ae,t,"none","full","min","max","fit","prose",{screen:[ur]},ur]}],h:[{h:[Ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ur,lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ss]}],"font-family":[{font:[Xo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",Ur,ss]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,lr]}],"underline-offset":[{"underline-offset":["auto",Mn,Ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),zb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:E()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[Mn,Ae]}],"outline-w":[{outline:[Mn,lr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Mn,lr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ur,Ub]}],"shadow-color":[{shadow:[Xo]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":M()}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ur,Ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[I]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:ge()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:ge()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[Yo,Ae]}],"translate-x":[{"translate-x":[m]}],"translate-y":[{"translate-y":[m]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,lr,ss]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Yb=kb(qb);function $e(...e){return Yb(vb(e))}const Un=W({__name:"Button",props:{variant:{},size:{},as:{default:"button"},loading:{type:Boolean,default:!1}},setup(e){return(t,n)=>(D(),j(qn(t.as),{class:lt(f($e)(f(Xb)({variant:t.variant,size:t.size}),t.$attrs.class??""))},{default:B(()=>[t.loading?(D(),j(f(vh),{key:0,class:"animate-spin",size:16})):pt("",!0),t.loading&&t.$slots.loading?X(t.$slots,"loading",{key:1}):X(t.$slots,"default",{key:2})]),_:3},8,["class"]))}}),Xb=Uu("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),js=W({__name:"Card",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("rounded-lg border bg-card text-card-foreground shadow-sm",t.class))},[X(n.$slots,"default")],2))}}),Gu=W({__name:"CardHeader",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-1.5 p-6",t.class))},[X(n.$slots,"default")],2))}}),Ku=W({__name:"CardTitle",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("h3",{class:lt(f($e)("text-2xl font-semibold leading-none tracking-tighter",t.class))},[X(n.$slots,"default")],2))}}),Us=W({__name:"CardContent",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("p-6 pt-0",t.class))},[X(n.$slots,"default")],2))}}),Zb=1,Qb=1e6,Vn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let cl=0;function Jb(){return cl=(cl+1)%Number.MAX_VALUE,cl.toString()}const dl=new Map;function Od(e){if(dl.has(e))return;const t=setTimeout(()=>{dl.delete(e),ui({type:Vn.REMOVE_TOAST,toastId:e})},Qb);dl.set(e,t)}const dn=U({toasts:[]});function ui(e){switch(e.type){case Vn.ADD_TOAST:dn.value.toasts=[e.toast,...dn.value.toasts].slice(0,Zb);break;case Vn.UPDATE_TOAST:dn.value.toasts=dn.value.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t);break;case Vn.DISMISS_TOAST:{const{toastId:t}=e;t?Od(t):dn.value.toasts.forEach(n=>{Od(n.id)}),dn.value.toasts=dn.value.toasts.map(n=>n.id===t||t===void 0?{...n,open:!1}:n);break}case Vn.REMOVE_TOAST:e.toastId===void 0?dn.value.toasts=[]:dn.value.toasts=dn.value.toasts.filter(t=>t.id!==e.toastId);break}}function Aa(){return{toasts:K(()=>dn.value.toasts),toast:e1,dismiss:e=>ui({type:Vn.DISMISS_TOAST,toastId:e})}}function e1(e){const t=Jb(),n=o=>ui({type:Vn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ui({type:Vn.DISMISS_TOAST,toastId:t});return ui({type:Vn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}const t1=["top","right","bottom","left"],Tr=Math.min,Ut=Math.max,Ws=Math.round,as=Math.floor,Or=e=>({x:e,y:e}),n1={left:"right",right:"left",bottom:"top",top:"bottom"},r1={start:"end",end:"start"};function Jl(e,t,n){return Ut(e,Tr(t,n))}function Yn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function Vo(e){return e.split("-")[1]}function qu(e){return e==="x"?"y":"x"}function Yu(e){return e==="y"?"height":"width"}function zo(e){return["top","bottom"].includes(Xn(e))?"y":"x"}function Xu(e){return qu(zo(e))}function o1(e,t,n){n===void 0&&(n=!1);const r=Vo(e),o=Xu(e),i=Yu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Gs(s)),[s,Gs(s)]}function i1(e){const t=Gs(e);return[eu(e),t,eu(t)]}function eu(e){return e.replace(/start|end/g,t=>r1[t])}function s1(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function a1(e,t,n,r){const o=Vo(e);let i=s1(Xn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(eu)))),i}function Gs(e){return e.replace(/left|right|bottom|top/g,t=>n1[t])}function l1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bh(e){return typeof e!="number"?l1(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ad(e,t,n){let{reference:r,floating:o}=e;const i=zo(t),s=Xu(t),a=Yu(s),l=Xn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Vo(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const u1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Ad(u,r,l),p=r,h={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Yn(e,t)||{};if(u==null)return{};const d=Bh(c),p={x:n,y:r},h=Xu(o),v=Yu(h),b=await s.getDimensions(u),w=h==="y",S=w?"top":"left",_=w?"bottom":"right",I=w?"clientHeight":"clientWidth",F=i.reference[v]+i.reference[h]-p[h]-i.floating[v],V=p[h]-i.reference[h],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let H=N?N[I]:0;(!H||!await(s.isElement==null?void 0:s.isElement(N)))&&(H=a.floating[I]||i.floating[v]);const m=F/2-V/2,g=H/2-b[v]/2-1,y=Tr(d[S],g),A=Tr(d[_],g),x=y,C=H-b[v]-A,k=H/2-b[v]/2+m,O=Jl(x,k,C),E=!l.arrow&&Vo(o)!=null&&k!=O&&i.reference[v]/2-(kx<=0)){var g,y;const x=(((g=i.flip)==null?void 0:g.index)||0)+1,C=V[x];if(C)return{data:{index:x,overflows:m},reset:{placement:C}};let k=(y=m.filter(O=>O.overflows[0]<=0).sort((O,E)=>O.overflows[1]-E.overflows[1])[0])==null?void 0:y.placement;if(!k)switch(h){case"bestFit":{var A;const O=(A=m.map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,$)=>M+$,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:A[0];O&&(k=O);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function Id(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kd(e){return t1.some(t=>e[t]>=0)}const f1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Yn(e,t);switch(r){case"referenceHidden":{const i=await xi(t,{...o,elementContext:"reference"}),s=Id(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:kd(s)}}}case"escaped":{const i=await xi(t,{...o,altBoundary:!0}),s=Id(i,n.floating);return{data:{escapedOffsets:s,escaped:kd(s)}}}default:return{}}}}};async function p1(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xn(n),a=Vo(n),l=zo(n)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Yn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}const h1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await p1(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},m1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:S,y:_}=w;return{x:S,y:_}}},...l}=Yn(e,t),u={x:n,y:r},c=await xi(t,l),d=zo(Xn(o)),p=qu(d);let h=u[p],v=u[d];if(i){const w=p==="y"?"top":"left",S=p==="y"?"bottom":"right",_=h+c[w],I=h-c[S];h=Jl(_,h,I)}if(s){const w=d==="y"?"top":"left",S=d==="y"?"bottom":"right",_=v+c[w],I=v-c[S];v=Jl(_,v,I)}const b=a.fn({...t,[p]:h,[d]:v});return{...b,data:{x:b.x-n,y:b.y-r}}}}},g1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Yn(e,t),c={x:n,y:r},d=zo(o),p=qu(d);let h=c[p],v=c[d];const b=Yn(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const I=p==="y"?"height":"width",F=i.reference[p]-i.floating[I]+w.mainAxis,V=i.reference[p]+i.reference[I]-w.mainAxis;hV&&(h=V)}if(u){var S,_;const I=p==="y"?"width":"height",F=["top","left"].includes(Xn(o)),V=i.reference[d]-i.floating[I]+(F&&((S=s.offset)==null?void 0:S[d])||0)+(F?0:w.crossAxis),N=i.reference[d]+i.reference[I]+(F?0:((_=s.offset)==null?void 0:_[d])||0)-(F?w.crossAxis:0);vN&&(v=N)}return{[p]:h,[d]:v}}}},v1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=Yn(e,t),l=await xi(t,a),u=Xn(n),c=Vo(n),d=zo(n)==="y",{width:p,height:h}=r.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,v=c==="end"?"top":"bottom");const w=h-l[v],S=p-l[b],_=!t.middlewareData.shift;let I=w,F=S;if(d){const N=p-l.left-l.right;F=c||_?Tr(S,N):N}else{const N=h-l.top-l.bottom;I=c||_?Tr(w,N):N}if(_&&!c){const N=Ut(l.left,0),H=Ut(l.right,0),m=Ut(l.top,0),g=Ut(l.bottom,0);d?F=p-2*(N!==0||H!==0?N+H:Ut(l.left,l.right)):I=h-2*(m!==0||g!==0?m+g:Ut(l.top,l.bottom))}await s({...t,availableWidth:F,availableHeight:I});const V=await o.getDimensions(i.floating);return p!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function Ar(e){return $h(e)?(e.nodeName||"").toLowerCase():"#document"}function Gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=($h(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $h(e){return e instanceof Node||e instanceof Gt(e).Node}function Zn(e){return e instanceof Element||e instanceof Gt(e).Element}function An(e){return e instanceof HTMLElement||e instanceof Gt(e).HTMLElement}function Pd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gt(e).ShadowRoot}function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function y1(e){return["table","td","th"].includes(Ar(e))}function Zu(e){const t=Qu(),n=rn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b1(e){let t=Mo(e);for(;An(t)&&!Ia(t);){if(Zu(t))return t;t=Mo(t)}return null}function Qu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ia(e){return["html","body","#document"].includes(Ar(e))}function rn(e){return Gt(e).getComputedStyle(e)}function ka(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Mo(e){if(Ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pd(e)&&e.host||er(e);return Pd(t)?t.host:t}function Mh(e){const t=Mo(e);return Ia(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&Ki(t)?t:Mh(t)}function Ei(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mh(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Gt(o);return i?t.concat(s,s.visualViewport||[],Ki(o)?o:[],s.frameElement&&n?Ei(s.frameElement):[]):t.concat(o,Ei(o,[],n))}function Dh(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=An(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ws(n)!==i||Ws(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ju(e){return Zn(e)?e:e.contextElement}function To(e){const t=Ju(e);if(!An(t))return Or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dh(t);let s=(i?Ws(n.width):n.width)/r,a=(i?Ws(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const w1=Or(0);function Rh(e){const t=Gt(e);return!Qu()||!t.visualViewport?w1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gt(e)?!1:t}function to(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ju(e);let s=Or(1);t&&(r?Zn(r)&&(s=To(r)):s=To(e));const a=_1(i,n,r)?Rh(i):Or(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const p=Gt(i),h=r&&Zn(r)?Gt(r):r;let v=p.frameElement;for(;v&&r&&h!==p;){const b=To(v),w=v.getBoundingClientRect(),S=rn(v),_=w.left+(v.clientLeft+parseFloat(S.paddingLeft))*b.x,I=w.top+(v.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=_,u+=I,v=Gt(v).frameElement}}return Ks({width:c,height:d,x:l,y:u})}function x1(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=An(n),i=er(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Or(1);const l=Or(0);if((o||!o&&r!=="fixed")&&((Ar(n)!=="body"||Ki(i))&&(s=ka(n)),An(n))){const u=to(n);a=To(n),l.x=u.x+n.clientLeft,l.y=u.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 E1(e){return Array.from(e.getClientRects())}function Lh(e){return to(er(e)).left+ka(e).scrollLeft}function S1(e){const t=er(e),n=ka(e),r=e.ownerDocument.body,o=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Lh(e);const a=-n.scrollTop;return rn(r).direction==="rtl"&&(s+=Ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function C1(e,t){const n=Gt(e),r=er(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Qu();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function T1(e,t){const n=to(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=An(e)?To(e):Or(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Bd(e,t,n){let r;if(t==="viewport")r=C1(e,n);else if(t==="document")r=S1(er(e));else if(Zn(t))r=T1(t,n);else{const o=Rh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ks(r)}function Fh(e,t){const n=Mo(e);return n===t||!Zn(n)||Ia(n)?!1:rn(n).position==="fixed"||Fh(n,t)}function O1(e,t){const n=t.get(e);if(n)return n;let r=Ei(e,[],!1).filter(a=>Zn(a)&&Ar(a)!=="body"),o=null;const i=rn(e).position==="fixed";let s=i?Mo(e):e;for(;Zn(s)&&!Ia(s);){const a=rn(s),l=Zu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ki(s)&&!l&&Fh(e,s))?r=r.filter(c=>c!==s):o=a,s=Mo(s)}return t.set(e,r),r}function A1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?O1(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const d=Bd(t,c,o);return u.top=Ut(d.top,u.top),u.right=Tr(d.right,u.right),u.bottom=Tr(d.bottom,u.bottom),u.left=Ut(d.left,u.left),u},Bd(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function I1(e){return Dh(e)}function k1(e,t,n){const r=An(t),o=er(t),i=n==="fixed",s=to(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Or(0);if(r||!r&&!i)if((Ar(t)!=="body"||Ki(o))&&(a=ka(t)),r){const u=to(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=Lh(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function $d(e,t){return!An(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Nh(e,t){const n=Gt(e);if(!An(e))return n;let r=$d(e,t);for(;r&&y1(r)&&rn(r).position==="static";)r=$d(r,t);return r&&(Ar(r)==="html"||Ar(r)==="body"&&rn(r).position==="static"&&!Zu(r))?n:r||b1(e)||n}const P1=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Nh,i=this.getDimensions;return{reference:k1(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function B1(e){return rn(e).direction==="rtl"}const $1={convertOffsetParentRelativeRectToViewportRelativeRect:x1,getDocumentElement:er,getClippingRect:A1,getOffsetParent:Nh,getElementRects:P1,getClientRects:E1,getDimensions:I1,getScale:To,isElement:Zn,isRTL:B1};function M1(e,t){let n=null,r;const o=er(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const h=as(c),v=as(o.clientWidth-(u+d)),b=as(o.clientHeight-(c+p)),w=as(u),_={rootMargin:-h+"px "+-v+"px "+-b+"px "+-w+"px",threshold:Ut(0,Tr(1,l))||1};let I=!0;function F(V){const N=V[0].intersectionRatio;if(N!==l){if(!I)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(F,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(F,_)}n.observe(e)}return s(!0),i}function D1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ju(e),c=o||i?[...u?Ei(u):[],...Ei(t)]:[];c.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const d=u&&a?M1(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(S=>{let[_]=S;_&&_.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,b=l?to(e):null;l&&w();function w(){const S=to(e);b&&(S.x!==b.x||S.y!==b.y||S.width!==b.width||S.height!==b.height)&&n(),b=S,v=requestAnimationFrame(w)}return n(),()=>{c.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const R1=(e,t,n)=>{const r=new Map,o={platform:$1,...n},i={...o.platform,_c:r};return u1(e,t,{...o,platform:i})};function tu(e){var t;return(t=e==null?void 0:e.$el)!=null?t:e}function L1(e){return{name:"arrow",options:e,fn(t){const n=tu(f(e.element));return n==null?{}:c1({element:n,padding:e.padding}).fn(t)}}}function Vh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Md(e,t){const n=Vh(e);return Math.round(t*n)/n}function F1(e,t,n){n===void 0&&(n={});const r=n.whileElementsMounted,o=K(()=>{var H;return(H=f(n.open))!=null?H:!0}),i=K(()=>f(n.middleware)),s=K(()=>{var H;return(H=f(n.placement))!=null?H:"bottom"}),a=K(()=>{var H;return(H=f(n.strategy))!=null?H:"absolute"}),l=K(()=>{var H;return(H=f(n.transform))!=null?H:!0}),u=K(()=>tu(e.value)),c=K(()=>tu(t.value)),d=U(0),p=U(0),h=U(a.value),v=U(s.value),b=ga({}),w=U(!1),S=K(()=>{const H={position:h.value,left:"0",top:"0"};if(!c.value)return H;const m=Md(c.value,d.value),g=Md(c.value,p.value);return l.value?{...H,transform:"translate("+m+"px, "+g+"px)",...Vh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:m+"px",top:g+"px"}});let _;function I(){u.value==null||c.value==null||R1(u.value,c.value,{middleware:i.value,placement:s.value,strategy:a.value}).then(H=>{d.value=H.x,p.value=H.y,h.value=H.strategy,v.value=H.placement,b.value=H.middlewareData,w.value=!0})}function F(){typeof _=="function"&&(_(),_=void 0)}function V(){if(F(),r===void 0){I();return}if(u.value!=null&&c.value!=null){_=r(u.value,c.value,I);return}}function N(){o.value||(w.value=!1)}return ye([i,s,a],I,{flush:"sync"}),ye([u,c],V,{flush:"sync"}),ye(o,N,{flush:"sync"}),Wi()&&fa(F),{x:po(d),y:po(p),strategy:po(h),placement:po(v),middlewareData:po(b),isPositioned:po(w),floatingStyles:S,update:I}}function Tt(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,r=Symbol(n);return[o=>{const i=Wt(r,o);if(i||i===null)return i;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Fo(r,o),o)]}function ec(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function N1(e,t){var n;const r=ga();return vt(()=>{r.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!=null?n:"sync"}),Ir(r)}function zh(e,t){let n,r,o;const i=U(!0),s=()=>{i.value=!0,o()};ye(e,s,{flush:"sync"});const a=typeof t=="function"?t:t.get,l=typeof t=="function"?void 0:t.set,u=Pp((c,d)=>(r=c,o=d,{get(){return i.value&&(n=a(),i.value=!1),r(),n},set(p){l==null||l(p)}}));return Object.isExtensible(u)&&(u.trigger=s),u}function Pa(e){return Wi()?(fa(e),!0):!1}function Ba(e){let t=!1,n;const r=Iu(!0);return(...o)=>(t||(n=r.run(()=>e(...o)),t=!0),n)}function no(e){return typeof e=="function"?e():f(e)}const kr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const V1=e=>typeof e<"u",z1=Object.prototype.toString,H1=e=>z1.call(e)==="[object Object]",qs=()=>{},Dd=j1();function j1(){var e,t;return kr&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function U1(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}function W1(e,t={}){let n,r,o=qs;const i=s=>{clearTimeout(s),o(),o=qs};return s=>{const a=no(e),l=no(t.maxWait);return n&&i(n),a<=0||l!==void 0&&l<=0?(r&&(i(r),r=null),Promise.resolve(s())):new Promise((u,c)=>{o=t.rejectOnCancel?c:u,l&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,u(s())},l)),n=setTimeout(()=>{r&&i(r),r=null,u(s())},a)})}}function Hh(e,t=200,n={}){return U1(W1(t,n),e)}function tc(e,t,n={}){const{immediate:r=!0}=n,o=U(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function a(){o.value=!1,s()}function l(...u){s(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,e(...u)},no(t))}return r&&(o.value=!0,kr&&l()),Pa(a),{isPending:Ir(o),start:l,stop:a}}function G1(e=1e3,t={}){const{controls:n=!1,callback:r}=t,o=tc(r??qs,e,t),i=K(()=>!o.isPending.value);return n?{ready:i,...o}:i}function K1(e,t,n){const r=ye(e,(...o)=>(Ke(()=>r()),t(...o)),n);return r}function vn(e){var t;const n=no(e);return(t=n==null?void 0:n.$el)!=null?t:n}const $a=kr?window:void 0;function Ys(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=$a):[t,n,r,o]=e,!t)return qs;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,p,h)=>(c.addEventListener(d,p,h),()=>c.removeEventListener(d,p,h)),l=ye(()=>[vn(t),no(o)],([c,d])=>{if(s(),!c)return;const p=H1(d)?{...d}:d;i.push(...n.flatMap(h=>r.map(v=>a(c,h,v,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return Pa(u),u}function q1(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nc(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=$a,eventName:i="keydown",passive:s=!1,dedupe:a=!1}=r,l=q1(t);return Ys(o,i,u=>{u.repeat&&no(a)||l(u)&&n(u)},s)}function jh(){const e=U(!1);return Rt()&&Ue(()=>{e.value=!0}),e}function Y1(e){const t=jh();return K(()=>(t.value,!!e()))}function X1(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:o=$a}=t,i=U(!1),s=r?1e3/r:null;let a=0,l=null;function u(p){if(!i.value||!o)return;const h=p-(a||p);if(s&&hr&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},l=K(()=>Array.isArray(e)?e.map(d=>vn(d)):[vn(e)]),u=ye(l,d=>{if(a(),s.value&&r){i=new ResizeObserver(t);for(const p of d)p&&i.observe(p,o)}},{immediate:!0,flush:"post",deep:!0}),c=()=>{a(),u()};return Pa(c),{isSupported:s,stop:c}}function Yr(e,t,n,r={}){var o,i,s;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:p}=r,h=Rt(),v=n||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((s=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let b=u;t||(t="modelValue"),b=b||`update:${t.toString()}`;const w=I=>a?typeof a=="function"?a(I):Z1(I):I,S=()=>V1(e[t])?w(e[t]):d,_=I=>{p?p(I)&&v(b,I):v(b,I)};if(l){const I=S(),F=U(I);let V=!1;return ye(()=>e[t],N=>{V||(V=!0,F.value=w(N),Ke(()=>V=!1))}),ye(F,N=>{!V&&(N!==e[t]||c)&&_(N)},{deep:c}),F}else return K({get(){return S()},set(I){_(I)}})}function rc(e){return e?e.flatMap(t=>t.type===qe?rc(t.children):[t]):[]}function fl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function nu(e,t,n=".",r){if(!fl(t))return nu(e,{},n,r);const o=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const s=e[i];s!=null&&(r&&r(o,i,s,n)||(Array.isArray(s)&&Array.isArray(o[i])?o[i]=[...s,...o[i]]:fl(s)&&fl(o[i])?o[i]=nu(s,o[i],(n?`${n}.`:"")+i.toString(),r):o[i]=s))}return o}function Q1(e){return(...t)=>t.reduce((n,r)=>nu(n,r,"",e),{})}const J1=Q1(),[Uh,MP]=Tt("ConfigProvider"),ew=Ba(()=>U()),tw=Ba(()=>U(0));function oc(e){const t=Uh({scrollBody:U(!0)}),n=tw(),r=ew(),o=U(e);let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=r.value??"",Dd&&(i==null||i()),r.value=void 0};return e&&n.value++,ye(o,a=>{var l;if(kr&&a){r.value===void 0&&(r.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,c={padding:u,margin:0},d=(l=t.scrollBody)!=null&&l.value?typeof t.scrollBody.value=="object"?J1({padding:t.scrollBody.value.padding===!0?u:t.scrollBody.value.padding,margin:t.scrollBody.value.margin===!0?u:t.scrollBody.value.margin},c):c:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=`${d.padding}px`,document.body.style.marginRight=`${d.margin}px`,document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Dd&&(i=Ys(document,"touchmove",p=>{var h;p.target===document.documentElement&&(p.touches.length>1||(h=p.preventDefault)==null||h.call(p))},{passive:!1})),Ke(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}},{immediate:!0}),_a(()=>{e&&n.value--,n.value===0&&s()}),o}const nw="data-radix-vue-collection-item";function rw(e,t=nw){const n=e??Symbol();return{createCollection:r=>{const o=U([]);function i(){const s=vn(r);return s?o.value=Array.from(s.querySelectorAll(`[${t}]:not([data-disabled=true])`)):o.value=[]}return Up(()=>{o.value=[]}),Ue(i),Wp(i),ye(()=>r==null?void 0:r.value,i,{immediate:!0}),Fo(n,o),o},injectCollection:()=>Wt(n,U([]))}}function Wh(e){const t=Uh({dir:U("ltr")});return K(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}function uo(e){const t=Rt(),n=t==null?void 0:t.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(o=>{r[Ts(nn(o))]=(...i)=>e(o,...i)}),r}let pl=0;function ow(){vt(e=>{if(!kr)return;const t=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Rd()),document.body.insertAdjacentElement("beforeend",t[1]??Rd()),pl++,e(()=>{pl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),pl--})})}function Rd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function iw(e){return K(()=>{var t;return no(e)?!!((t=vn(e))!=null&&t.closest("form")):!0})}function ic(e){const t=Rt(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,o)=>{const i=(t==null?void 0:t.type.props[o]).default;return i!==void 0&&(r[o]=i),r},{});return zh(()=>({...e}),()=>{const r={},o=(t==null?void 0:t.vnode.props)??{};return Object.keys(o).forEach(i=>{r[nn(i)]=o[i]}),Object.keys({...n,...r}).reduce((i,s)=>(e[s]!==void 0&&(i[s]=e[s]),i),{})})}function sn(e,t){const n=ic(e),r=t?uo(t):{};return K(()=>({...n.value,...r}))}function tr(){const e=Rt();function t(n){typeof n=="object"&&(e.exposed=n,e.exposeProxy=n)}return t}var sw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mo=new WeakMap,ls=new WeakMap,us={},hl=0,Gh=function(e){return e&&(e.host||Gh(e.parentNode))},aw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},lw=function(e,t,n,r){var o=aw(t,Array.isArray(e)?e:[e]);us[n]||(us[n]=new WeakMap);var i=us[n],s=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else{var h=p.getAttribute(r),v=h!==null&&h!=="false",b=(mo.get(p)||0)+1,w=(i.get(p)||0)+1;mo.set(p,b),i.set(p,w),s.push(p),b===1&&v&&ls.set(p,!0),w===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}})};return c(t),a.clear(),hl++,function(){s.forEach(function(d){var p=mo.get(d)-1,h=i.get(d)-1;mo.set(d,p),i.set(d,h),p||(ls.has(d)||d.removeAttribute(r),ls.delete(d)),h||d.removeAttribute(n)}),hl--,hl||(mo=new WeakMap,mo=new WeakMap,ls=new WeakMap,us={})}},uw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||sw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),lw(r,o,n,"aria-hidden")):function(){return null}};function sc(e){let t;ye(()=>vn(e),n=>{n?t=uw(n):t&&t()}),Bn(()=>{t&&t()})}const cw=Ba(()=>({count:U(0)}));function Wn(e){const{count:t}=cw();return e||t.value++,e||`radix-${t.value}`}function dw(e){const t=U(),n=K(()=>{var o;return((o=t.value)==null?void 0:o.width)??0}),r=K(()=>{var o;return((o=t.value)==null?void 0:o.height)??0});return Ue(()=>{const o=vn(e);if(o){t.value={width:o.offsetWidth,height:o.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=o.offsetWidth,u=o.offsetHeight;t.value={width:l,height:u}});return i.observe(o,{box:"border-box"}),()=>i.unobserve(o)}else t.value=void 0}),{width:n,height:r}}function Kh(e,t){const n=U(e);function r(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=r(o)}}}const Ma=W({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var r,o;if(!n.default)return null;const i=rc(n.default()),[s,...a]=i;if(Object.keys(t).length>0){(r=s.props)==null||delete r.ref;const l=ce(t,s.props??{});t.class&&(o=s.props)!=null&&o.class&&delete s.props.class;const u=Jr(s,l);for(const c in l)c.startsWith("on")&&(u.props||(u.props={}),u.props[c]=l[c]);return i.length===1?u:[u,...a]}return i}}}),Be=W({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){return(e.asChild?"template":e.as)!=="template"?()=>On(e.as,t,{default:n.default}):()=>On(Ma,t,{default:n.default})}});function Qe(){const e=U(),t=K(()=>{var n,r;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(r=e.value)==null?void 0:r.$el.nextElementSibling:vn(e)});return{primitiveElement:e,currentElement:t}}function fw(e,t){const n=U({}),r=U("none"),o=e.value?"mounted":"unmounted",{state:i,dispatch:s}=Kh(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ye(e,async(d,p)=>{var h;const v=p!==d;if(await Ke(),v){const b=r.value,w=cs(t.value);d?s("MOUNT"):w==="none"||((h=n.value)==null?void 0:h.display)==="none"?s("UNMOUNT"):s(p&&b!==w?"ANIMATION_OUT":"UNMOUNT")}},{immediate:!0});const a=d=>{const p=cs(t.value),h=p.includes(d.animationName);d.target===t.value&&h&&s("ANIMATION_END"),d.target===t.value&&p==="none"&&s("ANIMATION_END")},l=d=>{d.target===t.value&&(r.value=cs(t.value))},u=ye(t,(d,p)=>{d?(n.value=getComputedStyle(d),d.addEventListener("animationstart",l),d.addEventListener("animationcancel",a),d.addEventListener("animationend",a)):(s("ANIMATION_END"),p==null||p.removeEventListener("animationstart",l),p==null||p.removeEventListener("animationcancel",a),p==null||p.removeEventListener("animationend",a))},{immediate:!0}),c=ye(i,()=>{const d=cs(t.value);r.value=i.value==="mounted"?d:"none"});return Bn(()=>{u(),c()}),{isPresent:K(()=>["mounted","unmountSuspended"].includes(i.value))}}function cs(e){return e&&getComputedStyle(e).animationName||"none"}const Pr=W({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;const{present:o,forceMount:i}=on(e),s=U(),{isPresent:a}=fw(o,s);n({present:a});let l=t.default({present:a});l=rc(l||[]);const u=Rt();if(l&&(l==null?void 0:l.length)>1){const c=(r=u==null?void 0:u.parent)!=null&&r.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(` + */const yh=Yt("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bh(e){return Wi()?(fa(e),!0):!1}function Oa(e){return typeof e=="function"?e():f(e)}const Vy=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zy=e=>typeof e<"u",Hy=Object.prototype.toString,jy=e=>Hy.call(e)==="[object Object]",wh=()=>{};function Uy(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}const _h=e=>e();function Wy(e=_h){const t=U(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...i)=>{t.value&&e(...i)};return{isActive:Ir(t),pause:n,resume:r,eventFilter:o}}function Gy(e){return e||Rt()}function Ky(...e){if(e.length!==1)return vo(...e);const t=e[0];return typeof t=="function"?Ir(Pp(()=>({get:t,set:wh}))):U(t)}function qy(e,t,n={}){const{eventFilter:r=_h,...o}=n;return ye(e,Uy(r,t),o)}function Yy(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:i,pause:s,resume:a,isActive:l}=Wy(r);return{stop:qy(e,t,{...o,eventFilter:i}),pause:s,resume:a,isActive:l}}function xh(e,t=!0,n){Gy()?Ue(e,n):t?e():Ke(e)}function Eh(e){var t;const n=Oa(e);return(t=n==null?void 0:n.$el)!=null?t:n}const _i=Vy?window:void 0;function _d(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=_i):[t,n,r,o]=e,!t)return wh;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,p,h)=>(c.addEventListener(d,p,h),()=>c.removeEventListener(d,p,h)),l=ye(()=>[Eh(t),Oa(o)],([c,d])=>{if(s(),!c)return;const p=jy(d)?{...d}:d;i.push(...n.flatMap(h=>r.map(v=>a(c,h,v,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return bh(u),u}function Xy(){const e=U(!1);return Rt()&&Ue(()=>{e.value=!0}),e}function Zy(e){const t=Xy();return q(()=>(t.value,!!e()))}function Qy(e,t={}){const{window:n=_i}=t,r=Zy(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const i=U(!1),s=u=>{i.value=u.matches},a=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",s):o.removeListener(s))},l=vt(()=>{r.value&&(a(),o=n.matchMedia(Oa(e)),"addEventListener"in o?o.addEventListener("change",s):o.addListener(s),i.value=o.matches)});return bh(()=>{l(),a(),o=void 0}),i}function Jy(e){return JSON.parse(JSON.stringify(e))}const os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},is="__vueuse_ssr_handlers__",eb=tb();function tb(){return is in os||(os[is]=os[is]||{}),os[is]}function Sh(e,t){return eb[e]||t}function nb(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const rb={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},xd="vueuse-storage";function Co(e,t,n,r={}){var o;const{flush:i="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=_i,eventFilter:p,onError:h=g=>{console.error(g)},initOnMounted:v}=r,b=(c?ga:U)(typeof t=="function"?t():t);if(!n)try{n=Sh("getDefaultStorage",()=>{var g;return(g=_i)==null?void 0:g.localStorage})()}catch(g){h(g)}if(!n)return b;const w=Oa(t),S=nb(w),_=(o=r.serializer)!=null?o:rb[S],{pause:I,resume:F}=Yy(b,()=>V(b.value),{flush:i,deep:s,eventFilter:p});return d&&a&&xh(()=>{_d(d,"storage",m),_d(d,xd,H),v&&m()}),v||m(),b;function V(g){try{if(g==null)n.removeItem(e);else{const y=_.write(g),A=n.getItem(e);A!==y&&(n.setItem(e,y),d&&d.dispatchEvent(new CustomEvent(xd,{detail:{key:e,oldValue:A,newValue:y,storageArea:n}})))}}catch(y){h(y)}}function N(g){const y=g?g.newValue:n.getItem(e);if(y==null)return l&&w!=null&&n.setItem(e,_.write(w)),w;if(!g&&u){const A=_.read(y);return typeof u=="function"?u(A,w):S==="object"&&!Array.isArray(A)?{...w,...A}:A}else return typeof y!="string"?y:_.read(y)}function H(g){m(g.detail)}function m(g){if(!(g&&g.storageArea!==n)){if(g&&g.key==null){b.value=w;return}if(!(g&&g.key!==e)){I();try{(g==null?void 0:g.newValue)!==_.write(b.value)&&(b.value=N(g))}catch(y){h(y)}finally{g?Ke(F):F()}}}}}function ob(e){return Qy("(prefers-color-scheme: dark)",e)}function ib(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:o=_i,storage:i,storageKey:s="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:u,disableTransition:c=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},p=ob({window:o}),h=q(()=>p.value?"dark":"light"),v=l||(s==null?Ky(r):Co(s,r,i,{window:o,listenToStorageChanges:a})),b=q(()=>v.value==="auto"?h.value:v.value),w=Sh("updateHTMLAttrs",(F,V,N)=>{const H=typeof F=="string"?o==null?void 0:o.document.querySelector(F):Eh(F);if(!H)return;let m;if(c){m=o.document.createElement("style");const g="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";m.appendChild(document.createTextNode(g)),o.document.head.appendChild(m)}if(V==="class"){const g=N.split(/\s/g);Object.values(d).flatMap(y=>(y||"").split(/\s/g)).filter(Boolean).forEach(y=>{g.includes(y)?H.classList.add(y):H.classList.remove(y)})}else H.setAttribute(V,N);c&&(o.getComputedStyle(m).opacity,document.head.removeChild(m))});function S(F){var V;w(t,n,(V=d[F])!=null?V:F)}function _(F){e.onChanged?e.onChanged(F,S):S(F)}ye(b,_,{flush:"post",immediate:!0}),xh(()=>_(b.value));const I=q({get(){return u?v.value:b.value},set(F){v.value=F}});try{return Object.assign(I,{store:v,system:h,state:b})}catch{return I}}const sb=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],ab={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function lb(e){return e.toISOString().slice(0,10)}function ub(e,t={},n=Date.now()){var r;const{max:o,messages:i=ab,fullDateFormatter:s=lb,units:a=sb,showSecond:l=!1,rounding:u="round"}=t,c=typeof u=="number"?w=>+w.toFixed(u):Math[u],d=+n-+e,p=Math.abs(d);function h(w,S){return c(Math.abs(w)/S.value)}function v(w,S){const _=h(w,S),I=w>0,F=b(S.name,_,I);return b(I?"past":"future",F,I)}function b(w,S,_){const I=i[w];return typeof I=="function"?I(S,_):I.replace("{0}",S.toString())}if(p<6e4&&!l)return i.justNow;if(typeof o=="number"&&p>o)return s(new Date(e));if(typeof o=="string"){const w=(r=a.find(S=>S.name===o))==null?void 0:r.max;if(w&&p>w)return s(new Date(e))}for(const[w,S]of a.entries()){if(h(d,S)<=0&&a[w-1])return v(d,a[w-1]);if(pa?typeof a=="function"?a(I):Jy(I):I,S=()=>zy(e[t])?w(e[t]):d,_=I=>{p?p(I)&&v(b,I):v(b,I)};if(l){const I=S(),F=U(I);let V=!1;return ye(()=>e[t],N=>{V||(V=!0,F.value=w(N),Ke(()=>V=!1))}),ye(F,N=>{!V&&(N!==e[t]||c)&&_(N)},{deep:c}),F}else return q({get(){return S()},set(I){_(I)}})}const db={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",width:"1080",height:"1080",style:{"shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision","image-rendering":"optimizeQuality","fill-rule":"evenodd","clip-rule":"evenodd"},viewBox:"0 0 1080 1079.97"},fb=Se("path",{d:"M1077.57 522.51 924.31 163.72a29.93 29.93 0 0 0-16.49-16.17L545.72 2.18a30.34 30.34 0 0 0-23.15.23L163.73 155.68a29.9 29.9 0 0 0-16.17 16.49L2.21 534.27a30.04 30.04 0 0 0 .22 23.14L155.7 916.26a29.93 29.93 0 0 0 16.49 16.17l362.1 145.35a30.2 30.2 0 0 0 10.79 2.19h.92c3.89-.06 7.76-.85 11.47-2.47l358.8-153.26a29.93 29.93 0 0 0 16.17-16.49l145.36-362.1a30.09 30.09 0 0 0-.23-23.14zM505.71 678.68h209.02v97.12H365.27v-88.28L502.79 535.3 365.93 392.69v-88.52h348.8v97.11H510.17L636.99 534.1 505.71 678.68z",style:{fill:"#ff5537","fill-rule":"nonzero"}},null,-1),pb=[fb];function hb(e,t){return D(),Te("svg",db,[...pb])}const mb={render:hb};function Ch(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Sd=gb,Uu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const p=Ed(c)||Ed(d);return o[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(v=>{let[b,w]=v;return Array.isArray(w)?w.includes({...i,...a}[b]):{...i,...a}[b]===w})?[...u,d,p]:u},[]);return Sd(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Th(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:s.classGroupId}const Cd=/^\[(.+)\]$/;function bb(e){if(Cd.test(e)){const t=Cd.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function wb(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xb(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ql(s,r,i,t)}),r}function Ql(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Td(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(_b(o)){Ql(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ql(s,Td(t,i),n,r)})})}function Td(e,t){let n=e;return t.split(Wu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function _b(e){return e.isThemeGetter}function xb(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Eb(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Ah="!";function Sb(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const a=[];let l=0,u=0,c;for(let b=0;bu?c-u:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:v}}}function Cb(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Tb(e){return{cache:Eb(e.cacheSize),splitModifiers:Sb(e),...yb(e)}}const Ob=/\s+/;function Ab(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Ob).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:c}=n(s);let d=r(c?u.substring(0,c):u),p=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:s};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:s};p=!1}const h=Cb(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Ah:h,classGroupId:d,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=s,c=a+l;return i.has(c)?!1:(i.add(c),o(l,u).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Ib(){let e=0,t,n,r="";for(;ed(c),e());return n=Tb(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=Ab(l,n);return o(l,c),c}return function(){return i(Ib.apply(null,arguments))}}function tt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,Pb=/^\d+\/\d+$/,Bb=new Set(["px","full","screen"]),$b=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Db=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rb=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Mn(e){return Ur(e)||Bb.has(e)||Pb.test(e)}function lr(e){return No(e,"length",Wb)}function Ur(e){return!!e&&!Number.isNaN(Number(e))}function ss(e){return No(e,"number",Ur)}function Yo(e){return!!e&&Number.isInteger(Number(e))}function Fb(e){return e.endsWith("%")&&Ur(e.slice(0,-1))}function Ae(e){return kh.test(e)}function ur(e){return $b.test(e)}const Nb=new Set(["length","size","percentage"]);function Vb(e){return No(e,Nb,Ph)}function zb(e){return No(e,"position",Ph)}const Hb=new Set(["image","url"]);function jb(e){return No(e,Hb,Kb)}function Ub(e){return No(e,"",Gb)}function Xo(){return!0}function No(e,t,n){const r=kh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Wb(e){return Mb.test(e)&&!Db.test(e)}function Ph(){return!1}function Gb(e){return Rb.test(e)}function Kb(e){return Lb.test(e)}function qb(){const e=tt("colors"),t=tt("spacing"),n=tt("blur"),r=tt("brightness"),o=tt("borderColor"),i=tt("borderRadius"),s=tt("borderSpacing"),a=tt("borderWidth"),l=tt("contrast"),u=tt("grayscale"),c=tt("hueRotate"),d=tt("invert"),p=tt("gap"),h=tt("gradientColorStops"),v=tt("gradientColorStopPositions"),b=tt("inset"),w=tt("margin"),S=tt("opacity"),_=tt("padding"),I=tt("saturate"),F=tt("scale"),V=tt("sepia"),N=tt("skew"),H=tt("space"),m=tt("translate"),g=()=>["auto","contain","none"],y=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",Ae,t],x=()=>[Ae,t],C=()=>["",Mn,lr],k=()=>["auto",Ur,Ae],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],$=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",Ae],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[Ur,ss],ge=()=>[Ur,Ae];return{cacheSize:500,separator:":",theme:{colors:[Xo],spacing:[Mn,lr],blur:["none","",ur,Ae],brightness:ue(),borderColor:[e],borderRadius:["none","","full",ur,Ae],borderSpacing:x(),borderWidth:C(),contrast:ue(),grayscale:G(),hueRotate:ge(),invert:G(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[Fb,lr],inset:A(),margin:A(),opacity:ue(),padding:x(),saturate:ue(),scale:ue(),sepia:G(),skew:ge(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[ur]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),Ae]}],overflow:[{overflow:y()}],"overflow-x":[{"overflow-x":y()}],"overflow-y":[{"overflow-y":y()}],overscroll:[{overscroll:g()}],"overscroll-x":[{"overscroll-x":g()}],"overscroll-y":[{"overscroll-y":g()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yo,Ae]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",Yo,Ae]}],"grid-cols":[{"grid-cols":[Xo]}],"col-start-end":[{col:["auto",{span:["full",Yo,Ae]},Ae]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Xo]}],"row-start-end":[{row:["auto",{span:[Yo,Ae]},Ae]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,t]}],"min-w":[{"min-w":[Ae,t,"min","max","fit"]}],"max-w":[{"max-w":[Ae,t,"none","full","min","max","fit","prose",{screen:[ur]},ur]}],h:[{h:[Ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ur,lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ss]}],"font-family":[{font:[Xo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",Ur,ss]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,lr]}],"underline-offset":[{"underline-offset":["auto",Mn,Ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),zb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:E()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[Mn,Ae]}],"outline-w":[{outline:[Mn,lr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Mn,lr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ur,Ub]}],"shadow-color":[{shadow:[Xo]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":M()}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ur,Ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[I]}],sepia:[{sepia:[V]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:ge()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:ge()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[Yo,Ae]}],"translate-x":[{"translate-x":[m]}],"translate-y":[{"translate-y":[m]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,lr,ss]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Yb=kb(qb);function $e(...e){return Yb(vb(e))}const Un=W({__name:"Button",props:{variant:{},size:{},as:{default:"button"},loading:{type:Boolean,default:!1}},setup(e){return(t,n)=>(D(),j(qn(t.as),{class:lt(f($e)(f(Xb)({variant:t.variant,size:t.size}),t.$attrs.class??""))},{default:B(()=>[t.loading?(D(),j(f(vh),{key:0,class:"animate-spin",size:16})):pt("",!0),t.loading&&t.$slots.loading?X(t.$slots,"loading",{key:1}):X(t.$slots,"default",{key:2})]),_:3},8,["class"]))}}),Xb=Uu("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),js=W({__name:"Card",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("rounded-lg border bg-card text-card-foreground shadow-sm",t.class))},[X(n.$slots,"default")],2))}}),Gu=W({__name:"CardHeader",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-1.5 p-6",t.class))},[X(n.$slots,"default")],2))}}),Ku=W({__name:"CardTitle",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("h3",{class:lt(f($e)("text-2xl font-semibold leading-none tracking-tighter",t.class))},[X(n.$slots,"default")],2))}}),Us=W({__name:"CardContent",props:{class:{type:String,default:""}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("p-6 pt-0",t.class))},[X(n.$slots,"default")],2))}}),Zb=1,Qb=1e6,Vn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let cl=0;function Jb(){return cl=(cl+1)%Number.MAX_VALUE,cl.toString()}const dl=new Map;function Od(e){if(dl.has(e))return;const t=setTimeout(()=>{dl.delete(e),ui({type:Vn.REMOVE_TOAST,toastId:e})},Qb);dl.set(e,t)}const dn=U({toasts:[]});function ui(e){switch(e.type){case Vn.ADD_TOAST:dn.value.toasts=[e.toast,...dn.value.toasts].slice(0,Zb);break;case Vn.UPDATE_TOAST:dn.value.toasts=dn.value.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t);break;case Vn.DISMISS_TOAST:{const{toastId:t}=e;t?Od(t):dn.value.toasts.forEach(n=>{Od(n.id)}),dn.value.toasts=dn.value.toasts.map(n=>n.id===t||t===void 0?{...n,open:!1}:n);break}case Vn.REMOVE_TOAST:e.toastId===void 0?dn.value.toasts=[]:dn.value.toasts=dn.value.toasts.filter(t=>t.id!==e.toastId);break}}function Aa(){return{toasts:q(()=>dn.value.toasts),toast:e1,dismiss:e=>ui({type:Vn.DISMISS_TOAST,toastId:e})}}function e1(e){const t=Jb(),n=o=>ui({type:Vn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ui({type:Vn.DISMISS_TOAST,toastId:t});return ui({type:Vn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}const t1=["top","right","bottom","left"],Tr=Math.min,Ut=Math.max,Ws=Math.round,as=Math.floor,Or=e=>({x:e,y:e}),n1={left:"right",right:"left",bottom:"top",top:"bottom"},r1={start:"end",end:"start"};function Jl(e,t,n){return Ut(e,Tr(t,n))}function Yn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function Vo(e){return e.split("-")[1]}function qu(e){return e==="x"?"y":"x"}function Yu(e){return e==="y"?"height":"width"}function zo(e){return["top","bottom"].includes(Xn(e))?"y":"x"}function Xu(e){return qu(zo(e))}function o1(e,t,n){n===void 0&&(n=!1);const r=Vo(e),o=Xu(e),i=Yu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Gs(s)),[s,Gs(s)]}function i1(e){const t=Gs(e);return[eu(e),t,eu(t)]}function eu(e){return e.replace(/start|end/g,t=>r1[t])}function s1(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function a1(e,t,n,r){const o=Vo(e);let i=s1(Xn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(eu)))),i}function Gs(e){return e.replace(/left|right|bottom|top/g,t=>n1[t])}function l1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bh(e){return typeof e!="number"?l1(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ad(e,t,n){let{reference:r,floating:o}=e;const i=zo(t),s=Xu(t),a=Yu(s),l=Xn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Vo(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const u1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Ad(u,r,l),p=r,h={},v=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Yn(e,t)||{};if(u==null)return{};const d=Bh(c),p={x:n,y:r},h=Xu(o),v=Yu(h),b=await s.getDimensions(u),w=h==="y",S=w?"top":"left",_=w?"bottom":"right",I=w?"clientHeight":"clientWidth",F=i.reference[v]+i.reference[h]-p[h]-i.floating[v],V=p[h]-i.reference[h],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let H=N?N[I]:0;(!H||!await(s.isElement==null?void 0:s.isElement(N)))&&(H=a.floating[I]||i.floating[v]);const m=F/2-V/2,g=H/2-b[v]/2-1,y=Tr(d[S],g),A=Tr(d[_],g),x=y,C=H-b[v]-A,k=H/2-b[v]/2+m,O=Jl(x,k,C),E=!l.arrow&&Vo(o)!=null&&k!=O&&i.reference[v]/2-(kx<=0)){var g,y;const x=(((g=i.flip)==null?void 0:g.index)||0)+1,C=V[x];if(C)return{data:{index:x,overflows:m},reset:{placement:C}};let k=(y=m.filter(O=>O.overflows[0]<=0).sort((O,E)=>O.overflows[1]-E.overflows[1])[0])==null?void 0:y.placement;if(!k)switch(h){case"bestFit":{var A;const O=(A=m.map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,$)=>M+$,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:A[0];O&&(k=O);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function Id(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kd(e){return t1.some(t=>e[t]>=0)}const f1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Yn(e,t);switch(r){case"referenceHidden":{const i=await xi(t,{...o,elementContext:"reference"}),s=Id(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:kd(s)}}}case"escaped":{const i=await xi(t,{...o,altBoundary:!0}),s=Id(i,n.floating);return{data:{escapedOffsets:s,escaped:kd(s)}}}default:return{}}}}};async function p1(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xn(n),a=Vo(n),l=zo(n)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Yn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}const h1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await p1(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},m1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:S,y:_}=w;return{x:S,y:_}}},...l}=Yn(e,t),u={x:n,y:r},c=await xi(t,l),d=zo(Xn(o)),p=qu(d);let h=u[p],v=u[d];if(i){const w=p==="y"?"top":"left",S=p==="y"?"bottom":"right",_=h+c[w],I=h-c[S];h=Jl(_,h,I)}if(s){const w=d==="y"?"top":"left",S=d==="y"?"bottom":"right",_=v+c[w],I=v-c[S];v=Jl(_,v,I)}const b=a.fn({...t,[p]:h,[d]:v});return{...b,data:{x:b.x-n,y:b.y-r}}}}},g1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Yn(e,t),c={x:n,y:r},d=zo(o),p=qu(d);let h=c[p],v=c[d];const b=Yn(a,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const I=p==="y"?"height":"width",F=i.reference[p]-i.floating[I]+w.mainAxis,V=i.reference[p]+i.reference[I]-w.mainAxis;hV&&(h=V)}if(u){var S,_;const I=p==="y"?"width":"height",F=["top","left"].includes(Xn(o)),V=i.reference[d]-i.floating[I]+(F&&((S=s.offset)==null?void 0:S[d])||0)+(F?0:w.crossAxis),N=i.reference[d]+i.reference[I]+(F?0:((_=s.offset)==null?void 0:_[d])||0)-(F?w.crossAxis:0);vN&&(v=N)}return{[p]:h,[d]:v}}}},v1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=Yn(e,t),l=await xi(t,a),u=Xn(n),c=Vo(n),d=zo(n)==="y",{width:p,height:h}=r.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,v=c==="end"?"top":"bottom");const w=h-l[v],S=p-l[b],_=!t.middlewareData.shift;let I=w,F=S;if(d){const N=p-l.left-l.right;F=c||_?Tr(S,N):N}else{const N=h-l.top-l.bottom;I=c||_?Tr(w,N):N}if(_&&!c){const N=Ut(l.left,0),H=Ut(l.right,0),m=Ut(l.top,0),g=Ut(l.bottom,0);d?F=p-2*(N!==0||H!==0?N+H:Ut(l.left,l.right)):I=h-2*(m!==0||g!==0?m+g:Ut(l.top,l.bottom))}await s({...t,availableWidth:F,availableHeight:I});const V=await o.getDimensions(i.floating);return p!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function Ar(e){return $h(e)?(e.nodeName||"").toLowerCase():"#document"}function Gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=($h(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $h(e){return e instanceof Node||e instanceof Gt(e).Node}function Zn(e){return e instanceof Element||e instanceof Gt(e).Element}function An(e){return e instanceof HTMLElement||e instanceof Gt(e).HTMLElement}function Pd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gt(e).ShadowRoot}function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function y1(e){return["table","td","th"].includes(Ar(e))}function Zu(e){const t=Qu(),n=rn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b1(e){let t=Mo(e);for(;An(t)&&!Ia(t);){if(Zu(t))return t;t=Mo(t)}return null}function Qu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ia(e){return["html","body","#document"].includes(Ar(e))}function rn(e){return Gt(e).getComputedStyle(e)}function ka(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Mo(e){if(Ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pd(e)&&e.host||er(e);return Pd(t)?t.host:t}function Mh(e){const t=Mo(e);return Ia(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&Ki(t)?t:Mh(t)}function Ei(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mh(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Gt(o);return i?t.concat(s,s.visualViewport||[],Ki(o)?o:[],s.frameElement&&n?Ei(s.frameElement):[]):t.concat(o,Ei(o,[],n))}function Dh(e){const t=rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=An(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ws(n)!==i||Ws(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ju(e){return Zn(e)?e:e.contextElement}function To(e){const t=Ju(e);if(!An(t))return Or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dh(t);let s=(i?Ws(n.width):n.width)/r,a=(i?Ws(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const w1=Or(0);function Rh(e){const t=Gt(e);return!Qu()||!t.visualViewport?w1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gt(e)?!1:t}function to(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ju(e);let s=Or(1);t&&(r?Zn(r)&&(s=To(r)):s=To(e));const a=_1(i,n,r)?Rh(i):Or(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const p=Gt(i),h=r&&Zn(r)?Gt(r):r;let v=p.frameElement;for(;v&&r&&h!==p;){const b=To(v),w=v.getBoundingClientRect(),S=rn(v),_=w.left+(v.clientLeft+parseFloat(S.paddingLeft))*b.x,I=w.top+(v.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=_,u+=I,v=Gt(v).frameElement}}return Ks({width:c,height:d,x:l,y:u})}function x1(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=An(n),i=er(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Or(1);const l=Or(0);if((o||!o&&r!=="fixed")&&((Ar(n)!=="body"||Ki(i))&&(s=ka(n)),An(n))){const u=to(n);a=To(n),l.x=u.x+n.clientLeft,l.y=u.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 E1(e){return Array.from(e.getClientRects())}function Lh(e){return to(er(e)).left+ka(e).scrollLeft}function S1(e){const t=er(e),n=ka(e),r=e.ownerDocument.body,o=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Lh(e);const a=-n.scrollTop;return rn(r).direction==="rtl"&&(s+=Ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function C1(e,t){const n=Gt(e),r=er(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Qu();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function T1(e,t){const n=to(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=An(e)?To(e):Or(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Bd(e,t,n){let r;if(t==="viewport")r=C1(e,n);else if(t==="document")r=S1(er(e));else if(Zn(t))r=T1(t,n);else{const o=Rh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ks(r)}function Fh(e,t){const n=Mo(e);return n===t||!Zn(n)||Ia(n)?!1:rn(n).position==="fixed"||Fh(n,t)}function O1(e,t){const n=t.get(e);if(n)return n;let r=Ei(e,[],!1).filter(a=>Zn(a)&&Ar(a)!=="body"),o=null;const i=rn(e).position==="fixed";let s=i?Mo(e):e;for(;Zn(s)&&!Ia(s);){const a=rn(s),l=Zu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ki(s)&&!l&&Fh(e,s))?r=r.filter(c=>c!==s):o=a,s=Mo(s)}return t.set(e,r),r}function A1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?O1(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const d=Bd(t,c,o);return u.top=Ut(d.top,u.top),u.right=Tr(d.right,u.right),u.bottom=Tr(d.bottom,u.bottom),u.left=Ut(d.left,u.left),u},Bd(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function I1(e){return Dh(e)}function k1(e,t,n){const r=An(t),o=er(t),i=n==="fixed",s=to(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Or(0);if(r||!r&&!i)if((Ar(t)!=="body"||Ki(o))&&(a=ka(t)),r){const u=to(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=Lh(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function $d(e,t){return!An(e)||rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Nh(e,t){const n=Gt(e);if(!An(e))return n;let r=$d(e,t);for(;r&&y1(r)&&rn(r).position==="static";)r=$d(r,t);return r&&(Ar(r)==="html"||Ar(r)==="body"&&rn(r).position==="static"&&!Zu(r))?n:r||b1(e)||n}const P1=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Nh,i=this.getDimensions;return{reference:k1(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function B1(e){return rn(e).direction==="rtl"}const $1={convertOffsetParentRelativeRectToViewportRelativeRect:x1,getDocumentElement:er,getClippingRect:A1,getOffsetParent:Nh,getElementRects:P1,getClientRects:E1,getDimensions:I1,getScale:To,isElement:Zn,isRTL:B1};function M1(e,t){let n=null,r;const o=er(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const h=as(c),v=as(o.clientWidth-(u+d)),b=as(o.clientHeight-(c+p)),w=as(u),_={rootMargin:-h+"px "+-v+"px "+-b+"px "+-w+"px",threshold:Ut(0,Tr(1,l))||1};let I=!0;function F(V){const N=V[0].intersectionRatio;if(N!==l){if(!I)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(F,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(F,_)}n.observe(e)}return s(!0),i}function D1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ju(e),c=o||i?[...u?Ei(u):[],...Ei(t)]:[];c.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const d=u&&a?M1(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(S=>{let[_]=S;_&&_.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,b=l?to(e):null;l&&w();function w(){const S=to(e);b&&(S.x!==b.x||S.y!==b.y||S.width!==b.width||S.height!==b.height)&&n(),b=S,v=requestAnimationFrame(w)}return n(),()=>{c.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const R1=(e,t,n)=>{const r=new Map,o={platform:$1,...n},i={...o.platform,_c:r};return u1(e,t,{...o,platform:i})};function tu(e){var t;return(t=e==null?void 0:e.$el)!=null?t:e}function L1(e){return{name:"arrow",options:e,fn(t){const n=tu(f(e.element));return n==null?{}:c1({element:n,padding:e.padding}).fn(t)}}}function Vh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Md(e,t){const n=Vh(e);return Math.round(t*n)/n}function F1(e,t,n){n===void 0&&(n={});const r=n.whileElementsMounted,o=q(()=>{var H;return(H=f(n.open))!=null?H:!0}),i=q(()=>f(n.middleware)),s=q(()=>{var H;return(H=f(n.placement))!=null?H:"bottom"}),a=q(()=>{var H;return(H=f(n.strategy))!=null?H:"absolute"}),l=q(()=>{var H;return(H=f(n.transform))!=null?H:!0}),u=q(()=>tu(e.value)),c=q(()=>tu(t.value)),d=U(0),p=U(0),h=U(a.value),v=U(s.value),b=ga({}),w=U(!1),S=q(()=>{const H={position:h.value,left:"0",top:"0"};if(!c.value)return H;const m=Md(c.value,d.value),g=Md(c.value,p.value);return l.value?{...H,transform:"translate("+m+"px, "+g+"px)",...Vh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:m+"px",top:g+"px"}});let _;function I(){u.value==null||c.value==null||R1(u.value,c.value,{middleware:i.value,placement:s.value,strategy:a.value}).then(H=>{d.value=H.x,p.value=H.y,h.value=H.strategy,v.value=H.placement,b.value=H.middlewareData,w.value=!0})}function F(){typeof _=="function"&&(_(),_=void 0)}function V(){if(F(),r===void 0){I();return}if(u.value!=null&&c.value!=null){_=r(u.value,c.value,I);return}}function N(){o.value||(w.value=!1)}return ye([i,s,a],I,{flush:"sync"}),ye([u,c],V,{flush:"sync"}),ye(o,N,{flush:"sync"}),Wi()&&fa(F),{x:po(d),y:po(p),strategy:po(h),placement:po(v),middlewareData:po(b),isPositioned:po(w),floatingStyles:S,update:I}}function Tt(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,r=Symbol(n);return[o=>{const i=Wt(r,o);if(i||i===null)return i;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Fo(r,o),o)]}function ec(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function N1(e,t){var n;const r=ga();return vt(()=>{r.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!=null?n:"sync"}),Ir(r)}function zh(e,t){let n,r,o;const i=U(!0),s=()=>{i.value=!0,o()};ye(e,s,{flush:"sync"});const a=typeof t=="function"?t:t.get,l=typeof t=="function"?void 0:t.set,u=Pp((c,d)=>(r=c,o=d,{get(){return i.value&&(n=a(),i.value=!1),r(),n},set(p){l==null||l(p)}}));return Object.isExtensible(u)&&(u.trigger=s),u}function Pa(e){return Wi()?(fa(e),!0):!1}function Ba(e){let t=!1,n;const r=Iu(!0);return(...o)=>(t||(n=r.run(()=>e(...o)),t=!0),n)}function no(e){return typeof e=="function"?e():f(e)}const kr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const V1=e=>typeof e<"u",z1=Object.prototype.toString,H1=e=>z1.call(e)==="[object Object]",qs=()=>{},Dd=j1();function j1(){var e,t;return kr&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function U1(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}function W1(e,t={}){let n,r,o=qs;const i=s=>{clearTimeout(s),o(),o=qs};return s=>{const a=no(e),l=no(t.maxWait);return n&&i(n),a<=0||l!==void 0&&l<=0?(r&&(i(r),r=null),Promise.resolve(s())):new Promise((u,c)=>{o=t.rejectOnCancel?c:u,l&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,u(s())},l)),n=setTimeout(()=>{r&&i(r),r=null,u(s())},a)})}}function Hh(e,t=200,n={}){return U1(W1(t,n),e)}function tc(e,t,n={}){const{immediate:r=!0}=n,o=U(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function a(){o.value=!1,s()}function l(...u){s(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,e(...u)},no(t))}return r&&(o.value=!0,kr&&l()),Pa(a),{isPending:Ir(o),start:l,stop:a}}function G1(e=1e3,t={}){const{controls:n=!1,callback:r}=t,o=tc(r??qs,e,t),i=q(()=>!o.isPending.value);return n?{ready:i,...o}:i}function K1(e,t,n){const r=ye(e,(...o)=>(Ke(()=>r()),t(...o)),n);return r}function vn(e){var t;const n=no(e);return(t=n==null?void 0:n.$el)!=null?t:n}const $a=kr?window:void 0;function Ys(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=$a):[t,n,r,o]=e,!t)return qs;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,p,h)=>(c.addEventListener(d,p,h),()=>c.removeEventListener(d,p,h)),l=ye(()=>[vn(t),no(o)],([c,d])=>{if(s(),!c)return;const p=H1(d)?{...d}:d;i.push(...n.flatMap(h=>r.map(v=>a(c,h,v,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return Pa(u),u}function q1(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nc(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=$a,eventName:i="keydown",passive:s=!1,dedupe:a=!1}=r,l=q1(t);return Ys(o,i,u=>{u.repeat&&no(a)||l(u)&&n(u)},s)}function jh(){const e=U(!1);return Rt()&&Ue(()=>{e.value=!0}),e}function Y1(e){const t=jh();return q(()=>(t.value,!!e()))}function X1(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:o=$a}=t,i=U(!1),s=r?1e3/r:null;let a=0,l=null;function u(p){if(!i.value||!o)return;const h=p-(a||p);if(s&&hr&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},l=q(()=>Array.isArray(e)?e.map(d=>vn(d)):[vn(e)]),u=ye(l,d=>{if(a(),s.value&&r){i=new ResizeObserver(t);for(const p of d)p&&i.observe(p,o)}},{immediate:!0,flush:"post",deep:!0}),c=()=>{a(),u()};return Pa(c),{isSupported:s,stop:c}}function Yr(e,t,n,r={}){var o,i,s;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:p}=r,h=Rt(),v=n||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((s=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let b=u;t||(t="modelValue"),b=b||`update:${t.toString()}`;const w=I=>a?typeof a=="function"?a(I):Z1(I):I,S=()=>V1(e[t])?w(e[t]):d,_=I=>{p?p(I)&&v(b,I):v(b,I)};if(l){const I=S(),F=U(I);let V=!1;return ye(()=>e[t],N=>{V||(V=!0,F.value=w(N),Ke(()=>V=!1))}),ye(F,N=>{!V&&(N!==e[t]||c)&&_(N)},{deep:c}),F}else return q({get(){return S()},set(I){_(I)}})}function rc(e){return e?e.flatMap(t=>t.type===qe?rc(t.children):[t]):[]}function fl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function nu(e,t,n=".",r){if(!fl(t))return nu(e,{},n,r);const o=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const s=e[i];s!=null&&(r&&r(o,i,s,n)||(Array.isArray(s)&&Array.isArray(o[i])?o[i]=[...s,...o[i]]:fl(s)&&fl(o[i])?o[i]=nu(s,o[i],(n?`${n}.`:"")+i.toString(),r):o[i]=s))}return o}function Q1(e){return(...t)=>t.reduce((n,r)=>nu(n,r,"",e),{})}const J1=Q1(),[Uh,$P]=Tt("ConfigProvider"),ew=Ba(()=>U()),tw=Ba(()=>U(0));function oc(e){const t=Uh({scrollBody:U(!0)}),n=tw(),r=ew(),o=U(e);let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=r.value??"",Dd&&(i==null||i()),r.value=void 0};return e&&n.value++,ye(o,a=>{var l;if(kr&&a){r.value===void 0&&(r.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,c={padding:u,margin:0},d=(l=t.scrollBody)!=null&&l.value?typeof t.scrollBody.value=="object"?J1({padding:t.scrollBody.value.padding===!0?u:t.scrollBody.value.padding,margin:t.scrollBody.value.margin===!0?u:t.scrollBody.value.margin},c):c:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=`${d.padding}px`,document.body.style.marginRight=`${d.margin}px`,document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Dd&&(i=Ys(document,"touchmove",p=>{var h;p.target===document.documentElement&&(p.touches.length>1||(h=p.preventDefault)==null||h.call(p))},{passive:!1})),Ke(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}},{immediate:!0}),_a(()=>{e&&n.value--,n.value===0&&s()}),o}const nw="data-radix-vue-collection-item";function rw(e,t=nw){const n=e??Symbol();return{createCollection:r=>{const o=U([]);function i(){const s=vn(r);return s?o.value=Array.from(s.querySelectorAll(`[${t}]:not([data-disabled=true])`)):o.value=[]}return Up(()=>{o.value=[]}),Ue(i),Wp(i),ye(()=>r==null?void 0:r.value,i,{immediate:!0}),Fo(n,o),o},injectCollection:()=>Wt(n,U([]))}}function Wh(e){const t=Uh({dir:U("ltr")});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}function uo(e){const t=Rt(),n=t==null?void 0:t.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(o=>{r[Ts(nn(o))]=(...i)=>e(o,...i)}),r}let pl=0;function ow(){vt(e=>{if(!kr)return;const t=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Rd()),document.body.insertAdjacentElement("beforeend",t[1]??Rd()),pl++,e(()=>{pl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),pl--})})}function Rd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function iw(e){return q(()=>{var t;return no(e)?!!((t=vn(e))!=null&&t.closest("form")):!0})}function ic(e){const t=Rt(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,o)=>{const i=(t==null?void 0:t.type.props[o]).default;return i!==void 0&&(r[o]=i),r},{});return zh(()=>({...e}),()=>{const r={},o=(t==null?void 0:t.vnode.props)??{};return Object.keys(o).forEach(i=>{r[nn(i)]=o[i]}),Object.keys({...n,...r}).reduce((i,s)=>(e[s]!==void 0&&(i[s]=e[s]),i),{})})}function sn(e,t){const n=ic(e),r=t?uo(t):{};return q(()=>({...n.value,...r}))}function tr(){const e=Rt();function t(n){typeof n=="object"&&(e.exposed=n,e.exposeProxy=n)}return t}var sw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mo=new WeakMap,ls=new WeakMap,us={},hl=0,Gh=function(e){return e&&(e.host||Gh(e.parentNode))},aw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},lw=function(e,t,n,r){var o=aw(t,Array.isArray(e)?e:[e]);us[n]||(us[n]=new WeakMap);var i=us[n],s=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else{var h=p.getAttribute(r),v=h!==null&&h!=="false",b=(mo.get(p)||0)+1,w=(i.get(p)||0)+1;mo.set(p,b),i.set(p,w),s.push(p),b===1&&v&&ls.set(p,!0),w===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}})};return c(t),a.clear(),hl++,function(){s.forEach(function(d){var p=mo.get(d)-1,h=i.get(d)-1;mo.set(d,p),i.set(d,h),p||(ls.has(d)||d.removeAttribute(r),ls.delete(d)),h||d.removeAttribute(n)}),hl--,hl||(mo=new WeakMap,mo=new WeakMap,ls=new WeakMap,us={})}},uw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||sw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),lw(r,o,n,"aria-hidden")):function(){return null}};function sc(e){let t;ye(()=>vn(e),n=>{n?t=uw(n):t&&t()}),Bn(()=>{t&&t()})}const cw=Ba(()=>({count:U(0)}));function Wn(e){const{count:t}=cw();return e||t.value++,e||`radix-${t.value}`}function dw(e){const t=U(),n=q(()=>{var o;return((o=t.value)==null?void 0:o.width)??0}),r=q(()=>{var o;return((o=t.value)==null?void 0:o.height)??0});return Ue(()=>{const o=vn(e);if(o){t.value={width:o.offsetWidth,height:o.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=o.offsetWidth,u=o.offsetHeight;t.value={width:l,height:u}});return i.observe(o,{box:"border-box"}),()=>i.unobserve(o)}else t.value=void 0}),{width:n,height:r}}function Kh(e,t){const n=U(e);function r(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=r(o)}}}const Ma=W({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var r,o;if(!n.default)return null;const i=rc(n.default()),[s,...a]=i;if(Object.keys(t).length>0){(r=s.props)==null||delete r.ref;const l=ce(t,s.props??{});t.class&&(o=s.props)!=null&&o.class&&delete s.props.class;const u=Jr(s,l);for(const c in l)c.startsWith("on")&&(u.props||(u.props={}),u.props[c]=l[c]);return i.length===1?u:[u,...a]}return i}}}),Be=W({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){return(e.asChild?"template":e.as)!=="template"?()=>On(e.as,t,{default:n.default}):()=>On(Ma,t,{default:n.default})}});function Qe(){const e=U(),t=q(()=>{var n,r;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(r=e.value)==null?void 0:r.$el.nextElementSibling:vn(e)});return{primitiveElement:e,currentElement:t}}function fw(e,t){const n=U({}),r=U("none"),o=e.value?"mounted":"unmounted",{state:i,dispatch:s}=Kh(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ye(e,async(d,p)=>{var h;const v=p!==d;if(await Ke(),v){const b=r.value,w=cs(t.value);d?s("MOUNT"):w==="none"||((h=n.value)==null?void 0:h.display)==="none"?s("UNMOUNT"):s(p&&b!==w?"ANIMATION_OUT":"UNMOUNT")}},{immediate:!0});const a=d=>{const p=cs(t.value),h=p.includes(d.animationName);d.target===t.value&&h&&s("ANIMATION_END"),d.target===t.value&&p==="none"&&s("ANIMATION_END")},l=d=>{d.target===t.value&&(r.value=cs(t.value))},u=ye(t,(d,p)=>{d?(n.value=getComputedStyle(d),d.addEventListener("animationstart",l),d.addEventListener("animationcancel",a),d.addEventListener("animationend",a)):(s("ANIMATION_END"),p==null||p.removeEventListener("animationstart",l),p==null||p.removeEventListener("animationcancel",a),p==null||p.removeEventListener("animationend",a))},{immediate:!0}),c=ye(i,()=>{const d=cs(t.value);r.value=i.value==="mounted"?d:"none"});return Bn(()=>{u(),c()}),{isPresent:q(()=>["mounted","unmountSuspended"].includes(i.value))}}function cs(e){return e&&getComputedStyle(e).animationName||"none"}const Pr=W({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;const{present:o,forceMount:i}=on(e),s=U(),{isPresent:a}=fw(o,s);n({present:a});let l=t.default({present:a});l=rc(l||[]);const u=Rt();if(l&&(l==null?void 0:l.length)>1){const c=(r=u==null?void 0:u.parent)!=null&&r.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(` `)].join(` -`))}return()=>i.value||o.value||a.value?On(t.default({present:a})[0],{ref:c=>{const d=vn(c);return typeof(d==null?void 0:d.hasAttribute)>"u"||(d!=null&&d.hasAttribute("data-radix-popper-content-wrapper")?s.value=d.firstElementChild:s.value=d),d}}):null}}),[$n,pw]=Tt("DialogRoot"),hw=W({__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=Yr(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=U(),i=U(),{modal:s}=on(n);return pw({open:r,modal:s,openModal:()=>{r.value=!0},onOpenChange:a=>{r.value=a},onOpenToggle:()=>{r.value=!r.value},contentId:Wn(),titleId:Wn(),descriptionId:Wn(),triggerElement:o,contentElement:i}),(a,l)=>X(a.$slots,"default")}}),mw=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=$n(),{primitiveElement:r,currentElement:o}=Qe();return Ue(()=>{n.triggerElement=o}),(i,s)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:r},t,{type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(n).open.value||!1,"aria-controls":f(n).contentId,"data-state":f(n).open.value?"open":"closed",onClick:f(n).onOpenToggle}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ac=W({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=jh();return(n,r)=>f(t)||n.forceMount?(D(),j(rh,{key:0,to:n.to,disabled:n.disabled},[X(n.$slots,"default")],8,["to","disabled"])):pt("",!0)}}),gw=W({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),vw="dismissableLayer.pointerDownOutside",yw="dismissableLayer.focusOutside";function qh(e,t){const n=t.closest("[data-dismissable-layer]"),r=e.querySelector("[data-dismissable-layer]"),o=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||o.indexOf(r){});return vt(s=>{if(!kr)return;const a=async u=>{if(t!=null&&t.value){if(qh(t.value,u.target)){o.value=!1;return}if(u.target&&!o.value){let c=function(){ec(vw,e,d)};const d={originalEvent:u};u.pointerType==="touch"?(r.removeEventListener("click",i.value),i.value=c,r.addEventListener("click",i.value,{once:!0})):c()}else r.removeEventListener("click",i.value);o.value=!1}},l=window.setTimeout(()=>{r.addEventListener("pointerdown",a)},0);s(()=>{window.clearTimeout(l),r.removeEventListener("pointerdown",a),r.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>o.value=!0}}function ww(e,t){var n;const r=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=U(!1);return vt(i=>{if(!kr)return;const s=async a=>{t!=null&&t.value&&(await Ke(),!qh(t.value,a.target)&&a.target&&!o.value&&ec(yw,e,{originalEvent:a}))};r.addEventListener("focusin",s),i(()=>r.removeEventListener("focusin",s))}),{onFocusCapture:()=>o.value=!0,onBlurCapture:()=>o.value=!1}}const fn=Tn({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Da=W({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,r=t,{primitiveElement:o,currentElement:i}=Qe(),s=K(()=>{var v;return((v=i.value)==null?void 0:v.ownerDocument)??globalThis.document}),a=K(()=>fn.layersRoot),l=K(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=K(()=>fn.layersWithOutsidePointerEventsDisabled.size>0),c=K(()=>{const v=Array.from(a.value),[b]=[...fn.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b);return l.value>=w}),d=bw(async v=>{const b=[...fn.branches].some(w=>w.contains(v.target));!c.value||b||(r("pointerDownOutside",v),r("interactOutside",v),await Ke(),v.defaultPrevented||r("dismiss"))},i),p=ww(v=>{[...fn.branches].some(b=>b.contains(v.target))||(r("focusOutside",v),r("interactOutside",v),v.defaultPrevented||r("dismiss"))},i);nc("Escape",v=>{l.value===a.value.size-1&&(r("escapeKeyDown",v),v.defaultPrevented||r("dismiss"))});let h;return vt(v=>{i.value&&(n.disableOutsidePointerEvents&&(fn.layersWithOutsidePointerEventsDisabled.size===0&&(h=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),fn.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),v(()=>{n.disableOutsidePointerEvents&&fn.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=h)}))}),vt(v=>{v(()=>{i.value&&(a.value.delete(i.value),fn.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(v,b)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:o,"as-child":v.asChild,as:v.as,"data-dismissable-layer":"",style:qt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:B(()=>[X(v.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),_w=W({__name:"DismissableLayerBranch",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe();return Ue(()=>{fn.branches.add(r.value)}),Bn(()=>{fn.branches.delete(r.value)}),(o,i)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:n},t),{default:B(()=>[X(o.$slots,"default")]),_:3},16))}}),ml="focusScope.autoFocusOnMount",gl="focusScope.autoFocusOnUnmount",Ld={bubbles:!1,cancelable:!0};function Is(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gr(r,{select:t}),document.activeElement!==n)return!0}function xw(e){const t=lc(e),n=Fd(t,e),r=Fd(t.reverse(),e);return[n,r]}function lc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fd(e,t){for(const n of e)if(!Ew(n,{upTo:t}))return n}function Ew(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sw(e){return e instanceof HTMLInputElement&&"select"in e}function gr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sw(e)&&t&&e.select()}}const Cw=Ba(()=>U([]));function Tw(){const e=Cw();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=Nd(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=Nd(e.value,t),(n=e.value[0])==null||n.resume()}}}function Nd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ow(e){return e.filter(t=>t.tagName!=="A")}const Yh=W({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,r=t,{primitiveElement:o,currentElement:i}=Qe(),s=U(null),a=Tw(),l=Tn({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});vt(c=>{if(!kr)return;const d=i.value;if(!n.trapped)return;function p(w){if(l.paused||!d)return;const S=w.target;d.contains(S)?s.value=S:gr(s.value,{select:!0})}function h(w){if(l.paused||!d)return;const S=w.relatedTarget;S!==null&&(d.contains(S)||gr(s.value,{select:!0}))}function v(w){d.contains(s.value)||gr(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const b=new MutationObserver(v);d&&b.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),b.disconnect()})}),vt(async c=>{const d=i.value;if(await Ke(),!d)return;a.add(l);const p=document.activeElement;if(!d.contains(p)){const h=new CustomEvent(ml,Ld);d.addEventListener(ml,v=>r("mountAutoFocus",v)),d.dispatchEvent(h),h.defaultPrevented||(Is(Ow(lc(d)),{select:!0}),document.activeElement===p&&gr(d))}c(()=>{d.removeEventListener(ml,b=>r("mountAutoFocus",b));const h=new CustomEvent(gl,Ld),v=b=>{r("unmountAutoFocus",b)};d.addEventListener(gl,v),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||gr(p??document.body,{select:!0}),d.removeEventListener(gl,v),a.remove(l)},0)})});function u(c){if(!n.loop&&!n.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=document.activeElement;if(d&&p){const h=c.currentTarget,[v,b]=xw(h);v&&b?!c.shiftKey&&p===b?(c.preventDefault(),n.loop&&gr(v,{select:!0})):c.shiftKey&&p===v&&(c.preventDefault(),n.loop&&gr(b,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:o,tabindex:"-1","as-child":n.asChild,as:n.as,onKeydown:u},{default:B(()=>[X(c.$slots,"default")]),_:3},8,["as-child","as"]))}});function Aw(e){return e?"open":"closed"}const Xh=W({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),{primitiveElement:i,currentElement:s}=Qe();return Ue(()=>{o.contentElement=s}),(a,l)=>(D(),j(f(Yh),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>r("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>r("closeAutoFocus",u))},{default:B(()=>[q(f(Da),ce({id:f(o).contentId,ref_key:"primitiveElement",ref:i,as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(o).descriptionId,"aria-labelledby":f(o).titleId,"data-state":f(Aw)(f(o).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(o).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>r("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>r("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>r("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>r("pointerDownOutside",u))}),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Iw=W({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),i=uo(r),{primitiveElement:s,currentElement:a}=Qe();return sc(a),(l,u)=>(D(),j(Xh,ce({ref_key:"primitiveElement",ref:s},{...n,...f(i)},{"trap-focus":f(o).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(c.preventDefault(),(d=f(o).triggerElement.value)==null||d.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()}),onOpenAutoFocus:u[3]||(u[3]=c=>r("openAutoFocus",c))}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),kw=W({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=uo(r),i=$n(),s=U(!1),a=U(!1);return(l,u)=>(D(),j(Xh,ce({...n,...f(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(s.value||(d=f(i).triggerElement.value)==null||d.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var d;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(d=f(i).triggerElement.value)!=null&&d.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:B(()=>[X(l.$slots,"default")]),_:3},16))}}),Pw=W({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),i=uo(r);return(s,a)=>(D(),j(f(Pr),{present:s.forceMount||f(o).open.value},{default:B(()=>[f(o).modal.value?(D(),j(Iw,ce({key:0},{...n,...f(i),...s.$attrs},{onOpenAutoFocus:a[0]||(a[0]=l=>r("openAutoFocus",l))}),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):(D(),j(kw,ft(ce({key:1},{...n,...f(i),...s.$attrs})),{default:B(()=>[X(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Bw=W({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=$n();return oc(!0),(n,r)=>(D(),j(f(Be),{as:n.as,"as-child":n.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:B(()=>[X(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$w=W({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=$n();return(n,r)=>{var o;return(o=f(t))!=null&&o.modal.value?(D(),j(f(Pr),{key:0,present:n.forceMount||f(t).open.value},{default:B(()=>[q(Bw,ce({as:n.as,"as-child":n.asChild},n.$attrs),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):pt("",!0)}}}),Zh=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{type:r.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>f(n).onOpenChange(!1))}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["type"]))}}),Mw=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).titleId}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),Dw=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).descriptionId}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),[Qh,Rw]=Tt("PopperRoot"),uc=W({__name:"PopperRoot",setup(e){const t=U();return Rw({anchor:t,onAnchorChange:n=>t.value=n}),(n,r)=>X(n.$slots,"default")}}),Jh=W({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),o=Qh();return ye(r,()=>{o.onAnchorChange(t.element??r.value)}),(i,s)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:n,as:i.as,"as-child":i.asChild},{default:B(()=>[X(i.$slots,"default")]),_:3},8,["as","as-child"]))}});function Lw(e){return e!==null}function Fw(e){return{name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:s,middlewareData:a}=t,l=((n=a.arrow)==null?void 0:n.centerOffset)!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,p]=ru(i),h={start:"0%",center:"50%",end:"100%"}[p],v=(((r=a.arrow)==null?void 0:r.x)??0)+u/2,b=(((o=a.arrow)==null?void 0:o.y)??0)+c/2;let w="",S="";return d==="bottom"?(w=l?h:`${v}px`,S=`${-c}px`):d==="top"?(w=l?h:`${v}px`,S=`${s.floating.height+c}px`):d==="right"?(w=`${-c}px`,S=l?h:`${b}px`):d==="left"&&(w=`${s.floating.width+c}px`,S=l?h:`${b}px`),{data:{x:w,y:S}}}}}function ru(e){const[t,n="center"]=e.split("-");return[t,n]}const Nw={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[DP,Vw]=Tt("PopperContent"),Xs=W({inheritAttrs:!1,__name:"PopperContent",props:m0({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Nw}),setup(e,{expose:t}){const n=e,r=Qh(),o=tr(),{primitiveElement:i,currentElement:s}=Qe(),a=U(),l=U(),{width:u,height:c}=dw(l),d=K(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=K(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),h=K(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),v=K(()=>({padding:p.value,boundary:h.value.filter(Lw),altBoundary:h.value.length>0})),b=N1(()=>[h1({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.avoidCollisions&&m1({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?g1():void 0,...v.value}),!n.prioritizePosition&&n.avoidCollisions&&d1({...v.value}),v1({...v.value,apply:({elements:y,rects:A,availableWidth:x,availableHeight:C})=>{const{width:k,height:O}=A.reference,E=y.floating.style;Object.assign(y.floating.style,{maxWidth:`${x}px`,maxHeight:`${C}px`}),E.setProperty("--radix-popper-available-width",`${x}px`),E.setProperty("--radix-popper-available-height",`${C}px`),E.setProperty("--radix-popper-anchor-width",`${k}px`),E.setProperty("--radix-popper-anchor-height",`${O}px`)}}),l.value&&L1({element:l.value,padding:n.arrowPadding}),Fw({arrowWidth:u.value,arrowHeight:c.value}),n.hideWhenDetached&&f1({strategy:"referenceHidden",...v.value})]),{floatingStyles:w,placement:S,isPositioned:_,middlewareData:I}=F1(r.anchor,a,{strategy:"fixed",placement:d,whileElementsMounted:(...y)=>D1(...y,{animationFrame:n.updatePositionStrategy==="always"}),middleware:b}),F=K(()=>ru(S.value)[0]),V=K(()=>ru(S.value)[1]);vt(()=>{var y;_.value&&((y=n.onPlaced)==null||y.call(n))});const N=K(()=>{var y;return((y=I.value.arrow)==null?void 0:y.centerOffset)!==0}),H=U("");vt(()=>{s.value&&(H.value=window.getComputedStyle(s.value).zIndex)});const m=K(()=>{var y;return((y=I.value.arrow)==null?void 0:y.x)??0}),g=K(()=>{var y;return((y=I.value.arrow)==null?void 0:y.y)??0});return Vw({placedSide:F,onArrowChange:y=>l.value=y,arrowX:m,arrowY:g,shouldHideArrow:N}),t({$el:s}),(y,A)=>{var x,C,k;return D(),Te("div",{ref_key:"floatingRef",ref:a,"data-radix-popper-content-wrapper":"",style:qt({...f(w),transform:f(_)?f(w).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H.value,"--radix-popper-transform-origin":[(x=f(I).transformOrigin)==null?void 0:x.x,(C=f(I).transformOrigin)==null?void 0:C.y].join(" ")})},[q(f(Be),ce({ref:O=>{f(o)(O),i.value=O}},y.$attrs,{"as-child":n.asChild,as:y.as,"data-side":F.value,"data-align":V.value,style:{animation:f(_)?void 0:"none",opacity:(k=f(I).hide)!=null&&k.referenceHidden?0:void 0}}),{default:B(()=>[X(y.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Ra=W({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return(t,n)=>(D(),j(f(Be),{as:t.as,"as-child":t.asChild,style:qt({position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"})},{default:B(()=>[X(t.$slots,"default")]),_:3},8,["as","as-child","style"]))}}),zw=W({__name:"VisuallyHiddenInput",props:{name:{},value:{},required:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=K(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,o)=>typeof r=="object"?Object.entries(r).map(([i,s])=>({name:`[${o}][${t.name}][${i}]`,value:s})):{name:`[${t.name}][${o}]`,value:r}):typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,o])=>({name:`[${t.name}][${r}]`,value:o})):[]);return(r,o)=>(D(!0),Te(qe,null,Qr(n.value,i=>(D(),j(Ra,{key:i.name,as:"input",type:"hidden",hidden:"",readonly:"",name:i.name,value:i.value,required:r.required,disabled:r.disabled},null,8,["name","value","required","disabled"]))),128))}});function Hw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jw=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const ci=Hw(jw),Uw="data-radix-vue-collection-item",[cc,Ww]=Tt("CollectionProvider");function Gw(e=Uw){const t=U(new Map),n=U(),r=Ww({collectionRef:n,itemMap:t,attrName:e}),{getItems:o}=Yw(r),i=K(()=>Array.from(r.itemMap.value.values())),s=K(()=>r.itemMap.value.size);return{getItems:o,reactiveItems:i,itemMapSize:s}}const Kw=W({name:"CollectionSlot",setup(e,{slots:t}){const n=cc(),{primitiveElement:r,currentElement:o}=Qe();return ye(o,()=>{n.collectionRef.value=o.value}),()=>On(Ma,{ref:r},t)}}),qw=W({name:"CollectionItem",setup(e,{slots:t,attrs:n}){const r=cc(),{primitiveElement:o,currentElement:i}=Qe(),s=Rt();return vt(a=>{var l;if(i.value){const u=$o(i.value);r.itemMap.value.set(u,{ref:i.value,...$o(((l=s==null?void 0:s.parent)==null?void 0:l.props)??{})}),a(()=>r.itemMap.value.delete(u))}}),()=>On(Ma,{...n,[r.attrName]:"",ref:o},t)}});function Yw(e){const t=e??cc();return{getItems:()=>{const n=t.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${t.attrName}]`));return Array.from(t.itemMap.value.values()).sort((o,i)=>r.indexOf(o.ref)-r.indexOf(i.ref))}}}const[Ho,Xw]=Tt("ComboboxRoot"),Zw=W({__name:"ComboboxRoot",props:{modelValue:{},defaultValue:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},searchTerm:{},multiple:{type:Boolean},disabled:{type:Boolean},name:{},dir:{},filterFunction:{},displayValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue","update:open","update:searchTerm"],setup(e,{emit:t}){const n=e,r=t,{multiple:o,disabled:i,dir:s}=on(n),a=Wh(s),l=Yr(n,"searchTerm",r,{defaultValue:"",passive:n.searchTerm===void 0}),u=Yr(n,"modelValue",r,{defaultValue:n.defaultValue??o.value?[]:void 0,passive:n.modelValue===void 0,deep:!0}),c=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),d=U();async function p(C){var k,O;c.value=C,await Ke(),C?(u.value&&(Array.isArray(u.value)&&o.value?d.value=(k=I().find(E=>{var M,$;return(($=(M=E.ref)==null?void 0:M.dataset)==null?void 0:$.state)==="checked"}))==null?void 0:k.value:d.value=u.value),(O=b.value)==null||O.focus(),x()):(v.value=!1,m())}function h(C){if(Array.isArray(u.value)&&o.value){const k=u.value.findIndex(O=>ci(O,C));k===-1?u.value.push(C):u.value.splice(k,1)}else u.value=C,p(!1)}const v=U(!1),b=U(),w=U(),{primitiveElement:S,currentElement:_}=Qe(),{getItems:I,reactiveItems:F,itemMapSize:V}=Gw("data-radix-vue-combobox-item"),N=zh(()=>V.value,()=>I().map(C=>C.value)),H=K(()=>{if(v.value){if(n.filterFunction)return n.filterFunction(N.value,l.value);if(typeof N.value[0]=="string")return N.value.filter(C=>{var k;return C.toLowerCase().includes((k=l.value)==null?void 0:k.toLowerCase())})}return N.value});function m(){!o.value&&u.value?n.displayValue?l.value=n.displayValue(u.value):typeof u.value!="object"?l.value=u.value.toString():l.value="":l.value=""}const g=K(()=>H.value.findIndex(C=>ci(C,d.value))),y=K(()=>{var C;return(C=F.value.find(k=>k.value===d.value))==null?void 0:C.ref});ye(u,async()=>{await Ke(),m()},{immediate:!0}),ye(()=>H.value.length,async C=>{await Ke(),await Ke(),C&&g.value===-1&&(d.value=H.value[0])});const A=iw(_);function x(){y.value instanceof Element&&y.value.scrollIntoView({block:"nearest"})}return Xw({searchTerm:l,modelValue:u,onValueChange:h,isUserInputted:v,multiple:o,disabled:i,open:c,onOpenChange:p,filteredOptions:H,contentId:Wn(),inputElement:b,onInputElementChange:C=>b.value=C,onInputNavigation:async C=>{const k=g.value;k===0&&C==="up"||k===H.value.length-1&&C==="down"||(k===-1&&H.value.length||C==="home"?d.value=H.value[0]:C==="end"?d.value=H.value[H.value.length-1]:d.value=H.value[C==="up"?k-1:k+1],x())},onInputEnter:async()=>{var C;H.value.length&&d.value&&y.value instanceof Element&&((C=y.value)==null||C.click())},selectedValue:d,onSelectedValueChange:C=>d.value=C,parentElement:_,contentElement:w,onContentElementChange:C=>w.value=C}),(C,k)=>(D(),j(f(uc),null,{default:B(()=>[q(f(Be),ce({ref_key:"primitiveElement",ref:S,style:{pointerEvents:f(c)?"auto":void 0},as:C.as,"as-child":C.asChild,dir:f(a)},C.$attrs),{default:B(()=>[X(C.$slots,"default",{activeIndex:g.value,open:f(c),value:f(u)}),f(A)&&n.name?(D(),j(f(zw),{key:0,name:n.name,value:f(u)},null,8,["name","value"])):pt("",!0)]),_:3},16,["style","as","as-child","dir"])]),_:3}))}}),Qw=W({__name:"ComboboxInput",props:{type:{default:"text"},disabled:{type:Boolean},autoFocus:{type:Boolean},asChild:{type:Boolean},as:{default:"input"}},setup(e){const t=e,n=Ho(),{primitiveElement:r,currentElement:o}=Qe();Ue(()=>{const u=o.value.nodeName==="INPUT"?o.value:o.value.querySelector("input");u&&(n.onInputElementChange(u),setTimeout(()=>{t.autoFocus&&(u==null||u.focus())},1))});const i=K(()=>t.disabled||n.disabled.value||!1);function s(u){n.open.value?n.onInputNavigation(u.key==="ArrowUp"?"up":"down"):n.onOpenChange(!0)}function a(u){n.open.value&&n.onInputNavigation(u.key==="Home"?"home":"end")}function l(u){var c;n.searchTerm.value=(c=u.target)==null?void 0:c.value,n.open.value||n.onOpenChange(!0),n.isUserInputted.value=!0}return(u,c)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:r},t,{value:f(n).searchTerm.value,"aria-expanded":f(n).open.value,"aria-controls":f(n).contentId,disabled:i.value,"aria-disabled":i.value??void 0,"aria-autocomplete":"list",role:"combobox",autocomplete:"false",onInput:l,onKeydown:[ul(eo(s,["prevent"]),["down","up"]),ul(f(n).onInputEnter,["enter"]),ul(eo(a,["prevent"]),["home","end"])]}),{default:B(()=>[X(u.$slots,"default")]),_:3},16,["value","aria-expanded","aria-controls","disabled","aria-disabled","onKeydown"]))}}),[em,Jw]=Tt("ComboboxGroup"),e_=W({__name:"ComboboxGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=Wn(),r=U([]),o=Ho(),i=K(()=>!o.isUserInputted.value||r.value.length===0||o.filteredOptions.value.map(s=>JSON.stringify(s)).some(s=>r.value.map(a=>JSON.stringify(a)).includes(s)));return Jw({id:n,options:r}),(s,a)=>ba((D(),j(f(Be),ce({role:"group"},t,{"aria-labelledby":f(n)}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["aria-labelledby"])),[[ch,i.value]])}}),t_=W({__name:"ComboboxLabel",props:{for:{},asChild:{type:Boolean},as:{default:"div"}},setup(e){const t=e,n=em({id:""});return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).id}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),[RP,n_]=Tt("ComboboxContent"),r_=W({__name:"ComboboxContentImpl",props:{position:{default:"inline"},bodyLock:{type:Boolean},dismissable:{type:Boolean,default:!0},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,r=t,{position:o}=on(n),i=Ho();oc(n.bodyLock);const{primitiveElement:s,currentElement:a}=Qe();sc(a);const l=K(()=>n.position==="popper"?n:{}),u=ic(l.value);function c(p){i.onSelectedValueChange("")}Ue(()=>{i.onContentElementChange(a.value)});const d={boxSizing:"border-box","--radix-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-combobox-content-available-width":"var(--radix-popper-available-width)","--radix-combobox-content-available-height":"var(--radix-popper-available-height)","--radix-combobox-trigger-width":"var(--radix-popper-anchor-width)","--radix-combobox-trigger-height":"var(--radix-popper-anchor-height)"};return n_({position:o}),(p,h)=>(D(),j(f(Kw),null,{default:B(()=>[p.dismissable?(D(),j(f(Da),{key:0,"as-child":"","disable-outside-pointer-events":p.disableOutsidePointerEvents,onDismiss:h[0]||(h[0]=v=>f(i).onOpenChange(!1)),onFocusOutside:h[1]||(h[1]=v=>{var b;(b=f(i).parentElement.value)!=null&&b.contains(v.target)&&v.preventDefault(),r("focusOutside",v)}),onInteractOutside:h[2]||(h[2]=v=>r("interactOutside",v)),onEscapeKeyDown:h[3]||(h[3]=v=>r("escapeKeyDown",v)),onPointerDownOutside:h[4]||(h[4]=v=>{var b;(b=f(i).parentElement.value)!=null&&b.contains(v.target)&&v.preventDefault(),r("pointerDownOutside",v)})},{default:B(()=>[(D(),j(qn(f(o)==="popper"?f(Xs):f(Be)),ce({...p.$attrs,...f(u)},{id:f(i).contentId,ref_key:"primitiveElement",ref:s,role:"listbox","data-state":f(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...f(o)==="popper"?d:{}},onPointerleave:c}),{default:B(()=>[X(p.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3},8,["disable-outside-pointer-events"])):(D(),j(qn(f(o)==="popper"?f(Xs):f(Be)),ce({key:1},{...p.$attrs,...l.value},{id:f(i).contentId,ref_key:"primitiveElement",ref:s,role:"listbox","data-state":f(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...f(o)==="popper"?d:{}},onPointerleave:c}),{default:B(()=>[X(p.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3}))}}),o_=W({__name:"ComboboxContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},dismissable:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=sn(e,t),r=Ho();return(o,i)=>(D(),j(f(Pr),{present:o.forceMount||f(r).open.value},{default:B(()=>[q(r_,ft(Ct({...f(n),...o.$attrs})),{default:B(()=>[X(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),i_=W({__name:"ComboboxEmpty",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=Ho(),r=K(()=>n.searchTerm.value&&n.filteredOptions.value.length===0);return(o,i)=>r.value?(D(),j(f(Be),ft(ce({key:0},t)),{default:B(()=>[X(o.$slots,"default",{},()=>[Re("No options")])]),_:3},16)):pt("",!0)}}),[LP,s_]=Tt("ComboboxItem"),a_="combobox.select",l_=W({__name:"ComboboxItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{disabled:o}=on(n),i=Ho(),s=em({id:"",options:U([])}),{primitiveElement:a,currentElement:l}=Qe(),u=K(()=>{var S,_;return i.multiple.value&&Array.isArray(i.modelValue.value)?(S=i.modelValue.value)==null?void 0:S.includes(n.value):ci((_=i.modelValue)==null?void 0:_.value,n.value)}),c=K(()=>ci(i.selectedValue.value,n.value)),d=U(n.textValue??""),p=Wn(),h=K(()=>i.isUserInputted.value?i.searchTerm.value===""||!!i.filteredOptions.value.find(S=>ci(S,n.value)):!0);async function v(S){r("select",S),!(S!=null&&S.defaultPrevented)&&!o.value&&S&&i.onValueChange(n.value)}function b(S){if(!S)return;const _={originalEvent:S,value:n.value};ec(a_,v,_)}async function w(S){await Ke(),!S.defaultPrevented&&i.onSelectedValueChange(n.value)}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Ue(()=>{var S,_,I,F;(_=(S=s.options)==null?void 0:S.value)!=null&&_.includes(n.value)||(I=s.options)==null||I.value.push(n.value),!d.value&&(F=l.value)!=null&&F.textContent&&(d.value=l.value.textContent)}),s_({isSelected:u}),(S,_)=>(D(),j(f(qw),null,{default:B(()=>[ba(q(f(Be),{ref_key:"primitiveElement",ref:a,role:"option",tabindex:"-1","aria-labelledby":f(p),"data-highlighted":c.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":f(o)||void 0,"data-disabled":f(o)?"":void 0,as:S.as,"as-child":S.asChild,onClick:b,onPointermove:w},{default:B(()=>[X(S.$slots,"default",{},()=>[Re(it(S.value),1)])]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","as","as-child"]),[[ch,h.value]])]),_:3}))}}),u_=W({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ce(t,{onMousedown:r[0]||(r[0]=o=>{!o.defaultPrevented&&o.detail>1&&o.preventDefault()})}),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),[qi,c_]=Tt("PopoverRoot"),d_=W({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,{modal:o}=on(n),i=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=U(),a=U(!1);return c_({contentId:Wn(),modal:o,open:i,onOpenChange:l=>{i.value=l},onOpenToggle:()=>{i.value=!i.value},triggerElement:s,hasCustomAnchor:a}),(l,u)=>(D(),j(f(uc),null,{default:B(()=>[X(l.$slots,"default")]),_:3}))}}),f_=W({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e,{expose:t}){const n=e,r=qi(),{primitiveElement:o,currentElement:i}=Qe();return Ue(()=>{r.triggerElement.value=i.value}),t({$el:i}),(s,a)=>(D(),j(qn(f(r).hasCustomAnchor.value?f(Be):f(Jh)),{"as-child":""},{default:B(()=>[q(f(Be),{ref_key:"primitiveElement",ref:o,type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(r).open.value,"aria-controls":f(r).contentId,"data-state":f(r).open.value?"open":"closed",as:s.as,"as-child":n.asChild,onClick:f(r).onOpenToggle},{default:B(()=>[X(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),p_=W({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),tm=W({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=ic(n),i=qi();return ow(),(s,a)=>(D(),j(f(Yh),{"as-child":"",loop:"",trapped:s.trapFocus,onMountAutoFocus:a[5]||(a[5]=l=>r("openAutoFocus",l)),onUnmountAutoFocus:a[6]||(a[6]=l=>r("closeAutoFocus",l))},{default:B(()=>[q(f(Da),{"as-child":"","disable-outside-pointer-events":s.disableOutsidePointerEvents,onPointerDownOutside:a[0]||(a[0]=l=>r("pointerDownOutside",l)),onInteractOutside:a[1]||(a[1]=l=>r("interactOutside",l)),onEscapeKeyDown:a[2]||(a[2]=l=>r("escapeKeyDown",l)),onFocusOutside:a[3]||(a[3]=l=>r("focusOutside",l)),onDismiss:a[4]||(a[4]=l=>f(i).onOpenChange(!1))},{default:B(()=>[q(f(Xs),ce(f(o),{id:f(i).contentId,"data-state":f(i).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["id","data-state","style"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),h_=W({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=U(!1);oc(!0);const s=sn(n,r),{primitiveElement:a,currentElement:l}=Qe();return sc(l),(u,c)=>(D(),j(tm,ce({ref_key:"primitiveElement",ref:a},f(s),{"trap-focus":f(o).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=eo(d=>{var p;r("closeAutoFocus",d),i.value||(p=f(o).triggerElement.value)==null||p.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=d=>{r("pointerDownOutside",d);const p=d.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0,v=p.button===2||h;i.value=v}),onFocusOutside:c[2]||(c[2]=eo(()=>{},["prevent"]))}),{default:B(()=>[X(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),m_=W({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=U(!1),s=U(!1),a=sn(n,r);return(l,u)=>(D(),j(tm,ce(f(a),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(i.value||(d=f(o).triggerElement.value)==null||d.focus(),c.preventDefault()),i.value=!1,s.value=!1}),onInteractOutside:u[1]||(u[1]=async c=>{var d;r("interactOutside",c),c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const p=c.target;(d=f(o).triggerElement.value)!=null&&d.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:B(()=>[X(l.$slots,"default")]),_:3},16))}}),g_=W({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=sn(n,r);return(s,a)=>(D(),j(f(Pr),{present:s.forceMount||f(o).open.value},{default:B(()=>[f(o).modal.value?(D(),j(h_,ft(ce({key:0},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):(D(),j(m_,ft(ce({key:1},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),[an,v_]=Tt("ScrollAreaRoot"),y_=W({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),o=U(0),i=U(0),s=U(),a=U(),l=U(),u=U(),c=U(!1),d=U(!1),{type:p,dir:h,scrollHideDelay:v}=on(t),b=Wh(h);return v_({type:p,dir:b,scrollHideDelay:v,scrollArea:r,viewport:s,onViewportChange:w=>{s.value=w||void 0},content:a,onContentChange:w=>{a.value=w},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:d,onScrollbarXChange:w=>{l.value=w||void 0},onScrollbarYChange:w=>{u.value=w||void 0},onScrollbarXEnabledChange:w=>{c.value=w},onScrollbarYEnabledChange:w=>{d.value=w},onCornerWidthChange:w=>{o.value=w},onCornerHeightChange:w=>{i.value=w}}),(w,S)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:n,"as-child":t.asChild,as:w.as,dir:f(b),style:qt({position:"relative","--radix-scroll-area-corner-width":`${o.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:B(()=>[X(w.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),b_=W({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),{primitiveElement:r,currentElement:o}=Qe(),i=U();return Ue(()=>{n.onViewportChange(i.value),n.onContentChange(o.value)}),(s,a)=>(D(),Te(qe,null,[Ee("div",ce({ref_key:"viewportElement",ref:i,"data-radix-scroll-area-viewport":"",style:{overflowX:f(n).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(n).scrollbarYEnabled.value?"scroll":"hidden"}},s.$attrs,{tabindex:0}),[q(f(Be),{ref_key:"primitiveElement",ref:r,style:{minWidth:"100%",display:"table"},"as-child":t.asChild,as:s.as},{default:B(()=>[X(s.$slots,"default")]),_:3},8,["as-child","as"])],16),q(f(Be),{as:"style"},{default:B(()=>[Re(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1})],64))}});function w_(e,[t,n]){return Math.min(n,Math.max(t,e))}function nm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function La(e){const t=rm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function rm(e,t){const n=e/t;return Number.isNaN(n)?0:n}function __(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)}function Vd(e,t,n="ltr"){const r=La(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,s]:[s*-1,0],u=w_(e,l);return nm([0,s],[0,a])(u)}function ds(e){return e?Number.parseInt(e,10):0}function x_(e,t,n,r="ltr"){const o=La(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return nm([l,u],d)(e)}function zd(e,t){return e>0&&e{document.addEventListener("wheel",w,{passive:!1})}),Bn(()=>{document.removeEventListener("wheel",w)});function S(){var _,I,F,V,N;l.value&&(n.isHorizontal?i.handleSizeChange({content:((_=o.viewport.value)==null?void 0:_.scrollWidth)??0,viewport:((I=o.viewport.value)==null?void 0:I.offsetWidth)??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:ds(getComputedStyle(l.value).paddingLeft),paddingEnd:ds(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:((F=o.viewport.value)==null?void 0:F.scrollHeight)??0,viewport:((V=o.viewport.value)==null?void 0:V.offsetHeight)??0,scrollbar:{size:((N=l.value)==null?void 0:N.clientHeight)??0,paddingStart:ds(getComputedStyle(l.value).paddingLeft),paddingEnd:ds(getComputedStyle(l.value).paddingRight)}}))}return Do(l,S),Do(o.content,S),(_,I)=>(D(),j(f(Be),{ref:F=>{f(u)(F),a.value=F},style:{position:"absolute"},"data-scrollbarimpl":"",as:f(s).as.value,"as-child":f(s).asChild.value,onPointerdown:h,onPointermove:v,onPointerup:b},{default:B(()=>[X(_.$slots,"default")]),_:3},8,["as","as-child"]))}}),E_=W({__name:"ScrollAreaScrollbarX",setup(e){const t=an(),n=Fa(),{primitiveElement:r,currentElement:o}=Qe(),i=tr();Ue(()=>{o.value&&t.onScrollbarXChange(o.value)});const s=K(()=>n.sizes.value);return(a,l)=>(D(),j(om,{ref:u=>{f(i)(u),r.value=u},"is-horizontal":!0,"data-orientation":"horizontal",style:qt({bottom:0,left:f(t).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${f(La)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>f(n).onDragScroll(u.x))},{default:B(()=>[X(a.$slots,"default")]),_:3},8,["style"]))}}),S_=W({__name:"ScrollAreaScrollbarY",setup(e){const t=an(),n=Fa(),{primitiveElement:r,currentElement:o}=Qe(),i=tr();Ue(()=>{o.value&&t.onScrollbarYChange(o.value)});const s=K(()=>n.sizes.value);return(a,l)=>(D(),j(om,{ref:u=>{f(i)(u),r.value=u},"is-horizontal":!1,"data-orientation":"vertical",style:qt({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${f(La)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>f(n).onDragScroll(u.y))},{default:B(()=>[X(a.$slots,"default")]),_:3},8,["style"]))}}),[Fa,C_]=Tt("ScrollAreaScrollbarVisible"),dc=W({__name:"ScrollAreaScrollbarVisible",setup(e){const t=an(),n=Na(),r=tr(),o=U({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=K(()=>{const S=rm(o.value.viewport,o.value.content);return S>0&&S<1}),s=U(),a=U(0);function l(S,_){if(h.value){const I=t.viewport.value.scrollLeft+S.deltaY;t.viewport.value.scrollLeft=I,zd(I,_)&&S.preventDefault()}else{const I=t.viewport.value.scrollTop+S.deltaY;t.viewport.value.scrollTop=I,zd(I,_)&&S.preventDefault()}}function u(S,_){h.value?a.value=_.x:a.value=_.y}function c(S){a.value=0}function d(S){o.value=S}function p(S,_){return x_(S,a.value,o.value,_)}const h=K(()=>n.isHorizontal.value);function v(S){h.value?t.viewport.value.scrollLeft=p(S,t.dir.value):t.viewport.value.scrollTop=p(S)}function b(){if(h.value){if(t.viewport.value&&s.value){const S=t.viewport.value.scrollLeft,_=Vd(S,o.value,t.dir.value);s.value.style.transform=`translate3d(${_}px, 0, 0)`}}else if(t.viewport.value&&s.value){const S=t.viewport.value.scrollTop,_=Vd(S,o.value);s.value.style.transform=`translate3d(0, ${_}px, 0)`}}function w(S){s.value=S}return C_({sizes:o,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:b,onThumbChange:w,onDragScroll:v}),(S,_)=>h.value?(D(),j(E_,ce({key:0},S.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(S.$slots,"default")]),_:3},16)):(D(),j(S_,ce({key:1},S.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(S.$slots,"default")]),_:3},16))}}),im=W({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=Na(),r=tr(),o=U(!1),i=Hh(()=>{if(t.viewport.value){const s=t.viewport.value.offsetWidthi()),Do(t.viewport,i),Do(t.content,i),(s,a)=>(D(),j(f(Pr),{present:s.forceMount||o.value},{default:B(()=>[q(dc,ce(s.$attrs,{ref_key:"forwardRef",ref:r,"data-state":o.value?"visible":"hidden"}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),T_=W({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=tr();let r;const o=U(!1);function i(){window.clearTimeout(r),o.value=!0}function s(){r=window.setTimeout(()=>{o.value=!1},t.scrollHideDelay.value)}return Ue(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",s))}),Bn(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(r),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",s))}),(a,l)=>(D(),j(f(Pr),{present:a.forceMount||o.value},{default:B(()=>[q(im,ce(a.$attrs,{ref_key:"forwardRef",ref:n,"data-state":o.value?"visible":"hidden"}),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),O_=W({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=Na(),r=tr(),{state:o,dispatch:i}=Kh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});vt(()=>{o.value==="idle"&&window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value)});const s=Hh(()=>i("SCROLL_END"),100);return vt(()=>{const a=t.viewport.value,l=n.isHorizontal.value?"scrollLeft":"scrollTop";if(a){let u=a[l];const c=()=>{const d=a[l];u!==d&&(i("SCROLL"),s()),u=d};a.addEventListener("scroll",c)}}),(a,l)=>(D(),j(f(Pr),{present:a.forceMount||f(o)!=="hidden"},{default:B(()=>[q(dc,ce(a.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(a.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Na,A_]=Tt("ScrollAreaScrollbar"),I_=W({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(e){const t=e,n=an(),r=K(()=>t.orientation==="horizontal");ye(r,()=>{r.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Bn(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:o,forceMount:i,asChild:s,as:a}=on(t);return A_({orientation:o,forceMount:i,isHorizontal:r,as:a,asChild:s}),(l,u)=>f(n).type.value==="hover"?(D(),j(T_,ce({key:0},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(D(),j(O_,ce({key:1},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(D(),j(im,ce({key:2},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(D(),j(dc,ce({key:3},l.$attrs,{"data-state":"visible"}),{default:B(()=>[X(l.$slots,"default")]),_:3},16)):pt("",!0)}}),k_=W({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),r=Fa();function o(p){const h=p.target.getBoundingClientRect(),v=p.clientX-h.left,b=p.clientY-h.top;r.handleThumbDown(p,{x:v,y:b})}function i(p){r.handleThumbUp(p)}const{primitiveElement:s,currentElement:a}=Qe(),l=U(),u=K(()=>n.viewport.value);function c(){if(!l.value){const p=__(u.value,r.onThumbPositionChange);l.value=p,r.onThumbPositionChange()}}const d=K(()=>r.sizes.value);return K1(d,()=>{r.onThumbChange(a.value),u.value&&(r.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Bn(()=>{var p;u.value.removeEventListener("scroll",c),(p=n.viewport.value)==null||p.removeEventListener("scroll",c)}),(p,h)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:s,"data-state":f(r).hasThumb?"visible":"hidden",style:qt({width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"}),"as-child":t.asChild,as:p.as,onPointerdown:o,onPointerup:i},{default:B(()=>[X(p.$slots,"default")]),_:3},8,["data-state","style","as-child","as"]))}}),P_=W({__name:"ScrollAreaCornerImpl",setup(e){const t=an(),n=U(0),r=U(0),o=K(()=>!!n.value&&!!r.value);function i(){var a;const l=((a=t.scrollbarX.value)==null?void 0:a.offsetHeight)||0;t.onCornerHeightChange(l),r.value=l}function s(){var a;const l=((a=t.scrollbarY.value)==null?void 0:a.offsetWidth)||0;t.onCornerWidthChange(l),n.value=l}return Do(t.scrollbarX.value,i),Do(t.scrollbarY.value,s),ye(()=>t.scrollbarX.value,i),ye(()=>t.scrollbarY.value,s),(a,l)=>{var u;return o.value?(D(),j(f(Be),ce({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},(u=a.$parent)==null?void 0:u.$props),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["style"])):pt("",!0)}}}),B_=W({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),r=K(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),o=K(()=>n.type.value!=="scroll"&&r.value);return(i,s)=>o.value?(D(),j(P_,ft(ce({key:0},t)),{default:B(()=>[X(i.$slots,"default")]),_:3},16)):pt("",!0)}}),$_=W({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e,n=["horizontal","vertical"];function r(a){return n.includes(a)}const o=K(()=>r(t.orientation)?t.orientation:"horizontal"),i=K(()=>o.value==="vertical"?t.orientation:void 0),s=K(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(D(),j(f(Be),ce({as:a.as,"as-child":a.asChild,"data-orientation":o.value},s.value),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),M_=W({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j($_,ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),[Va,D_]=Tt("ToastProvider"),R_=W({__name:"ToastProvider",props:{label:{default:"Notification"},duration:{default:5e3},swipeDirection:{default:"right"},swipeThreshold:{default:50}},setup(e){const t=e,{label:n,duration:r,swipeDirection:o,swipeThreshold:i}=on(t),s=U(),a=U(0),l=U(!1),u=U(!1);if(t.label&&typeof t.label=="string"&&!t.label.trim()){const c="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw new Error(c)}return D_({label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:a,viewport:s,onViewportChange(c){s.value=c},onToastAdd(){a.value++},onToastRemove(){a.value--},isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:u}),(c,d)=>X(c.$slots,"default")}}),L_="toast.swipeStart",F_="toast.swipeMove",N_="toast.swipeCancel",V_="toast.swipeEnd",z_=["F8"],ou="toast.viewportPause",iu="toast.viewportResume";function fs(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function Hd(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function H_(e){return e.nodeType===e.ELEMENT_NODE}function sm(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),H_(n)){const r=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!r)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...sm(n))}}),t}const j_=W({__name:"ToastAnnounce",setup(e){const t=Va(),n=G1(1e3),r=U(!1);return X1(()=>{r.value=!0}),(o,i)=>f(n)||r.value?(D(),j(f(Ra),{key:0},{default:B(()=>[Re(it(f(t).label.value)+" ",1),X(o.$slots,"default")]),_:3})):pt("",!0)}}),[U_,W_]=Tt("ToastRoot"),G_=W({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(e,{emit:t}){const n=e,r=t,o=tr(),{primitiveElement:i,currentElement:s}=Qe(),a=Va(),l=U(null),u=U(null),c=K(()=>n.duration||a.duration.value),d=U(0),p=U(c.value),h=U(0);function v(S){!S||S===Number.POSITIVE_INFINITY||(window.clearTimeout(h.value),d.value=new Date().getTime(),h.value=window.setTimeout(b,S))}function b(){var S,_;(S=s.value)!=null&&S.contains(document.activeElement)&&((_=a.viewport.value)==null||_.focus()),r("close")}const w=K(()=>s.value?sm(s.value):null);if(n.type&&!["foreground","background"].includes(n.type)){const S="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(S)}return vt(S=>{const _=a.viewport.value;if(_){const I=()=>{v(p.value),r("resume")},F=()=>{const V=new Date().getTime()-d.value;p.value=p.value-V,window.clearTimeout(h.value),r("pause")};return _.addEventListener(ou,F),_.addEventListener(iu,I),()=>{_.removeEventListener(ou,F),_.removeEventListener(iu,I)}}}),vt(()=>{n.open&&!a.isClosePausedRef.value&&v(c.value)}),nc("Escape",S=>{r("escapeKeyDown",S),S.defaultPrevented||(a.isFocusedToastEscapeKeyDownRef.value=!0,b())}),Ue(()=>{a.onToastAdd()}),Bn(()=>{a.onToastRemove()}),W_({onClose:b}),(S,_)=>(D(),Te(qe,null,[w.value?(D(),j(j_,{key:0,role:"status","aria-live":S.type==="foreground"?"assertive":"polite","aria-atomic":""},{default:B(()=>[Re(it(w.value),1)]),_:1},8,["aria-live"])):pt("",!0),(D(),j(rh,{to:f(a).viewport.value},[q(f(Be),ce({ref:I=>{f(o)(I),i.value=I},role:"status","aria-live":"off","aria-atomic":"",tabindex:"0","data-radix-vue-collection-item":""},S.$attrs,{as:S.as,"as-child":S.asChild,"data-state":S.open?"open":"closed","data-swipe-direction":f(a).swipeDirection.value,style:{userSelect:"none",touchAction:"none"},onPointerdown:_[0]||(_[0]=eo(I=>{l.value={x:I.clientX,y:I.clientY}},["left"])),onPointermove:_[1]||(_[1]=I=>{if(!l.value)return;const F=I.clientX-l.value.x,V=I.clientY-l.value.y,N=!!u.value,H=["left","right"].includes(f(a).swipeDirection.value),m=["left","up"].includes(f(a).swipeDirection.value)?Math.min:Math.max,g=H?m(0,F):0,y=H?0:m(0,V),A=I.pointerType==="touch"?10:2,x={x:g,y},C={originalEvent:I,delta:x};N?(u.value=x,f(fs)(f(F_),k=>r("swipeMove",k),C)):f(Hd)(x,f(a).swipeDirection.value,A)?(u.value=x,f(fs)(f(L_),k=>r("swipeStart",k),C),I.target.setPointerCapture(I.pointerId)):(Math.abs(F)>A||Math.abs(V)>A)&&(l.value=null)}),onPointerup:_[2]||(_[2]=I=>{const F=u.value,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),u.value=null,l.value=null,F){const N=I.currentTarget,H={originalEvent:I,delta:F};f(Hd)(F,f(a).swipeDirection.value,f(a).swipeThreshold.value)?f(fs)(f(V_),m=>r("swipeEnd",m),H):f(fs)(f(N_),m=>r("swipeCancel",m),H),N==null||N.addEventListener("click",m=>m.preventDefault(),{once:!0})}})}),{default:B(()=>[X(S.$slots,"default")]),_:3},16,["as","as-child","data-state","data-swipe-direction"])],8,["to"]))],64))}}),K_=W({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:"foreground"},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{emit:t}){const n=e,r=t,o=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return(i,s)=>(D(),j(f(Pr),{present:i.forceMount||f(o)},{default:B(()=>[q(G_,ce({open:f(o),type:i.type,as:i.as,"as-child":i.asChild,duration:i.duration},i.$attrs,{onClose:s[0]||(s[0]=a=>o.value=!1),onPause:s[1]||(s[1]=a=>r("pause")),onResume:s[2]||(s[2]=a=>r("resume")),onEscapeKeyDown:s[3]||(s[3]=a=>r("escapeKeyDown",a)),onSwipeStart:s[4]||(s[4]=a=>{r("swipeStart",a),a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:s[5]||(s[5]=a=>{const{x:l,y:u}=a.detail.delta,c=a.currentTarget;c.setAttribute("data-swipe","move"),c.style.setProperty("--radix-toast-swipe-move-x",`${l}px`),c.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:s[6]||(s[6]=a=>{const l=a.currentTarget;l.setAttribute("data-swipe","cancel"),l.style.removeProperty("--radix-toast-swipe-move-x"),l.style.removeProperty("--radix-toast-swipe-move-y"),l.style.removeProperty("--radix-toast-swipe-end-x"),l.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:s[7]||(s[7]=a=>{const{x:l,y:u}=a.detail.delta,c=a.currentTarget;c.setAttribute("data-swipe","end"),c.style.removeProperty("--radix-toast-swipe-move-x"),c.style.removeProperty("--radix-toast-swipe-move-y"),c.style.setProperty("--radix-toast-swipe-end-x",`${l}px`),c.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),o.value=!1})}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["open","type","as","as-child","duration"])]),_:3},8,["present"]))}}),q_=W({__name:"ToastAnnounceExclude",props:{altText:{},asChild:{type:Boolean},as:{}},setup(e){return(t,n)=>(D(),j(f(Be),{as:t.as,"as-child":t.asChild,"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":t.altText||void 0},{default:B(()=>[X(t.$slots,"default")]),_:3},8,["as","as-child","data-radix-toast-announce-alt"]))}}),Y_=W({__name:"ToastClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=U_();return(r,o)=>(D(),j(q_,{"as-child":""},{default:B(()=>[q(f(Be),ce(t,{type:r.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>f(n).onClose())}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["type"])]),_:3}))}}),jd=W({__name:"FocusProxy",emits:["focusFromOutsideViewport"],setup(e,{emit:t}){const n=t,r=Va();return(o,i)=>(D(),j(f(Ra),{"aria-hidden":"",tabindex:"0",style:{position:"'fixed'"},onFocus:i[0]||(i[0]=s=>{var a;const l=s.relatedTarget;!((a=f(r).viewport.value)!=null&&a.contains(l))&&n("focusFromOutsideViewport")})},{default:B(()=>[X(o.$slots,"default")]),_:3}))}}),X_=W({inheritAttrs:!1,__name:"ToastViewport",props:{hotkey:{default:()=>z_},label:{default:"Notifications ({hotkey})"},asChild:{type:Boolean},as:{default:"ol"}},setup(e){const t=e,{hotkey:n,label:r}=on(t),{primitiveElement:o,currentElement:i}=Qe(),{createCollection:s}=rw(),a=s(i),l=Va(),u=K(()=>l.toastCount.value>0),c=U(),d=U();nc(n.value,()=>{i.value.focus()}),Ue(()=>{l.onViewportChange(i.value)}),vt(h=>{const v=i.value;if(u.value&&v){const b=()=>{if(!l.isClosePausedRef.value){const F=new CustomEvent(ou);v.dispatchEvent(F),l.isClosePausedRef.value=!0}},w=()=>{if(l.isClosePausedRef.value){const F=new CustomEvent(iu);v.dispatchEvent(F),l.isClosePausedRef.value=!1}},S=F=>{!v.contains(F.relatedTarget)&&w()},_=()=>{v.contains(document.activeElement)||w()},I=F=>{var V,N,H;const m=F.altKey||F.ctrlKey||F.metaKey;if(F.key==="Tab"&&!m){const g=document.activeElement,y=F.shiftKey;if(F.target===v&&y){(V=c.value)==null||V.focus();return}const A=p({tabbingDirection:y?"backwards":"forwards"}),x=A.findIndex(C=>C===g);Is(A.slice(x+1))?F.preventDefault():y?(N=c.value)==null||N.focus():(H=d.value)==null||H.focus()}};v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",_),v.addEventListener("keydown",I),window.addEventListener("blur",b),window.addEventListener("focus",w),h(()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",_),v.removeEventListener("keydown",I),window.removeEventListener("blur",b),window.removeEventListener("focus",w)})}});function p({tabbingDirection:h}){const v=a.value.map(b=>{const w=[b,...lc(b)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?v.reverse():v).flat()}return(h,v)=>(D(),j(f(_w),{role:"region","aria-label":f(r).replace("{hotkey}",f(n).join("+").replace(/Key/g,"").replace(/Digit/g,"")),tabindex:"-1",style:qt({pointerEvents:u.value?void 0:"none"})},{default:B(()=>[u.value?(D(),j(jd,{key:0,ref:b=>{c.value=f(vn)(b)},onFocusFromOutsideViewport:v[0]||(v[0]=()=>{const b=p({tabbingDirection:"forwards"});f(Is)(b)})},null,512)):pt("",!0),q(f(Be),ce({ref_key:"primitiveElement",ref:o,tabindex:"-1",as:h.as,"as-child":h.asChild},h.$attrs),{default:B(()=>[X(h.$slots,"default")]),_:3},16,["as","as-child"]),u.value?(D(),j(jd,{key:1,ref:b=>{d.value=f(vn)(b)},onFocusFromOutsideViewport:v[1]||(v[1]=()=>{const b=p({tabbingDirection:"backwards"});f(Is)(b)})},null,512)):pt("",!0)]),_:3},8,["aria-label","style"]))}}),Z_=W({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),Q_=W({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),am="tooltip.open";function J_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ex(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tx(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function nx(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(o=!o)}return o}function rx(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ox(t)}function ox(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const[fc,ix]=Tt("TooltipProvider"),sx=W({__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:o,disableClosingTrigger:i}=on(t),s=U(!0),a=U(!1),{start:l,stop:u}=tc(()=>{s.value=!0},r,{immediate:!1});return ix({isOpenDelayed:s,delayDuration:n,onOpen(){u(),s.value=!1},onClose(){l()},isPointerInTransitRef:a,onPointerInTransitChange(c){a.value=c},disableHoverableContent:o,disableClosingTrigger:i}),(c,d)=>X(c.$slots,"default")}}),[za,ax]=Tt("TooltipRoot"),lx=W({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,o=fc(),i=K(()=>n.disableHoverableContent??o.disableHoverableContent.value),s=K(()=>n.disableClosingTrigger??o.disableClosingTrigger.value),a=K(()=>n.delayDuration??o.delayDuration.value),l=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});ye(l,S=>{o.onClose&&(S?(o.onOpen(),document.dispatchEvent(new CustomEvent(am))):o.onClose())});const u=U(!1),c=U(),d=K(()=>l.value?u.value?"delayed-open":"instant-open":"closed"),{start:p,stop:h}=tc(()=>{u.value=!0,l.value=!0},a,{immediate:!1});function v(){h(),u.value=!1,l.value=!0}function b(){h(),l.value=!1}function w(){p()}return ax({contentId:Wn(),open:l,stateAttribute:d,trigger:c,onTriggerChange(S){c.value=S},onTriggerEnter(){o.isOpenDelayed.value?w():v()},onTriggerLeave(){i.value?b():h()},onOpen:v,onClose:b,disableHoverableContent:i,disableClosingTrigger:s}),(S,_)=>(D(),j(f(uc),null,{default:B(()=>[X(S.$slots,"default")]),_:3}))}}),ux=W({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=za(),r=fc(),{primitiveElement:o,currentElement:i}=Qe(),s=U(!1),a=U(!1);function l(){s.value=!1}function u(){s.value=!0,document.addEventListener("pointerup",l,{once:!0})}return Ue(()=>{n.onTriggerChange(i.value)}),(c,d)=>(D(),j(f(Jh),{"as-child":""},{default:B(()=>[q(f(Be),{ref_key:"primitiveElement",ref:o,"aria-describedby":f(n).open.value?f(n).contentId:void 0,"data-state":f(n).stateAttribute.value,as:c.as,"as-child":t.asChild,onPointermove:d[0]||(d[0]=p=>{p.pointerType!=="touch"&&!a.value&&!f(r).isPointerInTransitRef.value&&(f(n).onTriggerEnter(),a.value=!0)}),onPointerleave:d[1]||(d[1]=p=>{f(n).onTriggerLeave(),a.value=!1}),onPointerdown:u,onFocus:d[2]||(d[2]=()=>{s.value||f(n).onOpen()}),onBlur:d[3]||(d[3]=p=>f(n).onClose()),onClick:d[4]||(d[4]=()=>{f(n).disableClosingTrigger.value||f(n).onClose()})},{default:B(()=>[X(c.$slots,"default")]),_:3},8,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),lm=W({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean,default:!1},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,o=U(),i=za(),s=h0(),a=K(()=>{var c;return(c=s.default)==null?void 0:c.call(s)}),l=K(()=>{var c;if(n.ariaLabel)return n.ariaLabel;let d="";function p(h){typeof h.children=="string"?d+=h.children:Array.isArray(h.children)&&h.children.forEach(v=>p(v))}return(c=a.value)==null||c.forEach(h=>p(h)),d}),u=K(()=>{const{ariaLabel:c,...d}=n;return d});return Ue(()=>{Ys(window,"scroll",c=>{const d=c.target;d!=null&&d.contains(i.trigger.value)&&i.onClose()}),Ys(window,am,i.onClose)}),(c,d)=>(D(),j(f(Da),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>r("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{var h;f(i).disableClosingTrigger.value&&(h=f(i).trigger.value)!=null&&h.contains(p.target)&&p.preventDefault(),r("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=eo(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(i).onClose())},{default:B(()=>[q(f(Xs),ce({ref_key:"contentElement",ref:o,"data-state":f(i).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:B(()=>[X(c.$slots,"default"),q(f(Ra),{id:f(i).contentId,role:"tooltip"},{default:B(()=>[Re(it(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state","style"])]),_:3}))}}),cx=W({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),{trigger:o,onClose:i}=za(),s=fc(),a=U(null);function l(){a.value=null,s.onPointerInTransitChange(!1)}function u(c,d){const p=c.currentTarget,h={x:c.clientX,y:c.clientY},v=J_(h,p.getBoundingClientRect()),b=ex(h,v),w=tx(d.getBoundingClientRect()),S=rx([...b,...w]);a.value=S,s.onPointerInTransitChange(!0)}return vt(c=>{if(o.value&&r.value){const d=h=>u(h,r.value),p=h=>u(h,o.value);o.value.addEventListener("pointerleave",d),r.value.addEventListener("pointerleave",p),c(()=>{var h,v;(h=o.value)==null||h.removeEventListener("pointerleave",d),(v=r.value)==null||v.removeEventListener("pointerleave",p)})}}),vt(c=>{if(a.value){const d=p=>{var h,v;if(!a.value)return;const b=p.target,w={x:p.clientX,y:p.clientY},S=((h=o.value)==null?void 0:h.contains(b))||((v=r.value)==null?void 0:v.contains(b)),_=!nx(w,a.value);S?l():_&&(l(),i())};document.addEventListener("pointermove",d),c(()=>document.removeEventListener("pointermove",d))}}),(c,d)=>(D(),j(lm,ce({ref_key:"primitiveElement",ref:n},t),{default:B(()=>[X(c.$slots,"default")]),_:3},16))}}),dx=W({__name:"TooltipContent",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,o=za(),i=sn(n,r);return(s,a)=>f(o).open.value?(D(),j(qn(f(o).disableHoverableContent.value?lm:cx),ft(ce({key:0},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):pt("",!0)}}),fx=W({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),px=W({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(lx),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),hx=W({__name:"TooltipContent",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(fx),null,{default:B(()=>[q(f(dx),ce({...f(o),...i.$attrs},{class:f($e)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i.$attrs.class??"")}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),mx=W({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(ux),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),gx=W({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(sx),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}});function Sn(e,t){if(e)return;let n;switch(typeof t){case"string":n=new Error(t);break;case"function":n=new Error(t());break;default:n=t}throw n}function um(e,t){const n=typeof e;if(n!==t)throw new Error(`Expected an object of type '${t}', got '${n}'.`)}var vx=e=>Object.prototype.toString.call(e);function yx(e){if(e===null)return"null";const t=typeof e;return t==="object"||t==="function"?vx(e).slice(8,-1):t}function pc(e,t){if(!(e instanceof t))throw new Error(`Expected an instance of '${t.name}', got '${yx(e)}'.`)}function Ze(e){return e?Array.isArray(e)?e.length===0:Object.keys(e).length===0:!0}function Xe(e){return!Ze(e)}function gt(e){return e==null||Number.isNaN(e)}function We(e){return!gt(e)}function nr(e){if(e)return Sn(e.length>0,"Empty array."),e[0]}function bx(e){if(e)return Sn(e.length>0,"Empty array."),wx(e,-1)}function wx(e,t){const n=e==null?void 0:e.length;if(n)return t<0&&(t+=n),e[t]}function _x(e,t){return e.some((n,r)=>e.findIndex(o=>t(o)===t(n))!==r)}function cm(e,t){if(e.length<=t)return[e];const n=[];for(let r=0;rt(r)>t(o)?n==="asc"?1:-1:t(r)e.length)return!1;for(let n=0;ne.length)return!1;const n=e.length-t.length;for(let r=t.length-1;r>=0;r--)if(t[r]!==e[r+n])return!1;return!0}function dm(e){return Ze(e)?e:Array.from(new Set(e))}function Sx(e,t,n="keep-first"){return Ze(e)?e:Array.from(e.reduce((r,o)=>{const i=t(o);return n==="keep-first"&&r.has(i)?r:r.set(i,o)},new Map).values())}var ze=BigInt(0),Qs=BigInt(1),fm=BigInt(7),Cx=BigInt(10),Tx=BigInt(63),pm=BigInt(127),hm=BigInt(128);function xt(e){return typeof e=="bigint"?e:BigInt(e)}function vl(e,t){if(!e)return ze;t=typeof t=="number"?{decimals:t}:t,gt(t)&&(t={}),t.decimals=t.decimals||0,t.decimalMark=t.decimalMark||".";const n=e.split(t.decimalMark);if(n.length>2)throw new Error("Invalid numeric string.");let[r,o]=n;r=Px(r);const i=r.startsWith("-")?"-":"";return o?o.lengthr!==go).map(r=>({tokenId:r,amount:n[r]}))}}function di(e,t){var o;Array.isArray(e)&&(e=In(e)),Array.isArray(t)&&(t=In(t));const n=[],r=e.nanoErgs-t.nanoErgs;for(const i of e.tokens){const s=i.amount-(((o=t.tokens.find(a=>a.tokenId===i.tokenId))==null?void 0:o.amount)||ze);s!==ze&&n.push({tokenId:i.tokenId,amount:s})}return{nanoErgs:r,tokens:n}}var Wd=4,Bx=9;function $x(e){let t=0;for(let n=Wd;n<=Bx;n++){const r=`R${n}`;if(e[r]){if(n===Wd){t=n;continue}if(n-t>1)return!1;t=n}}return!0}function Mx(e){const t={};for(const n in e){const r=e[n];gt(r)||(t[n]=r)}return t}function mm(e,t){if(Ze(e))return t;const n={...t,...e};for(const r in n)n[r]=e[r]??t[r];return n}function ps(...e){const t=new Uint8Array(e.reduce((r,o)=>r+o.length,0));let n=0;for(const r of e)pc(r,Uint8Array),t.set(r,n),n+=r.length;return t}function gm(e){return!e||e.length%2?!1:(e.startsWith("0x")||(e="0x"+e),!isNaN(Number(e)))}function fi(e){return e.length/2}var Ha=(e=>(e[e.Mainnet=0]="Mainnet",e[e.Testnet=16]="Testnet",e))(Ha||{}),Jt=(e=>(e[e.P2PK=1]="P2PK",e[e.P2SH=2]="P2SH",e[e.P2S=3]="P2S",e))(Jt||{}),Gd={sizeInclusion:8,constantSegregation:16},hc=class{constructor(){be(this,"_items");this._items=[]}_isIndexOutOfBounds(e){return e<0||e>=this._items.length}[Symbol.iterator](){let e=0;return{next:()=>({done:e>=this.length,value:this._items[e++]})}}get length(){return this._items.length}get isEmpty(){return this.length===0}at(e){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);return this._items[e]}add(e,t){return this._addOneOrMore(e,t)}_addOne(e,t){if(We(t)&&We(t.index)){if(t.index===this.length)return this._items.push(this._map(e)),this.length;if(this._isIndexOutOfBounds(t.index))throw new RangeError(`Index '${t.index}' is out of range.`);return this._items.splice(t.index,0,this._map(e)),this.length}return this._items.push(this._map(e)),this._items.length}_addOneOrMore(e,t){if(Array.isArray(e)){We(t)&&We(t.index)&&(e=e.reverse());for(const n of e)this._addOne(n,t)}else this._addOne(e,t);return this.length}toArray(){return[...this._items]}reduce(e,t){return this._items.reduce(e,t)}},vm=class extends Error{constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.name=new.target.name}},Dx=class extends vm{constructor(e){super(e)}},Rx=class extends vm{constructor(e,t){super(e,t)}},Lx=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,yl=Math.ceil,Zt=Math.floor,Ft="[BigNumber Error] ",Kd=Ft+"Number primitive has more than 15 significant digits: ",cn=1e14,Ce=14,bl=9007199254740991,wl=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],cr=1e7,wt=1e9;function ym(e){var t,n,r,o=_.prototype={constructor:_,toString:null,valueOf:null},i=new _(1),s=20,a=4,l=-7,u=21,c=-1e7,d=1e7,p=!1,h=1,v=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},w="0123456789abcdefghijklmnopqrstuvwxyz",S=!0;function _(m,g){var y,A,x,C,k,O,E,M,$=this;if(!($ instanceof _))return new _(m,g);if(g==null){if(m&&m._isBigNumber===!0){$.s=m.s,!m.c||m.e>d?$.c=$.e=null:m.e=10;k/=10,C++);C>d?$.c=$.e=null:($.e=C,$.c=[m]);return}M=String(m)}else{if(!Lx.test(M=String(m)))return r($,M,O);$.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(C=M.indexOf("."))>-1&&(M=M.replace(".","")),(k=M.search(/e/i))>0?(C<0&&(C=k),C+=+M.slice(k+1),M=M.substring(0,k)):C<0&&(C=M.length)}else{if(ct(g,2,w.length,"Base"),g==10&&S)return $=new _(m),N($,s+$.e+1,a);if(M=String(m),O=typeof m=="number"){if(m*0!=0)return r($,M,O,g);if($.s=1/m<0?(M=M.slice(1),-1):1,_.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(Kd+m)}else $.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(y=w.slice(0,g),C=k=0,E=M.length;kC){C=E;continue}}else if(!x&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){x=!0,k=-1,C=0;continue}return r($,String(m),O,g)}O=!1,M=n(M,g,10,$.s),(C=M.indexOf("."))>-1?M=M.replace(".",""):C=M.length}for(k=0;M.charCodeAt(k)===48;k++);for(E=M.length;M.charCodeAt(--E)===48;);if(M=M.slice(k,++E)){if(E-=k,O&&_.DEBUG&&E>15&&(m>bl||m!==Zt(m)))throw Error(Kd+$.s*m);if((C=C-k-1)>d)$.c=$.e=null;else if(C=-wt&&x<=wt&&x===Zt(x)){if(A[0]===0){if(x===0&&A.length===1)return!0;break e}if(g=(x+1)%Ce,g<1&&(g+=Ce),String(A[0]).length==g){for(g=0;g=cn||y!==Zt(y))break e;if(y!==0)return!0}}}else if(A===null&&x===null&&(C===null||C===1||C===-1))return!0;throw Error(Ft+"Invalid BigNumber: "+m)},_.maximum=_.max=function(){return F(arguments,-1)},_.minimum=_.min=function(){return F(arguments,1)},_.random=function(){var m=9007199254740992,g=Math.random()*m&2097151?function(){return Zt(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(y){var A,x,C,k,O,E=0,M=[],$=new _(i);if(y==null?y=s:ct(y,0,wt),k=yl(y/Ce),p)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(k*=2));E>>11),O>=9e15?(x=crypto.getRandomValues(new Uint32Array(2)),A[E]=x[0],A[E+1]=x[1]):(M.push(O%1e14),E+=2);E=k/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(k*=7);E=9e15?crypto.randomBytes(7).copy(A,E):(M.push(O%1e14),E+=7);E=k/7}else throw p=!1,Error(Ft+"crypto unavailable");if(!p)for(;E=10;O/=10,E++);Ex-1&&(O[k+1]==null&&(O[k+1]=0),O[k+1]+=O[k]/x|0,O[k]%=x)}return O.reverse()}return function(y,A,x,C,k){var O,E,M,$,G,de,ue,ge,Oe=y.indexOf("."),Je=s,ee=a;for(Oe>=0&&($=v,v=0,y=y.replace(".",""),ge=new _(A),de=ge.pow(y.length-Oe),v=$,ge.c=g(Dn(Xt(de.c),de.e,"0"),10,x,m),ge.e=ge.c.length),ue=g(y,A,x,k?(O=w,m):(O=m,w)),M=$=ue.length;ue[--$]==0;ue.pop());if(!ue[0])return O.charAt(0);if(Oe<0?--M:(de.c=ue,de.e=M,de.s=C,de=t(de,ge,Je,ee,x),ue=de.c,G=de.r,M=de.e),E=M+Je+1,Oe=ue[E],$=x/2,G=G||E<0||ue[E+1]!=null,G=ee<4?(Oe!=null||G)&&(ee==0||ee==(de.s<0?3:2)):Oe>$||Oe==$&&(ee==4||G||ee==6&&ue[E-1]&1||ee==(de.s<0?8:7)),E<1||!ue[0])y=G?Dn(O.charAt(1),-Je,O.charAt(0)):O.charAt(0);else{if(ue.length=E,G)for(--x;++ue[--E]>x;)ue[E]=0,E||(++M,ue=[1].concat(ue));for($=ue.length;!ue[--$];);for(Oe=0,y="";Oe<=$;y+=O.charAt(ue[Oe++]));y=Dn(y,M,O.charAt(0))}return y}}(),t=function(){function m(A,x,C){var k,O,E,M,$=0,G=A.length,de=x%cr,ue=x/cr|0;for(A=A.slice();G--;)E=A[G]%cr,M=A[G]/cr|0,k=ue*E+M*de,O=de*E+k%cr*cr+$,$=(O/C|0)+(k/cr|0)+ue*M,A[G]=O%C;return $&&(A=[$].concat(A)),A}function g(A,x,C,k){var O,E;if(C!=k)E=C>k?1:-1;else for(O=E=0;Ox[O]?1:-1;break}return E}function y(A,x,C,k){for(var O=0;C--;)A[C]-=O,O=A[C]1;A.splice(0,1));}return function(A,x,C,k,O){var E,M,$,G,de,ue,ge,Oe,Je,ee,ie,ve,Pe,Ot,ht,Ge,ln,T=A.s==x.s?1:-1,P=A.c,z=x.c;if(!P||!P[0]||!z||!z[0])return new _(!A.s||!x.s||(P?z&&P[0]==z[0]:!z)?NaN:P&&P[0]==0||!z?T*0:T/0);for(Oe=new _(T),Je=Oe.c=[],M=A.e-x.e,T=C+M+1,O||(O=cn,M=Qt(A.e/Ce)-Qt(x.e/Ce),T=T/Ce|0),$=0;z[$]==(P[$]||0);$++);if(z[$]>(P[$]||0)&&M--,T<0)Je.push(1),G=!0;else{for(Ot=P.length,Ge=z.length,$=0,T+=2,de=Zt(O/(z[0]+1)),de>1&&(z=m(z,de,O),P=m(P,de,O),Ge=z.length,Ot=P.length),Pe=Ge,ee=P.slice(0,Ge),ie=ee.length;ie=O/2&&ht++;do{if(de=0,E=g(z,ee,Ge,ie),E<0){if(ve=ee[0],Ge!=ie&&(ve=ve*O+(ee[1]||0)),de=Zt(ve/ht),de>1)for(de>=O&&(de=O-1),ue=m(z,de,O),ge=ue.length,ie=ee.length;g(ue,ee,ge,ie)==1;)de--,y(ue,Ge=10;T/=10,$++);N(Oe,C+(Oe.e=$+M*Ce-1)+1,k,G)}else Oe.e=M,Oe.r=+G;return Oe}}();function I(m,g,y,A){var x,C,k,O,E;if(y==null?y=a:ct(y,0,8),!m.c)return m.toString();if(x=m.c[0],k=m.e,g==null)E=Xt(m.c),E=A==1||A==2&&(k<=l||k>=u)?ms(E,k):Dn(E,k,"0");else if(m=N(new _(m),g,y),C=m.e,E=Xt(m.c),O=E.length,A==1||A==2&&(g<=C||C<=l)){for(;OO){if(--g>0)for(E+=".";g--;E+="0");}else if(g+=C-O,g>0)for(C+1==O&&(E+=".");g--;E+="0");return m.s<0&&x?"-"+E:E}function F(m,g){for(var y,A,x=1,C=new _(m[0]);x=10;x/=10,A++);return(y=A+y*Ce-1)>d?m.c=m.e=null:y=10;O/=10,x++);if(C=g-x,C<0)C+=Ce,k=g,E=G[M=0],$=Zt(E/de[x-k-1]%10);else if(M=yl((C+1)/Ce),M>=G.length)if(A){for(;G.length<=M;G.push(0));E=$=0,x=1,C%=Ce,k=C-Ce+1}else break e;else{for(E=O=G[M],x=1;O>=10;O/=10,x++);C%=Ce,k=C-Ce+x,$=k<0?0:Zt(E/de[x-k-1]%10)}if(A=A||g<0||G[M+1]!=null||(k<0?E:E%de[x-k-1]),A=y<4?($||A)&&(y==0||y==(m.s<0?3:2)):$>5||$==5&&(y==4||A||y==6&&(C>0?k>0?E/de[x-k]:0:G[M-1])%10&1||y==(m.s<0?8:7)),g<1||!G[0])return G.length=0,A?(g-=m.e+1,G[0]=de[(Ce-g%Ce)%Ce],m.e=-g||0):G[0]=m.e=0,m;if(C==0?(G.length=M,O=1,M--):(G.length=M+1,O=de[Ce-C],G[M]=k>0?Zt(E/de[x-k]%de[k])*O:0),A)for(;;)if(M==0){for(C=1,k=G[0];k>=10;k/=10,C++);for(k=G[0]+=O,O=1;k>=10;k/=10,O++);C!=O&&(m.e++,G[0]==cn&&(G[0]=1));break}else{if(G[M]+=O,G[M]!=cn)break;G[M--]=0,O=1}for(C=G.length;G[--C]===0;G.pop());}m.e>d?m.c=m.e=null:m.e=u?ms(g,y):Dn(g,y,"0"),m.s<0?"-"+g:g)}return o.absoluteValue=o.abs=function(){var m=new _(this);return m.s<0&&(m.s=1),m},o.comparedTo=function(m,g){return Lr(this,new _(m,g))},o.decimalPlaces=o.dp=function(m,g){var y,A,x,C=this;if(m!=null)return ct(m,0,wt),g==null?g=a:ct(g,0,8),N(new _(C),m+C.e+1,g);if(!(y=C.c))return null;if(A=((x=y.length-1)-Qt(this.e/Ce))*Ce,x=y[x])for(;x%10==0;x/=10,A--);return A<0&&(A=0),A},o.dividedBy=o.div=function(m,g){return t(this,new _(m,g),s,a)},o.dividedToIntegerBy=o.idiv=function(m,g){return t(this,new _(m,g),0,1)},o.exponentiatedBy=o.pow=function(m,g){var y,A,x,C,k,O,E,M,$,G=this;if(m=new _(m),m.c&&!m.isInteger())throw Error(Ft+"Exponent not an integer: "+H(m));if(g!=null&&(g=new _(g)),O=m.e>14,!G.c||!G.c[0]||G.c[0]==1&&!G.e&&G.c.length==1||!m.c||!m.c[0])return $=new _(Math.pow(+H(G),O?m.s*(2-hs(m)):+H(m))),g?$.mod(g):$;if(E=m.s<0,g){if(g.c?!g.c[0]:!g.s)return new _(NaN);A=!E&&G.isInteger()&&g.isInteger(),A&&(G=G.mod(g))}else{if(m.e>9&&(G.e>0||G.e<-1||(G.e==0?G.c[0]>1||O&&G.c[1]>=24e7:G.c[0]<8e13||O&&G.c[0]<=9999975e7)))return C=G.s<0&&hs(m)?-0:0,G.e>-1&&(C=1/C),new _(E?1/C:C);v&&(C=yl(v/Ce+2))}for(O?(y=new _(.5),E&&(m.s=1),M=hs(m)):(x=Math.abs(+H(m)),M=x%2),$=new _(i);;){if(M){if($=$.times(G),!$.c)break;C?$.c.length>C&&($.c.length=C):A&&($=$.mod(g))}if(x){if(x=Zt(x/2),x===0)break;M=x%2}else if(m=m.times(y),N(m,m.e+1,1),m.e>14)M=hs(m);else{if(x=+H(m),x===0)break;M=x%2}G=G.times(G),C?G.c&&G.c.length>C&&(G.c.length=C):A&&(G=G.mod(g))}return A?$:(E&&($=i.div($)),g?$.mod(g):C?N($,v,a,k):$)},o.integerValue=function(m){var g=new _(this);return m==null?m=a:ct(m,0,8),N(g,g.e+1,m)},o.isEqualTo=o.eq=function(m,g){return Lr(this,new _(m,g))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(m,g){return Lr(this,new _(m,g))>0},o.isGreaterThanOrEqualTo=o.gte=function(m,g){return(g=Lr(this,new _(m,g)))===1||g===0},o.isInteger=function(){return!!this.c&&Qt(this.e/Ce)>this.c.length-2},o.isLessThan=o.lt=function(m,g){return Lr(this,new _(m,g))<0},o.isLessThanOrEqualTo=o.lte=function(m,g){return(g=Lr(this,new _(m,g)))===-1||g===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(m,g){var y,A,x,C,k=this,O=k.s;if(m=new _(m,g),g=m.s,!O||!g)return new _(NaN);if(O!=g)return m.s=-g,k.plus(m);var E=k.e/Ce,M=m.e/Ce,$=k.c,G=m.c;if(!E||!M){if(!$||!G)return $?(m.s=-g,m):new _(G?k:NaN);if(!$[0]||!G[0])return G[0]?(m.s=-g,m):new _($[0]?k:a==3?-0:0)}if(E=Qt(E),M=Qt(M),$=$.slice(),O=E-M){for((C=O<0)?(O=-O,x=$):(M=E,x=G),x.reverse(),g=O;g--;x.push(0));x.reverse()}else for(A=(C=(O=$.length)<(g=G.length))?O:g,O=g=0;g0)for(;g--;$[y++]=0);for(g=cn-1;A>O;){if($[--A]=0;){for(y=0,de=ve[x]%Je,ue=ve[x]/Je|0,k=E,C=x+k;C>x;)M=ie[--k]%Je,$=ie[k]/Je|0,O=ue*M+$*de,M=de*M+O%Je*Je+ge[C]+y,y=(M/Oe|0)+(O/Je|0)+ue*$,ge[C--]=M%Oe;ge[C]=y}return y?++A:ge.splice(0,1),V(m,ge,A)},o.negated=function(){var m=new _(this);return m.s=-m.s||null,m},o.plus=function(m,g){var y,A=this,x=A.s;if(m=new _(m,g),g=m.s,!x||!g)return new _(NaN);if(x!=g)return m.s=-g,A.minus(m);var C=A.e/Ce,k=m.e/Ce,O=A.c,E=m.c;if(!C||!k){if(!O||!E)return new _(x/0);if(!O[0]||!E[0])return E[0]?m:new _(O[0]?A:x*0)}if(C=Qt(C),k=Qt(k),O=O.slice(),x=C-k){for(x>0?(k=C,y=E):(x=-x,y=O),y.reverse();x--;y.push(0));y.reverse()}for(x=O.length,g=E.length,x-g<0&&(y=E,E=O,O=y,g=x),x=0;g;)x=(O[--g]=O[g]+E[g]+x)/cn|0,O[g]=cn===O[g]?0:O[g]%cn;return x&&(O=[x].concat(O),++k),V(m,O,k)},o.precision=o.sd=function(m,g){var y,A,x,C=this;if(m!=null&&m!==!!m)return ct(m,1,wt),g==null?g=a:ct(g,0,8),N(new _(C),m,g);if(!(y=C.c))return null;if(x=y.length-1,A=x*Ce+1,x=y[x]){for(;x%10==0;x/=10,A--);for(x=y[0];x>=10;x/=10,A++);}return m&&C.e+1>A&&(A=C.e+1),A},o.shiftedBy=function(m){return ct(m,-bl,bl),this.times("1e"+m)},o.squareRoot=o.sqrt=function(){var m,g,y,A,x,C=this,k=C.c,O=C.s,E=C.e,M=s+4,$=new _("0.5");if(O!==1||!k||!k[0])return new _(!O||O<0&&(!k||k[0])?NaN:k?C:1/0);if(O=Math.sqrt(+H(C)),O==0||O==1/0?(g=Xt(k),(g.length+E)%2==0&&(g+="0"),O=Math.sqrt(+g),E=Qt((E+1)/2)-(E<0||E%2),O==1/0?g="5e"+E:(g=O.toExponential(),g=g.slice(0,g.indexOf("e")+1)+E),y=new _(g)):y=new _(O+""),y.c[0]){for(E=y.e,O=E+M,O<3&&(O=0);;)if(x=y,y=$.times(x.plus(t(C,x,M,1))),Xt(x.c).slice(0,O)===(g=Xt(y.c)).slice(0,O))if(y.e0&&ge>0){for(C=ge%O||O,$=ue.substr(0,C);C0&&($+=M+ue.slice(C)),de&&($="-"+$)}A=G?$+(y.decimalSeparator||"")+((E=+y.fractionGroupSize)?G.replace(new RegExp("\\d{"+E+"}\\B","g"),"$&"+(y.fractionGroupSeparator||"")):G):$}return(y.prefix||"")+A+(y.suffix||"")},o.toFraction=function(m){var g,y,A,x,C,k,O,E,M,$,G,de,ue=this,ge=ue.c;if(m!=null&&(O=new _(m),!O.isInteger()&&(O.c||O.s!==1)||O.lt(i)))throw Error(Ft+"Argument "+(O.isInteger()?"out of range: ":"not an integer: ")+H(O));if(!ge)return new _(ue);for(g=new _(i),M=y=new _(i),A=E=new _(i),de=Xt(ge),C=g.e=de.length-ue.e-1,g.c[0]=wl[(k=C%Ce)<0?Ce+k:k],m=!m||O.comparedTo(g)>0?C>0?g:M:O,k=d,d=1/0,O=new _(de),E.c[0]=0;$=t(O,g,0,1),x=y.plus($.times(A)),x.comparedTo(m)!=1;)y=A,A=x,M=E.plus($.times(x=M)),E=x,g=O.minus($.times(x=g)),O=x;return x=t(m.minus(y),A,0,1),E=E.plus(x.times(M)),y=y.plus(x.times(A)),E.s=M.s=ue.s,C=C*2,G=t(M,A,C,a).minus(ue).abs().comparedTo(t(E,y,C,a).minus(ue).abs())<1?[M,A]:[E,y],d=k,G},o.toNumber=function(){return+H(this)},o.toPrecision=function(m,g){return m!=null&&ct(m,1,wt),I(this,m,g,2)},o.toString=function(m){var g,y=this,A=y.s,x=y.e;return x===null?A?(g="Infinity",A<0&&(g="-"+g)):g="NaN":(m==null?g=x<=l||x>=u?ms(Xt(y.c),x):Dn(Xt(y.c),x,"0"):m===10&&S?(y=N(new _(y),s+x+1,a),g=Dn(Xt(y.c),y.e,"0")):(ct(m,2,w.length,"Base"),g=n(Dn(Xt(y.c),x,"0"),10,m,A,!0)),A<0&&y.c[0]&&(g="-"+g)),g},o.valueOf=o.toJSON=function(){return H(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&_.set(e),_}function Qt(e){var t=e|0;return e>0||e===t?t:t-1}function Xt(e){for(var t,n,r=1,o=e.length,i=e[0]+"";ru^n?1:-1;for(a=(l=o.length)<(u=i.length)?l:u,s=0;si[s]^n?1:-1;return l==u?0:l>u^n?1:-1}function ct(e,t,n,r){if(en||e!==Zt(e))throw Error(Ft+(r||"Argument")+(typeof e=="number"?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function hs(e){var t=e.c.length-1;return Qt(e.e/Ce)==t&&e.c[t]%2!=0}function ms(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Dn(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t0){if(++t>=bE)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function EE(e){return function(){return e}}var SE=function(){try{var e=fo(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Qd=SE;var CE=Qd?function(e,t){return Qd(e,"toString",{configurable:!0,enumerable:!1,value:EE(t),writable:!0})}:gc;const TE=CE;var OE=xE(TE);const AE=OE;function IE(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i-1}var $E=9007199254740991,ME=/^(?:0|[1-9]\d*)$/;function Cm(e,t){var n=typeof e;return t=t??$E,!!t&&(n=="number"||n!="symbol"&&ME.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=LE}function Om(e){return e!=null&&vc(e.length)&&!Em(e)}var FE=Object.prototype;function NE(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||FE;return e===n}function VE(e,t){for(var n=-1,r=Array(e);++n-1}function Q2(e,t){var n=this.__data__,r=Ua(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function or(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(a)?t>1?Lm(a,t-1,n,r,o):Rm(o,a):r||(o[o.length]=a)}return o}function vS(){this.__data__=new or,this.size=0}function yS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bS(e){return this.__data__.get(e)}function wS(e){return this.__data__.has(e)}var _S=200;function xS(e,t){var n=this.__data__;if(n instanceof or){var r=n.__data__;if(!Ci||r.length<_S-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ir(r)}return n.set(e,t),this.size=n.size,this}function Gn(e){var t=this.__data__=new or(e);this.size=t.size}Gn.prototype.clear=vS;Gn.prototype.delete=yS;Gn.prototype.get=bS;Gn.prototype.has=wS;Gn.prototype.set=xS;function ES(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++na))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&WS?new Ro:void 0;for(i.set(e,t),i.set(t,e);++d=AC&&(i=_c,s=!1,t=new Ro(t));e:for(;++ot}function $C(e,t,n){for(var r=-1,o=e.length;++r=FC){var u=t?null:LC(e);if(u)return xc(u);s=!1,o=_c,l=new Ro}else l=t?[]:a;e:for(;++re instanceof Uint8Array,Js=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Cl=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),bn=(e,t)=>e<<32-t|e>>>t,HC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HC)throw new Error("Non little-endian hardware is not supported");function jC(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Xr(e){if(typeof e=="string"&&(e=jC(e)),!zC(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}class jm{clone(){return this._cloneInto()}}function UC(e){const t=r=>e().update(Xr(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function WC(e){const t=(r,o)=>e(o).update(Xr(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function Tl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function GC(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function ea(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Um(e,t){GC(e);const n=t.outputLen;if(e.lengtho)throw new Error("outputLen bigger than keyLen");if(r.key!==void 0&&(r.key.length<1||r.key.length>o))throw new Error(`key must be up 1..${o} byte long or undefined`);if(r.salt!==void 0&&r.salt.length!==i)throw new Error(`salt must be ${i} byte long or undefined`);if(r.personalization!==void 0&&r.personalization.length!==s)throw new Error(`personalization must be ${s} byte long or undefined`);this.buffer32=Js(this.buffer=new Uint8Array(t))}update(t){ea(this);const{blockLen:n,buffer:r,buffer32:o}=this;t=Xr(t);const i=t.length,s=t.byteOffset,a=t.buffer;for(let l=0;lo[s]=i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:o,destroyed:i,outputLen:s,pos:a}=this;return t||(t=new this.constructor({dkLen:s})),t.set(...this.get()),t.length=r,t.finished=o,t.destroyed=i,t.outputLen=s,t.buffer.set(n),t.pos=a,t}}const vs=BigInt(2**32-1),fu=BigInt(32);function Wm(e,t=!1){return t?{h:Number(e&vs),l:Number(e>>fu&vs)}:{h:Number(e>>fu&vs)|0,l:Number(e&vs)|0}}function YC(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),ZC=(e,t,n)=>e>>>n,QC=(e,t,n)=>e<<32-n|t>>>n,JC=(e,t,n)=>e>>>n|t<<32-n,eT=(e,t,n)=>e<<32-n|t>>>n,tT=(e,t,n)=>e<<64-n|t>>>n-32,nT=(e,t,n)=>e>>>n-32|t<<64-n,rT=(e,t)=>t,oT=(e,t)=>e,iT=(e,t,n)=>e<>>32-n,sT=(e,t,n)=>t<>>32-n,aT=(e,t,n)=>t<>>64-n,lT=(e,t,n)=>e<>>64-n;function uT(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const cT=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),dT=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,fT=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),pT=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,hT=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),mT=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,gT={fromBig:Wm,split:YC,toBig:XC,shrSH:ZC,shrSL:QC,rotrSH:JC,rotrSL:eT,rotrBH:tT,rotrBL:nT,rotr32H:rT,rotr32L:oT,rotlSH:iT,rotlSL:sT,rotlBH:aT,rotlBL:lT,add:uT,add3L:cT,add3H:dT,add4L:fT,add4H:pT,add5H:mT,add5L:hT},Mt=gT,yt=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),le=new Uint32Array(32);function dr(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=le[2*e],u=le[2*e+1],c=le[2*t],d=le[2*t+1],p=le[2*n],h=le[2*n+1],v=le[2*r],b=le[2*r+1],w=Mt.add3L(l,c,s);u=Mt.add3H(w,u,d,a),l=w|0,{Dh:b,Dl:v}={Dh:b^u,Dl:v^l},{Dh:b,Dl:v}={Dh:Mt.rotr32H(b,v),Dl:Mt.rotr32L(b,v)},{h,l:p}=Mt.add(h,p,b,v),{Bh:d,Bl:c}={Bh:d^h,Bl:c^p},{Bh:d,Bl:c}={Bh:Mt.rotrSH(d,c,24),Bl:Mt.rotrSL(d,c,24)},le[2*e]=l,le[2*e+1]=u,le[2*t]=c,le[2*t+1]=d,le[2*n]=p,le[2*n+1]=h,le[2*r]=v,le[2*r+1]=b}function fr(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=le[2*e],u=le[2*e+1],c=le[2*t],d=le[2*t+1],p=le[2*n],h=le[2*n+1],v=le[2*r],b=le[2*r+1],w=Mt.add3L(l,c,s);u=Mt.add3H(w,u,d,a),l=w|0,{Dh:b,Dl:v}={Dh:b^u,Dl:v^l},{Dh:b,Dl:v}={Dh:Mt.rotrSH(b,v,16),Dl:Mt.rotrSL(b,v,16)},{h,l:p}=Mt.add(h,p,b,v),{Bh:d,Bl:c}={Bh:d^h,Bl:c^p},{Bh:d,Bl:c}={Bh:Mt.rotrBH(d,c,63),Bl:Mt.rotrBL(d,c,63)},le[2*e]=l,le[2*e+1]=u,le[2*t]=c,le[2*t+1]=d,le[2*n]=p,le[2*n+1]=h,le[2*r]=v,le[2*r+1]=b}class vT extends qC{constructor(t={}){super(128,t.dkLen===void 0?64:t.dkLen,t,64,16,16),this.v0l=yt[0]|0,this.v0h=yt[1]|0,this.v1l=yt[2]|0,this.v1h=yt[3]|0,this.v2l=yt[4]|0,this.v2h=yt[5]|0,this.v3l=yt[6]|0,this.v3h=yt[7]|0,this.v4l=yt[8]|0,this.v4h=yt[9]|0,this.v5l=yt[10]|0,this.v5h=yt[11]|0,this.v6l=yt[12]|0,this.v6h=yt[13]|0,this.v7l=yt[14]|0,this.v7h=yt[15]|0;const n=t.key?t.key.length:0;if(this.v0l^=this.outputLen|n<<8|65536|1<<24,t.salt){const r=Js(Xr(t.salt));this.v4l^=r[0],this.v4h^=r[1],this.v5l^=r[2],this.v5h^=r[3]}if(t.personalization){const r=Js(Xr(t.personalization));this.v6l^=r[0],this.v6h^=r[1],this.v7l^=r[2],this.v7h^=r[3]}if(t.key){const r=new Uint8Array(this.blockLen);r.set(Xr(t.key)),this.update(r)}}get(){let{v0l:t,v0h:n,v1l:r,v1h:o,v2l:i,v2h:s,v3l:a,v3h:l,v4l:u,v4h:c,v5l:d,v5h:p,v6l:h,v6h:v,v7l:b,v7h:w}=this;return[t,n,r,o,i,s,a,l,u,c,d,p,h,v,b,w]}set(t,n,r,o,i,s,a,l,u,c,d,p,h,v,b,w){this.v0l=t|0,this.v0h=n|0,this.v1l=r|0,this.v1h=o|0,this.v2l=i|0,this.v2h=s|0,this.v3l=a|0,this.v3h=l|0,this.v4l=u|0,this.v4h=c|0,this.v5l=d|0,this.v5h=p|0,this.v6l=h|0,this.v6h=v|0,this.v7l=b|0,this.v7h=w|0}compress(t,n,r){this.get().forEach((l,u)=>le[u]=l),le.set(yt,16);let{h:o,l:i}=Mt.fromBig(BigInt(this.length));le[24]=yt[8]^i,le[25]=yt[9]^o,r&&(le[28]=~le[28],le[29]=~le[29]);let s=0;const a=KC;for(let l=0;l<12;l++)dr(0,4,8,12,t,n+2*a[s++]),fr(0,4,8,12,t,n+2*a[s++]),dr(1,5,9,13,t,n+2*a[s++]),fr(1,5,9,13,t,n+2*a[s++]),dr(2,6,10,14,t,n+2*a[s++]),fr(2,6,10,14,t,n+2*a[s++]),dr(3,7,11,15,t,n+2*a[s++]),fr(3,7,11,15,t,n+2*a[s++]),dr(0,5,10,15,t,n+2*a[s++]),fr(0,5,10,15,t,n+2*a[s++]),dr(1,6,11,12,t,n+2*a[s++]),fr(1,6,11,12,t,n+2*a[s++]),dr(2,7,8,13,t,n+2*a[s++]),fr(2,7,8,13,t,n+2*a[s++]),dr(3,4,9,14,t,n+2*a[s++]),fr(3,4,9,14,t,n+2*a[s++]);this.v0l^=le[0]^le[16],this.v0h^=le[1]^le[17],this.v1l^=le[2]^le[18],this.v1h^=le[3]^le[19],this.v2l^=le[4]^le[20],this.v2h^=le[5]^le[21],this.v3l^=le[6]^le[22],this.v3h^=le[7]^le[23],this.v4l^=le[8]^le[24],this.v4h^=le[9]^le[25],this.v5l^=le[10]^le[26],this.v5h^=le[11]^le[27],this.v6l^=le[12]^le[28],this.v6h^=le[13]^le[29],this.v7l^=le[14]^le[30],this.v7h^=le[15]^le[31],le.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const yT=WC(e=>new vT(e));function bT(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}class wT extends jm{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Cl(this.buffer)}update(t){ea(this);const{view:n,buffer:r,blockLen:o}=this;t=Xr(t);const i=t.length;for(let s=0;so-s&&(this.process(r,0),s=0);for(let d=s;dc.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;de&t^~e&n,xT=(e,t,n)=>e&t^e&n^t&n,ET=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hr=new Uint32Array(64);class ST extends wT{constructor(){super(64,32,8,!1),this.A=pr[0]|0,this.B=pr[1]|0,this.C=pr[2]|0,this.D=pr[3]|0,this.E=pr[4]|0,this.F=pr[5]|0,this.G=pr[6]|0,this.H=pr[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:s,G:a,H:l}=this;return[t,n,r,o,i,s,a,l]}set(t,n,r,o,i,s,a,l){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=l|0}process(t,n){for(let d=0;d<16;d++,n+=4)hr[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const p=hr[d-15],h=hr[d-2],v=bn(p,7)^bn(p,18)^p>>>3,b=bn(h,17)^bn(h,19)^h>>>10;hr[d]=b+hr[d-7]+v+hr[d-16]|0}let{A:r,B:o,C:i,D:s,E:a,F:l,G:u,H:c}=this;for(let d=0;d<64;d++){const p=bn(a,6)^bn(a,11)^bn(a,25),h=c+p+_T(a,l,u)+ET[d]+hr[d]|0,b=(bn(r,2)^bn(r,13)^bn(r,22))+xT(r,o,i)|0;c=u,u=l,l=a,a=s+h|0,s=i,i=o,o=r,r=h+b|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,c=c+this.H|0,this.set(r,o,i,s,a,l,u,c)}roundClean(){hr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const CT=UC(()=>new ST);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gm(...e){const t=(o,i)=>s=>o(i(s)),n=Array.from(e).reverse().reduce((o,i)=>o?t(o,i.encode):i.encode,void 0),r=e.reduce((o,i)=>o?t(o,i.decode):i.decode,void 0);return{encode:n,decode:r}}function TT(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function OT(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function wf(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach(s=>{if(s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let l=r;l{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return wf(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(wf(t,e,2**8))}}}function IT(e,t){if(typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),o=new Uint8Array(n.length+e);return o.set(n),o.set(r,n.length),o},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),o=t(r).slice(0,e),i=n.slice(-e);for(let s=0;sGm(AT(58),TT(e),OT("")),Km=kT("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),PT=e=>Gm(IT(4,t=>e(e(t))),Km);var BT=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function $T(e){pc(e,Uint8Array);let t="";for(let n=0,r=e.length;n=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-(65-10);if(e>=97&&e<=102)return e-(97-10);throw new Error("Invalid byte sequence.")}var Et={encode:$T,decode:MT};function DT(e){return pc(e,Uint8Array),new TextDecoder().decode(e)}function RT(e){return um(e,"string"),new Uint8Array(new TextEncoder().encode(e))}var Ol={encode:DT,decode:RT};PT(LT);var Qo=Km;function qm(e){return e instanceof Uint8Array?e:Et.decode(e)}function hi(e){return yT(qm(e),{dkLen:32})}function LT(e){return CT(qm(e))}function FT(e){e.length%2&&(e="0"+e);const t=BigInt("0x"+e);return 128&parseInt(e.slice(0,2),16)?-Ym(t):t}function NT(e){const t=e>=ze;t||(e=Ym(e));let n=e.toString(16);return n.length%2&&(n="0"+n),t&&128&parseInt(n.slice(0,2),16)&&(n="00"+n),n}function Ym(e){const t=e0?r+=8-o:t&&nr(n)==="1"&&n.indexOf("1",1)!==-1&&(r+=8);const i=(1n<>=7,t>0&&(n|=128),e.write(n)}while(t>0);return e}function Al(e){if(e.isEmpty)return 0;let t=0,n=0,r=0;do r=e.readByte(),t|=(r&127)<>=fm,t>0&&(n|=128),e.write(n)}while(t>0);return e}function HT(e){if(e.isEmpty)return ze;let t=ze,n=ze,r=ze;do r=BigInt(e.readByte()),t|=(r&pm)<0);return t}e=xt(e);do t++,e/=hm;while(e>ze);return t}function jT(e){return e<<1^e>>63}function UT(e){return e>>1^-(e&1)}function WT(e){return e<>Tx}function GT(e){return e>>Qs^-(e&Qs)}var Ln,_n,ep,KT=(ep=class{constructor(e){ut(this,Ln,void 0);ut(this,_n,void 0);typeof e=="string"?Ye(this,Ln,Et.decode(e)):Ye(this,Ln,e),Ye(this,_n,0)}get isEmpty(){return Ze(Ie(this,Ln))}readBoolean(){return this.readByte()===1}readBits(e){const t=new Array(e);let n=0;for(let r=0;r>n++&1;t[r]=o===1,n==8&&(n=0,Mr(this,_n)._++)}return n>0&&Mr(this,_n)._++,t}readByte(){return Ie(this,Ln)[Mr(this,_n)._++]}readBytes(e){return Ie(this,Ln).subarray(Ie(this,_n),Ye(this,_n,Ie(this,_n)+e))}readVlq(){return Al(this)}readShort(){return Number(UT(Al(this)))}readInt(){const e=this.readLong();return Number(e)}readLong(){return GT(HT(this))}readBigInt(){const e=Al(this);return FT(Et.encode(this.readBytes(e)))}},Ln=new WeakMap,_n=new WeakMap,ep),Fn,Ht,tp,Cc=(tp=class{constructor(e){ut(this,Fn,void 0);ut(this,Ht,void 0);Ye(this,Fn,new Uint8Array(e)),Ye(this,Ht,0)}get length(){return Ie(this,Ht)}writeBoolean(e){return this.write(e===!0?1:0),this}writeVLQ(e){return VT(this,e)}writeBigVLQ(e){return zT(this,e)}writeShort(e){return this.writeVLQ(jT(e)),this}writeInt(e){return this.writeLong(BigInt(e)),this}writeLong(e){return this.writeBigVLQ(WT(e)),this}write(e){return Ie(this,Fn)[Mr(this,Ht)._++]=e,this}writeBytes(e){return Ie(this,Fn).set(e,Ie(this,Ht)),Ye(this,Ht,Ie(this,Ht)+e.length),this}writeHex(e){return this.writeBytes(Et.decode(e))}writeBits(e){let t=0;for(let n=0;n0&&Mr(this,Ht)._++,this}writeBigInt(e){const t=NT(e);return this.writeVLQ(t.length/2),this.writeHex(t),this}toHex(){return Et.encode(this.toBytes())}toBytes(){return Ie(this,Fn).subarray(0,Ie(this,Ht))}},Fn=new WeakMap,Ht=new WeakMap,tp),Xm=class{coerce(e){return e}},Zm=class extends Xm{get embeddable(){return!1}},Br=class extends Zm{get embeddable(){return!0}},ki,np,Qm=(np=class extends Xm{constructor(t){super();ut(this,ki,void 0);Ye(this,ki,t)}get elementsType(){return Ie(this,ki)}get embeddable(){return!1}},ki=new WeakMap,np),Jm=class extends Br{get code(){return 1}toString(){return"SBool"}},eg=class extends Br{get code(){return 2}toString(){return"SByte"}},tg=class extends Br{get code(){return 3}toString(){return"SShort"}},ng=class extends Br{get code(){return 4}toString(){return"SInt"}},rg=class extends Br{get code(){return 5}coerce(e){return xt(e)}toString(){return"SLong"}},og=class extends Br{get code(){return 6}coerce(e){return xt(e)}toString(){return"SBigInt"}},ig=class extends Br{get code(){return 7}coerce(e){return typeof e=="string"?Et.decode(e):e}toString(){return"SGroupElement"}},sg=class extends Br{get code(){return 8}toString(){return"SSigmaProp"}},ag=class extends Zm{get code(){return 98}toString(){return"SUnit"}},It=Object.freeze({embeddable:0,simpleColl:1,nestedColl:2,option:3,optionCollection:4,pairOne:5,pairTwo:6,symmetricPair:7,genericTuple:8}),lg=11,pu=lg+1,wn=e=>pu*e,qT=Object.freeze({code:wn(It.simpleColl),embeddable:!1,simpleCollTypeCode:wn(It.simpleColl),nestedCollTypeCode:wn(It.nestedColl)}),YT=Object.freeze({code:wn(It.pairOne),embeddable:!1,pairOneTypeCode:wn(It.pairOne),pairTwoTypeCode:wn(It.pairTwo),tripleTypeCode:wn(It.pairTwo),symmetricPairTypeCode:wn(It.symmetricPair),quadrupleTypeCode:wn(It.symmetricPair),genericTupleTypeCode:wn(It.genericTuple)}),ae={bool:new Jm,byte:new eg,short:new tg,int:new ng,long:new rg,bigInt:new og,groupElement:new ig,sigmaProp:new sg,unit:new ag,coll:qT,tuple:YT};function hu(e){return e.code>=ae.coll.simpleCollTypeCode&&e.code<=ae.coll.nestedCollTypeCode+lg}function ug(e){return e.code>=ae.tuple.pairOneTypeCode&&e.code<=ae.tuple.genericTupleTypeCode}function Fr(e){switch(e){case ae.bool.code:return ae.bool;case ae.byte.code:return ae.byte;case ae.short.code:return ae.short;case ae.int.code:return ae.int;case ae.long.code:return ae.long;case ae.bigInt.code:return ae.bigInt;case ae.groupElement.code:return ae.groupElement;case ae.sigmaProp.code:return ae.sigmaProp;default:throw new Error(`The type code '0x${e.toString(16)}' is not a valid primitive type code.`)}}var Ps=class extends Qm{get code(){return ae.coll.code}coerce(e){return this.elementsType.code===ae.byte.code&&!(e instanceof Uint8Array)?typeof e=="string"?Et.decode(e):Uint8Array.from(e):e.map(t=>this.elementsType.coerce(t))}toString(){return`SColl[${this.elementsType.toString()}]`}},ei=class extends Qm{get code(){return ae.tuple.code}coerce(e){const t=new Array(e.length);for(let n=0;ne.toString()).join(", ")})`}};function sr(e,t,n){return new Proxy(e,{apply:(r,o,i)=>{const s=t??new r;return!n&&Ze(i)?s:new Zr(s,...i)}})}function cg(e,t){return new Proxy(e,{apply:t})}var Il=sr(eg,ae.byte);sr(Jm,ae.bool);sr(tg,ae.short);sr(ng,ae.int);sr(rg,ae.long);sr(og,ae.bigInt);sr(ig,ae.groupElement);sr(sg,ae.sigmaProp);sr(ag,void 0,!0);var kl=cg(Ps,(e,t,n)=>{const[r,o]=n,i=r();return o?new Zr(new e(i),o):()=>new e(i)});cg(ei,(e,t,n)=>{const[r,o]=n;if(typeof r=="function"&&typeof o=="function")return()=>new e([r(),o()]);if(r instanceof Zr&&o instanceof Zr)return new Zr(new e([r.type,o.type]),[r.data,o.data]);throw new Error("Invalid tuple declaration.")});var XT=33,xf=205,Ef=class Bs{static serialize(t,n,r){if(n.embeddable)switch(n.code){case ae.bool.code:return r.writeBoolean(t);case ae.byte.code:return r.write(t);case ae.short.code:return r.writeShort(t);case ae.int.code:return r.writeInt(t);case ae.long.code:return r.writeLong(t);case ae.bigInt.code:return r.writeBigInt(t);case ae.groupElement.code:return r.writeBytes(t);case ae.sigmaProp.code:{const o=t;if(o.type===ae.groupElement)return r.write(xf),Bs.serialize(o.data,o.type,r);throw Error("Serialization error: SigmaProp operation not implemented.")}}else if(hu(n)){if(n.elementsType.code===ae.byte.code){const o=t instanceof Uint8Array;Sn(o,`SColl[Byte] expected an UInt8Array, got ${typeof t}.`)}else Sn(Array.isArray(t),`SColl expected an array, got ${typeof t}.`);switch(r.writeVLQ(t.length),n.elementsType.code){case ae.bool.code:return r.writeBits(t);case ae.byte.code:return r.writeBytes(t);default:{for(let o=0;othis.deserialize(r,n));case ae.unit.code:return}throw new Error(`Parsing error: '0x${t.code.toString(16)}' type not implemented.`)}},Sf=class{static serialize(e,t){if(e.embeddable)t.write(e.code);else if(e.code===ae.unit.code)t.write(e.code);else if(hu(e))if(e.elementsType.embeddable)t.write(ae.coll.simpleCollTypeCode+e.elementsType.code);else if(hu(e.elementsType)){const n=e.elementsType;n.elementsType.embeddable?t.write(ae.coll.nestedCollTypeCode+n.elementsType.code):(t.write(ae.coll.simpleCollTypeCode),this.serialize(n,t))}else t.write(ae.coll.simpleCollTypeCode),this.serialize(e.elementsType,t);else if(ug(e)){switch(e.elementsType.length){case 2:{const n=nr(e.elementsType),r=bx(e.elementsType);n.embeddable?n.code===r.code?t.write(ae.tuple.symmetricPairTypeCode+n.code):(t.write(ae.tuple.pairOneTypeCode+n.code),this.serialize(r,t)):r.embeddable?(t.write(ae.tuple.pairTwoTypeCode+r.code),this.serialize(n,t)):(t.write(ae.tuple.pairOneTypeCode),this.serialize(n,t),this.serialize(r,t));return}case 3:t.write(ae.tuple.tripleTypeCode);break;case 4:t.write(ae.tuple.quadrupleTypeCode);break;default:{const n=e.elementsType.length;Sn(n>=2&&n<=255,"Invalid type: tuples must have between 2 and 255 items."),t.write(ae.tuple.genericTupleTypeCode),t.writeVLQ(n)}}for(let n=0;n0,`Parsing Error: Unexpected type code '0x${t.toString(16)}'`),t0,"Empty constant bytes.");const n=new KT(t),r=Sf.deserialize(n),o=Ef.deserialize(r,n);return new $i(r,o)}get type(){return Ie(this,Pi)}get data(){return Ie(this,Bi)}toBytes(){const t=new Cc(ZT);return Sf.serialize(this.type,t),Ef.serialize(this.data,this.type,t),t.toBytes()}toHex(){return Et.encode(this.toBytes())}},Pi=new WeakMap,Bi=new WeakMap,$i);function QT(e,t="strict"){if(t==="strict")return Zr.from(e??"").data;if(e)try{return Zr.from(e).data}catch{return}}var JT=65535;function dg(e,t,n){if(t||(t=new Cc(5e4)),t.writeBigVLQ(xt(e.value)),t.writeHex(e.ergoTree),t.writeVLQ(e.creationHeight),eO(t,e.assets,n),tO(t,e.additionalRegisters),We(n))return t;if(!fg(e))throw new Error("Invalid box type.");return t.writeHex(e.transactionId).writeVLQ(e.index)}function fg(e){const t=e;return We(t.transactionId)&&We(t.index)}function eO(e,t,n){if(Ze(t)){e.write(0);return}e.writeVLQ(t.length),Xe(n)?t.map(r=>e.writeVLQ(n.indexOf(r.tokenId)).writeBigVLQ(xt(r.amount))):t.map(r=>e.writeHex(r.tokenId).writeBigVLQ(xt(r.amount)))}function tO(e,t){const n=Object.keys(t).sort();let r=0;for(const o of n)t[o]&&r++;if(e.writeVLQ(r),r!=0)for(const o of n){const i=t[o];We(i)&&e.writeHex(i)}}function nO(e,t){if(gt(e.creationHeight))throw new Error("Box size estimation error: creation height is undefined.");let n=0;n+=$t(We(t)?t:e.value),n+=fi(e.ergoTree),n+=$t(e.creationHeight),n+=$t(e.assets.length),n+=e.assets.reduce((o,i)=>o+=fi(i.tokenId)+$t(i.amount),0);let r=0;for(const o in e.additionalRegisters){const i=e.additionalRegisters[o];i&&(n+=fi(i),r++)}return n+=$t(r),n+=32,n+=$t(fg(e)?e.index:JT),n}function rO(e){const t=new Cc(1e5);t.writeVLQ(e.inputs.length),e.inputs.map(r=>oO(t,r)),t.writeVLQ(e.dataInputs.length),e.dataInputs.map(r=>t.writeHex(r.boxId));const n=sO(e.outputs);return t.writeVLQ(n.length),n.map(r=>t.writeHex(r)),t.writeVLQ(e.outputs.length),e.outputs.map(r=>dg(r,t,n)),t}function oO(e,t){e.writeHex(t.boxId),e.write(0),iO(e,t.extension)}function iO(e,t){const n=Object.keys(t);let r=0;for(const o of n){const i=t[o];We(i)&&r++}if(e.writeVLQ(r),r!=0)for(const o of n){const i=t[o];We(i)&&e.writeVLQ(Number(o)).writeHex(i)}}function sO(e){const t=new Set;return e.flatMap(n=>n.assets.map(r=>t.add(r.tokenId))),Array.from(t)}var aO=class extends Error{constructor(){super("One or more inputs was selected more than one time by the current selection strategy.")}},lO=class extends Error{constructor(t){const n=[];if(t.nanoErgs&&n.push(Cf("nanoErgs",t.nanoErgs)),Xe(t.tokens))for(const r of t.tokens)n.push(Cf(r.tokenId,r.amount));super(`Insufficient inputs:${n.join()}`);be(this,"unreached");this.unreached=t}};function Cf(e,t){return` - > ${e}: ${t==null?void 0:t.toString()}`}var uO=class{constructor(){be(this,"_inputs")}select(e,t){this._inputs=e;let n=[];Xe(t.tokens)&&(n=this._selectTokens(t.tokens));const r=au(n,o=>o.value);if(gt(t.nanoErgs)&&Ze(t.tokens)||We(t.nanoErgs)&&ri.assets.some(s=>s.tokenId===t)):o=n;else for(let i=0;i!o.includes(i))),o}},cO=class{constructor(e){be(this,"_selector");this._selector=e}select(e,t){return this._selector(e,t)}},dO=class{constructor(e){be(this,"_inputs");be(this,"_strategy");be(this,"_ensureFilterPredicate");be(this,"_selector");be(this,"_sortDirection");be(this,"_ensureInclusionBoxIds");this._inputs=e}defineStrategy(e){return this._isISelectionStrategyImplementation(e)?this._strategy=e:this._strategy=new cO(e),this}select(e){this._strategy||(this._strategy=new uO);const t=this._deepCloneTarget(e);let n=[...this._inputs],r=[];const o=this._ensureFilterPredicate,i=this._ensureInclusionBoxIds;if(o?i?r=n.filter(a=>o(a)||i.has(a.boxId)):r=n.filter(o):i&&(r=n.filter(a=>i.has(a.boxId))),Xe(r)&&(n=n.filter(a=>!r.some(l=>l.boxId===a.boxId)),t.nanoErgs&&t.nanoErgs>ze&&(t.nanoErgs-=au(r,a=>a.value)),Xe(t.tokens)&&r.some(a=>!Ze(a.assets))))for(const a of t.tokens)a.amount&&a.amount>ze&&(a.amount-=In(r,a.tokenId));if(this._selector&&(n=Zs(n,this._selector,this._sortDirection||"asc")),r=r.concat(this._strategy.select(n,t)),_x(r,a=>a.boxId))throw new aO;const s=this._getUnreachedTargets(r,e);if(s.nanoErgs||Xe(s.tokens))throw new lO(s);return r}_deepCloneTarget(e){return{nanoErgs:e.nanoErgs,tokens:e.tokens?e.tokens.map(t=>({tokenId:t.tokenId,amount:t.amount})):void 0}}_getUnreachedTargets(e,t){const n={nanoErgs:void 0,tokens:void 0},r=au(e,o=>o.value);if(t.nanoErgs&&t.nanoErgs>r&&(n.nanoErgs=t.nanoErgs-r),Ze(t.tokens))return n;for(const o of t.tokens){const i=In(e,o.tokenId);if(o.amount&&o.amount>i){if(o.tokenId===nr(e).boxId)continue;gt(n.tokens)&&(n.tokens=[]),n.tokens.push({tokenId:o.tokenId,amount:o.amount-i})}}return n}ensureInclusion(e){if(typeof e=="function")this._ensureFilterPredicate=e;else if(e==="all")this._ensureFilterPredicate=t=>t.value>0n;else if(gt(this._ensureInclusionBoxIds)&&(this._ensureInclusionBoxIds=new Set),Array.isArray(e))for(const t of e)this._ensureInclusionBoxIds.add(t);else this._ensureInclusionBoxIds.add(e);return this}orderBy(e,t){return this._selector=e,this._sortDirection=t,this}_isISelectionStrategyImplementation(e){return!!e.select}static buildTargetFrom(e){const t={};let n=ze;for(const r of e){n+=xt(r.value);for(const o of r.assets)t[o.tokenId]=(t[o.tokenId]||ze)+xt(o.amount)}return{nanoErgs:n,tokens:Object.keys(t).map(r=>({tokenId:r,amount:t[r]}))}}},fO=class extends Error{constructor(e){super(`Box '${e}' is already included.`)}},pO=class extends Error{constructor(e){super(e)}},hO=class extends Error{constructor(e){super(`Invalid Ergo address: ${e}`)}},mO=class extends Error{constructor(e){super(`Invalid input: ${e}`)}},gO=class extends Error{constructor(){super("Registers should be densely packed. This means that it's not possible to use a register like 'R7' without filling 'R6', 'R5' and 'R4', for example.")}},Tf=class extends Error{constructor(e){super(`Malformed transaction: ${e}`)}},Tc=120,mu=class extends hc{constructor(e,t){super(),We(e)&&this.add(e,t)}_map(e){return{tokenId:e.tokenId,amount:xt(e.amount)}}_addOne(e,t){if((gt(t)||t.sum&&!We(t.index))&&this._sum(this._map(e)))return this.length;if(this._items.length>=Tc)throw new vO;return super._addOne(e,t),this.length}add(e,t){return super.add(e,t)}_sum(e){for(const t of this._items)if(t.tokenId===e.tokenId)return t.amount+=e.amount,!0;return!1}remove(e,t){let n=-1;if(typeof e=="number"){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);n=e}else if(n=this._items.findIndex(r=>r.tokenId===e),this._isIndexOutOfBounds(n))throw new Oc(`TokenId '${e}' not found in assets collection.`);if(t&&n>-1){const r=xt(t),o=this._items[n];if(r>o.amount)throw new pO("Insufficient token amount to perform a subtraction operation.");if(rt.tokenId===e)}},vO=class extends Error{constructor(){super(`A box must contain no more than ${Tc} distinct tokens.`)}},pg=class extends Error{constructor(){super("This transaction is trying to burn tokens. If that's your intention you must explicitly allow token burning on TransactionBuilder.configure() method. If no, a change address should be provided.")}},Oc=class extends Error{constructor(e){super(e)}},yO=class extends Error{constructor(){super("Minting context is undefined. Transaction's inputs must be included in order to determine minting token id.")}},bO=class extends Error{constructor(){super("Creation Height is undefined.")}},Nr=4,wO=32,gu=Et.decode("0008cd"),_O=36,hg=Et.decode("d40801"),$s=Et.decode("00ea02d193b4cbe4e3010e040004300e18"),xO=44,ys=24;function Of(e){return nr(e)&240}function Pl(e){return nr(e)&15}function Af(e){return typeof e=="string"?Et.decode(e):e}function EO(e){return e.length===_O&&Ud(e,gu)?Jt.P2PK:e.length===xO&&Ud(e,$s)&&Ex(e,hg)?Jt.P2SH:Jt.P2S}function If(e){return Ze(e)||e.length!==33?!1:e[0]===2||e[0]===3}var Qn=class bo{constructor(t,n){be(this,"_ergoTree");be(this,"_network");be(this,"_type");this._ergoTree=t,this._network=n,this._type=EO(t)}get network(){return this._network}get ergoTree(){return Et.encode(this._ergoTree)}get type(){return this._type}static fromErgoTree(t,n){return new bo(Et.decode(t),n)}static fromPublicKey(t,n){const r=Af(t);if(!If(r))throw new Error("The Public Key is invalid.");const o=ps(gu,r);return new bo(o,n)}static fromHash(t,n){if(t=Af(t),t.length===wO)t=t.subarray(0,ys);else if(t.length!=ys)throw Error(`Invalid hash length: ${t.length}`);const r=ps($s,t,hg);return new bo(r,n)}static fromBase58(t,n=!1){const r=Qo.decode(t);if(!n&&!bo.validate(r))throw new hO(t);const o=Of(r),i=Pl(r),s=r.subarray(1,r.length-Nr);return i===Jt.P2PK?this.fromPublicKey(s,o):i===Jt.P2SH?this.fromHash(s,o):new bo(s,o)}static validate(t){const n=typeof t=="string"?Qo.decode(t):t;if(n.length({tokenId:n.tokenId,amount:xt(n.amount)})),this.additionalRegisters=t.additionalRegisters,this.transactionId=t.transactionId,this.index=t.index}isValid(){return mg.validate(this)}static validate(t){const n=dg(t).toBytes(),r=Et.encode(hi(n));return t.boxId===r}},Io,rp,kf=(rp=class extends SO{constructor(t){super(t);ut(this,Io,void 0);t.extension&&this.setContextVars(t.extension)}get extension(){return Ie(this,Io)}setContextExtension(t){const n={};for(const r in t){const o=t[r];o&&(n[r]=typeof o=="string"?o:o.toHex())}return Ye(this,Io,n),this}setContextVars(t){return this.setContextExtension(t)}toUnsignedInputObject(t){return{...this.toPlainObject(t),extension:Ie(this,Io)||{}}}toPlainObject(t){return t==="EIP-12"?{boxId:this.boxId,value:this.value.toString(),ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:this.assets.map(n=>({tokenId:n.tokenId,amount:n.amount.toString()})),additionalRegisters:this.additionalRegisters,transactionId:this.transactionId,index:this.index}:{boxId:this.boxId}}},Io=new WeakMap,rp),CO=class{constructor(e,t,n){be(this,"_inputs");be(this,"_dataInputs");be(this,"_outputs");this._inputs=Object.freeze(e),this._dataInputs=Object.freeze(t),this._outputs=Object.freeze(n)}get id(){return Et.encode(hi(this.toBytes()))}get inputs(){return this._inputs}get dataInputs(){return this._dataInputs}get outputs(){return this._outputs}get burning(){return di(In(this.inputs),In(this.outputs))}toPlainObject(e){return{inputs:this.inputs.map(t=>t.toUnsignedInputObject(e||"default")),dataInputs:this.dataInputs.map(t=>t.toPlainObject(e||"default")),outputs:this.outputs.map(t=>TO(t))}}toEIP12Object(){return this.toPlainObject("EIP-12")}toBytes(){return rO({inputs:this.inputs.map(e=>e.toUnsignedInputObject("default")),dataInputs:this.dataInputs.map(e=>e.toPlainObject("default")),outputs:this.outputs}).toBytes()}};function TO(e){return{...e,value:e.value.toString(),assets:e.assets.map(t=>({tokenId:t.tokenId,amount:t.amount.toString()}))}}var Pf=class extends hc{constructor(e){super(),We(e)&&this.add(e)}_map(e){return e instanceof kf?e:new kf(e)}_addOne(e){if(this._items.some(t=>t.boxId===e.boxId))throw new fO(e.boxId);return super._addOne(e)}remove(e){let t=-1;if(typeof e=="number"){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);t=e}else if(t=this._items.findIndex(n=>n.boxId===e),this._isIndexOutOfBounds(t))throw new Oc("The input you are trying to remove is not present in the inputs collection.");return this._items.splice(t,1),this.length}},OO=class gg extends hc{constructor(t){super(),We(t)&&this.add(t)}_map(t){return t}remove(t){let n=-1;if(typeof t=="number"){if(this._isIndexOutOfBounds(t))throw new RangeError(`Index '${t}' is out of range.`);n=t}else if(n=this._items.lastIndexOf(t),this._isIndexOutOfBounds(n))throw new Oc("The output you are trying to remove is not present in the outputs collection.");return this._items.splice(n,1),this.length}clone(){return new gg(this._items)}sum(t){const n={};let r=ze;if(t&&(t.nanoErgs&&(r=t.nanoErgs),Xe(t.tokens)))for(const o of t.tokens)gt(o.amount)||(n[o.tokenId]=(n[o.tokenId]||ze)+o.amount);for(const o of this._items){r+=o.value;for(const i of o.assets)n[i.tokenId]=(n[i.tokenId]||ze)+i.amount}return{nanoErgs:r,tokens:Object.keys(n).map(o=>({tokenId:o,amount:n[o]}))}}},AO=7,IO=class{constructor(e){be(this,"_bytes");typeof e=="string"?this._bytes=Et.decode(e):this._bytes=e}get header(){return this._bytes[0]}get version(){return this.header&AO}get hasSegregatedConstants(){return(this.header&Gd.constantSegregation)!=0}get hasSize(){return(this.header&Gd.sizeInclusion)!=0}toBytes(){return this._bytes}toHex(){return Et.encode(this.toBytes())}toAddress(e=Ha.Mainnet){return Qn.fromErgoTree(this.toHex(),e)}},vg=BigInt(360),_o=BigInt(1e6);function kO(e=vg){return t=>BigInt(t.estimateSize())*e}var ti=class{constructor(e,t,n){be(this,"_address");be(this,"_tokens");be(this,"_value");be(this,"_valueEstimator");be(this,"_creationHeight");be(this,"_registers");be(this,"_minting");this.setValue(e),this._creationHeight=n,this._tokens=new mu,this._registers={},typeof t=="string"?this._address=gm(t)?Qn.fromErgoTree(t):Qn.fromBase58(t):t instanceof IO?this._address=t.toAddress():this._address=t}get value(){return We(this._valueEstimator)?this._valueEstimator(this):this._value}get address(){return this._address}get ergoTree(){return this._address.ergoTree}get creationHeight(){return this._creationHeight}get assets(){return this._tokens}get additionalRegisters(){return this._registers}get minting(){return this._minting}setValue(e){if(typeof e=="function")this._valueEstimator=e;else if(this._value=xt(e),this._valueEstimator=void 0,this._value<=ze)throw new Error("An UTxO cannot be created without a minimum required amount.");return this}addTokens(e,t){return e instanceof mu?this._tokens.add(e.toArray(),t):this._tokens.add(e,t),this}addNfts(...e){const t=e.map(n=>({tokenId:n,amount:Qs}));return this.addTokens(t)}mintToken(e){return this._minting={...e,amount:xt(e.amount)},this}setCreationHeight(e,t){return(gt(t)||t.replace===!0||t.replace===!1&>(this._creationHeight))&&(this._creationHeight=e),this}setAdditionalRegisters(e){const t={};for(const n in e){const r=e[n];r&&(t[n]=typeof r=="string"?r:r.toHex())}if(!$x(t))throw new gO;return this._registers=t,this}eject(e){return e({tokens:this._tokens}),this}build(e){var n;let t=this.assets.toArray();if(this.minting){if(Ze(e))throw new bO;Ze(this.additionalRegisters)&&this.setAdditionalRegisters({R4:kl(Il,Ol.decode(this.minting.name||"")),R5:kl(Il,Ol.decode(this.minting.description||"")),R6:kl(Il,Ol.decode(((n=this.minting.decimals)==null?void 0:n.toString())||"0"))}),t=[{tokenId:nr(e).boxId,amount:this.minting.amount},...t]}if(gt(this.creationHeight))throw new yO;return{value:this.value,ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:t.map(r=>({tokenId:r.tokenId,amount:r.amount})),additionalRegisters:this.additionalRegisters}}estimateSize(e=_o){Sn(!!this.creationHeight,"Creation height must be set");const t=this._tokens.toArray();this.minting&&t.push({tokenId:"0000000000000000000000000000000000000000000000000000000000000000",amount:this.minting.amount});const n={value:e,ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:t.map(r=>({tokenId:r.tokenId,amount:r.amount})),additionalRegisters:this.additionalRegisters};return nO(n)}},PO=class extends Error{constructor(e){super(e)}};function BO(e){return{addInputs:t=>e.from(t).configureSelector(n=>n.ensureInclusion(Array.isArray(t)?t.map(r=>r.boxId):t.boxId)).inputs.length,addOutputs:(t,n)=>e.to(t,n).outputs.length,addDataInputs:(t,n)=>e.withDataFrom(t,n).dataInputs.length,burnTokens:t=>{if(!e.settings.canBurnTokensFromPlugins)throw new pg;e.burnTokens(t)},setFee:t=>e.payFee(t)}}var $O=class{constructor(){be(this,"_maxDistinctTokensPerChangeBox");be(this,"_allowTokenBurning");be(this,"_allowTokenBurningFromPlugins");be(this,"_isolateErgOnChange");this._maxDistinctTokensPerChangeBox=Tc,this._allowTokenBurning=!1,this._allowTokenBurningFromPlugins=!1,this._isolateErgOnChange=!1}get maxTokensPerChangeBox(){return this._maxDistinctTokensPerChangeBox}get canBurnTokens(){return this._allowTokenBurning}get canBurnTokensFromPlugins(){return this.canBurnTokens||this._allowTokenBurningFromPlugins}get shouldIsolateErgOnChange(){return this._isolateErgOnChange}setMaxTokensPerChangeBox(e){return this._maxDistinctTokensPerChangeBox=e,this}allowTokenBurning(e=!0){return this._allowTokenBurning=e,this}allowTokenBurningFromPlugins(e=!0){return this._allowTokenBurningFromPlugins=e,this}isolateErgOnChange(e=!0){return this._isolateErgOnChange=e,this}},MO=BigInt(11e5),yg="1005040004000e36100204a00b08cd0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ea02d192a39a8cc7a701730073011001020402d19683030193a38cc7b2a57300000193c2b2a57301007473027303830108cdeeac93b1a57304",DO=class{constructor(e){be(this,"_inputs");be(this,"_dataInputs");be(this,"_outputs");be(this,"_settings");be(this,"_creationHeight");be(this,"_selectorCallbacks");be(this,"_changeAddress");be(this,"_feeAmount");be(this,"_burning");be(this,"_plugins");this._inputs=new Pf,this._dataInputs=new Pf,this._outputs=new OO,this._settings=new $O,this._creationHeight=e}get inputs(){return this._inputs}get dataInputs(){return this._dataInputs}get outputs(){return this._outputs}get changeAddress(){return this._changeAddress}get fee(){return this._feeAmount}get burning(){return this._burning}get settings(){return this._settings}get creationHeight(){return this._creationHeight}get and(){return this}from(e){return RO(e)&&(e=e.toArray()),this._inputs.add(e),this}to(e,t){return this._outputs.add(e,t),this}withDataFrom(e,t){return this._dataInputs.add(e,t),this}sendChangeTo(e){return typeof e=="string"?this._changeAddress=gm(e)?Qn.fromErgoTree(e,Ha.Mainnet):Qn.fromBase58(e):this._changeAddress=e,this}payFee(e){return this._feeAmount=xt(e),this}payMinFee(){return this.payFee(MO),this}burnTokens(e){return this._burning||(this._burning=new mu),this._burning.add(e),this}configure(e){return e(this._settings),this}configureSelector(e){return gt(this._selectorCallbacks)&&(this._selectorCallbacks=[]),this._selectorCallbacks.push(e),this}extend(e){return this._plugins||(this._plugins=[]),this._plugins.push({execute:e,pending:!0}),this}eject(e){return e({inputs:this.inputs,dataInputs:this.dataInputs,outputs:this.outputs,burning:this.burning,settings:this.settings,selection:t=>{this.configureSelector(t)}}),this}build(){if(Xe(this._plugins)){const s=BO(this);for(const a of this._plugins)a.pending&&(a.execute(s),a.pending=!1)}if(this._isMinting()){if(this._isMoreThanOneTokenBeingMinted())throw new Tf("only one token can be minted per transaction.");if(this._isTheSameTokenBeingMintedOutsideTheMintingBox())throw new PO("EIP-4 tokens cannot be minted from outside of the minting box.")}this.outputs.toArray().map(s=>s.setCreationHeight(this._creationHeight,{replace:!1}));const e=this.outputs.clone();We(this._feeAmount)&&e.add(new ti(this._feeAmount,yg));const t=new dO(this.inputs.toArray());if(Xe(this._selectorCallbacks))for(const s of this._selectorCallbacks)s(t);const n=Xe(this._burning)?e.sum({tokens:this._burning.toArray()}):e.sum();let r=t.select(n);if(We(this._changeAddress)){let s=di(In(r),n);const a=[];if(Xe(s.tokens)){let l=Bf({changeAddress:this._changeAddress,creationHeight:this._creationHeight,tokens:s.tokens,maxTokensPerBox:this.settings.maxTokensPerChangeBox,baseIndex:this.outputs.length+1});for(;l>s.nanoErgs;)r=t.select({nanoErgs:n.nanoErgs+l,tokens:n.tokens}),s=di(In(r),n),l=Bf({changeAddress:this._changeAddress,creationHeight:this._creationHeight,tokens:s.tokens,maxTokensPerBox:this.settings.maxTokensPerChangeBox,baseIndex:this.outputs.length+1});const u=cm(s.tokens,this._settings.maxTokensPerChangeBox);for(const c of u){const d=new ti(kO(),this._changeAddress,this._creationHeight).addTokens(c);s.nanoErgs-=d.value,a.push(d)}}if(s.nanoErgs>ze)if(Xe(a)){if(this.settings.shouldIsolateErgOnChange)e.add(new ti(s.nanoErgs,this._changeAddress));else{const l=nr(a);l.setValue(l.value+s.nanoErgs)}e.add(a)}else e.add(new ti(s.nanoErgs,this._changeAddress))}for(const s of r)if(!s.isValid())throw new mO(s.boxId);const o=new CO(r,this.dataInputs.toArray(),e.toArray().map(s=>s.setCreationHeight(this._creationHeight,{replace:!1}).build(r)));let i=o.burning;if(i.nanoErgs>ze)throw new Tf("it's not possible to burn ERG.");if(Xe(i.tokens)&&Xe(this._burning)&&(i=di(i,{nanoErgs:ze,tokens:this._burning.toArray()})),!this._settings.canBurnTokens&&Xe(i.tokens))throw new pg;return o}_isMinting(){for(const e of this._outputs)if(e.minting)return!0;return!1}_isMoreThanOneTokenBeingMinted(){let e=0;for(const t of this._outputs)if(We(t.minting)&&(e++,e>1))return!0;return!1}_isTheSameTokenBeingMintedOutsideTheMintingBox(){const e=this._getMintingTokenId();if(gt(e))return!1;for(const t of this._outputs)if(t.assets.contains(e))return!0;return!1}_getMintingTokenId(){let e;for(const t of this._outputs)if(t.minting){e=t.minting.tokenId;break}return e}};function RO(e){return e.toArray!==void 0}function Bf(e){return BigInt(LO(e))*vg}function LO({changeAddress:e,creationHeight:t,tokens:n,baseIndex:r,maxTokensPerBox:o}){const i=Math.ceil(n.length/o);let s=0;s+=$t(_o),s+=fi(e.ergoTree),s+=$t(t),s+=$t(0),s+=32,s=s*i;for(let a=0;aa+=fi(l.tokenId)+$t(l.amount),0),n.length>o?n.length%o>0?(s+=$t(o)*Math.floor(n.length/o),s+=$t(n.length%o)):s+=$t(o)*i:s+=$t(n.length),s}const FO=Qn.fromErgoTree(yg).encode();function $f(e){return t=>{var o;const n=t.inputs.filter(i=>{var s;return((s=i.box)==null?void 0:s.address)===e}).map(i=>i.box),r=t.outputs.filter(i=>i.address===e);return{transactionId:t.transactionId,timestamp:Number(t.timestamp),inclusionHeight:t.inclusionHeight,fee:BigInt(((o=t.outputs.find(i=>i.address===FO))==null?void 0:o.value)??0),balance:NO(di(r,n))}}}function NO(e){const t=e.tokens.map(n=>({tokenId:n.tokenId,amount:Kt(String(n.amount))}));return t.unshift({tokenId:Cn,amount:Kt(String(e.nanoErgs))}),t}var VO=/(query|mutation)\s?([\w\-_]+)?/,zO={"content-type":"application/json; charset=utf-8",accept:"application/graphql-response+json, application/json"};function HO(e,t){return async n=>{const o=await(await(t.fetcher??fetch)(t.url,{method:"POST",headers:mm(t.headers,zO),credentials:t.credentials,body:(t.parser??JSON).stringify({operationName:jO(e),query:e,variables:n?Mx(n):void 0})})).text(),i=(t.parser??JSON).parse(o);if(t.throwOnNonNetworkErrors&&Xe(i.errors)&&Ze(i.data))throw new Rx(i.errors[0].message,{cause:i.errors});return i}}function jO(e){var t;return(t=VO.exec(e))==null?void 0:t.at(2)}function UO(e){return typeof e=="object"&&e.url!==void 0}var pn=["query boxes($spent: Boolean! $boxIds: [String!] $ergoTrees: [String!] $ergoTreeTemplateHash: String $tokenId: String $skip: Int $take: Int)","boxIds: $boxIds ergoTrees: $ergoTrees ergoTreeTemplateHash: $ergoTreeTemplateHash tokenId: $tokenId skip: $skip take: $take","boxId transactionId index value creationHeight ergoTree assets { tokenId amount } additionalRegisters beingSpent"],WO=`${pn[0]} { boxes(spent: $spent ${pn[1]}) { ${pn[2]} } }`,GO=`${pn[0]} { mempool { boxes(${pn[1]}) { ${pn[2]} } } }`,KO=`${pn[0]} { boxes(spent: $spent ${pn[1]}) { ${pn[2]} } mempool { boxes(${pn[1]}) { ${pn[2]} } } }`,qO="query blockHeaders($take: Int) { blockHeaders(take: $take) {headerId timestamp version adProofsRoot stateRoot transactionsRoot nBits extensionHash powSolutions height difficulty parentId votes } }",YO="mutation checkTransaction($signedTransaction: SignedTransaction!) { checkTransaction(signedTransaction: $signedTransaction) }",XO="mutation submitTransaction($signedTransaction: SignedTransaction!) { submitTransaction(signedTransaction: $signedTransaction) }",Ms=50,Mi,Di,Ri,Li,Fi,Ni,Vi,aa,bg,op,ZO=(op=class{constructor(e){ut(this,aa);ut(this,Mi,void 0);ut(this,Di,void 0);ut(this,Ri,void 0);ut(this,Li,void 0);ut(this,Fi,void 0);ut(this,Ni,void 0);ut(this,Vi,void 0);Ye(this,Mi,{...UO(e)?e:{url:e},throwOnNonNetworkErrors:!0}),Ye(this,Di,this.createOperation(WO)),Ye(this,Ri,this.createOperation(GO)),Ye(this,Li,this.createOperation(KO)),Ye(this,Fi,this.createOperation(qO)),Ye(this,Ni,this.createOperation(YO)),Ye(this,Vi,this.createOperation(XO))}async*streamBoxes(e){if(Ze(e.where))throw new Error("Cannot fetch unspent boxes without a where clause.");const t=u=>!u.beingSpent,n=new Set,{where:r,from:o}=e,i=QO(r);let s=o!=="mempool",a=o!=="blockchain";const l=a;do{const u=await Nc(this,aa,bg).call(this,i,s,a),{data:c}=u;let d=[];if(s&&eA(c)){if(Xe(c.boxes)){const p=(l?c.boxes.filter(t):c.boxes).map(Mf(!0));d=d.concat(p)}s=c.boxes.length===Ms}if(l&&JO(c)){if(Xe(c.mempool.boxes)){const p=c.mempool.boxes.filter(t).map(Mf(!1));d=d.concat(p)}a=c.mempool.boxes.length===Ms}Xe(d)&&(d.some(p=>n.has(p.boxId))&&(d=d.filter(p=>!n.has(p.boxId))),Xe(d)&&(d=Sx(d,p=>p.boxId),d.forEach(p=>n.add(p.boxId)),yield d)),(s||a)&&(i.skip+=Ms)}while(s||a)}async getBoxes(e){let t=[];for await(const n of this.streamBoxes(e))t=t.concat(n);return Zs(t,n=>n.creationHeight)}async getHeaders(e){var n;return((n=(await Ie(this,Fi).call(this,e)).data)==null?void 0:n.blockHeaders.map(r=>({...r,id:r.headerId,timestamp:Number(r.timestamp),nBits:Number(r.nBits),votes:r.votes.join("")})))??[]}createOperation(e,t){const n=mm(t,Ie(this,Mi));return n.throwOnNonNetworkErrors=!0,HO(e,n)}async checkTransaction(e){try{return{success:!0,transactionId:(await Ie(this,Ni).call(this,{signedTransaction:e})).data.checkTransaction}}catch(t){return{success:!1,message:t.message}}}async submitTransaction(e){try{return{success:!0,transactionId:(await Ie(this,Vi).call(this,{signedTransaction:e})).data.submitTransaction}}catch(t){return{success:!1,message:t.message}}}reduceTransaction(){throw new Dx("Transaction reducing is not supported by ergo-graphql.")}},Mi=new WeakMap,Di=new WeakMap,Ri=new WeakMap,Li=new WeakMap,Fi=new WeakMap,Ni=new WeakMap,Vi=new WeakMap,aa=new WeakSet,bg=function(e,t,n){return t&&n?Ie(this,Li).call(this,e):n?Ie(this,Ri).call(this,e):Ie(this,Di).call(this,e)},op);function QO(e){const t={spent:!1,boxIds:Bl(e.boxIds,e.boxId),ergoTrees:Bl(e.ergoTrees,e.ergoTree),ergoTreeTemplateHash:e.templateHash,tokenId:e.tokenId,skip:0,take:Ms},n=Bl(e.addresses,e.address);if(Xe(n)){const r=n.map(o=>typeof o=="string"?Qn.fromBase58(o).ergoTree:o.ergoTree);t.ergoTrees=dm(Xe(t.ergoTrees)?t.ergoTrees.concat(r):r)}return t}function Bl(e,t){if(Ze(e)&>(t))return;const n=new Set(e??[]);return gt(t)||n.add(t),Array.from(n.values())}function JO(e){var t;return!!((t=e==null?void 0:e.mempool)!=null&&t.boxes)}function eA(e){return!!(e!=null&&e.boxes)}function Mf(e){return t=>({...t,value:BigInt(t.value),assets:t.assets.map(n=>({tokenId:n.tokenId,amount:BigInt(n.amount)})),confirmed:e})}var zi,Hi,ji,ko,Ui;class tA extends ZO{constructor(){super("https://gql.ergoplatform.com/");ut(this,zi,void 0);ut(this,Hi,void 0);ut(this,ji,void 0);ut(this,ko,void 0);ut(this,Ui,void 0);Ye(this,zi,this.createOperation(nA)),Ye(this,Hi,this.createOperation(lA)),Ye(this,ji,this.createOperation(rA)),Ye(this,ko,this.createOperation(oA)),Ye(this,Ui,this.createOperation(iA))}async getCurrentHeight(){var r;return((r=(await Ie(this,zi).call(this)).data)==null?void 0:r.blockHeaders[0].height)??0}async getConfirmedTransactions(n,r){var i;return((i=(await Ie(this,ko).call(this,{address:n,minHeight:r})).data)==null?void 0:i.transactions)??[]}async getMempoolTransactions(n){var o,i;return((i=(o=(await Ie(this,Ui).call(this,{address:n})).data)==null?void 0:o.mempool)==null?void 0:i.transactions)??[]}async getUnconfirmedTransactions(n,r){var i;return((i=(await Ie(this,ko).call(this,{address:n,minHeight:r})).data)==null?void 0:i.transactions)??[]}async getState(n){var o,i;const r=await Ie(this,Hi).call(this,{address:n});return{height:((o=r.data)==null?void 0:o.blockHeaders[0].height)??0,mempoolTransactionIds:(i=r.data)==null?void 0:i.mempool.transactions.map(s=>s.transactionId)}}async*streamMetadata(n){var o;const r=cm(n,20);for(const i of r){const s=await Ie(this,ji).call(this,{tokenIds:i});(o=s.data)!=null&&o.tokens&&(yield s.data.tokens)}}}zi=new WeakMap,Hi=new WeakMap,ji=new WeakMap,ko=new WeakMap,Ui=new WeakMap;const nA="query height { blockHeaders(take: 1) { height } }",rA="query tokens($tokenIds: [String!]!) { tokens(tokenIds: $tokenIds) { tokenId name decimals } }",ta="address value assets { tokenId amount } index",oA=`query confirmedTransactions($address: String $minHeight: Int $take: Int $skip: Int) { transactions(address: $address, take: $take, skip: $skip, minHeight: $minHeight) { transactionId timestamp inclusionHeight inputs { box { ${ta} } } outputs(relevantOnly: true) { ${ta} } } }`,iA=`query mempoolTransactions($address: String $take: Int $skip: Int) { mempool { transactions(address: $address, take: $take, skip: $skip) { transactionId timestamp inputs { box { ${ta} } } outputs { ${ta} } } } }`,sA="blockHeaders(take: 1) { height }",aA="mempool { transactions(address: $address) { transactionId } }",lA=`query state($address: String) { ${sA} ${aA} }`,Kn=new tA;async function vu(e,t){return We(t)&&Object.keys(t).map(r=>e.searchParams.append(r,t[r])),await(await fetch(e,{headers:{"Content-Type":"application/json"}})).json()}const Df="https://api.spectrum.fi",wg="0000000000000000000000000000000000000000000000000000000000000000";class uA{async getPoolsStats(){return vu(new URL("v1/amm/pools/stats",Df))}async getActivePools(){const t=new Date;return t.setDate(t.getDate()-30),vu(new URL("v1/price-tracking/markets",Df),{from:this._getUtcTimestamp(t),to:this._getUtcTimestamp(new Date)})}_getUtcTimestamp(t){return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}}const _g=new uA,cA=Kt(1),dA=1e3,fA="https://api.coingecko.com/api/",pA="cbd75cfe1a4f37f9a22eaee516300e36ea82017073036f07a09c1d2e10277cda",hA="6e9c85c4be018b1308ddf034baf1406490e2a9dd406c01591bd6df41e98b6057",mA="100a040204000402040004000502050005d00f04040e2002a195c991b685f1bbf6c84cb192f698ecccc3c707b7293c21d27655ade8d56ed812d601db6308a7d602b27201730000d6038c720202d604b2a5730100d605db63087204d606b27205730200d6078c720602d6089972037207d609c17204d60a7ec1a706d60be4c6a70505d60c7e720b06d60de4c6a70405d60e9d9c720a720c7e99720d720306d60fe4c6a70605d610e4c6a70705d611e4c6a70805d61296830401927209720f93c27204c2a79683030193b27205730300b27201730400938c7206018c72020192720773059683050193e4c672040405720d93e4c672040505720b93e4c672040605720f93e4c672040705721093e4c6720408057211959172087306d1968302017212927e7209069a720a9d9c7e720806720e720cd803d6139d9c7e997207720306720e720cd6147307d615b2a5730800d1968303017212937e7209069a99720a72139d9c72137e7211067e72140696830201937ec17215069d9c72137e7210067e72140693cbc272157309";async function gA(){return(await vu(new URL("v3/simple/price",fA),{ids:"ergo",vs_currencies:"usd"})).ergo.usd}async function vA(){const[e,t]=await Promise.all([_g.getActivePools(),xg.getHighLiquidityTokenIds()]),n=new Map;return VC(e.filter(r=>r.baseId===wg&&t.includes(r.quoteId)),(r,o)=>r.quoteId===o.quoteId&&r.baseVolume.value<=o.baseVolume.value).map(r=>n.set(r.quoteId,cA.div(r.lastPrice))),n}async function yA(){let e=await Kn.getBoxes({from:"blockchain",where:{ergoTree:mA}});if(e=e.filter(a=>Xe(a.assets)&&a.assets[0].tokenId===hA),Ze(e))return;const t=nr(e),n=t.assets[1];if(!n||!t.additionalRegisters.R4)return;const r=BigInt(t.value),o=QT(t.additionalRegisters.R4),i=BigInt(n.amount),s=o-i;return Kt(String(r)).div(String(s))}var Po;class bA{constructor(){ut(this,Po,void 0)}async getHighLiquidityTokenIds(){if(!Ie(this,Po)){const t=await _g.getPoolsStats();Ye(this,Po,t.filter(n=>n.lockedX.id===wg&&n.tvl.value>=dA).map(n=>n.lockedY.id))}return Ie(this,Po)}async getTokenRates(){const[t,n,r]=await Promise.all([gA(),vA(),yA()]),o={[Cn]:{erg:1,fiat:t}};r&&(o[pA]={erg:r.toNumber(),fiat:r.times(t).toNumber()});for(const[i,s]of n)o[i]={erg:s.toNumber(),fiat:s.times(t).toNumber()};return o}}Po=new WeakMap;const xg=new bA,wA={name:"ERG",decimals:wo},$r=mh("chain",()=>{const e=Uo();let t,n=Date.now();const r=U(!0),o=U(!1),i=Co("height",0),s=U(new Set),a=Co("prices-cache",{}),l=Co("token-metadata-cache",{[Cn]:wA});ye(i,(h,v)=>{v&&u()}),ye(()=>e.balance,()=>{if(Ze(e.balance))return;const h=e.balance.map(v=>v.tokenId);d(h)}),Ue(async()=>{t=setInterval(c,4e3),await Promise.all([c(),u()]),r.value=!1}),_a(()=>{clearInterval(t)});async function u(){a.value=await xg.getTokenRates()}async function c(){let h=0;if(e.address){const v=await Kn.getState(e.address);h=v.height,Date.now()>n+1e4&&(s.value.clear(),n=Date.now()),Xe(v.mempoolTransactionIds)&&v.mempoolTransactionIds.map(b=>s.value.add(b))}else h=await Kn.getCurrentHeight();h&&i.value!==h&&(i.value=h)}async function d(h){const v=Object.keys(l.value);if(h=h.filter(b=>!v.includes(b)),!Ze(h)){h=dm(h);for await(const b of Kn.streamMetadata(h))for(const w of b)l.value[w.tokenId]={name:w==null?void 0:w.name,decimals:w.decimals};r.value&&(r.value=!1)}}function p(h=!0){o.value=h}return{prices:a,metadata:l,loading:r,height:i,mempoolTxIds:s,waitingTransaction:o,setWaitingTransaction:p,loadMetadata:d}}),bs="npm:@nautls/ergsnap",Ds={async getVersion(){var e;return(e=await CA(bs))==null?void 0:e.version},async connect(){try{return await SA(bs),!0}catch(e){return console.error(e),!1}},async getAddress(){return await na().request({method:"wallet_invokeSnap",params:{snapId:bs,request:{method:"get_address"}}})},async signTx(e){return await na().request({method:"wallet_invokeSnap",params:{snapId:bs,request:{method:"sign_tx",params:{tx:e}}}})}};function _A(){var e;return((e=window.ethereum)==null?void 0:e.isMetaMask)??!1}function xA(){var e;return((e=window.ethereum)==null?void 0:e.isConnected())??!1}function na(){if(window.ethereum)return window.ethereum;throw new Error("Metamask provider is not available.")}async function EA(){return await na().request({method:"wallet_getSnaps"})}async function SA(e,t={}){await na().request({method:"wallet_requestSnaps",params:{[e]:t}})}async function CA(e,t){try{const n=await EA();return Object.values(n).find(r=>r.id===e&&(!t||r.version===t))}catch(n){console.error("Failed to obtain installed snap",n);return}}const{freeze:Eg}=Object,ra=e=>Eg(Kt(e)),TA={read(e){return JSON.parse(e).map(n=>({tokenId:n.tokenId,amount:ra(n.amount)}))},write(e){return JSON.stringify(e.map(t=>({tokenId:t.tokenId,amount:t.amount.toString()})))}},OA={read(e){return JSON.parse(e).map(n=>({...n,fee:n.fee?BigInt(n.fee):void 0,balance:n.balance.map(r=>({tokenId:r.tokenId,amount:ra(r.amount)}))}))},write(e){return JSON.stringify(e.map(t=>{var n;return{...t,fee:(n=t.fee)==null?void 0:n.toString(),balance:t.balance.map(r=>({tokenId:r.tokenId,amount:r.amount.toString()}))}}))}},Uo=mh("wallet",()=>{const e=$r(),t=U([]),n=U([]),r=U([]),o=U([]),i=U(!0),s=U(!1),a=U("");let l=!1,u=!1,c=!1,d;Ue(async()=>{s.value=_A()&&xA()&&!!await Ds.getVersion(),s.value&&await S(),i.value=!1}),ye(s,async I=>{I?(await S(),i.value=!0):(n.value=[],r.value=[]),i.value=!1}),ye(()=>e.height,()=>Promise.all([b(),h(),v()])),ye(()=>e.mempoolTxIds,async()=>{const[I]=await Promise.all([v(),b()]);I&&e.setWaitingTransaction(!1)},{deep:!0}),ye(a,I=>{Co(`${I}-balance`,t,localStorage,{serializer:TA}),Co(`${I}-tx-history`,r,localStorage,{serializer:OA}),Promise.all([b(),h(),v()])}),ye(n,w);const p=K(()=>{const I=ks(o.value,r.value,F=>F.transactionId);return Zs(r.value.concat(I),F=>F.timestamp,"desc")});async function h(){if(!a.value||u)return;u=!0;try{const F=await Kn.getConfirmedTransactions(a.value,d),V=ks(F,r.value,N=>N.transactionId).map($f(a.value));r.value=r.value.concat(V),e.loadMetadata(V.flatMap(N=>N.balance.map(H=>H.tokenId)))}finally{u=!1}const I=MC(r.value,F=>F.inclusionHeight);I?d=I.inclusionHeight===d?e.height:I.inclusionHeight:d=e.height}async function v(){if(!a.value||c)return!1;c=!0;try{const F=(await Kn.getMempoolTransactions(a.value)).map($f(a.value)),V=Xe(ks(F,o.value,N=>N.transactionId));return V&&(o.value=F,e.loadMetadata(o.value.flatMap(N=>N.balance.map(H=>H.tokenId)))),V}finally{c=!1}}async function b(){if(!(!a.value||l)){l=!0;try{const I=await Kn.getBoxes({where:{address:a.value}});n.value=Eg(I)}finally{l=!1}}}function w(){if(Ze(n)){t.value=[];return}const I=In(n.value),F=Zs(I.tokens.map(V=>({tokenId:V.tokenId,amount:ra(V.amount.toString())})),V=>V.tokenId);F.unshift({tokenId:Cn,amount:ra(I.nanoErgs.toString())}),t.value=F}async function S(){a.value=await Ds.getAddress()}async function _(){try{i.value=!0,s.value=await Ds.connect()}finally{i.value=!1}return s.value}return{connect:_,connected:s,loading:i,address:a,balance:t,history:p}});function Sg(e){navigator.clipboard.writeText(e)}function Ti(e,t,n="middle"){if(!e||!t||t>=e.length)return e||"";const r="…";if(n==="middle"){const o=Math.trunc((t-r.length)/2);return o*2+r.length>=e.length?e:`${e.slice(0,o).trimEnd()}${r}${e.slice(e.length-o).trimStart()}`}else return`${e.slice(0,t-r.length+1).trimEnd()}${r}`}const AA=Ee("img",{src:Uy,alt:"Nautilus Wallet",class:"w-10"},null,-1),IA={class:"flex gap-2"},kA=Ee("p",null,"Click to copy",-1),PA=W({__name:"AppHeader",setup(e){const{toast:t}=Aa(),n=Uo(),r=cb();function o(){Sg(n.address),t({title:"Copied!",description:"Your address has been copied to the clipboard."})}function i(){r.value=r.value==="dark"?"light":"dark"}return(s,a)=>(D(),j(f(Gu),{class:"flex-row items-center gap-2 space-y-0"},{default:B(()=>[AA,q(f(Ku),{class:"flex-grow cursor-default tracking-normal"},{default:B(()=>[Re("Ergo Wallet")]),_:1}),Ee("div",IA,[f(n).address?(D(),j(f(gx),{key:1,"delay-duration":200},{default:B(()=>[q(f(px),null,{default:B(()=>[q(f(mx),null,{default:B(()=>[q(f(Un),{variant:"secondary",onClick:o},{default:B(()=>[Re(it(f(Ti)(f(n).address,10)),1)]),_:1})]),_:1}),q(f(hx),null,{default:B(()=>[kA]),_:1})]),_:1})]),_:1})):(D(),j(f(Un),{key:0,class:"gap-2",variant:"outline",loading:f(n).loading,onClick:a[0]||(a[0]=l=>f(n).connect())},{loading:B(()=>[Re("Connecting...")]),default:B(()=>[Re(" Connect Wallet ")]),_:1},8,["loading"])),q(f(Un),{size:"icon",variant:"outline",onClick:a[1]||(a[1]=l=>i())},{default:B(()=>[f(r)==="dark"?(D(),j(f(My),{key:0,size:16})):(D(),j(f(Ny),{key:1,size:16}))]),_:1})])]),_:1}))}}),BA=Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2}),$A=1e6;function Ac(e,t,n=!1){var i;if(!e)return"";const r=((i=t.metadata[e.tokenId])==null?void 0:i.decimals)??0;let o=typeof e.amount=="bigint"?Kt(String(e.amount)):e.amount;return n&&(o=o.isNegative()?o.negated():o),Ai(Ka(o,r),r)}function Oi(e,t,n=20){var r;return e?Ti(((r=t.metadata[e.tokenId])==null?void 0:r.name)||e.tokenId,n):""}function Ai(e,t){return gt(e)?"0":e.isGreaterThanOrEqualTo($A)?BA.format(e.toNumber()):e.decimalPlaces(t||0,Kt.ROUND_DOWN).toFormat({groupSeparator:",",groupSize:3,decimalSeparator:"."})}function MA(e,t){return t?e.decimalPlaces(t).shiftedBy(t):e}function Ka(e,t){return t?e.decimalPlaces(t).shiftedBy(t*-1):e}const DA={ERG:"ergo.png","003bd19d0187117f130b62e1bcab0939929ff5c7709f843c5c4dd158949285d0":"sigrsv.svg","03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04":"sigusd.svg","36aba4b4a97b65be491cf9f5ca57b5408b0da8d0194f30ec8330d1e8946161c1":"erdoge.svg",fbbaac7337d051c10fc3da0ccb864f4d32d40027551e1c3ea3ce361f39b91e40:"kushti.svg","0cd8c9f416e5b1ca9f986a7f10a84191dfb85941619e49e53c0dc30ebf83324b":"comet.png","472c3d4ecaa08fb7392ff041ee2e6af75f4a558810a74b28600549d5392810e8":"neta.svg",d71693c49a84fbbecd4908c94813b46514b18b67a99952dc1e6e4791556de413:"ergopad.svg","1fd6e032e8476c4aa54c18c1a308dce83940e8f4a28f576440513ed7326ad489":"paideia.svg","00b1e236b60b95c2c6f8007a9d89bc460fc9e78f98b09faec9449007b40bccf3":"egio.svg","007fd64d1ee54d78dd269c8930a38286caa28d3f29d27cadcb796418ab15c283":"exle.svg","02f31739e2e4937bb9afb552943753d1e3e9cdd1a5e5661949cb0cef93f907ea":"terahertz.svg",e8b20745ee9d18817305f32eb21015831a48f02d40980de6e849f886dca7f807:"flux.svg","00bd762484086cf560d3127eb53f0769d76244d9737636b2699d55c56cd470bf":"epos.svg","18c938e1924fc3eadc266e75ec02d81fe73b56e4e9f4e268dffffcb30387c42d":"aht.svg","3405d8f709a19479839597f9a22a7553bdfc1a590a427572787d7c44a88b6386":"love.svg","4c8ac00a28b198219042af9c03937eecb422b34490d55537366dc9245e85d4e1":"woodennickels.svg","9a06d9e545a41fd51eeffc5e20d818073bf820c635e2a9d922269913e0de369d":"spf.svg","089990451bb430f05a85f4ef3bcb6ebf852b3d6ee68d86d78658b9ccef20074f":"quacks.svg",cbd75cfe1a4f37f9a22eaee516300e36ea82017073036f07a09c1d2e10277cda:"empty.svg","8b08cdd5449a9592a9e79711d7d79249d7a03c535d17efaee83e216e80a44c4b":"rosen.svg",e023c5f382b6e96fbd878f6811aac73345489032157ad5affb84aefd4956c297:"rsada.svg"},RA={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},LA=Ee("path",{d:"M12.022.147a.924.924 0 0 0-.356.071l-7.74 3.207a.927.927 0 0 0-.501.503L.218 11.667a.93.93 0 0 0 0 .712l3.207 7.738a.927.927 0 0 0 .502.504l7.739 3.206a.933.933 0 0 0 .712 0l7.74-3.206a.931.931 0 0 0 .502-.504l3.206-7.739a.93.93 0 0 0 0-.712L20.62 3.928a.93.93 0 0 0-.503-.503L12.378.218a.926.926 0 0 0-.356-.07z",style:{"stroke-width":"1.18749"}},null,-1),FA=Ee("path",{fill:"url(#a)",d:"M12.872 14.313h-2.016c.005-.48.041-.89.11-1.238a2.945 2.945 0 0 1 .372-.95c.178-.281.416-.56.713-.837.247-.223.463-.437.647-.639.185-.202.33-.41.436-.622.104-.218.157-.46.157-.727 0-.308-.047-.564-.142-.766a.97.97 0 0 0-.41-.47 1.316 1.316 0 0 0-.681-.16c-.226 0-.437.05-.633.152a1.18 1.18 0 0 0-.482.446c-.121.202-.184.47-.19.798H8.46c.015-.728.181-1.33.498-1.802a2.874 2.874 0 0 1 1.289-1.062 4.492 4.492 0 0 1 1.81-.351c.74 0 1.371.122 1.898.368a2.63 2.63 0 0 1 1.212 1.06c.277.463.418 1.027.418 1.692 0 .463-.09.875-.269 1.236a4.23 4.23 0 0 1-.704.998c-.29.309-.61.63-.957.958-.3.271-.506.556-.618.854-.104.297-.16.652-.166 1.062zm-2.254 2.465c0-.34.117-.622.348-.846.232-.229.543-.343.934-.343.384 0 .693.114.925.343.237.224.356.506.356.846 0 .33-.119.61-.356.838-.232.23-.54.343-.926.343-.39 0-.701-.114-.933-.343a1.132 1.132 0 0 1-.348-.838Z",opacity:".5",style:{fill:"url(#a)","stroke-width":"1.18749"}},null,-1),NA=Ee("defs",null,[Ee("linearGradient",{id:"a",x1:"12",x2:"12",y1:"7",y2:"17",gradientTransform:"translate(-2.228 -2.228) scale(1.1875)",gradientUnits:"userSpaceOnUse"},[Ee("stop"),Ee("stop",{offset:"1"})])],-1),VA=[LA,FA,NA];function zA(e,t){return D(),Te("svg",RA,[...VA])}const HA={render:zA},jA={class:"min-w-max"},UA=["src"],Ic=W({__name:"AssetIcon",props:{tokenId:{type:String,required:!0},customClass:{type:String,default:""}},setup(e){const t=e,n=K(()=>{const s=DA[t.tokenId];if(s)return`./asset-icons/${s}`}),r=K(()=>We(n.value)),o=K(()=>i(t.tokenId));function i(s){if(!(s.length<6))return`#${s.substring(0,6)}`}return(s,a)=>(D(),Te("div",jA,[r.value?(D(),Te("img",{key:0,class:lt(e.customClass),src:n.value},null,10,UA)):(D(),j(f(HA),{key:1,class:lt([e.customClass,"fill-gray-400 opacity-80"]),style:qt(`fill: ${o.value}`)},null,8,["class","style"]))]))}}),WA=W({__name:"AssetPrice",props:{asset:{type:Object,default:void 0},customClass:{type:String,default:""}},setup(e){const t=$r(),n=e,r=K(()=>{var o,i,s;if(!(!n.asset||!((o=t.prices[n.asset.tokenId])!=null&&o.fiat)))return Ka(n.asset.amount,((i=t.metadata[n.asset.tokenId])==null?void 0:i.decimals)??0).multipliedBy(((s=t.prices[n.asset.tokenId])==null?void 0:s.fiat)||0)});return(o,i)=>(D(),Te("div",{class:lt(["text-base-content skeleton min-w-min whitespace-nowrap text-xs opacity-70",e.customClass])},[Ee("span",null,"≈ "+it(f(Ai)(r.value,2))+" USD",1)],2))}});function GA(e){if(!(!e||e===Cn))return new URL(`token/${e}`,Sc).href}function KA(e){if(e)return new URL(`addresses/${e}`,Sc).href}function qA(e){return new URL(`transactions/${e}`,Sc).href}const YA=["href"],Cg=W({__name:"ExplorerLink",props:{type:{type:String,required:!0},value:{type:String,required:!0},outside:{type:Boolean,default:!1}},setup(e){const t=e,n=K(()=>t.type==="token"?GA(t.value):t.type==="address"?KA(t.value):t.type==="transaction"?qA(t.value):"#");return(r,o)=>(D(),Te("a",ce({href:n.value,target:"_blank"},r.$attrs),[X(r.$slots,"default")],16,YA))}}),XA={class:"flex-grow"},Tg=W({__name:"AssetRow",props:{asset:{type:Object,default:void 0},rootClass:{type:String,default:""},nameClass:{type:String,default:""},amountClass:{type:String,default:""},logoClass:{type:String,default:""},maxNameLen:{type:Number,default:20},displayPrice:{type:Boolean,default:!0},displaySignaling:{type:Boolean,default:!1},link:Boolean},setup(e){const t=$r();return(n,r)=>{var o;return D(),Te("div",{class:lt(f($e)(["flex w-full items-center justify-start gap-2",e.rootClass]))},[e.asset?(D(),Te(qe,{key:0},[e.displaySignaling?(D(),Te(qe,{key:0},[e.asset.amount.isNegative()?(D(),j(f(Py),{key:0,size:16,class:"text-red-500/70"})):(D(),j(f(By),{key:1,size:16,class:"text-green-500/70"}))],64)):pt("",!0),q(Ic,{"token-id":e.asset.tokenId,"custom-class":e.logoClass},null,8,["token-id","custom-class"]),Ee("div",XA,[e.link&&e.asset.tokenId!==f(Cn)?(D(),j(Cg,{key:0,class:lt(f($e)(["break-all",e.nameClass])),value:e.asset.tokenId,type:"token"},{default:B(()=>{var i;return[Re(it(f(Oi)(e.asset,f(t),(i=f(t).metadata[e.asset.tokenId])!=null&&i.name?e.maxNameLen:10)),1)]}),_:1},8,["class","value"])):(D(),Te("div",{key:1,class:lt(f($e)(["break-all",e.nameClass]))},it(f(Oi)(e.asset,f(t),(o=f(t).metadata[e.asset.tokenId])!=null&&o.name?e.maxNameLen:10)),3))]),Ee("div",{class:lt(f($e)(["text-right",e.amountClass]))},[Ee("div",null,it(f(Ac)(e.asset,f(t))),1),e.displayPrice?(D(),j(WA,{key:0,asset:e.asset},null,8,["asset"])):pt("",!0)],2)],64)):(D(),Te(qe,{key:1},[Ee("div",{class:lt([e.nameClass,"skeleton-fixed h-4 w-8/12"])},null,2),Ee("div",{class:lt([e.amountClass,"skeleton-fixed h-4 w-8/12"])},null,2)],64))],2)}}}),ws=W({__name:"Badge",props:{variant:{}},setup(e){return(t,n)=>(D(),Te("div",{class:lt(f($e)(f(ZA)({variant:t.variant}),t.$attrs.class??""))},[X(t.$slots,"default")],2))}}),ZA=Uu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",warning:"border-transparent bg-yellow-500 text-primary-foreground",success:"border-transparent bg-green-600 text-primary-foreground"}},defaultVariants:{variant:"default"}}),QA=W({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(I_),ce(t,{class:f($e)("flex touch-none select-none transition-colors",n.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n.orientation==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",n.$attrs.class??"")}),{default:B(()=>[q(f(k_),{class:"relative flex-1 rounded-full bg-border"})]),_:1},16,["class"]))}}),Og=W({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{default:""}},setup(e){const t=e;return(n,r)=>(D(),j(f(y_),{type:n.type,class:lt(f($e)("relative overflow-hidden",t.class))},{default:B(()=>[q(f(b_),{class:"h-full w-full rounded-[inherit]"},{default:B(()=>[X(n.$slots,"default")]),_:3}),q(QA),q(f(B_))]),_:3},8,["type","class"]))}}),kc=W({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(M_),{class:lt([f($e)("shrink-0 bg-secondary",t.class),t.orientation==="vertical"?"w-px h-full":"h-px w-full"])},null,8,["class"]))}}),JA={key:0,class:"m-auto cursor-default space-y-4"},eI=Ee("p",{class:"text-muted-foreground"},"No transactions",-1),tI={class:"space-y-6 px-6 text-sm"},nI={class:"flex items-center justify-between"},rI={class:"text-xs"},oI={class:"flex justify-between pb-4 pt-1"},iI=W({__name:"TxHistory",setup(e){const t=Uo(),n=$r();return(r,o)=>(D(),j(f(Us),{class:"flex h-[24.8rem] w-full px-0 py-1 align-middle"},{default:B(()=>[f(Ze)(f(t).history)?(D(),Te("div",JA,[q(f(gh),{class:"m-auto text-muted-foreground/30",size:60}),eI])):(D(),j(f(Og),{key:1,class:"w-full"},{default:B(()=>[Ee("div",tI,[(D(!0),Te(qe,null,Qr(f(t).history,(i,s)=>(D(),Te("div",{key:i.transactionId,class:"w-full space-y-2"},[Ee("div",nI,[q(Cg,{type:"transaction",value:i.transactionId},{default:B(()=>[q(f(ws),{variant:"secondary"},{default:B(()=>[Re(it(f(Ti)(i.transactionId,25)),1)]),_:2},1024)]),_:2},1032,["value"]),Ee("div",rI,it(f(hb)(new Date(i.timestamp))),1)]),Ee("div",null,[(D(!0),Te(qe,null,Qr(i.balance,a=>(D(),Te("div",{key:a.tokenId},[q(Tg,{"root-class":"py-1 gap-2",link:"","display-signaling":"",asset:a,"logo-class":"h-6","display-price":!1},null,8,["asset"])]))),128))]),Ee("div",oI,[i.fee?(D(),j(f(ws),{key:0,variant:"outline",class:"font-normal"},{default:B(()=>[Re("Fee: "+it(f(su)(i.fee,f(wo)))+" ERG",1)]),_:2},1024)):pt("",!0),i.inclusionHeight?(D(),j(f(ws),{key:1,variant:"success"},{default:B(()=>[Re(it(f(Ai)(f(Kt)(f(n).height-i.inclusionHeight+1)))+" confirmations ",1)]),_:2},1024)):(D(),j(f(ws),{key:2,variant:"warning"},{default:B(()=>[Re(" Unconfirmed ")]),_:1}))]),si.value||o.value||a.value?On(t.default({present:a})[0],{ref:c=>{const d=vn(c);return typeof(d==null?void 0:d.hasAttribute)>"u"||(d!=null&&d.hasAttribute("data-radix-popper-content-wrapper")?s.value=d.firstElementChild:s.value=d),d}}):null}}),[$n,pw]=Tt("DialogRoot"),hw=W({__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=Yr(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=U(),i=U(),{modal:s}=on(n);return pw({open:r,modal:s,openModal:()=>{r.value=!0},onOpenChange:a=>{r.value=a},onOpenToggle:()=>{r.value=!r.value},contentId:Wn(),titleId:Wn(),descriptionId:Wn(),triggerElement:o,contentElement:i}),(a,l)=>X(a.$slots,"default")}}),mw=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=$n(),{primitiveElement:r,currentElement:o}=Qe();return Ue(()=>{n.triggerElement=o}),(i,s)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:r},t,{type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(n).open.value||!1,"aria-controls":f(n).contentId,"data-state":f(n).open.value?"open":"closed",onClick:f(n).onOpenToggle}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ac=W({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=jh();return(n,r)=>f(t)||n.forceMount?(D(),j(rh,{key:0,to:n.to,disabled:n.disabled},[X(n.$slots,"default")],8,["to","disabled"])):pt("",!0)}}),gw=W({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),vw="dismissableLayer.pointerDownOutside",yw="dismissableLayer.focusOutside";function qh(e,t){const n=t.closest("[data-dismissable-layer]"),r=e.querySelector("[data-dismissable-layer]"),o=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||o.indexOf(r){});return vt(s=>{if(!kr)return;const a=async u=>{if(t!=null&&t.value){if(qh(t.value,u.target)){o.value=!1;return}if(u.target&&!o.value){let c=function(){ec(vw,e,d)};const d={originalEvent:u};u.pointerType==="touch"?(r.removeEventListener("click",i.value),i.value=c,r.addEventListener("click",i.value,{once:!0})):c()}else r.removeEventListener("click",i.value);o.value=!1}},l=window.setTimeout(()=>{r.addEventListener("pointerdown",a)},0);s(()=>{window.clearTimeout(l),r.removeEventListener("pointerdown",a),r.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>o.value=!0}}function ww(e,t){var n;const r=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=U(!1);return vt(i=>{if(!kr)return;const s=async a=>{t!=null&&t.value&&(await Ke(),!qh(t.value,a.target)&&a.target&&!o.value&&ec(yw,e,{originalEvent:a}))};r.addEventListener("focusin",s),i(()=>r.removeEventListener("focusin",s))}),{onFocusCapture:()=>o.value=!0,onBlurCapture:()=>o.value=!1}}const fn=Tn({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Da=W({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,r=t,{primitiveElement:o,currentElement:i}=Qe(),s=q(()=>{var v;return((v=i.value)==null?void 0:v.ownerDocument)??globalThis.document}),a=q(()=>fn.layersRoot),l=q(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=q(()=>fn.layersWithOutsidePointerEventsDisabled.size>0),c=q(()=>{const v=Array.from(a.value),[b]=[...fn.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b);return l.value>=w}),d=bw(async v=>{const b=[...fn.branches].some(w=>w.contains(v.target));!c.value||b||(r("pointerDownOutside",v),r("interactOutside",v),await Ke(),v.defaultPrevented||r("dismiss"))},i),p=ww(v=>{[...fn.branches].some(b=>b.contains(v.target))||(r("focusOutside",v),r("interactOutside",v),v.defaultPrevented||r("dismiss"))},i);nc("Escape",v=>{l.value===a.value.size-1&&(r("escapeKeyDown",v),v.defaultPrevented||r("dismiss"))});let h;return vt(v=>{i.value&&(n.disableOutsidePointerEvents&&(fn.layersWithOutsidePointerEventsDisabled.size===0&&(h=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),fn.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),v(()=>{n.disableOutsidePointerEvents&&fn.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=h)}))}),vt(v=>{v(()=>{i.value&&(a.value.delete(i.value),fn.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(v,b)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:o,"as-child":v.asChild,as:v.as,"data-dismissable-layer":"",style:qt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:B(()=>[X(v.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),_w=W({__name:"DismissableLayerBranch",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe();return Ue(()=>{fn.branches.add(r.value)}),Bn(()=>{fn.branches.delete(r.value)}),(o,i)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:n},t),{default:B(()=>[X(o.$slots,"default")]),_:3},16))}}),ml="focusScope.autoFocusOnMount",gl="focusScope.autoFocusOnUnmount",Ld={bubbles:!1,cancelable:!0};function Is(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gr(r,{select:t}),document.activeElement!==n)return!0}function xw(e){const t=lc(e),n=Fd(t,e),r=Fd(t.reverse(),e);return[n,r]}function lc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fd(e,t){for(const n of e)if(!Ew(n,{upTo:t}))return n}function Ew(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sw(e){return e instanceof HTMLInputElement&&"select"in e}function gr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sw(e)&&t&&e.select()}}const Cw=Ba(()=>U([]));function Tw(){const e=Cw();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=Nd(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=Nd(e.value,t),(n=e.value[0])==null||n.resume()}}}function Nd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ow(e){return e.filter(t=>t.tagName!=="A")}const Yh=W({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,r=t,{primitiveElement:o,currentElement:i}=Qe(),s=U(null),a=Tw(),l=Tn({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});vt(c=>{if(!kr)return;const d=i.value;if(!n.trapped)return;function p(w){if(l.paused||!d)return;const S=w.target;d.contains(S)?s.value=S:gr(s.value,{select:!0})}function h(w){if(l.paused||!d)return;const S=w.relatedTarget;S!==null&&(d.contains(S)||gr(s.value,{select:!0}))}function v(w){d.contains(s.value)||gr(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const b=new MutationObserver(v);d&&b.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),b.disconnect()})}),vt(async c=>{const d=i.value;if(await Ke(),!d)return;a.add(l);const p=document.activeElement;if(!d.contains(p)){const h=new CustomEvent(ml,Ld);d.addEventListener(ml,v=>r("mountAutoFocus",v)),d.dispatchEvent(h),h.defaultPrevented||(Is(Ow(lc(d)),{select:!0}),document.activeElement===p&&gr(d))}c(()=>{d.removeEventListener(ml,b=>r("mountAutoFocus",b));const h=new CustomEvent(gl,Ld),v=b=>{r("unmountAutoFocus",b)};d.addEventListener(gl,v),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||gr(p??document.body,{select:!0}),d.removeEventListener(gl,v),a.remove(l)},0)})});function u(c){if(!n.loop&&!n.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=document.activeElement;if(d&&p){const h=c.currentTarget,[v,b]=xw(h);v&&b?!c.shiftKey&&p===b?(c.preventDefault(),n.loop&&gr(v,{select:!0})):c.shiftKey&&p===v&&(c.preventDefault(),n.loop&&gr(b,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:o,tabindex:"-1","as-child":n.asChild,as:n.as,onKeydown:u},{default:B(()=>[X(c.$slots,"default")]),_:3},8,["as-child","as"]))}});function Aw(e){return e?"open":"closed"}const Xh=W({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),{primitiveElement:i,currentElement:s}=Qe();return Ue(()=>{o.contentElement=s}),(a,l)=>(D(),j(f(Yh),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>r("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>r("closeAutoFocus",u))},{default:B(()=>[K(f(Da),ce({id:f(o).contentId,ref_key:"primitiveElement",ref:i,as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(o).descriptionId,"aria-labelledby":f(o).titleId,"data-state":f(Aw)(f(o).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(o).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>r("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>r("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>r("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>r("pointerDownOutside",u))}),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Iw=W({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),i=uo(r),{primitiveElement:s,currentElement:a}=Qe();return sc(a),(l,u)=>(D(),j(Xh,ce({ref_key:"primitiveElement",ref:s},{...n,...f(i)},{"trap-focus":f(o).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(c.preventDefault(),(d=f(o).triggerElement.value)==null||d.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()}),onOpenAutoFocus:u[3]||(u[3]=c=>r("openAutoFocus",c))}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),kw=W({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=uo(r),i=$n(),s=U(!1),a=U(!1);return(l,u)=>(D(),j(Xh,ce({...n,...f(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(s.value||(d=f(i).triggerElement.value)==null||d.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var d;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(d=f(i).triggerElement.value)!=null&&d.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:B(()=>[X(l.$slots,"default")]),_:3},16))}}),Pw=W({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=$n(),i=uo(r);return(s,a)=>(D(),j(f(Pr),{present:s.forceMount||f(o).open.value},{default:B(()=>[f(o).modal.value?(D(),j(Iw,ce({key:0},{...n,...f(i),...s.$attrs},{onOpenAutoFocus:a[0]||(a[0]=l=>r("openAutoFocus",l))}),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):(D(),j(kw,ft(ce({key:1},{...n,...f(i),...s.$attrs})),{default:B(()=>[X(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Bw=W({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=$n();return oc(!0),(n,r)=>(D(),j(f(Be),{as:n.as,"as-child":n.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:B(()=>[X(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$w=W({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=$n();return(n,r)=>{var o;return(o=f(t))!=null&&o.modal.value?(D(),j(f(Pr),{key:0,present:n.forceMount||f(t).open.value},{default:B(()=>[K(Bw,ce({as:n.as,"as-child":n.asChild},n.$attrs),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):pt("",!0)}}}),Zh=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{type:r.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>f(n).onOpenChange(!1))}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["type"]))}}),Mw=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).titleId}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),Dw=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e,n=$n();return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).descriptionId}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),[Qh,Rw]=Tt("PopperRoot"),uc=W({__name:"PopperRoot",setup(e){const t=U();return Rw({anchor:t,onAnchorChange:n=>t.value=n}),(n,r)=>X(n.$slots,"default")}}),Jh=W({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),o=Qh();return ye(r,()=>{o.onAnchorChange(t.element??r.value)}),(i,s)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:n,as:i.as,"as-child":i.asChild},{default:B(()=>[X(i.$slots,"default")]),_:3},8,["as","as-child"]))}});function Lw(e){return e!==null}function Fw(e){return{name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:s,middlewareData:a}=t,l=((n=a.arrow)==null?void 0:n.centerOffset)!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,p]=ru(i),h={start:"0%",center:"50%",end:"100%"}[p],v=(((r=a.arrow)==null?void 0:r.x)??0)+u/2,b=(((o=a.arrow)==null?void 0:o.y)??0)+c/2;let w="",S="";return d==="bottom"?(w=l?h:`${v}px`,S=`${-c}px`):d==="top"?(w=l?h:`${v}px`,S=`${s.floating.height+c}px`):d==="right"?(w=`${-c}px`,S=l?h:`${b}px`):d==="left"&&(w=`${s.floating.width+c}px`,S=l?h:`${b}px`),{data:{x:w,y:S}}}}}function ru(e){const[t,n="center"]=e.split("-");return[t,n]}const Nw={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[MP,Vw]=Tt("PopperContent"),Xs=W({inheritAttrs:!1,__name:"PopperContent",props:m0({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Nw}),setup(e,{expose:t}){const n=e,r=Qh(),o=tr(),{primitiveElement:i,currentElement:s}=Qe(),a=U(),l=U(),{width:u,height:c}=dw(l),d=q(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=q(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),h=q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),v=q(()=>({padding:p.value,boundary:h.value.filter(Lw),altBoundary:h.value.length>0})),b=N1(()=>[h1({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.avoidCollisions&&m1({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?g1():void 0,...v.value}),!n.prioritizePosition&&n.avoidCollisions&&d1({...v.value}),v1({...v.value,apply:({elements:y,rects:A,availableWidth:x,availableHeight:C})=>{const{width:k,height:O}=A.reference,E=y.floating.style;Object.assign(y.floating.style,{maxWidth:`${x}px`,maxHeight:`${C}px`}),E.setProperty("--radix-popper-available-width",`${x}px`),E.setProperty("--radix-popper-available-height",`${C}px`),E.setProperty("--radix-popper-anchor-width",`${k}px`),E.setProperty("--radix-popper-anchor-height",`${O}px`)}}),l.value&&L1({element:l.value,padding:n.arrowPadding}),Fw({arrowWidth:u.value,arrowHeight:c.value}),n.hideWhenDetached&&f1({strategy:"referenceHidden",...v.value})]),{floatingStyles:w,placement:S,isPositioned:_,middlewareData:I}=F1(r.anchor,a,{strategy:"fixed",placement:d,whileElementsMounted:(...y)=>D1(...y,{animationFrame:n.updatePositionStrategy==="always"}),middleware:b}),F=q(()=>ru(S.value)[0]),V=q(()=>ru(S.value)[1]);vt(()=>{var y;_.value&&((y=n.onPlaced)==null||y.call(n))});const N=q(()=>{var y;return((y=I.value.arrow)==null?void 0:y.centerOffset)!==0}),H=U("");vt(()=>{s.value&&(H.value=window.getComputedStyle(s.value).zIndex)});const m=q(()=>{var y;return((y=I.value.arrow)==null?void 0:y.x)??0}),g=q(()=>{var y;return((y=I.value.arrow)==null?void 0:y.y)??0});return Vw({placedSide:F,onArrowChange:y=>l.value=y,arrowX:m,arrowY:g,shouldHideArrow:N}),t({$el:s}),(y,A)=>{var x,C,k;return D(),Te("div",{ref_key:"floatingRef",ref:a,"data-radix-popper-content-wrapper":"",style:qt({...f(w),transform:f(_)?f(w).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H.value,"--radix-popper-transform-origin":[(x=f(I).transformOrigin)==null?void 0:x.x,(C=f(I).transformOrigin)==null?void 0:C.y].join(" ")})},[K(f(Be),ce({ref:O=>{f(o)(O),i.value=O}},y.$attrs,{"as-child":n.asChild,as:y.as,"data-side":F.value,"data-align":V.value,style:{animation:f(_)?void 0:"none",opacity:(k=f(I).hide)!=null&&k.referenceHidden?0:void 0}}),{default:B(()=>[X(y.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Ra=W({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return(t,n)=>(D(),j(f(Be),{as:t.as,"as-child":t.asChild,style:qt({position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"})},{default:B(()=>[X(t.$slots,"default")]),_:3},8,["as","as-child","style"]))}}),zw=W({__name:"VisuallyHiddenInput",props:{name:{},value:{},required:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=q(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,o)=>typeof r=="object"?Object.entries(r).map(([i,s])=>({name:`[${o}][${t.name}][${i}]`,value:s})):{name:`[${t.name}][${o}]`,value:r}):typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,o])=>({name:`[${t.name}][${r}]`,value:o})):[]);return(r,o)=>(D(!0),Te(qe,null,Qr(n.value,i=>(D(),j(Ra,{key:i.name,as:"input",type:"hidden",hidden:"",readonly:"",name:i.name,value:i.value,required:r.required,disabled:r.disabled},null,8,["name","value","required","disabled"]))),128))}});function Hw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jw=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const ci=Hw(jw),Uw="data-radix-vue-collection-item",[cc,Ww]=Tt("CollectionProvider");function Gw(e=Uw){const t=U(new Map),n=U(),r=Ww({collectionRef:n,itemMap:t,attrName:e}),{getItems:o}=Yw(r),i=q(()=>Array.from(r.itemMap.value.values())),s=q(()=>r.itemMap.value.size);return{getItems:o,reactiveItems:i,itemMapSize:s}}const Kw=W({name:"CollectionSlot",setup(e,{slots:t}){const n=cc(),{primitiveElement:r,currentElement:o}=Qe();return ye(o,()=>{n.collectionRef.value=o.value}),()=>On(Ma,{ref:r},t)}}),qw=W({name:"CollectionItem",setup(e,{slots:t,attrs:n}){const r=cc(),{primitiveElement:o,currentElement:i}=Qe(),s=Rt();return vt(a=>{var l;if(i.value){const u=$o(i.value);r.itemMap.value.set(u,{ref:i.value,...$o(((l=s==null?void 0:s.parent)==null?void 0:l.props)??{})}),a(()=>r.itemMap.value.delete(u))}}),()=>On(Ma,{...n,[r.attrName]:"",ref:o},t)}});function Yw(e){const t=e??cc();return{getItems:()=>{const n=t.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${t.attrName}]`));return Array.from(t.itemMap.value.values()).sort((o,i)=>r.indexOf(o.ref)-r.indexOf(i.ref))}}}const[Ho,Xw]=Tt("ComboboxRoot"),Zw=W({__name:"ComboboxRoot",props:{modelValue:{},defaultValue:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},searchTerm:{},multiple:{type:Boolean},disabled:{type:Boolean},name:{},dir:{},filterFunction:{},displayValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue","update:open","update:searchTerm"],setup(e,{emit:t}){const n=e,r=t,{multiple:o,disabled:i,dir:s}=on(n),a=Wh(s),l=Yr(n,"searchTerm",r,{defaultValue:"",passive:n.searchTerm===void 0}),u=Yr(n,"modelValue",r,{defaultValue:n.defaultValue??o.value?[]:void 0,passive:n.modelValue===void 0,deep:!0}),c=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),d=U();async function p(C){var k,O;c.value=C,await Ke(),C?(u.value&&(Array.isArray(u.value)&&o.value?d.value=(k=I().find(E=>{var M,$;return(($=(M=E.ref)==null?void 0:M.dataset)==null?void 0:$.state)==="checked"}))==null?void 0:k.value:d.value=u.value),(O=b.value)==null||O.focus(),x()):(v.value=!1,m())}function h(C){if(Array.isArray(u.value)&&o.value){const k=u.value.findIndex(O=>ci(O,C));k===-1?u.value.push(C):u.value.splice(k,1)}else u.value=C,p(!1)}const v=U(!1),b=U(),w=U(),{primitiveElement:S,currentElement:_}=Qe(),{getItems:I,reactiveItems:F,itemMapSize:V}=Gw("data-radix-vue-combobox-item"),N=zh(()=>V.value,()=>I().map(C=>C.value)),H=q(()=>{if(v.value){if(n.filterFunction)return n.filterFunction(N.value,l.value);if(typeof N.value[0]=="string")return N.value.filter(C=>{var k;return C.toLowerCase().includes((k=l.value)==null?void 0:k.toLowerCase())})}return N.value});function m(){!o.value&&u.value?n.displayValue?l.value=n.displayValue(u.value):typeof u.value!="object"?l.value=u.value.toString():l.value="":l.value=""}const g=q(()=>H.value.findIndex(C=>ci(C,d.value))),y=q(()=>{var C;return(C=F.value.find(k=>k.value===d.value))==null?void 0:C.ref});ye(u,async()=>{await Ke(),m()},{immediate:!0}),ye(()=>H.value.length,async C=>{await Ke(),await Ke(),C&&g.value===-1&&(d.value=H.value[0])});const A=iw(_);function x(){y.value instanceof Element&&y.value.scrollIntoView({block:"nearest"})}return Xw({searchTerm:l,modelValue:u,onValueChange:h,isUserInputted:v,multiple:o,disabled:i,open:c,onOpenChange:p,filteredOptions:H,contentId:Wn(),inputElement:b,onInputElementChange:C=>b.value=C,onInputNavigation:async C=>{const k=g.value;k===0&&C==="up"||k===H.value.length-1&&C==="down"||(k===-1&&H.value.length||C==="home"?d.value=H.value[0]:C==="end"?d.value=H.value[H.value.length-1]:d.value=H.value[C==="up"?k-1:k+1],x())},onInputEnter:async()=>{var C;H.value.length&&d.value&&y.value instanceof Element&&((C=y.value)==null||C.click())},selectedValue:d,onSelectedValueChange:C=>d.value=C,parentElement:_,contentElement:w,onContentElementChange:C=>w.value=C}),(C,k)=>(D(),j(f(uc),null,{default:B(()=>[K(f(Be),ce({ref_key:"primitiveElement",ref:S,style:{pointerEvents:f(c)?"auto":void 0},as:C.as,"as-child":C.asChild,dir:f(a)},C.$attrs),{default:B(()=>[X(C.$slots,"default",{activeIndex:g.value,open:f(c),value:f(u)}),f(A)&&n.name?(D(),j(f(zw),{key:0,name:n.name,value:f(u)},null,8,["name","value"])):pt("",!0)]),_:3},16,["style","as","as-child","dir"])]),_:3}))}}),Qw=W({__name:"ComboboxInput",props:{type:{default:"text"},disabled:{type:Boolean},autoFocus:{type:Boolean},asChild:{type:Boolean},as:{default:"input"}},setup(e){const t=e,n=Ho(),{primitiveElement:r,currentElement:o}=Qe();Ue(()=>{const u=o.value.nodeName==="INPUT"?o.value:o.value.querySelector("input");u&&(n.onInputElementChange(u),setTimeout(()=>{t.autoFocus&&(u==null||u.focus())},1))});const i=q(()=>t.disabled||n.disabled.value||!1);function s(u){n.open.value?n.onInputNavigation(u.key==="ArrowUp"?"up":"down"):n.onOpenChange(!0)}function a(u){n.open.value&&n.onInputNavigation(u.key==="Home"?"home":"end")}function l(u){var c;n.searchTerm.value=(c=u.target)==null?void 0:c.value,n.open.value||n.onOpenChange(!0),n.isUserInputted.value=!0}return(u,c)=>(D(),j(f(Be),ce({ref_key:"primitiveElement",ref:r},t,{value:f(n).searchTerm.value,"aria-expanded":f(n).open.value,"aria-controls":f(n).contentId,disabled:i.value,"aria-disabled":i.value??void 0,"aria-autocomplete":"list",role:"combobox",autocomplete:"false",onInput:l,onKeydown:[ul(eo(s,["prevent"]),["down","up"]),ul(f(n).onInputEnter,["enter"]),ul(eo(a,["prevent"]),["home","end"])]}),{default:B(()=>[X(u.$slots,"default")]),_:3},16,["value","aria-expanded","aria-controls","disabled","aria-disabled","onKeydown"]))}}),[em,Jw]=Tt("ComboboxGroup"),e_=W({__name:"ComboboxGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=Wn(),r=U([]),o=Ho(),i=q(()=>!o.isUserInputted.value||r.value.length===0||o.filteredOptions.value.map(s=>JSON.stringify(s)).some(s=>r.value.map(a=>JSON.stringify(a)).includes(s)));return Jw({id:n,options:r}),(s,a)=>ba((D(),j(f(Be),ce({role:"group"},t,{"aria-labelledby":f(n)}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["aria-labelledby"])),[[ch,i.value]])}}),t_=W({__name:"ComboboxLabel",props:{for:{},asChild:{type:Boolean},as:{default:"div"}},setup(e){const t=e,n=em({id:""});return(r,o)=>(D(),j(f(Be),ce(t,{id:f(n).id}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),[DP,n_]=Tt("ComboboxContent"),r_=W({__name:"ComboboxContentImpl",props:{position:{default:"inline"},bodyLock:{type:Boolean},dismissable:{type:Boolean,default:!0},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,r=t,{position:o}=on(n),i=Ho();oc(n.bodyLock);const{primitiveElement:s,currentElement:a}=Qe();sc(a);const l=q(()=>n.position==="popper"?n:{}),u=ic(l.value);function c(p){i.onSelectedValueChange("")}Ue(()=>{i.onContentElementChange(a.value)});const d={boxSizing:"border-box","--radix-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-combobox-content-available-width":"var(--radix-popper-available-width)","--radix-combobox-content-available-height":"var(--radix-popper-available-height)","--radix-combobox-trigger-width":"var(--radix-popper-anchor-width)","--radix-combobox-trigger-height":"var(--radix-popper-anchor-height)"};return n_({position:o}),(p,h)=>(D(),j(f(Kw),null,{default:B(()=>[p.dismissable?(D(),j(f(Da),{key:0,"as-child":"","disable-outside-pointer-events":p.disableOutsidePointerEvents,onDismiss:h[0]||(h[0]=v=>f(i).onOpenChange(!1)),onFocusOutside:h[1]||(h[1]=v=>{var b;(b=f(i).parentElement.value)!=null&&b.contains(v.target)&&v.preventDefault(),r("focusOutside",v)}),onInteractOutside:h[2]||(h[2]=v=>r("interactOutside",v)),onEscapeKeyDown:h[3]||(h[3]=v=>r("escapeKeyDown",v)),onPointerDownOutside:h[4]||(h[4]=v=>{var b;(b=f(i).parentElement.value)!=null&&b.contains(v.target)&&v.preventDefault(),r("pointerDownOutside",v)})},{default:B(()=>[(D(),j(qn(f(o)==="popper"?f(Xs):f(Be)),ce({...p.$attrs,...f(u)},{id:f(i).contentId,ref_key:"primitiveElement",ref:s,role:"listbox","data-state":f(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...f(o)==="popper"?d:{}},onPointerleave:c}),{default:B(()=>[X(p.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3},8,["disable-outside-pointer-events"])):(D(),j(qn(f(o)==="popper"?f(Xs):f(Be)),ce({key:1},{...p.$attrs,...l.value},{id:f(i).contentId,ref_key:"primitiveElement",ref:s,role:"listbox","data-state":f(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...f(o)==="popper"?d:{}},onPointerleave:c}),{default:B(()=>[X(p.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3}))}}),o_=W({__name:"ComboboxContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},dismissable:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=sn(e,t),r=Ho();return(o,i)=>(D(),j(f(Pr),{present:o.forceMount||f(r).open.value},{default:B(()=>[K(r_,ft(Ct({...f(n),...o.$attrs})),{default:B(()=>[X(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),i_=W({__name:"ComboboxEmpty",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=Ho(),r=q(()=>n.searchTerm.value&&n.filteredOptions.value.length===0);return(o,i)=>r.value?(D(),j(f(Be),ft(ce({key:0},t)),{default:B(()=>[X(o.$slots,"default",{},()=>[Re("No options")])]),_:3},16)):pt("",!0)}}),[RP,s_]=Tt("ComboboxItem"),a_="combobox.select",l_=W({__name:"ComboboxItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{disabled:o}=on(n),i=Ho(),s=em({id:"",options:U([])}),{primitiveElement:a,currentElement:l}=Qe(),u=q(()=>{var S,_;return i.multiple.value&&Array.isArray(i.modelValue.value)?(S=i.modelValue.value)==null?void 0:S.includes(n.value):ci((_=i.modelValue)==null?void 0:_.value,n.value)}),c=q(()=>ci(i.selectedValue.value,n.value)),d=U(n.textValue??""),p=Wn(),h=q(()=>i.isUserInputted.value?i.searchTerm.value===""||!!i.filteredOptions.value.find(S=>ci(S,n.value)):!0);async function v(S){r("select",S),!(S!=null&&S.defaultPrevented)&&!o.value&&S&&i.onValueChange(n.value)}function b(S){if(!S)return;const _={originalEvent:S,value:n.value};ec(a_,v,_)}async function w(S){await Ke(),!S.defaultPrevented&&i.onSelectedValueChange(n.value)}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Ue(()=>{var S,_,I,F;(_=(S=s.options)==null?void 0:S.value)!=null&&_.includes(n.value)||(I=s.options)==null||I.value.push(n.value),!d.value&&(F=l.value)!=null&&F.textContent&&(d.value=l.value.textContent)}),s_({isSelected:u}),(S,_)=>(D(),j(f(qw),null,{default:B(()=>[ba(K(f(Be),{ref_key:"primitiveElement",ref:a,role:"option",tabindex:"-1","aria-labelledby":f(p),"data-highlighted":c.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":f(o)||void 0,"data-disabled":f(o)?"":void 0,as:S.as,"as-child":S.asChild,onClick:b,onPointermove:w},{default:B(()=>[X(S.$slots,"default",{},()=>[Re(it(S.value),1)])]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","as","as-child"]),[[ch,h.value]])]),_:3}))}}),u_=W({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ce(t,{onMousedown:r[0]||(r[0]=o=>{!o.defaultPrevented&&o.detail>1&&o.preventDefault()})}),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),[qi,c_]=Tt("PopoverRoot"),d_=W({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,{modal:o}=on(n),i=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=U(),a=U(!1);return c_({contentId:Wn(),modal:o,open:i,onOpenChange:l=>{i.value=l},onOpenToggle:()=>{i.value=!i.value},triggerElement:s,hasCustomAnchor:a}),(l,u)=>(D(),j(f(uc),null,{default:B(()=>[X(l.$slots,"default")]),_:3}))}}),f_=W({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e,{expose:t}){const n=e,r=qi(),{primitiveElement:o,currentElement:i}=Qe();return Ue(()=>{r.triggerElement.value=i.value}),t({$el:i}),(s,a)=>(D(),j(qn(f(r).hasCustomAnchor.value?f(Be):f(Jh)),{"as-child":""},{default:B(()=>[K(f(Be),{ref_key:"primitiveElement",ref:o,type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(r).open.value,"aria-controls":f(r).contentId,"data-state":f(r).open.value?"open":"closed",as:s.as,"as-child":n.asChild,onClick:f(r).onOpenToggle},{default:B(()=>[X(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),p_=W({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),tm=W({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=ic(n),i=qi();return ow(),(s,a)=>(D(),j(f(Yh),{"as-child":"",loop:"",trapped:s.trapFocus,onMountAutoFocus:a[5]||(a[5]=l=>r("openAutoFocus",l)),onUnmountAutoFocus:a[6]||(a[6]=l=>r("closeAutoFocus",l))},{default:B(()=>[K(f(Da),{"as-child":"","disable-outside-pointer-events":s.disableOutsidePointerEvents,onPointerDownOutside:a[0]||(a[0]=l=>r("pointerDownOutside",l)),onInteractOutside:a[1]||(a[1]=l=>r("interactOutside",l)),onEscapeKeyDown:a[2]||(a[2]=l=>r("escapeKeyDown",l)),onFocusOutside:a[3]||(a[3]=l=>r("focusOutside",l)),onDismiss:a[4]||(a[4]=l=>f(i).onOpenChange(!1))},{default:B(()=>[K(f(Xs),ce(f(o),{id:f(i).contentId,"data-state":f(i).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["id","data-state","style"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),h_=W({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=U(!1);oc(!0);const s=sn(n,r),{primitiveElement:a,currentElement:l}=Qe();return sc(l),(u,c)=>(D(),j(tm,ce({ref_key:"primitiveElement",ref:a},f(s),{"trap-focus":f(o).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=eo(d=>{var p;r("closeAutoFocus",d),i.value||(p=f(o).triggerElement.value)==null||p.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=d=>{r("pointerDownOutside",d);const p=d.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0,v=p.button===2||h;i.value=v}),onFocusOutside:c[2]||(c[2]=eo(()=>{},["prevent"]))}),{default:B(()=>[X(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),m_=W({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=U(!1),s=U(!1),a=sn(n,r);return(l,u)=>(D(),j(tm,ce(f(a),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;r("closeAutoFocus",c),c.defaultPrevented||(i.value||(d=f(o).triggerElement.value)==null||d.focus(),c.preventDefault()),i.value=!1,s.value=!1}),onInteractOutside:u[1]||(u[1]=async c=>{var d;r("interactOutside",c),c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const p=c.target;(d=f(o).triggerElement.value)!=null&&d.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:B(()=>[X(l.$slots,"default")]),_:3},16))}}),g_=W({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,o=qi(),i=sn(n,r);return(s,a)=>(D(),j(f(Pr),{present:s.forceMount||f(o).open.value},{default:B(()=>[f(o).modal.value?(D(),j(h_,ft(ce({key:0},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):(D(),j(m_,ft(ce({key:1},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),[an,v_]=Tt("ScrollAreaRoot"),y_=W({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),o=U(0),i=U(0),s=U(),a=U(),l=U(),u=U(),c=U(!1),d=U(!1),{type:p,dir:h,scrollHideDelay:v}=on(t),b=Wh(h);return v_({type:p,dir:b,scrollHideDelay:v,scrollArea:r,viewport:s,onViewportChange:w=>{s.value=w||void 0},content:a,onContentChange:w=>{a.value=w},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:d,onScrollbarXChange:w=>{l.value=w||void 0},onScrollbarYChange:w=>{u.value=w||void 0},onScrollbarXEnabledChange:w=>{c.value=w},onScrollbarYEnabledChange:w=>{d.value=w},onCornerWidthChange:w=>{o.value=w},onCornerHeightChange:w=>{i.value=w}}),(w,S)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:n,"as-child":t.asChild,as:w.as,dir:f(b),style:qt({position:"relative","--radix-scroll-area-corner-width":`${o.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:B(()=>[X(w.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),b_=W({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),{primitiveElement:r,currentElement:o}=Qe(),i=U();return Ue(()=>{n.onViewportChange(i.value),n.onContentChange(o.value)}),(s,a)=>(D(),Te(qe,null,[Se("div",ce({ref_key:"viewportElement",ref:i,"data-radix-scroll-area-viewport":"",style:{overflowX:f(n).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(n).scrollbarYEnabled.value?"scroll":"hidden"}},s.$attrs,{tabindex:0}),[K(f(Be),{ref_key:"primitiveElement",ref:r,style:{minWidth:"100%",display:"table"},"as-child":t.asChild,as:s.as},{default:B(()=>[X(s.$slots,"default")]),_:3},8,["as-child","as"])],16),K(f(Be),{as:"style"},{default:B(()=>[Re(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1})],64))}});function w_(e,[t,n]){return Math.min(n,Math.max(t,e))}function nm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function La(e){const t=rm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function rm(e,t){const n=e/t;return Number.isNaN(n)?0:n}function __(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)}function Vd(e,t,n="ltr"){const r=La(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,s]:[s*-1,0],u=w_(e,l);return nm([0,s],[0,a])(u)}function ds(e){return e?Number.parseInt(e,10):0}function x_(e,t,n,r="ltr"){const o=La(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return nm([l,u],d)(e)}function zd(e,t){return e>0&&e{document.addEventListener("wheel",w,{passive:!1})}),Bn(()=>{document.removeEventListener("wheel",w)});function S(){var _,I,F,V,N;l.value&&(n.isHorizontal?i.handleSizeChange({content:((_=o.viewport.value)==null?void 0:_.scrollWidth)??0,viewport:((I=o.viewport.value)==null?void 0:I.offsetWidth)??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:ds(getComputedStyle(l.value).paddingLeft),paddingEnd:ds(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:((F=o.viewport.value)==null?void 0:F.scrollHeight)??0,viewport:((V=o.viewport.value)==null?void 0:V.offsetHeight)??0,scrollbar:{size:((N=l.value)==null?void 0:N.clientHeight)??0,paddingStart:ds(getComputedStyle(l.value).paddingLeft),paddingEnd:ds(getComputedStyle(l.value).paddingRight)}}))}return Do(l,S),Do(o.content,S),(_,I)=>(D(),j(f(Be),{ref:F=>{f(u)(F),a.value=F},style:{position:"absolute"},"data-scrollbarimpl":"",as:f(s).as.value,"as-child":f(s).asChild.value,onPointerdown:h,onPointermove:v,onPointerup:b},{default:B(()=>[X(_.$slots,"default")]),_:3},8,["as","as-child"]))}}),E_=W({__name:"ScrollAreaScrollbarX",setup(e){const t=an(),n=Fa(),{primitiveElement:r,currentElement:o}=Qe(),i=tr();Ue(()=>{o.value&&t.onScrollbarXChange(o.value)});const s=q(()=>n.sizes.value);return(a,l)=>(D(),j(om,{ref:u=>{f(i)(u),r.value=u},"is-horizontal":!0,"data-orientation":"horizontal",style:qt({bottom:0,left:f(t).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${f(La)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>f(n).onDragScroll(u.x))},{default:B(()=>[X(a.$slots,"default")]),_:3},8,["style"]))}}),S_=W({__name:"ScrollAreaScrollbarY",setup(e){const t=an(),n=Fa(),{primitiveElement:r,currentElement:o}=Qe(),i=tr();Ue(()=>{o.value&&t.onScrollbarYChange(o.value)});const s=q(()=>n.sizes.value);return(a,l)=>(D(),j(om,{ref:u=>{f(i)(u),r.value=u},"is-horizontal":!1,"data-orientation":"vertical",style:qt({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${f(La)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>f(n).onDragScroll(u.y))},{default:B(()=>[X(a.$slots,"default")]),_:3},8,["style"]))}}),[Fa,C_]=Tt("ScrollAreaScrollbarVisible"),dc=W({__name:"ScrollAreaScrollbarVisible",setup(e){const t=an(),n=Na(),r=tr(),o=U({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=q(()=>{const S=rm(o.value.viewport,o.value.content);return S>0&&S<1}),s=U(),a=U(0);function l(S,_){if(h.value){const I=t.viewport.value.scrollLeft+S.deltaY;t.viewport.value.scrollLeft=I,zd(I,_)&&S.preventDefault()}else{const I=t.viewport.value.scrollTop+S.deltaY;t.viewport.value.scrollTop=I,zd(I,_)&&S.preventDefault()}}function u(S,_){h.value?a.value=_.x:a.value=_.y}function c(S){a.value=0}function d(S){o.value=S}function p(S,_){return x_(S,a.value,o.value,_)}const h=q(()=>n.isHorizontal.value);function v(S){h.value?t.viewport.value.scrollLeft=p(S,t.dir.value):t.viewport.value.scrollTop=p(S)}function b(){if(h.value){if(t.viewport.value&&s.value){const S=t.viewport.value.scrollLeft,_=Vd(S,o.value,t.dir.value);s.value.style.transform=`translate3d(${_}px, 0, 0)`}}else if(t.viewport.value&&s.value){const S=t.viewport.value.scrollTop,_=Vd(S,o.value);s.value.style.transform=`translate3d(0, ${_}px, 0)`}}function w(S){s.value=S}return C_({sizes:o,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:b,onThumbChange:w,onDragScroll:v}),(S,_)=>h.value?(D(),j(E_,ce({key:0},S.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(S.$slots,"default")]),_:3},16)):(D(),j(S_,ce({key:1},S.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(S.$slots,"default")]),_:3},16))}}),im=W({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=Na(),r=tr(),o=U(!1),i=Hh(()=>{if(t.viewport.value){const s=t.viewport.value.offsetWidthi()),Do(t.viewport,i),Do(t.content,i),(s,a)=>(D(),j(f(Pr),{present:s.forceMount||o.value},{default:B(()=>[K(dc,ce(s.$attrs,{ref_key:"forwardRef",ref:r,"data-state":o.value?"visible":"hidden"}),{default:B(()=>[X(s.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),T_=W({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=tr();let r;const o=U(!1);function i(){window.clearTimeout(r),o.value=!0}function s(){r=window.setTimeout(()=>{o.value=!1},t.scrollHideDelay.value)}return Ue(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",s))}),Bn(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(r),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",s))}),(a,l)=>(D(),j(f(Pr),{present:a.forceMount||o.value},{default:B(()=>[K(im,ce(a.$attrs,{ref_key:"forwardRef",ref:n,"data-state":o.value?"visible":"hidden"}),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),O_=W({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(e){const t=an(),n=Na(),r=tr(),{state:o,dispatch:i}=Kh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});vt(()=>{o.value==="idle"&&window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value)});const s=Hh(()=>i("SCROLL_END"),100);return vt(()=>{const a=t.viewport.value,l=n.isHorizontal.value?"scrollLeft":"scrollTop";if(a){let u=a[l];const c=()=>{const d=a[l];u!==d&&(i("SCROLL"),s()),u=d};a.addEventListener("scroll",c)}}),(a,l)=>(D(),j(f(Pr),{present:a.forceMount||f(o)!=="hidden"},{default:B(()=>[K(dc,ce(a.$attrs,{ref_key:"forwardRef",ref:r}),{default:B(()=>[X(a.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Na,A_]=Tt("ScrollAreaScrollbar"),I_=W({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(e){const t=e,n=an(),r=q(()=>t.orientation==="horizontal");ye(r,()=>{r.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Bn(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:o,forceMount:i,asChild:s,as:a}=on(t);return A_({orientation:o,forceMount:i,isHorizontal:r,as:a,asChild:s}),(l,u)=>f(n).type.value==="hover"?(D(),j(T_,ce({key:0},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(D(),j(O_,ce({key:1},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(D(),j(im,ce({key:2},l.$attrs,{"force-mount":f(i)}),{default:B(()=>[X(l.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(D(),j(dc,ce({key:3},l.$attrs,{"data-state":"visible"}),{default:B(()=>[X(l.$slots,"default")]),_:3},16)):pt("",!0)}}),k_=W({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),r=Fa();function o(p){const h=p.target.getBoundingClientRect(),v=p.clientX-h.left,b=p.clientY-h.top;r.handleThumbDown(p,{x:v,y:b})}function i(p){r.handleThumbUp(p)}const{primitiveElement:s,currentElement:a}=Qe(),l=U(),u=q(()=>n.viewport.value);function c(){if(!l.value){const p=__(u.value,r.onThumbPositionChange);l.value=p,r.onThumbPositionChange()}}const d=q(()=>r.sizes.value);return K1(d,()=>{r.onThumbChange(a.value),u.value&&(r.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Bn(()=>{var p;u.value.removeEventListener("scroll",c),(p=n.viewport.value)==null||p.removeEventListener("scroll",c)}),(p,h)=>(D(),j(f(Be),{ref_key:"primitiveElement",ref:s,"data-state":f(r).hasThumb?"visible":"hidden",style:qt({width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"}),"as-child":t.asChild,as:p.as,onPointerdown:o,onPointerup:i},{default:B(()=>[X(p.$slots,"default")]),_:3},8,["data-state","style","as-child","as"]))}}),P_=W({__name:"ScrollAreaCornerImpl",setup(e){const t=an(),n=U(0),r=U(0),o=q(()=>!!n.value&&!!r.value);function i(){var a;const l=((a=t.scrollbarX.value)==null?void 0:a.offsetHeight)||0;t.onCornerHeightChange(l),r.value=l}function s(){var a;const l=((a=t.scrollbarY.value)==null?void 0:a.offsetWidth)||0;t.onCornerWidthChange(l),n.value=l}return Do(t.scrollbarX.value,i),Do(t.scrollbarY.value,s),ye(()=>t.scrollbarX.value,i),ye(()=>t.scrollbarY.value,s),(a,l)=>{var u;return o.value?(D(),j(f(Be),ce({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},(u=a.$parent)==null?void 0:u.$props),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["style"])):pt("",!0)}}}),B_=W({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=an(),r=q(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),o=q(()=>n.type.value!=="scroll"&&r.value);return(i,s)=>o.value?(D(),j(P_,ft(ce({key:0},t)),{default:B(()=>[X(i.$slots,"default")]),_:3},16)):pt("",!0)}}),$_=W({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e,n=["horizontal","vertical"];function r(a){return n.includes(a)}const o=q(()=>r(t.orientation)?t.orientation:"horizontal"),i=q(()=>o.value==="vertical"?t.orientation:void 0),s=q(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(D(),j(f(Be),ce({as:a.as,"as-child":a.asChild,"data-orientation":o.value},s.value),{default:B(()=>[X(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),M_=W({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j($_,ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),[Va,D_]=Tt("ToastProvider"),R_=W({__name:"ToastProvider",props:{label:{default:"Notification"},duration:{default:5e3},swipeDirection:{default:"right"},swipeThreshold:{default:50}},setup(e){const t=e,{label:n,duration:r,swipeDirection:o,swipeThreshold:i}=on(t),s=U(),a=U(0),l=U(!1),u=U(!1);if(t.label&&typeof t.label=="string"&&!t.label.trim()){const c="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw new Error(c)}return D_({label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:a,viewport:s,onViewportChange(c){s.value=c},onToastAdd(){a.value++},onToastRemove(){a.value--},isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:u}),(c,d)=>X(c.$slots,"default")}}),L_="toast.swipeStart",F_="toast.swipeMove",N_="toast.swipeCancel",V_="toast.swipeEnd",z_=["F8"],ou="toast.viewportPause",iu="toast.viewportResume";function fs(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function Hd(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function H_(e){return e.nodeType===e.ELEMENT_NODE}function sm(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),H_(n)){const r=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!r)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...sm(n))}}),t}const j_=W({__name:"ToastAnnounce",setup(e){const t=Va(),n=G1(1e3),r=U(!1);return X1(()=>{r.value=!0}),(o,i)=>f(n)||r.value?(D(),j(f(Ra),{key:0},{default:B(()=>[Re(it(f(t).label.value)+" ",1),X(o.$slots,"default")]),_:3})):pt("",!0)}}),[U_,W_]=Tt("ToastRoot"),G_=W({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(e,{emit:t}){const n=e,r=t,o=tr(),{primitiveElement:i,currentElement:s}=Qe(),a=Va(),l=U(null),u=U(null),c=q(()=>n.duration||a.duration.value),d=U(0),p=U(c.value),h=U(0);function v(S){!S||S===Number.POSITIVE_INFINITY||(window.clearTimeout(h.value),d.value=new Date().getTime(),h.value=window.setTimeout(b,S))}function b(){var S,_;(S=s.value)!=null&&S.contains(document.activeElement)&&((_=a.viewport.value)==null||_.focus()),r("close")}const w=q(()=>s.value?sm(s.value):null);if(n.type&&!["foreground","background"].includes(n.type)){const S="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(S)}return vt(S=>{const _=a.viewport.value;if(_){const I=()=>{v(p.value),r("resume")},F=()=>{const V=new Date().getTime()-d.value;p.value=p.value-V,window.clearTimeout(h.value),r("pause")};return _.addEventListener(ou,F),_.addEventListener(iu,I),()=>{_.removeEventListener(ou,F),_.removeEventListener(iu,I)}}}),vt(()=>{n.open&&!a.isClosePausedRef.value&&v(c.value)}),nc("Escape",S=>{r("escapeKeyDown",S),S.defaultPrevented||(a.isFocusedToastEscapeKeyDownRef.value=!0,b())}),Ue(()=>{a.onToastAdd()}),Bn(()=>{a.onToastRemove()}),W_({onClose:b}),(S,_)=>(D(),Te(qe,null,[w.value?(D(),j(j_,{key:0,role:"status","aria-live":S.type==="foreground"?"assertive":"polite","aria-atomic":""},{default:B(()=>[Re(it(w.value),1)]),_:1},8,["aria-live"])):pt("",!0),(D(),j(rh,{to:f(a).viewport.value},[K(f(Be),ce({ref:I=>{f(o)(I),i.value=I},role:"status","aria-live":"off","aria-atomic":"",tabindex:"0","data-radix-vue-collection-item":""},S.$attrs,{as:S.as,"as-child":S.asChild,"data-state":S.open?"open":"closed","data-swipe-direction":f(a).swipeDirection.value,style:{userSelect:"none",touchAction:"none"},onPointerdown:_[0]||(_[0]=eo(I=>{l.value={x:I.clientX,y:I.clientY}},["left"])),onPointermove:_[1]||(_[1]=I=>{if(!l.value)return;const F=I.clientX-l.value.x,V=I.clientY-l.value.y,N=!!u.value,H=["left","right"].includes(f(a).swipeDirection.value),m=["left","up"].includes(f(a).swipeDirection.value)?Math.min:Math.max,g=H?m(0,F):0,y=H?0:m(0,V),A=I.pointerType==="touch"?10:2,x={x:g,y},C={originalEvent:I,delta:x};N?(u.value=x,f(fs)(f(F_),k=>r("swipeMove",k),C)):f(Hd)(x,f(a).swipeDirection.value,A)?(u.value=x,f(fs)(f(L_),k=>r("swipeStart",k),C),I.target.setPointerCapture(I.pointerId)):(Math.abs(F)>A||Math.abs(V)>A)&&(l.value=null)}),onPointerup:_[2]||(_[2]=I=>{const F=u.value,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),u.value=null,l.value=null,F){const N=I.currentTarget,H={originalEvent:I,delta:F};f(Hd)(F,f(a).swipeDirection.value,f(a).swipeThreshold.value)?f(fs)(f(V_),m=>r("swipeEnd",m),H):f(fs)(f(N_),m=>r("swipeCancel",m),H),N==null||N.addEventListener("click",m=>m.preventDefault(),{once:!0})}})}),{default:B(()=>[X(S.$slots,"default")]),_:3},16,["as","as-child","data-state","data-swipe-direction"])],8,["to"]))],64))}}),K_=W({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:"foreground"},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{emit:t}){const n=e,r=t,o=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return(i,s)=>(D(),j(f(Pr),{present:i.forceMount||f(o)},{default:B(()=>[K(G_,ce({open:f(o),type:i.type,as:i.as,"as-child":i.asChild,duration:i.duration},i.$attrs,{onClose:s[0]||(s[0]=a=>o.value=!1),onPause:s[1]||(s[1]=a=>r("pause")),onResume:s[2]||(s[2]=a=>r("resume")),onEscapeKeyDown:s[3]||(s[3]=a=>r("escapeKeyDown",a)),onSwipeStart:s[4]||(s[4]=a=>{r("swipeStart",a),a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:s[5]||(s[5]=a=>{const{x:l,y:u}=a.detail.delta,c=a.currentTarget;c.setAttribute("data-swipe","move"),c.style.setProperty("--radix-toast-swipe-move-x",`${l}px`),c.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:s[6]||(s[6]=a=>{const l=a.currentTarget;l.setAttribute("data-swipe","cancel"),l.style.removeProperty("--radix-toast-swipe-move-x"),l.style.removeProperty("--radix-toast-swipe-move-y"),l.style.removeProperty("--radix-toast-swipe-end-x"),l.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:s[7]||(s[7]=a=>{const{x:l,y:u}=a.detail.delta,c=a.currentTarget;c.setAttribute("data-swipe","end"),c.style.removeProperty("--radix-toast-swipe-move-x"),c.style.removeProperty("--radix-toast-swipe-move-y"),c.style.setProperty("--radix-toast-swipe-end-x",`${l}px`),c.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),o.value=!1})}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["open","type","as","as-child","duration"])]),_:3},8,["present"]))}}),q_=W({__name:"ToastAnnounceExclude",props:{altText:{},asChild:{type:Boolean},as:{}},setup(e){return(t,n)=>(D(),j(f(Be),{as:t.as,"as-child":t.asChild,"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":t.altText||void 0},{default:B(()=>[X(t.$slots,"default")]),_:3},8,["as","as-child","data-radix-toast-announce-alt"]))}}),Y_=W({__name:"ToastClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=U_();return(r,o)=>(D(),j(q_,{"as-child":""},{default:B(()=>[K(f(Be),ce(t,{type:r.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>f(n).onClose())}),{default:B(()=>[X(r.$slots,"default")]),_:3},16,["type"])]),_:3}))}}),jd=W({__name:"FocusProxy",emits:["focusFromOutsideViewport"],setup(e,{emit:t}){const n=t,r=Va();return(o,i)=>(D(),j(f(Ra),{"aria-hidden":"",tabindex:"0",style:{position:"'fixed'"},onFocus:i[0]||(i[0]=s=>{var a;const l=s.relatedTarget;!((a=f(r).viewport.value)!=null&&a.contains(l))&&n("focusFromOutsideViewport")})},{default:B(()=>[X(o.$slots,"default")]),_:3}))}}),X_=W({inheritAttrs:!1,__name:"ToastViewport",props:{hotkey:{default:()=>z_},label:{default:"Notifications ({hotkey})"},asChild:{type:Boolean},as:{default:"ol"}},setup(e){const t=e,{hotkey:n,label:r}=on(t),{primitiveElement:o,currentElement:i}=Qe(),{createCollection:s}=rw(),a=s(i),l=Va(),u=q(()=>l.toastCount.value>0),c=U(),d=U();nc(n.value,()=>{i.value.focus()}),Ue(()=>{l.onViewportChange(i.value)}),vt(h=>{const v=i.value;if(u.value&&v){const b=()=>{if(!l.isClosePausedRef.value){const F=new CustomEvent(ou);v.dispatchEvent(F),l.isClosePausedRef.value=!0}},w=()=>{if(l.isClosePausedRef.value){const F=new CustomEvent(iu);v.dispatchEvent(F),l.isClosePausedRef.value=!1}},S=F=>{!v.contains(F.relatedTarget)&&w()},_=()=>{v.contains(document.activeElement)||w()},I=F=>{var V,N,H;const m=F.altKey||F.ctrlKey||F.metaKey;if(F.key==="Tab"&&!m){const g=document.activeElement,y=F.shiftKey;if(F.target===v&&y){(V=c.value)==null||V.focus();return}const A=p({tabbingDirection:y?"backwards":"forwards"}),x=A.findIndex(C=>C===g);Is(A.slice(x+1))?F.preventDefault():y?(N=c.value)==null||N.focus():(H=d.value)==null||H.focus()}};v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",_),v.addEventListener("keydown",I),window.addEventListener("blur",b),window.addEventListener("focus",w),h(()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",_),v.removeEventListener("keydown",I),window.removeEventListener("blur",b),window.removeEventListener("focus",w)})}});function p({tabbingDirection:h}){const v=a.value.map(b=>{const w=[b,...lc(b)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?v.reverse():v).flat()}return(h,v)=>(D(),j(f(_w),{role:"region","aria-label":f(r).replace("{hotkey}",f(n).join("+").replace(/Key/g,"").replace(/Digit/g,"")),tabindex:"-1",style:qt({pointerEvents:u.value?void 0:"none"})},{default:B(()=>[u.value?(D(),j(jd,{key:0,ref:b=>{c.value=f(vn)(b)},onFocusFromOutsideViewport:v[0]||(v[0]=()=>{const b=p({tabbingDirection:"forwards"});f(Is)(b)})},null,512)):pt("",!0),K(f(Be),ce({ref_key:"primitiveElement",ref:o,tabindex:"-1",as:h.as,"as-child":h.asChild},h.$attrs),{default:B(()=>[X(h.$slots,"default")]),_:3},16,["as","as-child"]),u.value?(D(),j(jd,{key:1,ref:b=>{d.value=f(vn)(b)},onFocusFromOutsideViewport:v[1]||(v[1]=()=>{const b=p({tabbingDirection:"backwards"});f(Is)(b)})},null,512)):pt("",!0)]),_:3},8,["aria-label","style"]))}}),Z_=W({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),Q_=W({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Be),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),am="tooltip.open";function J_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ex(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function tx(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function nx(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(o=!o)}return o}function rx(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ox(t)}function ox(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const[fc,ix]=Tt("TooltipProvider"),sx=W({__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:o,disableClosingTrigger:i}=on(t),s=U(!0),a=U(!1),{start:l,stop:u}=tc(()=>{s.value=!0},r,{immediate:!1});return ix({isOpenDelayed:s,delayDuration:n,onOpen(){u(),s.value=!1},onClose(){l()},isPointerInTransitRef:a,onPointerInTransitChange(c){a.value=c},disableHoverableContent:o,disableClosingTrigger:i}),(c,d)=>X(c.$slots,"default")}}),[za,ax]=Tt("TooltipRoot"),lx=W({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,o=fc(),i=q(()=>n.disableHoverableContent??o.disableHoverableContent.value),s=q(()=>n.disableClosingTrigger??o.disableClosingTrigger.value),a=q(()=>n.delayDuration??o.delayDuration.value),l=Yr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});ye(l,S=>{o.onClose&&(S?(o.onOpen(),document.dispatchEvent(new CustomEvent(am))):o.onClose())});const u=U(!1),c=U(),d=q(()=>l.value?u.value?"delayed-open":"instant-open":"closed"),{start:p,stop:h}=tc(()=>{u.value=!0,l.value=!0},a,{immediate:!1});function v(){h(),u.value=!1,l.value=!0}function b(){h(),l.value=!1}function w(){p()}return ax({contentId:Wn(),open:l,stateAttribute:d,trigger:c,onTriggerChange(S){c.value=S},onTriggerEnter(){o.isOpenDelayed.value?w():v()},onTriggerLeave(){i.value?b():h()},onOpen:v,onClose:b,disableHoverableContent:i,disableClosingTrigger:s}),(S,_)=>(D(),j(f(uc),null,{default:B(()=>[X(S.$slots,"default")]),_:3}))}}),ux=W({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=za(),r=fc(),{primitiveElement:o,currentElement:i}=Qe(),s=U(!1),a=U(!1);function l(){s.value=!1}function u(){s.value=!0,document.addEventListener("pointerup",l,{once:!0})}return Ue(()=>{n.onTriggerChange(i.value)}),(c,d)=>(D(),j(f(Jh),{"as-child":""},{default:B(()=>[K(f(Be),{ref_key:"primitiveElement",ref:o,"aria-describedby":f(n).open.value?f(n).contentId:void 0,"data-state":f(n).stateAttribute.value,as:c.as,"as-child":t.asChild,onPointermove:d[0]||(d[0]=p=>{p.pointerType!=="touch"&&!a.value&&!f(r).isPointerInTransitRef.value&&(f(n).onTriggerEnter(),a.value=!0)}),onPointerleave:d[1]||(d[1]=p=>{f(n).onTriggerLeave(),a.value=!1}),onPointerdown:u,onFocus:d[2]||(d[2]=()=>{s.value||f(n).onOpen()}),onBlur:d[3]||(d[3]=p=>f(n).onClose()),onClick:d[4]||(d[4]=()=>{f(n).disableClosingTrigger.value||f(n).onClose()})},{default:B(()=>[X(c.$slots,"default")]),_:3},8,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),lm=W({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean,default:!1},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,o=U(),i=za(),s=h0(),a=q(()=>{var c;return(c=s.default)==null?void 0:c.call(s)}),l=q(()=>{var c;if(n.ariaLabel)return n.ariaLabel;let d="";function p(h){typeof h.children=="string"?d+=h.children:Array.isArray(h.children)&&h.children.forEach(v=>p(v))}return(c=a.value)==null||c.forEach(h=>p(h)),d}),u=q(()=>{const{ariaLabel:c,...d}=n;return d});return Ue(()=>{Ys(window,"scroll",c=>{const d=c.target;d!=null&&d.contains(i.trigger.value)&&i.onClose()}),Ys(window,am,i.onClose)}),(c,d)=>(D(),j(f(Da),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>r("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{var h;f(i).disableClosingTrigger.value&&(h=f(i).trigger.value)!=null&&h.contains(p.target)&&p.preventDefault(),r("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=eo(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(i).onClose())},{default:B(()=>[K(f(Xs),ce({ref_key:"contentElement",ref:o,"data-state":f(i).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:B(()=>[X(c.$slots,"default"),K(f(Ra),{id:f(i).contentId,role:"tooltip"},{default:B(()=>[Re(it(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state","style"])]),_:3}))}}),cx=W({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=e,{primitiveElement:n,currentElement:r}=Qe(),{trigger:o,onClose:i}=za(),s=fc(),a=U(null);function l(){a.value=null,s.onPointerInTransitChange(!1)}function u(c,d){const p=c.currentTarget,h={x:c.clientX,y:c.clientY},v=J_(h,p.getBoundingClientRect()),b=ex(h,v),w=tx(d.getBoundingClientRect()),S=rx([...b,...w]);a.value=S,s.onPointerInTransitChange(!0)}return vt(c=>{if(o.value&&r.value){const d=h=>u(h,r.value),p=h=>u(h,o.value);o.value.addEventListener("pointerleave",d),r.value.addEventListener("pointerleave",p),c(()=>{var h,v;(h=o.value)==null||h.removeEventListener("pointerleave",d),(v=r.value)==null||v.removeEventListener("pointerleave",p)})}}),vt(c=>{if(a.value){const d=p=>{var h,v;if(!a.value)return;const b=p.target,w={x:p.clientX,y:p.clientY},S=((h=o.value)==null?void 0:h.contains(b))||((v=r.value)==null?void 0:v.contains(b)),_=!nx(w,a.value);S?l():_&&(l(),i())};document.addEventListener("pointermove",d),c(()=>document.removeEventListener("pointermove",d))}}),(c,d)=>(D(),j(lm,ce({ref_key:"primitiveElement",ref:n},t),{default:B(()=>[X(c.$slots,"default")]),_:3},16))}}),dx=W({__name:"TooltipContent",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,o=za(),i=sn(n,r);return(s,a)=>f(o).open.value?(D(),j(qn(f(o).disableHoverableContent.value?lm:cx),ft(ce({key:0},f(i))),{default:B(()=>[X(s.$slots,"default")]),_:3},16)):pt("",!0)}}),fx=W({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(ac),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),px=W({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(lx),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),hx=W({__name:"TooltipContent",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(fx),null,{default:B(()=>[K(f(dx),ce({...f(o),...i.$attrs},{class:f($e)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i.$attrs.class??"")}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),mx=W({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(ux),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),gx=W({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean}},setup(e){const t=e;return(n,r)=>(D(),j(f(sx),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}});function Sn(e,t){if(e)return;let n;switch(typeof t){case"string":n=new Error(t);break;case"function":n=new Error(t());break;default:n=t}throw n}function um(e,t){const n=typeof e;if(n!==t)throw new Error(`Expected an object of type '${t}', got '${n}'.`)}var vx=e=>Object.prototype.toString.call(e);function yx(e){if(e===null)return"null";const t=typeof e;return t==="object"||t==="function"?vx(e).slice(8,-1):t}function pc(e,t){if(!(e instanceof t))throw new Error(`Expected an instance of '${t.name}', got '${yx(e)}'.`)}function Ze(e){return e?Array.isArray(e)?e.length===0:Object.keys(e).length===0:!0}function Xe(e){return!Ze(e)}function gt(e){return e==null||Number.isNaN(e)}function We(e){return!gt(e)}function nr(e){if(e)return Sn(e.length>0,"Empty array."),e[0]}function bx(e){if(e)return Sn(e.length>0,"Empty array."),wx(e,-1)}function wx(e,t){const n=e==null?void 0:e.length;if(n)return t<0&&(t+=n),e[t]}function _x(e,t){return e.some((n,r)=>e.findIndex(o=>t(o)===t(n))!==r)}function cm(e,t){if(e.length<=t)return[e];const n=[];for(let r=0;rt(r)>t(o)?n==="asc"?1:-1:t(r)e.length)return!1;for(let n=0;ne.length)return!1;const n=e.length-t.length;for(let r=t.length-1;r>=0;r--)if(t[r]!==e[r+n])return!1;return!0}function dm(e){return Ze(e)?e:Array.from(new Set(e))}function Sx(e,t,n="keep-first"){return Ze(e)?e:Array.from(e.reduce((r,o)=>{const i=t(o);return n==="keep-first"&&r.has(i)?r:r.set(i,o)},new Map).values())}var ze=BigInt(0),Qs=BigInt(1),fm=BigInt(7),Cx=BigInt(10),Tx=BigInt(63),pm=BigInt(127),hm=BigInt(128);function xt(e){return typeof e=="bigint"?e:BigInt(e)}function vl(e,t){if(!e)return ze;t=typeof t=="number"?{decimals:t}:t,gt(t)&&(t={}),t.decimals=t.decimals||0,t.decimalMark=t.decimalMark||".";const n=e.split(t.decimalMark);if(n.length>2)throw new Error("Invalid numeric string.");let[r,o]=n;r=Px(r);const i=r.startsWith("-")?"-":"";return o?o.lengthr!==go).map(r=>({tokenId:r,amount:n[r]}))}}function di(e,t){var o;Array.isArray(e)&&(e=In(e)),Array.isArray(t)&&(t=In(t));const n=[],r=e.nanoErgs-t.nanoErgs;for(const i of e.tokens){const s=i.amount-(((o=t.tokens.find(a=>a.tokenId===i.tokenId))==null?void 0:o.amount)||ze);s!==ze&&n.push({tokenId:i.tokenId,amount:s})}return{nanoErgs:r,tokens:n}}var Wd=4,Bx=9;function $x(e){let t=0;for(let n=Wd;n<=Bx;n++){const r=`R${n}`;if(e[r]){if(n===Wd){t=n;continue}if(n-t>1)return!1;t=n}}return!0}function Mx(e){const t={};for(const n in e){const r=e[n];gt(r)||(t[n]=r)}return t}function mm(e,t){if(Ze(e))return t;const n={...t,...e};for(const r in n)n[r]=e[r]??t[r];return n}function ps(...e){const t=new Uint8Array(e.reduce((r,o)=>r+o.length,0));let n=0;for(const r of e)pc(r,Uint8Array),t.set(r,n),n+=r.length;return t}function gm(e){return!e||e.length%2?!1:(e.startsWith("0x")||(e="0x"+e),!isNaN(Number(e)))}function fi(e){return e.length/2}var Ha=(e=>(e[e.Mainnet=0]="Mainnet",e[e.Testnet=16]="Testnet",e))(Ha||{}),Jt=(e=>(e[e.P2PK=1]="P2PK",e[e.P2SH=2]="P2SH",e[e.P2S=3]="P2S",e))(Jt||{}),Gd={sizeInclusion:8,constantSegregation:16},hc=class{constructor(){be(this,"_items");this._items=[]}_isIndexOutOfBounds(e){return e<0||e>=this._items.length}[Symbol.iterator](){let e=0;return{next:()=>({done:e>=this.length,value:this._items[e++]})}}get length(){return this._items.length}get isEmpty(){return this.length===0}at(e){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);return this._items[e]}add(e,t){return this._addOneOrMore(e,t)}_addOne(e,t){if(We(t)&&We(t.index)){if(t.index===this.length)return this._items.push(this._map(e)),this.length;if(this._isIndexOutOfBounds(t.index))throw new RangeError(`Index '${t.index}' is out of range.`);return this._items.splice(t.index,0,this._map(e)),this.length}return this._items.push(this._map(e)),this._items.length}_addOneOrMore(e,t){if(Array.isArray(e)){We(t)&&We(t.index)&&(e=e.reverse());for(const n of e)this._addOne(n,t)}else this._addOne(e,t);return this.length}toArray(){return[...this._items]}reduce(e,t){return this._items.reduce(e,t)}},vm=class extends Error{constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.name=new.target.name}},Dx=class extends vm{constructor(e){super(e)}},Rx=class extends vm{constructor(e,t){super(e,t)}},Lx=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,yl=Math.ceil,Zt=Math.floor,Ft="[BigNumber Error] ",Kd=Ft+"Number primitive has more than 15 significant digits: ",cn=1e14,Ce=14,bl=9007199254740991,wl=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],cr=1e7,wt=1e9;function ym(e){var t,n,r,o=_.prototype={constructor:_,toString:null,valueOf:null},i=new _(1),s=20,a=4,l=-7,u=21,c=-1e7,d=1e7,p=!1,h=1,v=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},w="0123456789abcdefghijklmnopqrstuvwxyz",S=!0;function _(m,g){var y,A,x,C,k,O,E,M,$=this;if(!($ instanceof _))return new _(m,g);if(g==null){if(m&&m._isBigNumber===!0){$.s=m.s,!m.c||m.e>d?$.c=$.e=null:m.e=10;k/=10,C++);C>d?$.c=$.e=null:($.e=C,$.c=[m]);return}M=String(m)}else{if(!Lx.test(M=String(m)))return r($,M,O);$.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(C=M.indexOf("."))>-1&&(M=M.replace(".","")),(k=M.search(/e/i))>0?(C<0&&(C=k),C+=+M.slice(k+1),M=M.substring(0,k)):C<0&&(C=M.length)}else{if(ct(g,2,w.length,"Base"),g==10&&S)return $=new _(m),N($,s+$.e+1,a);if(M=String(m),O=typeof m=="number"){if(m*0!=0)return r($,M,O,g);if($.s=1/m<0?(M=M.slice(1),-1):1,_.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(Kd+m)}else $.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(y=w.slice(0,g),C=k=0,E=M.length;kC){C=E;continue}}else if(!x&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){x=!0,k=-1,C=0;continue}return r($,String(m),O,g)}O=!1,M=n(M,g,10,$.s),(C=M.indexOf("."))>-1?M=M.replace(".",""):C=M.length}for(k=0;M.charCodeAt(k)===48;k++);for(E=M.length;M.charCodeAt(--E)===48;);if(M=M.slice(k,++E)){if(E-=k,O&&_.DEBUG&&E>15&&(m>bl||m!==Zt(m)))throw Error(Kd+$.s*m);if((C=C-k-1)>d)$.c=$.e=null;else if(C=-wt&&x<=wt&&x===Zt(x)){if(A[0]===0){if(x===0&&A.length===1)return!0;break e}if(g=(x+1)%Ce,g<1&&(g+=Ce),String(A[0]).length==g){for(g=0;g=cn||y!==Zt(y))break e;if(y!==0)return!0}}}else if(A===null&&x===null&&(C===null||C===1||C===-1))return!0;throw Error(Ft+"Invalid BigNumber: "+m)},_.maximum=_.max=function(){return F(arguments,-1)},_.minimum=_.min=function(){return F(arguments,1)},_.random=function(){var m=9007199254740992,g=Math.random()*m&2097151?function(){return Zt(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(y){var A,x,C,k,O,E=0,M=[],$=new _(i);if(y==null?y=s:ct(y,0,wt),k=yl(y/Ce),p)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(k*=2));E>>11),O>=9e15?(x=crypto.getRandomValues(new Uint32Array(2)),A[E]=x[0],A[E+1]=x[1]):(M.push(O%1e14),E+=2);E=k/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(k*=7);E=9e15?crypto.randomBytes(7).copy(A,E):(M.push(O%1e14),E+=7);E=k/7}else throw p=!1,Error(Ft+"crypto unavailable");if(!p)for(;E=10;O/=10,E++);Ex-1&&(O[k+1]==null&&(O[k+1]=0),O[k+1]+=O[k]/x|0,O[k]%=x)}return O.reverse()}return function(y,A,x,C,k){var O,E,M,$,G,de,ue,ge,Oe=y.indexOf("."),Je=s,ee=a;for(Oe>=0&&($=v,v=0,y=y.replace(".",""),ge=new _(A),de=ge.pow(y.length-Oe),v=$,ge.c=g(Dn(Xt(de.c),de.e,"0"),10,x,m),ge.e=ge.c.length),ue=g(y,A,x,k?(O=w,m):(O=m,w)),M=$=ue.length;ue[--$]==0;ue.pop());if(!ue[0])return O.charAt(0);if(Oe<0?--M:(de.c=ue,de.e=M,de.s=C,de=t(de,ge,Je,ee,x),ue=de.c,G=de.r,M=de.e),E=M+Je+1,Oe=ue[E],$=x/2,G=G||E<0||ue[E+1]!=null,G=ee<4?(Oe!=null||G)&&(ee==0||ee==(de.s<0?3:2)):Oe>$||Oe==$&&(ee==4||G||ee==6&&ue[E-1]&1||ee==(de.s<0?8:7)),E<1||!ue[0])y=G?Dn(O.charAt(1),-Je,O.charAt(0)):O.charAt(0);else{if(ue.length=E,G)for(--x;++ue[--E]>x;)ue[E]=0,E||(++M,ue=[1].concat(ue));for($=ue.length;!ue[--$];);for(Oe=0,y="";Oe<=$;y+=O.charAt(ue[Oe++]));y=Dn(y,M,O.charAt(0))}return y}}(),t=function(){function m(A,x,C){var k,O,E,M,$=0,G=A.length,de=x%cr,ue=x/cr|0;for(A=A.slice();G--;)E=A[G]%cr,M=A[G]/cr|0,k=ue*E+M*de,O=de*E+k%cr*cr+$,$=(O/C|0)+(k/cr|0)+ue*M,A[G]=O%C;return $&&(A=[$].concat(A)),A}function g(A,x,C,k){var O,E;if(C!=k)E=C>k?1:-1;else for(O=E=0;Ox[O]?1:-1;break}return E}function y(A,x,C,k){for(var O=0;C--;)A[C]-=O,O=A[C]1;A.splice(0,1));}return function(A,x,C,k,O){var E,M,$,G,de,ue,ge,Oe,Je,ee,ie,ve,Pe,Ot,ht,Ge,ln,T=A.s==x.s?1:-1,P=A.c,z=x.c;if(!P||!P[0]||!z||!z[0])return new _(!A.s||!x.s||(P?z&&P[0]==z[0]:!z)?NaN:P&&P[0]==0||!z?T*0:T/0);for(Oe=new _(T),Je=Oe.c=[],M=A.e-x.e,T=C+M+1,O||(O=cn,M=Qt(A.e/Ce)-Qt(x.e/Ce),T=T/Ce|0),$=0;z[$]==(P[$]||0);$++);if(z[$]>(P[$]||0)&&M--,T<0)Je.push(1),G=!0;else{for(Ot=P.length,Ge=z.length,$=0,T+=2,de=Zt(O/(z[0]+1)),de>1&&(z=m(z,de,O),P=m(P,de,O),Ge=z.length,Ot=P.length),Pe=Ge,ee=P.slice(0,Ge),ie=ee.length;ie=O/2&&ht++;do{if(de=0,E=g(z,ee,Ge,ie),E<0){if(ve=ee[0],Ge!=ie&&(ve=ve*O+(ee[1]||0)),de=Zt(ve/ht),de>1)for(de>=O&&(de=O-1),ue=m(z,de,O),ge=ue.length,ie=ee.length;g(ue,ee,ge,ie)==1;)de--,y(ue,Ge=10;T/=10,$++);N(Oe,C+(Oe.e=$+M*Ce-1)+1,k,G)}else Oe.e=M,Oe.r=+G;return Oe}}();function I(m,g,y,A){var x,C,k,O,E;if(y==null?y=a:ct(y,0,8),!m.c)return m.toString();if(x=m.c[0],k=m.e,g==null)E=Xt(m.c),E=A==1||A==2&&(k<=l||k>=u)?ms(E,k):Dn(E,k,"0");else if(m=N(new _(m),g,y),C=m.e,E=Xt(m.c),O=E.length,A==1||A==2&&(g<=C||C<=l)){for(;OO){if(--g>0)for(E+=".";g--;E+="0");}else if(g+=C-O,g>0)for(C+1==O&&(E+=".");g--;E+="0");return m.s<0&&x?"-"+E:E}function F(m,g){for(var y,A,x=1,C=new _(m[0]);x=10;x/=10,A++);return(y=A+y*Ce-1)>d?m.c=m.e=null:y=10;O/=10,x++);if(C=g-x,C<0)C+=Ce,k=g,E=G[M=0],$=Zt(E/de[x-k-1]%10);else if(M=yl((C+1)/Ce),M>=G.length)if(A){for(;G.length<=M;G.push(0));E=$=0,x=1,C%=Ce,k=C-Ce+1}else break e;else{for(E=O=G[M],x=1;O>=10;O/=10,x++);C%=Ce,k=C-Ce+x,$=k<0?0:Zt(E/de[x-k-1]%10)}if(A=A||g<0||G[M+1]!=null||(k<0?E:E%de[x-k-1]),A=y<4?($||A)&&(y==0||y==(m.s<0?3:2)):$>5||$==5&&(y==4||A||y==6&&(C>0?k>0?E/de[x-k]:0:G[M-1])%10&1||y==(m.s<0?8:7)),g<1||!G[0])return G.length=0,A?(g-=m.e+1,G[0]=de[(Ce-g%Ce)%Ce],m.e=-g||0):G[0]=m.e=0,m;if(C==0?(G.length=M,O=1,M--):(G.length=M+1,O=de[Ce-C],G[M]=k>0?Zt(E/de[x-k]%de[k])*O:0),A)for(;;)if(M==0){for(C=1,k=G[0];k>=10;k/=10,C++);for(k=G[0]+=O,O=1;k>=10;k/=10,O++);C!=O&&(m.e++,G[0]==cn&&(G[0]=1));break}else{if(G[M]+=O,G[M]!=cn)break;G[M--]=0,O=1}for(C=G.length;G[--C]===0;G.pop());}m.e>d?m.c=m.e=null:m.e=u?ms(g,y):Dn(g,y,"0"),m.s<0?"-"+g:g)}return o.absoluteValue=o.abs=function(){var m=new _(this);return m.s<0&&(m.s=1),m},o.comparedTo=function(m,g){return Lr(this,new _(m,g))},o.decimalPlaces=o.dp=function(m,g){var y,A,x,C=this;if(m!=null)return ct(m,0,wt),g==null?g=a:ct(g,0,8),N(new _(C),m+C.e+1,g);if(!(y=C.c))return null;if(A=((x=y.length-1)-Qt(this.e/Ce))*Ce,x=y[x])for(;x%10==0;x/=10,A--);return A<0&&(A=0),A},o.dividedBy=o.div=function(m,g){return t(this,new _(m,g),s,a)},o.dividedToIntegerBy=o.idiv=function(m,g){return t(this,new _(m,g),0,1)},o.exponentiatedBy=o.pow=function(m,g){var y,A,x,C,k,O,E,M,$,G=this;if(m=new _(m),m.c&&!m.isInteger())throw Error(Ft+"Exponent not an integer: "+H(m));if(g!=null&&(g=new _(g)),O=m.e>14,!G.c||!G.c[0]||G.c[0]==1&&!G.e&&G.c.length==1||!m.c||!m.c[0])return $=new _(Math.pow(+H(G),O?m.s*(2-hs(m)):+H(m))),g?$.mod(g):$;if(E=m.s<0,g){if(g.c?!g.c[0]:!g.s)return new _(NaN);A=!E&&G.isInteger()&&g.isInteger(),A&&(G=G.mod(g))}else{if(m.e>9&&(G.e>0||G.e<-1||(G.e==0?G.c[0]>1||O&&G.c[1]>=24e7:G.c[0]<8e13||O&&G.c[0]<=9999975e7)))return C=G.s<0&&hs(m)?-0:0,G.e>-1&&(C=1/C),new _(E?1/C:C);v&&(C=yl(v/Ce+2))}for(O?(y=new _(.5),E&&(m.s=1),M=hs(m)):(x=Math.abs(+H(m)),M=x%2),$=new _(i);;){if(M){if($=$.times(G),!$.c)break;C?$.c.length>C&&($.c.length=C):A&&($=$.mod(g))}if(x){if(x=Zt(x/2),x===0)break;M=x%2}else if(m=m.times(y),N(m,m.e+1,1),m.e>14)M=hs(m);else{if(x=+H(m),x===0)break;M=x%2}G=G.times(G),C?G.c&&G.c.length>C&&(G.c.length=C):A&&(G=G.mod(g))}return A?$:(E&&($=i.div($)),g?$.mod(g):C?N($,v,a,k):$)},o.integerValue=function(m){var g=new _(this);return m==null?m=a:ct(m,0,8),N(g,g.e+1,m)},o.isEqualTo=o.eq=function(m,g){return Lr(this,new _(m,g))===0},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(m,g){return Lr(this,new _(m,g))>0},o.isGreaterThanOrEqualTo=o.gte=function(m,g){return(g=Lr(this,new _(m,g)))===1||g===0},o.isInteger=function(){return!!this.c&&Qt(this.e/Ce)>this.c.length-2},o.isLessThan=o.lt=function(m,g){return Lr(this,new _(m,g))<0},o.isLessThanOrEqualTo=o.lte=function(m,g){return(g=Lr(this,new _(m,g)))===-1||g===0},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&this.c[0]==0},o.minus=function(m,g){var y,A,x,C,k=this,O=k.s;if(m=new _(m,g),g=m.s,!O||!g)return new _(NaN);if(O!=g)return m.s=-g,k.plus(m);var E=k.e/Ce,M=m.e/Ce,$=k.c,G=m.c;if(!E||!M){if(!$||!G)return $?(m.s=-g,m):new _(G?k:NaN);if(!$[0]||!G[0])return G[0]?(m.s=-g,m):new _($[0]?k:a==3?-0:0)}if(E=Qt(E),M=Qt(M),$=$.slice(),O=E-M){for((C=O<0)?(O=-O,x=$):(M=E,x=G),x.reverse(),g=O;g--;x.push(0));x.reverse()}else for(A=(C=(O=$.length)<(g=G.length))?O:g,O=g=0;g0)for(;g--;$[y++]=0);for(g=cn-1;A>O;){if($[--A]=0;){for(y=0,de=ve[x]%Je,ue=ve[x]/Je|0,k=E,C=x+k;C>x;)M=ie[--k]%Je,$=ie[k]/Je|0,O=ue*M+$*de,M=de*M+O%Je*Je+ge[C]+y,y=(M/Oe|0)+(O/Je|0)+ue*$,ge[C--]=M%Oe;ge[C]=y}return y?++A:ge.splice(0,1),V(m,ge,A)},o.negated=function(){var m=new _(this);return m.s=-m.s||null,m},o.plus=function(m,g){var y,A=this,x=A.s;if(m=new _(m,g),g=m.s,!x||!g)return new _(NaN);if(x!=g)return m.s=-g,A.minus(m);var C=A.e/Ce,k=m.e/Ce,O=A.c,E=m.c;if(!C||!k){if(!O||!E)return new _(x/0);if(!O[0]||!E[0])return E[0]?m:new _(O[0]?A:x*0)}if(C=Qt(C),k=Qt(k),O=O.slice(),x=C-k){for(x>0?(k=C,y=E):(x=-x,y=O),y.reverse();x--;y.push(0));y.reverse()}for(x=O.length,g=E.length,x-g<0&&(y=E,E=O,O=y,g=x),x=0;g;)x=(O[--g]=O[g]+E[g]+x)/cn|0,O[g]=cn===O[g]?0:O[g]%cn;return x&&(O=[x].concat(O),++k),V(m,O,k)},o.precision=o.sd=function(m,g){var y,A,x,C=this;if(m!=null&&m!==!!m)return ct(m,1,wt),g==null?g=a:ct(g,0,8),N(new _(C),m,g);if(!(y=C.c))return null;if(x=y.length-1,A=x*Ce+1,x=y[x]){for(;x%10==0;x/=10,A--);for(x=y[0];x>=10;x/=10,A++);}return m&&C.e+1>A&&(A=C.e+1),A},o.shiftedBy=function(m){return ct(m,-bl,bl),this.times("1e"+m)},o.squareRoot=o.sqrt=function(){var m,g,y,A,x,C=this,k=C.c,O=C.s,E=C.e,M=s+4,$=new _("0.5");if(O!==1||!k||!k[0])return new _(!O||O<0&&(!k||k[0])?NaN:k?C:1/0);if(O=Math.sqrt(+H(C)),O==0||O==1/0?(g=Xt(k),(g.length+E)%2==0&&(g+="0"),O=Math.sqrt(+g),E=Qt((E+1)/2)-(E<0||E%2),O==1/0?g="5e"+E:(g=O.toExponential(),g=g.slice(0,g.indexOf("e")+1)+E),y=new _(g)):y=new _(O+""),y.c[0]){for(E=y.e,O=E+M,O<3&&(O=0);;)if(x=y,y=$.times(x.plus(t(C,x,M,1))),Xt(x.c).slice(0,O)===(g=Xt(y.c)).slice(0,O))if(y.e0&&ge>0){for(C=ge%O||O,$=ue.substr(0,C);C0&&($+=M+ue.slice(C)),de&&($="-"+$)}A=G?$+(y.decimalSeparator||"")+((E=+y.fractionGroupSize)?G.replace(new RegExp("\\d{"+E+"}\\B","g"),"$&"+(y.fractionGroupSeparator||"")):G):$}return(y.prefix||"")+A+(y.suffix||"")},o.toFraction=function(m){var g,y,A,x,C,k,O,E,M,$,G,de,ue=this,ge=ue.c;if(m!=null&&(O=new _(m),!O.isInteger()&&(O.c||O.s!==1)||O.lt(i)))throw Error(Ft+"Argument "+(O.isInteger()?"out of range: ":"not an integer: ")+H(O));if(!ge)return new _(ue);for(g=new _(i),M=y=new _(i),A=E=new _(i),de=Xt(ge),C=g.e=de.length-ue.e-1,g.c[0]=wl[(k=C%Ce)<0?Ce+k:k],m=!m||O.comparedTo(g)>0?C>0?g:M:O,k=d,d=1/0,O=new _(de),E.c[0]=0;$=t(O,g,0,1),x=y.plus($.times(A)),x.comparedTo(m)!=1;)y=A,A=x,M=E.plus($.times(x=M)),E=x,g=O.minus($.times(x=g)),O=x;return x=t(m.minus(y),A,0,1),E=E.plus(x.times(M)),y=y.plus(x.times(A)),E.s=M.s=ue.s,C=C*2,G=t(M,A,C,a).minus(ue).abs().comparedTo(t(E,y,C,a).minus(ue).abs())<1?[M,A]:[E,y],d=k,G},o.toNumber=function(){return+H(this)},o.toPrecision=function(m,g){return m!=null&&ct(m,1,wt),I(this,m,g,2)},o.toString=function(m){var g,y=this,A=y.s,x=y.e;return x===null?A?(g="Infinity",A<0&&(g="-"+g)):g="NaN":(m==null?g=x<=l||x>=u?ms(Xt(y.c),x):Dn(Xt(y.c),x,"0"):m===10&&S?(y=N(new _(y),s+x+1,a),g=Dn(Xt(y.c),y.e,"0")):(ct(m,2,w.length,"Base"),g=n(Dn(Xt(y.c),x,"0"),10,m,A,!0)),A<0&&y.c[0]&&(g="-"+g)),g},o.valueOf=o.toJSON=function(){return H(this)},o._isBigNumber=!0,o[Symbol.toStringTag]="BigNumber",o[Symbol.for("nodejs.util.inspect.custom")]=o.valueOf,e!=null&&_.set(e),_}function Qt(e){var t=e|0;return e>0||e===t?t:t-1}function Xt(e){for(var t,n,r=1,o=e.length,i=e[0]+"";ru^n?1:-1;for(a=(l=o.length)<(u=i.length)?l:u,s=0;si[s]^n?1:-1;return l==u?0:l>u^n?1:-1}function ct(e,t,n,r){if(en||e!==Zt(e))throw Error(Ft+(r||"Argument")+(typeof e=="number"?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function hs(e){var t=e.c.length-1;return Qt(e.e/Ce)==t&&e.c[t]%2!=0}function ms(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Dn(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(r=e.length,++t>r){for(o=n,t-=r;--t;o+=n);e+=o}else t0){if(++t>=bE)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function EE(e){return function(){return e}}var SE=function(){try{var e=fo(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Qd=SE;var CE=Qd?function(e,t){return Qd(e,"toString",{configurable:!0,enumerable:!1,value:EE(t),writable:!0})}:gc;const TE=CE;var OE=xE(TE);const AE=OE;function IE(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i-1}var $E=9007199254740991,ME=/^(?:0|[1-9]\d*)$/;function Cm(e,t){var n=typeof e;return t=t??$E,!!t&&(n=="number"||n!="symbol"&&ME.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=LE}function Om(e){return e!=null&&vc(e.length)&&!Em(e)}var FE=Object.prototype;function NE(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||FE;return e===n}function VE(e,t){for(var n=-1,r=Array(e);++n-1}function Q2(e,t){var n=this.__data__,r=Ua(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function or(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(a)?t>1?Lm(a,t-1,n,r,o):Rm(o,a):r||(o[o.length]=a)}return o}function vS(){this.__data__=new or,this.size=0}function yS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bS(e){return this.__data__.get(e)}function wS(e){return this.__data__.has(e)}var _S=200;function xS(e,t){var n=this.__data__;if(n instanceof or){var r=n.__data__;if(!Ci||r.length<_S-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ir(r)}return n.set(e,t),this.size=n.size,this}function Gn(e){var t=this.__data__=new or(e);this.size=t.size}Gn.prototype.clear=vS;Gn.prototype.delete=yS;Gn.prototype.get=bS;Gn.prototype.has=wS;Gn.prototype.set=xS;function ES(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++na))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&WS?new Ro:void 0;for(i.set(e,t),i.set(t,e);++d=AC&&(i=_c,s=!1,t=new Ro(t));e:for(;++ot}function $C(e,t,n){for(var r=-1,o=e.length;++r=FC){var u=t?null:LC(e);if(u)return xc(u);s=!1,o=_c,l=new Ro}else l=t?[]:a;e:for(;++re instanceof Uint8Array,Js=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Cl=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),bn=(e,t)=>e<<32-t|e>>>t,HC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HC)throw new Error("Non little-endian hardware is not supported");function jC(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Xr(e){if(typeof e=="string"&&(e=jC(e)),!zC(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}class jm{clone(){return this._cloneInto()}}function UC(e){const t=r=>e().update(Xr(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function WC(e){const t=(r,o)=>e(o).update(Xr(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function Tl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function GC(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function ea(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Um(e,t){GC(e);const n=t.outputLen;if(e.lengtho)throw new Error("outputLen bigger than keyLen");if(r.key!==void 0&&(r.key.length<1||r.key.length>o))throw new Error(`key must be up 1..${o} byte long or undefined`);if(r.salt!==void 0&&r.salt.length!==i)throw new Error(`salt must be ${i} byte long or undefined`);if(r.personalization!==void 0&&r.personalization.length!==s)throw new Error(`personalization must be ${s} byte long or undefined`);this.buffer32=Js(this.buffer=new Uint8Array(t))}update(t){ea(this);const{blockLen:n,buffer:r,buffer32:o}=this;t=Xr(t);const i=t.length,s=t.byteOffset,a=t.buffer;for(let l=0;lo[s]=i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:o,destroyed:i,outputLen:s,pos:a}=this;return t||(t=new this.constructor({dkLen:s})),t.set(...this.get()),t.length=r,t.finished=o,t.destroyed=i,t.outputLen=s,t.buffer.set(n),t.pos=a,t}}const vs=BigInt(2**32-1),fu=BigInt(32);function Wm(e,t=!1){return t?{h:Number(e&vs),l:Number(e>>fu&vs)}:{h:Number(e>>fu&vs)|0,l:Number(e&vs)|0}}function YC(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),ZC=(e,t,n)=>e>>>n,QC=(e,t,n)=>e<<32-n|t>>>n,JC=(e,t,n)=>e>>>n|t<<32-n,eT=(e,t,n)=>e<<32-n|t>>>n,tT=(e,t,n)=>e<<64-n|t>>>n-32,nT=(e,t,n)=>e>>>n-32|t<<64-n,rT=(e,t)=>t,oT=(e,t)=>e,iT=(e,t,n)=>e<>>32-n,sT=(e,t,n)=>t<>>32-n,aT=(e,t,n)=>t<>>64-n,lT=(e,t,n)=>e<>>64-n;function uT(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const cT=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),dT=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,fT=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),pT=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,hT=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),mT=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,gT={fromBig:Wm,split:YC,toBig:XC,shrSH:ZC,shrSL:QC,rotrSH:JC,rotrSL:eT,rotrBH:tT,rotrBL:nT,rotr32H:rT,rotr32L:oT,rotlSH:iT,rotlSL:sT,rotlBH:aT,rotlBL:lT,add:uT,add3L:cT,add3H:dT,add4L:fT,add4H:pT,add5H:mT,add5L:hT},Mt=gT,yt=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),le=new Uint32Array(32);function dr(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=le[2*e],u=le[2*e+1],c=le[2*t],d=le[2*t+1],p=le[2*n],h=le[2*n+1],v=le[2*r],b=le[2*r+1],w=Mt.add3L(l,c,s);u=Mt.add3H(w,u,d,a),l=w|0,{Dh:b,Dl:v}={Dh:b^u,Dl:v^l},{Dh:b,Dl:v}={Dh:Mt.rotr32H(b,v),Dl:Mt.rotr32L(b,v)},{h,l:p}=Mt.add(h,p,b,v),{Bh:d,Bl:c}={Bh:d^h,Bl:c^p},{Bh:d,Bl:c}={Bh:Mt.rotrSH(d,c,24),Bl:Mt.rotrSL(d,c,24)},le[2*e]=l,le[2*e+1]=u,le[2*t]=c,le[2*t+1]=d,le[2*n]=p,le[2*n+1]=h,le[2*r]=v,le[2*r+1]=b}function fr(e,t,n,r,o,i){const s=o[i],a=o[i+1];let l=le[2*e],u=le[2*e+1],c=le[2*t],d=le[2*t+1],p=le[2*n],h=le[2*n+1],v=le[2*r],b=le[2*r+1],w=Mt.add3L(l,c,s);u=Mt.add3H(w,u,d,a),l=w|0,{Dh:b,Dl:v}={Dh:b^u,Dl:v^l},{Dh:b,Dl:v}={Dh:Mt.rotrSH(b,v,16),Dl:Mt.rotrSL(b,v,16)},{h,l:p}=Mt.add(h,p,b,v),{Bh:d,Bl:c}={Bh:d^h,Bl:c^p},{Bh:d,Bl:c}={Bh:Mt.rotrBH(d,c,63),Bl:Mt.rotrBL(d,c,63)},le[2*e]=l,le[2*e+1]=u,le[2*t]=c,le[2*t+1]=d,le[2*n]=p,le[2*n+1]=h,le[2*r]=v,le[2*r+1]=b}class vT extends qC{constructor(t={}){super(128,t.dkLen===void 0?64:t.dkLen,t,64,16,16),this.v0l=yt[0]|0,this.v0h=yt[1]|0,this.v1l=yt[2]|0,this.v1h=yt[3]|0,this.v2l=yt[4]|0,this.v2h=yt[5]|0,this.v3l=yt[6]|0,this.v3h=yt[7]|0,this.v4l=yt[8]|0,this.v4h=yt[9]|0,this.v5l=yt[10]|0,this.v5h=yt[11]|0,this.v6l=yt[12]|0,this.v6h=yt[13]|0,this.v7l=yt[14]|0,this.v7h=yt[15]|0;const n=t.key?t.key.length:0;if(this.v0l^=this.outputLen|n<<8|65536|1<<24,t.salt){const r=Js(Xr(t.salt));this.v4l^=r[0],this.v4h^=r[1],this.v5l^=r[2],this.v5h^=r[3]}if(t.personalization){const r=Js(Xr(t.personalization));this.v6l^=r[0],this.v6h^=r[1],this.v7l^=r[2],this.v7h^=r[3]}if(t.key){const r=new Uint8Array(this.blockLen);r.set(Xr(t.key)),this.update(r)}}get(){let{v0l:t,v0h:n,v1l:r,v1h:o,v2l:i,v2h:s,v3l:a,v3h:l,v4l:u,v4h:c,v5l:d,v5h:p,v6l:h,v6h:v,v7l:b,v7h:w}=this;return[t,n,r,o,i,s,a,l,u,c,d,p,h,v,b,w]}set(t,n,r,o,i,s,a,l,u,c,d,p,h,v,b,w){this.v0l=t|0,this.v0h=n|0,this.v1l=r|0,this.v1h=o|0,this.v2l=i|0,this.v2h=s|0,this.v3l=a|0,this.v3h=l|0,this.v4l=u|0,this.v4h=c|0,this.v5l=d|0,this.v5h=p|0,this.v6l=h|0,this.v6h=v|0,this.v7l=b|0,this.v7h=w|0}compress(t,n,r){this.get().forEach((l,u)=>le[u]=l),le.set(yt,16);let{h:o,l:i}=Mt.fromBig(BigInt(this.length));le[24]=yt[8]^i,le[25]=yt[9]^o,r&&(le[28]=~le[28],le[29]=~le[29]);let s=0;const a=KC;for(let l=0;l<12;l++)dr(0,4,8,12,t,n+2*a[s++]),fr(0,4,8,12,t,n+2*a[s++]),dr(1,5,9,13,t,n+2*a[s++]),fr(1,5,9,13,t,n+2*a[s++]),dr(2,6,10,14,t,n+2*a[s++]),fr(2,6,10,14,t,n+2*a[s++]),dr(3,7,11,15,t,n+2*a[s++]),fr(3,7,11,15,t,n+2*a[s++]),dr(0,5,10,15,t,n+2*a[s++]),fr(0,5,10,15,t,n+2*a[s++]),dr(1,6,11,12,t,n+2*a[s++]),fr(1,6,11,12,t,n+2*a[s++]),dr(2,7,8,13,t,n+2*a[s++]),fr(2,7,8,13,t,n+2*a[s++]),dr(3,4,9,14,t,n+2*a[s++]),fr(3,4,9,14,t,n+2*a[s++]);this.v0l^=le[0]^le[16],this.v0h^=le[1]^le[17],this.v1l^=le[2]^le[18],this.v1h^=le[3]^le[19],this.v2l^=le[4]^le[20],this.v2h^=le[5]^le[21],this.v3l^=le[6]^le[22],this.v3h^=le[7]^le[23],this.v4l^=le[8]^le[24],this.v4h^=le[9]^le[25],this.v5l^=le[10]^le[26],this.v5h^=le[11]^le[27],this.v6l^=le[12]^le[28],this.v6h^=le[13]^le[29],this.v7l^=le[14]^le[30],this.v7h^=le[15]^le[31],le.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const yT=WC(e=>new vT(e));function bT(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),a=Number(n&i),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}class wT extends jm{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Cl(this.buffer)}update(t){ea(this);const{view:n,buffer:r,blockLen:o}=this;t=Xr(t);const i=t.length;for(let s=0;so-s&&(this.process(r,0),s=0);for(let d=s;dc.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;de&t^~e&n,xT=(e,t,n)=>e&t^e&n^t&n,ET=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hr=new Uint32Array(64);class ST extends wT{constructor(){super(64,32,8,!1),this.A=pr[0]|0,this.B=pr[1]|0,this.C=pr[2]|0,this.D=pr[3]|0,this.E=pr[4]|0,this.F=pr[5]|0,this.G=pr[6]|0,this.H=pr[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:s,G:a,H:l}=this;return[t,n,r,o,i,s,a,l]}set(t,n,r,o,i,s,a,l){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=l|0}process(t,n){for(let d=0;d<16;d++,n+=4)hr[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const p=hr[d-15],h=hr[d-2],v=bn(p,7)^bn(p,18)^p>>>3,b=bn(h,17)^bn(h,19)^h>>>10;hr[d]=b+hr[d-7]+v+hr[d-16]|0}let{A:r,B:o,C:i,D:s,E:a,F:l,G:u,H:c}=this;for(let d=0;d<64;d++){const p=bn(a,6)^bn(a,11)^bn(a,25),h=c+p+_T(a,l,u)+ET[d]+hr[d]|0,b=(bn(r,2)^bn(r,13)^bn(r,22))+xT(r,o,i)|0;c=u,u=l,l=a,a=s+h|0,s=i,i=o,o=r,r=h+b|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,c=c+this.H|0,this.set(r,o,i,s,a,l,u,c)}roundClean(){hr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const CT=UC(()=>new ST);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gm(...e){const t=(o,i)=>s=>o(i(s)),n=Array.from(e).reverse().reduce((o,i)=>o?t(o,i.encode):i.encode,void 0),r=e.reduce((o,i)=>o?t(o,i.decode):i.decode,void 0);return{encode:n,decode:r}}function TT(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function OT(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function wf(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach(s=>{if(s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let l=r;l{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return wf(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(wf(t,e,2**8))}}}function IT(e,t){if(typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),o=new Uint8Array(n.length+e);return o.set(n),o.set(r,n.length),o},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),o=t(r).slice(0,e),i=n.slice(-e);for(let s=0;sGm(AT(58),TT(e),OT("")),Km=kT("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),PT=e=>Gm(IT(4,t=>e(e(t))),Km);var BT=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function $T(e){pc(e,Uint8Array);let t="";for(let n=0,r=e.length;n=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-(65-10);if(e>=97&&e<=102)return e-(97-10);throw new Error("Invalid byte sequence.")}var Et={encode:$T,decode:MT};function DT(e){return pc(e,Uint8Array),new TextDecoder().decode(e)}function RT(e){return um(e,"string"),new Uint8Array(new TextEncoder().encode(e))}var Ol={encode:DT,decode:RT};PT(LT);var Qo=Km;function qm(e){return e instanceof Uint8Array?e:Et.decode(e)}function hi(e){return yT(qm(e),{dkLen:32})}function LT(e){return CT(qm(e))}function FT(e){e.length%2&&(e="0"+e);const t=BigInt("0x"+e);return 128&parseInt(e.slice(0,2),16)?-Ym(t):t}function NT(e){const t=e>=ze;t||(e=Ym(e));let n=e.toString(16);return n.length%2&&(n="0"+n),t&&128&parseInt(n.slice(0,2),16)&&(n="00"+n),n}function Ym(e){const t=e0?r+=8-o:t&&nr(n)==="1"&&n.indexOf("1",1)!==-1&&(r+=8);const i=(1n<>=7,t>0&&(n|=128),e.write(n)}while(t>0);return e}function Al(e){if(e.isEmpty)return 0;let t=0,n=0,r=0;do r=e.readByte(),t|=(r&127)<>=fm,t>0&&(n|=128),e.write(n)}while(t>0);return e}function HT(e){if(e.isEmpty)return ze;let t=ze,n=ze,r=ze;do r=BigInt(e.readByte()),t|=(r&pm)<0);return t}e=xt(e);do t++,e/=hm;while(e>ze);return t}function jT(e){return e<<1^e>>63}function UT(e){return e>>1^-(e&1)}function WT(e){return e<>Tx}function GT(e){return e>>Qs^-(e&Qs)}var Ln,_n,ep,KT=(ep=class{constructor(e){ut(this,Ln,void 0);ut(this,_n,void 0);typeof e=="string"?Ye(this,Ln,Et.decode(e)):Ye(this,Ln,e),Ye(this,_n,0)}get isEmpty(){return Ze(Ie(this,Ln))}readBoolean(){return this.readByte()===1}readBits(e){const t=new Array(e);let n=0;for(let r=0;r>n++&1;t[r]=o===1,n==8&&(n=0,Mr(this,_n)._++)}return n>0&&Mr(this,_n)._++,t}readByte(){return Ie(this,Ln)[Mr(this,_n)._++]}readBytes(e){return Ie(this,Ln).subarray(Ie(this,_n),Ye(this,_n,Ie(this,_n)+e))}readVlq(){return Al(this)}readShort(){return Number(UT(Al(this)))}readInt(){const e=this.readLong();return Number(e)}readLong(){return GT(HT(this))}readBigInt(){const e=Al(this);return FT(Et.encode(this.readBytes(e)))}},Ln=new WeakMap,_n=new WeakMap,ep),Fn,Ht,tp,Cc=(tp=class{constructor(e){ut(this,Fn,void 0);ut(this,Ht,void 0);Ye(this,Fn,new Uint8Array(e)),Ye(this,Ht,0)}get length(){return Ie(this,Ht)}writeBoolean(e){return this.write(e===!0?1:0),this}writeVLQ(e){return VT(this,e)}writeBigVLQ(e){return zT(this,e)}writeShort(e){return this.writeVLQ(jT(e)),this}writeInt(e){return this.writeLong(BigInt(e)),this}writeLong(e){return this.writeBigVLQ(WT(e)),this}write(e){return Ie(this,Fn)[Mr(this,Ht)._++]=e,this}writeBytes(e){return Ie(this,Fn).set(e,Ie(this,Ht)),Ye(this,Ht,Ie(this,Ht)+e.length),this}writeHex(e){return this.writeBytes(Et.decode(e))}writeBits(e){let t=0;for(let n=0;n0&&Mr(this,Ht)._++,this}writeBigInt(e){const t=NT(e);return this.writeVLQ(t.length/2),this.writeHex(t),this}toHex(){return Et.encode(this.toBytes())}toBytes(){return Ie(this,Fn).subarray(0,Ie(this,Ht))}},Fn=new WeakMap,Ht=new WeakMap,tp),Xm=class{coerce(e){return e}},Zm=class extends Xm{get embeddable(){return!1}},Br=class extends Zm{get embeddable(){return!0}},ki,np,Qm=(np=class extends Xm{constructor(t){super();ut(this,ki,void 0);Ye(this,ki,t)}get elementsType(){return Ie(this,ki)}get embeddable(){return!1}},ki=new WeakMap,np),Jm=class extends Br{get code(){return 1}toString(){return"SBool"}},eg=class extends Br{get code(){return 2}toString(){return"SByte"}},tg=class extends Br{get code(){return 3}toString(){return"SShort"}},ng=class extends Br{get code(){return 4}toString(){return"SInt"}},rg=class extends Br{get code(){return 5}coerce(e){return xt(e)}toString(){return"SLong"}},og=class extends Br{get code(){return 6}coerce(e){return xt(e)}toString(){return"SBigInt"}},ig=class extends Br{get code(){return 7}coerce(e){return typeof e=="string"?Et.decode(e):e}toString(){return"SGroupElement"}},sg=class extends Br{get code(){return 8}toString(){return"SSigmaProp"}},ag=class extends Zm{get code(){return 98}toString(){return"SUnit"}},It=Object.freeze({embeddable:0,simpleColl:1,nestedColl:2,option:3,optionCollection:4,pairOne:5,pairTwo:6,symmetricPair:7,genericTuple:8}),lg=11,pu=lg+1,wn=e=>pu*e,qT=Object.freeze({code:wn(It.simpleColl),embeddable:!1,simpleCollTypeCode:wn(It.simpleColl),nestedCollTypeCode:wn(It.nestedColl)}),YT=Object.freeze({code:wn(It.pairOne),embeddable:!1,pairOneTypeCode:wn(It.pairOne),pairTwoTypeCode:wn(It.pairTwo),tripleTypeCode:wn(It.pairTwo),symmetricPairTypeCode:wn(It.symmetricPair),quadrupleTypeCode:wn(It.symmetricPair),genericTupleTypeCode:wn(It.genericTuple)}),ae={bool:new Jm,byte:new eg,short:new tg,int:new ng,long:new rg,bigInt:new og,groupElement:new ig,sigmaProp:new sg,unit:new ag,coll:qT,tuple:YT};function hu(e){return e.code>=ae.coll.simpleCollTypeCode&&e.code<=ae.coll.nestedCollTypeCode+lg}function ug(e){return e.code>=ae.tuple.pairOneTypeCode&&e.code<=ae.tuple.genericTupleTypeCode}function Fr(e){switch(e){case ae.bool.code:return ae.bool;case ae.byte.code:return ae.byte;case ae.short.code:return ae.short;case ae.int.code:return ae.int;case ae.long.code:return ae.long;case ae.bigInt.code:return ae.bigInt;case ae.groupElement.code:return ae.groupElement;case ae.sigmaProp.code:return ae.sigmaProp;default:throw new Error(`The type code '0x${e.toString(16)}' is not a valid primitive type code.`)}}var Ps=class extends Qm{get code(){return ae.coll.code}coerce(e){return this.elementsType.code===ae.byte.code&&!(e instanceof Uint8Array)?typeof e=="string"?Et.decode(e):Uint8Array.from(e):e.map(t=>this.elementsType.coerce(t))}toString(){return`SColl[${this.elementsType.toString()}]`}},ei=class extends Qm{get code(){return ae.tuple.code}coerce(e){const t=new Array(e.length);for(let n=0;ne.toString()).join(", ")})`}};function sr(e,t,n){return new Proxy(e,{apply:(r,o,i)=>{const s=t??new r;return!n&&Ze(i)?s:new Zr(s,...i)}})}function cg(e,t){return new Proxy(e,{apply:t})}var Il=sr(eg,ae.byte);sr(Jm,ae.bool);sr(tg,ae.short);sr(ng,ae.int);sr(rg,ae.long);sr(og,ae.bigInt);sr(ig,ae.groupElement);sr(sg,ae.sigmaProp);sr(ag,void 0,!0);var kl=cg(Ps,(e,t,n)=>{const[r,o]=n,i=r();return o?new Zr(new e(i),o):()=>new e(i)});cg(ei,(e,t,n)=>{const[r,o]=n;if(typeof r=="function"&&typeof o=="function")return()=>new e([r(),o()]);if(r instanceof Zr&&o instanceof Zr)return new Zr(new e([r.type,o.type]),[r.data,o.data]);throw new Error("Invalid tuple declaration.")});var XT=33,xf=205,Ef=class Bs{static serialize(t,n,r){if(n.embeddable)switch(n.code){case ae.bool.code:return r.writeBoolean(t);case ae.byte.code:return r.write(t);case ae.short.code:return r.writeShort(t);case ae.int.code:return r.writeInt(t);case ae.long.code:return r.writeLong(t);case ae.bigInt.code:return r.writeBigInt(t);case ae.groupElement.code:return r.writeBytes(t);case ae.sigmaProp.code:{const o=t;if(o.type===ae.groupElement)return r.write(xf),Bs.serialize(o.data,o.type,r);throw Error("Serialization error: SigmaProp operation not implemented.")}}else if(hu(n)){if(n.elementsType.code===ae.byte.code){const o=t instanceof Uint8Array;Sn(o,`SColl[Byte] expected an UInt8Array, got ${typeof t}.`)}else Sn(Array.isArray(t),`SColl expected an array, got ${typeof t}.`);switch(r.writeVLQ(t.length),n.elementsType.code){case ae.bool.code:return r.writeBits(t);case ae.byte.code:return r.writeBytes(t);default:{for(let o=0;othis.deserialize(r,n));case ae.unit.code:return}throw new Error(`Parsing error: '0x${t.code.toString(16)}' type not implemented.`)}},Sf=class{static serialize(e,t){if(e.embeddable)t.write(e.code);else if(e.code===ae.unit.code)t.write(e.code);else if(hu(e))if(e.elementsType.embeddable)t.write(ae.coll.simpleCollTypeCode+e.elementsType.code);else if(hu(e.elementsType)){const n=e.elementsType;n.elementsType.embeddable?t.write(ae.coll.nestedCollTypeCode+n.elementsType.code):(t.write(ae.coll.simpleCollTypeCode),this.serialize(n,t))}else t.write(ae.coll.simpleCollTypeCode),this.serialize(e.elementsType,t);else if(ug(e)){switch(e.elementsType.length){case 2:{const n=nr(e.elementsType),r=bx(e.elementsType);n.embeddable?n.code===r.code?t.write(ae.tuple.symmetricPairTypeCode+n.code):(t.write(ae.tuple.pairOneTypeCode+n.code),this.serialize(r,t)):r.embeddable?(t.write(ae.tuple.pairTwoTypeCode+r.code),this.serialize(n,t)):(t.write(ae.tuple.pairOneTypeCode),this.serialize(n,t),this.serialize(r,t));return}case 3:t.write(ae.tuple.tripleTypeCode);break;case 4:t.write(ae.tuple.quadrupleTypeCode);break;default:{const n=e.elementsType.length;Sn(n>=2&&n<=255,"Invalid type: tuples must have between 2 and 255 items."),t.write(ae.tuple.genericTupleTypeCode),t.writeVLQ(n)}}for(let n=0;n0,`Parsing Error: Unexpected type code '0x${t.toString(16)}'`),t0,"Empty constant bytes.");const n=new KT(t),r=Sf.deserialize(n),o=Ef.deserialize(r,n);return new $i(r,o)}get type(){return Ie(this,Pi)}get data(){return Ie(this,Bi)}toBytes(){const t=new Cc(ZT);return Sf.serialize(this.type,t),Ef.serialize(this.data,this.type,t),t.toBytes()}toHex(){return Et.encode(this.toBytes())}},Pi=new WeakMap,Bi=new WeakMap,$i);function QT(e,t="strict"){if(t==="strict")return Zr.from(e??"").data;if(e)try{return Zr.from(e).data}catch{return}}var JT=65535;function dg(e,t,n){if(t||(t=new Cc(5e4)),t.writeBigVLQ(xt(e.value)),t.writeHex(e.ergoTree),t.writeVLQ(e.creationHeight),eO(t,e.assets,n),tO(t,e.additionalRegisters),We(n))return t;if(!fg(e))throw new Error("Invalid box type.");return t.writeHex(e.transactionId).writeVLQ(e.index)}function fg(e){const t=e;return We(t.transactionId)&&We(t.index)}function eO(e,t,n){if(Ze(t)){e.write(0);return}e.writeVLQ(t.length),Xe(n)?t.map(r=>e.writeVLQ(n.indexOf(r.tokenId)).writeBigVLQ(xt(r.amount))):t.map(r=>e.writeHex(r.tokenId).writeBigVLQ(xt(r.amount)))}function tO(e,t){const n=Object.keys(t).sort();let r=0;for(const o of n)t[o]&&r++;if(e.writeVLQ(r),r!=0)for(const o of n){const i=t[o];We(i)&&e.writeHex(i)}}function nO(e,t){if(gt(e.creationHeight))throw new Error("Box size estimation error: creation height is undefined.");let n=0;n+=$t(We(t)?t:e.value),n+=fi(e.ergoTree),n+=$t(e.creationHeight),n+=$t(e.assets.length),n+=e.assets.reduce((o,i)=>o+=fi(i.tokenId)+$t(i.amount),0);let r=0;for(const o in e.additionalRegisters){const i=e.additionalRegisters[o];i&&(n+=fi(i),r++)}return n+=$t(r),n+=32,n+=$t(fg(e)?e.index:JT),n}function rO(e){const t=new Cc(1e5);t.writeVLQ(e.inputs.length),e.inputs.map(r=>oO(t,r)),t.writeVLQ(e.dataInputs.length),e.dataInputs.map(r=>t.writeHex(r.boxId));const n=sO(e.outputs);return t.writeVLQ(n.length),n.map(r=>t.writeHex(r)),t.writeVLQ(e.outputs.length),e.outputs.map(r=>dg(r,t,n)),t}function oO(e,t){e.writeHex(t.boxId),e.write(0),iO(e,t.extension)}function iO(e,t){const n=Object.keys(t);let r=0;for(const o of n){const i=t[o];We(i)&&r++}if(e.writeVLQ(r),r!=0)for(const o of n){const i=t[o];We(i)&&e.writeVLQ(Number(o)).writeHex(i)}}function sO(e){const t=new Set;return e.flatMap(n=>n.assets.map(r=>t.add(r.tokenId))),Array.from(t)}var aO=class extends Error{constructor(){super("One or more inputs was selected more than one time by the current selection strategy.")}},lO=class extends Error{constructor(t){const n=[];if(t.nanoErgs&&n.push(Cf("nanoErgs",t.nanoErgs)),Xe(t.tokens))for(const r of t.tokens)n.push(Cf(r.tokenId,r.amount));super(`Insufficient inputs:${n.join()}`);be(this,"unreached");this.unreached=t}};function Cf(e,t){return` + > ${e}: ${t==null?void 0:t.toString()}`}var uO=class{constructor(){be(this,"_inputs")}select(e,t){this._inputs=e;let n=[];Xe(t.tokens)&&(n=this._selectTokens(t.tokens));const r=au(n,o=>o.value);if(gt(t.nanoErgs)&&Ze(t.tokens)||We(t.nanoErgs)&&ri.assets.some(s=>s.tokenId===t)):o=n;else for(let i=0;i!o.includes(i))),o}},cO=class{constructor(e){be(this,"_selector");this._selector=e}select(e,t){return this._selector(e,t)}},dO=class{constructor(e){be(this,"_inputs");be(this,"_strategy");be(this,"_ensureFilterPredicate");be(this,"_selector");be(this,"_sortDirection");be(this,"_ensureInclusionBoxIds");this._inputs=e}defineStrategy(e){return this._isISelectionStrategyImplementation(e)?this._strategy=e:this._strategy=new cO(e),this}select(e){this._strategy||(this._strategy=new uO);const t=this._deepCloneTarget(e);let n=[...this._inputs],r=[];const o=this._ensureFilterPredicate,i=this._ensureInclusionBoxIds;if(o?i?r=n.filter(a=>o(a)||i.has(a.boxId)):r=n.filter(o):i&&(r=n.filter(a=>i.has(a.boxId))),Xe(r)&&(n=n.filter(a=>!r.some(l=>l.boxId===a.boxId)),t.nanoErgs&&t.nanoErgs>ze&&(t.nanoErgs-=au(r,a=>a.value)),Xe(t.tokens)&&r.some(a=>!Ze(a.assets))))for(const a of t.tokens)a.amount&&a.amount>ze&&(a.amount-=In(r,a.tokenId));if(this._selector&&(n=Zs(n,this._selector,this._sortDirection||"asc")),r=r.concat(this._strategy.select(n,t)),_x(r,a=>a.boxId))throw new aO;const s=this._getUnreachedTargets(r,e);if(s.nanoErgs||Xe(s.tokens))throw new lO(s);return r}_deepCloneTarget(e){return{nanoErgs:e.nanoErgs,tokens:e.tokens?e.tokens.map(t=>({tokenId:t.tokenId,amount:t.amount})):void 0}}_getUnreachedTargets(e,t){const n={nanoErgs:void 0,tokens:void 0},r=au(e,o=>o.value);if(t.nanoErgs&&t.nanoErgs>r&&(n.nanoErgs=t.nanoErgs-r),Ze(t.tokens))return n;for(const o of t.tokens){const i=In(e,o.tokenId);if(o.amount&&o.amount>i){if(o.tokenId===nr(e).boxId)continue;gt(n.tokens)&&(n.tokens=[]),n.tokens.push({tokenId:o.tokenId,amount:o.amount-i})}}return n}ensureInclusion(e){if(typeof e=="function")this._ensureFilterPredicate=e;else if(e==="all")this._ensureFilterPredicate=t=>t.value>0n;else if(gt(this._ensureInclusionBoxIds)&&(this._ensureInclusionBoxIds=new Set),Array.isArray(e))for(const t of e)this._ensureInclusionBoxIds.add(t);else this._ensureInclusionBoxIds.add(e);return this}orderBy(e,t){return this._selector=e,this._sortDirection=t,this}_isISelectionStrategyImplementation(e){return!!e.select}static buildTargetFrom(e){const t={};let n=ze;for(const r of e){n+=xt(r.value);for(const o of r.assets)t[o.tokenId]=(t[o.tokenId]||ze)+xt(o.amount)}return{nanoErgs:n,tokens:Object.keys(t).map(r=>({tokenId:r,amount:t[r]}))}}},fO=class extends Error{constructor(e){super(`Box '${e}' is already included.`)}},pO=class extends Error{constructor(e){super(e)}},hO=class extends Error{constructor(e){super(`Invalid Ergo address: ${e}`)}},mO=class extends Error{constructor(e){super(`Invalid input: ${e}`)}},gO=class extends Error{constructor(){super("Registers should be densely packed. This means that it's not possible to use a register like 'R7' without filling 'R6', 'R5' and 'R4', for example.")}},Tf=class extends Error{constructor(e){super(`Malformed transaction: ${e}`)}},Tc=120,mu=class extends hc{constructor(e,t){super(),We(e)&&this.add(e,t)}_map(e){return{tokenId:e.tokenId,amount:xt(e.amount)}}_addOne(e,t){if((gt(t)||t.sum&&!We(t.index))&&this._sum(this._map(e)))return this.length;if(this._items.length>=Tc)throw new vO;return super._addOne(e,t),this.length}add(e,t){return super.add(e,t)}_sum(e){for(const t of this._items)if(t.tokenId===e.tokenId)return t.amount+=e.amount,!0;return!1}remove(e,t){let n=-1;if(typeof e=="number"){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);n=e}else if(n=this._items.findIndex(r=>r.tokenId===e),this._isIndexOutOfBounds(n))throw new Oc(`TokenId '${e}' not found in assets collection.`);if(t&&n>-1){const r=xt(t),o=this._items[n];if(r>o.amount)throw new pO("Insufficient token amount to perform a subtraction operation.");if(rt.tokenId===e)}},vO=class extends Error{constructor(){super(`A box must contain no more than ${Tc} distinct tokens.`)}},pg=class extends Error{constructor(){super("This transaction is trying to burn tokens. If that's your intention you must explicitly allow token burning on TransactionBuilder.configure() method. If no, a change address should be provided.")}},Oc=class extends Error{constructor(e){super(e)}},yO=class extends Error{constructor(){super("Minting context is undefined. Transaction's inputs must be included in order to determine minting token id.")}},bO=class extends Error{constructor(){super("Creation Height is undefined.")}},Nr=4,wO=32,gu=Et.decode("0008cd"),_O=36,hg=Et.decode("d40801"),$s=Et.decode("00ea02d193b4cbe4e3010e040004300e18"),xO=44,ys=24;function Of(e){return nr(e)&240}function Pl(e){return nr(e)&15}function Af(e){return typeof e=="string"?Et.decode(e):e}function EO(e){return e.length===_O&&Ud(e,gu)?Jt.P2PK:e.length===xO&&Ud(e,$s)&&Ex(e,hg)?Jt.P2SH:Jt.P2S}function If(e){return Ze(e)||e.length!==33?!1:e[0]===2||e[0]===3}var Qn=class bo{constructor(t,n){be(this,"_ergoTree");be(this,"_network");be(this,"_type");this._ergoTree=t,this._network=n,this._type=EO(t)}get network(){return this._network}get ergoTree(){return Et.encode(this._ergoTree)}get type(){return this._type}static fromErgoTree(t,n){return new bo(Et.decode(t),n)}static fromPublicKey(t,n){const r=Af(t);if(!If(r))throw new Error("The Public Key is invalid.");const o=ps(gu,r);return new bo(o,n)}static fromHash(t,n){if(t=Af(t),t.length===wO)t=t.subarray(0,ys);else if(t.length!=ys)throw Error(`Invalid hash length: ${t.length}`);const r=ps($s,t,hg);return new bo(r,n)}static fromBase58(t,n=!1){const r=Qo.decode(t);if(!n&&!bo.validate(r))throw new hO(t);const o=Of(r),i=Pl(r),s=r.subarray(1,r.length-Nr);return i===Jt.P2PK?this.fromPublicKey(s,o):i===Jt.P2SH?this.fromHash(s,o):new bo(s,o)}static validate(t){const n=typeof t=="string"?Qo.decode(t):t;if(n.length({tokenId:n.tokenId,amount:xt(n.amount)})),this.additionalRegisters=t.additionalRegisters,this.transactionId=t.transactionId,this.index=t.index}isValid(){return mg.validate(this)}static validate(t){const n=dg(t).toBytes(),r=Et.encode(hi(n));return t.boxId===r}},Io,rp,kf=(rp=class extends SO{constructor(t){super(t);ut(this,Io,void 0);t.extension&&this.setContextVars(t.extension)}get extension(){return Ie(this,Io)}setContextExtension(t){const n={};for(const r in t){const o=t[r];o&&(n[r]=typeof o=="string"?o:o.toHex())}return Ye(this,Io,n),this}setContextVars(t){return this.setContextExtension(t)}toUnsignedInputObject(t){return{...this.toPlainObject(t),extension:Ie(this,Io)||{}}}toPlainObject(t){return t==="EIP-12"?{boxId:this.boxId,value:this.value.toString(),ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:this.assets.map(n=>({tokenId:n.tokenId,amount:n.amount.toString()})),additionalRegisters:this.additionalRegisters,transactionId:this.transactionId,index:this.index}:{boxId:this.boxId}}},Io=new WeakMap,rp),CO=class{constructor(e,t,n){be(this,"_inputs");be(this,"_dataInputs");be(this,"_outputs");this._inputs=Object.freeze(e),this._dataInputs=Object.freeze(t),this._outputs=Object.freeze(n)}get id(){return Et.encode(hi(this.toBytes()))}get inputs(){return this._inputs}get dataInputs(){return this._dataInputs}get outputs(){return this._outputs}get burning(){return di(In(this.inputs),In(this.outputs))}toPlainObject(e){return{inputs:this.inputs.map(t=>t.toUnsignedInputObject(e||"default")),dataInputs:this.dataInputs.map(t=>t.toPlainObject(e||"default")),outputs:this.outputs.map(t=>TO(t))}}toEIP12Object(){return this.toPlainObject("EIP-12")}toBytes(){return rO({inputs:this.inputs.map(e=>e.toUnsignedInputObject("default")),dataInputs:this.dataInputs.map(e=>e.toPlainObject("default")),outputs:this.outputs}).toBytes()}};function TO(e){return{...e,value:e.value.toString(),assets:e.assets.map(t=>({tokenId:t.tokenId,amount:t.amount.toString()}))}}var Pf=class extends hc{constructor(e){super(),We(e)&&this.add(e)}_map(e){return e instanceof kf?e:new kf(e)}_addOne(e){if(this._items.some(t=>t.boxId===e.boxId))throw new fO(e.boxId);return super._addOne(e)}remove(e){let t=-1;if(typeof e=="number"){if(this._isIndexOutOfBounds(e))throw new RangeError(`Index '${e}' is out of range.`);t=e}else if(t=this._items.findIndex(n=>n.boxId===e),this._isIndexOutOfBounds(t))throw new Oc("The input you are trying to remove is not present in the inputs collection.");return this._items.splice(t,1),this.length}},OO=class gg extends hc{constructor(t){super(),We(t)&&this.add(t)}_map(t){return t}remove(t){let n=-1;if(typeof t=="number"){if(this._isIndexOutOfBounds(t))throw new RangeError(`Index '${t}' is out of range.`);n=t}else if(n=this._items.lastIndexOf(t),this._isIndexOutOfBounds(n))throw new Oc("The output you are trying to remove is not present in the outputs collection.");return this._items.splice(n,1),this.length}clone(){return new gg(this._items)}sum(t){const n={};let r=ze;if(t&&(t.nanoErgs&&(r=t.nanoErgs),Xe(t.tokens)))for(const o of t.tokens)gt(o.amount)||(n[o.tokenId]=(n[o.tokenId]||ze)+o.amount);for(const o of this._items){r+=o.value;for(const i of o.assets)n[i.tokenId]=(n[i.tokenId]||ze)+i.amount}return{nanoErgs:r,tokens:Object.keys(n).map(o=>({tokenId:o,amount:n[o]}))}}},AO=7,IO=class{constructor(e){be(this,"_bytes");typeof e=="string"?this._bytes=Et.decode(e):this._bytes=e}get header(){return this._bytes[0]}get version(){return this.header&AO}get hasSegregatedConstants(){return(this.header&Gd.constantSegregation)!=0}get hasSize(){return(this.header&Gd.sizeInclusion)!=0}toBytes(){return this._bytes}toHex(){return Et.encode(this.toBytes())}toAddress(e=Ha.Mainnet){return Qn.fromErgoTree(this.toHex(),e)}},vg=BigInt(360),_o=BigInt(1e6);function kO(e=vg){return t=>BigInt(t.estimateSize())*e}var ti=class{constructor(e,t,n){be(this,"_address");be(this,"_tokens");be(this,"_value");be(this,"_valueEstimator");be(this,"_creationHeight");be(this,"_registers");be(this,"_minting");this.setValue(e),this._creationHeight=n,this._tokens=new mu,this._registers={},typeof t=="string"?this._address=gm(t)?Qn.fromErgoTree(t):Qn.fromBase58(t):t instanceof IO?this._address=t.toAddress():this._address=t}get value(){return We(this._valueEstimator)?this._valueEstimator(this):this._value}get address(){return this._address}get ergoTree(){return this._address.ergoTree}get creationHeight(){return this._creationHeight}get assets(){return this._tokens}get additionalRegisters(){return this._registers}get minting(){return this._minting}setValue(e){if(typeof e=="function")this._valueEstimator=e;else if(this._value=xt(e),this._valueEstimator=void 0,this._value<=ze)throw new Error("An UTxO cannot be created without a minimum required amount.");return this}addTokens(e,t){return e instanceof mu?this._tokens.add(e.toArray(),t):this._tokens.add(e,t),this}addNfts(...e){const t=e.map(n=>({tokenId:n,amount:Qs}));return this.addTokens(t)}mintToken(e){return this._minting={...e,amount:xt(e.amount)},this}setCreationHeight(e,t){return(gt(t)||t.replace===!0||t.replace===!1&>(this._creationHeight))&&(this._creationHeight=e),this}setAdditionalRegisters(e){const t={};for(const n in e){const r=e[n];r&&(t[n]=typeof r=="string"?r:r.toHex())}if(!$x(t))throw new gO;return this._registers=t,this}eject(e){return e({tokens:this._tokens}),this}build(e){var n;let t=this.assets.toArray();if(this.minting){if(Ze(e))throw new bO;Ze(this.additionalRegisters)&&this.setAdditionalRegisters({R4:kl(Il,Ol.decode(this.minting.name||"")),R5:kl(Il,Ol.decode(this.minting.description||"")),R6:kl(Il,Ol.decode(((n=this.minting.decimals)==null?void 0:n.toString())||"0"))}),t=[{tokenId:nr(e).boxId,amount:this.minting.amount},...t]}if(gt(this.creationHeight))throw new yO;return{value:this.value,ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:t.map(r=>({tokenId:r.tokenId,amount:r.amount})),additionalRegisters:this.additionalRegisters}}estimateSize(e=_o){Sn(!!this.creationHeight,"Creation height must be set");const t=this._tokens.toArray();this.minting&&t.push({tokenId:"0000000000000000000000000000000000000000000000000000000000000000",amount:this.minting.amount});const n={value:e,ergoTree:this.ergoTree,creationHeight:this.creationHeight,assets:t.map(r=>({tokenId:r.tokenId,amount:r.amount})),additionalRegisters:this.additionalRegisters};return nO(n)}},PO=class extends Error{constructor(e){super(e)}};function BO(e){return{addInputs:t=>e.from(t).configureSelector(n=>n.ensureInclusion(Array.isArray(t)?t.map(r=>r.boxId):t.boxId)).inputs.length,addOutputs:(t,n)=>e.to(t,n).outputs.length,addDataInputs:(t,n)=>e.withDataFrom(t,n).dataInputs.length,burnTokens:t=>{if(!e.settings.canBurnTokensFromPlugins)throw new pg;e.burnTokens(t)},setFee:t=>e.payFee(t)}}var $O=class{constructor(){be(this,"_maxDistinctTokensPerChangeBox");be(this,"_allowTokenBurning");be(this,"_allowTokenBurningFromPlugins");be(this,"_isolateErgOnChange");this._maxDistinctTokensPerChangeBox=Tc,this._allowTokenBurning=!1,this._allowTokenBurningFromPlugins=!1,this._isolateErgOnChange=!1}get maxTokensPerChangeBox(){return this._maxDistinctTokensPerChangeBox}get canBurnTokens(){return this._allowTokenBurning}get canBurnTokensFromPlugins(){return this.canBurnTokens||this._allowTokenBurningFromPlugins}get shouldIsolateErgOnChange(){return this._isolateErgOnChange}setMaxTokensPerChangeBox(e){return this._maxDistinctTokensPerChangeBox=e,this}allowTokenBurning(e=!0){return this._allowTokenBurning=e,this}allowTokenBurningFromPlugins(e=!0){return this._allowTokenBurningFromPlugins=e,this}isolateErgOnChange(e=!0){return this._isolateErgOnChange=e,this}},MO=BigInt(11e5),yg="1005040004000e36100204a00b08cd0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ea02d192a39a8cc7a701730073011001020402d19683030193a38cc7b2a57300000193c2b2a57301007473027303830108cdeeac93b1a57304",DO=class{constructor(e){be(this,"_inputs");be(this,"_dataInputs");be(this,"_outputs");be(this,"_settings");be(this,"_creationHeight");be(this,"_selectorCallbacks");be(this,"_changeAddress");be(this,"_feeAmount");be(this,"_burning");be(this,"_plugins");this._inputs=new Pf,this._dataInputs=new Pf,this._outputs=new OO,this._settings=new $O,this._creationHeight=e}get inputs(){return this._inputs}get dataInputs(){return this._dataInputs}get outputs(){return this._outputs}get changeAddress(){return this._changeAddress}get fee(){return this._feeAmount}get burning(){return this._burning}get settings(){return this._settings}get creationHeight(){return this._creationHeight}get and(){return this}from(e){return RO(e)&&(e=e.toArray()),this._inputs.add(e),this}to(e,t){return this._outputs.add(e,t),this}withDataFrom(e,t){return this._dataInputs.add(e,t),this}sendChangeTo(e){return typeof e=="string"?this._changeAddress=gm(e)?Qn.fromErgoTree(e,Ha.Mainnet):Qn.fromBase58(e):this._changeAddress=e,this}payFee(e){return this._feeAmount=xt(e),this}payMinFee(){return this.payFee(MO),this}burnTokens(e){return this._burning||(this._burning=new mu),this._burning.add(e),this}configure(e){return e(this._settings),this}configureSelector(e){return gt(this._selectorCallbacks)&&(this._selectorCallbacks=[]),this._selectorCallbacks.push(e),this}extend(e){return this._plugins||(this._plugins=[]),this._plugins.push({execute:e,pending:!0}),this}eject(e){return e({inputs:this.inputs,dataInputs:this.dataInputs,outputs:this.outputs,burning:this.burning,settings:this.settings,selection:t=>{this.configureSelector(t)}}),this}build(){if(Xe(this._plugins)){const s=BO(this);for(const a of this._plugins)a.pending&&(a.execute(s),a.pending=!1)}if(this._isMinting()){if(this._isMoreThanOneTokenBeingMinted())throw new Tf("only one token can be minted per transaction.");if(this._isTheSameTokenBeingMintedOutsideTheMintingBox())throw new PO("EIP-4 tokens cannot be minted from outside of the minting box.")}this.outputs.toArray().map(s=>s.setCreationHeight(this._creationHeight,{replace:!1}));const e=this.outputs.clone();We(this._feeAmount)&&e.add(new ti(this._feeAmount,yg));const t=new dO(this.inputs.toArray());if(Xe(this._selectorCallbacks))for(const s of this._selectorCallbacks)s(t);const n=Xe(this._burning)?e.sum({tokens:this._burning.toArray()}):e.sum();let r=t.select(n);if(We(this._changeAddress)){let s=di(In(r),n);const a=[];if(Xe(s.tokens)){let l=Bf({changeAddress:this._changeAddress,creationHeight:this._creationHeight,tokens:s.tokens,maxTokensPerBox:this.settings.maxTokensPerChangeBox,baseIndex:this.outputs.length+1});for(;l>s.nanoErgs;)r=t.select({nanoErgs:n.nanoErgs+l,tokens:n.tokens}),s=di(In(r),n),l=Bf({changeAddress:this._changeAddress,creationHeight:this._creationHeight,tokens:s.tokens,maxTokensPerBox:this.settings.maxTokensPerChangeBox,baseIndex:this.outputs.length+1});const u=cm(s.tokens,this._settings.maxTokensPerChangeBox);for(const c of u){const d=new ti(kO(),this._changeAddress,this._creationHeight).addTokens(c);s.nanoErgs-=d.value,a.push(d)}}if(s.nanoErgs>ze)if(Xe(a)){if(this.settings.shouldIsolateErgOnChange)e.add(new ti(s.nanoErgs,this._changeAddress));else{const l=nr(a);l.setValue(l.value+s.nanoErgs)}e.add(a)}else e.add(new ti(s.nanoErgs,this._changeAddress))}for(const s of r)if(!s.isValid())throw new mO(s.boxId);const o=new CO(r,this.dataInputs.toArray(),e.toArray().map(s=>s.setCreationHeight(this._creationHeight,{replace:!1}).build(r)));let i=o.burning;if(i.nanoErgs>ze)throw new Tf("it's not possible to burn ERG.");if(Xe(i.tokens)&&Xe(this._burning)&&(i=di(i,{nanoErgs:ze,tokens:this._burning.toArray()})),!this._settings.canBurnTokens&&Xe(i.tokens))throw new pg;return o}_isMinting(){for(const e of this._outputs)if(e.minting)return!0;return!1}_isMoreThanOneTokenBeingMinted(){let e=0;for(const t of this._outputs)if(We(t.minting)&&(e++,e>1))return!0;return!1}_isTheSameTokenBeingMintedOutsideTheMintingBox(){const e=this._getMintingTokenId();if(gt(e))return!1;for(const t of this._outputs)if(t.assets.contains(e))return!0;return!1}_getMintingTokenId(){let e;for(const t of this._outputs)if(t.minting){e=t.minting.tokenId;break}return e}};function RO(e){return e.toArray!==void 0}function Bf(e){return BigInt(LO(e))*vg}function LO({changeAddress:e,creationHeight:t,tokens:n,baseIndex:r,maxTokensPerBox:o}){const i=Math.ceil(n.length/o);let s=0;s+=$t(_o),s+=fi(e.ergoTree),s+=$t(t),s+=$t(0),s+=32,s=s*i;for(let a=0;aa+=fi(l.tokenId)+$t(l.amount),0),n.length>o?n.length%o>0?(s+=$t(o)*Math.floor(n.length/o),s+=$t(n.length%o)):s+=$t(o)*i:s+=$t(n.length),s}const FO=Qn.fromErgoTree(yg).encode();function $f(e){return t=>{var o;const n=t.inputs.filter(i=>{var s;return((s=i.box)==null?void 0:s.address)===e}).map(i=>i.box),r=t.outputs.filter(i=>i.address===e);return{transactionId:t.transactionId,timestamp:Number(t.timestamp),inclusionHeight:t.inclusionHeight,fee:BigInt(((o=t.outputs.find(i=>i.address===FO))==null?void 0:o.value)??0),balance:NO(di(r,n))}}}function NO(e){const t=e.tokens.map(n=>({tokenId:n.tokenId,amount:Kt(String(n.amount))}));return t.unshift({tokenId:Cn,amount:Kt(String(e.nanoErgs))}),t}var VO=/(query|mutation)\s?([\w\-_]+)?/,zO={"content-type":"application/json; charset=utf-8",accept:"application/graphql-response+json, application/json"};function HO(e,t){return async n=>{const o=await(await(t.fetcher??fetch)(t.url,{method:"POST",headers:mm(t.headers,zO),credentials:t.credentials,body:(t.parser??JSON).stringify({operationName:jO(e),query:e,variables:n?Mx(n):void 0})})).text(),i=(t.parser??JSON).parse(o);if(t.throwOnNonNetworkErrors&&Xe(i.errors)&&Ze(i.data))throw new Rx(i.errors[0].message,{cause:i.errors});return i}}function jO(e){var t;return(t=VO.exec(e))==null?void 0:t.at(2)}function UO(e){return typeof e=="object"&&e.url!==void 0}var pn=["query boxes($spent: Boolean! $boxIds: [String!] $ergoTrees: [String!] $ergoTreeTemplateHash: String $tokenId: String $skip: Int $take: Int)","boxIds: $boxIds ergoTrees: $ergoTrees ergoTreeTemplateHash: $ergoTreeTemplateHash tokenId: $tokenId skip: $skip take: $take","boxId transactionId index value creationHeight ergoTree assets { tokenId amount } additionalRegisters beingSpent"],WO=`${pn[0]} { boxes(spent: $spent ${pn[1]}) { ${pn[2]} } }`,GO=`${pn[0]} { mempool { boxes(${pn[1]}) { ${pn[2]} } } }`,KO=`${pn[0]} { boxes(spent: $spent ${pn[1]}) { ${pn[2]} } mempool { boxes(${pn[1]}) { ${pn[2]} } } }`,qO="query blockHeaders($take: Int) { blockHeaders(take: $take) {headerId timestamp version adProofsRoot stateRoot transactionsRoot nBits extensionHash powSolutions height difficulty parentId votes } }",YO="mutation checkTransaction($signedTransaction: SignedTransaction!) { checkTransaction(signedTransaction: $signedTransaction) }",XO="mutation submitTransaction($signedTransaction: SignedTransaction!) { submitTransaction(signedTransaction: $signedTransaction) }",Ms=50,Mi,Di,Ri,Li,Fi,Ni,Vi,aa,bg,op,ZO=(op=class{constructor(e){ut(this,aa);ut(this,Mi,void 0);ut(this,Di,void 0);ut(this,Ri,void 0);ut(this,Li,void 0);ut(this,Fi,void 0);ut(this,Ni,void 0);ut(this,Vi,void 0);Ye(this,Mi,{...UO(e)?e:{url:e},throwOnNonNetworkErrors:!0}),Ye(this,Di,this.createOperation(WO)),Ye(this,Ri,this.createOperation(GO)),Ye(this,Li,this.createOperation(KO)),Ye(this,Fi,this.createOperation(qO)),Ye(this,Ni,this.createOperation(YO)),Ye(this,Vi,this.createOperation(XO))}async*streamBoxes(e){if(Ze(e.where))throw new Error("Cannot fetch unspent boxes without a where clause.");const t=u=>!u.beingSpent,n=new Set,{where:r,from:o}=e,i=QO(r);let s=o!=="mempool",a=o!=="blockchain";const l=a;do{const u=await Nc(this,aa,bg).call(this,i,s,a),{data:c}=u;let d=[];if(s&&eA(c)){if(Xe(c.boxes)){const p=(l?c.boxes.filter(t):c.boxes).map(Mf(!0));d=d.concat(p)}s=c.boxes.length===Ms}if(l&&JO(c)){if(Xe(c.mempool.boxes)){const p=c.mempool.boxes.filter(t).map(Mf(!1));d=d.concat(p)}a=c.mempool.boxes.length===Ms}Xe(d)&&(d.some(p=>n.has(p.boxId))&&(d=d.filter(p=>!n.has(p.boxId))),Xe(d)&&(d=Sx(d,p=>p.boxId),d.forEach(p=>n.add(p.boxId)),yield d)),(s||a)&&(i.skip+=Ms)}while(s||a)}async getBoxes(e){let t=[];for await(const n of this.streamBoxes(e))t=t.concat(n);return Zs(t,n=>n.creationHeight)}async getHeaders(e){var n;return((n=(await Ie(this,Fi).call(this,e)).data)==null?void 0:n.blockHeaders.map(r=>({...r,id:r.headerId,timestamp:Number(r.timestamp),nBits:Number(r.nBits),votes:r.votes.join("")})))??[]}createOperation(e,t){const n=mm(t,Ie(this,Mi));return n.throwOnNonNetworkErrors=!0,HO(e,n)}async checkTransaction(e){try{return{success:!0,transactionId:(await Ie(this,Ni).call(this,{signedTransaction:e})).data.checkTransaction}}catch(t){return{success:!1,message:t.message}}}async submitTransaction(e){try{return{success:!0,transactionId:(await Ie(this,Vi).call(this,{signedTransaction:e})).data.submitTransaction}}catch(t){return{success:!1,message:t.message}}}reduceTransaction(){throw new Dx("Transaction reducing is not supported by ergo-graphql.")}},Mi=new WeakMap,Di=new WeakMap,Ri=new WeakMap,Li=new WeakMap,Fi=new WeakMap,Ni=new WeakMap,Vi=new WeakMap,aa=new WeakSet,bg=function(e,t,n){return t&&n?Ie(this,Li).call(this,e):n?Ie(this,Ri).call(this,e):Ie(this,Di).call(this,e)},op);function QO(e){const t={spent:!1,boxIds:Bl(e.boxIds,e.boxId),ergoTrees:Bl(e.ergoTrees,e.ergoTree),ergoTreeTemplateHash:e.templateHash,tokenId:e.tokenId,skip:0,take:Ms},n=Bl(e.addresses,e.address);if(Xe(n)){const r=n.map(o=>typeof o=="string"?Qn.fromBase58(o).ergoTree:o.ergoTree);t.ergoTrees=dm(Xe(t.ergoTrees)?t.ergoTrees.concat(r):r)}return t}function Bl(e,t){if(Ze(e)&>(t))return;const n=new Set(e??[]);return gt(t)||n.add(t),Array.from(n.values())}function JO(e){var t;return!!((t=e==null?void 0:e.mempool)!=null&&t.boxes)}function eA(e){return!!(e!=null&&e.boxes)}function Mf(e){return t=>({...t,value:BigInt(t.value),assets:t.assets.map(n=>({tokenId:n.tokenId,amount:BigInt(n.amount)})),confirmed:e})}var zi,Hi,ji,ko,Ui;class tA extends ZO{constructor(){super("https://gql.ergoplatform.com/");ut(this,zi,void 0);ut(this,Hi,void 0);ut(this,ji,void 0);ut(this,ko,void 0);ut(this,Ui,void 0);Ye(this,zi,this.createOperation(nA)),Ye(this,Hi,this.createOperation(lA)),Ye(this,ji,this.createOperation(rA)),Ye(this,ko,this.createOperation(oA)),Ye(this,Ui,this.createOperation(iA))}async getCurrentHeight(){var r;return((r=(await Ie(this,zi).call(this)).data)==null?void 0:r.blockHeaders[0].height)??0}async getConfirmedTransactions(n,r){var i;return((i=(await Ie(this,ko).call(this,{address:n,minHeight:r})).data)==null?void 0:i.transactions)??[]}async getMempoolTransactions(n){var o,i;return((i=(o=(await Ie(this,Ui).call(this,{address:n})).data)==null?void 0:o.mempool)==null?void 0:i.transactions)??[]}async getUnconfirmedTransactions(n,r){var i;return((i=(await Ie(this,ko).call(this,{address:n,minHeight:r})).data)==null?void 0:i.transactions)??[]}async getState(n){var o,i;const r=await Ie(this,Hi).call(this,{address:n});return{height:((o=r.data)==null?void 0:o.blockHeaders[0].height)??0,mempoolTransactionIds:(i=r.data)==null?void 0:i.mempool.transactions.map(s=>s.transactionId)}}async*streamMetadata(n){var o;const r=cm(n,20);for(const i of r){const s=await Ie(this,ji).call(this,{tokenIds:i});(o=s.data)!=null&&o.tokens&&(yield s.data.tokens)}}}zi=new WeakMap,Hi=new WeakMap,ji=new WeakMap,ko=new WeakMap,Ui=new WeakMap;const nA="query height { blockHeaders(take: 1) { height } }",rA="query tokens($tokenIds: [String!]!) { tokens(tokenIds: $tokenIds) { tokenId name decimals } }",ta="address value assets { tokenId amount } index",oA=`query confirmedTransactions($address: String $minHeight: Int $take: Int $skip: Int) { transactions(address: $address, take: $take, skip: $skip, minHeight: $minHeight) { transactionId timestamp inclusionHeight inputs { box { ${ta} } } outputs(relevantOnly: true) { ${ta} } } }`,iA=`query mempoolTransactions($address: String $take: Int $skip: Int) { mempool { transactions(address: $address, take: $take, skip: $skip) { transactionId timestamp inputs { box { ${ta} } } outputs { ${ta} } } } }`,sA="blockHeaders(take: 1) { height }",aA="mempool { transactions(address: $address) { transactionId } }",lA=`query state($address: String) { ${sA} ${aA} }`,Kn=new tA;async function vu(e,t){return We(t)&&Object.keys(t).map(r=>e.searchParams.append(r,t[r])),await(await fetch(e,{headers:{"Content-Type":"application/json"}})).json()}const Df="https://api.spectrum.fi",wg="0000000000000000000000000000000000000000000000000000000000000000";class uA{async getPoolsStats(){return vu(new URL("v1/amm/pools/stats",Df))}async getActivePools(){const t=new Date;return t.setDate(t.getDate()-30),vu(new URL("v1/price-tracking/markets",Df),{from:this._getUtcTimestamp(t),to:this._getUtcTimestamp(new Date)})}_getUtcTimestamp(t){return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}}const _g=new uA,cA=Kt(1),dA=1e3,fA="https://api.coingecko.com/api/",pA="cbd75cfe1a4f37f9a22eaee516300e36ea82017073036f07a09c1d2e10277cda",hA="6e9c85c4be018b1308ddf034baf1406490e2a9dd406c01591bd6df41e98b6057",mA="100a040204000402040004000502050005d00f04040e2002a195c991b685f1bbf6c84cb192f698ecccc3c707b7293c21d27655ade8d56ed812d601db6308a7d602b27201730000d6038c720202d604b2a5730100d605db63087204d606b27205730200d6078c720602d6089972037207d609c17204d60a7ec1a706d60be4c6a70505d60c7e720b06d60de4c6a70405d60e9d9c720a720c7e99720d720306d60fe4c6a70605d610e4c6a70705d611e4c6a70805d61296830401927209720f93c27204c2a79683030193b27205730300b27201730400938c7206018c72020192720773059683050193e4c672040405720d93e4c672040505720b93e4c672040605720f93e4c672040705721093e4c6720408057211959172087306d1968302017212927e7209069a720a9d9c7e720806720e720cd803d6139d9c7e997207720306720e720cd6147307d615b2a5730800d1968303017212937e7209069a99720a72139d9c72137e7211067e72140696830201937ec17215069d9c72137e7210067e72140693cbc272157309";async function gA(){return(await vu(new URL("v3/simple/price",fA),{ids:"ergo",vs_currencies:"usd"})).ergo.usd}async function vA(){const[e,t]=await Promise.all([_g.getActivePools(),xg.getHighLiquidityTokenIds()]),n=new Map;return VC(e.filter(r=>r.baseId===wg&&t.includes(r.quoteId)),(r,o)=>r.quoteId===o.quoteId&&r.baseVolume.value<=o.baseVolume.value).map(r=>n.set(r.quoteId,cA.div(r.lastPrice))),n}async function yA(){let e=await Kn.getBoxes({from:"blockchain",where:{ergoTree:mA}});if(e=e.filter(a=>Xe(a.assets)&&a.assets[0].tokenId===hA),Ze(e))return;const t=nr(e),n=t.assets[1];if(!n||!t.additionalRegisters.R4)return;const r=BigInt(t.value),o=QT(t.additionalRegisters.R4),i=BigInt(n.amount),s=o-i;return Kt(String(r)).div(String(s))}var Po;class bA{constructor(){ut(this,Po,void 0)}async getHighLiquidityTokenIds(){if(!Ie(this,Po)){const t=await _g.getPoolsStats();Ye(this,Po,t.filter(n=>n.lockedX.id===wg&&n.tvl.value>=dA).map(n=>n.lockedY.id))}return Ie(this,Po)}async getTokenRates(){const[t,n,r]=await Promise.all([gA(),vA(),yA()]),o={[Cn]:{erg:1,fiat:t}};r&&(o[pA]={erg:r.toNumber(),fiat:r.times(t).toNumber()});for(const[i,s]of n)o[i]={erg:s.toNumber(),fiat:s.times(t).toNumber()};return o}}Po=new WeakMap;const xg=new bA,wA={name:"ERG",decimals:wo},$r=mh("chain",()=>{const e=Uo();let t,n=Date.now();const r=U(!0),o=U(!1),i=Co("height",0),s=U(new Set),a=Co("prices-cache",{}),l=Co("token-metadata-cache",{[Cn]:wA});ye(i,(h,v)=>{v&&u()}),ye(()=>e.balance,()=>{if(Ze(e.balance))return;const h=e.balance.map(v=>v.tokenId);d(h)}),Ue(async()=>{t=setInterval(c,4e3),await Promise.all([c(),u()]),r.value=!1}),_a(()=>{clearInterval(t)});async function u(){a.value=await xg.getTokenRates()}async function c(){let h=0;if(e.address){const v=await Kn.getState(e.address);h=v.height,Date.now()>n+1e4&&(s.value.clear(),n=Date.now()),Xe(v.mempoolTransactionIds)&&v.mempoolTransactionIds.map(b=>s.value.add(b))}else h=await Kn.getCurrentHeight();h&&i.value!==h&&(i.value=h)}async function d(h){const v=Object.keys(l.value);if(h=h.filter(b=>!v.includes(b)),!Ze(h)){h=dm(h);for await(const b of Kn.streamMetadata(h))for(const w of b)l.value[w.tokenId]={name:w==null?void 0:w.name,decimals:w.decimals};r.value&&(r.value=!1)}}function p(h=!0){o.value=h}return{prices:a,metadata:l,loading:r,height:i,mempoolTxIds:s,waitingTransaction:o,setWaitingTransaction:p,loadMetadata:d}}),bs="npm:@nautls/ergsnap",Ds={async getVersion(){var e;return(e=await CA(bs))==null?void 0:e.version},async connect(){try{return await SA(bs),!0}catch(e){return console.error(e),!1}},async getAddress(){return await na().request({method:"wallet_invokeSnap",params:{snapId:bs,request:{method:"get_address"}}})},async signTx(e){return await na().request({method:"wallet_invokeSnap",params:{snapId:bs,request:{method:"sign_tx",params:{tx:e}}}})}};function _A(){var e;return((e=window.ethereum)==null?void 0:e.isMetaMask)??!1}function xA(){var e;return((e=window.ethereum)==null?void 0:e.isConnected())??!1}function na(){if(window.ethereum)return window.ethereum;throw new Error("Metamask provider is not available.")}async function EA(){return await na().request({method:"wallet_getSnaps"})}async function SA(e,t={}){await na().request({method:"wallet_requestSnaps",params:{[e]:t}})}async function CA(e,t){try{const n=await EA();return Object.values(n).find(r=>r.id===e&&(!t||r.version===t))}catch(n){console.error("Failed to obtain installed snap",n);return}}const{freeze:Eg}=Object,ra=e=>Eg(Kt(e)),TA={read(e){return JSON.parse(e).map(n=>({tokenId:n.tokenId,amount:ra(n.amount)}))},write(e){return JSON.stringify(e.map(t=>({tokenId:t.tokenId,amount:t.amount.toString()})))}},OA={read(e){return JSON.parse(e).map(n=>({...n,fee:n.fee?BigInt(n.fee):void 0,balance:n.balance.map(r=>({tokenId:r.tokenId,amount:ra(r.amount)}))}))},write(e){return JSON.stringify(e.map(t=>{var n;return{...t,fee:(n=t.fee)==null?void 0:n.toString(),balance:t.balance.map(r=>({tokenId:r.tokenId,amount:r.amount.toString()}))}}))}},Uo=mh("wallet",()=>{const e=$r(),t=U([]),n=U([]),r=U([]),o=U([]),i=U(!0),s=U(!1),a=U("");let l=!1,u=!1,c=!1,d;Ue(async()=>{s.value=_A()&&xA()&&!!await Ds.getVersion(),s.value&&await S(),i.value=!1}),ye(s,async I=>{I?(await S(),i.value=!0):(n.value=[],r.value=[]),i.value=!1}),ye(()=>e.height,()=>Promise.all([b(),h(),v()])),ye(()=>e.mempoolTxIds,async()=>{const[I]=await Promise.all([v(),b()]);I&&e.setWaitingTransaction(!1)},{deep:!0}),ye(a,I=>{Co(`${I}-balance`,t,localStorage,{serializer:TA}),Co(`${I}-tx-history`,r,localStorage,{serializer:OA}),Promise.all([b(),h(),v()])}),ye(n,w);const p=q(()=>{const I=ks(o.value,r.value,F=>F.transactionId);return Zs(r.value.concat(I),F=>F.timestamp,"desc")});async function h(){if(!a.value||u)return;u=!0;try{const F=await Kn.getConfirmedTransactions(a.value,d),V=ks(F,r.value,N=>N.transactionId).map($f(a.value));r.value=r.value.concat(V),e.loadMetadata(V.flatMap(N=>N.balance.map(H=>H.tokenId)))}finally{u=!1}const I=MC(r.value,F=>F.inclusionHeight);I?d=I.inclusionHeight===d?e.height:I.inclusionHeight:d=e.height}async function v(){if(!a.value||c)return!1;c=!0;try{const F=(await Kn.getMempoolTransactions(a.value)).map($f(a.value)),V=Xe(ks(F,o.value,N=>N.transactionId));return V&&(o.value=F,e.loadMetadata(o.value.flatMap(N=>N.balance.map(H=>H.tokenId)))),V}finally{c=!1}}async function b(){if(!(!a.value||l)){l=!0;try{const I=await Kn.getBoxes({where:{address:a.value}});n.value=Eg(I)}finally{l=!1}}}function w(){if(Ze(n)){t.value=[];return}const I=In(n.value),F=Zs(I.tokens.map(V=>({tokenId:V.tokenId,amount:ra(V.amount.toString())})),V=>V.tokenId);F.unshift({tokenId:Cn,amount:ra(I.nanoErgs.toString())}),t.value=F}async function S(){a.value=await Ds.getAddress()}async function _(){try{i.value=!0,s.value=await Ds.connect()}finally{i.value=!1}return s.value}return{connect:_,connected:s,loading:i,address:a,balance:t,history:p}});function Sg(e){navigator.clipboard.writeText(e)}function Ti(e,t,n="middle"){if(!e||!t||t>=e.length)return e||"";const r="…";if(n==="middle"){const o=Math.trunc((t-r.length)/2);return o*2+r.length>=e.length?e:`${e.slice(0,o).trimEnd()}${r}${e.slice(e.length-o).trimStart()}`}else return`${e.slice(0,t-r.length+1).trimEnd()}${r}`}const AA={class:"flex gap-2"},IA=Se("p",null,"Click to copy",-1),kA=W({__name:"AppHeader",setup(e){const{toast:t}=Aa(),n=Uo(),r=ib();function o(){Sg(n.address),t({title:"Copied!",description:"Your address has been copied to the clipboard."})}function i(){r.value=r.value==="dark"?"light":"dark"}return(s,a)=>(D(),j(f(Gu),{class:"flex-row items-center gap-2 space-y-0"},{default:B(()=>[K(f(mb),{class:"h-10 w-10"}),K(f(Ku),{class:"flex-grow cursor-default tracking-normal"},{default:B(()=>[Re("Ergo Wallet")]),_:1}),Se("div",AA,[f(n).address?(D(),j(f(gx),{key:1,"delay-duration":200},{default:B(()=>[K(f(px),null,{default:B(()=>[K(f(mx),null,{default:B(()=>[K(f(Un),{variant:"secondary",onClick:o},{default:B(()=>[Re(it(f(Ti)(f(n).address,10)),1)]),_:1})]),_:1}),K(f(hx),null,{default:B(()=>[IA]),_:1})]),_:1})]),_:1})):(D(),j(f(Un),{key:0,class:"gap-2",variant:"outline",loading:f(n).loading,onClick:a[0]||(a[0]=l=>f(n).connect())},{loading:B(()=>[Re("Connecting...")]),default:B(()=>[Re(" Connect Wallet ")]),_:1},8,["loading"])),K(f(Un),{size:"icon",variant:"outline",onClick:a[1]||(a[1]=l=>i())},{default:B(()=>[f(r)==="dark"?(D(),j(f(My),{key:0,size:16})):(D(),j(f(Ny),{key:1,size:16}))]),_:1})])]),_:1}))}}),PA=Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2}),BA=1e6;function Ac(e,t,n=!1){var i;if(!e)return"";const r=((i=t.metadata[e.tokenId])==null?void 0:i.decimals)??0;let o=typeof e.amount=="bigint"?Kt(String(e.amount)):e.amount;return n&&(o=o.isNegative()?o.negated():o),Ai(Ka(o,r),r)}function Oi(e,t,n=20){var r;return e?Ti(((r=t.metadata[e.tokenId])==null?void 0:r.name)||e.tokenId,n):""}function Ai(e,t){return gt(e)?"0":e.isGreaterThanOrEqualTo(BA)?PA.format(e.toNumber()):e.decimalPlaces(t||0,Kt.ROUND_DOWN).toFormat({groupSeparator:",",groupSize:3,decimalSeparator:"."})}function $A(e,t){return t?e.decimalPlaces(t).shiftedBy(t):e}function Ka(e,t){return t?e.decimalPlaces(t).shiftedBy(t*-1):e}const MA={ERG:"ergo.png","003bd19d0187117f130b62e1bcab0939929ff5c7709f843c5c4dd158949285d0":"sigrsv.svg","03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04":"sigusd.svg","36aba4b4a97b65be491cf9f5ca57b5408b0da8d0194f30ec8330d1e8946161c1":"erdoge.svg",fbbaac7337d051c10fc3da0ccb864f4d32d40027551e1c3ea3ce361f39b91e40:"kushti.svg","0cd8c9f416e5b1ca9f986a7f10a84191dfb85941619e49e53c0dc30ebf83324b":"comet.png","472c3d4ecaa08fb7392ff041ee2e6af75f4a558810a74b28600549d5392810e8":"neta.svg",d71693c49a84fbbecd4908c94813b46514b18b67a99952dc1e6e4791556de413:"ergopad.svg","1fd6e032e8476c4aa54c18c1a308dce83940e8f4a28f576440513ed7326ad489":"paideia.svg","00b1e236b60b95c2c6f8007a9d89bc460fc9e78f98b09faec9449007b40bccf3":"egio.svg","007fd64d1ee54d78dd269c8930a38286caa28d3f29d27cadcb796418ab15c283":"exle.svg","02f31739e2e4937bb9afb552943753d1e3e9cdd1a5e5661949cb0cef93f907ea":"terahertz.svg",e8b20745ee9d18817305f32eb21015831a48f02d40980de6e849f886dca7f807:"flux.svg","00bd762484086cf560d3127eb53f0769d76244d9737636b2699d55c56cd470bf":"epos.svg","18c938e1924fc3eadc266e75ec02d81fe73b56e4e9f4e268dffffcb30387c42d":"aht.svg","3405d8f709a19479839597f9a22a7553bdfc1a590a427572787d7c44a88b6386":"love.svg","4c8ac00a28b198219042af9c03937eecb422b34490d55537366dc9245e85d4e1":"woodennickels.svg","9a06d9e545a41fd51eeffc5e20d818073bf820c635e2a9d922269913e0de369d":"spf.svg","089990451bb430f05a85f4ef3bcb6ebf852b3d6ee68d86d78658b9ccef20074f":"quacks.svg",cbd75cfe1a4f37f9a22eaee516300e36ea82017073036f07a09c1d2e10277cda:"empty.svg","8b08cdd5449a9592a9e79711d7d79249d7a03c535d17efaee83e216e80a44c4b":"rosen.svg",e023c5f382b6e96fbd878f6811aac73345489032157ad5affb84aefd4956c297:"rsada.svg"},DA={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},RA=Se("path",{d:"M12.022.147a.924.924 0 0 0-.356.071l-7.74 3.207a.927.927 0 0 0-.501.503L.218 11.667a.93.93 0 0 0 0 .712l3.207 7.738a.927.927 0 0 0 .502.504l7.739 3.206a.933.933 0 0 0 .712 0l7.74-3.206a.931.931 0 0 0 .502-.504l3.206-7.739a.93.93 0 0 0 0-.712L20.62 3.928a.93.93 0 0 0-.503-.503L12.378.218a.926.926 0 0 0-.356-.07z",style:{"stroke-width":"1.18749"}},null,-1),LA=Se("path",{fill:"url(#a)",d:"M12.872 14.313h-2.016c.005-.48.041-.89.11-1.238a2.945 2.945 0 0 1 .372-.95c.178-.281.416-.56.713-.837.247-.223.463-.437.647-.639.185-.202.33-.41.436-.622.104-.218.157-.46.157-.727 0-.308-.047-.564-.142-.766a.97.97 0 0 0-.41-.47 1.316 1.316 0 0 0-.681-.16c-.226 0-.437.05-.633.152a1.18 1.18 0 0 0-.482.446c-.121.202-.184.47-.19.798H8.46c.015-.728.181-1.33.498-1.802a2.874 2.874 0 0 1 1.289-1.062 4.492 4.492 0 0 1 1.81-.351c.74 0 1.371.122 1.898.368a2.63 2.63 0 0 1 1.212 1.06c.277.463.418 1.027.418 1.692 0 .463-.09.875-.269 1.236a4.23 4.23 0 0 1-.704.998c-.29.309-.61.63-.957.958-.3.271-.506.556-.618.854-.104.297-.16.652-.166 1.062zm-2.254 2.465c0-.34.117-.622.348-.846.232-.229.543-.343.934-.343.384 0 .693.114.925.343.237.224.356.506.356.846 0 .33-.119.61-.356.838-.232.23-.54.343-.926.343-.39 0-.701-.114-.933-.343a1.132 1.132 0 0 1-.348-.838Z",opacity:".5",style:{fill:"url(#a)","stroke-width":"1.18749"}},null,-1),FA=Se("defs",null,[Se("linearGradient",{id:"a",x1:"12",x2:"12",y1:"7",y2:"17",gradientTransform:"translate(-2.228 -2.228) scale(1.1875)",gradientUnits:"userSpaceOnUse"},[Se("stop"),Se("stop",{offset:"1"})])],-1),NA=[RA,LA,FA];function VA(e,t){return D(),Te("svg",DA,[...NA])}const zA={render:VA},HA={class:"min-w-max"},jA=["src"],Ic=W({__name:"AssetIcon",props:{tokenId:{type:String,required:!0},customClass:{type:String,default:""}},setup(e){const t=e,n=q(()=>{const s=MA[t.tokenId];if(s)return`./asset-icons/${s}`}),r=q(()=>We(n.value)),o=q(()=>i(t.tokenId));function i(s){if(!(s.length<6))return`#${s.substring(0,6)}`}return(s,a)=>(D(),Te("div",HA,[r.value?(D(),Te("img",{key:0,class:lt(e.customClass),src:n.value},null,10,jA)):(D(),j(f(zA),{key:1,class:lt([e.customClass,"fill-gray-400 opacity-80"]),style:qt(`fill: ${o.value}`)},null,8,["class","style"]))]))}}),UA=W({__name:"AssetPrice",props:{asset:{type:Object,default:void 0},customClass:{type:String,default:""}},setup(e){const t=$r(),n=e,r=q(()=>{var o,i,s;if(!(!n.asset||!((o=t.prices[n.asset.tokenId])!=null&&o.fiat)))return Ka(n.asset.amount,((i=t.metadata[n.asset.tokenId])==null?void 0:i.decimals)??0).multipliedBy(((s=t.prices[n.asset.tokenId])==null?void 0:s.fiat)||0)});return(o,i)=>(D(),Te("div",{class:lt(["text-base-content skeleton min-w-min whitespace-nowrap text-xs opacity-70",e.customClass])},[Se("span",null,"≈ "+it(f(Ai)(r.value,2))+" USD",1)],2))}});function WA(e){if(!(!e||e===Cn))return new URL(`token/${e}`,Sc).href}function GA(e){if(e)return new URL(`addresses/${e}`,Sc).href}function KA(e){return new URL(`transactions/${e}`,Sc).href}const qA=["href"],Cg=W({__name:"ExplorerLink",props:{type:{type:String,required:!0},value:{type:String,required:!0},outside:{type:Boolean,default:!1}},setup(e){const t=e,n=q(()=>t.type==="token"?WA(t.value):t.type==="address"?GA(t.value):t.type==="transaction"?KA(t.value):"#");return(r,o)=>(D(),Te("a",ce({href:n.value,target:"_blank"},r.$attrs),[X(r.$slots,"default")],16,qA))}}),YA={class:"flex-grow"},Tg=W({__name:"AssetRow",props:{asset:{type:Object,default:void 0},rootClass:{type:String,default:""},nameClass:{type:String,default:""},amountClass:{type:String,default:""},logoClass:{type:String,default:""},maxNameLen:{type:Number,default:20},displayPrice:{type:Boolean,default:!0},displaySignaling:{type:Boolean,default:!1},link:Boolean},setup(e){const t=$r();return(n,r)=>{var o;return D(),Te("div",{class:lt(f($e)(["flex w-full items-center justify-start gap-2",e.rootClass]))},[e.asset?(D(),Te(qe,{key:0},[e.displaySignaling?(D(),Te(qe,{key:0},[e.asset.amount.isNegative()?(D(),j(f(Py),{key:0,size:16,class:"text-red-500/70"})):(D(),j(f(By),{key:1,size:16,class:"text-green-500/70"}))],64)):pt("",!0),K(Ic,{"token-id":e.asset.tokenId,"custom-class":e.logoClass},null,8,["token-id","custom-class"]),Se("div",YA,[e.link&&e.asset.tokenId!==f(Cn)?(D(),j(Cg,{key:0,class:lt(f($e)(["break-all",e.nameClass])),value:e.asset.tokenId,type:"token"},{default:B(()=>{var i;return[Re(it(f(Oi)(e.asset,f(t),(i=f(t).metadata[e.asset.tokenId])!=null&&i.name?e.maxNameLen:10)),1)]}),_:1},8,["class","value"])):(D(),Te("div",{key:1,class:lt(f($e)(["break-all",e.nameClass]))},it(f(Oi)(e.asset,f(t),(o=f(t).metadata[e.asset.tokenId])!=null&&o.name?e.maxNameLen:10)),3))]),Se("div",{class:lt(f($e)(["text-right",e.amountClass]))},[Se("div",null,it(f(Ac)(e.asset,f(t))),1),e.displayPrice?(D(),j(UA,{key:0,asset:e.asset},null,8,["asset"])):pt("",!0)],2)],64)):(D(),Te(qe,{key:1},[Se("div",{class:lt([e.nameClass,"skeleton-fixed h-4 w-8/12"])},null,2),Se("div",{class:lt([e.amountClass,"skeleton-fixed h-4 w-8/12"])},null,2)],64))],2)}}}),ws=W({__name:"Badge",props:{variant:{}},setup(e){return(t,n)=>(D(),Te("div",{class:lt(f($e)(f(XA)({variant:t.variant}),t.$attrs.class??""))},[X(t.$slots,"default")],2))}}),XA=Uu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",warning:"border-transparent bg-yellow-500 text-primary-foreground",success:"border-transparent bg-green-600 text-primary-foreground"}},defaultVariants:{variant:"default"}}),ZA=W({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(I_),ce(t,{class:f($e)("flex touch-none select-none transition-colors",n.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n.orientation==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",n.$attrs.class??"")}),{default:B(()=>[K(f(k_),{class:"relative flex-1 rounded-full bg-border"})]),_:1},16,["class"]))}}),Og=W({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{default:""}},setup(e){const t=e;return(n,r)=>(D(),j(f(y_),{type:n.type,class:lt(f($e)("relative overflow-hidden",t.class))},{default:B(()=>[K(f(b_),{class:"h-full w-full rounded-[inherit]"},{default:B(()=>[X(n.$slots,"default")]),_:3}),K(ZA),K(f(B_))]),_:3},8,["type","class"]))}}),kc=W({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(M_),{class:lt([f($e)("shrink-0 bg-secondary",t.class),t.orientation==="vertical"?"w-px h-full":"h-px w-full"])},null,8,["class"]))}}),QA={key:0,class:"m-auto cursor-default space-y-4"},JA=Se("p",{class:"text-muted-foreground"},"No transactions",-1),eI={class:"space-y-6 px-6 text-sm"},tI={class:"flex items-center justify-between"},nI={class:"text-xs"},rI={class:"flex justify-between pb-4 pt-1"},oI=W({__name:"TxHistory",setup(e){const t=Uo(),n=$r();return(r,o)=>(D(),j(f(Us),{class:"flex h-[24.8rem] w-full px-0 py-1 align-middle"},{default:B(()=>[f(Ze)(f(t).history)?(D(),Te("div",QA,[K(f(gh),{class:"m-auto text-muted-foreground/30",size:60}),JA])):(D(),j(f(Og),{key:1,class:"w-full"},{default:B(()=>[Se("div",eI,[(D(!0),Te(qe,null,Qr(f(t).history,(i,s)=>(D(),Te("div",{key:i.transactionId,class:"w-full space-y-2"},[Se("div",tI,[K(Cg,{type:"transaction",value:i.transactionId},{default:B(()=>[K(f(ws),{variant:"secondary"},{default:B(()=>[Re(it(f(Ti)(i.transactionId,25)),1)]),_:2},1024)]),_:2},1032,["value"]),Se("div",nI,it(f(ub)(new Date(i.timestamp))),1)]),Se("div",null,[(D(!0),Te(qe,null,Qr(i.balance,a=>(D(),Te("div",{key:a.tokenId},[K(Tg,{"root-class":"py-1 gap-2",link:"","display-signaling":"",asset:a,"logo-class":"h-6","display-price":!1},null,8,["asset"])]))),128))]),Se("div",rI,[i.fee?(D(),j(f(ws),{key:0,variant:"outline",class:"font-normal"},{default:B(()=>[Re("Fee: "+it(f(su)(i.fee,f(wo)))+" ERG",1)]),_:2},1024)):pt("",!0),i.inclusionHeight?(D(),j(f(ws),{key:1,variant:"success"},{default:B(()=>[Re(it(f(Ai)(f(Kt)(f(n).height-i.inclusionHeight+1)))+" confirmations ",1)]),_:2},1024)):(D(),j(f(ws),{key:2,variant:"warning"},{default:B(()=>[Re(" Unconfirmed ")]),_:1}))]),se!==null&&!!e&&typeof e=="object"&&!Array.isArray(e);function Pc(e){return Number(e)>=0}function sI(e){const t=parseFloat(e);return isNaN(t)?e:t}function aI(e){return typeof e=="object"&&e!==null}function lI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Rf(e){if(!aI(e)||lI(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ii(e,t){return Object.keys(t).forEach(n=>{if(Rf(t[n])&&Rf(e[n])){e[n]||(e[n]={}),Ii(e[n],t[n]);return}e[n]=t[n]}),e}function ni(e){const t=e.split(".");if(!t.length)return"";let n=String(t[0]);for(let r=1;rfI(o)&&i in o?o[i]:n,e):n}function vr(e,t,n){if(Ya(t)){e[Bc(t)]=n;return}const r=t.split(/\.|\[(\d+)\]/).filter(Boolean);let o=e;for(let i=0;iVt(e,n.slice(0,s).join(".")));for(let i=o.length-1;i>=0;i--)if(pI(o[i])){if(i===0){$l(e,n[0]);continue}$l(o[i-1],n[i-1])}}function en(e){return Object.keys(e)}function Xa(e,t=void 0){const n=Rt();return(n==null?void 0:n.provides[e])||Wt(e,t)}function zf(e,t,n){if(Array.isArray(e)){const r=[...e],o=r.findIndex(i=>Dt(i,t));return o>=0?r.splice(o,1):r.push(t),r}return Dt(e,t)?n:t}function Hf(e,t=0){let n=null,r=[];return function(...o){return n&&clearTimeout(n),n=setTimeout(()=>{const i=e(...o);r.forEach(s=>s(i)),r=[]},t),new Promise(i=>r.push(i))}}function yI(e,t){return io(t)&&t.number?sI(e):e}function bu(e,t){let n;return async function(...o){const i=e(...o);n=i;const s=await i;return i!==n?s:(n=void 0,t(s,o))}}function wu(e){return Array.isArray(e)?e:e?[e]:[]}function $c(e){const t=Xa(Wo),n=e?K(()=>t==null?void 0:t.getPathState(De(e))):void 0,r=e?void 0:Wt(qa);return!r&&(n!=null&&n.value),n||r}function _s(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function bI(e){let t=null,n=[];return function(...r){const o=Ke(()=>{if(t!==o)return;const i=e(...r);n.forEach(s=>s(i)),n=[],t=null});return t=o,new Promise(i=>n.push(i))}}function Pg(e,t,n){return t.slots.default?typeof e=="string"||!e?t.slots.default(n()):{default:()=>{var r,o;return(o=(r=t.slots).default)===null||o===void 0?void 0:o.call(r,n())}}:t.slots.default}function Ml(e){if(Bg(e))return e._value}function Bg(e){return"_value"in e}function wI(e){return e.type==="number"||e.type==="range"?Number.isNaN(e.valueAsNumber)?e.value:e.valueAsNumber:e.value}function sa(e){if(!kg(e))return e;const t=e.target;if(Yi(t.type)&&Bg(t))return Ml(t);if(t.type==="file"&&t.files){const n=Array.from(t.files);return t.multiple?n:n[0]}if(hI(t))return Array.from(t.options).filter(n=>n.selected&&!n.disabled).map(Ml);if(Ig(t)){const n=Array.from(t.options).find(r=>r.selected);return n?Ml(n):t.value}return wI(t)}function $g(e){const t={};return Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),e?io(e)&&e._$$isNormalized?e:io(e)?Object.keys(e).reduce((n,r)=>{const o=_I(e[r]);return e[r]!==!1&&(n[r]=jf(o)),n},t):typeof e!="string"?t:e.split("|").reduce((n,r)=>{const o=xI(r);return o.name&&(n[o.name]=jf(o.params)),n},t):t}function _I(e){return e===!0?[]:Array.isArray(e)||io(e)?e:[e]}function jf(e){const t=n=>typeof n=="string"&&n[0]==="@"?EI(n.slice(1)):n;return Array.isArray(e)?e.map(t):e instanceof RegExp?[e]:Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{})}const xI=e=>{let t=[];const n=e.split(":")[0];return e.includes(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:n,params:t}};function EI(e){const t=n=>Vt(n,e)||n[e];return t.__locatorRef=e,t}function SI(e){return Array.isArray(e)?e.filter(yu):en(e).filter(t=>yu(e[t])).map(t=>e[t])}const CI={generateMessage:({field:e})=>`${e} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0};let TI=Object.assign({},CI);const Wr=()=>TI;async function Mg(e,t,n={}){const r=n==null?void 0:n.bails,o={name:(n==null?void 0:n.name)||"{field}",rules:t,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},s=(await OI(o,e)).errors;return{errors:s,valid:!s.length}}async function OI(e,t){if(mn(e.rules)||ia(e.rules))return II(t,e.rules);if(Pt(e.rules)||Array.isArray(e.rules)){const s={field:e.label||e.name,name:e.name,label:e.label,form:e.formData,value:t},a=Array.isArray(e.rules)?e.rules:[e.rules],l=a.length,u=[];for(let c=0;c{const l=a.path||"";return s[l]||(s[l]={errors:[],path:l}),s[l].errors.push(...a.errors),s},{});return{errors:Object.values(i)}}}}}async function II(e,t){const r=await(mn(t)?t:Dg(t)).parse(e),o=[];for(const i of r.errors)i.errors.length&&o.push(...i.errors);return{errors:o}}async function kI(e,t,n){const r=cI(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const o=PI(n.params,e.formData),i={field:e.label||e.name,name:e.name,label:e.label,value:t,form:e.formData,rule:Object.assign(Object.assign({},n),{params:o})},s=await r(t,o,i);return typeof s=="string"?{error:s}:{error:s?void 0:Rg(i)}}function Rg(e){const t=Wr().generateMessage;return t?t(e):"Field is invalid"}function PI(e,t){const n=r=>yu(r)?r(t):r;return Array.isArray(e)?e.map(n):Object.keys(e).reduce((r,o)=>(r[o]=n(e[o]),r),{})}async function BI(e,t){const r=await(mn(e)?e:Dg(e)).parse(rt(t)),o={},i={};for(const s of r.errors){const a=s.errors,l=(s.path||"").replace(/\["(\d+)"\]/g,(u,c)=>`[${c}]`);o[l]={valid:!a.length,errors:a},a.length&&(i[l]=a[0])}return{valid:!r.errors.length,results:o,errors:i,values:r.value}}async function $I(e,t,n){const o=en(e).map(async u=>{var c,d,p;const h=(c=n==null?void 0:n.names)===null||c===void 0?void 0:c[u],v=await Mg(Vt(t,u),e[u],{name:(h==null?void 0:h.name)||u,label:h==null?void 0:h.label,values:t,bails:(p=(d=n==null?void 0:n.bailsMap)===null||d===void 0?void 0:d[u])!==null&&p!==void 0?p:!0});return Object.assign(Object.assign({},v),{path:u})});let i=!0;const s=await Promise.all(o),a={},l={};for(const u of s)a[u.path]={valid:u.valid,errors:u.errors},u.valid||(i=!1,l[u.path]=u.errors[0]);return{valid:i,results:a,errors:l}}let Uf=0;function MI(e,t){const{value:n,initialValue:r,setInitialValue:o}=DI(e,t.modelValue,t.form);if(!t.form){let l=function(h){var v;"value"in h&&(n.value=h.value),"errors"in h&&c(h.errors),"touched"in h&&(p.touched=(v=h.touched)!==null&&v!==void 0?v:p.touched),"initialValue"in h&&o(h.initialValue)};const{errors:u,setErrors:c}=FI(),d=Uf>=Number.MAX_SAFE_INTEGER?0:++Uf,p=LI(n,r,u,t.schema);return{id:d,path:e,value:n,initialValue:r,meta:p,flags:{pendingUnmount:{[d]:!1},pendingReset:!1},errors:u,setState:l}}const i=t.form.createPathState(e,{bails:t.bails,label:t.label,type:t.type,validate:t.validate,schema:t.schema}),s=K(()=>i.errors);function a(l){var u,c,d;"value"in l&&(n.value=l.value),"errors"in l&&((u=t.form)===null||u===void 0||u.setFieldError(f(e),l.errors)),"touched"in l&&((c=t.form)===null||c===void 0||c.setFieldTouched(f(e),(d=l.touched)!==null&&d!==void 0?d:!1)),"initialValue"in l&&o(l.initialValue)}return{id:Array.isArray(i.id)?i.id[i.id.length-1]:i.id,path:e,value:n,errors:s,meta:i,initialValue:r,flags:i.__flags,setState:a}}function DI(e,t,n){const r=U(f(t));function o(){return n?Vt(n.initialValues.value,f(e),f(r)):f(r)}function i(u){if(!n){r.value=u;return}n.setFieldInitialValue(f(e),u,!0)}const s=K(o);if(!n)return{value:U(o()),initialValue:s,setInitialValue:i};const a=RI(t,n,s,e);return n.stageInitialValue(f(e),a,!0),{value:K({get(){return Vt(n.values,f(e))},set(u){n.setFieldValue(f(e),u,!1)}}),initialValue:s,setInitialValue:i}}function RI(e,t,n,r){return at(e)?f(e):e!==void 0?e:Vt(t.values,f(r),f(n))}function LI(e,t,n,r){var o,i;const s=(i=(o=r==null?void 0:r.describe)===null||o===void 0?void 0:o.call(r).required)!==null&&i!==void 0?i:!1,a=Tn({touched:!1,pending:!1,valid:!0,required:s,validated:!!f(n).length,initialValue:K(()=>f(t)),dirty:K(()=>!Dt(f(e),f(t)))});return ye(n,l=>{a.valid=!l.length},{immediate:!0,flush:"sync"}),a}function FI(){const e=U([]);return{errors:e,setErrors:t=>{e.value=wu(t)}}}function NI(e,t,n){return Yi(n==null?void 0:n.type)?zI(e,t,n):Lg(e,t,n)}function Lg(e,t,n){const{initialValue:r,validateOnMount:o,bails:i,type:s,checkedValue:a,label:l,validateOnValueUpdate:u,uncheckedValue:c,controlled:d,keepValueOnUnmount:p,syncVModel:h,form:v}=VI(n),b=d?Xa(Wo):void 0,w=v||b,S=K(()=>ni(De(e))),_=K(()=>{if(De(w==null?void 0:w.schema))return;const ie=f(t);return ia(ie)||mn(ie)||Pt(ie)||Array.isArray(ie)?ie:$g(ie)}),{id:I,value:F,initialValue:V,meta:N,setState:H,errors:m,flags:g}=MI(S,{modelValue:r,form:w,bails:i,label:l,type:s,validate:_.value?O:void 0,schema:mn(t)?t:void 0}),y=K(()=>m.value[0]);h&&HI({value:F,prop:h,handleChange:E,shouldValidate:()=>u&&!g.pendingReset});const A=(ee,ie=!1)=>{N.touched=!0,ie&&C()};async function x(ee){var ie,ve;if(w!=null&&w.validateSchema){const{results:Pe}=await w.validateSchema(ee);return(ie=Pe[De(S)])!==null&&ie!==void 0?ie:{valid:!0,errors:[]}}return _.value?Mg(F.value,_.value,{name:De(S),label:De(l),values:(ve=w==null?void 0:w.values)!==null&&ve!==void 0?ve:{},bails:i}):{valid:!0,errors:[]}}const C=bu(async()=>(N.pending=!0,N.validated=!0,x("validated-only")),ee=>(g.pendingUnmount[Oe.id]||(H({errors:ee.errors}),N.pending=!1,N.valid=ee.valid),ee)),k=bu(async()=>x("silent"),ee=>(N.valid=ee.valid,ee));function O(ee){return(ee==null?void 0:ee.mode)==="silent"?k():C()}function E(ee,ie=!0){const ve=sa(ee);de(ve,ie)}Ue(()=>{if(o)return C();(!w||!w.validateSchema)&&k()});function M(ee){N.touched=ee}function $(ee){var ie;const ve=ee&&"value"in ee?ee.value:V.value;H({value:rt(ve),initialValue:rt(ve),touched:(ie=ee==null?void 0:ee.touched)!==null&&ie!==void 0?ie:!1,errors:(ee==null?void 0:ee.errors)||[]}),N.pending=!1,N.validated=!1,k()}const G=Rt();function de(ee,ie=!0){F.value=G&&h?yI(ee,G.props.modelModifiers):ee,(ie?C:k)()}function ue(ee){H({errors:Array.isArray(ee)?ee:[ee]})}const ge=K({get(){return F.value},set(ee){de(ee,u)}}),Oe={id:I,name:S,label:l,value:ge,meta:N,errors:m,errorMessage:y,type:s,checkedValue:a,uncheckedValue:c,bails:i,keepValueOnUnmount:p,resetField:$,handleReset:()=>$(),validate:O,handleChange:E,handleBlur:A,setState:H,setTouched:M,setErrors:ue,setValue:de};if(Fo(qa,Oe),at(t)&&typeof f(t)!="function"&&ye(t,(ee,ie)=>{Dt(ee,ie)||(N.validated?C():k())},{deep:!0}),!w)return Oe;const Je=K(()=>{const ee=_.value;return!ee||Pt(ee)||ia(ee)||mn(ee)||Array.isArray(ee)?{}:Object.keys(ee).reduce((ie,ve)=>{const Pe=SI(ee[ve]).map(Ot=>Ot.__locatorRef).reduce((Ot,ht)=>{const Ge=Vt(w.values,ht)||w.values[ht];return Ge!==void 0&&(Ot[ht]=Ge),Ot},{});return Object.assign(ie,Pe),ie},{})});return ye(Je,(ee,ie)=>{if(!Object.keys(ee).length)return;!Dt(ee,ie)&&(N.validated?C():k())}),_a(()=>{var ee;const ie=(ee=De(Oe.keepValueOnUnmount))!==null&&ee!==void 0?ee:De(w.keepValuesOnUnmount),ve=De(S);if(ie||!w||g.pendingUnmount[Oe.id]){w==null||w.removePathState(ve,I);return}g.pendingUnmount[Oe.id]=!0;const Pe=w.getPathState(ve);if(Array.isArray(Pe==null?void 0:Pe.id)&&(Pe!=null&&Pe.multiple)?Pe!=null&&Pe.id.includes(Oe.id):(Pe==null?void 0:Pe.id)===Oe.id){if(Pe!=null&&Pe.multiple&&Array.isArray(Pe.value)){const ht=Pe.value.findIndex(Ge=>Dt(Ge,De(Oe.checkedValue)));if(ht>-1){const Ge=[...Pe.value];Ge.splice(ht,1),w.setFieldValue(ve,Ge)}Array.isArray(Pe.id)&&Pe.id.splice(Pe.id.indexOf(Oe.id),1)}else w.unsetPathValue(De(S));w.removePathState(ve,I)}}),Oe}function VI(e){const t=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(e!=null&&e.syncVModel),r=typeof(e==null?void 0:e.syncVModel)=="string"?e.syncVModel:(e==null?void 0:e.modelPropName)||"modelValue",o=n&&!("initialValue"in(e||{}))?_u(Rt(),r):e==null?void 0:e.initialValue;if(!e)return Object.assign(Object.assign({},t()),{initialValue:o});const i="valueProp"in e?e.valueProp:e.checkedValue,s="standalone"in e?!e.standalone:e.controlled,a=(e==null?void 0:e.modelPropName)||(e==null?void 0:e.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},t()),e||{}),{initialValue:o,controlled:s??!0,checkedValue:i,syncVModel:a})}function zI(e,t,n){const r=n!=null&&n.standalone?void 0:Xa(Wo),o=n==null?void 0:n.checkedValue,i=n==null?void 0:n.uncheckedValue;function s(a){const l=a.handleChange,u=K(()=>{const d=De(a.value),p=De(o);return Array.isArray(d)?d.findIndex(h=>Dt(h,p))>=0:Dt(p,d)});function c(d,p=!0){var h,v;if(u.value===((h=d==null?void 0:d.target)===null||h===void 0?void 0:h.checked)){p&&a.validate();return}const b=De(e),w=r==null?void 0:r.getPathState(b),S=sa(d);let _=(v=De(o))!==null&&v!==void 0?v:S;r&&(w!=null&&w.multiple)&&w.type==="checkbox"?_=zf(Vt(r.values,b)||[],_,void 0):(n==null?void 0:n.type)==="checkbox"&&(_=zf(De(a.value),_,De(i))),l(_,p)}return Object.assign(Object.assign({},a),{checked:u,checkedValue:o,uncheckedValue:i,handleChange:c})}return s(Lg(e,t,n))}function HI({prop:e,value:t,handleChange:n,shouldValidate:r}){const o=Rt();if(!o||!e)return;const i=typeof e=="string"?e:"modelValue",s=`update:${i}`;i in o.props&&(ye(t,a=>{Dt(a,_u(o,i))||o.emit(s,a)}),ye(()=>_u(o,i),a=>{if(a===oa&&t.value===void 0)return;const l=a===oa?void 0:a;Dt(l,t.value)||n(l,r())}))}function _u(e,t){if(e)return e.props[t]}const jI=W({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>Wr().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:oa},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(e,t){const n=vo(e,"rules"),r=vo(e,"name"),o=vo(e,"label"),i=vo(e,"uncheckedValue"),s=vo(e,"keepValue"),{errors:a,value:l,errorMessage:u,validate:c,handleChange:d,handleBlur:p,setTouched:h,resetField:v,handleReset:b,meta:w,checked:S,setErrors:_}=NI(r,n,{validateOnMount:e.validateOnMount,bails:e.bails,standalone:e.standalone,type:t.attrs.type,initialValue:WI(e,t),checkedValue:t.attrs.value,uncheckedValue:i,label:o,validateOnValueUpdate:e.validateOnModelUpdate,keepValueOnUnmount:s,syncVModel:!0}),I=function(g,y=!0){d(g,y)},F=K(()=>{const{validateOnInput:m,validateOnChange:g,validateOnBlur:y,validateOnModelUpdate:A}=UI(e);function x(E){p(E,y),Pt(t.attrs.onBlur)&&t.attrs.onBlur(E)}function C(E){I(E,m),Pt(t.attrs.onInput)&&t.attrs.onInput(E)}function k(E){I(E,g),Pt(t.attrs.onChange)&&t.attrs.onChange(E)}const O={name:e.name,onBlur:x,onInput:C,onChange:k};return O["onUpdate:modelValue"]=E=>I(E,A),O}),V=K(()=>{const m=Object.assign({},F.value);Yi(t.attrs.type)&&S&&(m.checked=S.value);const g=Wf(e,t);return gI(g,t.attrs)&&(m.value=l.value),m}),N=K(()=>Object.assign(Object.assign({},F.value),{modelValue:l.value}));function H(){return{field:V.value,componentField:N.value,value:l.value,meta:w,errors:a.value,errorMessage:u.value,validate:c,resetField:v,handleChange:I,handleInput:m=>I(m,!1),handleReset:b,handleBlur:F.value.onBlur,setTouched:h,setErrors:_}}return t.expose({value:l,meta:w,errors:a,errorMessage:u,setErrors:_,setTouched:h,reset:v,validate:c,handleChange:d}),()=>{const m=qn(Wf(e,t)),g=Pg(m,t,H);return m?On(m,Object.assign(Object.assign({},t.attrs),V.value),g):g}}});function Wf(e,t){let n=e.as||"";return!e.as&&!t.slots.default&&(n="input"),n}function UI(e){var t,n,r,o;const{validateOnInput:i,validateOnChange:s,validateOnBlur:a,validateOnModelUpdate:l}=Wr();return{validateOnInput:(t=e.validateOnInput)!==null&&t!==void 0?t:i,validateOnChange:(n=e.validateOnChange)!==null&&n!==void 0?n:s,validateOnBlur:(r=e.validateOnBlur)!==null&&r!==void 0?r:a,validateOnModelUpdate:(o=e.validateOnModelUpdate)!==null&&o!==void 0?o:l}}function WI(e,t){return Yi(t.attrs.type)?Ff(e,"modelValue")?e.modelValue:void 0:Ff(e,"modelValue")?e.modelValue:t.attrs.value}const Gf=jI;let GI=0;const xs=["bails","fieldsCount","id","multiple","type","validate"];function Fg(e){const t=Object.assign({},De((e==null?void 0:e.initialValues)||{})),n=f(e==null?void 0:e.validationSchema);return n&&mn(n)&&Pt(n.cast)?rt(n.cast(t)||{}):rt(t)}function KI(e){var t;const n=GI++;let r=0;const o=U(!1),i=U(!1),s=U(0),a=[],l=Tn(Fg(e)),u=U([]),c=U({}),d=U({}),p=bI(()=>{d.value=u.value.reduce((R,L)=>(R[ni(De(L.path))]=L,R),{})});function h(R,L){const Y=E(R);if(!Y){typeof R=="string"&&(c.value[ni(R)]=wu(L));return}if(typeof R=="string"){const se=ni(R);c.value[se]&&delete c.value[se]}Y.errors=wu(L),Y.valid=!Y.errors.length}function v(R){en(R).forEach(L=>{h(L,R[L])})}e!=null&&e.initialErrors&&v(e.initialErrors);const b=K(()=>{const R=u.value.reduce((L,Y)=>(Y.errors.length&&(L[Y.path]=Y.errors),L),{});return Object.assign(Object.assign({},c.value),R)}),w=K(()=>en(b.value).reduce((R,L)=>{const Y=b.value[L];return Y!=null&&Y.length&&(R[L]=Y[0]),R},{})),S=K(()=>u.value.reduce((R,L)=>(R[L.path]={name:L.path||"",label:L.label||""},R),{})),_=K(()=>u.value.reduce((R,L)=>{var Y;return R[L.path]=(Y=L.bails)!==null&&Y!==void 0?Y:!0,R},{})),I=Object.assign({},(e==null?void 0:e.initialErrors)||{}),F=(t=e==null?void 0:e.keepValuesOnUnmount)!==null&&t!==void 0?t:!1,{initialValues:V,originalInitialValues:N,setInitialValues:H}=YI(u,l,e),m=qI(u,l,N,w),g=K(()=>u.value.reduce((R,L)=>{const Y=Vt(l,L.path);return vr(R,L.path,Y),R},{})),y=e==null?void 0:e.validationSchema;function A(R,L){var Y,se;const xe=K(()=>Vt(V.value,De(R))),he=d.value[De(R)],Ne=(L==null?void 0:L.type)==="checkbox"||(L==null?void 0:L.type)==="radio";if(he&&Ne){he.multiple=!0;const un=r++;return Array.isArray(he.id)?he.id.push(un):he.id=[he.id,un],he.fieldsCount++,he.__flags.pendingUnmount[un]=!1,he}const Me=K(()=>Vt(l,De(R))),Ve=De(R),bt=$.findIndex(un=>un===Ve);bt!==-1&&$.splice(bt,1);const et=K(()=>{var un,Go,Za,Fc,Qa,Ja;return mn(y)?(Za=(Go=(un=y).describe)===null||Go===void 0?void 0:Go.call(un,De(R)).required)!==null&&Za!==void 0?Za:!1:mn(L==null?void 0:L.schema)&&(Ja=(Qa=(Fc=L==null?void 0:L.schema).describe)===null||Qa===void 0?void 0:Qa.call(Fc).required)!==null&&Ja!==void 0?Ja:!1}),At=r++,Lt=Tn({id:At,path:R,touched:!1,pending:!1,valid:!0,validated:!!(!((Y=I[Ve])===null||Y===void 0)&&Y.length),required:et,initialValue:xe,errors:ga([]),bails:(se=L==null?void 0:L.bails)!==null&&se!==void 0?se:!1,label:L==null?void 0:L.label,type:(L==null?void 0:L.type)||"default",value:Me,multiple:!1,__flags:{pendingUnmount:{[At]:!1},pendingReset:!1},fieldsCount:1,validate:L==null?void 0:L.validate,dirty:K(()=>!Dt(f(Me),f(xe)))});return u.value.push(Lt),d.value[Ve]=Lt,p(),w.value[Ve]&&!I[Ve]&&Ke(()=>{re(Ve,{mode:"silent"})}),at(R)&&ye(R,un=>{p();const Go=rt(Me.value);d.value[un]=Lt,Ke(()=>{vr(l,un,Go)})}),Lt}const x=Hf(fe,5),C=Hf(fe,5),k=bu(async R=>await(R==="silent"?x():C()),(R,[L])=>{const Y=en(ie.errorBag.value),xe=[...new Set([...en(R.results),...u.value.map(he=>he.path),...Y])].sort().reduce((he,Ne)=>{var Me;const Ve=Ne,bt=E(Ve)||M(Ve),et=((Me=R.results[Ve])===null||Me===void 0?void 0:Me.errors)||[],At=De(bt==null?void 0:bt.path)||Ve,Lt=XI({errors:et,valid:!et.length},he.results[At]);return he.results[At]=Lt,Lt.valid||(he.errors[At]=Lt.errors[0]),bt&&c.value[At]&&delete c.value[At],bt?(bt.valid=Lt.valid,L==="silent"||L==="validated-only"&&!bt.validated||h(bt,Lt.errors),he):(h(At,et),he)},{valid:R.valid,results:{},errors:{}});return R.values&&(xe.values=R.values),xe});function O(R){u.value.forEach(R)}function E(R){const L=typeof R=="string"?ni(R):R;return typeof L=="string"?d.value[L]:L}function M(R){return u.value.filter(Y=>R.startsWith(Y.path)).reduce((Y,se)=>Y?se.path.length>Y.path.length?se:Y:se,void 0)}let $=[],G;function de(R){return $.push(R),G||(G=Ke(()=>{[...$].sort().reverse().forEach(Y=>{Vf(l,Y)}),$=[],G=null})),G}function ue(R){return function(Y,se){return function(he){return he instanceof Event&&(he.preventDefault(),he.stopPropagation()),O(Ne=>Ne.touched=!0),o.value=!0,s.value++,te().then(Ne=>{const Me=rt(l);if(Ne.valid&&typeof Y=="function"){const Ve=rt(g.value);let bt=R?Ve:Me;return Ne.values&&(bt=Ne.values),Y(bt,{evt:he,controlledValues:Ve,setErrors:v,setFieldError:h,setTouched:z,setFieldTouched:Ge,setValues:Ot,setFieldValue:ve,resetForm:Q,resetField:Z})}!Ne.valid&&typeof se=="function"&&se({values:Me,evt:he,errors:Ne.errors,results:Ne.results})}).then(Ne=>(o.value=!1,Ne),Ne=>{throw o.value=!1,Ne})}}}const Oe=ue(!1);Oe.withControlled=ue(!0);function Je(R,L){const Y=u.value.findIndex(xe=>xe.path===R),se=u.value[Y];if(!(Y===-1||!se)){if(Ke(()=>{re(R,{mode:"silent",warn:!1})}),se.multiple&&se.fieldsCount&&se.fieldsCount--,Array.isArray(se.id)){const xe=se.id.indexOf(L);xe>=0&&se.id.splice(xe,1),delete se.__flags.pendingUnmount[L]}(!se.multiple||se.fieldsCount<=0)&&(u.value.splice(Y,1),ne(R),p(),delete d.value[R])}}function ee(R){en(d.value).forEach(L=>{L.startsWith(R)&&delete d.value[L]}),u.value=u.value.filter(L=>!L.path.startsWith(R)),Ke(()=>{p()})}const ie={formId:n,values:l,controlledValues:g,errorBag:b,errors:w,schema:y,submitCount:s,meta:m,isSubmitting:o,isValidating:i,fieldArrays:a,keepValuesOnUnmount:F,validateSchema:f(y)?k:void 0,validate:te,setFieldError:h,validateField:re,setFieldValue:ve,setValues:Ot,setErrors:v,setFieldTouched:Ge,setTouched:z,resetForm:Q,resetField:Z,handleSubmit:Oe,useFieldModel:_e,defineInputBinds:ke,defineComponentBinds:He,defineField:pe,stageInitialValue:oe,unsetInitialValue:ne,setFieldInitialValue:J,createPathState:A,getPathState:E,unsetPathValue:de,removePathState:Je,initialValues:V,getAllPathStates:()=>u.value,destroyPath:ee,isFieldTouched:ln,isFieldDirty:T,isFieldValid:P};function ve(R,L,Y=!0){const se=rt(L),xe=typeof R=="string"?R:R.path;E(xe)||A(xe),vr(l,xe,se),Y&&re(xe)}function Pe(R,L=!0){en(l).forEach(Y=>{delete l[Y]}),en(R).forEach(Y=>{ve(Y,R[Y],!1)}),L&&te()}function Ot(R,L=!0){Ii(l,R),a.forEach(Y=>Y&&Y.reset()),L&&te()}function ht(R,L){const Y=E(De(R))||A(R);return K({get(){return Y.value},set(se){var xe;const he=De(R);ve(he,se,(xe=De(L))!==null&&xe!==void 0?xe:!1)}})}function Ge(R,L){const Y=E(R);Y&&(Y.touched=L)}function ln(R){const L=E(R);return L?L.touched:u.value.filter(Y=>Y.path.startsWith(R)).some(Y=>Y.touched)}function T(R){const L=E(R);return L?L.dirty:u.value.filter(Y=>Y.path.startsWith(R)).some(Y=>Y.dirty)}function P(R){const L=E(R);return L?L.valid:u.value.filter(Y=>Y.path.startsWith(R)).every(Y=>Y.valid)}function z(R){if(typeof R=="boolean"){O(L=>{L.touched=R});return}en(R).forEach(L=>{Ge(L,!!R[L])})}function Z(R,L){var Y;const se=L&&"value"in L?L.value:Vt(V.value,R),xe=E(R);xe&&(xe.__flags.pendingReset=!0),J(R,rt(se),!0),ve(R,se,!1),Ge(R,(Y=L==null?void 0:L.touched)!==null&&Y!==void 0?Y:!1),h(R,(L==null?void 0:L.errors)||[]),Ke(()=>{xe&&(xe.__flags.pendingReset=!1)})}function Q(R,L){let Y=rt(R!=null&&R.values?R.values:N.value);Y=L!=null&&L.force?Y:Ii(N.value,Y),Y=mn(y)&&Pt(y.cast)?y.cast(Y):Y,H(Y),O(se=>{var xe;se.__flags.pendingReset=!0,se.validated=!1,se.touched=((xe=R==null?void 0:R.touched)===null||xe===void 0?void 0:xe[se.path])||!1,ve(se.path,Vt(Y,se.path),!1),h(se.path,void 0)}),L!=null&&L.force?Pe(Y,!1):Ot(Y,!1),v((R==null?void 0:R.errors)||{}),s.value=(R==null?void 0:R.submitCount)||0,Ke(()=>{te({mode:"silent"}),O(se=>{se.__flags.pendingReset=!1})})}async function te(R){const L=(R==null?void 0:R.mode)||"force";if(L==="force"&&O(he=>he.validated=!0),ie.validateSchema)return ie.validateSchema(L);i.value=!0;const Y=await Promise.all(u.value.map(he=>he.validate?he.validate(R).then(Ne=>({key:he.path,valid:Ne.valid,errors:Ne.errors})):Promise.resolve({key:he.path,valid:!0,errors:[]})));i.value=!1;const se={},xe={};for(const he of Y)se[he.key]={valid:he.valid,errors:he.errors},he.errors.length&&(xe[he.key]=he.errors[0]);return{valid:Y.every(he=>he.valid),results:se,errors:xe}}async function re(R,L){var Y;const se=E(R);if(se&&(L==null?void 0:L.mode)!=="silent"&&(se.validated=!0),y){const{results:xe}=await k((L==null?void 0:L.mode)||"validated-only");return xe[R]||{errors:[],valid:!0}}return se!=null&&se.validate?se.validate(L):(!se&&(Y=L==null?void 0:L.warn),Promise.resolve({errors:[],valid:!0}))}function ne(R){Vf(V.value,R)}function oe(R,L,Y=!1){J(R,L),vr(l,R,L),Y&&!(e!=null&&e.initialValues)&&vr(N.value,R,rt(L))}function J(R,L,Y=!1){vr(V.value,R,rt(L)),Y&&vr(N.value,R,rt(L))}async function fe(){const R=f(y);if(!R)return{valid:!0,results:{},errors:{}};i.value=!0;const L=ia(R)||mn(R)?await BI(R,l):await $I(R,l,{names:S.value,bailsMap:_.value});return i.value=!1,L}const me=Oe((R,{evt:L})=>{vI(L)&&L.target.submit()});Ue(()=>{if(e!=null&&e.initialErrors&&v(e.initialErrors),e!=null&&e.initialTouched&&z(e.initialTouched),e!=null&&e.validateOnMount){te();return}ie.validateSchema&&ie.validateSchema("silent")}),at(y)&&ye(y,()=>{var R;(R=ie.validateSchema)===null||R===void 0||R.call(ie,"validated-only")}),Fo(Wo,ie);function pe(R,L){const Y=Pt(L)||L==null?void 0:L.label,se=E(De(R))||A(R,{label:Y}),xe=()=>Pt(L)?L(_s(se,xs)):L||{};function he(){var et;se.touched=!0,((et=xe().validateOnBlur)!==null&&et!==void 0?et:Wr().validateOnBlur)&&re(se.path)}function Ne(){var et;((et=xe().validateOnInput)!==null&&et!==void 0?et:Wr().validateOnInput)&&Ke(()=>{re(se.path)})}function Me(){var et;((et=xe().validateOnChange)!==null&&et!==void 0?et:Wr().validateOnChange)&&Ke(()=>{re(se.path)})}const Ve=K(()=>{const et={onChange:Me,onInput:Ne,onBlur:he};return Pt(L)?Object.assign(Object.assign({},et),L(_s(se,xs)).props||{}):L!=null&&L.props?Object.assign(Object.assign({},et),L.props(_s(se,xs))):et});return[ht(R,()=>{var et,At,Lt;return(Lt=(et=xe().validateOnModelUpdate)!==null&&et!==void 0?et:(At=Wr())===null||At===void 0?void 0:At.validateOnModelUpdate)!==null&&Lt!==void 0?Lt:!0}),Ve]}function _e(R){return Array.isArray(R)?R.map(L=>ht(L,!0)):ht(R)}function ke(R,L){const[Y,se]=pe(R,L);function xe(Me){se.value.onBlur(Me)}function he(Me){const Ve=sa(Me);ve(De(R),Ve,!1),se.value.onInput(Me)}function Ne(Me){const Ve=sa(Me);ve(De(R),Ve,!1),se.value.onChange(Me)}return K(()=>Object.assign(Object.assign({},se.value),{onBlur:xe,onInput:he,onChange:Ne,value:Y.value}))}function He(R,L){const[Y,se]=pe(R,L),xe=E(De(R));function he(Ne){Y.value=Ne}return K(()=>{const Ne=Pt(L)?L(_s(xe,xs)):L||{};return Object.assign({[Ne.model||"modelValue"]:Y.value,[`onUpdate:${Ne.model||"modelValue"}`]:he},se.value)})}return Object.assign(Object.assign({},ie),{values:Ir(l),handleReset:()=>Q(),submitForm:me})}function qI(e,t,n,r){const o={touched:"some",pending:"some",valid:"every"},i=K(()=>!Dt(t,f(n)));function s(){const l=e.value;return en(o).reduce((u,c)=>{const d=o[c];return u[c]=l[d](p=>p[c]),u},{})}const a=Tn(s());return vt(()=>{const l=s();a.touched=l.touched,a.valid=l.valid,a.pending=l.pending}),K(()=>Object.assign(Object.assign({initialValues:f(n)},a),{valid:a.valid&&!en(r.value).length,dirty:i.value}))}function YI(e,t,n){const r=Fg(n),o=U(r),i=U(rt(r));function s(a,l=!1){o.value=Ii(rt(o.value)||{},rt(a)),i.value=Ii(rt(i.value)||{},rt(a)),l&&e.value.forEach(u=>{if(u.touched)return;const d=Vt(o.value,u.path);vr(t,u.path,rt(d))})}return{initialValues:o,originalInitialValues:i,setInitialValues:s}}function XI(e,t){return t?{valid:e.valid&&t.valid,errors:[...e.errors,...t.errors]}:e}const ZI=W({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(e,t){const n=Wt(Wo,void 0),r=K(()=>n==null?void 0:n.errors.value[e.name]);function o(){return{message:r.value}}return()=>{if(!r.value)return;const i=e.as?qn(e.as):e.as,s=Pg(i,t,o),a=Object.assign({role:"alert"},t.attrs);return!i&&(Array.isArray(s)||!s)&&(s!=null&&s.length)?s:(Array.isArray(s)||!s)&&!(s!=null&&s.length)?On(i||"span",a,r.value):On(i,a,s)}}}),QI=ZI;function JI(e){const t=$c(e);return K(()=>{var n,r;return t&&(r="meta"in t?t.meta.dirty:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.dirty)!==null&&r!==void 0?r:!1})}function ek(e){const t=$c(e);return K(()=>{var n,r;return t&&(r="meta"in t?t.meta.touched:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.touched)!==null&&r!==void 0?r:!1})}function tk(e){const t=$c(e);return K(()=>{var n,r;return t&&(r="meta"in t?t.meta.valid:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.valid)!==null&&r!==void 0?r:!1})}function nk(e){const t=Xa(Wo),n=e?void 0:Wt(qa);return K(()=>e?t==null?void 0:t.errors.value[De(e)]:n==null?void 0:n.errorMessage.value)}var Ao=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gr=function(e,t,n,r,o,i,s,a,l,u){var c=this;c.numeralDecimalMark=e||".",c.numeralIntegerScale=t>0?t:0,c.numeralDecimalScale=n>=0?n:2,c.numeralThousandsGroupStyle=r||Gr.groupStyle.thousand,c.numeralPositiveOnly=!!o,c.stripLeadingZeroes=i!==!1,c.prefix=s||s===""?s:"",c.signBeforePrefix=!!a,c.tailPrefix=!!l,c.delimiter=u||u===""?u:",",c.delimiterRE=u?new RegExp("\\"+u,"g"):""};Gr.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Gr.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t=this,n,r,o,i,s="";switch(e=e.replace(/[A-Za-z]/g,"").replace(t.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",t.numeralPositiveOnly?"":"-").replace("M",t.numeralDecimalMark),t.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",typeof t.prefix<"u"?t.signBeforePrefix?o=r+t.prefix:o=t.prefix+r:o=r,i=e,e.indexOf(t.numeralDecimalMark)>=0&&(n=e.split(t.numeralDecimalMark),i=n[0],s=t.numeralDecimalMark+n[1].slice(0,t.numeralDecimalScale)),r==="-"&&(i=i.slice(1)),t.numeralIntegerScale>0&&(i=i.slice(0,t.numeralIntegerScale)),t.numeralThousandsGroupStyle){case Gr.groupStyle.lakh:i=i.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+t.delimiter);break;case Gr.groupStyle.wan:i=i.replace(/(\d)(?=(\d{4})+$)/g,"$1"+t.delimiter);break;case Gr.groupStyle.thousand:i=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+t.delimiter);break}return t.tailPrefix?r+i.toString()+(t.numeralDecimalScale>0?s.toString():"")+t.prefix:o+i.toString()+(t.numeralDecimalScale>0?s.toString():"")}};var rk=Gr,Ng=function(e,t,n){var r=this;r.date=[],r.blocks=[],r.datePattern=e,r.dateMin=t.split("-").reverse().map(function(o){return parseInt(o,10)}),r.dateMin.length===2&&r.dateMin.unshift(0),r.dateMax=n.split("-").reverse().map(function(o){return parseInt(o,10)}),r.dateMax.length===2&&r.dateMax.unshift(0),r.initBlocks()};Ng.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,n="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(r,o){if(e.length>0){var i=e.slice(0,r),s=i.slice(0,1),a=e.slice(r);switch(t.datePattern[o]){case"d":i==="00"?i="01":parseInt(s,10)>3?i="0"+s:parseInt(i,10)>31&&(i="31");break;case"m":i==="00"?i="01":parseInt(s,10)>1?i="0"+s:parseInt(i,10)>12&&(i="12");break}n+=i,e=a}}),this.getFixedDateString(n)},getFixedDateString:function(e){var t=this,n=t.datePattern,r=[],o=0,i=0,s=0,a=0,l=0,u=0,c,d,p,h=!1;e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(a=n[0]==="d"?0:2,l=2-a,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),r=this.getFixedDate(c,d,0)),e.length===8&&(n.forEach(function(b,w){switch(b){case"d":o=w;break;case"m":i=w;break;default:s=w;break}}),u=s*2,a=o<=s?o*2:o*2+2,l=i<=s?i*2:i*2+2,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+4),10),h=e.slice(u,u+4).length===4,r=this.getFixedDate(c,d,p)),e.length===4&&(n[0]==="y"||n[1]==="y")&&(l=n[0]==="m"?0:2,u=2-l,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),h=e.slice(u,u+2).length===2,r=[0,d,p]),e.length===6&&(n[0]==="Y"||n[1]==="Y")&&(l=n[0]==="m"?0:4,u=2-.5*l,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+4),10),h=e.slice(u,u+4).length===4,r=[0,d,p]),r=t.getRangeFixedDate(r),t.date=r;var v=r.length===0?e:n.reduce(function(b,w){switch(w){case"d":return b+(r[0]===0?"":t.addLeadingZero(r[0]));case"m":return b+(r[1]===0?"":t.addLeadingZero(r[1]));case"y":return b+(h?t.addLeadingZeroForYear(r[2],!1):"");case"Y":return b+(h?t.addLeadingZeroForYear(r[2],!0):"")}},"");return v},getRangeFixedDate:function(e){var t=this,n=t.datePattern,r=t.dateMin||[],o=t.dateMax||[];return!e.length||r.length<3&&o.length<3||n.find(function(i){return i.toLowerCase()==="y"})&&e[2]===0?e:o.length&&(o[2]e[2]||r[2]===e[2]&&(r[1]>e[1]||r[1]===e[1]&&r[0]>e[0]))?r:e},getFixedDate:function(e,t,n){return e=Math.min(e,31),t=Math.min(t,12),n=parseInt(n||0,10),(t<7&&t%2===0||t>8&&t%2===1)&&(e=Math.min(e,t===2?this.isLeapYear(n)?29:28:30)),[e,t,n]},isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var ok=Ng,Vg=function(e,t){var n=this;n.time=[],n.blocks=[],n.timePattern=e,n.timeFormat=t,n.initBlocks()};Vg.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var e=this;return String(e.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,n="";e=e.replace(/[^\d]/g,"");var r=t.getTimeFormatOptions();return t.blocks.forEach(function(o,i){if(e.length>0){var s=e.slice(0,o),a=s.slice(0,1),l=e.slice(o);switch(t.timePattern[i]){case"h":parseInt(a,10)>r.maxHourFirstDigit?s="0"+a:parseInt(s,10)>r.maxHours&&(s=r.maxHours+"");break;case"m":case"s":parseInt(a,10)>r.maxMinutesFirstDigit?s="0"+a:parseInt(s,10)>r.maxMinutes&&(s=r.maxMinutes+"");break}n+=s,e=l}}),this.getFixedTimeString(n)},getFixedTimeString:function(e){var t=this,n=t.timePattern,r=[],o=0,i=0,s=0,a=0,l=0,u=0,c,d,p;return e.length===6&&(n.forEach(function(h,v){switch(h){case"s":o=v*2;break;case"m":i=v*2;break;case"h":s=v*2;break}}),u=s,l=i,a=o,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),r=this.getFixedTime(p,d,c)),e.length===4&&t.timePattern.indexOf("s")<0&&(n.forEach(function(h,v){switch(h){case"m":i=v*2;break;case"h":s=v*2;break}}),u=s,l=i,c=0,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),r=this.getFixedTime(p,d,c)),t.time=r,r.length===0?e:n.reduce(function(h,v){switch(v){case"s":return h+t.addLeadingZero(r[2]);case"m":return h+t.addLeadingZero(r[1]);case"h":return h+t.addLeadingZero(r[0])}},"")},getFixedTime:function(e,t,n){return n=Math.min(parseInt(n||0,10),60),t=Math.min(t,60),e=Math.min(e,60),[e,t,n]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var ik=Vg,zg=function(e,t){var n=this;n.delimiter=t||t===""?t:" ",n.delimiterRE=t?new RegExp("\\"+t,"g"):"",n.formatter=e};zg.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear(),e=e.replace(/[^\d+]/g,""),e=e.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+"),e=e.replace(t.delimiterRE,"");for(var n="",r,o=!1,i=0,s=e.length;i0,l="";return n===0?e:(t.forEach(function(u,c){if(e.length>0){var d=e.slice(0,u),p=e.slice(u);a?l=o[i?c-1:c]||l:l=r,i?(c>0&&(s+=l),s+=d):(s+=d,d.length===u&&c0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof Ao=="object"&&Ao?Ao:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},dk=ck,je=function(e,t){var n=this,r=!1;if(typeof e=="string"?(n.element=document.querySelector(e),r=document.querySelectorAll(e).length>1):typeof e.length<"u"&&e.length>0?(n.element=e[0],r=e.length>1):n.element=e,!n.element)throw new Error("[cleave.js] Please check the element");if(r)try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch{}t.initValue=n.element.value,n.properties=je.DefaultProperties.assign({},t),n.init()};je.prototype={init:function(){var e=this,t=e.properties;if(!t.numeral&&!t.phone&&!t.creditCard&&!t.time&&!t.date&&t.blocksLength===0&&!t.prefix){e.onInput(t.initValue);return}t.maxLength=je.Util.getMaxLength(t.blocks),e.isAndroid=je.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this,t=e.properties;if(t.swapHiddenInput){var n=e.element.cloneNode(!0);e.element.parentNode.insertBefore(n,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=n,e.element.id=""}},initNumeralFormatter:function(){var e=this,t=e.properties;t.numeral&&(t.numeralFormatter=new je.NumeralFormatter(t.numeralDecimalMark,t.numeralIntegerScale,t.numeralDecimalScale,t.numeralThousandsGroupStyle,t.numeralPositiveOnly,t.stripLeadingZeroes,t.prefix,t.signBeforePrefix,t.tailPrefix,t.delimiter))},initTimeFormatter:function(){var e=this,t=e.properties;t.time&&(t.timeFormatter=new je.TimeFormatter(t.timePattern,t.timeFormat),t.blocks=t.timeFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=je.Util.getMaxLength(t.blocks))},initDateFormatter:function(){var e=this,t=e.properties;t.date&&(t.dateFormatter=new je.DateFormatter(t.datePattern,t.dateMin,t.dateMax),t.blocks=t.dateFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=je.Util.getMaxLength(t.blocks))},initPhoneFormatter:function(){var e=this,t=e.properties;if(t.phone)try{t.phoneFormatter=new je.PhoneFormatter(new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode),t.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,n=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=n===8},onChange:function(e){var t=this,n=t.properties,r=je.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var o=r.getPostDelimiter(t.lastInputValue,n.delimiter,n.delimiters);t.isBackward&&o?n.postDelimiterBackspace=o:n.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),je.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){je.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){je.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this,n=t.properties,r=je.Util,o=t.element.value,i="";n.copyDelimiter?i=o:i=r.stripDelimiters(o,n.delimiter,n.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",i):window.clipboardData.setData("Text",i),e.preventDefault()}catch{}},onInput:function(e){var t=this,n=t.properties,r=je.Util,o=r.getPostDelimiter(e,n.delimiter,n.delimiters);if(!n.numeral&&n.postDelimiterBackspace&&!o&&(e=r.headStr(e,e.length-n.postDelimiterBackspace.length)),n.phone){n.prefix&&(!n.noImmediatePrefix||e.length)?n.result=n.prefix+n.phoneFormatter.format(e).slice(n.prefix.length):n.result=n.phoneFormatter.format(e),t.updateValueState();return}if(n.numeral){n.prefix&&n.noImmediatePrefix&&e.length===0?n.result="":n.result=n.numeralFormatter.format(e),t.updateValueState();return}if(n.date&&(e=n.dateFormatter.getValidatedDate(e)),n.time&&(e=n.timeFormatter.getValidatedTime(e)),e=r.stripDelimiters(e,n.delimiter,n.delimiters),e=r.getPrefixStrippedValue(e,n.prefix,n.prefixLength,n.result,n.delimiter,n.delimiters,n.noImmediatePrefix,n.tailPrefix,n.signBeforePrefix),e=n.numericOnly?r.strip(e,/[^\d]/g):e,e=n.uppercase?e.toUpperCase():e,e=n.lowercase?e.toLowerCase():e,n.prefix&&(n.tailPrefix?e=e+n.prefix:e=n.prefix+e,n.blocksLength===0)){n.result=e,t.updateValueState();return}n.creditCard&&t.updateCreditCardPropsByValue(e),e=r.headStr(e,n.maxLength),n.result=r.getFormattedValue(e,n.blocks,n.blocksLength,n.delimiter,n.delimiters,n.delimiterLazyShow),t.updateValueState()},updateCreditCardPropsByValue:function(e){var t=this,n=t.properties,r=je.Util,o;r.headStr(n.result,4)!==r.headStr(e,4)&&(o=je.CreditCardDetector.getInfo(e,n.creditCardStrictMode),n.blocks=o.blocks,n.blocksLength=n.blocks.length,n.maxLength=r.getMaxLength(n.blocks),n.creditCardType!==o.type&&(n.creditCardType=o.type,n.onCreditCardTypeChanged.call(t,n.creditCardType)))},updateValueState:function(){var e=this,t=je.Util,n=e.properties;if(e.element){var r=e.element.selectionEnd,o=e.element.value,i=n.result;if(r=t.getNextCursorPosition(r,o,i,n.delimiter,n.delimiters),e.isAndroid){window.setTimeout(function(){e.element.value=i,t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()},1);return}e.element.value=i,n.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this,n=t.properties;n.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,n=t.properties;e=e!=null?e.toString():"",n.numeral&&(e=e.replace(".",n.numeralDecimalMark)),n.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this,t=e.properties,n=je.Util,r=e.element.value;return t.rawValueTrimPrefix&&(r=n.getPrefixStrippedValue(r,t.prefix,t.prefixLength,t.result,t.delimiter,t.delimiters,t.noImmediatePrefix,t.tailPrefix,t.signBeforePrefix)),t.numeral?r=t.numeralFormatter.getRawValue(r):r=n.stripDelimiters(r,t.delimiter,t.delimiters),r},getISOFormatDate:function(){var e=this,t=e.properties;return t.date?t.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this,t=e.properties;return t.time?t.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}};je.NumeralFormatter=rk;je.DateFormatter=ok;je.TimeFormatter=ik;je.PhoneFormatter=sk;je.CreditCardDetector=ak;je.Util=uk;je.DefaultProperties=dk;(typeof Ao=="object"&&Ao?Ao:window).Cleave=je;var Kf=je;const fk={mounted(e,t){e.cleave=new Kf(e,{delimiterLazyShow:!0,rawValueTrimPrefix:!0,...t.value||{numeralDecimalScale:0}}),t.value.initValue&&e.cleave.setRawValue(t.value.initValue)},unmounted(e){e.cleave.destroy()},updated(e,t){e.cleave.destroy(),e.cleave=new Kf(e,{delimiterLazyShow:!0,rawValueTrimPrefix:!0,...t.value||{numeralDecimalScale:0}})}},pk={class:"relative"},hk={class:"absolute right-3 top-3 flex flex-row items-center gap-1"},mk={class:"absolute bottom-2 right-3 text-xs text-muted-foreground"},gk=W({__name:"AssetInput",props:{options:{type:Object,default:void 0},asset:{type:Object,default:void 0},modelValue:{type:String,required:!1,default:""}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const r=$r(),o=n,i=e,s=U();let a="";const l=K({get(){return i.modelValue},set(p){o("update:modelValue",p)}});ye(l,p=>{var h;a!==p&&((h=s.value)==null||h.cleave.setRawValue(p))});function u(p){let h=p.target.rawValue;h.endsWith(".")?h=h.substring(0,h.length-1):h.startsWith(".")&&(h="0"+h),a=h,l.value=h}function c(){var p;(p=s.value)==null||p.focus()}function d(){var p,h,v;l.value=Ka(((p=i.asset)==null?void 0:p.amount)??Kt(0),((v=r.metadata[((h=i.asset)==null?void 0:h.tokenId)??""])==null?void 0:v.decimals)??0).toString()}return t({focus:c}),(p,h)=>{var v,b,w;return D(),Te("div",pk,[ba(Ee("input",ce({ref_key:"inputEl",ref:s},p.$attrs,{placeholder:"0",class:f($e)("flex h-16 w-full rounded-md border border-input bg-background px-3 py-2 pb-6 pr-28 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",p.$attrs.class??"")}),null,16),[[f(fk),{...e.options,numeral:!0,numeralPositiveOnly:!0,numeralDecimalScale:((b=f(r).metadata[((v=i.asset)==null?void 0:v.tokenId)??""])==null?void 0:b.decimals)??0,initValue:i.modelValue,onValueChanged:u}]]),Ee("div",hk,[Ee("div",null,it(f(Oi)(e.asset,f(r),10)),1),q(Ic,{"token-id":((w=i.asset)==null?void 0:w.tokenId)??"","custom-class":"w-5"},null,8,["token-id"])]),Ee("div",mk,[Ee("a",{class:"cursor-pointer",onClick:h[0]||(h[0]=S=>d())},"Balance: "+it(f(Ac)(e.asset,f(r))),1)])])}}}),vk=W({__name:"Command",props:{modelValue:{},defaultValue:{},open:{type:Boolean},defaultOpen:{type:Boolean},searchTerm:{},multiple:{type:Boolean},disabled:{type:Boolean},name:{},dir:{},filterFunction:{type:Function},displayValue:{type:Function},asChild:{type:Boolean},as:{}},emits:["update:modelValue","update:open","update:searchTerm"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(Zw),ce(f(o),{open:!0,"model-value":"",class:f($e)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",i.$attrs.class??"")}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"]))}}),yk=W({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(hw),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),bk=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Zh),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),wk=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(mw),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),_k=W({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-2 text-center sm:text-left",t.class))},[X(n.$slots,"default")],2))}}),xk=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Mw),ce(t,{class:f($e)("text-lg text-foreground font-semibold leading-none tracking-tight",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Ek=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Dw),ce(t,{class:f($e)("text-muted-foreground text-sm",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Sk=Ee("span",{class:"sr-only"},"Close",-1),Ck=W({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=uo(t);return(i,s)=>(D(),j(f(gw),null,{default:B(()=>[q(f($w),{class:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),q(f(Pw),ce({class:f($e)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",n.class)},{...n,...f(o)}),{default:B(()=>[X(i.$slots,"default"),q(f(Zh),{class:"absolute top-3 right-3 p-0.5 transition-colors rounded-md hover:bg-secondary"},{default:B(()=>[q(f(yh),{class:"w-4 h-4"}),Sk]),_:1})]),_:3},16,["class"])]),_:3}))}}),Tk=W({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-2 sm:space-y-0 mt-1.5 sm:flex-row sm:justify-end sm:space-x-2",t.class))},[X(n.$slots,"default")],2))}}),Ok=W({__name:"CommandEmpty",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(i_),ce(t,{class:f($e)("py-6 text-center text-sm",n.$attrs.class??"")}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Ak=W({__name:"CommandGroup",props:{asChild:{type:Boolean},as:{},heading:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(e_),ce(t,{class:f($e)("overflow-hidden p-1 text-foreground",n.$attrs.class??"")}),{default:B(()=>[n.heading?(D(),j(f(t_),{key:0,class:"px-2 py-1.5 text-xs font-medium text-muted-foreground"},{default:B(()=>[Re(it(n.heading),1)]),_:1})):pt("",!0),X(n.$slots,"default")]),_:3},16,["class"]))}}),Ik={class:"flex items-center border-b px-3","cmdk-input-wrapper":""},kk={inheritAttrs:!1},Pk=W({...kk,__name:"CommandInput",props:{type:{},disabled:{type:Boolean},autoFocus:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",Ik,[q(f(Ry),{class:"mr-2 h-4 w-4 shrink-0 opacity-50"}),q(f(Qw),ce({...t,...n.$attrs},{"auto-focus":"",class:f($e)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",n.$attrs.class??"")}),null,16,["class"])]))}}),Bk=W({__name:"CommandItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,o=uo(t);return(i,s)=>(D(),j(f(l_),ce({...n,...f(o)},{class:f($e)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i.$attrs.class??""),onSelect:s[0]||(s[0]=eo(()=>{},["prevent"]))}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"]))}}),$k={role:"presentation"},Mk=W({__name:"CommandList",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},dismissable:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(o_),ce(f(o),{class:f($e)("max-h-[300px] overflow-y-auto overflow-x-hidden",i.$attrs.class??"")}),{default:B(()=>[Ee("div",$k,[X(i.$slots,"default")])]),_:3},16,["class"]))}}),Hg=Symbol(),qf=W({inheritAttrs:!1,__name:"FormItem",setup(e){const t=Wn();Fo(Hg,t);const{class:n,...r}=Kp();return(o,i)=>(D(),Te("div",ce({class:f($e)("space-y-2",f(n)??"")},r),[X(o.$slots,"default")],16))}});function Mc(){const e=Wt(qa),t=Wt(Hg),n={valid:tk(),isDirty:JI(),isTouched:ek(),error:nk()};if(!e)throw new Error("useFormField should be used within ");const{name:r}=e,o=t;return{id:o,name:r,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...n}}const Yf=W({inheritAttrs:!1,__name:"FormLabel",props:{for:{},asChild:{type:Boolean},as:{}},setup(e){const{error:t,formItemId:n}=Mc(),{class:r,...o}=Kp();return(i,s)=>(D(),j(f(u_),ce({class:f($e)("block text-sm tracking-tight font-medium text-foreground text-left",f(t)&&"text-destructive",f(r)??""),for:f(n)},o),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class","for"]))}}),Xf=W({__name:"FormControl",setup(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=Mc();return(i,s)=>(D(),j(f(Ma),{id:f(n),"aria-describedby":f(t)?`${f(r)} ${f(o)}`:`${f(r)}`,"aria-invalid":!!f(t)},{default:B(()=>[X(i.$slots,"default")]),_:3},8,["id","aria-describedby","aria-invalid"]))}}),Zf=W({__name:"FormMessage",setup(e){const{name:t,formMessageId:n}=Mc();return(r,o)=>(D(),j(f(QI),{id:f(n),as:"p",name:De(f(t)),class:"text-sm font-medium text-destructive"},null,8,["id","name"]))}}),Dk=W({__name:"Input",props:{defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=mb(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(i,s)=>ba((D(),Te("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>at(o)?o.value=a:null),type:"text",class:lt(f($e)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i.$attrs.class??""))},null,2)),[[py,f(o)]])}}),jg=W({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(d_),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),Ug=W({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(f_),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),Wg=W({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=sn(n,t);return(i,s)=>(D(),j(f(p_),null,{default:B(()=>[q(f(g_),ce({...f(o),...i.$attrs},{class:f($e)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Rk={class:"space-y-2"},Lk={class:"flex-grow"},Fk=W({__name:"SendView",emits:["success"],setup(e,{emit:t}){const n=Kt(_o.toString()),r=su(_o,wo),{handleSubmit:o}=KI(),{toast:i}=Aa(),s=t,a=Uo(),l=$r(),u=U(!1),c=U(""),d=U(!1),p=U(""),h=U([]),v=K(()=>Ze(h.value)?a.balance:ks(a.balance,h.value,V=>V.tokenId)),b=K(()=>{const V=h.value[0];return vl((V==null?void 0:V.amount)??"0",wo)});Ue(()=>{w(a.balance[0])});function w(V){if(d.value=!1,V.tokenId!=="ERG"&&b.value<_o){const N=h.value[0];N.amount=su(_o,wo)}h.value.push({amount:"",tokenId:V.tokenId,info:V})}async function S(){u.value=!0,c.value="Loading...";const V=Qn.fromBase58(a.address),N=await Kn.getBoxes({where:{ergoTree:V.ergoTree}}),H=vl(h.value[0].amount,wo),m=new DO(l.height).from(N).to(new ti(H,p.value).addTokens(h.value.map(A=>{var x;return{tokenId:A.tokenId,amount:vl(A.amount,((x=l.metadata[A.tokenId])==null?void 0:x.decimals)??0)}}).filter(A=>A.amount>0n&&A.tokenId!==Cn))).sendChangeTo(V).payMinFee().build().toEIP12Object();c.value="Signing...";const g=await Ds.signTx(m);c.value="Sending...";const y=await Kn.submitTransaction(g);if(y.success){const A=y.transactionId;i({title:"Success!",description:`Transaction ${Ti(A,20)} has been submitted to the blockchain.`}),l.setWaitingTransaction(),s("success",A)}else i({title:"Something went wrong",description:y.message,variant:"destructive"});u.value=!1,c.value=""}const _=V=>Ze(V)?"Recipient address is required":Qn.validate(V)?!0:"Invalid Ergo address";function I(V){return N=>{if(Ze(N)&&V.tokenId===Cn)return"ERG amount is required";const H=l.metadata[V.tokenId],m=H==null?void 0:H.decimals,g=(H==null?void 0:H.name)??Ti(V.tokenId,10),y=MA(Kt(N),m);return V.tokenId===Cn&&y.lt(n)?`Minimum amount is ${r} ERG`:y.isNegative()?`${g} amount must be greater than 0`:y.gt(V.amount)?`Insufficient ${g} balance`:!0}}const F=o(async()=>{try{await S()}catch(V){u.value=!1,c.value="",i({title:"Something went wrong",description:V.message,variant:"destructive"})}});return(V,N)=>(D(),Te(qe,null,[q(f(_k),null,{default:B(()=>[q(f(xk),null,{default:B(()=>[Re("Send")]),_:1}),q(f(Ek),null,{default:B(()=>[Re("Use this tool to send assets.")]),_:1})]),_:1}),Ee("form",{id:"send-form",class:"space-y-4",novalidate:"",onSubmit:N[1]||(N[1]=(...H)=>f(F)&&f(F)(...H))},[q(f(Gf),{modelValue:p.value,"onUpdate:modelValue":N[0]||(N[0]=H=>p.value=H),name:"recipient",rules:_},{default:B(({componentField:H})=>[q(f(qf),null,{default:B(()=>[q(f(Yf),null,{default:B(()=>[Re("Recipient")]),_:1}),q(f(Xf),null,{default:B(()=>[q(f(Dk),ce({type:"text",placeholder:"Recipient address"},H),null,16)]),_:2},1024),q(f(Zf))]),_:2},1024)]),_:1},8,["modelValue"]),Ee("div",Rk,[(D(!0),Te(qe,null,Qr(h.value,(H,m)=>(D(),j(f(Gf),{key:H.tokenId,modelValue:H.amount,"onUpdate:modelValue":g=>H.amount=g,name:`assets[${m}]`,rules:I(H.info)},{default:B(({componentField:g})=>[q(f(qf),null,{default:B(()=>[m===0?(D(),j(f(Yf),{key:0},{default:B(()=>[Re("Assets")]),_:1})):pt("",!0),q(f(Xf),null,{default:B(()=>[q(gk,ce(g,{asset:H.info}),null,16,["asset"])]),_:2},1024),q(f(Zf))]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","name","rules"]))),128))])],32),q(f(kc)),q(f(jg),{open:d.value,"onUpdate:open":N[2]||(N[2]=H=>d.value=H)},{default:B(()=>[q(f(Ug),{"as-child":""},{default:B(()=>[q(f(Un),{variant:"outline",role:"combobox","aria-expanded":d.value,class:"justify-between"},{default:B(()=>[Re(it("Add asset...")+" ",1),q(f(ky),{class:"ml-2 h-4 w-4 shrink-0 opacity-50"})]),_:1},8,["aria-expanded"])]),_:1}),q(f(Wg),{class:"w-[21rem] p-0"},{default:B(()=>[q(f(vk),null,{default:B(()=>[q(f(Pk),{placeholder:"Search assets..."}),q(f(Mk),null,{default:B(()=>[q(f(Ok),null,{default:B(()=>[Re("No asset found.")]),_:1}),q(f(Ak),null,{default:B(()=>[(D(!0),Te(qe,null,Qr(v.value,H=>(D(),j(f(Bk),{key:H.tokenId,class:"gap-2",value:f(Oi)(H,f(l)),onSelect:m=>w(H)},{default:B(()=>[q(Ic,{"token-id":H.tokenId,"custom-class":"w-5"},null,8,["token-id"]),Ee("div",Lk,it(f(Oi)(H,f(l))),1),Re(" "+it(f(Ac)(H,f(l))),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),q(f(Tk),null,{default:B(()=>[q(f(bk),{"as-child":""},{default:B(()=>[q(f(Un),{variant:"outline",disabled:u.value},{default:B(()=>[Re("Cancel")]),_:1},8,["disabled"])]),_:1}),q(f(Un),{type:"submit",form:"send-form",loading:u.value,class:"gap-2",disabled:u.value},{loading:B(()=>[Re(it(c.value),1)]),default:B(()=>[Re("Send ")]),_:1},8,["loading","disabled"])]),_:1})],64))}});var Hr=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Hr||{}),Nk=Object.defineProperty,Vk=(e,t,n)=>t in e?Nk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Es=(e,t,n)=>(Vk(e,typeof t!="symbol"?t+"":t,n),n);const zk=[0,1],Gg=[1,0],Kg=[2,3],qg=[3,2],Hk={L:zk,M:Gg,Q:Kg,H:qg},jk=/^[0-9]*$/,Uk=/^[A-Z0-9 $%*+.\/:-]*$/,Dl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Dc=1,Rc=40,Qf=3,Wk=3,Ss=40,Gk=10,Yg=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Xg=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class Kk{constructor(t,n,r,o){if(this.version=t,this.ecc=n,Es(this,"size"),Es(this,"mask"),Es(this,"modules",[]),Es(this,"types",[]),tRc)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=Array.from({length:this.size},()=>!1);for(let a=0;a0));this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),o===-1){let a=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u=0&&t=0&&n>>9)*1335;const o=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,Rn(o,i));this.setFunctionModule(8,7,Rn(o,6)),this.setFunctionModule(8,8,Rn(o,7)),this.setFunctionModule(7,8,Rn(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,Rn(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,Rn(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,Rn(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let r=0;r<18;r++){const o=Rn(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,o),this.setFunctionModule(s,i,o)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(r)),s=t+o,a=n+r;s>=0&&s=0&&a{(p!==l-i||v>=a)&&d.push(h[p])});return d}drawCodewords(t){if(t.length!==Math.floor(Eu(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let o=0;o>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*Ss),s=this.modules[i][u],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*Ss}for(let i=0;i5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*Ss),s=this.modules[u][i],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*Ss}for(let i=0;is+(a?1:0),n);const r=this.size*this.size,o=Math.ceil(Math.abs(n*20-r*10)/r)-1;return t+=o*Gk,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,r=[6];for(let o=this.size-7;r.length0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function Nn(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function Rn(e,t){return(e>>>t&1)!==0}class Lc{constructor(t,n,r){if(this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}}const qk=[1,10,12,14],Yk=[2,9,11,13],Xk=[4,8,16,16];function Zg(e,t){return e[Math.floor((t+7)/17)+1]}function Qg(e){const t=[];for(const n of e)Nn(n,8,t);return new Lc(Xk,e.length,t)}function Zk(e){if(!Jg(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n=1<Rc)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function Rs(e,t){return Math.floor(Eu(e)/8)-Yg[t[0]][e]*Xg[t[0]][e]}function nP(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let r=0;r0);for(const r of e){const o=r^n.shift();n.push(0),t.forEach((i,s)=>n[s]^=Su(i,o))}return n}function Su(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function oP(e,t,n=1,r=40,o=-1,i=!0){if(!(Dc<=n&&n<=r&&r<=Rc)||o<-1||o>7)throw new RangeError("Invalid value");let s,a;for(s=n;;s++){const d=Rs(s,t)*8,p=eP(e,s);if(p<=d){a=p;break}if(s>=r)throw new RangeError("Data too long")}for(const d of[Gg,Kg,qg])i&&a<=Rs(s,d)*8&&(t=d);const l=[];for(const d of e){Nn(d.mode[0],4,l),Nn(d.numChars,Zg(d.mode,s),l);for(const p of d.getData())l.push(p)}const u=Rs(s,t)*8;Nn(0,Math.min(4,u-l.length),l),Nn(0,(8-l.length%8)%8,l);for(let d=236;l.length0);return l.forEach((d,p)=>c[p>>>3]|=d<<7-(p&7)),new Kk(s,t,c,o)}function iP(e,t){var d;const{ecc:n="L",boostEcc:r=!1,minVersion:o=1,maxVersion:i=40,maskPattern:s=-1,border:a=1}=t||{},l=typeof e=="string"?Jk(e):Array.isArray(e)?[Qg(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=oP(l,Hk[n],o,i,s,r),c=sP({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},a);return t!=null&&t.invert&&(c.data=c.data.map(p=>p.map(h=>!h))),(d=t==null?void 0:t.onEncoded)==null||d.call(t,c),c}function sP(e,t=1){if(!t)return e;const{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(i=>{for(let s=0;s!1)),e.data.push(Array.from({length:r},s=>!1));const o=Hr.Border;e.types.forEach(i=>{for(let s=0;so)),e.types.push(Array.from({length:r},s=>o));return e}function aP(e,t={}){const n=iP(e,t),{pixelSize:r=10,whiteColor:o="white",blackColor:i="black"}=t,s=n.size*r,a=n.size*r;let l=``;const u=[];for(let c=0;c`,l+=``,l+="",l}const lP={class:"w-64 space-y-8 p-2"},uP={class:"flex flex-col gap-4"},cP=["innerHTML"],dP={class:"break-all rounded-md bg-secondary p-4 text-sm text-secondary-foreground"},fP=W({__name:"AddressView",setup(e){const{toast:t}=Aa(),n=Uo(),r=U("");Ue(o),ye(()=>n.address,o);function o(){r.value=aP(n.address,{ecc:"L",border:0})}function i(){Sg(n.address),t({title:"Copied!",description:"Your address has been copied to the clipboard."})}return(s,a)=>(D(),Te("div",lP,[Ee("div",uP,[Ee("div",{class:"m-auto inline-block w-9/12 rounded-md border bg-white p-4",innerHTML:r.value},null,8,cP),Ee("div",dP,it(f(n).address),1)]),q(Un,{size:"sm",class:"w-full",onClick:i},{default:B(()=>[Re("Copy address")]),_:1})]))}}),pP={class:"flex flex-grow flex-col gap-8"},hP={class:"flex-grow"},mP={class:"text-3xl font-bold"},gP={class:"text-xs text-muted-foreground"},vP={key:0,class:"m-auto cursor-default space-y-4"},yP=Ee("p",{class:"text-muted-foreground"},"The balance is empty",-1),bP={class:"my-1 px-6"},wP=W({__name:"BalanceView",setup(e){const t=Uo(),n=$r(),r=U(!1),o=U(!1),i=U(""),s=K(()=>{var c,d;let u=Kt(0);for(const p of t.balance)u=u.plus(Ka(p.amount,((c=n.metadata[p.tokenId])==null?void 0:c.decimals)??0).times(((d=n.prices[p.tokenId])==null?void 0:d.erg)??0));return Ai(u,4)}),a=K(()=>{var c;const u=Kt(((c=n.prices[Cn])==null?void 0:c.fiat)??0);return Ai(u.times(s.value),2)});function l(u){i.value=u,r.value=!0,o.value=!1}return(u,c)=>(D(),Te("div",pP,[q(f(js),null,{default:B(()=>[q(f(Gu),{class:"flex-row items-center justify-between space-y-0"},{default:B(()=>[q(f(Ku),{class:"text-sm font-medium"},{default:B(()=>[Re("Total Balance")]),_:1}),q(f(Fy),{size:14})]),_:1}),q(f(Us),{class:"flex justify-start gap-2"},{default:B(()=>[Ee("div",hP,[Ee("h1",mP,it(s.value)+" ERG",1),Ee("p",gP,"≈ "+it(a.value)+" USD",1)]),q(f(yk),{open:o.value,"onUpdate:open":c[0]||(c[0]=d=>o.value=d)},{default:B(()=>[q(f(wk),{"as-child":""},{default:B(()=>[q(f(Un),{disabled:!f(t).connected,class:"gap-2",size:"sm",variant:"secondary"},{default:B(()=>[q(f(Ly),{class:"m-auto",size:16}),Re(" Send ")]),_:1},8,["disabled"])]),_:1}),q(f(Ck),{class:"max-h-[80vh] max-w-[24rem] overflow-auto"},{default:B(()=>[q(Fk,{onSuccess:l})]),_:1})]),_:1},8,["open"]),q(f(jg),null,{default:B(()=>[q(f(Ug),{"as-child":""},{default:B(()=>[q(f(Un),{disabled:!f(t).connected,class:"gap-2",size:"sm",variant:"secondary"},{default:B(()=>[q(f($y),{class:"m-auto",size:16}),Re(" Receive ")]),_:1},8,["disabled"])]),_:1}),q(f(Wg),null,{default:B(()=>[q(fP)]),_:1})]),_:1})]),_:1})]),_:1}),Ee("div",null,[q(f(js),{class:"h-[18.5rem] flex-grow"},{default:B(()=>[q(f(Us),{class:"flex h-full w-full px-0 py-1 align-middle"},{default:B(()=>[f(Ze)(f(t).balance)?(D(),Te("div",vP,[q(f(Dy),{class:"m-auto text-muted-foreground/30",size:60}),yP])):(D(),j(f(Og),{key:1,class:"h-full w-full"},{default:B(()=>[Ee("div",bP,[(D(!0),Te(qe,null,Qr(f(t).balance,(d,p)=>(D(),Te("div",{key:d.tokenId},[q(Tg,{"root-class":"py-4","logo-class":"w-10",asset:d,link:!0},null,8,["asset"]),p(D(),j(f(K_),ce({...n,...f(uo)(r)},{class:f($e)(f(TP)({variant:n.variant}),n.class),"onUpdate:open":o.onOpenChange}),{default:B(()=>[X(o.$slots,"default")]),_:3},16,["class","onUpdate:open"]))}}),xP=W({__name:"ToastViewport",props:{hotkey:{},label:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(X_),ce(t,{class:f($e)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t.class)}),null,16,["class"]))}}),EP=W({__name:"ToastClose",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Y_),ce(t,{class:f($e)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t.class)}),{default:B(()=>[q(f(yh),{class:"h-4 w-4"})]),_:1},16,["class"]))}}),SP=W({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Z_),ce(t,{class:f($e)("text-sm font-semibold",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Jf=W({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Q_),ce({class:f($e)("text-sm opacity-90",t.class)},t),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),CP=W({__name:"ToastProvider",props:{label:{},duration:{},swipeDirection:{},swipeThreshold:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(R_),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),TP=Uu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),OP={class:"grid gap-1"},AP=W({__name:"Toaster",setup(e){const{toasts:t}=Aa();return(n,r)=>(D(),j(f(CP),null,{default:B(()=>[(D(!0),Te(qe,null,Qr(f(t),o=>(D(),j(f(_P),ce({key:o.id},o),{default:B(()=>[Ee("div",OP,[o.title?(D(),j(f(SP),{key:0},{default:B(()=>[Re(it(o.title),1)]),_:2},1024)):pt("",!0),o.description?(D(),Te(qe,{key:1},[wi(o.description)?(D(),j(f(Jf),{key:0},{default:B(()=>[(D(),j(qn(o.description)))]),_:2},1024)):(D(),j(f(Jf),{key:1},{default:B(()=>[Re(it(o.description),1)]),_:2},1024))],64)):pt("",!0),q(f(EP))]),(D(),j(qn(o.action)))]),_:2},1040))),128)),q(f(xP))]),_:1}))}}),IP={class:"flex min-h-screen flex-col items-center bg-foreground/5"},kP=W({__name:"App",setup(e){const t=$r();return(n,r)=>(D(),Te(qe,null,[Ee("div",IP,[q(f(js),{class:"my-8 flex w-11/12 flex-grow flex-col gap-4 border p-4 shadow-2xl shadow-primary/10 sm:w-11/12 lg:w-8/12"},{default:B(()=>[q(PA),q(f(Us),{class:"flex flex-grow flex-row gap-8"},{default:B(()=>[q(wP),q(f(js),{class:"w-5/12"},{default:B(()=>[q(f(Gu),{class:"flex-row items-center justify-between space-y-0"},{default:B(()=>[q(f(Ku),{class:"text-sm font-medium"},{default:B(()=>[Re("Transaction History")]),_:1}),f(t).waitingTransaction?(D(),j(f(vh),{key:0,class:"animate-spin",size:16})):(D(),j(f(gh),{key:1,size:14}))]),_:1}),q(iI)]),_:1})]),_:1})]),_:1})]),q(AP)],64))}}),PP=Ey();by(kP).use(PP).mount("#app")});export default BP(); + */function Pt(e){return typeof e=="function"}function Ag(e){return e==null}const io=e=>e!==null&&!!e&&typeof e=="object"&&!Array.isArray(e);function Pc(e){return Number(e)>=0}function iI(e){const t=parseFloat(e);return isNaN(t)?e:t}function sI(e){return typeof e=="object"&&e!==null}function aI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Rf(e){if(!sI(e)||aI(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ii(e,t){return Object.keys(t).forEach(n=>{if(Rf(t[n])&&Rf(e[n])){e[n]||(e[n]={}),Ii(e[n],t[n]);return}e[n]=t[n]}),e}function ni(e){const t=e.split(".");if(!t.length)return"";let n=String(t[0]);for(let r=1;rdI(o)&&i in o?o[i]:n,e):n}function vr(e,t,n){if(Ya(t)){e[Bc(t)]=n;return}const r=t.split(/\.|\[(\d+)\]/).filter(Boolean);let o=e;for(let i=0;iVt(e,n.slice(0,s).join(".")));for(let i=o.length-1;i>=0;i--)if(fI(o[i])){if(i===0){$l(e,n[0]);continue}$l(o[i-1],n[i-1])}}function en(e){return Object.keys(e)}function Xa(e,t=void 0){const n=Rt();return(n==null?void 0:n.provides[e])||Wt(e,t)}function zf(e,t,n){if(Array.isArray(e)){const r=[...e],o=r.findIndex(i=>Dt(i,t));return o>=0?r.splice(o,1):r.push(t),r}return Dt(e,t)?n:t}function Hf(e,t=0){let n=null,r=[];return function(...o){return n&&clearTimeout(n),n=setTimeout(()=>{const i=e(...o);r.forEach(s=>s(i)),r=[]},t),new Promise(i=>r.push(i))}}function vI(e,t){return io(t)&&t.number?iI(e):e}function bu(e,t){let n;return async function(...o){const i=e(...o);n=i;const s=await i;return i!==n?s:(n=void 0,t(s,o))}}function wu(e){return Array.isArray(e)?e:e?[e]:[]}function $c(e){const t=Xa(Wo),n=e?q(()=>t==null?void 0:t.getPathState(De(e))):void 0,r=e?void 0:Wt(qa);return!r&&(n!=null&&n.value),n||r}function _s(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function yI(e){let t=null,n=[];return function(...r){const o=Ke(()=>{if(t!==o)return;const i=e(...r);n.forEach(s=>s(i)),n=[],t=null});return t=o,new Promise(i=>n.push(i))}}function Pg(e,t,n){return t.slots.default?typeof e=="string"||!e?t.slots.default(n()):{default:()=>{var r,o;return(o=(r=t.slots).default)===null||o===void 0?void 0:o.call(r,n())}}:t.slots.default}function Ml(e){if(Bg(e))return e._value}function Bg(e){return"_value"in e}function bI(e){return e.type==="number"||e.type==="range"?Number.isNaN(e.valueAsNumber)?e.value:e.valueAsNumber:e.value}function sa(e){if(!kg(e))return e;const t=e.target;if(Yi(t.type)&&Bg(t))return Ml(t);if(t.type==="file"&&t.files){const n=Array.from(t.files);return t.multiple?n:n[0]}if(pI(t))return Array.from(t.options).filter(n=>n.selected&&!n.disabled).map(Ml);if(Ig(t)){const n=Array.from(t.options).find(r=>r.selected);return n?Ml(n):t.value}return bI(t)}function $g(e){const t={};return Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),e?io(e)&&e._$$isNormalized?e:io(e)?Object.keys(e).reduce((n,r)=>{const o=wI(e[r]);return e[r]!==!1&&(n[r]=jf(o)),n},t):typeof e!="string"?t:e.split("|").reduce((n,r)=>{const o=_I(r);return o.name&&(n[o.name]=jf(o.params)),n},t):t}function wI(e){return e===!0?[]:Array.isArray(e)||io(e)?e:[e]}function jf(e){const t=n=>typeof n=="string"&&n[0]==="@"?xI(n.slice(1)):n;return Array.isArray(e)?e.map(t):e instanceof RegExp?[e]:Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{})}const _I=e=>{let t=[];const n=e.split(":")[0];return e.includes(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:n,params:t}};function xI(e){const t=n=>Vt(n,e)||n[e];return t.__locatorRef=e,t}function EI(e){return Array.isArray(e)?e.filter(yu):en(e).filter(t=>yu(e[t])).map(t=>e[t])}const SI={generateMessage:({field:e})=>`${e} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0};let CI=Object.assign({},SI);const Wr=()=>CI;async function Mg(e,t,n={}){const r=n==null?void 0:n.bails,o={name:(n==null?void 0:n.name)||"{field}",rules:t,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},s=(await TI(o,e)).errors;return{errors:s,valid:!s.length}}async function TI(e,t){if(mn(e.rules)||ia(e.rules))return AI(t,e.rules);if(Pt(e.rules)||Array.isArray(e.rules)){const s={field:e.label||e.name,name:e.name,label:e.label,form:e.formData,value:t},a=Array.isArray(e.rules)?e.rules:[e.rules],l=a.length,u=[];for(let c=0;c{const l=a.path||"";return s[l]||(s[l]={errors:[],path:l}),s[l].errors.push(...a.errors),s},{});return{errors:Object.values(i)}}}}}async function AI(e,t){const r=await(mn(t)?t:Dg(t)).parse(e),o=[];for(const i of r.errors)i.errors.length&&o.push(...i.errors);return{errors:o}}async function II(e,t,n){const r=uI(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const o=kI(n.params,e.formData),i={field:e.label||e.name,name:e.name,label:e.label,value:t,form:e.formData,rule:Object.assign(Object.assign({},n),{params:o})},s=await r(t,o,i);return typeof s=="string"?{error:s}:{error:s?void 0:Rg(i)}}function Rg(e){const t=Wr().generateMessage;return t?t(e):"Field is invalid"}function kI(e,t){const n=r=>yu(r)?r(t):r;return Array.isArray(e)?e.map(n):Object.keys(e).reduce((r,o)=>(r[o]=n(e[o]),r),{})}async function PI(e,t){const r=await(mn(e)?e:Dg(e)).parse(rt(t)),o={},i={};for(const s of r.errors){const a=s.errors,l=(s.path||"").replace(/\["(\d+)"\]/g,(u,c)=>`[${c}]`);o[l]={valid:!a.length,errors:a},a.length&&(i[l]=a[0])}return{valid:!r.errors.length,results:o,errors:i,values:r.value}}async function BI(e,t,n){const o=en(e).map(async u=>{var c,d,p;const h=(c=n==null?void 0:n.names)===null||c===void 0?void 0:c[u],v=await Mg(Vt(t,u),e[u],{name:(h==null?void 0:h.name)||u,label:h==null?void 0:h.label,values:t,bails:(p=(d=n==null?void 0:n.bailsMap)===null||d===void 0?void 0:d[u])!==null&&p!==void 0?p:!0});return Object.assign(Object.assign({},v),{path:u})});let i=!0;const s=await Promise.all(o),a={},l={};for(const u of s)a[u.path]={valid:u.valid,errors:u.errors},u.valid||(i=!1,l[u.path]=u.errors[0]);return{valid:i,results:a,errors:l}}let Uf=0;function $I(e,t){const{value:n,initialValue:r,setInitialValue:o}=MI(e,t.modelValue,t.form);if(!t.form){let l=function(h){var v;"value"in h&&(n.value=h.value),"errors"in h&&c(h.errors),"touched"in h&&(p.touched=(v=h.touched)!==null&&v!==void 0?v:p.touched),"initialValue"in h&&o(h.initialValue)};const{errors:u,setErrors:c}=LI(),d=Uf>=Number.MAX_SAFE_INTEGER?0:++Uf,p=RI(n,r,u,t.schema);return{id:d,path:e,value:n,initialValue:r,meta:p,flags:{pendingUnmount:{[d]:!1},pendingReset:!1},errors:u,setState:l}}const i=t.form.createPathState(e,{bails:t.bails,label:t.label,type:t.type,validate:t.validate,schema:t.schema}),s=q(()=>i.errors);function a(l){var u,c,d;"value"in l&&(n.value=l.value),"errors"in l&&((u=t.form)===null||u===void 0||u.setFieldError(f(e),l.errors)),"touched"in l&&((c=t.form)===null||c===void 0||c.setFieldTouched(f(e),(d=l.touched)!==null&&d!==void 0?d:!1)),"initialValue"in l&&o(l.initialValue)}return{id:Array.isArray(i.id)?i.id[i.id.length-1]:i.id,path:e,value:n,errors:s,meta:i,initialValue:r,flags:i.__flags,setState:a}}function MI(e,t,n){const r=U(f(t));function o(){return n?Vt(n.initialValues.value,f(e),f(r)):f(r)}function i(u){if(!n){r.value=u;return}n.setFieldInitialValue(f(e),u,!0)}const s=q(o);if(!n)return{value:U(o()),initialValue:s,setInitialValue:i};const a=DI(t,n,s,e);return n.stageInitialValue(f(e),a,!0),{value:q({get(){return Vt(n.values,f(e))},set(u){n.setFieldValue(f(e),u,!1)}}),initialValue:s,setInitialValue:i}}function DI(e,t,n,r){return at(e)?f(e):e!==void 0?e:Vt(t.values,f(r),f(n))}function RI(e,t,n,r){var o,i;const s=(i=(o=r==null?void 0:r.describe)===null||o===void 0?void 0:o.call(r).required)!==null&&i!==void 0?i:!1,a=Tn({touched:!1,pending:!1,valid:!0,required:s,validated:!!f(n).length,initialValue:q(()=>f(t)),dirty:q(()=>!Dt(f(e),f(t)))});return ye(n,l=>{a.valid=!l.length},{immediate:!0,flush:"sync"}),a}function LI(){const e=U([]);return{errors:e,setErrors:t=>{e.value=wu(t)}}}function FI(e,t,n){return Yi(n==null?void 0:n.type)?VI(e,t,n):Lg(e,t,n)}function Lg(e,t,n){const{initialValue:r,validateOnMount:o,bails:i,type:s,checkedValue:a,label:l,validateOnValueUpdate:u,uncheckedValue:c,controlled:d,keepValueOnUnmount:p,syncVModel:h,form:v}=NI(n),b=d?Xa(Wo):void 0,w=v||b,S=q(()=>ni(De(e))),_=q(()=>{if(De(w==null?void 0:w.schema))return;const ie=f(t);return ia(ie)||mn(ie)||Pt(ie)||Array.isArray(ie)?ie:$g(ie)}),{id:I,value:F,initialValue:V,meta:N,setState:H,errors:m,flags:g}=$I(S,{modelValue:r,form:w,bails:i,label:l,type:s,validate:_.value?O:void 0,schema:mn(t)?t:void 0}),y=q(()=>m.value[0]);h&&zI({value:F,prop:h,handleChange:E,shouldValidate:()=>u&&!g.pendingReset});const A=(ee,ie=!1)=>{N.touched=!0,ie&&C()};async function x(ee){var ie,ve;if(w!=null&&w.validateSchema){const{results:Pe}=await w.validateSchema(ee);return(ie=Pe[De(S)])!==null&&ie!==void 0?ie:{valid:!0,errors:[]}}return _.value?Mg(F.value,_.value,{name:De(S),label:De(l),values:(ve=w==null?void 0:w.values)!==null&&ve!==void 0?ve:{},bails:i}):{valid:!0,errors:[]}}const C=bu(async()=>(N.pending=!0,N.validated=!0,x("validated-only")),ee=>(g.pendingUnmount[Oe.id]||(H({errors:ee.errors}),N.pending=!1,N.valid=ee.valid),ee)),k=bu(async()=>x("silent"),ee=>(N.valid=ee.valid,ee));function O(ee){return(ee==null?void 0:ee.mode)==="silent"?k():C()}function E(ee,ie=!0){const ve=sa(ee);de(ve,ie)}Ue(()=>{if(o)return C();(!w||!w.validateSchema)&&k()});function M(ee){N.touched=ee}function $(ee){var ie;const ve=ee&&"value"in ee?ee.value:V.value;H({value:rt(ve),initialValue:rt(ve),touched:(ie=ee==null?void 0:ee.touched)!==null&&ie!==void 0?ie:!1,errors:(ee==null?void 0:ee.errors)||[]}),N.pending=!1,N.validated=!1,k()}const G=Rt();function de(ee,ie=!0){F.value=G&&h?vI(ee,G.props.modelModifiers):ee,(ie?C:k)()}function ue(ee){H({errors:Array.isArray(ee)?ee:[ee]})}const ge=q({get(){return F.value},set(ee){de(ee,u)}}),Oe={id:I,name:S,label:l,value:ge,meta:N,errors:m,errorMessage:y,type:s,checkedValue:a,uncheckedValue:c,bails:i,keepValueOnUnmount:p,resetField:$,handleReset:()=>$(),validate:O,handleChange:E,handleBlur:A,setState:H,setTouched:M,setErrors:ue,setValue:de};if(Fo(qa,Oe),at(t)&&typeof f(t)!="function"&&ye(t,(ee,ie)=>{Dt(ee,ie)||(N.validated?C():k())},{deep:!0}),!w)return Oe;const Je=q(()=>{const ee=_.value;return!ee||Pt(ee)||ia(ee)||mn(ee)||Array.isArray(ee)?{}:Object.keys(ee).reduce((ie,ve)=>{const Pe=EI(ee[ve]).map(Ot=>Ot.__locatorRef).reduce((Ot,ht)=>{const Ge=Vt(w.values,ht)||w.values[ht];return Ge!==void 0&&(Ot[ht]=Ge),Ot},{});return Object.assign(ie,Pe),ie},{})});return ye(Je,(ee,ie)=>{if(!Object.keys(ee).length)return;!Dt(ee,ie)&&(N.validated?C():k())}),_a(()=>{var ee;const ie=(ee=De(Oe.keepValueOnUnmount))!==null&&ee!==void 0?ee:De(w.keepValuesOnUnmount),ve=De(S);if(ie||!w||g.pendingUnmount[Oe.id]){w==null||w.removePathState(ve,I);return}g.pendingUnmount[Oe.id]=!0;const Pe=w.getPathState(ve);if(Array.isArray(Pe==null?void 0:Pe.id)&&(Pe!=null&&Pe.multiple)?Pe!=null&&Pe.id.includes(Oe.id):(Pe==null?void 0:Pe.id)===Oe.id){if(Pe!=null&&Pe.multiple&&Array.isArray(Pe.value)){const ht=Pe.value.findIndex(Ge=>Dt(Ge,De(Oe.checkedValue)));if(ht>-1){const Ge=[...Pe.value];Ge.splice(ht,1),w.setFieldValue(ve,Ge)}Array.isArray(Pe.id)&&Pe.id.splice(Pe.id.indexOf(Oe.id),1)}else w.unsetPathValue(De(S));w.removePathState(ve,I)}}),Oe}function NI(e){const t=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(e!=null&&e.syncVModel),r=typeof(e==null?void 0:e.syncVModel)=="string"?e.syncVModel:(e==null?void 0:e.modelPropName)||"modelValue",o=n&&!("initialValue"in(e||{}))?_u(Rt(),r):e==null?void 0:e.initialValue;if(!e)return Object.assign(Object.assign({},t()),{initialValue:o});const i="valueProp"in e?e.valueProp:e.checkedValue,s="standalone"in e?!e.standalone:e.controlled,a=(e==null?void 0:e.modelPropName)||(e==null?void 0:e.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},t()),e||{}),{initialValue:o,controlled:s??!0,checkedValue:i,syncVModel:a})}function VI(e,t,n){const r=n!=null&&n.standalone?void 0:Xa(Wo),o=n==null?void 0:n.checkedValue,i=n==null?void 0:n.uncheckedValue;function s(a){const l=a.handleChange,u=q(()=>{const d=De(a.value),p=De(o);return Array.isArray(d)?d.findIndex(h=>Dt(h,p))>=0:Dt(p,d)});function c(d,p=!0){var h,v;if(u.value===((h=d==null?void 0:d.target)===null||h===void 0?void 0:h.checked)){p&&a.validate();return}const b=De(e),w=r==null?void 0:r.getPathState(b),S=sa(d);let _=(v=De(o))!==null&&v!==void 0?v:S;r&&(w!=null&&w.multiple)&&w.type==="checkbox"?_=zf(Vt(r.values,b)||[],_,void 0):(n==null?void 0:n.type)==="checkbox"&&(_=zf(De(a.value),_,De(i))),l(_,p)}return Object.assign(Object.assign({},a),{checked:u,checkedValue:o,uncheckedValue:i,handleChange:c})}return s(Lg(e,t,n))}function zI({prop:e,value:t,handleChange:n,shouldValidate:r}){const o=Rt();if(!o||!e)return;const i=typeof e=="string"?e:"modelValue",s=`update:${i}`;i in o.props&&(ye(t,a=>{Dt(a,_u(o,i))||o.emit(s,a)}),ye(()=>_u(o,i),a=>{if(a===oa&&t.value===void 0)return;const l=a===oa?void 0:a;Dt(l,t.value)||n(l,r())}))}function _u(e,t){if(e)return e.props[t]}const HI=W({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>Wr().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:oa},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(e,t){const n=vo(e,"rules"),r=vo(e,"name"),o=vo(e,"label"),i=vo(e,"uncheckedValue"),s=vo(e,"keepValue"),{errors:a,value:l,errorMessage:u,validate:c,handleChange:d,handleBlur:p,setTouched:h,resetField:v,handleReset:b,meta:w,checked:S,setErrors:_}=FI(r,n,{validateOnMount:e.validateOnMount,bails:e.bails,standalone:e.standalone,type:t.attrs.type,initialValue:UI(e,t),checkedValue:t.attrs.value,uncheckedValue:i,label:o,validateOnValueUpdate:e.validateOnModelUpdate,keepValueOnUnmount:s,syncVModel:!0}),I=function(g,y=!0){d(g,y)},F=q(()=>{const{validateOnInput:m,validateOnChange:g,validateOnBlur:y,validateOnModelUpdate:A}=jI(e);function x(E){p(E,y),Pt(t.attrs.onBlur)&&t.attrs.onBlur(E)}function C(E){I(E,m),Pt(t.attrs.onInput)&&t.attrs.onInput(E)}function k(E){I(E,g),Pt(t.attrs.onChange)&&t.attrs.onChange(E)}const O={name:e.name,onBlur:x,onInput:C,onChange:k};return O["onUpdate:modelValue"]=E=>I(E,A),O}),V=q(()=>{const m=Object.assign({},F.value);Yi(t.attrs.type)&&S&&(m.checked=S.value);const g=Wf(e,t);return mI(g,t.attrs)&&(m.value=l.value),m}),N=q(()=>Object.assign(Object.assign({},F.value),{modelValue:l.value}));function H(){return{field:V.value,componentField:N.value,value:l.value,meta:w,errors:a.value,errorMessage:u.value,validate:c,resetField:v,handleChange:I,handleInput:m=>I(m,!1),handleReset:b,handleBlur:F.value.onBlur,setTouched:h,setErrors:_}}return t.expose({value:l,meta:w,errors:a,errorMessage:u,setErrors:_,setTouched:h,reset:v,validate:c,handleChange:d}),()=>{const m=qn(Wf(e,t)),g=Pg(m,t,H);return m?On(m,Object.assign(Object.assign({},t.attrs),V.value),g):g}}});function Wf(e,t){let n=e.as||"";return!e.as&&!t.slots.default&&(n="input"),n}function jI(e){var t,n,r,o;const{validateOnInput:i,validateOnChange:s,validateOnBlur:a,validateOnModelUpdate:l}=Wr();return{validateOnInput:(t=e.validateOnInput)!==null&&t!==void 0?t:i,validateOnChange:(n=e.validateOnChange)!==null&&n!==void 0?n:s,validateOnBlur:(r=e.validateOnBlur)!==null&&r!==void 0?r:a,validateOnModelUpdate:(o=e.validateOnModelUpdate)!==null&&o!==void 0?o:l}}function UI(e,t){return Yi(t.attrs.type)?Ff(e,"modelValue")?e.modelValue:void 0:Ff(e,"modelValue")?e.modelValue:t.attrs.value}const Gf=HI;let WI=0;const xs=["bails","fieldsCount","id","multiple","type","validate"];function Fg(e){const t=Object.assign({},De((e==null?void 0:e.initialValues)||{})),n=f(e==null?void 0:e.validationSchema);return n&&mn(n)&&Pt(n.cast)?rt(n.cast(t)||{}):rt(t)}function GI(e){var t;const n=WI++;let r=0;const o=U(!1),i=U(!1),s=U(0),a=[],l=Tn(Fg(e)),u=U([]),c=U({}),d=U({}),p=yI(()=>{d.value=u.value.reduce((R,L)=>(R[ni(De(L.path))]=L,R),{})});function h(R,L){const Y=E(R);if(!Y){typeof R=="string"&&(c.value[ni(R)]=wu(L));return}if(typeof R=="string"){const se=ni(R);c.value[se]&&delete c.value[se]}Y.errors=wu(L),Y.valid=!Y.errors.length}function v(R){en(R).forEach(L=>{h(L,R[L])})}e!=null&&e.initialErrors&&v(e.initialErrors);const b=q(()=>{const R=u.value.reduce((L,Y)=>(Y.errors.length&&(L[Y.path]=Y.errors),L),{});return Object.assign(Object.assign({},c.value),R)}),w=q(()=>en(b.value).reduce((R,L)=>{const Y=b.value[L];return Y!=null&&Y.length&&(R[L]=Y[0]),R},{})),S=q(()=>u.value.reduce((R,L)=>(R[L.path]={name:L.path||"",label:L.label||""},R),{})),_=q(()=>u.value.reduce((R,L)=>{var Y;return R[L.path]=(Y=L.bails)!==null&&Y!==void 0?Y:!0,R},{})),I=Object.assign({},(e==null?void 0:e.initialErrors)||{}),F=(t=e==null?void 0:e.keepValuesOnUnmount)!==null&&t!==void 0?t:!1,{initialValues:V,originalInitialValues:N,setInitialValues:H}=qI(u,l,e),m=KI(u,l,N,w),g=q(()=>u.value.reduce((R,L)=>{const Y=Vt(l,L.path);return vr(R,L.path,Y),R},{})),y=e==null?void 0:e.validationSchema;function A(R,L){var Y,se;const xe=q(()=>Vt(V.value,De(R))),he=d.value[De(R)],Ne=(L==null?void 0:L.type)==="checkbox"||(L==null?void 0:L.type)==="radio";if(he&&Ne){he.multiple=!0;const un=r++;return Array.isArray(he.id)?he.id.push(un):he.id=[he.id,un],he.fieldsCount++,he.__flags.pendingUnmount[un]=!1,he}const Me=q(()=>Vt(l,De(R))),Ve=De(R),bt=$.findIndex(un=>un===Ve);bt!==-1&&$.splice(bt,1);const et=q(()=>{var un,Go,Za,Fc,Qa,Ja;return mn(y)?(Za=(Go=(un=y).describe)===null||Go===void 0?void 0:Go.call(un,De(R)).required)!==null&&Za!==void 0?Za:!1:mn(L==null?void 0:L.schema)&&(Ja=(Qa=(Fc=L==null?void 0:L.schema).describe)===null||Qa===void 0?void 0:Qa.call(Fc).required)!==null&&Ja!==void 0?Ja:!1}),At=r++,Lt=Tn({id:At,path:R,touched:!1,pending:!1,valid:!0,validated:!!(!((Y=I[Ve])===null||Y===void 0)&&Y.length),required:et,initialValue:xe,errors:ga([]),bails:(se=L==null?void 0:L.bails)!==null&&se!==void 0?se:!1,label:L==null?void 0:L.label,type:(L==null?void 0:L.type)||"default",value:Me,multiple:!1,__flags:{pendingUnmount:{[At]:!1},pendingReset:!1},fieldsCount:1,validate:L==null?void 0:L.validate,dirty:q(()=>!Dt(f(Me),f(xe)))});return u.value.push(Lt),d.value[Ve]=Lt,p(),w.value[Ve]&&!I[Ve]&&Ke(()=>{re(Ve,{mode:"silent"})}),at(R)&&ye(R,un=>{p();const Go=rt(Me.value);d.value[un]=Lt,Ke(()=>{vr(l,un,Go)})}),Lt}const x=Hf(fe,5),C=Hf(fe,5),k=bu(async R=>await(R==="silent"?x():C()),(R,[L])=>{const Y=en(ie.errorBag.value),xe=[...new Set([...en(R.results),...u.value.map(he=>he.path),...Y])].sort().reduce((he,Ne)=>{var Me;const Ve=Ne,bt=E(Ve)||M(Ve),et=((Me=R.results[Ve])===null||Me===void 0?void 0:Me.errors)||[],At=De(bt==null?void 0:bt.path)||Ve,Lt=YI({errors:et,valid:!et.length},he.results[At]);return he.results[At]=Lt,Lt.valid||(he.errors[At]=Lt.errors[0]),bt&&c.value[At]&&delete c.value[At],bt?(bt.valid=Lt.valid,L==="silent"||L==="validated-only"&&!bt.validated||h(bt,Lt.errors),he):(h(At,et),he)},{valid:R.valid,results:{},errors:{}});return R.values&&(xe.values=R.values),xe});function O(R){u.value.forEach(R)}function E(R){const L=typeof R=="string"?ni(R):R;return typeof L=="string"?d.value[L]:L}function M(R){return u.value.filter(Y=>R.startsWith(Y.path)).reduce((Y,se)=>Y?se.path.length>Y.path.length?se:Y:se,void 0)}let $=[],G;function de(R){return $.push(R),G||(G=Ke(()=>{[...$].sort().reverse().forEach(Y=>{Vf(l,Y)}),$=[],G=null})),G}function ue(R){return function(Y,se){return function(he){return he instanceof Event&&(he.preventDefault(),he.stopPropagation()),O(Ne=>Ne.touched=!0),o.value=!0,s.value++,te().then(Ne=>{const Me=rt(l);if(Ne.valid&&typeof Y=="function"){const Ve=rt(g.value);let bt=R?Ve:Me;return Ne.values&&(bt=Ne.values),Y(bt,{evt:he,controlledValues:Ve,setErrors:v,setFieldError:h,setTouched:z,setFieldTouched:Ge,setValues:Ot,setFieldValue:ve,resetForm:Q,resetField:Z})}!Ne.valid&&typeof se=="function"&&se({values:Me,evt:he,errors:Ne.errors,results:Ne.results})}).then(Ne=>(o.value=!1,Ne),Ne=>{throw o.value=!1,Ne})}}}const Oe=ue(!1);Oe.withControlled=ue(!0);function Je(R,L){const Y=u.value.findIndex(xe=>xe.path===R),se=u.value[Y];if(!(Y===-1||!se)){if(Ke(()=>{re(R,{mode:"silent",warn:!1})}),se.multiple&&se.fieldsCount&&se.fieldsCount--,Array.isArray(se.id)){const xe=se.id.indexOf(L);xe>=0&&se.id.splice(xe,1),delete se.__flags.pendingUnmount[L]}(!se.multiple||se.fieldsCount<=0)&&(u.value.splice(Y,1),ne(R),p(),delete d.value[R])}}function ee(R){en(d.value).forEach(L=>{L.startsWith(R)&&delete d.value[L]}),u.value=u.value.filter(L=>!L.path.startsWith(R)),Ke(()=>{p()})}const ie={formId:n,values:l,controlledValues:g,errorBag:b,errors:w,schema:y,submitCount:s,meta:m,isSubmitting:o,isValidating:i,fieldArrays:a,keepValuesOnUnmount:F,validateSchema:f(y)?k:void 0,validate:te,setFieldError:h,validateField:re,setFieldValue:ve,setValues:Ot,setErrors:v,setFieldTouched:Ge,setTouched:z,resetForm:Q,resetField:Z,handleSubmit:Oe,useFieldModel:_e,defineInputBinds:ke,defineComponentBinds:He,defineField:pe,stageInitialValue:oe,unsetInitialValue:ne,setFieldInitialValue:J,createPathState:A,getPathState:E,unsetPathValue:de,removePathState:Je,initialValues:V,getAllPathStates:()=>u.value,destroyPath:ee,isFieldTouched:ln,isFieldDirty:T,isFieldValid:P};function ve(R,L,Y=!0){const se=rt(L),xe=typeof R=="string"?R:R.path;E(xe)||A(xe),vr(l,xe,se),Y&&re(xe)}function Pe(R,L=!0){en(l).forEach(Y=>{delete l[Y]}),en(R).forEach(Y=>{ve(Y,R[Y],!1)}),L&&te()}function Ot(R,L=!0){Ii(l,R),a.forEach(Y=>Y&&Y.reset()),L&&te()}function ht(R,L){const Y=E(De(R))||A(R);return q({get(){return Y.value},set(se){var xe;const he=De(R);ve(he,se,(xe=De(L))!==null&&xe!==void 0?xe:!1)}})}function Ge(R,L){const Y=E(R);Y&&(Y.touched=L)}function ln(R){const L=E(R);return L?L.touched:u.value.filter(Y=>Y.path.startsWith(R)).some(Y=>Y.touched)}function T(R){const L=E(R);return L?L.dirty:u.value.filter(Y=>Y.path.startsWith(R)).some(Y=>Y.dirty)}function P(R){const L=E(R);return L?L.valid:u.value.filter(Y=>Y.path.startsWith(R)).every(Y=>Y.valid)}function z(R){if(typeof R=="boolean"){O(L=>{L.touched=R});return}en(R).forEach(L=>{Ge(L,!!R[L])})}function Z(R,L){var Y;const se=L&&"value"in L?L.value:Vt(V.value,R),xe=E(R);xe&&(xe.__flags.pendingReset=!0),J(R,rt(se),!0),ve(R,se,!1),Ge(R,(Y=L==null?void 0:L.touched)!==null&&Y!==void 0?Y:!1),h(R,(L==null?void 0:L.errors)||[]),Ke(()=>{xe&&(xe.__flags.pendingReset=!1)})}function Q(R,L){let Y=rt(R!=null&&R.values?R.values:N.value);Y=L!=null&&L.force?Y:Ii(N.value,Y),Y=mn(y)&&Pt(y.cast)?y.cast(Y):Y,H(Y),O(se=>{var xe;se.__flags.pendingReset=!0,se.validated=!1,se.touched=((xe=R==null?void 0:R.touched)===null||xe===void 0?void 0:xe[se.path])||!1,ve(se.path,Vt(Y,se.path),!1),h(se.path,void 0)}),L!=null&&L.force?Pe(Y,!1):Ot(Y,!1),v((R==null?void 0:R.errors)||{}),s.value=(R==null?void 0:R.submitCount)||0,Ke(()=>{te({mode:"silent"}),O(se=>{se.__flags.pendingReset=!1})})}async function te(R){const L=(R==null?void 0:R.mode)||"force";if(L==="force"&&O(he=>he.validated=!0),ie.validateSchema)return ie.validateSchema(L);i.value=!0;const Y=await Promise.all(u.value.map(he=>he.validate?he.validate(R).then(Ne=>({key:he.path,valid:Ne.valid,errors:Ne.errors})):Promise.resolve({key:he.path,valid:!0,errors:[]})));i.value=!1;const se={},xe={};for(const he of Y)se[he.key]={valid:he.valid,errors:he.errors},he.errors.length&&(xe[he.key]=he.errors[0]);return{valid:Y.every(he=>he.valid),results:se,errors:xe}}async function re(R,L){var Y;const se=E(R);if(se&&(L==null?void 0:L.mode)!=="silent"&&(se.validated=!0),y){const{results:xe}=await k((L==null?void 0:L.mode)||"validated-only");return xe[R]||{errors:[],valid:!0}}return se!=null&&se.validate?se.validate(L):(!se&&(Y=L==null?void 0:L.warn),Promise.resolve({errors:[],valid:!0}))}function ne(R){Vf(V.value,R)}function oe(R,L,Y=!1){J(R,L),vr(l,R,L),Y&&!(e!=null&&e.initialValues)&&vr(N.value,R,rt(L))}function J(R,L,Y=!1){vr(V.value,R,rt(L)),Y&&vr(N.value,R,rt(L))}async function fe(){const R=f(y);if(!R)return{valid:!0,results:{},errors:{}};i.value=!0;const L=ia(R)||mn(R)?await PI(R,l):await BI(R,l,{names:S.value,bailsMap:_.value});return i.value=!1,L}const me=Oe((R,{evt:L})=>{gI(L)&&L.target.submit()});Ue(()=>{if(e!=null&&e.initialErrors&&v(e.initialErrors),e!=null&&e.initialTouched&&z(e.initialTouched),e!=null&&e.validateOnMount){te();return}ie.validateSchema&&ie.validateSchema("silent")}),at(y)&&ye(y,()=>{var R;(R=ie.validateSchema)===null||R===void 0||R.call(ie,"validated-only")}),Fo(Wo,ie);function pe(R,L){const Y=Pt(L)||L==null?void 0:L.label,se=E(De(R))||A(R,{label:Y}),xe=()=>Pt(L)?L(_s(se,xs)):L||{};function he(){var et;se.touched=!0,((et=xe().validateOnBlur)!==null&&et!==void 0?et:Wr().validateOnBlur)&&re(se.path)}function Ne(){var et;((et=xe().validateOnInput)!==null&&et!==void 0?et:Wr().validateOnInput)&&Ke(()=>{re(se.path)})}function Me(){var et;((et=xe().validateOnChange)!==null&&et!==void 0?et:Wr().validateOnChange)&&Ke(()=>{re(se.path)})}const Ve=q(()=>{const et={onChange:Me,onInput:Ne,onBlur:he};return Pt(L)?Object.assign(Object.assign({},et),L(_s(se,xs)).props||{}):L!=null&&L.props?Object.assign(Object.assign({},et),L.props(_s(se,xs))):et});return[ht(R,()=>{var et,At,Lt;return(Lt=(et=xe().validateOnModelUpdate)!==null&&et!==void 0?et:(At=Wr())===null||At===void 0?void 0:At.validateOnModelUpdate)!==null&&Lt!==void 0?Lt:!0}),Ve]}function _e(R){return Array.isArray(R)?R.map(L=>ht(L,!0)):ht(R)}function ke(R,L){const[Y,se]=pe(R,L);function xe(Me){se.value.onBlur(Me)}function he(Me){const Ve=sa(Me);ve(De(R),Ve,!1),se.value.onInput(Me)}function Ne(Me){const Ve=sa(Me);ve(De(R),Ve,!1),se.value.onChange(Me)}return q(()=>Object.assign(Object.assign({},se.value),{onBlur:xe,onInput:he,onChange:Ne,value:Y.value}))}function He(R,L){const[Y,se]=pe(R,L),xe=E(De(R));function he(Ne){Y.value=Ne}return q(()=>{const Ne=Pt(L)?L(_s(xe,xs)):L||{};return Object.assign({[Ne.model||"modelValue"]:Y.value,[`onUpdate:${Ne.model||"modelValue"}`]:he},se.value)})}return Object.assign(Object.assign({},ie),{values:Ir(l),handleReset:()=>Q(),submitForm:me})}function KI(e,t,n,r){const o={touched:"some",pending:"some",valid:"every"},i=q(()=>!Dt(t,f(n)));function s(){const l=e.value;return en(o).reduce((u,c)=>{const d=o[c];return u[c]=l[d](p=>p[c]),u},{})}const a=Tn(s());return vt(()=>{const l=s();a.touched=l.touched,a.valid=l.valid,a.pending=l.pending}),q(()=>Object.assign(Object.assign({initialValues:f(n)},a),{valid:a.valid&&!en(r.value).length,dirty:i.value}))}function qI(e,t,n){const r=Fg(n),o=U(r),i=U(rt(r));function s(a,l=!1){o.value=Ii(rt(o.value)||{},rt(a)),i.value=Ii(rt(i.value)||{},rt(a)),l&&e.value.forEach(u=>{if(u.touched)return;const d=Vt(o.value,u.path);vr(t,u.path,rt(d))})}return{initialValues:o,originalInitialValues:i,setInitialValues:s}}function YI(e,t){return t?{valid:e.valid&&t.valid,errors:[...e.errors,...t.errors]}:e}const XI=W({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(e,t){const n=Wt(Wo,void 0),r=q(()=>n==null?void 0:n.errors.value[e.name]);function o(){return{message:r.value}}return()=>{if(!r.value)return;const i=e.as?qn(e.as):e.as,s=Pg(i,t,o),a=Object.assign({role:"alert"},t.attrs);return!i&&(Array.isArray(s)||!s)&&(s!=null&&s.length)?s:(Array.isArray(s)||!s)&&!(s!=null&&s.length)?On(i||"span",a,r.value):On(i,a,s)}}}),ZI=XI;function QI(e){const t=$c(e);return q(()=>{var n,r;return t&&(r="meta"in t?t.meta.dirty:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.dirty)!==null&&r!==void 0?r:!1})}function JI(e){const t=$c(e);return q(()=>{var n,r;return t&&(r="meta"in t?t.meta.touched:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.touched)!==null&&r!==void 0?r:!1})}function ek(e){const t=$c(e);return q(()=>{var n,r;return t&&(r="meta"in t?t.meta.valid:(n=t==null?void 0:t.value)===null||n===void 0?void 0:n.valid)!==null&&r!==void 0?r:!1})}function tk(e){const t=Xa(Wo),n=e?void 0:Wt(qa);return q(()=>e?t==null?void 0:t.errors.value[De(e)]:n==null?void 0:n.errorMessage.value)}var Ao=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gr=function(e,t,n,r,o,i,s,a,l,u){var c=this;c.numeralDecimalMark=e||".",c.numeralIntegerScale=t>0?t:0,c.numeralDecimalScale=n>=0?n:2,c.numeralThousandsGroupStyle=r||Gr.groupStyle.thousand,c.numeralPositiveOnly=!!o,c.stripLeadingZeroes=i!==!1,c.prefix=s||s===""?s:"",c.signBeforePrefix=!!a,c.tailPrefix=!!l,c.delimiter=u||u===""?u:",",c.delimiterRE=u?new RegExp("\\"+u,"g"):""};Gr.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Gr.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t=this,n,r,o,i,s="";switch(e=e.replace(/[A-Za-z]/g,"").replace(t.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",t.numeralPositiveOnly?"":"-").replace("M",t.numeralDecimalMark),t.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",typeof t.prefix<"u"?t.signBeforePrefix?o=r+t.prefix:o=t.prefix+r:o=r,i=e,e.indexOf(t.numeralDecimalMark)>=0&&(n=e.split(t.numeralDecimalMark),i=n[0],s=t.numeralDecimalMark+n[1].slice(0,t.numeralDecimalScale)),r==="-"&&(i=i.slice(1)),t.numeralIntegerScale>0&&(i=i.slice(0,t.numeralIntegerScale)),t.numeralThousandsGroupStyle){case Gr.groupStyle.lakh:i=i.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+t.delimiter);break;case Gr.groupStyle.wan:i=i.replace(/(\d)(?=(\d{4})+$)/g,"$1"+t.delimiter);break;case Gr.groupStyle.thousand:i=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+t.delimiter);break}return t.tailPrefix?r+i.toString()+(t.numeralDecimalScale>0?s.toString():"")+t.prefix:o+i.toString()+(t.numeralDecimalScale>0?s.toString():"")}};var nk=Gr,Ng=function(e,t,n){var r=this;r.date=[],r.blocks=[],r.datePattern=e,r.dateMin=t.split("-").reverse().map(function(o){return parseInt(o,10)}),r.dateMin.length===2&&r.dateMin.unshift(0),r.dateMax=n.split("-").reverse().map(function(o){return parseInt(o,10)}),r.dateMax.length===2&&r.dateMax.unshift(0),r.initBlocks()};Ng.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,n="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(r,o){if(e.length>0){var i=e.slice(0,r),s=i.slice(0,1),a=e.slice(r);switch(t.datePattern[o]){case"d":i==="00"?i="01":parseInt(s,10)>3?i="0"+s:parseInt(i,10)>31&&(i="31");break;case"m":i==="00"?i="01":parseInt(s,10)>1?i="0"+s:parseInt(i,10)>12&&(i="12");break}n+=i,e=a}}),this.getFixedDateString(n)},getFixedDateString:function(e){var t=this,n=t.datePattern,r=[],o=0,i=0,s=0,a=0,l=0,u=0,c,d,p,h=!1;e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(a=n[0]==="d"?0:2,l=2-a,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),r=this.getFixedDate(c,d,0)),e.length===8&&(n.forEach(function(b,w){switch(b){case"d":o=w;break;case"m":i=w;break;default:s=w;break}}),u=s*2,a=o<=s?o*2:o*2+2,l=i<=s?i*2:i*2+2,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+4),10),h=e.slice(u,u+4).length===4,r=this.getFixedDate(c,d,p)),e.length===4&&(n[0]==="y"||n[1]==="y")&&(l=n[0]==="m"?0:2,u=2-l,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),h=e.slice(u,u+2).length===2,r=[0,d,p]),e.length===6&&(n[0]==="Y"||n[1]==="Y")&&(l=n[0]==="m"?0:4,u=2-.5*l,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+4),10),h=e.slice(u,u+4).length===4,r=[0,d,p]),r=t.getRangeFixedDate(r),t.date=r;var v=r.length===0?e:n.reduce(function(b,w){switch(w){case"d":return b+(r[0]===0?"":t.addLeadingZero(r[0]));case"m":return b+(r[1]===0?"":t.addLeadingZero(r[1]));case"y":return b+(h?t.addLeadingZeroForYear(r[2],!1):"");case"Y":return b+(h?t.addLeadingZeroForYear(r[2],!0):"")}},"");return v},getRangeFixedDate:function(e){var t=this,n=t.datePattern,r=t.dateMin||[],o=t.dateMax||[];return!e.length||r.length<3&&o.length<3||n.find(function(i){return i.toLowerCase()==="y"})&&e[2]===0?e:o.length&&(o[2]e[2]||r[2]===e[2]&&(r[1]>e[1]||r[1]===e[1]&&r[0]>e[0]))?r:e},getFixedDate:function(e,t,n){return e=Math.min(e,31),t=Math.min(t,12),n=parseInt(n||0,10),(t<7&&t%2===0||t>8&&t%2===1)&&(e=Math.min(e,t===2?this.isLeapYear(n)?29:28:30)),[e,t,n]},isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var rk=Ng,Vg=function(e,t){var n=this;n.time=[],n.blocks=[],n.timePattern=e,n.timeFormat=t,n.initBlocks()};Vg.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var e=this;return String(e.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,n="";e=e.replace(/[^\d]/g,"");var r=t.getTimeFormatOptions();return t.blocks.forEach(function(o,i){if(e.length>0){var s=e.slice(0,o),a=s.slice(0,1),l=e.slice(o);switch(t.timePattern[i]){case"h":parseInt(a,10)>r.maxHourFirstDigit?s="0"+a:parseInt(s,10)>r.maxHours&&(s=r.maxHours+"");break;case"m":case"s":parseInt(a,10)>r.maxMinutesFirstDigit?s="0"+a:parseInt(s,10)>r.maxMinutes&&(s=r.maxMinutes+"");break}n+=s,e=l}}),this.getFixedTimeString(n)},getFixedTimeString:function(e){var t=this,n=t.timePattern,r=[],o=0,i=0,s=0,a=0,l=0,u=0,c,d,p;return e.length===6&&(n.forEach(function(h,v){switch(h){case"s":o=v*2;break;case"m":i=v*2;break;case"h":s=v*2;break}}),u=s,l=i,a=o,c=parseInt(e.slice(a,a+2),10),d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),r=this.getFixedTime(p,d,c)),e.length===4&&t.timePattern.indexOf("s")<0&&(n.forEach(function(h,v){switch(h){case"m":i=v*2;break;case"h":s=v*2;break}}),u=s,l=i,c=0,d=parseInt(e.slice(l,l+2),10),p=parseInt(e.slice(u,u+2),10),r=this.getFixedTime(p,d,c)),t.time=r,r.length===0?e:n.reduce(function(h,v){switch(v){case"s":return h+t.addLeadingZero(r[2]);case"m":return h+t.addLeadingZero(r[1]);case"h":return h+t.addLeadingZero(r[0])}},"")},getFixedTime:function(e,t,n){return n=Math.min(parseInt(n||0,10),60),t=Math.min(t,60),e=Math.min(e,60),[e,t,n]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var ok=Vg,zg=function(e,t){var n=this;n.delimiter=t||t===""?t:" ",n.delimiterRE=t?new RegExp("\\"+t,"g"):"",n.formatter=e};zg.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear(),e=e.replace(/[^\d+]/g,""),e=e.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+"),e=e.replace(t.delimiterRE,"");for(var n="",r,o=!1,i=0,s=e.length;i0,l="";return n===0?e:(t.forEach(function(u,c){if(e.length>0){var d=e.slice(0,u),p=e.slice(u);a?l=o[i?c-1:c]||l:l=r,i?(c>0&&(s+=l),s+=d):(s+=d,d.length===u&&c0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof Ao=="object"&&Ao?Ao:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},ck=uk,je=function(e,t){var n=this,r=!1;if(typeof e=="string"?(n.element=document.querySelector(e),r=document.querySelectorAll(e).length>1):typeof e.length<"u"&&e.length>0?(n.element=e[0],r=e.length>1):n.element=e,!n.element)throw new Error("[cleave.js] Please check the element");if(r)try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch{}t.initValue=n.element.value,n.properties=je.DefaultProperties.assign({},t),n.init()};je.prototype={init:function(){var e=this,t=e.properties;if(!t.numeral&&!t.phone&&!t.creditCard&&!t.time&&!t.date&&t.blocksLength===0&&!t.prefix){e.onInput(t.initValue);return}t.maxLength=je.Util.getMaxLength(t.blocks),e.isAndroid=je.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this,t=e.properties;if(t.swapHiddenInput){var n=e.element.cloneNode(!0);e.element.parentNode.insertBefore(n,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=n,e.element.id=""}},initNumeralFormatter:function(){var e=this,t=e.properties;t.numeral&&(t.numeralFormatter=new je.NumeralFormatter(t.numeralDecimalMark,t.numeralIntegerScale,t.numeralDecimalScale,t.numeralThousandsGroupStyle,t.numeralPositiveOnly,t.stripLeadingZeroes,t.prefix,t.signBeforePrefix,t.tailPrefix,t.delimiter))},initTimeFormatter:function(){var e=this,t=e.properties;t.time&&(t.timeFormatter=new je.TimeFormatter(t.timePattern,t.timeFormat),t.blocks=t.timeFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=je.Util.getMaxLength(t.blocks))},initDateFormatter:function(){var e=this,t=e.properties;t.date&&(t.dateFormatter=new je.DateFormatter(t.datePattern,t.dateMin,t.dateMax),t.blocks=t.dateFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=je.Util.getMaxLength(t.blocks))},initPhoneFormatter:function(){var e=this,t=e.properties;if(t.phone)try{t.phoneFormatter=new je.PhoneFormatter(new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode),t.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,n=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=n===8},onChange:function(e){var t=this,n=t.properties,r=je.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var o=r.getPostDelimiter(t.lastInputValue,n.delimiter,n.delimiters);t.isBackward&&o?n.postDelimiterBackspace=o:n.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),je.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){je.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){je.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this,n=t.properties,r=je.Util,o=t.element.value,i="";n.copyDelimiter?i=o:i=r.stripDelimiters(o,n.delimiter,n.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",i):window.clipboardData.setData("Text",i),e.preventDefault()}catch{}},onInput:function(e){var t=this,n=t.properties,r=je.Util,o=r.getPostDelimiter(e,n.delimiter,n.delimiters);if(!n.numeral&&n.postDelimiterBackspace&&!o&&(e=r.headStr(e,e.length-n.postDelimiterBackspace.length)),n.phone){n.prefix&&(!n.noImmediatePrefix||e.length)?n.result=n.prefix+n.phoneFormatter.format(e).slice(n.prefix.length):n.result=n.phoneFormatter.format(e),t.updateValueState();return}if(n.numeral){n.prefix&&n.noImmediatePrefix&&e.length===0?n.result="":n.result=n.numeralFormatter.format(e),t.updateValueState();return}if(n.date&&(e=n.dateFormatter.getValidatedDate(e)),n.time&&(e=n.timeFormatter.getValidatedTime(e)),e=r.stripDelimiters(e,n.delimiter,n.delimiters),e=r.getPrefixStrippedValue(e,n.prefix,n.prefixLength,n.result,n.delimiter,n.delimiters,n.noImmediatePrefix,n.tailPrefix,n.signBeforePrefix),e=n.numericOnly?r.strip(e,/[^\d]/g):e,e=n.uppercase?e.toUpperCase():e,e=n.lowercase?e.toLowerCase():e,n.prefix&&(n.tailPrefix?e=e+n.prefix:e=n.prefix+e,n.blocksLength===0)){n.result=e,t.updateValueState();return}n.creditCard&&t.updateCreditCardPropsByValue(e),e=r.headStr(e,n.maxLength),n.result=r.getFormattedValue(e,n.blocks,n.blocksLength,n.delimiter,n.delimiters,n.delimiterLazyShow),t.updateValueState()},updateCreditCardPropsByValue:function(e){var t=this,n=t.properties,r=je.Util,o;r.headStr(n.result,4)!==r.headStr(e,4)&&(o=je.CreditCardDetector.getInfo(e,n.creditCardStrictMode),n.blocks=o.blocks,n.blocksLength=n.blocks.length,n.maxLength=r.getMaxLength(n.blocks),n.creditCardType!==o.type&&(n.creditCardType=o.type,n.onCreditCardTypeChanged.call(t,n.creditCardType)))},updateValueState:function(){var e=this,t=je.Util,n=e.properties;if(e.element){var r=e.element.selectionEnd,o=e.element.value,i=n.result;if(r=t.getNextCursorPosition(r,o,i,n.delimiter,n.delimiters),e.isAndroid){window.setTimeout(function(){e.element.value=i,t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()},1);return}e.element.value=i,n.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,r,n.document,!1),e.callOnValueChanged()}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this,n=t.properties;n.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,n=t.properties;e=e!=null?e.toString():"",n.numeral&&(e=e.replace(".",n.numeralDecimalMark)),n.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this,t=e.properties,n=je.Util,r=e.element.value;return t.rawValueTrimPrefix&&(r=n.getPrefixStrippedValue(r,t.prefix,t.prefixLength,t.result,t.delimiter,t.delimiters,t.noImmediatePrefix,t.tailPrefix,t.signBeforePrefix)),t.numeral?r=t.numeralFormatter.getRawValue(r):r=n.stripDelimiters(r,t.delimiter,t.delimiters),r},getISOFormatDate:function(){var e=this,t=e.properties;return t.date?t.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this,t=e.properties;return t.time?t.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}};je.NumeralFormatter=nk;je.DateFormatter=rk;je.TimeFormatter=ok;je.PhoneFormatter=ik;je.CreditCardDetector=sk;je.Util=lk;je.DefaultProperties=ck;(typeof Ao=="object"&&Ao?Ao:window).Cleave=je;var Kf=je;const dk={mounted(e,t){e.cleave=new Kf(e,{delimiterLazyShow:!0,rawValueTrimPrefix:!0,...t.value||{numeralDecimalScale:0}}),t.value.initValue&&e.cleave.setRawValue(t.value.initValue)},unmounted(e){e.cleave.destroy()},updated(e,t){e.cleave.destroy(),e.cleave=new Kf(e,{delimiterLazyShow:!0,rawValueTrimPrefix:!0,...t.value||{numeralDecimalScale:0}})}},fk={class:"relative"},pk={class:"absolute right-3 top-3 flex flex-row items-center gap-1"},hk={class:"absolute bottom-2 right-3 text-xs text-muted-foreground"},mk=W({__name:"AssetInput",props:{options:{type:Object,default:void 0},asset:{type:Object,default:void 0},modelValue:{type:String,required:!1,default:""}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const r=$r(),o=n,i=e,s=U();let a="";const l=q({get(){return i.modelValue},set(p){o("update:modelValue",p)}});ye(l,p=>{var h;a!==p&&((h=s.value)==null||h.cleave.setRawValue(p))});function u(p){let h=p.target.rawValue;h.endsWith(".")?h=h.substring(0,h.length-1):h.startsWith(".")&&(h="0"+h),a=h,l.value=h}function c(){var p;(p=s.value)==null||p.focus()}function d(){var p,h,v;l.value=Ka(((p=i.asset)==null?void 0:p.amount)??Kt(0),((v=r.metadata[((h=i.asset)==null?void 0:h.tokenId)??""])==null?void 0:v.decimals)??0).toString()}return t({focus:c}),(p,h)=>{var v,b,w;return D(),Te("div",fk,[ba(Se("input",ce({ref_key:"inputEl",ref:s},p.$attrs,{placeholder:"0",class:f($e)("flex h-16 w-full rounded-md border border-input bg-background px-3 py-2 pb-6 pr-28 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",p.$attrs.class??"")}),null,16),[[f(dk),{...e.options,numeral:!0,numeralPositiveOnly:!0,numeralDecimalScale:((b=f(r).metadata[((v=i.asset)==null?void 0:v.tokenId)??""])==null?void 0:b.decimals)??0,initValue:i.modelValue,onValueChanged:u}]]),Se("div",pk,[Se("div",null,it(f(Oi)(e.asset,f(r),10)),1),K(Ic,{"token-id":((w=i.asset)==null?void 0:w.tokenId)??"","custom-class":"w-5"},null,8,["token-id"])]),Se("div",hk,[Se("a",{class:"cursor-pointer",onClick:h[0]||(h[0]=S=>d())},"Balance: "+it(f(Ac)(e.asset,f(r))),1)])])}}}),gk=W({__name:"Command",props:{modelValue:{},defaultValue:{},open:{type:Boolean},defaultOpen:{type:Boolean},searchTerm:{},multiple:{type:Boolean},disabled:{type:Boolean},name:{},dir:{},filterFunction:{type:Function},displayValue:{type:Function},asChild:{type:Boolean},as:{}},emits:["update:modelValue","update:open","update:searchTerm"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(Zw),ce(f(o),{open:!0,"model-value":"",class:f($e)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",i.$attrs.class??"")}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"]))}}),vk=W({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(hw),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),yk=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Zh),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),bk=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(mw),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),wk=W({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-2 text-center sm:text-left",t.class))},[X(n.$slots,"default")],2))}}),_k=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Mw),ce(t,{class:f($e)("text-lg text-foreground font-semibold leading-none tracking-tight",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),xk=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Dw),ce(t,{class:f($e)("text-muted-foreground text-sm",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Ek=Se("span",{class:"sr-only"},"Close",-1),Sk=W({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=uo(t);return(i,s)=>(D(),j(f(gw),null,{default:B(()=>[K(f($w),{class:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),K(f(Pw),ce({class:f($e)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",n.class)},{...n,...f(o)}),{default:B(()=>[X(i.$slots,"default"),K(f(Zh),{class:"absolute top-3 right-3 p-0.5 transition-colors rounded-md hover:bg-secondary"},{default:B(()=>[K(f(yh),{class:"w-4 h-4"}),Ek]),_:1})]),_:3},16,["class"])]),_:3}))}}),Ck=W({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",{class:lt(f($e)("flex flex-col space-y-2 sm:space-y-0 mt-1.5 sm:flex-row sm:justify-end sm:space-x-2",t.class))},[X(n.$slots,"default")],2))}}),Tk=W({__name:"CommandEmpty",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(i_),ce(t,{class:f($e)("py-6 text-center text-sm",n.$attrs.class??"")}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Ok=W({__name:"CommandGroup",props:{asChild:{type:Boolean},as:{},heading:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(e_),ce(t,{class:f($e)("overflow-hidden p-1 text-foreground",n.$attrs.class??"")}),{default:B(()=>[n.heading?(D(),j(f(t_),{key:0,class:"px-2 py-1.5 text-xs font-medium text-muted-foreground"},{default:B(()=>[Re(it(n.heading),1)]),_:1})):pt("",!0),X(n.$slots,"default")]),_:3},16,["class"]))}}),Ak={class:"flex items-center border-b px-3","cmdk-input-wrapper":""},Ik={inheritAttrs:!1},kk=W({...Ik,__name:"CommandInput",props:{type:{},disabled:{type:Boolean},autoFocus:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),Te("div",Ak,[K(f(Ry),{class:"mr-2 h-4 w-4 shrink-0 opacity-50"}),K(f(Qw),ce({...t,...n.$attrs},{"auto-focus":"",class:f($e)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",n.$attrs.class??"")}),null,16,["class"])]))}}),Pk=W({__name:"CommandItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,o=uo(t);return(i,s)=>(D(),j(f(l_),ce({...n,...f(o)},{class:f($e)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i.$attrs.class??""),onSelect:s[0]||(s[0]=eo(()=>{},["prevent"]))}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"]))}}),Bk={role:"presentation"},$k=W({__name:"CommandList",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},dismissable:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{type:Function},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(o_),ce(f(o),{class:f($e)("max-h-[300px] overflow-y-auto overflow-x-hidden",i.$attrs.class??"")}),{default:B(()=>[Se("div",Bk,[X(i.$slots,"default")])]),_:3},16,["class"]))}}),Hg=Symbol(),qf=W({inheritAttrs:!1,__name:"FormItem",setup(e){const t=Wn();Fo(Hg,t);const{class:n,...r}=Kp();return(o,i)=>(D(),Te("div",ce({class:f($e)("space-y-2",f(n)??"")},r),[X(o.$slots,"default")],16))}});function Mc(){const e=Wt(qa),t=Wt(Hg),n={valid:ek(),isDirty:QI(),isTouched:JI(),error:tk()};if(!e)throw new Error("useFormField should be used within ");const{name:r}=e,o=t;return{id:o,name:r,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...n}}const Yf=W({inheritAttrs:!1,__name:"FormLabel",props:{for:{},asChild:{type:Boolean},as:{}},setup(e){const{error:t,formItemId:n}=Mc(),{class:r,...o}=Kp();return(i,s)=>(D(),j(f(u_),ce({class:f($e)("block text-sm tracking-tight font-medium text-foreground text-left",f(t)&&"text-destructive",f(r)??""),for:f(n)},o),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class","for"]))}}),Xf=W({__name:"FormControl",setup(e){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=Mc();return(i,s)=>(D(),j(f(Ma),{id:f(n),"aria-describedby":f(t)?`${f(r)} ${f(o)}`:`${f(r)}`,"aria-invalid":!!f(t)},{default:B(()=>[X(i.$slots,"default")]),_:3},8,["id","aria-describedby","aria-invalid"]))}}),Zf=W({__name:"FormMessage",setup(e){const{name:t,formMessageId:n}=Mc();return(r,o)=>(D(),j(f(ZI),{id:f(n),as:"p",name:De(f(t)),class:"text-sm font-medium text-destructive"},null,8,["id","name"]))}}),Mk=W({__name:"Input",props:{defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=cb(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(i,s)=>ba((D(),Te("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>at(o)?o.value=a:null),type:"text",class:lt(f($e)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i.$attrs.class??""))},null,2)),[[py,f(o)]])}}),jg=W({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const o=sn(e,t);return(i,s)=>(D(),j(f(d_),ft(Ct(f(o))),{default:B(()=>[X(i.$slots,"default")]),_:3},16))}}),Ug=W({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(f_),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),Wg=W({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},onPlaced:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=sn(n,t);return(i,s)=>(D(),j(f(p_),null,{default:B(()=>[K(f(g_),ce({...f(o),...i.$attrs},{class:f($e)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:B(()=>[X(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Dk={class:"space-y-2"},Rk={class:"flex-grow"},Lk=W({__name:"SendView",emits:["success"],setup(e,{emit:t}){const n=Kt(_o.toString()),r=su(_o,wo),{handleSubmit:o}=GI(),{toast:i}=Aa(),s=t,a=Uo(),l=$r(),u=U(!1),c=U(""),d=U(!1),p=U(""),h=U([]),v=q(()=>Ze(h.value)?a.balance:ks(a.balance,h.value,V=>V.tokenId)),b=q(()=>{const V=h.value[0];return vl((V==null?void 0:V.amount)??"0",wo)});Ue(()=>{w(a.balance[0])});function w(V){if(d.value=!1,V.tokenId!=="ERG"&&b.value<_o){const N=h.value[0];N.amount=su(_o,wo)}h.value.push({amount:"",tokenId:V.tokenId,info:V})}async function S(){u.value=!0,c.value="Loading...";const V=Qn.fromBase58(a.address),N=await Kn.getBoxes({where:{ergoTree:V.ergoTree}}),H=vl(h.value[0].amount,wo),m=new DO(l.height).from(N).to(new ti(H,p.value).addTokens(h.value.map(A=>{var x;return{tokenId:A.tokenId,amount:vl(A.amount,((x=l.metadata[A.tokenId])==null?void 0:x.decimals)??0)}}).filter(A=>A.amount>0n&&A.tokenId!==Cn))).sendChangeTo(V).payMinFee().build().toEIP12Object();c.value="Signing...";const g=await Ds.signTx(m);c.value="Sending...";const y=await Kn.submitTransaction(g);if(y.success){const A=y.transactionId;i({title:"Success!",description:`Transaction ${Ti(A,20)} has been submitted to the blockchain.`}),l.setWaitingTransaction(),s("success",A)}else i({title:"Something went wrong",description:y.message,variant:"destructive"});u.value=!1,c.value=""}const _=V=>Ze(V)?"Recipient address is required":Qn.validate(V)?!0:"Invalid Ergo address";function I(V){return N=>{if(Ze(N)&&V.tokenId===Cn)return"ERG amount is required";const H=l.metadata[V.tokenId],m=H==null?void 0:H.decimals,g=(H==null?void 0:H.name)??Ti(V.tokenId,10),y=$A(Kt(N),m);return V.tokenId===Cn&&y.lt(n)?`Minimum amount is ${r} ERG`:y.isNegative()?`${g} amount must be greater than 0`:y.gt(V.amount)?`Insufficient ${g} balance`:!0}}const F=o(async()=>{try{await S()}catch(V){u.value=!1,c.value="",i({title:"Something went wrong",description:V.message,variant:"destructive"})}});return(V,N)=>(D(),Te(qe,null,[K(f(wk),null,{default:B(()=>[K(f(_k),null,{default:B(()=>[Re("Send")]),_:1}),K(f(xk),null,{default:B(()=>[Re("Use this tool to send assets.")]),_:1})]),_:1}),Se("form",{id:"send-form",class:"space-y-4",novalidate:"",onSubmit:N[1]||(N[1]=(...H)=>f(F)&&f(F)(...H))},[K(f(Gf),{modelValue:p.value,"onUpdate:modelValue":N[0]||(N[0]=H=>p.value=H),name:"recipient",rules:_},{default:B(({componentField:H})=>[K(f(qf),null,{default:B(()=>[K(f(Yf),null,{default:B(()=>[Re("Recipient")]),_:1}),K(f(Xf),null,{default:B(()=>[K(f(Mk),ce({type:"text",placeholder:"Recipient address"},H),null,16)]),_:2},1024),K(f(Zf))]),_:2},1024)]),_:1},8,["modelValue"]),Se("div",Dk,[(D(!0),Te(qe,null,Qr(h.value,(H,m)=>(D(),j(f(Gf),{key:H.tokenId,modelValue:H.amount,"onUpdate:modelValue":g=>H.amount=g,name:`assets[${m}]`,rules:I(H.info)},{default:B(({componentField:g})=>[K(f(qf),null,{default:B(()=>[m===0?(D(),j(f(Yf),{key:0},{default:B(()=>[Re("Assets")]),_:1})):pt("",!0),K(f(Xf),null,{default:B(()=>[K(mk,ce(g,{asset:H.info}),null,16,["asset"])]),_:2},1024),K(f(Zf))]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","name","rules"]))),128))])],32),K(f(kc)),K(f(jg),{open:d.value,"onUpdate:open":N[2]||(N[2]=H=>d.value=H)},{default:B(()=>[K(f(Ug),{"as-child":""},{default:B(()=>[K(f(Un),{variant:"outline",role:"combobox","aria-expanded":d.value,class:"justify-between"},{default:B(()=>[Re(it("Add asset...")+" ",1),K(f(ky),{class:"ml-2 h-4 w-4 shrink-0 opacity-50"})]),_:1},8,["aria-expanded"])]),_:1}),K(f(Wg),{class:"w-[21rem] p-0"},{default:B(()=>[K(f(gk),null,{default:B(()=>[K(f(kk),{placeholder:"Search assets..."}),K(f($k),null,{default:B(()=>[K(f(Tk),null,{default:B(()=>[Re("No asset found.")]),_:1}),K(f(Ok),null,{default:B(()=>[(D(!0),Te(qe,null,Qr(v.value,H=>(D(),j(f(Pk),{key:H.tokenId,class:"gap-2",value:f(Oi)(H,f(l)),onSelect:m=>w(H)},{default:B(()=>[K(Ic,{"token-id":H.tokenId,"custom-class":"w-5"},null,8,["token-id"]),Se("div",Rk,it(f(Oi)(H,f(l))),1),Re(" "+it(f(Ac)(H,f(l))),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),K(f(Ck),null,{default:B(()=>[K(f(yk),{"as-child":""},{default:B(()=>[K(f(Un),{variant:"outline",disabled:u.value},{default:B(()=>[Re("Cancel")]),_:1},8,["disabled"])]),_:1}),K(f(Un),{type:"submit",form:"send-form",loading:u.value,class:"gap-2",disabled:u.value},{loading:B(()=>[Re(it(c.value),1)]),default:B(()=>[Re("Send ")]),_:1},8,["loading","disabled"])]),_:1})],64))}});var Hr=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Hr||{}),Fk=Object.defineProperty,Nk=(e,t,n)=>t in e?Fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Es=(e,t,n)=>(Nk(e,typeof t!="symbol"?t+"":t,n),n);const Vk=[0,1],Gg=[1,0],Kg=[2,3],qg=[3,2],zk={L:Vk,M:Gg,Q:Kg,H:qg},Hk=/^[0-9]*$/,jk=/^[A-Z0-9 $%*+.\/:-]*$/,Dl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Dc=1,Rc=40,Qf=3,Uk=3,Ss=40,Wk=10,Yg=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Xg=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class Gk{constructor(t,n,r,o){if(this.version=t,this.ecc=n,Es(this,"size"),Es(this,"mask"),Es(this,"modules",[]),Es(this,"types",[]),tRc)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=Array.from({length:this.size},()=>!1);for(let a=0;a0));this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),o===-1){let a=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u=0&&t=0&&n>>9)*1335;const o=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,Rn(o,i));this.setFunctionModule(8,7,Rn(o,6)),this.setFunctionModule(8,8,Rn(o,7)),this.setFunctionModule(7,8,Rn(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,Rn(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,Rn(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,Rn(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let r=0;r<18;r++){const o=Rn(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,o),this.setFunctionModule(s,i,o)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(r)),s=t+o,a=n+r;s>=0&&s=0&&a{(p!==l-i||v>=a)&&d.push(h[p])});return d}drawCodewords(t){if(t.length!==Math.floor(Eu(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let o=0;o>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*Ss),s=this.modules[i][u],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*Ss}for(let i=0;i5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*Ss),s=this.modules[u][i],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*Ss}for(let i=0;is+(a?1:0),n);const r=this.size*this.size,o=Math.ceil(Math.abs(n*20-r*10)/r)-1;return t+=o*Wk,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,r=[6];for(let o=this.size-7;r.length0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function Nn(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function Rn(e,t){return(e>>>t&1)!==0}class Lc{constructor(t,n,r){if(this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}}const Kk=[1,10,12,14],qk=[2,9,11,13],Yk=[4,8,16,16];function Zg(e,t){return e[Math.floor((t+7)/17)+1]}function Qg(e){const t=[];for(const n of e)Nn(n,8,t);return new Lc(Yk,e.length,t)}function Xk(e){if(!Jg(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n=1<Rc)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function Rs(e,t){return Math.floor(Eu(e)/8)-Yg[t[0]][e]*Xg[t[0]][e]}function tP(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let r=0;r0);for(const r of e){const o=r^n.shift();n.push(0),t.forEach((i,s)=>n[s]^=Su(i,o))}return n}function Su(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function rP(e,t,n=1,r=40,o=-1,i=!0){if(!(Dc<=n&&n<=r&&r<=Rc)||o<-1||o>7)throw new RangeError("Invalid value");let s,a;for(s=n;;s++){const d=Rs(s,t)*8,p=Jk(e,s);if(p<=d){a=p;break}if(s>=r)throw new RangeError("Data too long")}for(const d of[Gg,Kg,qg])i&&a<=Rs(s,d)*8&&(t=d);const l=[];for(const d of e){Nn(d.mode[0],4,l),Nn(d.numChars,Zg(d.mode,s),l);for(const p of d.getData())l.push(p)}const u=Rs(s,t)*8;Nn(0,Math.min(4,u-l.length),l),Nn(0,(8-l.length%8)%8,l);for(let d=236;l.length0);return l.forEach((d,p)=>c[p>>>3]|=d<<7-(p&7)),new Gk(s,t,c,o)}function oP(e,t){var d;const{ecc:n="L",boostEcc:r=!1,minVersion:o=1,maxVersion:i=40,maskPattern:s=-1,border:a=1}=t||{},l=typeof e=="string"?Qk(e):Array.isArray(e)?[Qg(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=rP(l,zk[n],o,i,s,r),c=iP({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},a);return t!=null&&t.invert&&(c.data=c.data.map(p=>p.map(h=>!h))),(d=t==null?void 0:t.onEncoded)==null||d.call(t,c),c}function iP(e,t=1){if(!t)return e;const{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(i=>{for(let s=0;s!1)),e.data.push(Array.from({length:r},s=>!1));const o=Hr.Border;e.types.forEach(i=>{for(let s=0;so)),e.types.push(Array.from({length:r},s=>o));return e}function sP(e,t={}){const n=oP(e,t),{pixelSize:r=10,whiteColor:o="white",blackColor:i="black"}=t,s=n.size*r,a=n.size*r;let l=``;const u=[];for(let c=0;c`,l+=``,l+="",l}const aP={class:"w-64 space-y-8 p-2"},lP={class:"flex flex-col gap-4"},uP=["innerHTML"],cP={class:"break-all rounded-md bg-secondary p-4 text-sm text-secondary-foreground"},dP=W({__name:"AddressView",setup(e){const{toast:t}=Aa(),n=Uo(),r=U("");Ue(o),ye(()=>n.address,o);function o(){r.value=sP(n.address,{ecc:"L",border:0})}function i(){Sg(n.address),t({title:"Copied!",description:"Your address has been copied to the clipboard."})}return(s,a)=>(D(),Te("div",aP,[Se("div",lP,[Se("div",{class:"m-auto inline-block w-9/12 rounded-md border bg-white p-4",innerHTML:r.value},null,8,uP),Se("div",cP,it(f(n).address),1)]),K(Un,{size:"sm",class:"w-full",onClick:i},{default:B(()=>[Re("Copy address")]),_:1})]))}}),fP={class:"flex flex-grow flex-col gap-8"},pP={class:"flex-grow"},hP={class:"text-3xl font-bold"},mP={class:"text-xs text-muted-foreground"},gP={key:0,class:"m-auto cursor-default space-y-4"},vP=Se("p",{class:"text-muted-foreground"},"The balance is empty",-1),yP={class:"my-1 px-6"},bP=W({__name:"BalanceView",setup(e){const t=Uo(),n=$r(),r=U(!1),o=U(!1),i=U(""),s=q(()=>{var c,d;let u=Kt(0);for(const p of t.balance)u=u.plus(Ka(p.amount,((c=n.metadata[p.tokenId])==null?void 0:c.decimals)??0).times(((d=n.prices[p.tokenId])==null?void 0:d.erg)??0));return Ai(u,4)}),a=q(()=>{var c;const u=Kt(((c=n.prices[Cn])==null?void 0:c.fiat)??0);return Ai(u.times(s.value),2)});function l(u){i.value=u,r.value=!0,o.value=!1}return(u,c)=>(D(),Te("div",fP,[K(f(js),null,{default:B(()=>[K(f(Gu),{class:"flex-row items-center justify-between space-y-0"},{default:B(()=>[K(f(Ku),{class:"text-sm font-medium"},{default:B(()=>[Re("Total Balance")]),_:1}),K(f(Fy),{size:14})]),_:1}),K(f(Us),{class:"flex justify-start gap-2"},{default:B(()=>[Se("div",pP,[Se("h1",hP,it(s.value)+" ERG",1),Se("p",mP,"≈ "+it(a.value)+" USD",1)]),K(f(vk),{open:o.value,"onUpdate:open":c[0]||(c[0]=d=>o.value=d)},{default:B(()=>[K(f(bk),{"as-child":""},{default:B(()=>[K(f(Un),{disabled:!f(t).connected,class:"gap-2",size:"sm",variant:"secondary"},{default:B(()=>[K(f(Ly),{class:"m-auto",size:16}),Re(" Send ")]),_:1},8,["disabled"])]),_:1}),K(f(Sk),{class:"max-h-[80vh] max-w-[24rem] overflow-auto"},{default:B(()=>[K(Lk,{onSuccess:l})]),_:1})]),_:1},8,["open"]),K(f(jg),null,{default:B(()=>[K(f(Ug),{"as-child":""},{default:B(()=>[K(f(Un),{disabled:!f(t).connected,class:"gap-2",size:"sm",variant:"secondary"},{default:B(()=>[K(f($y),{class:"m-auto",size:16}),Re(" Receive ")]),_:1},8,["disabled"])]),_:1}),K(f(Wg),null,{default:B(()=>[K(dP)]),_:1})]),_:1})]),_:1})]),_:1}),Se("div",null,[K(f(js),{class:"h-[18.5rem] flex-grow"},{default:B(()=>[K(f(Us),{class:"flex h-full w-full px-0 py-1 align-middle"},{default:B(()=>[f(Ze)(f(t).balance)?(D(),Te("div",gP,[K(f(Dy),{class:"m-auto text-muted-foreground/30",size:60}),vP])):(D(),j(f(Og),{key:1,class:"h-full w-full"},{default:B(()=>[Se("div",yP,[(D(!0),Te(qe,null,Qr(f(t).balance,(d,p)=>(D(),Te("div",{key:d.tokenId},[K(Tg,{"root-class":"py-4","logo-class":"w-10",asset:d,link:!0},null,8,["asset"]),p(D(),j(f(K_),ce({...n,...f(uo)(r)},{class:f($e)(f(CP)({variant:n.variant}),n.class),"onUpdate:open":o.onOpenChange}),{default:B(()=>[X(o.$slots,"default")]),_:3},16,["class","onUpdate:open"]))}}),_P=W({__name:"ToastViewport",props:{hotkey:{},label:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(X_),ce(t,{class:f($e)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t.class)}),null,16,["class"]))}}),xP=W({__name:"ToastClose",props:{class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Y_),ce(t,{class:f($e)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t.class)}),{default:B(()=>[K(f(yh),{class:"h-4 w-4"})]),_:1},16,["class"]))}}),EP=W({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Z_),ce(t,{class:f($e)("text-sm font-semibold",t.class)}),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),Jf=W({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(Q_),ce({class:f($e)("text-sm opacity-90",t.class)},t),{default:B(()=>[X(n.$slots,"default")]),_:3},16,["class"]))}}),SP=W({__name:"ToastProvider",props:{label:{},duration:{},swipeDirection:{},swipeThreshold:{}},setup(e){const t=e;return(n,r)=>(D(),j(f(R_),ft(Ct(t)),{default:B(()=>[X(n.$slots,"default")]),_:3},16))}}),CP=Uu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),TP={class:"grid gap-1"},OP=W({__name:"Toaster",setup(e){const{toasts:t}=Aa();return(n,r)=>(D(),j(f(SP),null,{default:B(()=>[(D(!0),Te(qe,null,Qr(f(t),o=>(D(),j(f(wP),ce({key:o.id},o),{default:B(()=>[Se("div",TP,[o.title?(D(),j(f(EP),{key:0},{default:B(()=>[Re(it(o.title),1)]),_:2},1024)):pt("",!0),o.description?(D(),Te(qe,{key:1},[wi(o.description)?(D(),j(f(Jf),{key:0},{default:B(()=>[(D(),j(qn(o.description)))]),_:2},1024)):(D(),j(f(Jf),{key:1},{default:B(()=>[Re(it(o.description),1)]),_:2},1024))],64)):pt("",!0),K(f(xP))]),(D(),j(qn(o.action)))]),_:2},1040))),128)),K(f(_P))]),_:1}))}}),AP={class:"flex min-h-screen flex-col items-center bg-foreground/5"},IP=W({__name:"App",setup(e){const t=$r();return(n,r)=>(D(),Te(qe,null,[Se("div",AP,[K(f(js),{class:"my-8 flex w-11/12 flex-grow flex-col gap-4 border p-4 shadow-2xl shadow-primary/10 sm:w-11/12 lg:w-8/12"},{default:B(()=>[K(kA),K(f(Us),{class:"flex flex-grow flex-row gap-8"},{default:B(()=>[K(bP),K(f(js),{class:"w-5/12"},{default:B(()=>[K(f(Gu),{class:"flex-row items-center justify-between space-y-0"},{default:B(()=>[K(f(Ku),{class:"text-sm font-medium"},{default:B(()=>[Re("Transaction History")]),_:1}),f(t).waitingTransaction?(D(),j(f(vh),{key:0,class:"animate-spin",size:16})):(D(),j(f(gh),{key:1,size:14}))]),_:1}),K(oI)]),_:1})]),_:1})]),_:1})]),K(OP)],64))}}),kP=Ey();by(IP).use(kP).mount("#app")});export default PP(); diff --git a/index.html b/index.html index f03ea88..3f24155 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Nautilus Wallet - +