Files
soft_usite/public/orchestrator/assets/index-DP70_OF3.js
T
Lizandro GuarnizoandClaude Sonnet 5 d8f9acd1f8 feat(studio): rediseño con design tokens, pantalla de consumo y rename a Studio
El SPA pasa a llamarse uMind Studio y vive en /studio (el nombre
"Orquestador" no le decía nada al cliente final, que ahora es quien lo usa).

Diseño:
- Los colores viven una sola vez como variables CSS + clases semánticas
  (.card, .input, .btn-*, .badge-*). Antes cada elemento repetía el par
  claro/oscuro a mano en cientos de lugares y cambiar un tono era buscar
  y reemplazar.
- darkMode pasa de 'media' a 'class' con toggle propio persistido: el
  usuario elige, no el sistema operativo. Se aplica antes de montar la
  app para que no parpadee.
- Componentes compartidos (UiModal, UiBadge, UiEmptyState) donde antes
  había markup duplicado inline.

Nueva pantalla de consumo (/tenants/:id/uso): filtros por fecha con
atajos, total del período, pendiente de facturar, barra contra el tope
del plan, desglose por tipo y gráfico por día. El gráfico son divs con
altura porcentual — no vale traer una librería de charts para esto.

Rename:
- /studio y /portal/studio; /orchestrator redirige 301 conservando la
  ruta interna, así los enlaces guardados siguen funcionando. Los assets
  del bundle quedan exentos (el `base` de Vite sigue en /orchestrator/):
  redirigirlos rompería el SPA.
- El submódulo sembrado migra el mismo registro buscando por las tres
  URLs históricas (/app/umind → /orchestrator → /studio) en vez de
  dejar entradas duplicadas en el menú.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 12:02:54 -05:00

27 lines
137 KiB
JavaScript

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
* @vue/shared v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function qs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const he={},Wt=[],dt=()=>{},fr=()=>!1,es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ts=e=>e.startsWith("onUpdate:"),ke=Object.assign,Ws=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Mi=Object.prototype.hasOwnProperty,ce=(e,t)=>Mi.call(e,t),z=Array.isArray,zt=e=>Tn(e)==="[object Map]",rn=e=>Tn(e)==="[object Set]",go=e=>Tn(e)==="[object Date]",Y=e=>typeof e=="function",xe=e=>typeof e=="string",Qe=e=>typeof e=="symbol",de=e=>e!==null&&typeof e=="object",dr=e=>(de(e)||Y(e))&&Y(e.then)&&Y(e.catch),pr=Object.prototype.toString,Tn=e=>pr.call(e),Vi=e=>Tn(e).slice(8,-1),hr=e=>Tn(e)==="[object Object]",zs=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,hn=qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ns=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ji=/-\w/g,je=ns(e=>e.replace(ji,t=>t.slice(1).toUpperCase())),Ui=/\B([A-Z])/g,Bt=ns(e=>e.replace(Ui,"-$1").toLowerCase()),ss=ns(e=>e.charAt(0).toUpperCase()+e.slice(1)),gs=ns(e=>e?`on${ss(e)}`:""),ct=(e,t)=>!Object.is(e,t),Hn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},mr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},os=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let vo;const rs=()=>vo||(vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Zt(e){if(z(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=xe(s)?Bi(s):Zt(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(xe(e)||de(e))return e}const Li=/;(?![^(]*\))/g,Fi=/:([^]+)/,Hi=/\/\*[^]*?\*\//g;function Bi(e){const t={};return e.replace(Hi,"").split(Li).forEach(n=>{if(n){const s=n.split(Fi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Re(e){let t="";if(xe(e))t=e;else if(z(e))for(let n=0;n<e.length;n++){const s=Re(e[n]);s&&(t+=s+" ")}else if(de(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gi=qs(Ki);function gr(e){return!!e||e===""}function qi(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=ln(e[s],t[s]);return n}function ln(e,t){if(e===t)return!0;let n=go(e),s=go(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Qe(e),s=Qe(t),n||s)return e===t;if(n=z(e),s=z(t),n||s)return n&&s?qi(e,t):!1;if(n=de(e),s=de(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!ln(e[i],t[i]))return!1}}return String(e)===String(t)}function Js(e,t){return e.findIndex(n=>ln(n,t))}const vr=e=>!!(e&&e.__v_isRef===!0),j=e=>xe(e)?e:e==null?"":z(e)||de(e)&&(e.toString===pr||!Y(e.toString))?vr(e)?j(e.value):JSON.stringify(e,br,2):String(e),br=(e,t)=>vr(t)?br(e,t.value):zt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[vs(s,r)+" =>"]=o,n),{})}:rn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>vs(n))}:Qe(t)?vs(t):de(t)&&!z(t)&&!hr(t)?String(t):t,vs=(e,t="")=>{var n;return Qe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Se;class Wi{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Se&&(Se.active?(this.parent=Se,this.index=(Se.scopes||(Se.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Se;try{return Se=this,t()}finally{Se=n}}}on(){++this._on===1&&(this.prevScope=Se,Se=this)}off(){if(this._on>0&&--this._on===0){if(Se===this)Se=this.prevScope;else{let t=Se;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,s=o.length;n<s;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function zi(){return Se}let me;const bs=new WeakSet;class _r{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Se&&(Se.active?Se.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,bs.has(this)&&(bs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,bo(this),wr(this);const t=me,n=Je;me=this,Je=!0;try{return this.fn()}finally{Cr(this),me=t,Je=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Xs(t);this.deps=this.depsTail=void 0,bo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?bs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ps(this)&&this.run()}get dirty(){return Ps(this)}}let xr=0,mn,gn;function yr(e,t=!1){if(e.flags|=8,t){e.next=gn,gn=e;return}e.next=mn,mn=e}function Ys(){xr++}function Qs(){if(--xr>0)return;if(gn){let t=gn;for(gn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;mn;){let t=mn;for(mn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function wr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Cr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Xs(s),Ji(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ps(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Er(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Er(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===xn)||(e.globalVersion=xn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ps(e))))return;e.flags|=2;const t=e.dep,n=me,s=Je;me=e,Je=!0;try{wr(e);const o=e.fn(e._value);(t.version===0||ct(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{me=n,Je=s,Cr(e),e.flags&=-3}}function Xs(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Xs(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ji(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Je=!0;const Sr=[];function St(){Sr.push(Je),Je=!1}function At(){const e=Sr.pop();Je=e===void 0?!0:e}function bo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=me;me=void 0;try{t()}finally{me=n}}}let xn=0;class Yi{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!me||!Je||me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==me)n=this.activeLink=new Yi(me,this),me.deps?(n.prevDep=me.depsTail,me.depsTail.nextDep=n,me.depsTail=n):me.deps=me.depsTail=n,Ar(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=me.depsTail,n.nextDep=void 0,me.depsTail.nextDep=n,me.depsTail=n,me.deps===n&&(me.deps=s)}return n}trigger(t){this.version++,xn++,this.notify(t)}notify(t){Ys();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qs()}}}function Ar(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ar(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ns=new WeakMap,Ft=Symbol(""),$s=Symbol(""),yn=Symbol("");function Te(e,t,n){if(Je&&me){let s=Ns.get(e);s||Ns.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Zs),o.map=s,o.key=n),o.track()}}function yt(e,t,n,s,o,r){const i=Ns.get(e);if(!i){xn++;return}const l=a=>{a&&a.trigger()};if(Ys(),t==="clear")i.forEach(l);else{const a=z(e),d=a&&zs(n);if(a&&n==="length"){const c=Number(s);i.forEach((h,v)=>{(v==="length"||v===yn||!Qe(v)&&v>=c)&&l(h)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),d&&l(i.get(yn)),t){case"add":a?d&&l(i.get("length")):(l(i.get(Ft)),zt(e)&&l(i.get($s)));break;case"delete":a||(l(i.get(Ft)),zt(e)&&l(i.get($s)));break;case"set":zt(e)&&l(i.get(Ft));break}}Qs()}function Kt(e){const t=ue(e);return t===e?t:(Te(t,"iterate",yn),ze(e)?t:t.map(Xe))}function is(e){return Te(e=ue(e),"iterate",yn),e}function lt(e,t){return Rt(e)?en(Ht(e)?Xe(t):t):Xe(t)}const Qi={__proto__:null,[Symbol.iterator](){return _s(this,Symbol.iterator,e=>lt(this,e))},concat(...e){return Kt(this).concat(...e.map(t=>z(t)?Kt(t):t))},entries(){return _s(this,"entries",e=>(e[1]=lt(this,e[1]),e))},every(e,t){return vt(this,"every",e,t,void 0,arguments)},filter(e,t){return vt(this,"filter",e,t,n=>n.map(s=>lt(this,s)),arguments)},find(e,t){return vt(this,"find",e,t,n=>lt(this,n),arguments)},findIndex(e,t){return vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return vt(this,"findLast",e,t,n=>lt(this,n),arguments)},findLastIndex(e,t){return vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return xs(this,"includes",e)},indexOf(...e){return xs(this,"indexOf",e)},join(e){return Kt(this).join(e)},lastIndexOf(...e){return xs(this,"lastIndexOf",e)},map(e,t){return vt(this,"map",e,t,void 0,arguments)},pop(){return un(this,"pop")},push(...e){return un(this,"push",e)},reduce(e,...t){return _o(this,"reduce",e,t)},reduceRight(e,...t){return _o(this,"reduceRight",e,t)},shift(){return un(this,"shift")},some(e,t){return vt(this,"some",e,t,void 0,arguments)},splice(...e){return un(this,"splice",e)},toReversed(){return Kt(this).toReversed()},toSorted(e){return Kt(this).toSorted(e)},toSpliced(...e){return Kt(this).toSpliced(...e)},unshift(...e){return un(this,"unshift",e)},values(){return _s(this,"values",e=>lt(this,e))}};function _s(e,t,n){const s=is(e),o=s[t]();return s!==e&&!ze(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const Xi=Array.prototype;function vt(e,t,n,s,o,r){const i=is(e),l=i!==e&&!ze(e),a=i[t];if(a!==Xi[t]){const h=a.apply(e,r);return l?Xe(h):h}let d=n;i!==e&&(l?d=function(h,v){return n.call(this,lt(e,h),v,e)}:n.length>2&&(d=function(h,v){return n.call(this,h,v,e)}));const c=a.call(i,d,s);return l&&o?o(c):c}function _o(e,t,n,s){const o=is(e),r=o!==e&&!ze(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(d,c,h){return l&&(l=!1,d=lt(e,d)),n.call(this,d,lt(e,c),h,e)}):n.length>3&&(i=function(d,c,h){return n.call(this,d,c,h,e)}));const a=o[t](i,...s);return l?lt(e,a):a}function xs(e,t,n){const s=ue(e);Te(s,"iterate",yn);const o=s[t](...n);return(o===-1||o===!1)&&no(n[0])?(n[0]=ue(n[0]),s[t](...n)):o}function un(e,t,n=[]){St(),Ys();const s=ue(e)[t].apply(e,n);return Qs(),At(),s}const Zi=qs("__proto__,__v_isRef,__isVue"),Rr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qe));function el(e){Qe(e)||(e=String(e));const t=ue(this);return Te(t,"has",e),t.hasOwnProperty(e)}class Ir{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?cl:Pr:r?Tr:Or).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=z(t);if(!o){let a;if(i&&(a=Qi[n]))return a;if(n==="hasOwnProperty")return el}const l=Reflect.get(t,n,Ne(t)?t:s);if((Qe(n)?Rr.has(n):Zi(n))||(o||Te(t,"get",n),r))return l;if(Ne(l)){const a=i&&zs(n)?l:l.value;return o&&de(a)?Ms(a):a}return de(l)?o?Ms(l):ls(l):l}}class kr extends Ir{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=z(t)&&zs(n);if(!this._isShallow){const d=Rt(r);if(!ze(s)&&!Rt(s)&&(r=ue(r),s=ue(s)),!i&&Ne(r)&&!Ne(s))return d||(r.value=s),!0}const l=i?Number(n)<t.length:ce(t,n),a=Reflect.set(t,n,s,Ne(t)?t:o);return t===ue(o)&&a&&(l?ct(s,r)&&yt(t,"set",n,s):yt(t,"add",n,s)),a}deleteProperty(t,n){const s=ce(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&yt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!Qe(n)||!Rr.has(n))&&Te(t,"has",n),s}ownKeys(t){return Te(t,"iterate",z(t)?"length":Ft),Reflect.ownKeys(t)}}class tl extends Ir{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const nl=new kr,sl=new tl,ol=new kr(!0);const Ds=e=>e,Mn=e=>Reflect.getPrototypeOf(e);function rl(e,t,n){return function(...s){const o=this.__v_raw,r=ue(o),i=zt(r),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=o[e](...s),c=n?Ds:t?en:Xe;return!t&&Te(r,"iterate",a?$s:Ft),ke(Object.create(d),{next(){const{value:h,done:v}=d.next();return v?{value:h,done:v}:{value:l?[c(h[0]),c(h[1])]:c(h),done:v}}})}}function Vn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function il(e,t){const n={get(o){const r=this.__v_raw,i=ue(r),l=ue(o);e||(ct(o,l)&&Te(i,"get",o),Te(i,"get",l));const{has:a}=Mn(i),d=t?Ds:e?en:Xe;if(a.call(i,o))return d(r.get(o));if(a.call(i,l))return d(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Te(ue(o),"iterate",Ft),o.size},has(o){const r=this.__v_raw,i=ue(r),l=ue(o);return e||(ct(o,l)&&Te(i,"has",o),Te(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,a=ue(l),d=t?Ds:e?en:Xe;return!e&&Te(a,"iterate",Ft),l.forEach((c,h)=>o.call(r,d(c),d(h),i))}};return ke(n,e?{add:Vn("add"),set:Vn("set"),delete:Vn("delete"),clear:Vn("clear")}:{add(o){const r=ue(this),i=Mn(r),l=ue(o),a=!t&&!ze(o)&&!Rt(o)?l:o;return i.has.call(r,a)||ct(o,a)&&i.has.call(r,o)||ct(l,a)&&i.has.call(r,l)||(r.add(a),yt(r,"add",a,a)),this},set(o,r){!t&&!ze(r)&&!Rt(r)&&(r=ue(r));const i=ue(this),{has:l,get:a}=Mn(i);let d=l.call(i,o);d||(o=ue(o),d=l.call(i,o));const c=a.call(i,o);return i.set(o,r),d?ct(r,c)&&yt(i,"set",o,r):yt(i,"add",o,r),this},delete(o){const r=ue(this),{has:i,get:l}=Mn(r);let a=i.call(r,o);a||(o=ue(o),a=i.call(r,o)),l&&l.call(r,o);const d=r.delete(o);return a&&yt(r,"delete",o,void 0),d},clear(){const o=ue(this),r=o.size!==0,i=o.clear();return r&&yt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=rl(o,e,t)}),n}function eo(e,t){const n=il(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ce(n,o)&&o in s?n:s,o,r)}const ll={get:eo(!1,!1)},al={get:eo(!1,!0)},ul={get:eo(!0,!1)};const Or=new WeakMap,Tr=new WeakMap,Pr=new WeakMap,cl=new WeakMap;function fl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ls(e){return Rt(e)?e:to(e,!1,nl,ll,Or)}function Nr(e){return to(e,!1,ol,al,Tr)}function Ms(e){return to(e,!0,sl,ul,Pr)}function to(e,t,n,s,o){if(!de(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=o.get(e);if(r)return r;const i=fl(Vi(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Ht(e){return Rt(e)?Ht(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function ze(e){return!!(e&&e.__v_isShallow)}function no(e){return e?!!e.__v_raw:!1}function ue(e){const t=e&&e.__v_raw;return t?ue(t):e}function dl(e){return!ce(e,"__v_skip")&&Object.isExtensible(e)&&mr(e,"__v_skip",!0),e}const Xe=e=>de(e)?ls(e):e,en=e=>de(e)?Ms(e):e;function Ne(e){return e?e.__v_isRef===!0:!1}function J(e){return $r(e,!1)}function pl(e){return $r(e,!0)}function $r(e,t){return Ne(e)?e:new hl(e,t)}class hl{constructor(t,n){this.dep=new Zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ue(t),this._value=n?t:Xe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ze(t)||Rt(t);t=s?t:ue(t),ct(t,n)&&(this._rawValue=t,this._value=s?t:Xe(t),this.dep.trigger())}}function Ve(e){return Ne(e)?e.value:e}const ml={get:(e,t,n)=>t==="__v_raw"?e:Ve(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ne(o)&&!Ne(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Dr(e){return Ht(e)?e:new Proxy(e,ml)}class gl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&me!==this)return yr(this,!0),!0}get value(){const t=this.dep.track();return Er(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vl(e,t,n=!1){let s,o;return Y(e)?s=e:(s=e.get,o=e.set),new gl(s,o,n)}const jn={},qn=new WeakMap;let jt;function bl(e,t=!1,n=jt){if(n){let s=qn.get(n);s||qn.set(n,s=[]),s.push(e)}}function _l(e,t,n=he){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:a}=n,d=_=>o?_:ze(_)||o===!1||o===0?wt(_,1):wt(_);let c,h,v,x,M=!1,P=!1;if(Ne(e)?(h=()=>e.value,M=ze(e)):Ht(e)?(h=()=>d(e),M=!0):z(e)?(P=!0,M=e.some(_=>Ht(_)||ze(_)),h=()=>e.map(_=>{if(Ne(_))return _.value;if(Ht(_))return d(_);if(Y(_))return a?a(_,2):_()})):Y(e)?t?h=a?()=>a(e,2):e:h=()=>{if(v){St();try{v()}finally{At()}}const _=jt;jt=c;try{return a?a(e,3,[x]):e(x)}finally{jt=_}}:h=dt,t&&o){const _=h,w=o===!0?1/0:o;h=()=>wt(_(),w)}const K=zi(),D=()=>{c.stop(),K&&K.active&&Ws(K.effects,c)};if(r&&t){const _=t;t=(...w)=>{const Z=_(...w);return D(),Z}}let E=P?new Array(e.length).fill(jn):jn;const L=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const w=c.run();if(_||o||M||(P?w.some((Z,F)=>ct(Z,E[F])):ct(w,E))){v&&v();const Z=jt;jt=c;try{const F=[w,E===jn?void 0:P&&E[0]===jn?[]:E,x];E=w,a?a(t,3,F):t(...F)}finally{jt=Z}}}else c.run()};return l&&l(L),c=new _r(h),c.scheduler=i?()=>i(L,!1):L,x=_=>bl(_,!1,c),v=c.onStop=()=>{const _=qn.get(c);if(_){if(a)a(_,4);else for(const w of _)w();qn.delete(c)}},t?s?L(!0):E=c.run():i?i(L.bind(null,!0),!0):c.run(),D.pause=c.pause.bind(c),D.resume=c.resume.bind(c),D.stop=D,D}function wt(e,t=1/0,n){if(t<=0||!de(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ne(e))wt(e.value,t,n);else if(z(e))for(let s=0;s<e.length;s++)wt(e[s],t,n);else if(rn(e)||zt(e))e.forEach(s=>{wt(s,t,n)});else if(hr(e)){for(const s in e)wt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&wt(e[s],t,n)}return e}/**
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Pn(e,t,n,s){try{return s?e(...s):e()}catch(o){as(o,t,n)}}function Ze(e,t,n,s){if(Y(e)){const o=Pn(e,t,n,s);return o&&dr(o)&&o.catch(r=>{as(r,t,n)}),o}if(z(e)){const o=[];for(let r=0;r<e.length;r++)o.push(Ze(e[r],t,n,s));return o}}function as(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||he;if(t){let l=t.parent;const a=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let h=0;h<c.length;h++)if(c[h](e,a,d)===!1)return}l=l.parent}if(r){St(),Pn(r,null,10,[e,a,d]),At();return}}xl(e,n,o,s,i)}function xl(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const Me=[];let it=-1;const Jt=[];let Tt=null,Gt=0;const Mr=Promise.resolve();let Wn=null;function so(e){const t=Wn||Mr;return e?t.then(this?e.bind(this):e):t}function yl(e){let t=it+1,n=Me.length;for(;t<n;){const s=t+n>>>1,o=Me[s],r=wn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function oo(e){if(!(e.flags&1)){const t=wn(e),n=Me[Me.length-1];!n||!(e.flags&2)&&t>=wn(n)?Me.push(e):Me.splice(yl(t),0,e),e.flags|=1,Vr()}}function Vr(){Wn||(Wn=Mr.then(Ur))}function wl(e){if(!z(e))Tt&&e.id===-1?Tt.splice(Gt+1,0,e):e.flags&1||(Jt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Jt.push(e[t]);Vr()}function xo(e,t,n=it+1){for(;n<Me.length;n++){const s=Me[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Me.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function jr(e){if(Jt.length){const t=[...new Set(Jt)].sort((n,s)=>wn(n)-wn(s));if(Jt.length=0,Tt){for(let n=0;n<t.length;n++)Tt.push(t[n]);return}for(Tt=t,Gt=0;Gt<Tt.length;Gt++){const n=Tt[Gt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Tt=null,Gt=0}}const wn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ur(e){try{for(it=0;it<Me.length;it++){const t=Me[it];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Pn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;it<Me.length;it++){const t=Me[it];t&&(t.flags&=-2)}it=-1,Me.length=0,jr(),Wn=null,(Me.length||Jt.length)&&Ur()}}let Ie=null,Lr=null;function zn(e){const t=Ie;return Ie=e,Lr=e&&e.type.__scopeId||null,t}function $t(e,t=Ie,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Qn(-1);const r=zn(t),i=Et.length;let l;try{l=e(...o)}finally{for(let a=Et.length;a>i;a--)uo();zn(r),s._d&&Qn(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function se(e,t){if(Ie===null)return e;const n=ps(Ie),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,l,a=he]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&wt(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Mt(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let a=l.dir[s];a&&(St(),Ze(a,n,8,[e.el,l,e,t]),At())}}function Bn(e,t){if(Pe){let n=Pe.provides;const s=Pe.parent&&Pe.parent.provides;s===n&&(n=Pe.provides=Object.create(s)),n[e]=t}}function Ye(e,t,n=!1){const s=ya();if(s||Qt){let o=Qt?Qt._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Y(t)?t.call(s&&s.proxy):t}}const Cl=Symbol.for("v-scx"),El=()=>Ye(Cl);function Kn(e,t,n){return Fr(e,t,n)}function Fr(e,t,n=he){const{immediate:s,deep:o,flush:r,once:i}=n,l=ke({},n),a=t&&s||!t&&r!=="post";let d;if(Rn){if(r==="sync"){const x=El();d=x.__watcherHandles||(x.__watcherHandles=[])}else if(!a){const x=()=>{};return x.stop=dt,x.resume=dt,x.pause=dt,x}}const c=Pe;l.call=(x,M,P)=>Ze(x,c,M,P);let h=!1;r==="post"?l.scheduler=x=>{Fe(x,c&&c.suspense)}:r!=="sync"&&(h=!0,l.scheduler=(x,M)=>{M?x():oo(x)}),l.augmentJob=x=>{t&&(x.flags|=4),h&&(x.flags|=2,c&&(x.id=c.uid,x.i=c))};const v=_l(e,t,l);return Rn&&(d?d.push(v):a&&v()),v}function Sl(e,t,n){const s=this.proxy,o=xe(e)?e.includes(".")?Hr(s,e):()=>s[e]:e.bind(s,s);let r;Y(t)?r=t:(r=t.handler,n=t);const i=Dn(this),l=Fr(o,r.bind(s),n);return i(),l}function Hr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const Al=Symbol("_vte"),us=e=>e.__isTeleport,ys=Symbol("_leaveCb");function Rl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==pt){t=n;break}}return t}function Br(e){if(!io(e))return us(e.type)&&e.children?Rl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Y(n.default))return n.default()}}function ro(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ro(us(n.type)&&Br(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Kr(e,t){return Y(e)?ke({name:e.name},t,{setup:e}):e}function Gr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function yo(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Jn=new WeakMap;function vn(e,t,n,s,o=!1){if(z(e)){e.forEach((P,K)=>vn(P,t&&(z(t)?t[K]:t),n,s,o));return}if(Yt(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&vn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?ps(s.component):s.el,i=o?null:r,{i:l,r:a}=e,d=t&&t.r,c=l.refs===he?l.refs={}:l.refs,h=l.setupState,v=ue(h),x=h===he?fr:P=>yo(c,P)?!1:ce(v,P),M=(P,K)=>!(K&&yo(c,K));if(d!=null&&d!==a){if(wo(t),xe(d))c[d]=null,x(d)&&(h[d]=null);else if(Ne(d)){const P=t;M(d,P.k)&&(d.value=null),P.k&&(c[P.k]=null)}}if(Y(a))Pn(a,l,12,[i,c]);else{const P=xe(a),K=Ne(a);if(P||K){const D=()=>{if(e.f){const E=P?x(a)?h[a]:c[a]:M()||!e.k?a.value:c[e.k];if(o)z(E)&&Ws(E,r);else if(z(E))E.includes(r)||E.push(r);else if(P)c[a]=[r],x(a)&&(h[a]=c[a]);else{const L=[r];M(a,e.k)&&(a.value=L),e.k&&(c[e.k]=L)}}else P?(c[a]=i,x(a)&&(h[a]=i)):K&&(M(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const E=()=>{D(),Jn.delete(e)};E.id=-1,Jn.set(e,E),Fe(E,n)}else wo(e),D()}}}function wo(e){const t=Jn.get(e);t&&(t.flags|=8,Jn.delete(e))}rs().requestIdleCallback;rs().cancelIdleCallback;const Yt=e=>!!e.type.__asyncLoader,io=e=>e.type.__isKeepAlive;function Il(e,t){qr(e,"a",t)}function kl(e,t){qr(e,"da",t)}function qr(e,t,n=Pe){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(cs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)io(o.parent.vnode)&&Ol(s,t,n,o),o=o.parent}}function Ol(e,t,n,s){const o=cs(t,e,s,!0);Wr(()=>{Ws(s[t],o)},n)}function cs(e,t,n=Pe,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{St();const l=Dn(n),a=Ze(t,n,e,i);return l(),At(),a});return s?o.unshift(r):o.push(r),r}}const It=e=>(t,n=Pe)=>{(!Rn||e==="sp")&&cs(e,(...s)=>t(...s),n)},Tl=It("bm"),Nn=It("m"),Pl=It("bu"),Nl=It("u"),$l=It("bum"),Wr=It("um"),Dl=It("sp"),Ml=It("rtg"),Vl=It("rtc");function jl(e,t=Pe){cs("ec",e,t)}const Ul="components";function $n(e,t){return Fl(Ul,e,!0,t)||e}const Ll=Symbol.for("v-ndc");function Fl(e,t,n=!0,s=!1){const o=Ie||Pe;if(o){const r=o.type;{const l=Aa(r,!1);if(l&&(l===t||l===je(t)||l===ss(je(t))))return r}const i=Co(o[e]||r[e],t)||Co(o.appContext[e],t);return!i&&s?r:i}}function Co(e,t){return e&&(e[t]||e[je(t)]||e[ss(je(t))])}function Ae(e,t,n,s){let o;const r=n,i=z(e);if(i||xe(e)){const l=i&&Ht(e);let a=!1,d=!1;l&&(a=!ze(e),d=Rt(e),e=is(e)),o=new Array(e.length);for(let c=0,h=e.length;c<h;c++)o[c]=t(a?d?en(Xe(e[c])):Xe(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,r)}else if(de(e))if(e[Symbol.iterator])o=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];o[a]=t(e[c],c,a,r)}}else o=[];return o}function Hl(e,t,n,s,o,r){if(n==null&&(n={}),Ie.ce||Ie.parent&&Yt(Ie.parent)&&Ie.parent.ce){const d=n,c=Object.keys(d).length>0;return k(),En(le,null,[be("slot",d,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Et.length;k();let a;try{const d=i&&zr(i(n)),c=n.key||r||d&&d.key;a=En(le,{key:(c&&!Qe(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Et.length;c>l;c--)uo();throw d}finally{i&&i._c&&(i._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function zr(e){return e.some(t=>Sn(t)?!(t.type===pt||t.type===le&&!zr(t.children)):!0)?e:null}const Vs=e=>e?hi(e)?ps(e):Vs(e.parent):null,bn=ke(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=>Vs(e.parent),$root:e=>Vs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Yr(e),$forceUpdate:e=>e.f||(e.f=()=>{oo(e.update)}),$nextTick:e=>e.n||(e.n=so.bind(e.proxy)),$watch:e=>Sl.bind(e)}),ws=(e,t)=>e!==he&&!e.__isScriptSetup&&ce(e,t),Bl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(ws(s,t))return i[t]=1,s[t];if(o!==he&&ce(o,t))return i[t]=2,o[t];if(ce(r,t))return i[t]=3,r[t];if(n!==he&&ce(n,t))return i[t]=4,n[t];js&&(i[t]=0)}}const d=bn[t];let c,h;if(d)return t==="$attrs"&&Te(e.attrs,"get",""),d(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==he&&ce(n,t))return i[t]=4,n[t];if(h=a.config.globalProperties,ce(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return ws(o,t)?(o[t]=n,!0):s!==he&&ce(s,t)?(s[t]=n,!0):ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:i}},l){let a;return!!(n[l]||e!==he&&l[0]!=="$"&&ce(e,l)||ws(t,l)||ce(r,l)||ce(s,l)||ce(bn,l)||ce(o.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Eo(e){return z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let js=!0;function Kl(e){const t=Yr(e),n=e.proxy,s=e.ctx;js=!1,t.beforeCreate&&So(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:a,inject:d,created:c,beforeMount:h,mounted:v,beforeUpdate:x,updated:M,activated:P,deactivated:K,beforeDestroy:D,beforeUnmount:E,destroyed:L,unmounted:_,render:w,renderTracked:Z,renderTriggered:F,errorCaptured:H,serverPrefetch:Ce,expose:Ue,inheritAttrs:tt,components:ht,directives:We,filters:Dt}=t;if(d&&Gl(d,s,null),i)for(const re in i){const te=i[re];Y(te)&&(s[re]=te.bind(n))}if(o){const re=o.call(n,n);de(re)&&(e.data=ls(re))}if(js=!0,r)for(const re in r){const te=r[re],ee=Y(te)?te.bind(n,n):Y(te.get)?te.get.bind(n,n):dt,He=!Y(te)&&Y(te.set)?te.set.bind(n):dt,Be=ve({get:ee,set:He});Object.defineProperty(s,re,{enumerable:!0,configurable:!0,get:()=>Be.value,set:Oe=>Be.value=Oe})}if(l)for(const re in l)Jr(l[re],s,n,re);if(a){const re=Y(a)?a.call(n):a;Reflect.ownKeys(re).forEach(te=>{Bn(te,re[te])})}c&&So(c,e,"c");function ye(re,te){z(te)?te.forEach(ee=>re(ee.bind(n))):te&&re(te.bind(n))}if(ye(Tl,h),ye(Nn,v),ye(Pl,x),ye(Nl,M),ye(Il,P),ye(kl,K),ye(jl,H),ye(Vl,Z),ye(Ml,F),ye($l,E),ye(Wr,_),ye(Dl,Ce),z(Ue))if(Ue.length){const re=e.exposed||(e.exposed={});Ue.forEach(te=>{Object.defineProperty(re,te,{get:()=>n[te],set:ee=>n[te]=ee,enumerable:!0})})}else e.exposed||(e.exposed={});w&&e.render===dt&&(e.render=w),tt!=null&&(e.inheritAttrs=tt),ht&&(e.components=ht),We&&(e.directives=We),Ce&&Gr(e)}function Gl(e,t,n=dt){z(e)&&(e=Us(e));for(const s in e){const o=e[s];let r;de(o)?"default"in o?r=Ye(o.from||s,o.default,!0):r=Ye(o.from||s):r=Ye(o),Ne(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function So(e,t,n){Ze(z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Jr(e,t,n,s){let o=s.includes(".")?Hr(n,s):()=>n[s];if(xe(e)){const r=t[e];Y(r)&&Kn(o,r)}else if(Y(e))Kn(o,e.bind(n));else if(de(e))if(z(e))e.forEach(r=>Jr(r,t,n,s));else{const r=Y(e.handler)?e.handler.bind(n):t[e.handler];Y(r)&&Kn(o,r,e)}}function Yr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let a;return l?a=l:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(d=>Yn(a,d,i,!0)),Yn(a,t,i)),de(t)&&r.set(t,a),a}function Yn(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Yn(e,r,n,!0),o&&o.forEach(i=>Yn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=ql[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ql={data:Ao,props:Ro,emits:Ro,methods:dn,computed:dn,beforeCreate:$e,created:$e,beforeMount:$e,mounted:$e,beforeUpdate:$e,updated:$e,beforeDestroy:$e,beforeUnmount:$e,destroyed:$e,unmounted:$e,activated:$e,deactivated:$e,errorCaptured:$e,serverPrefetch:$e,components:dn,directives:dn,watch:zl,provide:Ao,inject:Wl};function Ao(e,t){return t?e?function(){return ke(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Wl(e,t){return dn(Us(e),Us(t))}function Us(e){if(z(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $e(e,t){return e?[...new Set([].concat(e,t))]:t}function dn(e,t){return e?ke(Object.create(null),e,t):t}function Ro(e,t){return e?z(e)&&z(t)?[...new Set([...e,...t])]:ke(Object.create(null),Eo(e),Eo(t??{})):t}function zl(e,t){if(!e)return t;if(!t)return e;const n=ke(Object.create(null),e);for(const s in t)n[s]=$e(e[s],t[s]);return n}function Qr(){return{app:null,config:{isNativeTag:fr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Jl=0;function Yl(e,t){return function(s,o=null){Y(s)||(s=ke({},s)),o!=null&&!de(o)&&(o=null);const r=Qr(),i=new WeakSet,l=[];let a=!1;const d=r.app={_uid:Jl++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Ia,get config(){return r.config},set config(c){},use(c,...h){return i.has(c)||(c&&Y(c.install)?(i.add(c),c.install(d,...h)):Y(c)&&(i.add(c),c(d,...h))),d},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),d},component(c,h){return h?(r.components[c]=h,d):r.components[c]},directive(c,h){return h?(r.directives[c]=h,d):r.directives[c]},mount(c,h,v){if(!a){const x=d._ceVNode||be(s,o);return x.appContext=r,v===!0?v="svg":v===!1&&(v=void 0),e(x,c,v),a=!0,d._container=c,c.__vue_app__=d,ps(x.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Ze(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,h){return r.provides[c]=h,d},runWithContext(c){const h=Qt;Qt=d;try{return c()}finally{Qt=h}}};return d}}let Qt=null;const Ql=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${je(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function Xl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||he;let o=n;const r=t.startsWith("update:"),i=r&&Ql(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>xe(c)?c.trim():c)),i.number&&(o=n.map(os)));let l,a=s[l=gs(t)]||s[l=gs(je(t))];!a&&r&&(a=s[l=gs(Bt(t))]),a&&Ze(a,e,6,o);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ze(d,e,6,o)}}const Zl=new WeakMap;function Xr(e,t,n=!1){const s=n?Zl:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!Y(e)){const a=d=>{const c=Xr(d,t,!0);c&&(l=!0,ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(de(e)&&s.set(e,null),null):(z(r)?r.forEach(a=>i[a]=null):ke(i,r),de(e)&&s.set(e,i),i)}function fs(e,t){return!e||!es(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,Bt(t))||ce(e,t))}function Io(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:a,render:d,renderCache:c,props:h,data:v,setupState:x,ctx:M,inheritAttrs:P}=e,K=zn(e);let D,E;try{if(n.shapeFlag&4){const _=o||s,w=_;D=at(d.call(w,_,c,h,x,v,M)),E=l}else{const _=t;D=at(_.length>1?_(h,{attrs:l,slots:i,emit:a}):_(h,null)),E=t.props?l:ea(l)}}catch(_){Et.length=0,as(_,e,1),D=be(pt)}let L=D;if(E&&P!==!1){const _=Object.keys(E),{shapeFlag:w}=L;_.length&&w&7&&(r&&_.some(ts)&&(E=ta(E,r)),L=tn(L,E,!1,!0))}if(n.dirs&&(L=tn(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition){const _=us(L.type)&&Br(L)||L;ro(_,n.transition)}return D=L,zn(K),D}const ea=e=>{let t;for(const n in e)(n==="class"||n==="style"||es(n))&&((t||(t={}))[n]=e[n]);return t},ta=(e,t)=>{const n={};for(const s in e)(!ts(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function na(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:a}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?ko(s,i,d):!!i;if(a&8){const c=t.dynamicProps;for(let h=0;h<c.length;h++){const v=c[h];if(Zr(i,s,v)&&!fs(d,v))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?ko(s,i,d):!0:!!i;return!1}function ko(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(Zr(t,e,r)&&!fs(n,r))return!0}return!1}function Zr(e,t,n){const s=e[n],o=t[n];return n==="style"&&de(s)&&de(o)?!ln(s,o):s!==o}function sa({vnode:e,parent:t,suspense:n},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=s,e=o),o===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ei={},ti=()=>Object.create(ei),ni=e=>Object.getPrototypeOf(e)===ei;function oa(e,t,n,s=!1){const o={},r=ti();e.propsDefaults=Object.create(null),si(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Nr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ra(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=ue(o),[a]=e.propsOptions;let d=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let h=0;h<c.length;h++){let v=c[h];if(fs(e.emitsOptions,v))continue;const x=t[v];if(a)if(ce(r,v))x!==r[v]&&(r[v]=x,d=!0);else{const M=je(v);o[M]=Ls(a,l,M,x,e,!1)}else x!==r[v]&&(r[v]=x,d=!0)}}}else{si(e,t,o,r)&&(d=!0);let c;for(const h in l)(!t||!ce(t,h)&&((c=Bt(h))===h||!ce(t,c)))&&(a?n&&(n[h]!==void 0||n[c]!==void 0)&&(o[h]=Ls(a,l,h,void 0,e,!0)):delete o[h]);if(r!==l)for(const h in r)(!t||!ce(t,h))&&(delete r[h],d=!0)}d&&yt(e.attrs,"set","")}function si(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(hn(a))continue;const d=t[a];let c;o&&ce(o,c=je(a))?!r||!r.includes(c)?n[c]=d:(l||(l={}))[c]=d:fs(e.emitsOptions,a)||(!(a in s)||d!==s[a])&&(s[a]=d,i=!0)}if(r){const a=ue(n),d=l||he;for(let c=0;c<r.length;c++){const h=r[c];n[h]=Ls(o,a,h,d[h],e,!ce(d,h))}}return i}function Ls(e,t,n,s,o,r){const i=e[n];if(i!=null){const l=ce(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&Y(a)){const{propsDefaults:d}=o;if(n in d)s=d[n];else{const c=Dn(o);s=d[n]=a.call(null,t),c()}}else s=a;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!l?s=!1:i[1]&&(s===""||s===Bt(n))&&(s=!0))}return s}const ia=new WeakMap;function oi(e,t,n=!1){const s=n?ia:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},l=[];let a=!1;if(!Y(e)){const c=h=>{a=!0;const[v,x]=oi(h,t,!0);ke(i,v),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return de(e)&&s.set(e,Wt),Wt;if(z(r))for(let c=0;c<r.length;c++){const h=je(r[c]);Oo(h)&&(i[h]=he)}else if(r)for(const c in r){const h=je(c);if(Oo(h)){const v=r[c],x=i[h]=z(v)||Y(v)?{type:v}:ke({},v),M=x.type;let P=!1,K=!0;if(z(M))for(let D=0;D<M.length;++D){const E=M[D],L=Y(E)&&E.name;if(L==="Boolean"){P=!0;break}else L==="String"&&(K=!1)}else P=Y(M)&&M.name==="Boolean";x[0]=P,x[1]=K,(P||ce(x,"default"))&&l.push(h)}}const d=[i,l];return de(e)&&s.set(e,d),d}function Oo(e){return e[0]!=="$"&&!hn(e)}const lo=e=>e==="_"||e==="_ctx"||e==="$stable",ao=e=>z(e)?e.map(at):[at(e)],la=(e,t,n)=>{if(t._n)return t;const s=$t((...o)=>ao(t(...o)),n);return s._c=!1,s},ri=(e,t,n)=>{const s=e._ctx;for(const o in e){if(lo(o))continue;const r=e[o];if(Y(r))t[o]=la(o,r,s);else if(r!=null){const i=ao(r);t[o]=()=>i}}},ii=(e,t)=>{const n=ao(t);e.slots.default=()=>n},li=(e,t,n)=>{for(const s in t)(n||!lo(s))&&(e[s]=t[s])},aa=(e,t,n)=>{const s=e.slots=ti();if(e.vnode.shapeFlag&32){const o=t._;o?(li(s,t,n),n&&mr(s,"_",o,!0)):ri(t,s)}else t&&ii(e,t)},ua=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=he;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:li(o,t,n):(r=!t.$stable,ri(t,o)),i=t}else t&&(ii(e,t),i={default:1});if(r)for(const l in o)!lo(l)&&i[l]==null&&delete o[l]},Fe=ha;function ca(e){return fa(e)}function fa(e,t){const n=rs();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:a,setText:d,setElementText:c,parentNode:h,nextSibling:v,setScopeId:x=dt,insertStaticContent:M}=e,P=(f,p,m,S=null,R=null,C=null,$=void 0,N=null,T=!!p.dynamicChildren)=>{if(f===p)return;f&&!cn(f,p)&&(S=A(f),Oe(f,R,C,!0),f=null),p.patchFlag===-2&&(T=!1,p.dynamicChildren=null);const{type:I,ref:W,shapeFlag:U}=p;switch(I){case ds:K(f,p,m,S);break;case pt:D(f,p,m,S);break;case Es:f==null&&E(p,m,S,$);break;case le:ht(f,p,m,S,R,C,$,N,T);break;default:U&1?w(f,p,m,S,R,C,$,N,T):U&6?We(f,p,m,S,R,C,$,N,T):(U&64||U&128)&&I.process(f,p,m,S,R,C,$,N,T,G)}W!=null&&R?vn(W,f&&f.ref,C,p||f,!p):W==null&&f&&f.ref!=null&&vn(f.ref,null,C,f,!0)},K=(f,p,m,S)=>{if(f==null)s(p.el=l(p.children),m,S);else{const R=p.el=f.el;p.children!==f.children&&d(R,p.children)}},D=(f,p,m,S)=>{f==null?s(p.el=a(p.children||""),m,S):p.el=f.el},E=(f,p,m,S)=>{[f.el,f.anchor]=M(f.children,p,m,S,f.el,f.anchor)},L=({el:f,anchor:p},m,S)=>{let R;for(;f&&f!==p;)R=v(f),s(f,m,S),f=R;s(p,m,S)},_=({el:f,anchor:p})=>{let m;for(;f&&f!==p;)m=v(f),o(f),f=m;o(p)},w=(f,p,m,S,R,C,$,N,T)=>{if(p.type==="svg"?$="svg":p.type==="math"&&($="mathml"),f==null)Z(p,m,S,R,C,$,N,T);else{const I=f.el&&f.el._isVueCE?f.el:null;try{I&&I._beginPatch(),Ce(f,p,R,C,$,N,T)}finally{I&&I._endPatch()}}},Z=(f,p,m,S,R,C,$,N)=>{let T,I;const{props:W,shapeFlag:U,transition:q,dirs:y}=f;if(T=f.el=i(f.type,C,W&&W.is,W),U&8?c(T,f.children):U&16&&H(f.children,T,null,S,R,Cs(f,C),$,N),y&&Mt(f,null,S,"created"),F(T,f,f.scopeId,$,S),W){for(const fe in W)fe!=="value"&&!hn(fe)&&r(T,fe,null,W[fe],C,S);"value"in W&&r(T,"value",null,W.value,C),(I=W.onVnodeBeforeMount)&&rt(I,S,f)}y&&Mt(f,null,S,"beforeMount");const g=da(R,q);g&&q.beforeEnter(T),s(T,p,m),((I=W&&W.onVnodeMounted)||g||y)&&Fe(()=>{try{I&&rt(I,S,f),g&&q.enter(T),y&&Mt(f,null,S,"mounted")}finally{}},R)},F=(f,p,m,S,R)=>{if(m&&x(f,m),S)for(let C=0;C<S.length;C++)x(f,S[C]);if(R){let C=R.subTree;if(p===C||fi(C.type)&&(C.ssContent===p||C.ssFallback===p)){const $=R.vnode;F(f,$,$.scopeId,$.slotScopeIds,R.parent)}}},H=(f,p,m,S,R,C,$,N,T=0)=>{for(let I=T;I<f.length;I++){const W=f[I]=N?xt(f[I]):at(f[I]);P(null,W,p,m,S,R,C,$,N)}},Ce=(f,p,m,S,R,C,$)=>{const N=p.el=f.el;let{patchFlag:T,dynamicChildren:I,dirs:W}=p;T|=f.patchFlag&16;const U=f.props||he,q=p.props||he;let y;if(m&&Vt(m,!1),(y=q.onVnodeBeforeUpdate)&&rt(y,m,p,f),W&&Mt(p,f,m,"beforeUpdate"),m&&Vt(m,!0),I&&(!f.dynamicChildren||f.dynamicChildren.length!==I.length)&&(T=0,$=!1,I=null),(U.innerHTML&&q.innerHTML==null||U.textContent&&q.textContent==null)&&c(N,""),I?Ue(f.dynamicChildren,I,N,m,S,Cs(p,R),C):$||te(f,p,N,null,m,S,Cs(p,R),C,!1),T>0){if(T&16)tt(N,U,q,m,R);else if(T&2&&U.class!==q.class&&r(N,"class",null,q.class,R),T&4&&r(N,"style",U.style,q.style,R),T&8){const g=p.dynamicProps;for(let fe=0;fe<g.length;fe++){const b=g[fe],ne=U[b],pe=q[b];(pe!==ne||b==="value")&&r(N,b,ne,pe,R,m)}}T&1&&f.children!==p.children&&c(N,p.children)}else!$&&I==null&&tt(N,U,q,m,R);((y=q.onVnodeUpdated)||W)&&Fe(()=>{y&&rt(y,m,p,f),W&&Mt(p,f,m,"updated")},S)},Ue=(f,p,m,S,R,C,$)=>{for(let N=0;N<p.length;N++){const T=f[N],I=p[N],W=T.el&&(T.type===le||!cn(T,I)||T.shapeFlag&198)?h(T.el):m;P(T,I,W,null,S,R,C,$,!0)}},tt=(f,p,m,S,R)=>{if(p!==m){if(p!==he)for(const C in p)!hn(C)&&!(C in m)&&r(f,C,p[C],null,R,S);for(const C in m){if(hn(C))continue;const $=m[C],N=p[C];$!==N&&C!=="value"&&r(f,C,N,$,R,S)}"value"in m&&r(f,"value",p.value,m.value,R)}},ht=(f,p,m,S,R,C,$,N,T)=>{const I=p.el=f?f.el:l(""),W=p.anchor=f?f.anchor:l("");let{patchFlag:U,dynamicChildren:q,slotScopeIds:y}=p;y&&(N=N?N.concat(y):y),f==null?(s(I,m,S),s(W,m,S),H(p.children||[],m,W,R,C,$,N,T)):U>0&&U&64&&q&&f.dynamicChildren&&f.dynamicChildren.length===q.length?(Ue(f.dynamicChildren,q,m,R,C,$,N),(p.key!=null||R&&p===R.subTree)&&ai(f,p,!0)):te(f,p,m,W,R,C,$,N,T)},We=(f,p,m,S,R,C,$,N,T)=>{p.slotScopeIds=N,f==null?p.shapeFlag&512?R.ctx.activate(p,m,S,$,T):Dt(p,m,S,R,C,$,T):kt(f,p,T)},Dt=(f,p,m,S,R,C,$)=>{const N=f.component=xa(f,S,R);if(io(f)&&(N.ctx.renderer=G),wa(N,!1,$),N.asyncDep){if(R&&R.registerDep(N,ye,$),!f.el){const T=N.subTree=be(pt);D(null,T,p,m),f.placeholder=T.el}}else ye(N,f,p,m,R,C,$)},kt=(f,p,m)=>{const S=p.component=f.component;if(na(f,p,m))if(S.asyncDep&&!S.asyncResolved){re(S,p,m);return}else S.next=p,S.update();else p.el=f.el,S.vnode=p},ye=(f,p,m,S,R,C,$)=>{const N=()=>{if(f.isMounted){let{next:U,bu:q,u:y,parent:g,vnode:fe}=f;{const st=ui(f);if(st){U&&(U.el=fe.el,re(f,U,$)),st.asyncDep.then(()=>{Fe(()=>{f.isUnmounted||I()},R)});return}}let b=U,ne;Vt(f,!1),U?(U.el=fe.el,re(f,U,$)):U=fe,q&&Hn(q),(ne=U.props&&U.props.onVnodeBeforeUpdate)&&rt(ne,g,U,fe),Vt(f,!0);const pe=Io(f),nt=f.subTree;f.subTree=pe,P(nt,pe,h(nt.el),A(nt),f,R,C),U.el=pe.el,b===null&&sa(f,pe.el),y&&Fe(y,R),(ne=U.props&&U.props.onVnodeUpdated)&&Fe(()=>rt(ne,g,U,fe),R)}else{let U;const{el:q,props:y}=p,{bm:g,m:fe,parent:b,root:ne,type:pe}=f,nt=Yt(p);Vt(f,!1),g&&Hn(g),!nt&&(U=y&&y.onVnodeBeforeMount)&&rt(U,b,p),Vt(f,!0);{ne.ce&&ne.ce._hasShadowRoot()&&ne.ce._injectChildStyle(pe,f.parent?f.parent.type:void 0);const st=f.subTree=Io(f);P(null,st,m,S,f,R,C),p.el=st.el}if(fe&&Fe(fe,R),!nt&&(U=y&&y.onVnodeMounted)){const st=p;Fe(()=>rt(U,b,st),R)}(p.shapeFlag&256||b&&Yt(b.vnode)&&b.vnode.shapeFlag&256)&&f.a&&Fe(f.a,R),f.isMounted=!0,p=m=S=null}};f.scope.on();const T=f.effect=new _r(N);f.scope.off();const I=f.update=T.run.bind(T),W=f.job=T.runIfDirty.bind(T);W.i=f,W.id=f.uid,T.scheduler=()=>oo(W),Vt(f,!0),I()},re=(f,p,m)=>{p.component=f;const S=f.vnode.props;f.vnode=p,f.next=null,ra(f,p.props,S,m),ua(f,p.children,m),St(),xo(f),At()},te=(f,p,m,S,R,C,$,N,T=!1)=>{const I=f&&f.children,W=f?f.shapeFlag:0,U=p.children,{patchFlag:q,shapeFlag:y}=p;if(q>0){if(q&128){He(I,U,m,S,R,C,$,N,T);return}else if(q&256){ee(I,U,m,S,R,C,$,N,T);return}}y&8?(W&16&&Le(I,R,C),U!==I&&c(m,U)):W&16?y&16?He(I,U,m,S,R,C,$,N,T):Le(I,R,C,!0):(W&8&&c(m,""),y&16&&H(U,m,S,R,C,$,N,T))},ee=(f,p,m,S,R,C,$,N,T)=>{f=f||Wt,p=p||Wt;const I=f.length,W=p.length,U=Math.min(I,W);let q;for(q=0;q<U;q++){const y=p[q]=T?xt(p[q]):at(p[q]);P(f[q],y,m,null,R,C,$,N,T)}I>W?Le(f,R,C,!0,!1,U):H(p,m,S,R,C,$,N,T,U)},He=(f,p,m,S,R,C,$,N,T)=>{let I=0;const W=p.length;let U=f.length-1,q=W-1;for(;I<=U&&I<=q;){const y=f[I],g=p[I]=T?xt(p[I]):at(p[I]);if(cn(y,g))P(y,g,m,null,R,C,$,N,T);else break;I++}for(;I<=U&&I<=q;){const y=f[U],g=p[q]=T?xt(p[q]):at(p[q]);if(cn(y,g))P(y,g,m,null,R,C,$,N,T);else break;U--,q--}if(I>U){if(I<=q){const y=q+1,g=y<W?p[y].el:S;for(;I<=q;)P(null,p[I]=T?xt(p[I]):at(p[I]),m,g,R,C,$,N,T),I++}}else if(I>q)for(;I<=U;)Oe(f[I],R,C,!0),I++;else{const y=I,g=I,fe=new Map;for(I=g;I<=q;I++){const Ge=p[I]=T?xt(p[I]):at(p[I]);Ge.key!=null&&fe.set(Ge.key,I)}let b,ne=0;const pe=q-g+1;let nt=!1,st=0;const an=new Array(pe);for(I=0;I<pe;I++)an[I]=0;for(I=y;I<=U;I++){const Ge=f[I];if(ne>=pe){Oe(Ge,R,C,!0);continue}let ot;if(Ge.key!=null)ot=fe.get(Ge.key);else for(b=g;b<=q;b++)if(an[b-g]===0&&cn(Ge,p[b])){ot=b;break}ot===void 0?Oe(Ge,R,C,!0):(an[ot-g]=I+1,ot>=st?st=ot:nt=!0,P(Ge,p[ot],m,null,R,C,$,N,T),ne++)}const po=nt?pa(an):Wt;for(b=po.length-1,I=pe-1;I>=0;I--){const Ge=g+I,ot=p[Ge],ho=p[Ge+1],mo=Ge+1<W?ho.el||ci(ho):S;an[I]===0?P(null,ot,m,mo,R,C,$,N,T):nt&&(b<0||I!==po[b]?Be(ot,m,mo,2):b--)}}},Be=(f,p,m,S,R=null)=>{const{el:C,type:$,transition:N,children:T,shapeFlag:I}=f;if(I&6){Be(f.component.subTree,p,m,S);return}if(I&128){f.suspense.move(p,m,S);return}if(I&64){$.move(f,p,m,G);return}if($===le){s(C,p,m);for(let U=0;U<T.length;U++)Be(T[U],p,m,S);s(f.anchor,p,m);return}if($===Es){L(f,p,m);return}if(S!==2&&I&1&&N)if(S===0)N.persisted&&!C[ys]?s(C,p,m):(N.beforeEnter(C),s(C,p,m),Fe(()=>N.enter(C),R));else{const{leave:U,delayLeave:q,afterLeave:y}=N,g=()=>{f.ctx.isUnmounted?o(C):s(C,p,m)},fe=()=>{const b=C._isLeaving||!!C[ys];C._isLeaving&&C[ys](!0),N.persisted&&!b?g():U(C,()=>{g(),y&&y()})};q?q(C,g,fe):fe()}else s(C,p,m)},Oe=(f,p,m,S=!1,R=!1)=>{const{type:C,props:$,ref:N,children:T,dynamicChildren:I,shapeFlag:W,patchFlag:U,dirs:q,cacheIndex:y,memo:g}=f;if(U===-2&&(R=!1),N!=null&&(St(),vn(N,null,m,f,!0),At()),y!=null&&(p.renderCache[y]=void 0),W&256){p.ctx.deactivate(f);return}const fe=W&1&&q,b=!Yt(f);let ne;if(b&&(ne=$&&$.onVnodeBeforeUnmount)&&rt(ne,p,f),W&6)gt(f.component,m,S);else{if(W&128){f.suspense.unmount(m,S);return}fe&&Mt(f,null,p,"beforeUnmount"),W&64?f.type.remove(f,p,m,G,S):I&&!I.hasOnce&&(C!==le||U>0&&U&64)?Le(I,p,m,!1,!0):(C===le&&U&384||!R&&W&16)&&Le(T,p,m),S&&mt(f)}const pe=g!=null&&y==null;(b&&(ne=$&&$.onVnodeUnmounted)||fe||pe)&&Fe(()=>{ne&&rt(ne,p,f),fe&&Mt(f,null,p,"unmounted"),pe&&(f.el=null)},m)},mt=f=>{const{type:p,el:m,anchor:S,transition:R}=f;if(p===le){Ke(m,S);return}if(p===Es){_(f);return}const C=()=>{o(m),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(f.shapeFlag&1&&R&&!R.persisted){const{leave:$,delayLeave:N}=R,T=()=>$(m,C);N?N(f.el,C,T):T()}else C()},Ke=(f,p)=>{let m;for(;f!==p;)m=v(f),o(f),f=m;o(p)},gt=(f,p,m)=>{const{bum:S,scope:R,job:C,subTree:$,um:N,m:T,a:I}=f;To(T),To(I),S&&Hn(S),R.stop(),C&&(C.flags|=8,Oe($,f,p,m)),N&&Fe(N,p),Fe(()=>{f.isUnmounted=!0},p)},Le=(f,p,m,S=!1,R=!1,C=0)=>{for(let $=C;$<f.length;$++)Oe(f[$],p,m,S,R)},A=f=>{if(f.shapeFlag&6)return A(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=v(f.anchor||f.el),m=p&&p[Al];return m?v(m):p};let B=!1;const V=(f,p,m)=>{let S;f==null?p._vnode&&(Oe(p._vnode,null,null,!0),S=p._vnode.component):P(p._vnode||null,f,p,null,null,null,m),p._vnode=f,B||(B=!0,xo(S),jr(),B=!1)},G={p:P,um:Oe,m:Be,r:mt,mt:Dt,mc:H,pc:te,pbc:Ue,n:A,o:e};return{render:V,hydrate:void 0,createApp:Yl(V)}}function Cs({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 Vt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function da(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ai(e,t,n=!1){const s=e.children,o=t.children;if(z(s)&&z(o))for(let r=0;r<s.length;r++){const i=s[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=xt(o[r]),l.el=i.el),!n&&l.patchFlag!==-2&&ai(i,l)),l.type===ds&&(l.patchFlag===-1&&(l=o[r]=xt(l)),l.el=i.el),l.type===pt&&!l.el&&(l.el=i.el)}}function pa(e){const t=e.slice(),n=[0];let s,o,r,i,l;const a=e.length;for(s=0;s<a;s++){const d=e[s];if(d!==0){if(o=n[n.length-1],e[o]<d){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<d?r=l+1:i=l;d<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-- >0;)n[r]=i,i=t[i];return n}function ui(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ui(t)}function To(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ci(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ci(t.subTree):null}const fi=e=>e.__isSuspense;function ha(e,t){t&&t.pendingBranch?z(e)?t.effects.push(...e):t.effects.push(e):wl(e)}const le=Symbol.for("v-fgt"),ds=Symbol.for("v-txt"),pt=Symbol.for("v-cmt"),Es=Symbol.for("v-stc"),Et=[];let qe=null;function k(e=!1){Et.push(qe=e?null:[])}function uo(){Et.pop(),qe=Et[Et.length-1]||null}let Cn=1;function Qn(e,t=!1){Cn+=e,e<0&&qe&&t&&(qe.hasOnce=!0)}function di(e){return e.dynamicChildren=Cn>0?qe||Wt:null,uo(),Cn>0&&qe&&qe.push(e),e}function O(e,t,n,s,o,r){return di(u(e,t,n,s,o,r,!0))}function En(e,t,n,s,o){return di(be(e,t,n,s,o,!0))}function Sn(e){return e?e.__v_isVNode===!0:!1}function cn(e,t){return e.type===t.type&&e.key===t.key}const pi=({key:e})=>e??null,Gn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Ne(e)||Y(e)?{i:Ie,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,r=e===le?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pi(t),ref:t&&Gn(t),scopeId:Lr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ie};return l?(Xn(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=xe(n)?8:16),Cn>0&&!i&&qe&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&qe.push(a),a}const be=ma;function ma(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Ll)&&(e=pt),Sn(e)){const l=tn(e,t,!0);return n&&Xn(l,n),Cn>0&&!r&&qe&&(l.shapeFlag&6?qe[qe.indexOf(e)]=l:qe.push(l)),l.patchFlag=-2,l}if(Ra(e)&&(e=e.__vccOpts),t){t=ga(t);let{class:l,style:a}=t;l&&!xe(l)&&(t.class=Re(l)),de(a)&&(no(a)&&!z(a)&&(a=ke({},a)),t.style=Zt(a))}const i=xe(e)?1:fi(e)?128:us(e)?64:de(e)?4:Y(e)?2:0;return u(e,t,n,s,o,i,r,!0)}function ga(e){return e?no(e)||ni(e)?ke({},e):e:null}function tn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:a}=e,d=t?va(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&pi(d),ref:t&&t.ref?n&&r?z(r)?r.concat(Gn(t)):[r,Gn(t)]:Gn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&tn(e.ssContent),ssFallback:e.ssFallback&&tn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&ro(c,a.clone(c)),c}function we(e=" ",t=0){return be(ds,null,e,t)}function Q(e="",t=!1){return t?(k(),En(pt,null,e)):be(pt,null,e)}function at(e){return e==null||typeof e=="boolean"?be(pt):z(e)?be(le,null,e.slice()):Sn(e)?xt(e):be(ds,null,String(e))}function xt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:tn(e)}function Xn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(z(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Xn(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ni(t)?t._ctx=Ie:o===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Y(t)){if(s&65){Xn(e,{default:t});return}t={default:t,_ctx:Ie},n=32}else t=String(t),s&64?(n=16,t=[we(t)]):n=8;e.children=t,e.shapeFlag|=n}function va(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=Re([t.class,s.class]));else if(o==="style")t.style=Zt([t.style,s.style]);else if(es(o)){const r=t[o],i=s[o];i&&r!==i&&!(z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!ts(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function rt(e,t,n,s=null){Ze(e,t,7,[n,s])}const ba=Qr();let _a=0;function xa(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||ba,r={uid:_a++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Wi(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:oi(s,o),emitsOptions:Xr(s,o),emit:null,emitted:null,propsDefaults:he,inheritAttrs:s.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Xl.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const ya=()=>Pe||Ie;let Zn,An;{const e=rs(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};Zn=t("__VUE_INSTANCE_SETTERS__",n=>Pe=n),An=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Dn=e=>{const t=Pe;return Zn(e),e.scope.on(),()=>{e.scope.off(),Zn(t)}},Po=()=>{Pe&&Pe.scope.off(),Zn(null)};function hi(e){return e.vnode.shapeFlag&4}let Rn=!1;function wa(e,t=!1,n=!1){t&&An(t);const{props:s,children:o}=e.vnode,r=hi(e);oa(e,s,r,t),aa(e,o,n||t);const i=r?Ca(e,t):void 0;return t&&An(!1),i}function Ca(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bl);const{setup:s}=n;if(s){St();const o=e.setupContext=s.length>1?Sa(e):null,r=Dn(e),i=Pn(s,e,0,[e.props,o]),l=dr(i);if(At(),r(),(l||e.sp)&&!Yt(e)&&Gr(e),l){if(i.then(Po,Po),t)return i.then(a=>{An(!0);try{No(e,a,t)}finally{An(!1)}}).catch(a=>{as(a,e,0)});e.asyncDep=i}else No(e,i)}else mi(e)}function No(e,t,n){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:de(t)&&(e.setupState=Dr(t)),mi(e)}function mi(e,t,n){const s=e.type;e.render||(e.render=s.render||dt);{const o=Dn(e);St();try{Kl(e)}finally{At(),o()}}}const Ea={get(e,t){return Te(e,"get",""),e[t]}};function Sa(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ea),slots:e.slots,emit:e.emit,expose:t}}function ps(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Dr(dl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in bn)return bn[n](e)},has(t,n){return n in t||n in bn}})):e.proxy}function Aa(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function Ra(e){return Y(e)&&"__vccOpts"in e}const ve=(e,t)=>vl(e,t,Rn);function gi(e,t,n){try{Qn(-1);const s=arguments.length;return s===2?de(t)&&!z(t)?Sn(t)?be(e,null,[t]):be(e,t):be(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Sn(n)&&(n=[n]),be(e,t,n))}finally{Qn(1)}}const Ia="3.5.41";/**
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Fs;const $o=typeof window<"u"&&window.trustedTypes;if($o)try{Fs=$o.createPolicy("vue",{createHTML:e=>e})}catch{}const vi=Fs?e=>Fs.createHTML(e):e=>e,ka="http://www.w3.org/2000/svg",Oa="http://www.w3.org/1998/Math/MathML",_t=typeof document<"u"?document:null,Do=_t&&_t.createElement("template"),Ta={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?_t.createElementNS(ka,e):t==="mathml"?_t.createElementNS(Oa,e):n?_t.createElement(e,{is:n}):_t.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>_t.createTextNode(e),createComment:e=>_t.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>_t.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Do.innerHTML=vi(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Do.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Pa=Symbol("_vtc");function Na(e,t,n){const s=e[Pa];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Mo=Symbol("_vod"),$a=Symbol("_vsh"),Da=Symbol(""),Ma=/(?:^|;)\s*display\s*:/;function Va(e,t,n){const s=e.style,o=xe(n);let r=!1;if(n&&!o){if(t)if(xe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&pn(s,l,"")}else for(const i in t)n[i]==null&&pn(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?Ua(e,i,!xe(t)&&t?t[i]:void 0,l)||pn(s,i,l):pn(s,i,"")}}else if(o){if(t!==n){const i=s[Da];i&&(n+=";"+i),s.cssText=n,r=Ma.test(n)}}else t&&e.removeAttribute("style");Mo in e&&(e[Mo]=r?s.display:"",e[$a]&&(s.display="none"))}const Vo=/\s*!important$/;function pn(e,t,n){if(z(n))n.forEach(s=>pn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ja(e,t);Vo.test(n)?e.setProperty(Bt(s),n.replace(Vo,""),"important"):e[s]=n}}const jo=["Webkit","Moz","ms"],Ss={};function ja(e,t){const n=Ss[t];if(n)return n;let s=je(t);if(s!=="filter"&&s in e)return Ss[t]=s;s=ss(s);for(let o=0;o<jo.length;o++){const r=jo[o]+s;if(r in e)return Ss[t]=r}return t}function Ua(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&xe(s)&&n===s}const Uo="http://www.w3.org/1999/xlink";function Lo(e,t,n,s,o,r=Gi(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Uo,t.slice(6,t.length)):e.setAttributeNS(Uo,t,n):n==null||r&&!gr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":Qe(n)?String(n):n)}function Fo(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?vi(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=gr(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(o||t)}function Nt(e,t,n,s){e.addEventListener(t,n,s)}function La(e,t,n,s){e.removeEventListener(t,n,s)}const Ho=Symbol("_vei");function Fa(e,t,n,s,o=null){const r=e[Ho]||(e[Ho]={}),i=r[t];if(s&&i)i.value=s;else{const[l,a]=Ka(t);if(s){const d=r[t]=Wa(s,o);Nt(e,l,d,a)}else i&&(La(e,l,i,a),r[t]=void 0)}}const Ha=/(Once|Passive|Capture)$/,Ba=/^on:?(?:Once|Passive|Capture)$/;function Ka(e){let t,n;for(;(n=e.match(Ha))&&!Ba.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Bt(e.slice(2)),t]}let As=0;const Ga=Promise.resolve(),qa=()=>As||(Ga.then(()=>As=0),As=Date.now());function Wa(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(z(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let a=0;a<i.length&&!s._stopped;a++){const d=i[a];d&&Ze(d,t,5,l)}}else Ze(o,t,5,[s])};return n.value=e,n.attached=qa(),n}const Bo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,za=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?Na(e,s,i):t==="style"?Va(e,n,s):es(t)?ts(t)||Fa(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ja(e,t,s,i))?(Fo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lo(e,t,s,i,r,t!=="value")):e._isVueCE&&(Ya(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(s)))?Fo(e,je(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Lo(e,t,s,i))};function Ja(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bo(t)&&Y(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||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 Bo(t)&&xe(n)?!1:t in e}function Ya(e,t){const n=e._def.props;if(!n)return!1;const s=je(t);return Array.isArray(n)?n.some(o=>je(o)===s):Object.keys(n).some(o=>je(o)===s)}const nn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return z(t)?n=>Hn(t,n):t};function Qa(e){e.target.composing=!0}function Ko(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ft=Symbol("_assign"),Un=Symbol("_initialValue");function Rs(e,t,n){return t&&(e=e.trim()),n&&(e=os(e)),e}const ge={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Un]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Un]=e.defaultValue.replace(/\r\n?/g,`
`))),e[ft]=nn(o);const r=s||o.props&&o.props.type==="number";Nt(e,t?"change":"input",i=>{i.target.composing||e[ft](Rs(e.value,n,r))}),(n||r)&&Nt(e,"change",()=>{e.value=Rs(e.value,n,r)}),t||(Nt(e,"compositionstart",Qa),Nt(e,"compositionend",Ko),Nt(e,"change",Ko))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Un];delete e[Un],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[ft](Rs(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[ft]=nn(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?os(e.value):e.value,a=t??"";if(l===a)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Ut={deep:!0,created(e,t,n){e[ft]=nn(n),Nt(e,"change",()=>{const s=e._modelValue,o=kn(e),r=e.checked,i=e[ft];if(z(s)){const l=Js(s,o),a=l!==-1;if(r&&!a)i(s.concat(o));else if(!r&&a){const d=[...s];d.splice(l,1),i(d)}}else if(rn(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(bi(e,r))})},mounted:Go,beforeUpdate(e,t,n){e[ft]=nn(n),Go(e,t,n)}};function Go(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(z(t))o=Js(t,s.props.value)>-1;else if(rn(t))o=t.has(s.props.value);else{if(t===n)return;o=ln(t,bi(e,!0))}e.checked!==o&&(e.checked=o)}const In={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Nt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?os(kn(r)):kn(r));e[ft](e.multiple?rn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,so(()=>{e._assigning=!1})}),e[ft]=nn(s)},mounted(e,{value:t}){qo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[ft]=nn(n)},updated(e,{value:t}){e._assigning||qo(e,t)}};function qo(e,t){const n=e.multiple,s=z(t);if(!(n&&!s&&!rn(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],l=kn(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Js(t,l)>-1}else i.selected=t.has(l);else if(ln(kn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function kn(e){return"_value"in e?e._value:e.value}function bi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Xa=["ctrl","shift","alt","meta"],Za={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)=>Xa.some(n=>e[`${n}Key`]&&!t.includes(n))},ut=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...r)=>{for(let i=0;i<t.length;i++){const l=Za[t[i]];if(l&&l(o,t))return}return e(o,...r)}))},eu=ke({patchProp:za},Ta);let Wo;function tu(){return Wo||(Wo=ca(eu))}const nu=((...e)=>{const t=tu().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=ou(s);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,su(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function su(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ou(e){return xe(e)?document.querySelector(e):e}/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const qt=typeof document<"u";function _i(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ru(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&_i(e.default)}const ae=Object.assign;function Is(e,t){const n={};for(const s in t){const o=t[s];n[s]=et(o)?o.map(e):e(o)}return n}const _n=()=>{},et=Array.isArray;function zo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const xi=/#/g,iu=/&/g,lu=/\//g,au=/=/g,uu=/\?/g,yi=/\+/g,cu=/%5B/g,fu=/%5D/g,wi=/%5E/g,du=/%60/g,Ci=/%7B/g,pu=/%7C/g,Ei=/%7D/g,hu=/%20/g;function co(e){return e==null?"":encodeURI(""+e).replace(pu,"|").replace(cu,"[").replace(fu,"]")}function mu(e){return co(e).replace(Ci,"{").replace(Ei,"}").replace(wi,"^")}function Hs(e){return co(e).replace(yi,"%2B").replace(hu,"+").replace(xi,"%23").replace(iu,"%26").replace(du,"`").replace(Ci,"{").replace(Ei,"}").replace(wi,"^")}function gu(e){return Hs(e).replace(au,"%3D")}function vu(e){return co(e).replace(xi,"%23").replace(uu,"%3F")}function bu(e){return vu(e).replace(lu,"%2F")}function On(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const _u=/\/$/,xu=e=>e.replace(_u,"");function ks(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),r=t.slice(a,l>0?l:t.length),o=e(r.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Eu(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:On(i)}}function yu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Jo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function wu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&sn(t.matched[s],n.matched[o])&&Si(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function sn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Si(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Cu(e[n],t[n]))return!1;return!0}function Cu(e,t){return et(e)?Yo(e,t):et(t)?Yo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Yo(e,t){return et(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Eu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,i,l;for(i=0;i<s.length;i++)if(l=s[i],l!==".")if(l==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const Ot={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Bs=(function(e){return e.pop="pop",e.push="push",e})({}),Os=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Su(e){if(!e)if(qt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),xu(e)}const Au=/^[^#]+#/;function Ru(e,t){return e.replace(Au,"#")+t}function Iu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const hs=()=>({left:window.scrollX,top:window.scrollY});function ku(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Iu(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Qo(e,t){return(history.state?history.state.position-t:-1)+e}const Ks=new Map;function Ou(e,t){Ks.set(e,t)}function Tu(e){const t=Ks.get(e);return Ks.delete(e),t}function Pu(e){return typeof e=="string"||e&&typeof e=="object"}function Ai(e){return typeof e=="string"||typeof e=="symbol"}let _e=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Ri=Symbol("");_e.MATCHER_NOT_FOUND+"",_e.NAVIGATION_GUARD_REDIRECT+"",_e.NAVIGATION_ABORTED+"",_e.NAVIGATION_CANCELLED+"",_e.NAVIGATION_DUPLICATED+"";function on(e,t){return ae(new Error,{type:e,[Ri]:!0},t)}function bt(e,t){return e instanceof Error&&Ri in e&&(t==null||!!(e.type&t))}const Nu=["params","query","hash"];function $u(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Nu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Du(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const o=n[s].replace(yi," "),r=o.indexOf("="),i=On(r<0?o:o.slice(0,r)),l=r<0?null:On(o.slice(r+1));if(i in t){let a=t[i];et(a)||(a=t[i]=[a]),a.push(l)}else t[i]=l}return t}function Xo(e){let t="";for(let n in e){const s=e[n];if(n=gu(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(et(s)?s.map(o=>o&&Hs(o)):[s&&Hs(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Mu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=et(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Vu=Symbol(""),Zo=Symbol(""),ms=Symbol(""),fo=Symbol(""),Gs=Symbol("");function fn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Pt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,a)=>{const d=v=>{v===!1?a(on(_e.NAVIGATION_ABORTED,{from:n,to:t})):v instanceof Error?a(v):Pu(v)?a(on(_e.NAVIGATION_GUARD_REDIRECT,{from:t,to:v})):(i&&s.enterCallbacks[o]===i&&typeof v=="function"&&i.push(v),l())},c=r(()=>e.call(s&&s.instances[o],t,n,d));let h=Promise.resolve(c);e.length<3&&(h=h.then(d)),h.catch(v=>a(v))})}function Ts(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(_i(a)){const d=(a.__vccOpts||a)[t];d&&r.push(Pt(d,n,s,i,l,o))}else{let d=a();r.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const h=ru(c)?c.default:c;i.mods[l]=c,i.components[l]=h;const v=(h.__vccOpts||h)[t];return v&&Pt(v,n,s,i,l,o)()}))}}return r}function ju(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;i<r;i++){const l=t.matched[i];l&&(e.matched.find(d=>sn(d,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(d=>sn(d,a))||o.push(a))}return[n,s,o]}/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Uu=()=>location.protocol+"//"+location.host;function Ii(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),Jo(l,"")}return Jo(n,e)+s+o}function Lu(e,t,n,s){let o=[],r=[],i=null;const l=({state:v})=>{const x=Ii(e,location),M=n.value,P=t.value;let K=0;if(v){if(n.value=x,t.value=v,i&&i===M){i=null;return}K=P?v.position-P.position:0}else s(x);o.forEach(D=>{D(n.value,M,{delta:K,type:Bs.pop,direction:K?K>0?Os.forward:Os.back:Os.unknown})})};function a(){i=n.value}function d(v){o.push(v);const x=()=>{const M=o.indexOf(v);M>-1&&o.splice(M,1)};return r.push(x),x}function c(){if(document.visibilityState==="hidden"){const{history:v}=window;if(!v.state)return;v.replaceState(ae({},v.state,{scroll:hs()}),"")}}function h(){for(const v of r)v();r=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:a,listen:d,destroy:h}}function er(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?hs():null}}function Fu(e){const{history:t,location:n}=window,s={value:Ii(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(a,d,c){const h=e.indexOf("#"),v=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:Uu()+e+a;try{t[c?"replaceState":"pushState"](d,"",v),o.value=d}catch(x){console.error(x),n[c?"replace":"assign"](v)}}function i(a,d){r(a,ae({},t.state,er(o.value.back,a,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=a}function l(a,d){const c=ae({},o.value,t.state,{forward:a,scroll:hs()});r(c.current,c,!0),r(a,ae({},er(s.value,a,null),{position:c.position+1},d),!1),s.value=a}return{location:s,state:o,push:l,replace:i}}function Hu(e){e=Su(e);const t=Fu(e),n=Lu(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=ae({location:"",base:e,go:s,createHref:Ru.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Lt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ee=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Ee||{});const Bu={type:Lt.Static,value:""},Ku=/[a-zA-Z0-9_]/;function Gu(e){if(!e)return[[]];if(e==="/")return[[Bu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${n})/"${d}": ${x}`)}let n=Ee.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,a,d="",c="";function h(){d&&(n===Ee.Static?r.push({type:Lt.Static,value:d}):n===Ee.Param||n===Ee.ParamRegExp||n===Ee.ParamRegExpEnd?(r.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Lt.Param,value:d,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),d="")}function v(){d+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==Ee.ParamRegExp){s=n,n=Ee.EscapeNext;continue}switch(n){case Ee.Static:a==="/"?(d&&h(),i()):a===":"?(h(),n=Ee.Param):v();break;case Ee.EscapeNext:v(),n=s;break;case Ee.Param:a==="("?n=Ee.ParamRegExp:Ku.test(a)?v():(h(),n=Ee.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case Ee.ParamRegExp:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=Ee.ParamRegExpEnd:c+=a;break;case Ee.ParamRegExpEnd:h(),n=Ee.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===Ee.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),h(),i(),o}const tr="[^/]+?",qu={sensitive:!1,strict:!1,start:!0,end:!0};var De=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(De||{});const Wu=/[.+*?^${}()[\]/\\]/g;function zu(e,t){const n=ae({},qu,t),s=[];let o=n.start?"^":"";const r=[];for(const d of e){const c=d.length?[]:[De.Root];n.strict&&!d.length&&(o+="/");for(let h=0;h<d.length;h++){const v=d[h];let x=De.Segment+(n.sensitive?De.BonusCaseSensitive:0);if(v.type===Lt.Static)h||(o+="/"),o+=v.value.replace(Wu,"\\$&"),x+=De.Static;else if(v.type===Lt.Param){const{value:M,repeatable:P,optional:K,regexp:D}=v;r.push({name:M,repeatable:P,optional:K});const E=D||tr;if(E!==tr){x+=De.BonusCustomRegExp;try{`${E}`}catch(_){throw new Error(`Invalid custom RegExp for param "${M}" (${E}): `+_.message)}}let L=P?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;h||(L=K&&d.length<2?`(?:/${L})`:"/"+L),K&&(L+="?"),o+=L,x+=De.Dynamic,K&&(x+=De.BonusOptional),P&&(x+=De.BonusRepeatable),E===".*"&&(x+=De.BonusWildcard)}c.push(x)}s.push(c)}if(n.strict&&n.end){const d=s.length-1;s[d][s[d].length-1]+=De.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function l(d){const c=d.match(i),h={};if(!c)return null;for(let v=1;v<c.length;v++){const x=c[v]||"",M=r[v-1];h[M.name]=x&&M.repeatable?x.split("/"):x}return h}function a(d){let c="",h=!1;for(const v of e){(!h||!c.endsWith("/"))&&(c+="/"),h=!1;for(const x of v)if(x.type===Lt.Static)c+=x.value;else if(x.type===Lt.Param){const{value:M,repeatable:P,optional:K}=x,D=M in d?d[M]:"";if(et(D)&&!P)throw new Error(`Provided param "${M}" is an array but it is not repeatable (* or + modifiers)`);const E=et(D)?D.join("/"):D;if(!E)if(K)v.length<2&&(c.endsWith("/")?c=c.slice(0,-1):h=!0);else throw new Error(`Missing required param "${M}"`);c+=E}}return c||"/"}return{re:i,score:s,keys:r,parse:l,stringify:a}}function Ju(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===De.Static+De.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===De.Static+De.Segment?1:-1:0}function ki(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=Ju(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(nr(s))return 1;if(nr(o))return-1}return o.length-s.length}function nr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Yu={strict:!1,end:!0,sensitive:!1};function Qu(e,t,n){const s=zu(Gu(e.path),n),o=ae(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Xu(e,t){const n=[],s=new Map;t=zo(Yu,t);function o(h){return s.get(h)}function r(h,v,x){const M=!x,P=or(h);P.aliasOf=x&&x.record;const K=zo(t,h),D=[P];if("alias"in h){const _=typeof h.alias=="string"?[h.alias]:h.alias;for(const w of _)D.push(or(ae({},P,{components:x?x.record.components:P.components,path:w,aliasOf:x?x.record:P})))}let E,L;for(const _ of D){const{path:w}=_;if(v&&w[0]!=="/"){const Z=v.record.path,F=Z[Z.length-1]==="/"?"":"/";_.path=v.record.path+(w&&F+w)}if(E=Qu(_,v,K),x?x.alias.push(E):(L=L||E,L!==E&&L.alias.push(E),M&&h.name&&!rr(E)&&i(h.name)),Oi(E)&&a(E),P.children){const Z=P.children;for(let F=0;F<Z.length;F++)r(Z[F],E,x&&x.children[F])}x=x||E}return L?()=>{i(L)}:_n}function i(h){if(Ai(h)){const v=s.get(h);v&&(s.delete(h),n.splice(n.indexOf(v),1),v.children.forEach(i),v.alias.forEach(i))}else{const v=n.indexOf(h);v>-1&&(n.splice(v,1),h.record.name&&s.delete(h.record.name),h.children.forEach(i),h.alias.forEach(i))}}function l(){return n}function a(h){const v=tc(h,n);n.splice(v,0,h),h.record.name&&!rr(h)&&s.set(h.record.name,h)}function d(h,v){let x,M={},P,K;if("name"in h&&h.name){if(x=s.get(h.name),!x)throw on(_e.MATCHER_NOT_FOUND,{location:h});K=x.record.name,M=ae(sr(v.params,x.keys.filter(L=>!L.optional).concat(x.parent?x.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),h.params&&sr(h.params,x.keys.map(L=>L.name))),P=x.stringify(M)}else if(h.path!=null)P=h.path,x=n.find(L=>L.re.test(P)),x&&(M=x.parse(P),K=x.record.name);else{if(x=v.name?s.get(v.name):n.find(L=>L.re.test(v.path)),!x)throw on(_e.MATCHER_NOT_FOUND,{location:h,currentLocation:v});K=x.record.name,M=ae({},v.params,h.params),P=x.stringify(M)}const D=[];let E=x;for(;E;)D.unshift(E.record),E=E.parent;return{name:K,path:P,params:M,matched:D,meta:ec(D)}}e.forEach(h=>r(h));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:o}}function sr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function or(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Zu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Zu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function rr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ec(e){return e.reduce((t,n)=>ae(t,n.meta),{})}function tc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;ki(e,t[r])<0?s=r:n=r+1}const o=nc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function nc(e){let t=e;for(;t=t.parent;)if(Oi(t)&&ki(e,t)===0)return t}function Oi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ir(e){const t=Ye(ms),n=Ye(fo),s=ve(()=>{const a=Ve(e.to);return t.resolve(a)}),o=ve(()=>{const{matched:a}=s.value,{length:d}=a,c=a[d-1],h=n.matched;if(!c||!h.length)return-1;const v=h.findIndex(sn.bind(null,c));if(v>-1)return v;const x=lr(a[d-2]);return d>1&&lr(c)===x&&h[h.length-1].path!==x?h.findIndex(sn.bind(null,a[d-2])):v}),r=ve(()=>o.value>-1&&lc(n.params,s.value.params)),i=ve(()=>o.value>-1&&o.value===n.matched.length-1&&Si(n.params,s.value.params));function l(a={}){if(ic(a)){const d=t[Ve(e.replace)?"replace":"push"](Ve(e.to)).catch(_n);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:ve(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function sc(e){return e.length===1?e[0]:e}const oc=Kr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ir,setup(e,{slots:t}){const n=ls(ir(e)),{options:s}=Ye(ms),o=ve(()=>({[ar(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ar(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&sc(t.default(n));return e.custom?r:gi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),rc=oc;function ic(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function lc(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!et(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function lr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ar=(e,t,n)=>e??t??n,ac=Kr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ye(Gs),o=ve(()=>e.route||s.value),r=Ye(Zo,0),i=ve(()=>{let d=Ve(r);const{matched:c}=o.value;let h;for(;(h=c[d])&&!h.components;)d++;return d}),l=ve(()=>o.value.matched[i.value]);Bn(Zo,ve(()=>i.value+1)),Bn(Vu,l),Bn(Gs,o);const a=J();return Kn(()=>[a.value,l.value,e.name],([d,c,h],[v,x,M])=>{c&&(c.instances[h]=d,x&&x!==c&&d&&d===v&&(c.leaveGuards.size||(c.leaveGuards=x.leaveGuards),c.updateGuards.size||(c.updateGuards=x.updateGuards))),d&&c&&(!x||!sn(c,x)||!v)&&(c.enterCallbacks[h]||[]).forEach(P=>P(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,h=l.value,v=h&&h.components[c];if(!v)return ur(n.default,{Component:v,route:d});const x=h.props[c],M=x?x===!0?d.params:typeof x=="function"?x(d):x:null,K=gi(v,ae({},M,t,{onVnodeUnmounted:D=>{D.component.isUnmounted&&(h.instances[c]=null)},ref:a}));return ur(n.default,{Component:K,route:d})||K}}});function ur(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const uc=ac;function cc(e){const t=Xu(e.routes,e),n=e.parseQuery||Du,s=e.stringifyQuery||Xo,o=e.history,r=fn(),i=fn(),l=fn(),a=pl(Ot);let d=Ot;qt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Is.bind(null,A=>""+A),h=Is.bind(null,bu),v=Is.bind(null,On);function x(A,B){let V,G;return Ai(A)?(V=t.getRecordMatcher(A),G=B):G=A,t.addRoute(G,V)}function M(A){const B=t.getRecordMatcher(A);B&&t.removeRoute(B)}function P(){return t.getRoutes().map(A=>A.record)}function K(A){return!!t.getRecordMatcher(A)}function D(A,B){if(B=ae({},B||a.value),typeof A=="string"){const m=ks(n,A,B.path),S=t.resolve({path:m.path},B),R=o.createHref(m.fullPath);return ae(m,S,{params:v(S.params),hash:On(m.hash),redirectedFrom:void 0,href:R})}let V;if(A.path!=null)V=ae({},A,{path:ks(n,A.path,B.path).path});else{const m=ae({},A.params);for(const S in m)m[S]==null&&delete m[S];V=ae({},A,{params:h(m)}),B.params=h(B.params)}const G=t.resolve(V,B),X=A.hash||"";G.params=c(v(G.params));const f=yu(s,ae({},A,{hash:mu(X),path:G.path})),p=o.createHref(f);return ae({fullPath:f,hash:X,query:s===Xo?Mu(A.query):A.query||{}},G,{redirectedFrom:void 0,href:p})}function E(A){return typeof A=="string"?ks(n,A,a.value.path):ae({},A)}function L(A,B){if(d!==A)return on(_e.NAVIGATION_CANCELLED,{from:B,to:A})}function _(A){return F(A)}function w(A){return _(ae(E(A),{replace:!0}))}function Z(A,B){const V=A.matched[A.matched.length-1];if(V&&V.redirect){const{redirect:G}=V;let X=typeof G=="function"?G(A,B):G;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=E(X):{path:X},X.params={}),ae({query:A.query,hash:A.hash,params:X.path!=null?{}:A.params},X)}}function F(A,B){const V=d=D(A),G=a.value,X=A.state,f=A.force,p=A.replace===!0,m=Z(V,G);if(m)return F(ae(E(m),{state:typeof m=="object"?ae({},X,m.state):X,force:f,replace:p}),B||V);const S=V;S.redirectedFrom=B;let R;return!f&&wu(s,G,V)&&(R=on(_e.NAVIGATION_DUPLICATED,{to:S,from:G}),Be(G,G,!0,!1)),(R?Promise.resolve(R):Ue(S,G)).catch(C=>bt(C)?bt(C,_e.NAVIGATION_GUARD_REDIRECT)?C:He(C):te(C,S,G)).then(C=>{if(C){if(bt(C,_e.NAVIGATION_GUARD_REDIRECT))return F(ae({replace:p},E(C.to),{state:typeof C.to=="object"?ae({},X,C.to.state):X,force:f}),B||S)}else C=ht(S,G,!0,p,X);return tt(S,G,C),C})}function H(A,B){const V=L(A,B);return V?Promise.reject(V):Promise.resolve()}function Ce(A){const B=Ke.values().next().value;return B&&typeof B.runWithContext=="function"?B.runWithContext(A):A()}function Ue(A,B){let V;const[G,X,f]=ju(A,B);V=Ts(G.reverse(),"beforeRouteLeave",A,B);for(const m of G)m.leaveGuards.forEach(S=>{V.push(Pt(S,A,B))});const p=H.bind(null,A,B);return V.push(p),Le(V).then(()=>{V=[];for(const m of r.list())V.push(Pt(m,A,B));return V.push(p),Le(V)}).then(()=>{V=Ts(X,"beforeRouteUpdate",A,B);for(const m of X)m.updateGuards.forEach(S=>{V.push(Pt(S,A,B))});return V.push(p),Le(V)}).then(()=>{V=[];for(const m of f)if(m.beforeEnter)if(et(m.beforeEnter))for(const S of m.beforeEnter)V.push(Pt(S,A,B));else V.push(Pt(m.beforeEnter,A,B));return V.push(p),Le(V)}).then(()=>(A.matched.forEach(m=>m.enterCallbacks={}),V=Ts(f,"beforeRouteEnter",A,B,Ce),V.push(p),Le(V))).then(()=>{V=[];for(const m of i.list())V.push(Pt(m,A,B));return V.push(p),Le(V)}).catch(m=>bt(m,_e.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function tt(A,B,V){l.list().forEach(G=>Ce(()=>G(A,B,V)))}function ht(A,B,V,G,X){const f=L(A,B);if(f)return f;const p=B===Ot,m=qt?history.state:{};V&&(G||p?o.replace(A.fullPath,ae({scroll:p&&m&&m.scroll},X)):o.push(A.fullPath,X)),a.value=A,Be(A,B,V,p),He()}let We;function Dt(){We||(We=o.listen((A,B,V)=>{if(!gt.listening)return;const G=D(A),X=Z(G,gt.currentRoute.value);if(X){F(ae(X,{replace:!0,force:!0}),G).catch(_n);return}d=G;const f=a.value;qt&&Ou(Qo(f.fullPath,V.delta),hs()),Ue(G,f).catch(p=>bt(p,_e.NAVIGATION_ABORTED|_e.NAVIGATION_CANCELLED)?p:bt(p,_e.NAVIGATION_GUARD_REDIRECT)?(F(ae(E(p.to),{force:!0}),G).then(m=>{bt(m,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&!V.delta&&V.type===Bs.pop&&o.go(-1,!1)}).catch(_n),Promise.reject()):(V.delta&&o.go(-V.delta,!1),te(p,G,f))).then(p=>{p=p||ht(G,f,!1),p&&(V.delta&&!bt(p,_e.NAVIGATION_CANCELLED)?o.go(-V.delta,!1):V.type===Bs.pop&&bt(p,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),tt(G,f,p)}).catch(_n)}))}let kt=fn(),ye=fn(),re;function te(A,B,V){He(A);const G=ye.list();return G.length?G.forEach(X=>X(A,B,V)):console.error(A),Promise.reject(A)}function ee(){return re&&a.value!==Ot?Promise.resolve():new Promise((A,B)=>{kt.add([A,B])})}function He(A){return re||(re=!A,Dt(),kt.list().forEach(([B,V])=>A?V(A):B()),kt.reset()),A}function Be(A,B,V,G){const{scrollBehavior:X}=e;if(!qt||!X)return Promise.resolve();const f=!V&&Tu(Qo(A.fullPath,0))||(G||!V)&&history.state&&history.state.scroll||null;return so().then(()=>X(A,B,f)).then(p=>p&&ku(p)).catch(p=>te(p,A,B))}const Oe=A=>o.go(A);let mt;const Ke=new Set,gt={currentRoute:a,listening:!0,addRoute:x,removeRoute:M,clearRoutes:t.clearRoutes,hasRoute:K,getRoutes:P,resolve:D,options:e,push:_,replace:w,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:ye.add,isReady:ee,install(A){A.component("RouterLink",rc),A.component("RouterView",uc),A.config.globalProperties.$router=gt,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>Ve(a)}),qt&&!mt&&a.value===Ot&&(mt=!0,_(o.location).catch(G=>{}));const B={};for(const G in Ot)Object.defineProperty(B,G,{get:()=>a.value[G],enumerable:!0});A.provide(ms,gt),A.provide(fo,Nr(B)),A.provide(Gs,a);const V=A.unmount;Ke.add(A),A.unmount=function(){Ke.delete(A),Ke.size<1&&(d=Ot,We&&We(),We=null,a.value=Ot,mt=!1,re=!1),V()}}};function Le(A){return A.reduce((B,V)=>B.then(()=>Ce(V)),Promise.resolve())}return gt}function Ti(){return Ye(ms)}function Pi(e){return Ye(fo)}const Ln=window.location.pathname.startsWith("/portal/"),Ct={esPortal:Ln,baseRuta:Ln?"/portal/studio/":"/studio/",apiBase:Ln?"/portal":"/app",urlLogin:Ln?"/portal/login":"/login"};function ie(e){return Ct.apiBase+e}async function Fn(e,t={}){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t.headers}}),s=n.headers.get("content-type")||"";if(n.redirected||!s.includes("application/json"))throw window.location.href=Ct.urlLogin,new Error("Sesión expirada");const o=await n.json();if(!n.ok){const r=typeof(o==null?void 0:o.error)=="string"?o.error:o==null?void 0:o.message;throw new Error(r||"Error de servidor")}return o}const oe={get:e=>Fn(e),post:(e,t)=>Fn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Fn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Fn(e,{method:"DELETE"})},fc={class:"w-64 shrink-0 h-screen sticky top-0 flex flex-col border-r border-borde bg-superficie"},dc={class:"h-14 px-4 flex items-center border-b border-borde"},pc={key:0,class:"px-3 pt-3"},hc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},mc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},gc={key:0,class:"px-2 text-xs text-tenue"},vc={key:1,class:"px-2 text-xs text-tenue"},bc={class:"truncate"},_c={class:"flex items-center gap-1 mt-0.5"},xc={class:"text-[11px] text-tenue"},yc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},wc=["onClick"],Cc=["onClick"],Ec={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Sc={class:"font-semibold text-texto mb-4"},Ac={key:0,class:"grid grid-cols-2 gap-3"},Rc=["value"],Ic=["value"],kc={class:"flex items-center gap-2 text-sm text-texto"},Oc={class:"flex justify-end gap-2 pt-2"},Tc={__name:"Sidebar",setup(e,{expose:t}){const n=Pi(),s=Ti(),o=J([]),r=J([]),i=J([]),l=J(!0),a=J(""),d=J(!1),c=J(null),h=J(x()),v=ve(()=>n.params.tenantId||n.params.id);function x(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function M(){l.value=!0,a.value="";try{const _=await oe.get(ie("/umind/tenants"));o.value=_.items||[]}catch(_){a.value=_.message}finally{l.value=!1}}async function P(){if(!Ct.esPortal)try{const[_,w]=await Promise.all([oe.get("/app/api/clientes/select"),oe.get("/app/umind-planes/list")]);r.value=_.registros||_.items||[],i.value=w.items||[]}catch{r.value=[],i.value=[]}}function K(){c.value=null,h.value=x(),d.value=!0}function D(_){c.value=_,h.value={nombre:_.nombre,dominios_permitidos:_.dominios_permitidos,activo:_.activo,cliente_id:_.cliente_id??null,plan_id:_.plan_id??null},d.value=!0}async function E(){const _={...h.value,dominios_permitidos:h.value.dominios_permitidos.split(",").map(w=>w.trim()).filter(Boolean)};try{if(c.value)await oe.put(ie(`/umind/tenants/${c.value.ID}`),_),d.value=!1,await M();else{const w=await oe.post(ie("/umind/tenants"),_);d.value=!1,await M(),s.push(`/tenants/${w.id}`)}}catch(w){a.value=w.message}}async function L(_){confirm(`¿Eliminar el tenant "${_.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await oe.del(ie(`/umind/tenants/${_.ID}`)),v.value===String(_.ID)&&s.push("/"),await M())}return t({recargar:M}),Nn(()=>{M(),P()}),(_,w)=>{const Z=$n("router-link");return k(),O(le,null,[u("aside",fc,[u("div",dc,[be(Z,{to:"/",class:"text-base font-semibold text-texto"},{default:$t(()=>[...w[7]||(w[7]=[we(" uMind ",-1),u("span",{class:"text-brand"},"Studio",-1)])]),_:1})]),Ve(Ct).esPortal?Q("",!0):(k(),O("div",pc,[u("button",{class:"btn-primary w-full",onClick:K}," + Nuevo tenant ")])),a.value?(k(),O("p",hc,j(a.value),1)):Q("",!0),u("nav",mc,[l.value?(k(),O("p",gc,"Cargando...")):o.value.length===0?(k(),O("p",vc,j(Ve(Ct).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin tenants todavía."),1)):Q("",!0),(k(!0),O(le,null,Ae(o.value,F=>(k(),O("div",{key:F.ID,class:Re(["group flex items-center rounded-lg transition-colors",v.value===String(F.ID)?"bg-brand/10":"hover:bg-elevado"])},[be(Z,{to:`/tenants/${F.ID}`,class:Re(["flex-1 min-w-0 px-2.5 py-2 text-sm",v.value===String(F.ID)?"text-brand font-medium":"text-texto"])},{default:$t(()=>[u("div",bc,j(F.nombre),1),u("div",_c,[u("span",{class:Re(["w-1.5 h-1.5 rounded-full",F.activo?"bg-green-500":"bg-tenue/40"])},null,2),u("span",xc,j(F.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Ve(Ct).esPortal?Q("",!0):(k(),O("div",yc,[u("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:H=>D(F)}," ✎ ",8,wc),u("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:H=>L(F)}," ✕ ",8,Cc)]))],2))),128))])]),d.value?(k(),O("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:w[6]||(w[6]=ut(F=>d.value=!1,["self"]))},[u("div",Ec,[u("h2",Sc,j(c.value?"Editar tenant":"Nuevo tenant"),1),w[18]||(w[18]=u("p",{class:"text-xs text-tenue mb-3"}," Un tenant es el negocio/sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),u("form",{class:"space-y-3",onSubmit:ut(E,["prevent"])},[u("div",null,[w[8]||(w[8]=u("label",{class:"label"},"Nombre",-1)),se(u("input",{"onUpdate:modelValue":w[0]||(w[0]=F=>h.value.nombre=F),required:"",class:"input"},null,512),[[ge,h.value.nombre]])]),u("div",null,[w[9]||(w[9]=u("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),se(u("input",{"onUpdate:modelValue":w[1]||(w[1]=F=>h.value.dominios_permitidos=F),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[ge,h.value.dominios_permitidos]])]),r.value.length?(k(),O("div",Ac,[u("div",null,[w[11]||(w[11]=u("label",{class:"label"},"Cliente",-1)),se(u("select",{"onUpdate:modelValue":w[2]||(w[2]=F=>h.value.cliente_id=F),class:"input"},[w[10]||(w[10]=u("option",{value:null},"— sin asignar —",-1)),(k(!0),O(le,null,Ae(r.value,F=>(k(),O("option",{key:F.ID,value:F.ID},j(F.nombre),9,Rc))),128))],512),[[In,h.value.cliente_id]]),w[12]||(w[12]=u("p",{class:"text-[11px] text-tenue mt-1"},"Define quién ve este tenant desde el portal.",-1))]),u("div",null,[w[14]||(w[14]=u("label",{class:"label"},"Plan",-1)),se(u("select",{"onUpdate:modelValue":w[3]||(w[3]=F=>h.value.plan_id=F),class:"input"},[w[13]||(w[13]=u("option",{value:null},"— sin plan —",-1)),(k(!0),O(le,null,Ae(i.value,F=>(k(),O("option",{key:F.ID,value:F.ID},j(F.nombre)+" ("+j(F.max_agentes===0?"∞":F.max_agentes)+" agentes) ",9,Ic))),128))],512),[[In,h.value.plan_id]]),w[15]||(w[15]=u("p",{class:"text-[11px] text-tenue mt-1"},"Límite de agentes y precios de consumo.",-1))])])):Q("",!0),u("label",kc,[se(u("input",{"onUpdate:modelValue":w[4]||(w[4]=F=>h.value.activo=F),type:"checkbox"},null,512),[[Ut,h.value.activo]]),w[16]||(w[16]=we(" Activo ",-1))]),u("div",Oc,[u("button",{type:"button",class:"btn-ghost",onClick:w[5]||(w[5]=F=>d.value=!1)}," Cancelar "),w[17]||(w[17]=u("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):Q("",!0)],64)}}},Ni="umind-tema";function Pc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const Xt=J(localStorage.getItem(Ni)||Pc());function $i(){document.documentElement.classList.toggle("dark",Xt.value==="oscuro")}function cr(){Xt.value=Xt.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Ni,Xt.value),$i()}$i();const Nc={class:"min-h-screen flex"},$c={class:"flex-1 min-w-0 flex flex-col"},Dc={class:"h-14 shrink-0 flex items-center justify-end gap-1 px-6 border-b border-borde"},Mc=["title"],Vc={class:"text-base leading-none"},jc={class:"flex-1 max-w-5xl w-full mx-auto px-8 py-8 animate-aparecer"},Uc={__name:"App",setup(e){return(t,n)=>{const s=$n("router-view");return k(),O("div",Nc,[be(Tc),u("main",$c,[u("header",Dc,[u("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Ve(Xt)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[0]||(n[0]=(...o)=>Ve(cr)&&Ve(cr)(...o))},[u("span",Vc,j(Ve(Xt)==="oscuro"?"☀️":"🌙"),1)],8,Mc)]),u("div",jc,[be(s)])])])}}},Lc={class:"flex flex-col items-center justify-center text-center py-24"},Fc={class:"text-lg font-medium text-gray-700 dark:text-gray-200"},Hc={class:"text-sm text-gray-400 dark:text-gray-500 mt-1"},Bc={__name:"Home",setup(e){return(t,n)=>(k(),O("div",Lc,[n[0]||(n[0]=u("div",{class:"text-4xl mb-4"},"💬",-1)),u("h1",Fc,j(Ve(Ct).esPortal?"Elegí tu espacio de la izquierda":"Elegí un tenant de la izquierda"),1),u("p",Hc,j(Ve(Ct).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},Kc={class:"flex flex-col items-center justify-center text-center py-12 px-6"},Gc={key:0,class:"text-3xl mb-3 opacity-70"},qc={class:"text-sm font-medium text-texto"},Wc={key:1,class:"text-xs text-tenue mt-1 max-w-sm"},zc={class:"mt-4"},Di={__name:"UiEmptyState",props:{icono:{type:String,default:""},titulo:String,detalle:String},setup(e){return(t,n)=>(k(),O("div",Kc,[e.icono?(k(),O("div",Gc,j(e.icono),1)):Q("",!0),u("p",qc,j(e.titulo),1),e.detalle?(k(),O("p",Wc,j(e.detalle),1)):Q("",!0),u("div",zc,[Hl(t.$slots,"default")])]))}},Jc={key:0,class:"mb-6"},Yc={class:"flex items-start justify-between gap-4"},Qc={class:"text-xl font-semibold text-texto"},Xc={class:"text-xs text-tenue mt-1"},Zc={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},ef={class:"card divide-y divide-borde overflow-hidden"},tf={class:"font-medium text-texto"},nf={class:"flex items-center gap-1 mt-0.5"},sf={class:"text-xs text-tenue"},of={class:"flex items-center gap-3 pr-4 text-sm"},rf=["onClick"],lf=["onClick"],af={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg"},uf={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},cf=["value"],ff={class:"flex items-center gap-2"},df={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},pf={class:"flex justify-end gap-2 pt-2"},hf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},mf={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=ve(()=>Number(t.id)),s=Ti(),o=J(null),r=J([]),i=J([]),l=J(""),a=J(!1),d=J(null),c=J(h());function h(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0}}async function v(){l.value="";try{const[D,E,L]=await Promise.all([oe.get(ie("/umind/tenants")),oe.get(ie(`/umind/agentes?tenant_id=${t.id}`)),oe.get(ie("/umind/ai-configs"))]);o.value=(D.items||[]).find(_=>String(_.ID)===t.id)||null,r.value=E.items||[],i.value=L.items||[]}catch(D){l.value=D.message}}function x(){d.value=null,c.value=h(),a.value=!0}function M(D){d.value=D,c.value={nombre:D.nombre,ai_config_id:D.ai_config_id,tono:D.tono,mensaje_bienvenida:D.mensaje_bienvenida,color:D.color||"#8eb02f",activo:D.activo},a.value=!0}async function P(){try{if(d.value)await oe.put(ie(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),a.value=!1,await v();else{const D=await oe.post(ie("/umind/agentes"),{tenant_id:n.value,...c.value});a.value=!1,s.push(`/tenants/${n.value}/agentes/${D.id}`)}}catch(D){l.value=D.message}}async function K(D){confirm(`¿Eliminar el agente "${D.nombre}"? Esto no se puede deshacer.`)&&(await oe.del(ie(`/umind/agentes/${D.ID}`)),await v())}return Nn(v),(D,E)=>{const L=$n("router-link");return k(),O("div",null,[o.value?(k(),O("div",Jc,[u("div",Yc,[u("div",null,[u("h1",Qc,j(o.value.nombre),1),u("p",Xc,j(o.value.dominios_permitidos||"sin dominios configurados"),1)]),be(L,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost"},{default:$t(()=>[...E[9]||(E[9]=[we("📊 Consumo",-1)])]),_:1},8,["to"])])])):Q("",!0),l.value?(k(),O("p",Zc,j(l.value),1)):Q("",!0),u("div",{class:"flex items-center justify-between mb-4"},[E[10]||(E[10]=u("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),u("button",{class:"btn-primary",onClick:x},"+ Nuevo agente")]),u("div",ef,[r.value.length===0?(k(),En(Di,{key:0,icono:"🤖",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."})):Q("",!0),(k(!0),O(le,null,Ae(r.value,_=>(k(),O("div",{key:_.ID,class:"group flex items-center justify-between hover:bg-elevado transition-colors"},[be(L,{to:`/tenants/${n.value}/agentes/${_.ID}`,class:"flex-1 min-w-0 p-4"},{default:$t(()=>[u("div",tf,j(_.nombre),1),u("div",nf,[u("span",{class:Re(["w-1.5 h-1.5 rounded-full",!_.activo&&"bg-gray-300 dark:bg-gray-600"]),style:Zt({background:_.activo?_.color||"#22c55e":void 0})},null,6),u("span",sf,j(_.activo?"activo":"inactivo"),1)])]),_:2},1032,["to"]),u("div",of,[be(L,{to:`/tenants/${n.value}/agentes/${_.ID}`,class:"text-brand font-medium opacity-0 group-hover:opacity-100 transition-opacity"},{default:$t(()=>[...E[11]||(E[11]=[we(" Configurar → ",-1)])]),_:1},8,["to"]),u("button",{class:"text-tenue hover:text-texto opacity-0 group-hover:opacity-100 transition-opacity",title:"Editar",onClick:w=>M(_)},"✎",8,rf),u("button",{class:"text-tenue hover:text-red-600 opacity-0 group-hover:opacity-100 transition-opacity",title:"Eliminar",onClick:w=>K(_)},"✕",8,lf)])]))),128))]),a.value?(k(),O("div",{key:2,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:E[8]||(E[8]=ut(_=>a.value=!1,["self"]))},[u("div",af,[u("h2",uf,j(d.value?"Editar agente":"Nuevo agente"),1),u("form",{class:"space-y-3",onSubmit:ut(P,["prevent"])},[u("div",null,[E[12]||(E[12]=u("label",{class:"label"},"Nombre",-1)),se(u("input",{"onUpdate:modelValue":E[0]||(E[0]=_=>c.value.nombre=_),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[ge,c.value.nombre]])]),u("div",null,[E[14]||(E[14]=u("label",{class:"label"},"Config de IA",-1)),se(u("select",{"onUpdate:modelValue":E[1]||(E[1]=_=>c.value.ai_config_id=_),class:"input"},[E[13]||(E[13]=u("option",{value:null},"— sin asignar —",-1)),(k(!0),O(le,null,Ae(i.value,_=>(k(),O("option",{key:_.ID,value:_.ID},j(_.nombre)+" ("+j(_.provider)+")",9,cf))),128))],512),[[In,c.value.ai_config_id]])]),u("div",null,[E[15]||(E[15]=u("label",{class:"label"},"Tono / personalidad",-1)),se(u("textarea",{"onUpdate:modelValue":E[2]||(E[2]=_=>c.value.tono=_),rows:"2",class:"input"},null,512),[[ge,c.value.tono]])]),u("div",null,[E[16]||(E[16]=u("label",{class:"label"},"Mensaje de bienvenida",-1)),se(u("input",{"onUpdate:modelValue":E[3]||(E[3]=_=>c.value.mensaje_bienvenida=_),class:"input"},null,512),[[ge,c.value.mensaje_bienvenida]])]),u("div",null,[E[17]||(E[17]=u("label",{class:"label"},"Color del widget",-1)),u("div",ff,[se(u("input",{"onUpdate:modelValue":E[4]||(E[4]=_=>c.value.color=_),type:"color",class:"w-10 h-9 border border-gray-300 dark:border-gray-700 rounded cursor-pointer bg-white dark:bg-gray-800"},null,512),[[ge,c.value.color]]),se(u("input",{"onUpdate:modelValue":E[5]||(E[5]=_=>c.value.color=_),type:"text",pattern:"#[0-9a-fA-F]{6}",class:"flex-1 border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 rounded-lg px-3 py-2 text-sm font-mono"},null,512),[[ge,c.value.color]])])]),u("label",df,[se(u("input",{"onUpdate:modelValue":E[6]||(E[6]=_=>c.value.activo=_),type:"checkbox"},null,512),[[Ut,c.value.activo]]),E[18]||(E[18]=we(" Activo ",-1))]),u("div",pf,[u("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:E[7]||(E[7]=_=>a.value=!1)},"Cancelar"),u("button",hf,j(d.value?"Guardar":"Crear"),1)])],32)])])):Q("",!0)])}}},gf={key:0,class:"mb-6 mt-1"},vf={class:"text-xl font-semibold text-texto"},bf={class:"text-xs text-tenue mt-1"},_f={class:"bg-elevado px-1.5 py-0.5 rounded"},xf={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},yf={class:"flex gap-1.5 mb-6 overflow-x-auto pb-1"},wf=["onClick"],Cf={key:2},Ef=["disabled"],Sf={class:"card divide-y divide-borde"},Af={key:0,class:"p-6 text-sm text-tenue"},Rf={class:"text-sm text-texto"},If={class:"text-xs text-tenue mt-0.5"},kf={key:0},Of={key:1,class:"text-red-600 dark:text-red-400"},Tf=["onClick"],Pf={key:3},Nf={class:"card divide-y divide-borde"},$f={key:0,class:"p-6 text-sm text-tenue"},Df={class:"text-sm text-texto font-mono"},Mf={class:"label mt-0.5"},Vf={class:"text-xs text-tenue mt-0.5"},jf={key:0,class:"ml-1 text-green-600 dark:text-green-400"},Uf={key:1,class:"ml-1 text-gray-400"},Lf={class:"flex gap-3 text-sm shrink-0"},Ff=["onClick"],Hf=["onClick"],Bf={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},Kf={class:"font-semibold text-texto mb-4"},Gf={class:"border border-borde rounded-lg p-3 space-y-2"},qf=["onUpdate:modelValue"],Wf=["onUpdate:modelValue"],zf=["onUpdate:modelValue"],Jf={class:"label flex items-center gap-1"},Yf=["onUpdate:modelValue"],Qf=["onClick"],Xf={key:0,class:"text-xs text-gray-400"},Zf={class:"border border-borde rounded-lg p-3 space-y-2"},ed={class:"flex items-center gap-2 label"},td={class:"flex items-center gap-2 text-sm text-texto"},nd={class:"flex justify-end gap-2 pt-2"},sd={key:4},od={class:"card p-4 mb-4"},rd={class:"flex items-center justify-between mb-2"},id={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},ld={class:"card divide-y divide-borde"},ad={key:0,class:"p-6 text-sm text-tenue"},ud={class:"flex items-center justify-between"},cd={class:"font-medium text-texto capitalize"},fd={class:"flex gap-3 text-sm"},dd=["onClick"],pd=["onClick"],hd={class:"flex gap-4 mt-2 text-xs"},md={class:"flex items-center gap-1.5 text-texto cursor-pointer"},gd=["checked","onChange"],vd={class:"flex items-center gap-1.5 text-texto cursor-pointer"},bd=["checked","onChange"],_d={class:"label mt-1 break-all"},xd={class:"bg-elevado px-1 rounded"},yd={key:0,class:"text-xs text-tenue mt-1"},wd={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Cd={class:"card p-6 w-full max-w-md"},Ed={key:0},Sd={class:"flex flex-col gap-2 pt-1"},Ad={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Rd={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Id={class:"flex justify-end gap-2 pt-2"},kd={key:5},Od={class:"flex gap-2 mb-4"},Td={class:"card divide-y divide-borde"},Pd={key:0,class:"p-6 text-sm text-tenue"},Nd={class:"font-medium text-texto capitalize"},$d={class:"ml-2 text-sm text-tenue"},Dd=["onClick"],Md={key:6,class:"card p-4 flex flex-col h-[28rem]"},Vd={class:"flex-1 overflow-y-auto space-y-2 mb-3"},jd={key:0,class:"text-sm text-tenue"},Ud={key:1,class:"text-xs text-tenue"},Ld=["disabled"],Fd={key:7,class:"grid grid-cols-3 gap-4"},Hd={class:"col-span-1 card divide-y divide-borde max-h-[28rem] overflow-y-auto"},Bd={key:0,class:"p-4 text-sm text-tenue"},Kd=["onClick"],Gd={class:"text-texto truncate"},qd={class:"text-xs text-tenue mt-0.5"},Wd={class:"col-span-2 card p-4 max-h-[28rem] overflow-y-auto space-y-2"},zd={key:0,class:"text-sm text-tenue"},Jd={key:8},Yd={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},Qd={key:0,class:"p-6 text-sm text-tenue"},Xd={class:"cursor-pointer flex items-center gap-2 text-sm"},Zd={class:"text-tenue text-xs shrink-0"},ep={class:"text-texto truncate"},tp={class:"text-tenue text-xs ml-auto shrink-0"},np={key:0,class:"mt-2 bg-elevado border border-borde rounded-lg p-2 text-xs text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap"},sp={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=ve(()=>Number(t.agenteId)),s=Pi(),o=J(null),r=J(""),i=J(typeof s.query.tab=="string"?s.query.tab:"conocimiento"),l=J([]),a=J(""),d=J(30),c=J(!1);async function h(){const y=await oe.get(ie(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(y.items||[]).find(g=>String(g.ID)===t.agenteId)||null}async function v(){const y=await oe.get(ie(`/umind/documentos?agente_id=${t.agenteId}`));l.value=y.items||[]}async function x(){if(a.value.trim()){c.value=!0,r.value="";try{await oe.post(ie("/umind/documentos"),{agente_id:n.value,url:a.value.trim(),max_paginas:Number(d.value)||30}),a.value="",await v()}catch(y){r.value=y.message}finally{c.value=!1}}}async function M(y){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await oe.del(ie(`/umind/documentos/${y}`)),await v())}const P=ve(()=>y=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[y]||"badge-neutro"),K=J([]),D=J([]),E=J(null);async function L(){const y=await oe.get(ie(`/umind/sesiones?agente_id=${t.agenteId}`));K.value=y.items||[]}async function _(y){E.value=y;const g=await oe.get(ie(`/umind/historial?agente_id=${t.agenteId}&session_id=${y}`));D.value=g.items||[]}const w=J([]),Z=J(!1),F=J(null),H=J(Ce());function Ce(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}async function Ue(){const y=await oe.get(ie(`/umind/tools?agente_id=${t.agenteId}`));w.value=y.items||[]}function tt(){F.value=null,H.value=Ce(),Z.value=!0}function ht(y){F.value=y;let g=[];try{g=JSON.parse(y.parametros_json||"[]")||[]}catch{g=[]}H.value={nombre:y.nombre,descripcion:y.descripcion,url:y.url,auth_header_nombre:y.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:g,activa:y.activa},Z.value=!0}function We(){H.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function Dt(y){H.value.parametros.splice(y,1)}async function kt(){const y={agente_id:n.value,nombre:H.value.nombre.trim(),descripcion:H.value.descripcion,url:H.value.url.trim(),auth_header_nombre:H.value.auth_header_nombre,parametros:H.value.parametros,activa:H.value.activa};H.value.tocarAuth&&(y.auth_header_valor=H.value.auth_header_valor);try{F.value?await oe.put(ie(`/umind/tools/${F.value.ID}`),y):await oe.post(ie("/umind/tools"),y),Z.value=!1,await Ue()}catch(g){r.value=g.message}}async function ye(y){confirm(`¿Eliminar la tool "${y.nombre}"?`)&&(await oe.del(ie(`/umind/tools/${y.ID}`)),await Ue())}const re=J([]),te=J(!1),ee=J(mt()),He=J(!1),Be=ve(()=>{var g;const y=((g=o.value)==null?void 0:g.site_key)||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${y}" defer><\/script>`});async function Oe(){try{await navigator.clipboard.writeText(Be.value),He.value=!0,setTimeout(()=>He.value=!1,2e3)}catch{r.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function mt(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1}}async function Ke(){const y=await oe.get(ie(`/umind/canales?agente_id=${t.agenteId}`));re.value=y.items||[]}function gt(){ee.value=mt(),te.value=!0}async function Le(){const y=ee.value.tipo==="telegram"?{bot_token:ee.value.bot_token}:{phone_number_id:ee.value.phone_number_id,access_token:ee.value.access_token,app_secret:ee.value.app_secret,verify_token:ee.value.verify_token};try{await oe.post(ie("/umind/canales"),{agente_id:n.value,tipo:ee.value.tipo,credenciales:y,activo:!0,usar_whisper_audio:ee.value.usar_whisper_audio,usar_ocr_imagenes:ee.value.usar_ocr_imagenes}),te.value=!1,await Ke()}catch(g){r.value=g.message}}async function A(y){await oe.put(ie(`/umind/canales/${y.ID}`),{activo:!y.activo,credenciales:{},usar_whisper_audio:y.usar_whisper_audio,usar_ocr_imagenes:y.usar_ocr_imagenes}),await Ke()}async function B(y){await oe.put(ie(`/umind/canales/${y.ID}`),{activo:y.activo,credenciales:{},usar_whisper_audio:!y.usar_whisper_audio,usar_ocr_imagenes:y.usar_ocr_imagenes}),await Ke()}async function V(y){await oe.put(ie(`/umind/canales/${y.ID}`),{activo:y.activo,credenciales:{},usar_whisper_audio:y.usar_whisper_audio,usar_ocr_imagenes:!y.usar_ocr_imagenes}),await Ke()}async function G(y){confirm(`¿Eliminar el canal ${y.tipo}?`)&&(await oe.del(ie(`/umind/canales/${y.ID}`)),await Ke())}const X=J([]);async function f(){const y=await oe.get(ie(`/umind/conexiones?agente_id=${t.agenteId}`));X.value=y.items||[]}function p(y){window.location.href=ie(`/umind/conexiones/conectar?agente_id=${n.value}&proveedor=${y}`)}async function m(y){confirm(`¿Desconectar la cuenta ${y.email||y.proveedor}?`)&&(await oe.del(ie(`/umind/conexiones/${y.ID}`)),await f())}const S=`staff-preview-${Math.random().toString(36).slice(2)}`,R=J([]),C=J(""),$=J(!1);async function N(){const y=C.value.trim();if(!(!y||$.value)){C.value="",R.value.push({role:"user",content:y}),$.value=!0;try{const g=await oe.post(ie("/umind/chat"),{agente_id:n.value,session_id:S,mensaje:y});R.value.push({role:"assistant",content:g.respuesta})}catch(g){R.value.push({role:"assistant",content:`⚠️ ${g.message}`})}finally{$.value=!1}}}const T=[["conocimiento","Base de conocimiento"],["herramientas","Herramientas"],["canales","Canales"],["conexiones","Conexiones"],["chat","Chat de prueba"],["conversaciones","Conversaciones"],["auditoria","Auditoría"]],I=J([]);async function W(){const y=await oe.get(ie(`/umind/eventos?agente_id=${t.agenteId}`));I.value=y.items||[]}const U=ve(()=>y=>({error:"badge-error",warn:"badge-alerta"})[y]||"badge-neutro");function q(y){try{return new Date(y).toLocaleString()}catch{return y}}return Nn(async()=>{try{await Promise.all([h(),v(),L(),Ue(),Ke(),f(),W()])}catch(y){r.value=y.message}}),(y,g)=>{const fe=$n("router-link");return k(),O("div",null,[be(fe,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:$t(()=>[...g[24]||(g[24]=[we("← Agentes",-1)])]),_:1},8,["to"]),o.value?(k(),O("div",gf,[u("h1",vf,j(o.value.nombre),1),u("p",bf,[g[25]||(g[25]=we(" site_key: ",-1)),u("code",_f,j(o.value.site_key),1)])])):Q("",!0),r.value?(k(),O("p",xf,j(r.value),1)):Q("",!0),u("div",yf,[(k(),O(le,null,Ae(T,([b,ne])=>u("button",{key:b,class:Re(["px-3 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",i.value===b?"bg-brand text-white font-medium":"bg-white dark:bg-gray-900 text-gray-600 dark:text-gray-400 border border-borde hover:border-brand/50"]),onClick:pe=>i.value=b},j(ne),11,wf)),64))]),i.value==="conocimiento"?(k(),O("div",Cf,[u("form",{class:"flex gap-2 mb-4",onSubmit:ut(x,["prevent"])},[se(u("input",{"onUpdate:modelValue":g[0]||(g[0]=b=>a.value=b),type:"url",placeholder:"https://ejemplo.com",required:"",class:"flex-1 border border-borde bg-white dark:bg-gray-900 text-texto rounded-lg px-3 py-2 text-sm"},null,512),[[ge,a.value]]),se(u("input",{"onUpdate:modelValue":g[1]||(g[1]=b=>d.value=b),type:"number",min:"1",max:"200",class:"w-24 border border-borde bg-white dark:bg-gray-900 text-texto rounded-lg px-3 py-2 text-sm",title:"Máximo de páginas a crawlear"},null,512),[[ge,d.value]]),u("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50 transition-colors"},j(c.value?"Agregando...":"Crawlear sitio"),9,Ef)],32),u("div",Sf,[l.value.length===0?(k(),O("div",Af,"Sin fuentes todavía.")):Q("",!0),(k(!0),O(le,null,Ae(l.value,b=>(k(),O("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("div",Rf,j(b.origen),1),u("div",If,[u("span",{class:Re(["px-1.5 py-0.5 rounded",P.value(b.estado)])},j(b.estado),3),b.total_chunks?(k(),O("span",kf," · "+j(b.total_chunks)+" fragmentos",1)):Q("",!0),b.error?(k(),O("span",Of," · "+j(b.error),1)):Q("",!0)])]),u("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:ne=>M(b.ID)},"Eliminar",8,Tf)]))),128))])])):i.value==="herramientas"?(k(),O("div",Pf,[u("div",{class:"flex justify-between items-center mb-4"},[g[26]||(g[26]=u("p",{class:"label"},"Máximo 10 tools activas por agente.",-1)),u("button",{class:"btn-primary",onClick:tt}," + Nueva tool ")]),u("div",Nf,[w.value.length===0?(k(),O("div",$f,"Sin tools custom todavía.")):Q("",!0),(k(!0),O(le,null,Ae(w.value,b=>(k(),O("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("div",Df,j(b.nombre),1),u("div",Mf,j(b.descripcion),1),u("div",Vf,[we(j(b.url)+" ",1),b.auth_configurado?(k(),O("span",jf,"· auth configurada")):Q("",!0),b.activa?Q("",!0):(k(),O("span",Uf,"· inactiva"))])]),u("div",Lf,[u("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:ne=>ht(b)},"Editar",8,Ff),u("button",{class:"text-red-500 hover:text-red-700",onClick:ne=>ye(b)},"Eliminar",8,Hf)])]))),128))]),Z.value?(k(),O("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:g[10]||(g[10]=ut(b=>Z.value=!1,["self"]))},[u("div",Bf,[u("h2",Kf,j(F.value?"Editar tool":"Nueva tool"),1),u("form",{class:"space-y-3",onSubmit:ut(kt,["prevent"])},[u("div",null,[g[27]||(g[27]=u("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),se(u("input",{"onUpdate:modelValue":g[2]||(g[2]=b=>H.value.nombre=b),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[ge,H.value.nombre]])]),u("div",null,[g[28]||(g[28]=u("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),se(u("textarea",{"onUpdate:modelValue":g[3]||(g[3]=b=>H.value.descripcion=b),rows:"2",required:"",class:"input"},null,512),[[ge,H.value.descripcion]])]),u("div",null,[g[29]||(g[29]=u("label",{class:"label"},"URL del webhook (https)",-1)),se(u("input",{"onUpdate:modelValue":g[4]||(g[4]=b=>H.value.url=b),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[ge,H.value.url]])]),u("div",Gf,[u("div",{class:"flex items-center justify-between"},[g[30]||(g[30]=u("label",{class:"label"},"Parámetros que completa el modelo",-1)),u("button",{type:"button",class:"text-xs text-brand",onClick:We},"+ agregar")]),(k(!0),O(le,null,Ae(H.value.parametros,(b,ne)=>(k(),O("div",{key:ne,class:"flex gap-2 items-center"},[se(u("input",{"onUpdate:modelValue":pe=>b.nombre=pe,placeholder:"nombre",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs font-mono"},null,8,qf),[[ge,b.nombre]]),se(u("select",{"onUpdate:modelValue":pe=>b.tipo=pe,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...g[31]||(g[31]=[u("option",{value:"string"},"string",-1),u("option",{value:"number"},"number",-1),u("option",{value:"boolean"},"boolean",-1)])],8,Wf),[[In,b.tipo]]),se(u("input",{"onUpdate:modelValue":pe=>b.descripcion=pe,placeholder:"descripción",class:"flex-1 border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},null,8,zf),[[ge,b.descripcion]]),u("label",Jf,[se(u("input",{"onUpdate:modelValue":pe=>b.requerido=pe,type:"checkbox"},null,8,Yf),[[Ut,b.requerido]]),g[32]||(g[32]=we(" req. ",-1))]),u("button",{type:"button",class:"text-red-400 text-xs",onClick:pe=>Dt(ne)},"✕",8,Qf)]))),128)),H.value.parametros.length===0?(k(),O("p",Xf,"Sin parámetros.")):Q("",!0)]),u("div",Zf,[g[33]||(g[33]=u("label",{class:"label"},"Autenticación saliente (opcional)",-1)),se(u("input",{"onUpdate:modelValue":g[5]||(g[5]=b=>H.value.auth_header_nombre=b),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[ge,H.value.auth_header_nombre]]),u("label",ed,[se(u("input",{"onUpdate:modelValue":g[6]||(g[6]=b=>H.value.tocarAuth=b),type:"checkbox"},null,512),[[Ut,H.value.tocarAuth]]),we(" "+j(F.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),H.value.tocarAuth?se((k(),O("input",{key:0,"onUpdate:modelValue":g[7]||(g[7]=b=>H.value.auth_header_valor=b),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[ge,H.value.auth_header_valor]]):Q("",!0)]),u("label",td,[se(u("input",{"onUpdate:modelValue":g[8]||(g[8]=b=>H.value.activa=b),type:"checkbox"},null,512),[[Ut,H.value.activa]]),g[34]||(g[34]=we(" Activa ",-1))]),u("div",nd,[u("button",{type:"button",class:"btn-ghost",onClick:g[9]||(g[9]=b=>Z.value=!1)},"Cancelar"),g[35]||(g[35]=u("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):Q("",!0)])):i.value==="canales"?(k(),O("div",sd,[u("div",od,[u("div",rd,[g[36]||(g[36]=u("div",null,[u("span",{class:"font-medium text-texto"},"Web (widget)"),u("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),u("button",{class:Re(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",He.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:Oe},j(He.value?"✓ Copiado":"Copiar código"),3)]),g[37]||(g[37]=u("p",{class:"label mb-2"},[we(" Pegá esto antes de "),u("code",{class:"bg-elevado px-1 rounded"},"</body>"),we(" en las páginas de tu sitio. ")],-1)),u("pre",id,[u("code",null,j(Be.value),1)])]),u("div",{class:"flex justify-end mb-4"},[u("button",{class:"btn-primary",onClick:gt}," + Nuevo canal ")]),u("div",ld,[re.value.length===0?(k(),O("div",ad,"Sin canales configurados.")):Q("",!0),(k(!0),O(le,null,Ae(re.value,b=>(k(),O("div",{key:b.ID,class:"p-4"},[u("div",ud,[u("div",null,[u("span",cd,j(b.tipo),1),u("span",{class:Re(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},j(b.activo?"activo":"inactivo"),3)]),u("div",fd,[u("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:ne=>A(b)},j(b.activo?"Desactivar":"Activar"),9,dd),u("button",{class:"text-red-500 hover:text-red-700",onClick:ne=>G(b)},"Eliminar",8,pd)])]),u("div",hd,[u("label",md,[u("input",{type:"checkbox",checked:b.usar_whisper_audio,onChange:ne=>B(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,gd),g[38]||(g[38]=we(" Transcribir audios (Whisper) ",-1))]),u("label",vd,[u("input",{type:"checkbox",checked:b.usar_ocr_imagenes,onChange:ne=>V(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,bd),g[39]||(g[39]=we(" Leer texto de imágenes (OCR) ",-1))])]),u("p",_d,[g[40]||(g[40]=we(" Webhook: ",-1)),u("code",xd,j(b.webhook_url),1)]),b.tipo==="whatsapp"?(k(),O("p",yd,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):Q("",!0),b.ultimo_error?(k(),O("p",wd,j(b.ultimo_error),1)):Q("",!0)]))),128))]),te.value?(k(),O("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:g[20]||(g[20]=ut(b=>te.value=!1,["self"]))},[u("div",Cd,[g[51]||(g[51]=u("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),u("form",{class:"space-y-3",onSubmit:ut(Le,["prevent"])},[u("div",null,[g[42]||(g[42]=u("label",{class:"label"},"Tipo",-1)),se(u("select",{"onUpdate:modelValue":g[11]||(g[11]=b=>ee.value.tipo=b),class:"input"},[...g[41]||(g[41]=[u("option",{value:"telegram"},"Telegram",-1),u("option",{value:"whatsapp"},"WhatsApp Business",-1)])],512),[[In,ee.value.tipo]])]),ee.value.tipo==="telegram"?(k(),O("div",Ed,[g[43]||(g[43]=u("label",{class:"label"},"Bot token (de @BotFather)",-1)),se(u("input",{"onUpdate:modelValue":g[12]||(g[12]=b=>ee.value.bot_token=b),type:"password",required:"",class:"input"},null,512),[[ge,ee.value.bot_token]])])):(k(),O(le,{key:1},[u("div",null,[g[44]||(g[44]=u("label",{class:"label"},"Phone Number ID",-1)),se(u("input",{"onUpdate:modelValue":g[13]||(g[13]=b=>ee.value.phone_number_id=b),required:"",class:"input"},null,512),[[ge,ee.value.phone_number_id]])]),u("div",null,[g[45]||(g[45]=u("label",{class:"label"},"Access Token",-1)),se(u("input",{"onUpdate:modelValue":g[14]||(g[14]=b=>ee.value.access_token=b),type:"password",required:"",class:"input"},null,512),[[ge,ee.value.access_token]])]),u("div",null,[g[46]||(g[46]=u("label",{class:"label"},"App Secret",-1)),se(u("input",{"onUpdate:modelValue":g[15]||(g[15]=b=>ee.value.app_secret=b),type:"password",required:"",class:"input"},null,512),[[ge,ee.value.app_secret]])]),u("div",null,[g[47]||(g[47]=u("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),se(u("input",{"onUpdate:modelValue":g[16]||(g[16]=b=>ee.value.verify_token=b),required:"",class:"input"},null,512),[[ge,ee.value.verify_token]])])],64)),u("div",Sd,[u("label",Ad,[se(u("input",{type:"checkbox","onUpdate:modelValue":g[17]||(g[17]=b=>ee.value.usar_whisper_audio=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Ut,ee.value.usar_whisper_audio]]),g[48]||(g[48]=we(" Transcribir audios con Whisper ",-1))]),u("label",Rd,[se(u("input",{type:"checkbox","onUpdate:modelValue":g[18]||(g[18]=b=>ee.value.usar_ocr_imagenes=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[Ut,ee.value.usar_ocr_imagenes]]),g[49]||(g[49]=we(" Leer texto de imágenes con OCR ",-1))])]),u("div",Id,[u("button",{type:"button",class:"btn-ghost",onClick:g[19]||(g[19]=b=>te.value=!1)},"Cancelar"),g[50]||(g[50]=u("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):Q("",!0)])):i.value==="conexiones"?(k(),O("div",kd,[g[52]||(g[52]=u("p",{class:"label mb-4"}," Conectá una cuenta de correo para que este agente pueda enviar y leer correo en su nombre. Se soporta una cuenta activa a la vez. ",-1)),u("div",Od,[u("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:g[21]||(g[21]=b=>p("google"))}," Conectar Google "),u("button",{class:"border border-borde hover:border-brand text-sm font-medium px-4 py-2 rounded-lg text-gray-700 dark:text-gray-200 transition-colors",onClick:g[22]||(g[22]=b=>p("microsoft"))}," Conectar Outlook ")]),u("div",Td,[X.value.length===0?(k(),O("div",Pd,"Sin cuentas conectadas.")):Q("",!0),(k(!0),O(le,null,Ae(X.value,b=>(k(),O("div",{key:b.ID,class:"p-4 flex items-center justify-between"},[u("div",null,[u("span",Nd,j(b.proveedor),1),u("span",$d,j(b.email),1),u("span",{class:Re(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},j(b.activo?"activa":"inactiva"),3)]),u("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:ne=>m(b)},"Desconectar",8,Dd)]))),128))])])):i.value==="chat"?(k(),O("div",Md,[u("div",Vd,[R.value.length===0?(k(),O("p",jd," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA y las mismas tools/base de conocimiento. ")):Q("",!0),(k(!0),O(le,null,Ae(R.value,(b,ne)=>(k(),O("div",{key:ne,class:Re(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",b.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},j(b.content),3))),128)),$.value?(k(),O("p",Ud,"Pensando...")):Q("",!0)]),u("form",{class:"flex gap-2",onSubmit:ut(N,["prevent"])},[se(u("input",{"onUpdate:modelValue":g[23]||(g[23]=b=>C.value=b),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[ge,C.value]]),u("button",{type:"submit",disabled:$.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,Ld)],32)])):i.value==="conversaciones"?(k(),O("div",Fd,[u("div",Hd,[K.value.length===0?(k(),O("div",Bd,"Sin conversaciones.")):Q("",!0),(k(!0),O(le,null,Ae(K.value,b=>(k(),O("button",{key:b.session_id,class:Re(["w-full text-left p-3 hover:bg-elevado text-sm",E.value===b.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:ne=>_(b.session_id)},[u("div",Gd,j(b.content),1),u("div",qd,j(b.session_id),1)],10,Kd))),128))]),u("div",Wd,[E.value?Q("",!0):(k(),O("p",zd,"Elegí una conversación de la izquierda.")),(k(!0),O(le,null,Ae(D.value,b=>(k(),O("div",{key:b.ID,class:Re(["max-w-[80%] px-3 py-2 rounded-lg text-sm",b.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},j(b.content),3))),128))])])):(k(),O("div",Jd,[g[53]||(g[53]=u("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar al AI, a tools, a correo o a los canales. Últimos 100. ",-1)),u("div",Yd,[I.value.length===0?(k(),O("div",Qd,"Sin eventos registrados — buena señal.")):Q("",!0),(k(!0),O(le,null,Ae(I.value,b=>(k(),O("details",{key:b.ID,class:"p-3"},[u("summary",Xd,[u("span",{class:Re(["px-1.5 py-0.5 rounded text-xs shrink-0",U.value(b.nivel)])},j(b.nivel),3),u("span",Zd,j(b.origen),1),u("span",ep,j(b.mensaje),1),u("span",tp,j(q(b.CreatedAt)),1)]),b.detalle?(k(),O("pre",np,j(b.detalle),1)):Q("",!0)]))),128))])]))])}}},op={class:"flex items-start justify-between gap-4 mb-6"},rp={class:"card p-4 mb-4"},ip={class:"flex flex-wrap items-end gap-3"},lp={class:"flex gap-1 ml-auto"},ap={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},up={key:1,class:"text-sm text-tenue"},cp={class:"grid gap-3 sm:grid-cols-3 mb-4"},fp={class:"card p-4"},dp={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},pp={class:"card p-4"},hp={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},mp={class:"card p-4"},gp={class:"text-lg font-semibold text-texto mt-1"},vp={key:0,class:"text-[11px] text-tenue mt-0.5"},bp={key:0,class:"card p-4 mb-4"},_p={class:"flex items-center justify-between text-sm mb-2"},xp={class:"text-tenue tabular-nums"},yp={class:"h-2 rounded-full bg-elevado overflow-hidden"},wp={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Cp={class:"card divide-y divide-borde mb-4"},Ep={class:"text-lg"},Sp={class:"min-w-0 flex-1"},Ap={class:"text-sm text-texto"},Rp={class:"text-xs text-tenue tabular-nums"},Ip={class:"text-sm font-medium text-texto tabular-nums"},kp={key:1,class:"card p-4"},Op={class:"flex items-end gap-1 h-28"},Tp=["title"],Pp={class:"flex justify-between text-[11px] text-tenue mt-2"},Np={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=J(!0),s=J(""),o=J(null),r=new Date,i=J(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),l=J(r.toISOString().slice(0,10)),a={ia:{nombre:"Inteligencia artificial",icono:"🧠",color:"#8eb02f"},ocr:{nombre:"Lectura de imágenes",icono:"🖼️",color:"#2f7fb0"},whisper:{nombre:"Transcripción de audio",icono:"🎙️",color:"#b0752f"}},d=_=>a[_]||{nombre:_,icono:"•",color:"#94a3b8"};async function c(){n.value=!0,s.value="";try{o.value=await oe.get(ie(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${l.value}`))}catch(_){s.value=_.message}finally{n.value=!1}}const h=ve(()=>{var _,w;return((w=(_=o.value)==null?void 0:_.plan)==null?void 0:w.moneda)||"COP"}),v=ve(()=>{var _;return((_=o.value)==null?void 0:_.resumen)||[]}),x=ve(()=>{var _;return((_=o.value)==null?void 0:_.total_periodo)||0}),M=ve(()=>{var _,w;return((w=(_=o.value)==null?void 0:_.plan)==null?void 0:w.tope_consumo_mensual)||0}),P=ve(()=>M.value?Math.min(100,x.value/M.value*100):0);function K(_){return`${h.value} ${Number(_||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function D(_){return Number(_||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const E=ve(()=>{var F;const _=new Map;for(const H of((F=o.value)==null?void 0:F.detalle)||[]){const Ce=String(H.CreatedAt).slice(0,10);_.set(Ce,(_.get(Ce)||0)+(H.costo||0))}const w=[..._.entries()].sort((H,Ce)=>H[0].localeCompare(Ce[0])),Z=Math.max(...w.map(H=>H[1]),0);return{dias:w,max:Z}});function L(_){const w=new Date,Z=new Date;Z.setDate(Z.getDate()-_),i.value=Z.toISOString().slice(0,10),l.value=w.toISOString().slice(0,10),c()}return Nn(c),(_,w)=>{var F;const Z=$n("router-link");return k(),O("div",null,[u("div",op,[w[6]||(w[6]=u("div",null,[u("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),u("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),be(Z,{to:`/tenants/${e.id}`,class:"btn-ghost"},{default:$t(()=>[...w[5]||(w[5]=[we("← Agentes",-1)])]),_:1},8,["to"])]),u("div",rp,[u("div",ip,[u("div",null,[w[7]||(w[7]=u("label",{class:"label"},"Desde",-1)),se(u("input",{"onUpdate:modelValue":w[0]||(w[0]=H=>i.value=H),type:"date",class:"input !w-auto"},null,512),[[ge,i.value]])]),u("div",null,[w[8]||(w[8]=u("label",{class:"label"},"Hasta",-1)),se(u("input",{"onUpdate:modelValue":w[1]||(w[1]=H=>l.value=H),type:"date",class:"input !w-auto"},null,512),[[ge,l.value]])]),u("button",{class:"btn-primary",onClick:c},"Aplicar"),u("div",lp,[u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:w[2]||(w[2]=H=>L(6))},"7 días"),u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:w[3]||(w[3]=H=>L(29))},"30 días"),u("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:w[4]||(w[4]=H=>L(89))},"90 días")])])]),s.value?(k(),O("p",ap,j(s.value),1)):Q("",!0),n.value?(k(),O("p",up,"Cargando…")):o.value?(k(),O(le,{key:2},[u("div",cp,[u("div",fp,[w[9]||(w[9]=u("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),u("p",dp,j(K(x.value)),1)]),u("div",pp,[w[10]||(w[10]=u("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),u("p",hp,j(K(o.value.pendiente_facturar)),1),w[11]||(w[11]=u("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),u("div",mp,[w[12]||(w[12]=u("p",{class:"text-xs text-tenue"},"Plan",-1)),u("p",gp,j(((F=o.value.plan)==null?void 0:F.nombre)||"Sin plan"),1),o.value.plan?(k(),O("p",vp," Mensualidad "+j(K(o.value.plan.precio_mensual)),1)):Q("",!0)])]),M.value?(k(),O("div",bp,[u("div",_p,[w[13]||(w[13]=u("span",{class:"text-texto"},"Tope mensual",-1)),u("span",xp,j(K(x.value))+" / "+j(K(M.value)),1)]),u("div",yp,[u("div",{class:Re(["h-full rounded-full transition-all duration-500",P.value>=100?"bg-red-500":P.value>=80?"bg-amber-500":"bg-brand"]),style:Zt({width:P.value+"%"})},null,6)]),P.value>=100?(k(),O("p",wp," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):Q("",!0)])):Q("",!0),u("div",Cp,[w[14]||(w[14]=u("div",{class:"px-4 py-3"},[u("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),v.value.length===0?(k(),En(Di,{key:0,icono:"📊",titulo:"Sin consumo en este período",detalle:"Cuando tus agentes respondan mensajes, lean imágenes o transcriban audios, vas a verlo acá."})):Q("",!0),(k(!0),O(le,null,Ae(v.value,H=>(k(),O("div",{key:H.tipo,class:"px-4 py-3 flex items-center gap-3"},[u("span",Ep,j(d(H.tipo).icono),1),u("div",Sp,[u("p",Ap,j(d(H.tipo).nombre),1),u("p",Rp,j(D(H.cantidad))+" "+j(H.unidad)+" · "+j(D(H.eventos))+" usos ",1)]),u("span",Ip,j(K(H.costo)),1)]))),128))]),E.value.dias.length?(k(),O("div",kp,[w[15]||(w[15]=u("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),u("div",Op,[(k(!0),O(le,null,Ae(E.value.dias,([H,Ce])=>(k(),O("div",{key:H,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:Zt({height:E.value.max?Math.max(2,Ce/E.value.max*100)+"%":"2px"}),title:`${H}: ${K(Ce)}`},null,12,Tp))),128))]),u("div",Pp,[u("span",null,j(E.value.dias[0][0]),1),u("span",null,j(E.value.dias[E.value.dias.length-1][0]),1)])])):Q("",!0)],64)):Q("",!0)])}}},$p=cc({history:Hu(Ct.baseRuta),routes:[{path:"/",name:"home",component:Bc},{path:"/tenants/:id",name:"tenant-agentes",component:mf,props:!0},{path:"/tenants/:id/uso",name:"uso",component:Np,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:sp,props:!0}]});nu(Uc).use($p).mount("#app");