Files
soft_usite/public/orchestrator/assets/index-B4CrdUeB.js
T
Lizandro GuarnizoandClaude Opus 5 9da2a057f2 feat(umind): el canal correo puede acotarse a ciertos remitentes
"Responder a: todos los que escriban / solo a estos remitentes" — direcciones
completas o dominios, separados por coma. Un dominio (@miempresa.com) habilita
a toda esa empresa; lo que no pasa el filtro se marca leído y no se contesta:
decisión tomada, no correo pendiente que se relee en cada revisión.

El match de dominio es contra el dominio entero, nunca por sufijo:
"empresa.com" no habilita a alguien de "malaempresa.com" ni de un subdominio.
Ese es el clásico filtro que parece cerrado y no lo está, y acá decide a quién
le habla el agente en nombre del negocio — hay un test por cada agujero.

El filtro y el intervalo también se pueden cambiar por el update del canal sin
recrearlo, porque recrearlo pide la contraseña de la casilla de nuevo.

De paso quedó verificado que el módulo de soporte sigue intacto tras la
unificación del SMTP: los catorce tests de soporte (auto-respuesta, parseo
IMAP, clasificador, resúmenes) pasan en verde.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 20:14:35 -05:00

28 lines
188 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 Ys(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},tn=[],yt=()=>{},yr=()=>!1,os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),rs=e=>e.startsWith("onUpdate:"),Ve=Object.assign,Zs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ql=Object.prototype.hasOwnProperty,he=(e,t)=>Ql.call(e,t),ee=Array.isArray,nn=e=>Vn(e)==="[object Map]",pn=e=>Vn(e)==="[object Set]",wo=e=>Vn(e)==="[object Date]",re=e=>typeof e=="function",$e=e=>typeof e=="string",it=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",_r=e=>(ge(e)||re(e))&&re(e.then)&&re(e.catch),wr=Object.prototype.toString,Vn=e=>wr.call(e),Jl=e=>Vn(e).slice(8,-1),kr=e=>Vn(e)==="[object Object]",Xs=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wn=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ls=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Yl=/-\w/g,Be=ls(e=>e.replace(Yl,t=>t.slice(1).toUpperCase())),Zl=/\B([A-Z])/g,Yt=ls(e=>e.replace(Zl,"-$1").toLowerCase()),is=ls(e=>e.charAt(0).toUpperCase()+e.slice(1)),_s=ls(e=>e?`on${is(e)}`:""),xt=(e,t)=>!Object.is(e,t),Wn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},$r=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},as=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ko;const us=()=>ko||(ko=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Jt(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=$e(s)?ni(s):Jt(s);if(o)for(const r in o)t[r]=o[r]}return t}else if($e(e)||ge(e))return e}const Xl=/;(?![^(]*\))/g,ei=/:([^]+)/,ti=/\/\*[^]*?\*\//g;function ni(e){const t={};return e.replace(ti,"").split(Xl).forEach(n=>{if(n){const s=n.split(ei);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ue(e){let t="";if($e(e))t=e;else if(ee(e))for(let n=0;n<e.length;n++){const s=ue(e[n]);s&&(t+=s+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const si="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",oi=Ys(si);function Cr(e){return!!e||e===""}function ri(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ft(e[s],t[s]);return n}function Ft(e,t){if(e===t)return!0;let n=wo(e),s=wo(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=it(e),s=it(t),n||s)return e===t;if(n=ee(e),s=ee(t),n||s)return n&&s?ri(e,t):!1;if(n=ge(e),s=ge(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 a=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(a&&!u||!a&&u||!Ft(e[i],t[i]))return!1}}return String(e)===String(t)}function eo(e,t){return e.findIndex(n=>Ft(n,t))}const Ar=e=>!!(e&&e.__v_isRef===!0),E=e=>$e(e)?e:e==null?"":ee(e)||ge(e)&&(e.toString===wr||!re(e.toString))?Ar(e)?E(e.value):JSON.stringify(e,Sr,2):String(e),Sr=(e,t)=>Ar(t)?Sr(e,t.value):nn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[ws(s,r)+" =>"]=o,n),{})}:pn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ws(n))}:it(t)?ws(t):ge(t)&&!ee(t)&&!kr(t)?String(t):t,ws=(e,t="")=>{var n;return it(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 Me;class li{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&&Me&&(Me.active?(this.parent=Me,this.index=(Me.scopes||(Me.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=Me;try{return Me=this,t()}finally{Me=n}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){if(this._on>0&&--this._on===0){if(Me===this)Me=this.prevScope;else{let t=Me;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 ii(){return Me}let ke;const ks=new WeakSet;class Er{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,Me&&(Me.active?Me.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ks.has(this)&&(ks.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Rr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,$o(this),Pr(this);const t=ke,n=ot;ke=this,ot=!0;try{return this.fn()}finally{Tr(this),ke=t,ot=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)so(t);this.deps=this.depsTail=void 0,$o(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ks.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ns(this)&&this.run()}get dirty(){return Ns(this)}}let Ir=0,kn,$n;function Rr(e,t=!1){if(e.flags|=8,t){e.next=$n,$n=e;return}e.next=kn,kn=e}function to(){Ir++}function no(){if(--Ir>0)return;if($n){let t=$n;for($n=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;kn;){let t=kn;for(kn=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 Pr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),so(s),ai(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ns(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Or(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Or(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===En)||(e.globalVersion=En,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ns(e))))return;e.flags|=2;const t=e.dep,n=ke,s=ot;ke=e,ot=!0;try{Pr(e);const o=e.fn(e._value);(t.version===0||xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ke=n,ot=s,Tr(e),e.flags&=-3}}function so(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)so(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ai(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ot=!0;const Dr=[];function Ot(){Dr.push(ot),ot=!1}function Dt(){const e=Dr.pop();ot=e===void 0?!0:e}function $o(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ke;ke=void 0;try{t()}finally{ke=n}}}let En=0;class ui{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 oo{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(!ke||!ot||ke===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ke)n=this.activeLink=new ui(ke,this),ke.deps?(n.prevDep=ke.depsTail,ke.depsTail.nextDep=n,ke.depsTail=n):ke.deps=ke.depsTail=n,Mr(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=ke.depsTail,n.nextDep=void 0,ke.depsTail.nextDep=n,ke.depsTail=n,ke.deps===n&&(ke.deps=s)}return n}trigger(t){this.version++,En++,this.notify(t)}notify(t){to();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{no()}}}function Mr(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)Mr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Vs=new WeakMap,zt=Symbol(""),js=Symbol(""),In=Symbol("");function je(e,t,n){if(ot&&ke){let s=Vs.get(e);s||Vs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new oo),o.map=s,o.key=n),o.track()}}function Et(e,t,n,s,o,r){const i=Vs.get(e);if(!i){En++;return}const a=u=>{u&&u.trigger()};if(to(),t==="clear")i.forEach(a);else{const u=ee(e),d=u&&Xs(n);if(u&&n==="length"){const c=Number(s);i.forEach((m,p)=>{(p==="length"||p===In||!it(p)&&p>=c)&&a(m)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(In)),t){case"add":u?d&&a(i.get("length")):(a(i.get(zt)),nn(e)&&a(i.get(js)));break;case"delete":u||(a(i.get(zt)),nn(e)&&a(i.get(js)));break;case"set":nn(e)&&a(i.get(zt));break}}no()}function Zt(e){const t=ve(e);return t===e?t:(je(t,"iterate",In),tt(e)?t:t.map(at))}function cs(e){return je(e=ve(e),"iterate",In),e}function gt(e,t){return Mt(e)?an(Qt(e)?at(t):t):at(t)}const ci={__proto__:null,[Symbol.iterator](){return $s(this,Symbol.iterator,e=>gt(this,e))},concat(...e){return Zt(this).concat(...e.map(t=>ee(t)?Zt(t):t))},entries(){return $s(this,"entries",e=>(e[1]=gt(this,e[1]),e))},every(e,t){return $t(this,"every",e,t,void 0,arguments)},filter(e,t){return $t(this,"filter",e,t,n=>n.map(s=>gt(this,s)),arguments)},find(e,t){return $t(this,"find",e,t,n=>gt(this,n),arguments)},findIndex(e,t){return $t(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return $t(this,"findLast",e,t,n=>gt(this,n),arguments)},findLastIndex(e,t){return $t(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return $t(this,"forEach",e,t,void 0,arguments)},includes(...e){return Cs(this,"includes",e)},indexOf(...e){return Cs(this,"indexOf",e)},join(e){return Zt(this).join(e)},lastIndexOf(...e){return Cs(this,"lastIndexOf",e)},map(e,t){return $t(this,"map",e,t,void 0,arguments)},pop(){return hn(this,"pop")},push(...e){return hn(this,"push",e)},reduce(e,...t){return Co(this,"reduce",e,t)},reduceRight(e,...t){return Co(this,"reduceRight",e,t)},shift(){return hn(this,"shift")},some(e,t){return $t(this,"some",e,t,void 0,arguments)},splice(...e){return hn(this,"splice",e)},toReversed(){return Zt(this).toReversed()},toSorted(e){return Zt(this).toSorted(e)},toSpliced(...e){return Zt(this).toSpliced(...e)},unshift(...e){return hn(this,"unshift",e)},values(){return $s(this,"values",e=>gt(this,e))}};function $s(e,t,n){const s=cs(e),o=s[t]();return s!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const di=Array.prototype;function $t(e,t,n,s,o,r){const i=cs(e),a=i!==e&&!tt(e),u=i[t];if(u!==di[t]){const m=u.apply(e,r);return a?at(m):m}let d=n;i!==e&&(a?d=function(m,p){return n.call(this,gt(e,m),p,e)}:n.length>2&&(d=function(m,p){return n.call(this,m,p,e)}));const c=u.call(i,d,s);return a&&o?o(c):c}function Co(e,t,n,s){const o=cs(e),r=o!==e&&!tt(e);let i=n,a=!1;o!==e&&(r?(a=s.length===0,i=function(d,c,m){return a&&(a=!1,d=gt(e,d)),n.call(this,d,gt(e,c),m,e)}):n.length>3&&(i=function(d,c,m){return n.call(this,d,c,m,e)}));const u=o[t](i,...s);return a?gt(e,u):u}function Cs(e,t,n){const s=ve(e);je(s,"iterate",In);const o=s[t](...n);return(o===-1||o===!1)&&io(n[0])?(n[0]=ve(n[0]),s[t](...n)):o}function hn(e,t,n=[]){Ot(),to();const s=ve(e)[t].apply(e,n);return no(),Dt(),s}const fi=Ys("__proto__,__v_isRef,__isVue"),Nr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(it));function pi(e){it(e)||(e=String(e));const t=ve(this);return je(t,"has",e),t.hasOwnProperty(e)}class Vr{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?ki:Fr:r?Lr:Ur).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=ee(t);if(!o){let u;if(i&&(u=ci[n]))return u;if(n==="hasOwnProperty")return pi}const a=Reflect.get(t,n,Le(t)?t:s);if((it(n)?Nr.has(n):fi(n))||(o||je(t,"get",n),r))return a;if(Le(a)){const u=i&&Xs(n)?a:a.value;return o&&ge(u)?Ls(u):u}return ge(a)?o?Ls(a):ds(a):a}}class jr extends Vr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=ee(t)&&Xs(n);if(!this._isShallow){const d=Mt(r);if(!tt(s)&&!Mt(s)&&(r=ve(r),s=ve(s)),!i&&Le(r)&&!Le(s))return d||(r.value=s),!0}const a=i?Number(n)<t.length:he(t,n),u=Reflect.set(t,n,s,Le(t)?t:o);return t===ve(o)&&u&&(a?xt(s,r)&&Et(t,"set",n,s):Et(t,"add",n,s)),u}deleteProperty(t,n){const s=he(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Et(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!it(n)||!Nr.has(n))&&je(t,"has",n),s}ownKeys(t){return je(t,"iterate",ee(t)?"length":zt),Reflect.ownKeys(t)}}class mi extends Vr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const vi=new jr,hi=new mi,gi=new jr(!0);const Us=e=>e,Ln=e=>Reflect.getPrototypeOf(e);function bi(e,t,n){return function(...s){const o=this.__v_raw,r=ve(o),i=nn(r),a=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,d=o[e](...s),c=n?Us:t?an:at;return!t&&je(r,"iterate",u?js:zt),Ve(Object.create(d),{next(){const{value:m,done:p}=d.next();return p?{value:m,done:p}:{value:a?[c(m[0]),c(m[1])]:c(m),done:p}}})}}function Fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function xi(e,t){const n={get(o){const r=this.__v_raw,i=ve(r),a=ve(o);e||(xt(o,a)&&je(i,"get",o),je(i,"get",a));const{has:u}=Ln(i),d=t?Us:e?an:at;if(u.call(i,o))return d(r.get(o));if(u.call(i,a))return d(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&je(ve(o),"iterate",zt),o.size},has(o){const r=this.__v_raw,i=ve(r),a=ve(o);return e||(xt(o,a)&&je(i,"has",o),je(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,u=ve(a),d=t?Us:e?an:at;return!e&&je(u,"iterate",zt),a.forEach((c,m)=>o.call(r,d(c),d(m),i))}};return Ve(n,e?{add:Fn("add"),set:Fn("set"),delete:Fn("delete"),clear:Fn("clear")}:{add(o){const r=ve(this),i=Ln(r),a=ve(o),u=!t&&!tt(o)&&!Mt(o)?a:o;return i.has.call(r,u)||xt(o,u)&&i.has.call(r,o)||xt(a,u)&&i.has.call(r,a)||(r.add(u),Et(r,"add",u,u)),this},set(o,r){!t&&!tt(r)&&!Mt(r)&&(r=ve(r));const i=ve(this),{has:a,get:u}=Ln(i);let d=a.call(i,o);d||(o=ve(o),d=a.call(i,o));const c=u.call(i,o);return i.set(o,r),d?xt(r,c)&&Et(i,"set",o,r):Et(i,"add",o,r),this},delete(o){const r=ve(this),{has:i,get:a}=Ln(r);let u=i.call(r,o);u||(o=ve(o),u=i.call(r,o)),a&&a.call(r,o);const d=r.delete(o);return u&&Et(r,"delete",o,void 0),d},clear(){const o=ve(this),r=o.size!==0,i=o.clear();return r&&Et(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=bi(o,e,t)}),n}function ro(e,t){const n=xi(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(he(n,o)&&o in s?n:s,o,r)}const yi={get:ro(!1,!1)},_i={get:ro(!1,!0)},wi={get:ro(!0,!1)};const Ur=new WeakMap,Lr=new WeakMap,Fr=new WeakMap,ki=new WeakMap;function $i(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return Mt(e)?e:lo(e,!1,vi,yi,Ur)}function qr(e){return lo(e,!1,gi,_i,Lr)}function Ls(e){return lo(e,!0,hi,wi,Fr)}function lo(e,t,n,s,o){if(!ge(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=$i(Jl(e));if(i===0)return e;const a=new Proxy(e,i===2?s:n);return o.set(e,a),a}function Qt(e){return Mt(e)?Qt(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function io(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function Ci(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&$r(e,"__v_skip",!0),e}const at=e=>ge(e)?ds(e):e,an=e=>ge(e)?Ls(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function L(e){return Hr(e,!1)}function Ai(e){return Hr(e,!0)}function Hr(e,t){return Le(e)?e:new Si(e,t)}class Si{constructor(t,n){this.dep=new oo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ve(t),this._value=n?t:at(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||tt(t)||Mt(t);t=s?t:ve(t),xt(t,n)&&(this._rawValue=t,this._value=s?t:at(t),this.dep.trigger())}}function Pe(e){return Le(e)?e.value:e}const Ei={get:(e,t,n)=>t==="__v_raw"?e:Pe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Le(o)&&!Le(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Br(e){return Qt(e)?e:new Proxy(e,Ei)}class Ii{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new oo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=En-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ke!==this)return Rr(this,!0),!0}get value(){const t=this.dep.track();return Or(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ri(e,t,n=!1){let s,o;return re(e)?s=e:(s=e.get,o=e.set),new Ii(s,o,n)}const qn={},Jn=new WeakMap;let Wt;function Pi(e,t=!1,n=Wt){if(n){let s=Jn.get(n);s||Jn.set(n,s=[]),s.push(e)}}function Ti(e,t,n=we){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:a,call:u}=n,d=b=>o?b:tt(b)||o===!1||o===0?It(b,1):It(b);let c,m,p,x,S=!1,C=!1;if(Le(e)?(m=()=>e.value,S=tt(e)):Qt(e)?(m=()=>d(e),S=!0):ee(e)?(C=!0,S=e.some(b=>Qt(b)||tt(b)),m=()=>e.map(b=>{if(Le(b))return b.value;if(Qt(b))return d(b);if(re(b))return u?u(b,2):b()})):re(e)?t?m=u?()=>u(e,2):e:m=()=>{if(p){Ot();try{p()}finally{Dt()}}const b=Wt;Wt=c;try{return u?u(e,3,[x]):e(x)}finally{Wt=b}}:m=yt,t&&o){const b=m,_=o===!0?1/0:o;m=()=>It(b(),_)}const R=ii(),O=()=>{c.stop(),R&&R.active&&Zs(R.effects,c)};if(r&&t){const b=t;t=(..._)=>{const j=b(..._);return O(),j}}let $=C?new Array(e.length).fill(qn):qn;const g=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const _=c.run();if(b||o||S||(C?_.some((j,H)=>xt(j,$[H])):xt(_,$))){p&&p();const j=Wt;Wt=c;try{const H=[_,$===qn?void 0:C&&$[0]===qn?[]:$,x];$=_,u?u(t,3,H):t(...H)}finally{Wt=j}}}else c.run()};return a&&a(g),c=new Er(m),c.scheduler=i?()=>i(g,!1):g,x=b=>Pi(b,!1,c),p=c.onStop=()=>{const b=Jn.get(c);if(b){if(u)u(b,4);else for(const _ of b)_();Jn.delete(c)}},t?s?g(!0):$=c.run():i?i(g.bind(null,!0),!0):c.run(),O.pause=c.pause.bind(c),O.resume=c.resume.bind(c),O.stop=O,O}function It(e,t=1/0,n){if(t<=0||!ge(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Le(e))It(e.value,t,n);else if(ee(e))for(let s=0;s<e.length;s++)It(e[s],t,n);else if(pn(e)||nn(e))e.forEach(s=>{It(s,t,n)});else if(kr(e)){for(const s in e)It(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&It(e[s],t,n)}return e}/**
* @vue/runtime-core v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function jn(e,t,n,s){try{return s?e(...s):e()}catch(o){fs(o,t,n)}}function ut(e,t,n,s){if(re(e)){const o=jn(e,t,n,s);return o&&_r(o)&&o.catch(r=>{fs(r,t,n)}),o}if(ee(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ut(e[r],t,n,s));return o}}function fs(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||we;if(t){let a=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let m=0;m<c.length;m++)if(c[m](e,u,d)===!1)return}a=a.parent}if(r){Ot(),jn(r,null,10,[e,u,d]),Dt();return}}Oi(e,n,o,s,i)}function Oi(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const He=[];let ht=-1;const sn=[];let Ut=null,Xt=0;const Gr=Promise.resolve();let Yn=null;function ao(e){const t=Yn||Gr;return e?t.then(this?e.bind(this):e):t}function Di(e){let t=ht+1,n=He.length;for(;t<n;){const s=t+n>>>1,o=He[s],r=Rn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function uo(e){if(!(e.flags&1)){const t=Rn(e),n=He[He.length-1];!n||!(e.flags&2)&&t>=Rn(n)?He.push(e):He.splice(Di(t),0,e),e.flags|=1,Wr()}}function Wr(){Yn||(Yn=Gr.then(zr))}function Mi(e){if(!ee(e))Ut&&e.id===-1?Ut.splice(Xt+1,0,e):e.flags&1||(sn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)sn.push(e[t]);Wr()}function Ao(e,t,n=ht+1){for(;n<He.length;n++){const s=He[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;He.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Kr(e){if(sn.length){const t=[...new Set(sn)].sort((n,s)=>Rn(n)-Rn(s));if(sn.length=0,Ut){for(let n=0;n<t.length;n++)Ut.push(t[n]);return}for(Ut=t,Xt=0;Xt<Ut.length;Xt++){const n=Ut[Xt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ut=null,Xt=0}}const Rn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zr(e){try{for(ht=0;ht<He.length;ht++){const t=He[ht];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),jn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ht<He.length;ht++){const t=He[ht];t&&(t.flags&=-2)}ht=-1,He.length=0,Kr(),Yn=null,(He.length||sn.length)&&zr()}}let Ne=null,Qr=null;function Zn(e){const t=Ne;return Ne=e,Qr=e&&e.type.__scopeId||null,t}function st(e,t=Ne,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&ts(-1);const r=Zn(t),i=Tt.length;let a;try{a=e(...o)}finally{for(let u=Tt.length;u>i;u--)vo();Zn(r),s._d&&ts(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function z(e,t){if(Ne===null)return e;const n=bs(Ne),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,u=we]=t[o];r&&(re(r)&&(r={mounted:r,updated:r}),r.deep&&It(i),s.push({dir:r,instance:n,value:i,oldValue:void 0,arg:a,modifiers:u}))}return e}function Bt(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let u=a.dir[s];u&&(Ot(),ut(u,n,8,[e.el,a,e,t]),Dt())}}function Kn(e,t){if(Ue){let n=Ue.provides;const s=Ue.parent&&Ue.parent.provides;s===n&&(n=Ue.provides=Object.create(s)),n[e]=t}}function rt(e,t,n=!1){const s=Ra();if(s||rn){let o=rn?rn._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&&re(t)?t.call(s&&s.proxy):t}}const Ni=Symbol.for("v-scx"),Vi=()=>rt(Ni);function Pt(e,t,n){return Jr(e,t,n)}function Jr(e,t,n=we){const{immediate:s,deep:o,flush:r,once:i}=n,a=Ve({},n),u=t&&s||!t&&r!=="post";let d;if(Dn){if(r==="sync"){const x=Vi();d=x.__watcherHandles||(x.__watcherHandles=[])}else if(!u){const x=()=>{};return x.stop=yt,x.resume=yt,x.pause=yt,x}}const c=Ue;a.call=(x,S,C)=>ut(x,c,S,C);let m=!1;r==="post"?a.scheduler=x=>{ze(x,c&&c.suspense)}:r!=="sync"&&(m=!0,a.scheduler=(x,S)=>{S?x():uo(x)}),a.augmentJob=x=>{t&&(x.flags|=4),m&&(x.flags|=2,c&&(x.id=c.uid,x.i=c))};const p=Ti(e,t,a);return Dn&&(d?d.push(p):u&&p()),p}function ji(e,t,n){const s=this.proxy,o=$e(e)?e.includes(".")?Yr(s,e):()=>s[e]:e.bind(s,s);let r;re(t)?r=t:(r=t.handler,n=t);const i=Un(this),a=Jr(o,r.bind(s),n);return i(),a}function Yr(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 Ui=Symbol("_vte"),ps=e=>e.__isTeleport,As=Symbol("_leaveCb");function Li(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==wt){t=n;break}}return t}function Zr(e){if(!fo(e))return ps(e.type)&&e.children?Li(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&&re(n.default))return n.default()}}function co(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;co(ps(n.type)&&Zr(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 Xr(e,t){return re(e)?Ve({name:e.name},t,{setup:e}):e}function el(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function So(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Xn=new WeakMap;function Cn(e,t,n,s,o=!1){if(ee(e)){e.forEach((C,R)=>Cn(C,t&&(ee(t)?t[R]:t),n,s,o));return}if(on(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Cn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?bs(s.component):s.el,i=o?null:r,{i:a,r:u}=e,d=t&&t.r,c=a.refs===we?a.refs={}:a.refs,m=a.setupState,p=ve(m),x=m===we?yr:C=>So(c,C)?!1:he(p,C),S=(C,R)=>!(R&&So(c,R));if(d!=null&&d!==u){if(Eo(t),$e(d))c[d]=null,x(d)&&(m[d]=null);else if(Le(d)){const C=t;S(d,C.k)&&(d.value=null),C.k&&(c[C.k]=null)}}if(re(u))jn(u,a,12,[i,c]);else{const C=$e(u),R=Le(u);if(C||R){const O=()=>{if(e.f){const $=C?x(u)?m[u]:c[u]:S()||!e.k?u.value:c[e.k];if(o)ee($)&&Zs($,r);else if(ee($))$.includes(r)||$.push(r);else if(C)c[u]=[r],x(u)&&(m[u]=c[u]);else{const g=[r];S(u,e.k)&&(u.value=g),e.k&&(c[e.k]=g)}}else C?(c[u]=i,x(u)&&(m[u]=i)):R&&(S(u,e.k)&&(u.value=i),e.k&&(c[e.k]=i))};if(i){const $=()=>{O(),Xn.delete(e)};$.id=-1,Xn.set(e,$),ze($,n)}else Eo(e),O()}}}function Eo(e){const t=Xn.get(e);t&&(t.flags|=8,Xn.delete(e))}us().requestIdleCallback;us().cancelIdleCallback;const on=e=>!!e.type.__asyncLoader,fo=e=>e.type.__isKeepAlive;function Fi(e,t){tl(e,"a",t)}function qi(e,t){tl(e,"da",t)}function tl(e,t,n=Ue){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ms(t,s,n),n){let o=n.parent;for(;o&&o.parent;)fo(o.parent.vnode)&&Hi(s,t,n,o),o=o.parent}}function Hi(e,t,n,s){const o=ms(t,e,s,!0);sl(()=>{Zs(s[t],o)},n)}function ms(e,t,n=Ue,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Ot();const a=Un(n),u=ut(t,n,e,i);return a(),Dt(),u});return s?o.unshift(r):o.push(r),r}}const Nt=e=>(t,n=Ue)=>{(!Dn||e==="sp")&&ms(e,(...s)=>t(...s),n)},Bi=Nt("bm"),vs=Nt("m"),Gi=Nt("bu"),Wi=Nt("u"),nl=Nt("bum"),sl=Nt("um"),Ki=Nt("sp"),zi=Nt("rtg"),Qi=Nt("rtc");function Ji(e,t=Ue){ms("ec",e,t)}const ol="components";function mn(e,t){return ll(ol,e,!0,t)||e}const rl=Symbol.for("v-ndc");function Yi(e){return $e(e)?ll(ol,e,!1)||e:e||rl}function ll(e,t,n=!0,s=!1){const o=Ne||Ue;if(o){const r=o.type;{const a=Ma(r,!1);if(a&&(a===t||a===Be(t)||a===is(Be(t))))return r}const i=Io(o[e]||r[e],t)||Io(o.appContext[e],t);return!i&&s?r:i}}function Io(e,t){return e&&(e[t]||e[Be(t)]||e[is(Be(t))])}function xe(e,t,n,s){let o;const r=n,i=ee(e);if(i||$e(e)){const a=i&&Qt(e);let u=!1,d=!1;a&&(u=!tt(e),d=Mt(e),e=cs(e)),o=new Array(e.length);for(let c=0,m=e.length;c<m;c++)o[c]=t(u?d?an(at(e[c])):at(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ge(e))if(e[Symbol.iterator])o=Array.from(e,(a,u)=>t(a,u,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,d=a.length;u<d;u++){const c=a[u];o[u]=t(e[c],c,u,r)}}else o=[];return o}function Zi(e,t,n,s,o,r){if(n==null&&(n={}),Ne.ce||Ne.parent&&on(Ne.parent)&&Ne.parent.ce){const d=n,c=Object.keys(d).length>0;return h(),_e(X,null,[oe("slot",d,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const a=Tt.length;h();let u;try{const d=i&&il(i(n)),c=n.key||r||d&&d.key;u=_e(X,{key:(c&&!it(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Tt.length;c>a;c--)vo();throw d}finally{i&&i._c&&(i._d=!0)}return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),u}function il(e){return e.some(t=>Tn(t)?!(t.type===wt||t.type===X&&!il(t.children)):!0)?e:null}const Fs=e=>e?Il(e)?bs(e):Fs(e.parent):null,An=Ve(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=>Fs(e.parent),$root:e=>Fs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ul(e),$forceUpdate:e=>e.f||(e.f=()=>{uo(e.update)}),$nextTick:e=>e.n||(e.n=ao.bind(e.proxy)),$watch:e=>ji.bind(e)}),Ss=(e,t)=>e!==we&&!e.__isScriptSetup&&he(e,t),Xi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:a,appContext:u}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Ss(s,t))return i[t]=1,s[t];if(o!==we&&he(o,t))return i[t]=2,o[t];if(he(r,t))return i[t]=3,r[t];if(n!==we&&he(n,t))return i[t]=4,n[t];qs&&(i[t]=0)}}const d=An[t];let c,m;if(d)return t==="$attrs"&&je(e.attrs,"get",""),d(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==we&&he(n,t))return i[t]=4,n[t];if(m=u.config.globalProperties,he(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Ss(o,t)?(o[t]=n,!0):s!==we&&he(s,t)?(s[t]=n,!0):he(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}},a){let u;return!!(n[a]||e!==we&&a[0]!=="$"&&he(e,a)||Ss(t,a)||he(r,a)||he(s,a)||he(An,a)||he(o.config.globalProperties,a)||(u=i.__cssModules)&&u[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ro(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qs=!0;function ea(e){const t=ul(e),n=e.proxy,s=e.ctx;qs=!1,t.beforeCreate&&Po(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:u,inject:d,created:c,beforeMount:m,mounted:p,beforeUpdate:x,updated:S,activated:C,deactivated:R,beforeDestroy:O,beforeUnmount:$,destroyed:g,unmounted:b,render:_,renderTracked:j,renderTriggered:H,errorCaptured:q,serverPrefetch:fe,expose:Y,inheritAttrs:F,components:Se,directives:K,filters:Ge}=t;if(d&&ta(d,s,null),i)for(const pe in i){const de=i[pe];re(de)&&(s[pe]=de.bind(n))}if(o){const pe=o.call(n,n);ge(pe)&&(e.data=ds(pe))}if(qs=!0,r)for(const pe in r){const de=r[pe],nt=re(de)?de.bind(n,n):re(de.get)?de.get.bind(n,n):yt,We=!re(de)&&re(de.set)?de.set.bind(n):yt,et=le({get:nt,set:We});Object.defineProperty(s,pe,{enumerable:!0,configurable:!0,get:()=>et.value,set:Te=>et.value=Te})}if(a)for(const pe in a)al(a[pe],s,n,pe);if(u){const pe=re(u)?u.call(n):u;Reflect.ownKeys(pe).forEach(de=>{Kn(de,pe[de])})}c&&Po(c,e,"c");function Ee(pe,de){ee(de)?de.forEach(nt=>pe(nt.bind(n))):de&&pe(de.bind(n))}if(Ee(Bi,m),Ee(vs,p),Ee(Gi,x),Ee(Wi,S),Ee(Fi,C),Ee(qi,R),Ee(Ji,q),Ee(Qi,j),Ee(zi,H),Ee(nl,$),Ee(sl,b),Ee(Ki,fe),ee(Y))if(Y.length){const pe=e.exposed||(e.exposed={});Y.forEach(de=>{Object.defineProperty(pe,de,{get:()=>n[de],set:nt=>n[de]=nt,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===yt&&(e.render=_),F!=null&&(e.inheritAttrs=F),Se&&(e.components=Se),K&&(e.directives=K),fe&&el(e)}function ta(e,t,n=yt){ee(e)&&(e=Hs(e));for(const s in e){const o=e[s];let r;ge(o)?"default"in o?r=rt(o.from||s,o.default,!0):r=rt(o.from||s):r=rt(o),Le(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function Po(e,t,n){ut(ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function al(e,t,n,s){let o=s.includes(".")?Yr(n,s):()=>n[s];if($e(e)){const r=t[e];re(r)&&Pt(o,r)}else if(re(e))Pt(o,e.bind(n));else if(ge(e))if(ee(e))e.forEach(r=>al(r,t,n,s));else{const r=re(e.handler)?e.handler.bind(n):t[e.handler];re(r)&&Pt(o,r,e)}}function ul(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let u;return a?u=a:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(d=>es(u,d,i,!0)),es(u,t,i)),ge(t)&&r.set(t,u),u}function es(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&es(e,r,n,!0),o&&o.forEach(i=>es(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const a=na[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const na={data:To,props:Oo,emits:Oo,methods:xn,computed:xn,beforeCreate:Fe,created:Fe,beforeMount:Fe,mounted:Fe,beforeUpdate:Fe,updated:Fe,beforeDestroy:Fe,beforeUnmount:Fe,destroyed:Fe,unmounted:Fe,activated:Fe,deactivated:Fe,errorCaptured:Fe,serverPrefetch:Fe,components:xn,directives:xn,watch:oa,provide:To,inject:sa};function To(e,t){return t?e?function(){return Ve(re(e)?e.call(this,this):e,re(t)?t.call(this,this):t)}:t:e}function sa(e,t){return xn(Hs(e),Hs(t))}function Hs(e){if(ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fe(e,t){return e?[...new Set([].concat(e,t))]:t}function xn(e,t){return e?Ve(Object.create(null),e,t):t}function Oo(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:Ve(Object.create(null),Ro(e),Ro(t??{})):t}function oa(e,t){if(!e)return t;if(!t)return e;const n=Ve(Object.create(null),e);for(const s in t)n[s]=Fe(e[s],t[s]);return n}function cl(){return{app:null,config:{isNativeTag:yr,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 ra=0;function la(e,t){return function(s,o=null){re(s)||(s=Ve({},s)),o!=null&&!ge(o)&&(o=null);const r=cl(),i=new WeakSet,a=[];let u=!1;const d=r.app={_uid:ra++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Va,get config(){return r.config},set config(c){},use(c,...m){return i.has(c)||(c&&re(c.install)?(i.add(c),c.install(d,...m)):re(c)&&(i.add(c),c(d,...m))),d},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),d},component(c,m){return m?(r.components[c]=m,d):r.components[c]},directive(c,m){return m?(r.directives[c]=m,d):r.directives[c]},mount(c,m,p){if(!u){const x=d._ceVNode||oe(s,o);return x.appContext=r,p===!0?p="svg":p===!1&&(p=void 0),e(x,c,p),u=!0,d._container=c,c.__vue_app__=d,bs(x.component)}},onUnmount(c){a.push(c)},unmount(){u&&(ut(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,m){return r.provides[c]=m,d},runWithContext(c){const m=rn;rn=d;try{return c()}finally{rn=m}}};return d}}let rn=null;const ia=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${Yt(t)}Modifiers`];function aa(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let o=n;const r=t.startsWith("update:"),i=r&&ia(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>$e(c)?c.trim():c)),i.number&&(o=n.map(as)));let a,u=s[a=_s(t)]||s[a=_s(Be(t))];!u&&r&&(u=s[a=_s(Yt(t))]),u&&ut(u,e,6,o);const d=s[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ut(d,e,6,o)}}const ua=new WeakMap;function dl(e,t,n=!1){const s=n?ua:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!re(e)){const u=d=>{const c=dl(d,t,!0);c&&(a=!0,Ve(i,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!a?(ge(e)&&s.set(e,null),null):(ee(r)?r.forEach(u=>i[u]=null):Ve(i,r),ge(e)&&s.set(e,i),i)}function hs(e,t){return!e||!os(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,Yt(t))||he(e,t))}function Do(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:u,render:d,renderCache:c,props:m,data:p,setupState:x,ctx:S,inheritAttrs:C}=e,R=Zn(e);let O,$;try{if(n.shapeFlag&4){const b=o||s,_=b;O=bt(d.call(_,b,c,m,x,p,S)),$=a}else{const b=t;O=bt(b.length>1?b(m,{attrs:a,slots:i,emit:u}):b(m,null)),$=t.props?a:ca(a)}}catch(b){Tt.length=0,fs(b,e,1),O=oe(wt)}let g=O;if($&&C!==!1){const b=Object.keys($),{shapeFlag:_}=g;b.length&&_&7&&(r&&b.some(rs)&&($=da($,r)),g=un(g,$,!1,!0))}if(n.dirs&&(g=un(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition){const b=ps(g.type)&&Zr(g)||g;co(b,n.transition)}return O=g,Zn(R),O}const ca=e=>{let t;for(const n in e)(n==="class"||n==="style"||os(n))&&((t||(t={}))[n]=e[n]);return t},da=(e,t)=>{const n={};for(const s in e)(!rs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function fa(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:a,patchFlag:u}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Mo(s,i,d):!!i;if(u&8){const c=t.dynamicProps;for(let m=0;m<c.length;m++){const p=c[m];if(fl(i,s,p)&&!hs(d,p))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:s===i?!1:s?i?Mo(s,i,d):!0:!!i;return!1}function Mo(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(fl(t,e,r)&&!hs(n,r))return!0}return!1}function fl(e,t,n){const s=e[n],o=t[n];return n==="style"&&ge(s)&&ge(o)?!Ft(s,o):s!==o}function pa({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 pl={},ml=()=>Object.create(pl),vl=e=>Object.getPrototypeOf(e)===pl;function ma(e,t,n,s=!1){const o={},r=ml();e.propsDefaults=Object.create(null),hl(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:qr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function va(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=ve(o),[u]=e.propsOptions;let d=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let m=0;m<c.length;m++){let p=c[m];if(hs(e.emitsOptions,p))continue;const x=t[p];if(u)if(he(r,p))x!==r[p]&&(r[p]=x,d=!0);else{const S=Be(p);o[S]=Bs(u,a,S,x,e,!1)}else x!==r[p]&&(r[p]=x,d=!0)}}}else{hl(e,t,o,r)&&(d=!0);let c;for(const m in a)(!t||!he(t,m)&&((c=Yt(m))===m||!he(t,c)))&&(u?n&&(n[m]!==void 0||n[c]!==void 0)&&(o[m]=Bs(u,a,m,void 0,e,!0)):delete o[m]);if(r!==a)for(const m in r)(!t||!he(t,m))&&(delete r[m],d=!0)}d&&Et(e.attrs,"set","")}function hl(e,t,n,s){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let u in t){if(wn(u))continue;const d=t[u];let c;o&&he(o,c=Be(u))?!r||!r.includes(c)?n[c]=d:(a||(a={}))[c]=d:hs(e.emitsOptions,u)||(!(u in s)||d!==s[u])&&(s[u]=d,i=!0)}if(r){const u=ve(n),d=a||we;for(let c=0;c<r.length;c++){const m=r[c];n[m]=Bs(o,u,m,d[m],e,!he(d,m))}}return i}function Bs(e,t,n,s,o,r){const i=e[n];if(i!=null){const a=he(i,"default");if(a&&s===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&re(u)){const{propsDefaults:d}=o;if(n in d)s=d[n];else{const c=Un(o);s=d[n]=u.call(null,t),c()}}else s=u;o.ce&&o.ce._setProp(n,s)}i[0]&&(r&&!a?s=!1:i[1]&&(s===""||s===Yt(n))&&(s=!0))}return s}const ha=new WeakMap;function gl(e,t,n=!1){const s=n?ha:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,i={},a=[];let u=!1;if(!re(e)){const c=m=>{u=!0;const[p,x]=gl(m,t,!0);Ve(i,p),x&&a.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!u)return ge(e)&&s.set(e,tn),tn;if(ee(r))for(let c=0;c<r.length;c++){const m=Be(r[c]);No(m)&&(i[m]=we)}else if(r)for(const c in r){const m=Be(c);if(No(m)){const p=r[c],x=i[m]=ee(p)||re(p)?{type:p}:Ve({},p),S=x.type;let C=!1,R=!0;if(ee(S))for(let O=0;O<S.length;++O){const $=S[O],g=re($)&&$.name;if(g==="Boolean"){C=!0;break}else g==="String"&&(R=!1)}else C=re(S)&&S.name==="Boolean";x[0]=C,x[1]=R,(C||he(x,"default"))&&a.push(m)}}const d=[i,a];return ge(e)&&s.set(e,d),d}function No(e){return e[0]!=="$"&&!wn(e)}const po=e=>e==="_"||e==="_ctx"||e==="$stable",mo=e=>ee(e)?e.map(bt):[bt(e)],ga=(e,t,n)=>{if(t._n)return t;const s=st((...o)=>mo(t(...o)),n);return s._c=!1,s},bl=(e,t,n)=>{const s=e._ctx;for(const o in e){if(po(o))continue;const r=e[o];if(re(r))t[o]=ga(o,r,s);else if(r!=null){const i=mo(r);t[o]=()=>i}}},xl=(e,t)=>{const n=mo(t);e.slots.default=()=>n},yl=(e,t,n)=>{for(const s in t)(n||!po(s))&&(e[s]=t[s])},ba=(e,t,n)=>{const s=e.slots=ml();if(e.vnode.shapeFlag&32){const o=t._;o?(yl(s,t,n),n&&$r(s,"_",o,!0)):bl(t,s)}else t&&xl(e,t)},xa=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=we;if(s.shapeFlag&32){const a=t._;a?n&&a===1?r=!1:yl(o,t,n):(r=!t.$stable,bl(t,o)),i=t}else t&&(xl(e,t),i={default:1});if(r)for(const a in o)!po(a)&&i[a]==null&&delete o[a]},ze=$a;function ya(e){return _a(e)}function _a(e,t){const n=us();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:a,createComment:u,setText:d,setElementText:c,parentNode:m,nextSibling:p,setScopeId:x=yt,insertStaticContent:S}=e,C=(f,v,y,T=null,M=null,P=null,A=void 0,k=null,V=!!v.dynamicChildren)=>{if(f===v)return;f&&!gn(f,v)&&(T=D(f),Te(f,M,P,!0),f=null),v.patchFlag===-2&&(V=!1,v.dynamicChildren=null);const{type:N,ref:I,shapeFlag:U}=v;switch(N){case gs:R(f,v,y,T);break;case wt:O(f,v,y,T);break;case zn:f==null&&$(v,y,T,A);break;case X:Se(f,v,y,T,M,P,A,k,V);break;default:U&1?_(f,v,y,T,M,P,A,k,V):U&6?K(f,v,y,T,M,P,A,k,V):(U&64||U&128)&&N.process(f,v,y,T,M,P,A,k,V,J)}I!=null&&M?Cn(I,f&&f.ref,P,v||f,!v):I==null&&f&&f.ref!=null&&Cn(f.ref,null,P,f,!0)},R=(f,v,y,T)=>{if(f==null)s(v.el=a(v.children),y,T);else{const M=v.el=f.el;v.children!==f.children&&d(M,v.children)}},O=(f,v,y,T)=>{f==null?s(v.el=u(v.children||""),y,T):v.el=f.el},$=(f,v,y,T)=>{[f.el,f.anchor]=S(f.children,v,y,T,f.el,f.anchor)},g=({el:f,anchor:v},y,T)=>{let M;for(;f&&f!==v;)M=p(f),s(f,y,T),f=M;s(v,y,T)},b=({el:f,anchor:v})=>{let y;for(;f&&f!==v;)y=p(f),o(f),f=y;o(v)},_=(f,v,y,T,M,P,A,k,V)=>{if(v.type==="svg"?A="svg":v.type==="math"&&(A="mathml"),f==null)j(v,y,T,M,P,A,k,V);else{const N=f.el&&f.el._isVueCE?f.el:null;try{N&&N._beginPatch(),fe(f,v,M,P,A,k,V)}finally{N&&N._endPatch()}}},j=(f,v,y,T,M,P,A,k)=>{let V,N;const{props:I,shapeFlag:U,transition:Q,dirs:ne}=f;if(V=f.el=i(f.type,P,I&&I.is,I),U&8?c(V,f.children):U&16&&q(f.children,V,null,T,M,Es(f,P),A,k),ne&&Bt(f,null,T,"created"),H(V,f,f.scopeId,A,T),I){for(const ye in I)ye!=="value"&&!wn(ye)&&r(V,ye,null,I[ye],P,T);"value"in I&&r(V,"value",null,I.value,P),(N=I.onVnodeBeforeMount)&&vt(N,T,f)}ne&&Bt(f,null,T,"beforeMount");const ce=wa(M,Q);ce&&Q.beforeEnter(V),s(V,v,y),((N=I&&I.onVnodeMounted)||ce||ne)&&ze(()=>{try{N&&vt(N,T,f),ce&&Q.enter(V),ne&&Bt(f,null,T,"mounted")}finally{}},M)},H=(f,v,y,T,M)=>{if(y&&x(f,y),T)for(let P=0;P<T.length;P++)x(f,T[P]);if(M){let P=M.subTree;if(v===P||$l(P.type)&&(P.ssContent===v||P.ssFallback===v)){const A=M.vnode;H(f,A,A.scopeId,A.slotScopeIds,M.parent)}}},q=(f,v,y,T,M,P,A,k,V=0)=>{for(let N=V;N<f.length;N++){const I=f[N]=k?St(f[N]):bt(f[N]);C(null,I,v,y,T,M,P,A,k)}},fe=(f,v,y,T,M,P,A)=>{const k=v.el=f.el;let{patchFlag:V,dynamicChildren:N,dirs:I}=v;V|=f.patchFlag&16;const U=f.props||we,Q=v.props||we;let ne;if(y&&Gt(y,!1),(ne=Q.onVnodeBeforeUpdate)&&vt(ne,y,v,f),I&&Bt(v,f,y,"beforeUpdate"),y&&Gt(y,!0),N&&(!f.dynamicChildren||f.dynamicChildren.length!==N.length)&&(V=0,A=!1,N=null),(U.innerHTML&&Q.innerHTML==null||U.textContent&&Q.textContent==null)&&c(k,""),N?Y(f.dynamicChildren,N,k,y,T,Es(v,M),P):A||de(f,v,k,null,y,T,Es(v,M),P,!1),V>0){if(V&16)F(k,U,Q,y,M);else if(V&2&&U.class!==Q.class&&r(k,"class",null,Q.class,M),V&4&&r(k,"style",U.style,Q.style,M),V&8){const ce=v.dynamicProps;for(let ye=0;ye<ce.length;ye++){const be=ce[ye],Ie=U[be],De=Q[be];(De!==Ie||be==="value")&&r(k,be,Ie,De,M,y)}}V&1&&f.children!==v.children&&c(k,v.children)}else!A&&N==null&&F(k,U,Q,y,M);((ne=Q.onVnodeUpdated)||I)&&ze(()=>{ne&&vt(ne,y,v,f),I&&Bt(v,f,y,"updated")},T)},Y=(f,v,y,T,M,P,A)=>{for(let k=0;k<v.length;k++){const V=f[k],N=v[k],I=V.el&&(V.type===X||!gn(V,N)||V.shapeFlag&198)?m(V.el):y;C(V,N,I,null,T,M,P,A,!0)}},F=(f,v,y,T,M)=>{if(v!==y){if(v!==we)for(const P in v)!wn(P)&&!(P in y)&&r(f,P,v[P],null,M,T);for(const P in y){if(wn(P))continue;const A=y[P],k=v[P];A!==k&&P!=="value"&&r(f,P,k,A,M,T)}"value"in y&&r(f,"value",v.value,y.value,M)}},Se=(f,v,y,T,M,P,A,k,V)=>{const N=v.el=f?f.el:a(""),I=v.anchor=f?f.anchor:a("");let{patchFlag:U,dynamicChildren:Q,slotScopeIds:ne}=v;ne&&(k=k?k.concat(ne):ne),f==null?(s(N,y,T),s(I,y,T),q(v.children||[],y,I,M,P,A,k,V)):U>0&&U&64&&Q&&f.dynamicChildren&&f.dynamicChildren.length===Q.length?(Y(f.dynamicChildren,Q,y,M,P,A,k),(v.key!=null||M&&v===M.subTree)&&_l(f,v,!0)):de(f,v,y,I,M,P,A,k,V)},K=(f,v,y,T,M,P,A,k,V)=>{v.slotScopeIds=k,f==null?v.shapeFlag&512?M.ctx.activate(v,y,T,A,V):Ge(v,y,T,M,P,A,V):Vt(f,v,V)},Ge=(f,v,y,T,M,P,A)=>{const k=f.component=Ia(f,T,M);if(fo(f)&&(k.ctx.renderer=J),Pa(k,!1,A),k.asyncDep){if(M&&M.registerDep(k,Ee,A),!f.el){const V=k.subTree=oe(wt);O(null,V,v,y),f.placeholder=V.el}}else Ee(k,f,v,y,M,P,A)},Vt=(f,v,y)=>{const T=v.component=f.component;if(fa(f,v,y))if(T.asyncDep&&!T.asyncResolved){pe(T,v,y);return}else T.next=v,T.update();else v.el=f.el,T.vnode=v},Ee=(f,v,y,T,M,P,A)=>{const k=()=>{if(f.isMounted){let{next:U,bu:Q,u:ne,parent:ce,vnode:ye}=f;{const pt=wl(f);if(pt){U&&(U.el=ye.el,pe(f,U,A)),pt.asyncDep.then(()=>{ze(()=>{f.isUnmounted||N()},M)});return}}let be=U,Ie;Gt(f,!1),U?(U.el=ye.el,pe(f,U,A)):U=ye,Q&&Wn(Q),(Ie=U.props&&U.props.onVnodeBeforeUpdate)&&vt(Ie,ce,U,ye),Gt(f,!0);const De=Do(f),ft=f.subTree;f.subTree=De,C(ft,De,m(ft.el),D(ft),f,M,P),U.el=De.el,be===null&&pa(f,De.el),ne&&ze(ne,M),(Ie=U.props&&U.props.onVnodeUpdated)&&ze(()=>vt(Ie,ce,U,ye),M)}else{let U;const{el:Q,props:ne}=v,{bm:ce,m:ye,parent:be,root:Ie,type:De}=f,ft=on(v);Gt(f,!1),ce&&Wn(ce),!ft&&(U=ne&&ne.onVnodeBeforeMount)&&vt(U,be,v),Gt(f,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(De,f.parent?f.parent.type:void 0);const pt=f.subTree=Do(f);C(null,pt,y,T,f,M,P),v.el=pt.el}if(ye&&ze(ye,M),!ft&&(U=ne&&ne.onVnodeMounted)){const pt=v;ze(()=>vt(U,be,pt),M)}(v.shapeFlag&256||be&&on(be.vnode)&&be.vnode.shapeFlag&256)&&f.a&&ze(f.a,M),f.isMounted=!0,v=y=T=null}};f.scope.on();const V=f.effect=new Er(k);f.scope.off();const N=f.update=V.run.bind(V),I=f.job=V.runIfDirty.bind(V);I.i=f,I.id=f.uid,V.scheduler=()=>uo(I),Gt(f,!0),N()},pe=(f,v,y)=>{v.component=f;const T=f.vnode.props;f.vnode=v,f.next=null,va(f,v.props,T,y),xa(f,v.children,y),Ot(),Ao(f),Dt()},de=(f,v,y,T,M,P,A,k,V=!1)=>{const N=f&&f.children,I=f?f.shapeFlag:0,U=v.children,{patchFlag:Q,shapeFlag:ne}=v;if(Q>0){if(Q&128){We(N,U,y,T,M,P,A,k,V);return}else if(Q&256){nt(N,U,y,T,M,P,A,k,V);return}}ne&8?(I&16&&Ke(N,M,P),U!==N&&c(y,U)):I&16?ne&16?We(N,U,y,T,M,P,A,k,V):Ke(N,M,P,!0):(I&8&&c(y,""),ne&16&&q(U,y,T,M,P,A,k,V))},nt=(f,v,y,T,M,P,A,k,V)=>{f=f||tn,v=v||tn;const N=f.length,I=v.length,U=Math.min(N,I);let Q;for(Q=0;Q<U;Q++){const ne=v[Q]=V?St(v[Q]):bt(v[Q]);C(f[Q],ne,y,null,M,P,A,k,V)}N>I?Ke(f,M,P,!0,!1,U):q(v,y,T,M,P,A,k,V,U)},We=(f,v,y,T,M,P,A,k,V)=>{let N=0;const I=v.length;let U=f.length-1,Q=I-1;for(;N<=U&&N<=Q;){const ne=f[N],ce=v[N]=V?St(v[N]):bt(v[N]);if(gn(ne,ce))C(ne,ce,y,null,M,P,A,k,V);else break;N++}for(;N<=U&&N<=Q;){const ne=f[U],ce=v[Q]=V?St(v[Q]):bt(v[Q]);if(gn(ne,ce))C(ne,ce,y,null,M,P,A,k,V);else break;U--,Q--}if(N>U){if(N<=Q){const ne=Q+1,ce=ne<I?v[ne].el:T;for(;N<=Q;)C(null,v[N]=V?St(v[N]):bt(v[N]),y,ce,M,P,A,k,V),N++}}else if(N>Q)for(;N<=U;)Te(f[N],M,P,!0),N++;else{const ne=N,ce=N,ye=new Map;for(N=ce;N<=Q;N++){const Ye=v[N]=V?St(v[N]):bt(v[N]);Ye.key!=null&&ye.set(Ye.key,N)}let be,Ie=0;const De=Q-ce+1;let ft=!1,pt=0;const vn=new Array(De);for(N=0;N<De;N++)vn[N]=0;for(N=ne;N<=U;N++){const Ye=f[N];if(Ie>=De){Te(Ye,M,P,!0);continue}let mt;if(Ye.key!=null)mt=ye.get(Ye.key);else for(be=ce;be<=Q;be++)if(vn[be-ce]===0&&gn(Ye,v[be])){mt=be;break}mt===void 0?Te(Ye,M,P,!0):(vn[mt-ce]=N+1,mt>=pt?pt=mt:ft=!0,C(Ye,v[mt],y,null,M,P,A,k,V),Ie++)}const xo=ft?ka(vn):tn;for(be=xo.length-1,N=De-1;N>=0;N--){const Ye=ce+N,mt=v[Ye],yo=v[Ye+1],_o=Ye+1<I?yo.el||kl(yo):T;vn[N]===0?C(null,mt,y,_o,M,P,A,k,V):ft&&(be<0||N!==xo[be]?et(mt,y,_o,2):be--)}}},et=(f,v,y,T,M=null)=>{const{el:P,type:A,transition:k,children:V,shapeFlag:N}=f;if(N&6){et(f.component.subTree,v,y,T);return}if(N&128){f.suspense.move(v,y,T);return}if(N&64){A.move(f,v,y,J);return}if(A===X){s(P,v,y);for(let U=0;U<V.length;U++)et(V[U],v,y,T);s(f.anchor,v,y);return}if(A===zn){g(f,v,y);return}if(T!==2&&N&1&&k)if(T===0)k.persisted&&!P[As]?s(P,v,y):(k.beforeEnter(P),s(P,v,y),ze(()=>k.enter(P),M));else{const{leave:U,delayLeave:Q,afterLeave:ne}=k,ce=()=>{f.ctx.isUnmounted?o(P):s(P,v,y)},ye=()=>{const be=P._isLeaving||!!P[As];P._isLeaving&&P[As](!0),k.persisted&&!be?ce():U(P,()=>{ce(),ne&&ne()})};Q?Q(P,ce,ye):ye()}else s(P,v,y)},Te=(f,v,y,T=!1,M=!1)=>{const{type:P,props:A,ref:k,children:V,dynamicChildren:N,shapeFlag:I,patchFlag:U,dirs:Q,cacheIndex:ne,memo:ce}=f;if(U===-2&&(M=!1),k!=null&&(Ot(),Cn(k,null,y,f,!0),Dt()),ne!=null&&(v.renderCache[ne]=void 0),I&256){v.ctx.deactivate(f);return}const ye=I&1&&Q,be=!on(f);let Ie;if(be&&(Ie=A&&A.onVnodeBeforeUnmount)&&vt(Ie,v,f),I&6)dt(f.component,y,T);else{if(I&128){f.suspense.unmount(y,T);return}ye&&Bt(f,null,v,"beforeUnmount"),I&64?f.type.remove(f,v,y,J,T):N&&!N.hasOnce&&(P!==X||U>0&&U&64)?Ke(N,v,y,!1,!0):(P===X&&U&384||!M&&I&16)&&Ke(V,v,y),T&&kt(f)}const De=ce!=null&&ne==null;(be&&(Ie=A&&A.onVnodeUnmounted)||ye||De)&&ze(()=>{Ie&&vt(Ie,v,f),ye&&Bt(f,null,v,"unmounted"),De&&(f.el=null)},y)},kt=f=>{const{type:v,el:y,anchor:T,transition:M}=f;if(v===X){Je(y,T);return}if(v===zn){b(f);return}const P=()=>{o(y),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(f.shapeFlag&1&&M&&!M.persisted){const{leave:A,delayLeave:k}=M,V=()=>A(y,P);k?k(f.el,P,V):V()}else P()},Je=(f,v)=>{let y;for(;f!==v;)y=p(f),o(f),f=y;o(v)},dt=(f,v,y)=>{const{bum:T,scope:M,job:P,subTree:A,um:k,m:V,a:N}=f;Vo(V),Vo(N),T&&Wn(T),M.stop(),P&&(P.flags|=8,Te(A,f,v,y)),k&&ze(k,v),ze(()=>{f.isUnmounted=!0},v)},Ke=(f,v,y,T=!1,M=!1,P=0)=>{for(let A=P;A<f.length;A++)Te(f[A],v,y,T,M)},D=f=>{if(f.shapeFlag&6)return D(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const v=p(f.anchor||f.el),y=v&&v[Ui];return y?p(y):v};let W=!1;const G=(f,v,y)=>{let T;f==null?v._vnode&&(Te(v._vnode,null,null,!0),T=v._vnode.component):C(v._vnode||null,f,v,null,null,null,y),v._vnode=f,W||(W=!0,Ao(T),Kr(),W=!1)},J={p:C,um:Te,m:et,r:kt,mt:Ge,mc:q,pc:de,pbc:Y,n:D,o:e};return{render:G,hydrate:void 0,createApp:la(G)}}function Es({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 Gt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _l(e,t,n=!1){const s=e.children,o=t.children;if(ee(s)&&ee(o))for(let r=0;r<s.length;r++){const i=s[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=St(o[r]),a.el=i.el),!n&&a.patchFlag!==-2&&_l(i,a)),a.type===gs&&(a.patchFlag===-1&&(a=o[r]=St(a)),a.el=i.el),a.type===wt&&!a.el&&(a.el=i.el)}}function ka(e){const t=e.slice(),n=[0];let s,o,r,i,a;const u=e.length;for(s=0;s<u;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;)a=r+i>>1,e[n[a]]<d?r=a+1:i=a;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 wl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wl(t)}function Vo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function kl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?kl(t.subTree):null}const $l=e=>e.__isSuspense;function $a(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Mi(e)}const X=Symbol.for("v-fgt"),gs=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),zn=Symbol.for("v-stc"),Tt=[];let Ze=null;function h(e=!1){Tt.push(Ze=e?null:[])}function vo(){Tt.pop(),Ze=Tt[Tt.length-1]||null}let Pn=1;function ts(e,t=!1){Pn+=e,e<0&&Ze&&t&&(Ze.hasOnce=!0)}function Cl(e){return e.dynamicChildren=Pn>0?Ze||tn:null,vo(),Pn>0&&Ze&&Ze.push(e),e}function w(e,t,n,s,o,r){return Cl(l(e,t,n,s,o,r,!0))}function _e(e,t,n,s,o){return Cl(oe(e,t,n,s,o,!0))}function Tn(e){return e?e.__v_isVNode===!0:!1}function gn(e,t){return e.type===t.type&&e.key===t.key}const Al=({key:e})=>e??null,Qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||Le(e)||re(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,s=0,o=null,r=e===X?0:1,i=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Al(t),ref:t&&Qn(t),scopeId:Qr,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:Ne};return a?(ns(u,n),r&128&&e.normalize(u)):n&&(u.shapeFlag|=$e(n)?8:16),Pn>0&&!i&&Ze&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Ze.push(u),u}const oe=Ca;function Ca(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===rl)&&(e=wt),Tn(e)){const a=un(e,t,!0);return n&&ns(a,n),Pn>0&&!r&&Ze&&(a.shapeFlag&6?Ze[Ze.indexOf(e)]=a:Ze.push(a)),a.patchFlag=-2,a}if(Na(e)&&(e=e.__vccOpts),t){t=Aa(t);let{class:a,style:u}=t;a&&!$e(a)&&(t.class=ue(a)),ge(u)&&(io(u)&&!ee(u)&&(u=Ve({},u)),t.style=Jt(u))}const i=$e(e)?1:$l(e)?128:ps(e)?64:ge(e)?4:re(e)?2:0;return l(e,t,n,s,o,i,r,!0)}function Aa(e){return e?io(e)||vl(e)?Ve({},e):e:null}function un(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:u}=e,d=t?El(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Al(d),ref:t&&t.ref?n&&r?ee(r)?r.concat(Qn(t)):[r,Qn(t)]:Qn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==X?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&un(e.ssContent),ssFallback:e.ssFallback&&un(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&co(c,u.clone(c)),c}function Z(e=" ",t=0){return oe(gs,null,e,t)}function Sl(e,t){const n=oe(zn,null,e);return n.staticCount=t,n}function B(e="",t=!1){return t?(h(),_e(wt,null,e)):oe(wt,null,e)}function bt(e){return e==null||typeof e=="boolean"?oe(wt):ee(e)?oe(X,null,e.slice()):Tn(e)?St(e):oe(gs,null,String(e))}function St(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:un(e)}function ns(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ns(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!vl(t)?t._ctx=Ne:o===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(re(t)){if(s&65){ns(e,{default:t});return}t={default:t,_ctx:Ne},n=32}else t=String(t),s&64?(n=16,t=[Z(t)]):n=8;e.children=t,e.shapeFlag|=n}function El(...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=ue([t.class,s.class]));else if(o==="style")t.style=Jt([t.style,s.style]);else if(os(o)){const r=t[o],i=s[o];i&&r!==i&&!(ee(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!rs(o)&&(t[o]=i)}else o!==""&&(t[o]=s[o])}return t}function vt(e,t,n,s=null){ut(e,t,7,[n,s])}const Sa=cl();let Ea=0;function Ia(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Sa,r={uid:Ea++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new li(!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:gl(s,o),emitsOptions:dl(s,o),emit:null,emitted:null,propsDefaults:we,inheritAttrs:s.inheritAttrs,ctx:we,data:we,props:we,attrs:we,slots:we,refs:we,setupState:we,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=aa.bind(null,r),e.ce&&e.ce(r),r}let Ue=null;const Ra=()=>Ue||Ne;let ss,On;{const e=us(),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)}};ss=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),On=t("__VUE_SSR_SETTERS__",n=>Dn=n)}const Un=e=>{const t=Ue;return ss(e),e.scope.on(),()=>{e.scope.off(),ss(t)}},jo=()=>{Ue&&Ue.scope.off(),ss(null)};function Il(e){return e.vnode.shapeFlag&4}let Dn=!1;function Pa(e,t=!1,n=!1){t&&On(t);const{props:s,children:o}=e.vnode,r=Il(e);ma(e,s,r,t),ba(e,o,n||t);const i=r?Ta(e,t):void 0;return t&&On(!1),i}function Ta(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xi);const{setup:s}=n;if(s){Ot();const o=e.setupContext=s.length>1?Da(e):null,r=Un(e),i=jn(s,e,0,[e.props,o]),a=_r(i);if(Dt(),r(),(a||e.sp)&&!on(e)&&el(e),a){if(i.then(jo,jo),t)return i.then(u=>{On(!0);try{Uo(e,u,t)}finally{On(!1)}}).catch(u=>{fs(u,e,0)});e.asyncDep=i}else Uo(e,i)}else Rl(e)}function Uo(e,t,n){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=Br(t)),Rl(e)}function Rl(e,t,n){const s=e.type;e.render||(e.render=s.render||yt);{const o=Un(e);Ot();try{ea(e)}finally{Dt(),o()}}}const Oa={get(e,t){return je(e,"get",""),e[t]}};function Da(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Oa),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Br(Ci(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in An)return An[n](e)},has(t,n){return n in t||n in An}})):e.proxy}function Ma(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function Na(e){return re(e)&&"__vccOpts"in e}const le=(e,t)=>Ri(e,t,Dn);function Pl(e,t,n){try{ts(-1);const s=arguments.length;return s===2?ge(t)&&!ee(t)?Tn(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Tn(n)&&(n=[n]),oe(e,t,n))}finally{ts(1)}}const Va="3.5.41";/**
* @vue/runtime-dom v3.5.41
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Gs;const Lo=typeof window<"u"&&window.trustedTypes;if(Lo)try{Gs=Lo.createPolicy("vue",{createHTML:e=>e})}catch{}const Tl=Gs?e=>Gs.createHTML(e):e=>e,ja="http://www.w3.org/2000/svg",Ua="http://www.w3.org/1998/Math/MathML",At=typeof document<"u"?document:null,Fo=At&&At.createElement("template"),La={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"?At.createElementNS(ja,e):t==="mathml"?At.createElementNS(Ua,e):n?At.createElement(e,{is:n}):At.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>At.createTextNode(e),createComment:e=>At.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>At.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{Fo.innerHTML=Tl(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Fo.content;if(s==="svg"||s==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Fa=Symbol("_vtc");function qa(e,t,n){const s=e[Fa];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qo=Symbol("_vod"),Ha=Symbol("_vsh"),Ba=Symbol(""),Ga=/(?:^|;)\s*display\s*:/;function Wa(e,t,n){const s=e.style,o=$e(n);let r=!1;if(n&&!o){if(t)if($e(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&yn(s,a,"")}else for(const i in t)n[i]==null&&yn(s,i,"");for(const i in n){i==="display"&&(r=!0);const a=n[i];a!=null?za(e,i,!$e(t)&&t?t[i]:void 0,a)||yn(s,i,a):yn(s,i,"")}}else if(o){if(t!==n){const i=s[Ba];i&&(n+=";"+i),s.cssText=n,r=Ga.test(n)}}else t&&e.removeAttribute("style");qo in e&&(e[qo]=r?s.display:"",e[Ha]&&(s.display="none"))}const Ho=/\s*!important$/;function yn(e,t,n){if(ee(n))n.forEach(s=>yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ka(e,t);Ho.test(n)?e.setProperty(Yt(s),n.replace(Ho,""),"important"):e[s]=n}}const Bo=["Webkit","Moz","ms"],Is={};function Ka(e,t){const n=Is[t];if(n)return n;let s=Be(t);if(s!=="filter"&&s in e)return Is[t]=s;s=is(s);for(let o=0;o<Bo.length;o++){const r=Bo[o]+s;if(r in e)return Is[t]=r}return t}function za(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&$e(s)&&n===s}const Go="http://www.w3.org/1999/xlink";function Wo(e,t,n,s,o,r=oi(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Go,t.slice(6,t.length)):e.setAttributeNS(Go,t,n):n==null||r&&!Cr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":it(n)?String(n):n)}function Ko(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Tl(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(a!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Cr(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(o||t)}function Rt(e,t,n,s){e.addEventListener(t,n,s)}function Qa(e,t,n,s){e.removeEventListener(t,n,s)}const zo=Symbol("_vei");function Ja(e,t,n,s,o=null){const r=e[zo]||(e[zo]={}),i=r[t];if(s&&i)i.value=s;else{const[a,u]=Xa(t);if(s){const d=r[t]=nu(s,o);Rt(e,a,d,u)}else i&&(Qa(e,a,i,u),r[t]=void 0)}}const Ya=/(Once|Passive|Capture)$/,Za=/^on:?(?:Once|Passive|Capture)$/;function Xa(e){let t,n;for(;(n=e.match(Ya))&&!Za.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Yt(e.slice(2)),t]}let Rs=0;const eu=Promise.resolve(),tu=()=>Rs||(eu.then(()=>Rs=0),Rs=Date.now());function nu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(ee(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),a=[s];for(let u=0;u<i.length&&!s._stopped;u++){const d=i[u];d&&ut(d,t,5,a)}}else ut(o,t,5,[s])};return n.value=e,n.attached=tu(),n}const Qo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,su=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?qa(e,s,i):t==="style"?Wa(e,n,s):os(t)?rs(t)||Ja(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ou(e,t,s,i))?(Ko(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Wo(e,t,s,i,r,t!=="value")):e._isVueCE&&(ru(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$e(s)))?Ko(e,Be(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Wo(e,t,s,i))};function ou(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Qo(t)&&re(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 Qo(t)&&$e(n)?!1:t in e}function ru(e,t){const n=e._def.props;if(!n)return!1;const s=Be(t);return Array.isArray(n)?n.some(o=>Be(o)===s):Object.keys(n).some(o=>Be(o)===s)}const qt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>Wn(t,n):t};function lu(e){e.target.composing=!0}function Jo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Xe=Symbol("_assign"),Hn=Symbol("_initialValue");function Ps(e,t,n){return t&&(e=e.trim()),n&&(e=as(e)),e}const ie={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Hn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Hn]=e.defaultValue.replace(/\r\n?/g,`
`))),e[Xe]=qt(o);const r=s||o.props&&o.props.type==="number";Rt(e,t?"change":"input",i=>{i.target.composing||e[Xe](Ps(e.value,n,r))}),(n||r)&&Rt(e,"change",()=>{e.value=Ps(e.value,n,r)}),t||(Rt(e,"compositionstart",lu),Rt(e,"compositionend",Jo),Rt(e,"change",Jo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Hn];delete e[Hn],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Xe](Ps(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[Xe]=qt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?as(e.value):e.value,u=t??"";if(a===u)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},_t={deep:!0,created(e,t,n){e[Xe]=qt(n),Rt(e,"change",()=>{const s=e._modelValue,o=cn(e),r=e.checked,i=e[Xe];if(ee(s)){const a=eo(s,o),u=a!==-1;if(r&&!u)i(s.concat(o));else if(!r&&u){const d=[...s];d.splice(a,1),i(d)}}else if(pn(s)){const a=new Set(s);r?a.add(o):a.delete(o),i(a)}else i(Ol(e,r))})},mounted:Yo,beforeUpdate(e,t,n){e[Xe]=qt(n),Yo(e,t,n)}};function Yo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(ee(t))o=eo(t,s.props.value)>-1;else if(pn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ft(t,Ol(e,!0))}e.checked!==o&&(e.checked=o)}const Ws={created(e,{value:t},n){e.checked=Ft(t,n.props.value),e[Xe]=qt(n),Rt(e,"change",()=>{e[Xe](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Xe]=qt(s),t!==n&&(e.checked=Ft(t,s.props.value))}},Ht={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Rt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?as(cn(r)):cn(r));e[Xe](e.multiple?pn(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,ao(()=>{e._assigning=!1})}),e[Xe]=qt(s)},mounted(e,{value:t}){Zo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Xe]=qt(n)},updated(e,{value:t}){e._assigning||Zo(e,t)}};function Zo(e,t){const n=e.multiple,s=ee(t);if(!(n&&!s&&!pn(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=cn(i);if(n)if(s){const u=typeof a;u==="string"||u==="number"?i.selected=t.some(d=>String(d)===String(a)):i.selected=eo(t,a)>-1}else i.selected=t.has(a);else if(Ft(cn(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function Ol(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const iu=["ctrl","shift","alt","meta"],au={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)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},Ae=(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 a=au[t[i]];if(a&&a(o,t))return}return e(o,...r)}))},uu=Ve({patchProp:su},La);let Xo;function cu(){return Xo||(Xo=ya(uu))}const du=((...e)=>{const t=cu().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=pu(s);if(!o)return;const r=t._component;!re(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,fu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function fu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function pu(e){return $e(e)?document.querySelector(e):e}const mu=["width","height"],Oe={__name:"UiIcono",props:{nombre:{type:String,required:!0},tam:{type:[Number,String],default:16}},setup(e){const t={luna:[["path",{d:"M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z"}]],sol:[["circle",{cx:12,cy:12,r:4}],["path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"}]],lapiz:[["path",{d:"M12 20h9"}],["path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"}]],cerrar:[["path",{d:"M18 6 6 18M6 6l12 12"}]],atras:[["path",{d:"M19 12H5M12 19l-7-7 7-7"}]],grafico:[["path",{d:"M3 3v18h18"}],["path",{d:"M7 15v3M12 10v8M17 6v12"}]],cerebro:[["path",{d:"M9.5 3A2.5 2.5 0 0 0 7 5.5v.2A2.7 2.7 0 0 0 5 8.3c0 .8.3 1.5.9 2A2.8 2.8 0 0 0 5 12.5c0 1 .5 1.9 1.3 2.4-.2.4-.3.8-.3 1.2A2.9 2.9 0 0 0 9 19a2.5 2.5 0 0 0 3 2V3.8A2.5 2.5 0 0 0 9.5 3Z"}],["path",{d:"M14.5 3A2.5 2.5 0 0 1 17 5.5v.2a2.7 2.7 0 0 1 2 2.6c0 .8-.3 1.5-.9 2A2.8 2.8 0 0 1 19 12.5c0 1-.5 1.9-1.3 2.4.2.4.3.8.3 1.2A2.9 2.9 0 0 1 15 19a2.5 2.5 0 0 1-3 2"}]],imagen:[["rect",{x:3,y:3,width:18,height:18,rx:2}],["circle",{cx:8.5,cy:8.5,r:1.5}],["path",{d:"m21 15-5-5L5 21"}]],microfono:[["rect",{x:9,y:2,width:6,height:12,rx:3}],["path",{d:"M5 10a7 7 0 0 0 14 0M12 17v5"}]],escribir:[["path",{d:"M3 21h18"}],["path",{d:"M5 17 17.5 4.5a2.1 2.1 0 0 1 3 3L8 20l-4 1Z"}]],archivo:[["path",{d:"M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v5h5"}]],sitio:[["circle",{cx:12,cy:12,r:9}],["path",{d:"M3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18Z"}]],refrescar:[["path",{d:"M21 12a9 9 0 1 1-3-6.7"}],["path",{d:"M21 4v5h-5"}]],descargar:[["path",{d:"M12 3v12"}],["path",{d:"m7 11 5 5 5-5"}],["path",{d:"M4 21h16"}]],alerta:[["path",{d:"M12 9v4M12 17h.01"}],["path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"}]],ok:[["path",{d:"M20 6 9 17l-5-5"}]],copiar:[["rect",{x:9,y:9,width:12,height:12,rx:2}],["path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}]],mensaje:[["path",{d:"M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.9-.9L3 21l1.9-5.1A8.4 8.4 0 0 1 4 11.5a8.5 8.5 0 0 1 8.5-8.5A8.4 8.4 0 0 1 21 11.5Z"}]],auto:[["path",{d:"M17 2.1 21 6l-4 3.9"}],["path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}],["path",{d:"M7 21.9 3 18l4-3.9"}],["path",{d:"M21 13v2a4 4 0 0 1-4 4H3"}]]};return(n,s)=>(h(),w("svg",{width:e.tam,height:e.tam,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round",class:"inline-block shrink-0 align-[-0.15em]","aria-hidden":"true"},[(h(!0),w(X,null,xe(t[e.nombre]||[],(o,r)=>(h(),_e(Yi(o[0]),El({key:r},{ref_for:!0},o[1]),null,16))),128))],8,mu))}};/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const en=typeof document<"u";function Dl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function vu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Dl(e.default)}const me=Object.assign;function Ts(e,t){const n={};for(const s in t){const o=t[s];n[s]=ct(o)?o.map(e):e(o)}return n}const Sn=()=>{},ct=Array.isArray;function er(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Ml=/#/g,hu=/&/g,gu=/\//g,bu=/=/g,xu=/\?/g,Nl=/\+/g,yu=/%5B/g,_u=/%5D/g,Vl=/%5E/g,wu=/%60/g,jl=/%7B/g,ku=/%7C/g,Ul=/%7D/g,$u=/%20/g;function ho(e){return e==null?"":encodeURI(""+e).replace(ku,"|").replace(yu,"[").replace(_u,"]")}function Cu(e){return ho(e).replace(jl,"{").replace(Ul,"}").replace(Vl,"^")}function Ks(e){return ho(e).replace(Nl,"%2B").replace($u,"+").replace(Ml,"%23").replace(hu,"%26").replace(wu,"`").replace(jl,"{").replace(Ul,"}").replace(Vl,"^")}function Au(e){return Ks(e).replace(bu,"%3D")}function Su(e){return ho(e).replace(Ml,"%23").replace(xu,"%3F")}function Eu(e){return Su(e).replace(gu,"%2F")}function Mn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Iu=/\/$/,Ru=e=>e.replace(Iu,"");function Os(e,t,n="/"){let s,o={},r="",i="";const a=t.indexOf("#");let u=t.indexOf("?");return u=a>=0&&u>a?-1:u,u>=0&&(s=t.slice(0,u),r=t.slice(u,a>0?a:t.length),o=e(r.slice(1))),a>=0&&(s=s||t.slice(0,a),i=t.slice(a,t.length)),s=Du(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:Mn(i)}}function Pu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function tr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Tu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&dn(t.matched[s],n.matched[o])&&Ll(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function dn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ll(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ou(e[n],t[n]))return!1;return!0}function Ou(e,t){return ct(e)?nr(e,t):ct(t)?nr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function nr(e,t){return ct(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Du(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,a;for(i=0;i<s.length;i++)if(a=s[i],a!==".")if(a==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const jt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let zs=(function(e){return e.pop="pop",e.push="push",e})({}),Ds=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Mu(e){if(!e)if(en){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ru(e)}const Nu=/^[^#]+#/;function Vu(e,t){return e.replace(Nu,"#")+t}function ju(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 xs=()=>({left:window.scrollX,top:window.scrollY});function Uu(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=ju(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 sr(e,t){return(history.state?history.state.position-t:-1)+e}const Qs=new Map;function Lu(e,t){Qs.set(e,t)}function Fu(e){const t=Qs.get(e);return Qs.delete(e),t}function qu(e){return typeof e=="string"||e&&typeof e=="object"}function Fl(e){return typeof e=="string"||typeof e=="symbol"}let Ce=(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 ql=Symbol("");Ce.MATCHER_NOT_FOUND+"",Ce.NAVIGATION_GUARD_REDIRECT+"",Ce.NAVIGATION_ABORTED+"",Ce.NAVIGATION_CANCELLED+"",Ce.NAVIGATION_DUPLICATED+"";function fn(e,t){return me(new Error,{type:e,[ql]:!0},t)}function Ct(e,t){return e instanceof Error&&ql in e&&(t==null||!!(e.type&t))}const Hu=["params","query","hash"];function Bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Hu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Gu(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(Nl," "),r=o.indexOf("="),i=Mn(r<0?o:o.slice(0,r)),a=r<0?null:Mn(o.slice(r+1));if(i in t){let u=t[i];ct(u)||(u=t[i]=[u]),u.push(a)}else t[i]=a}return t}function or(e){let t="";for(let n in e){const s=e[n];if(n=Au(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ct(s)?s.map(o=>o&&Ks(o)):[s&&Ks(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Wu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ct(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Ku=Symbol(""),rr=Symbol(""),ys=Symbol(""),go=Symbol(""),Js=Symbol("");function bn(){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 Lt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((a,u)=>{const d=p=>{p===!1?u(fn(Ce.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?u(p):qu(p)?u(fn(Ce.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[o]===i&&typeof p=="function"&&i.push(p),a())},c=r(()=>e.call(s&&s.instances[o],t,n,d));let m=Promise.resolve(c);e.length<3&&(m=m.then(d)),m.catch(p=>u(p))})}function Ms(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const a in i.components){let u=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Dl(u)){const d=(u.__vccOpts||u)[t];d&&r.push(Lt(d,n,s,i,a,o))}else{let d=u();r.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const m=vu(c)?c.default:c;i.mods[a]=c,i.components[a]=m;const p=(m.__vccOpts||m)[t];return p&&Lt(p,n,s,i,a,o)()}))}}return r}function zu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;i<r;i++){const a=t.matched[i];a&&(e.matched.find(d=>dn(d,a))?s.push(a):n.push(a));const u=e.matched[i];u&&(t.matched.find(d=>dn(d,u))||o.push(u))}return[n,s,o]}/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Qu=()=>location.protocol+"//"+location.host;function Hl(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,a=o.slice(i);return a[0]!=="/"&&(a="/"+a),tr(a,"")}return tr(n,e)+s+o}function Ju(e,t,n,s){let o=[],r=[],i=null;const a=({state:p})=>{const x=Hl(e,location),S=n.value,C=t.value;let R=0;if(p){if(n.value=x,t.value=p,i&&i===S){i=null;return}R=C?p.position-C.position:0}else s(x);o.forEach(O=>{O(n.value,S,{delta:R,type:zs.pop,direction:R?R>0?Ds.forward:Ds.back:Ds.unknown})})};function u(){i=n.value}function d(p){o.push(p);const x=()=>{const S=o.indexOf(p);S>-1&&o.splice(S,1)};return r.push(x),x}function c(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(me({},p.state,{scroll:xs()}),"")}}function m(){for(const p of r)p();r=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:u,listen:d,destroy:m}}function lr(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?xs():null}}function Yu(e){const{history:t,location:n}=window,s={value:Hl(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(u,d,c){const m=e.indexOf("#"),p=m>-1?(n.host&&document.querySelector("base")?e:e.slice(m))+u:Qu()+e+u;try{t[c?"replaceState":"pushState"](d,"",p),o.value=d}catch(x){console.error(x),n[c?"replace":"assign"](p)}}function i(u,d){r(u,me({},t.state,lr(o.value.back,u,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=u}function a(u,d){const c=me({},o.value,t.state,{forward:u,scroll:xs()});r(c.current,c,!0),r(u,me({},lr(s.value,u,null),{position:c.position+1},d),!1),s.value=u}return{location:s,state:o,push:a,replace:i}}function Zu(e){e=Mu(e);const t=Yu(e),n=Ju(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=me({location:"",base:e,go:s,createHref:Vu.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 Kt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Re=(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})(Re||{});const Xu={type:Kt.Static,value:""},ec=/[a-zA-Z0-9_]/;function tc(e){if(!e)return[[]];if(e==="/")return[[Xu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${n})/"${d}": ${x}`)}let n=Re.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let a=0,u,d="",c="";function m(){d&&(n===Re.Static?r.push({type:Kt.Static,value:d}):n===Re.Param||n===Re.ParamRegExp||n===Re.ParamRegExpEnd?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Kt.Param,value:d,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=u}for(;a<e.length;){if(u=e[a++],u==="\\"&&n!==Re.ParamRegExp){s=n,n=Re.EscapeNext;continue}switch(n){case Re.Static:u==="/"?(d&&m(),i()):u===":"?(m(),n=Re.Param):p();break;case Re.EscapeNext:p(),n=s;break;case Re.Param:u==="("?n=Re.ParamRegExp:ec.test(u)?p():(m(),n=Re.Static,u!=="*"&&u!=="?"&&u!=="+"&&a--);break;case Re.ParamRegExp:u===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+u:n=Re.ParamRegExpEnd:c+=u;break;case Re.ParamRegExpEnd:m(),n=Re.Static,u!=="*"&&u!=="?"&&u!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===Re.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),m(),i(),o}const ir="[^/]+?",nc={sensitive:!1,strict:!1,start:!0,end:!0};var qe=(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})(qe||{});const sc=/[.+*?^${}()[\]/\\]/g;function oc(e,t){const n=me({},nc,t),s=[];let o=n.start?"^":"";const r=[];for(const d of e){const c=d.length?[]:[qe.Root];n.strict&&!d.length&&(o+="/");for(let m=0;m<d.length;m++){const p=d[m];let x=qe.Segment+(n.sensitive?qe.BonusCaseSensitive:0);if(p.type===Kt.Static)m||(o+="/"),o+=p.value.replace(sc,"\\$&"),x+=qe.Static;else if(p.type===Kt.Param){const{value:S,repeatable:C,optional:R,regexp:O}=p;r.push({name:S,repeatable:C,optional:R});const $=O||ir;if($!==ir){x+=qe.BonusCustomRegExp;try{`${$}`}catch(b){throw new Error(`Invalid custom RegExp for param "${S}" (${$}): `+b.message)}}let g=C?`((?:${$})(?:/(?:${$}))*)`:`(${$})`;m||(g=R&&d.length<2?`(?:/${g})`:"/"+g),R&&(g+="?"),o+=g,x+=qe.Dynamic,R&&(x+=qe.BonusOptional),C&&(x+=qe.BonusRepeatable),$===".*"&&(x+=qe.BonusWildcard)}c.push(x)}s.push(c)}if(n.strict&&n.end){const d=s.length-1;s[d][s[d].length-1]+=qe.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function a(d){const c=d.match(i),m={};if(!c)return null;for(let p=1;p<c.length;p++){const x=c[p]||"",S=r[p-1];m[S.name]=x&&S.repeatable?x.split("/"):x}return m}function u(d){let c="",m=!1;for(const p of e){(!m||!c.endsWith("/"))&&(c+="/"),m=!1;for(const x of p)if(x.type===Kt.Static)c+=x.value;else if(x.type===Kt.Param){const{value:S,repeatable:C,optional:R}=x,O=S in d?d[S]:"";if(ct(O)&&!C)throw new Error(`Provided param "${S}" is an array but it is not repeatable (* or + modifiers)`);const $=ct(O)?O.join("/"):O;if(!$)if(R)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):m=!0);else throw new Error(`Missing required param "${S}"`);c+=$}}return c||"/"}return{re:i,score:s,keys:r,parse:a,stringify:u}}function rc(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]===qe.Static+qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function Bl(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=rc(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(ar(s))return 1;if(ar(o))return-1}return o.length-s.length}function ar(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lc={strict:!1,end:!0,sensitive:!1};function ic(e,t,n){const s=oc(tc(e.path),n),o=me(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function ac(e,t){const n=[],s=new Map;t=er(lc,t);function o(m){return s.get(m)}function r(m,p,x){const S=!x,C=cr(m);C.aliasOf=x&&x.record;const R=er(t,m),O=[C];if("alias"in m){const b=typeof m.alias=="string"?[m.alias]:m.alias;for(const _ of b)O.push(cr(me({},C,{components:x?x.record.components:C.components,path:_,aliasOf:x?x.record:C})))}let $,g;for(const b of O){const{path:_}=b;if(p&&_[0]!=="/"){const j=p.record.path,H=j[j.length-1]==="/"?"":"/";b.path=p.record.path+(_&&H+_)}if($=ic(b,p,R),x?x.alias.push($):(g=g||$,g!==$&&g.alias.push($),S&&m.name&&!dr($)&&i(m.name)),Gl($)&&u($),C.children){const j=C.children;for(let H=0;H<j.length;H++)r(j[H],$,x&&x.children[H])}x=x||$}return g?()=>{i(g)}:Sn}function i(m){if(Fl(m)){const p=s.get(m);p&&(s.delete(m),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(m);p>-1&&(n.splice(p,1),m.record.name&&s.delete(m.record.name),m.children.forEach(i),m.alias.forEach(i))}}function a(){return n}function u(m){const p=dc(m,n);n.splice(p,0,m),m.record.name&&!dr(m)&&s.set(m.record.name,m)}function d(m,p){let x,S={},C,R;if("name"in m&&m.name){if(x=s.get(m.name),!x)throw fn(Ce.MATCHER_NOT_FOUND,{location:m});R=x.record.name,S=me(ur(p.params,x.keys.filter(g=>!g.optional).concat(x.parent?x.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),m.params&&ur(m.params,x.keys.map(g=>g.name))),C=x.stringify(S)}else if(m.path!=null)C=m.path,x=n.find(g=>g.re.test(C)),x&&(S=x.parse(C),R=x.record.name);else{if(x=p.name?s.get(p.name):n.find(g=>g.re.test(p.path)),!x)throw fn(Ce.MATCHER_NOT_FOUND,{location:m,currentLocation:p});R=x.record.name,S=me({},p.params,m.params),C=x.stringify(S)}const O=[];let $=x;for(;$;)O.unshift($.record),$=$.parent;return{name:R,path:C,params:S,matched:O,meta:cc(O)}}e.forEach(m=>r(m));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:o}}function ur(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function cr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:uc(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 uc(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 dr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function cc(e){return e.reduce((t,n)=>me(t,n.meta),{})}function dc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Bl(e,t[r])<0?s=r:n=r+1}const o=fc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function fc(e){let t=e;for(;t=t.parent;)if(Gl(t)&&Bl(e,t)===0)return t}function Gl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function fr(e){const t=rt(ys),n=rt(go),s=le(()=>{const u=Pe(e.to);return t.resolve(u)}),o=le(()=>{const{matched:u}=s.value,{length:d}=u,c=u[d-1],m=n.matched;if(!c||!m.length)return-1;const p=m.findIndex(dn.bind(null,c));if(p>-1)return p;const x=pr(u[d-2]);return d>1&&pr(c)===x&&m[m.length-1].path!==x?m.findIndex(dn.bind(null,u[d-2])):p}),r=le(()=>o.value>-1&&gc(n.params,s.value.params)),i=le(()=>o.value>-1&&o.value===n.matched.length-1&&Ll(n.params,s.value.params));function a(u={}){if(hc(u)){const d=t[Pe(e.replace)?"replace":"push"](Pe(e.to)).catch(Sn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:le(()=>s.value.href),isActive:r,isExactActive:i,navigate:a}}function pc(e){return e.length===1?e[0]:e}const mc=Xr({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:fr,setup(e,{slots:t}){const n=ds(fr(e)),{options:s}=rt(ys),o=le(()=>({[mr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[mr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&pc(t.default(n));return e.custom?r:Pl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),vc=mc;function hc(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 gc(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(!ct(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function pr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mr=(e,t,n)=>e??t??n,bc=Xr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=rt(Js),o=le(()=>e.route||s.value),r=rt(rr,0),i=le(()=>{let d=Pe(r);const{matched:c}=o.value;let m;for(;(m=c[d])&&!m.components;)d++;return d}),a=le(()=>o.value.matched[i.value]);Kn(rr,le(()=>i.value+1)),Kn(Ku,a),Kn(Js,o);const u=L();return Pt(()=>[u.value,a.value,e.name],([d,c,m],[p,x,S])=>{c&&(c.instances[m]=d,x&&x!==c&&d&&d===p&&(c.leaveGuards.size||(c.leaveGuards=x.leaveGuards),c.updateGuards.size||(c.updateGuards=x.updateGuards))),d&&c&&(!x||!dn(c,x)||!p)&&(c.enterCallbacks[m]||[]).forEach(C=>C(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,m=a.value,p=m&&m.components[c];if(!p)return vr(n.default,{Component:p,route:d});const x=m.props[c],S=x?x===!0?d.params:typeof x=="function"?x(d):x:null,R=Pl(p,me({},S,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(m.instances[c]=null)},ref:u}));return vr(n.default,{Component:R,route:d})||R}}});function vr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xc=bc;function yc(e){const t=ac(e.routes,e),n=e.parseQuery||Gu,s=e.stringifyQuery||or,o=e.history,r=bn(),i=bn(),a=bn(),u=Ai(jt);let d=jt;en&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ts.bind(null,D=>""+D),m=Ts.bind(null,Eu),p=Ts.bind(null,Mn);function x(D,W){let G,J;return Fl(D)?(G=t.getRecordMatcher(D),J=W):J=D,t.addRoute(J,G)}function S(D){const W=t.getRecordMatcher(D);W&&t.removeRoute(W)}function C(){return t.getRoutes().map(D=>D.record)}function R(D){return!!t.getRecordMatcher(D)}function O(D,W){if(W=me({},W||u.value),typeof D=="string"){const y=Os(n,D,W.path),T=t.resolve({path:y.path},W),M=o.createHref(y.fullPath);return me(y,T,{params:p(T.params),hash:Mn(y.hash),redirectedFrom:void 0,href:M})}let G;if(D.path!=null)G=me({},D,{path:Os(n,D.path,W.path).path});else{const y=me({},D.params);for(const T in y)y[T]==null&&delete y[T];G=me({},D,{params:m(y)}),W.params=m(W.params)}const J=t.resolve(G,W),ae=D.hash||"";J.params=c(p(J.params));const f=Pu(s,me({},D,{hash:Cu(ae),path:J.path})),v=o.createHref(f);return me({fullPath:f,hash:ae,query:s===or?Wu(D.query):D.query||{}},J,{redirectedFrom:void 0,href:v})}function $(D){return typeof D=="string"?Os(n,D,u.value.path):me({},D)}function g(D,W){if(d!==D)return fn(Ce.NAVIGATION_CANCELLED,{from:W,to:D})}function b(D){return H(D)}function _(D){return b(me($(D),{replace:!0}))}function j(D,W){const G=D.matched[D.matched.length-1];if(G&&G.redirect){const{redirect:J}=G;let ae=typeof J=="function"?J(D,W):J;return typeof ae=="string"&&(ae=ae.includes("?")||ae.includes("#")?ae=$(ae):{path:ae},ae.params={}),me({query:D.query,hash:D.hash,params:ae.path!=null?{}:D.params},ae)}}function H(D,W){const G=d=O(D),J=u.value,ae=D.state,f=D.force,v=D.replace===!0,y=j(G,J);if(y)return H(me($(y),{state:typeof y=="object"?me({},ae,y.state):ae,force:f,replace:v}),W||G);const T=G;T.redirectedFrom=W;let M;return!f&&Tu(s,J,G)&&(M=fn(Ce.NAVIGATION_DUPLICATED,{to:T,from:J}),et(J,J,!0,!1)),(M?Promise.resolve(M):Y(T,J)).catch(P=>Ct(P)?Ct(P,Ce.NAVIGATION_GUARD_REDIRECT)?P:We(P):de(P,T,J)).then(P=>{if(P){if(Ct(P,Ce.NAVIGATION_GUARD_REDIRECT))return H(me({replace:v},$(P.to),{state:typeof P.to=="object"?me({},ae,P.to.state):ae,force:f}),W||T)}else P=Se(T,J,!0,v,ae);return F(T,J,P),P})}function q(D,W){const G=g(D,W);return G?Promise.reject(G):Promise.resolve()}function fe(D){const W=Je.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(D):D()}function Y(D,W){let G;const[J,ae,f]=zu(D,W);G=Ms(J.reverse(),"beforeRouteLeave",D,W);for(const y of J)y.leaveGuards.forEach(T=>{G.push(Lt(T,D,W))});const v=q.bind(null,D,W);return G.push(v),Ke(G).then(()=>{G=[];for(const y of r.list())G.push(Lt(y,D,W));return G.push(v),Ke(G)}).then(()=>{G=Ms(ae,"beforeRouteUpdate",D,W);for(const y of ae)y.updateGuards.forEach(T=>{G.push(Lt(T,D,W))});return G.push(v),Ke(G)}).then(()=>{G=[];for(const y of f)if(y.beforeEnter)if(ct(y.beforeEnter))for(const T of y.beforeEnter)G.push(Lt(T,D,W));else G.push(Lt(y.beforeEnter,D,W));return G.push(v),Ke(G)}).then(()=>(D.matched.forEach(y=>y.enterCallbacks={}),G=Ms(f,"beforeRouteEnter",D,W,fe),G.push(v),Ke(G))).then(()=>{G=[];for(const y of i.list())G.push(Lt(y,D,W));return G.push(v),Ke(G)}).catch(y=>Ct(y,Ce.NAVIGATION_CANCELLED)?y:Promise.reject(y))}function F(D,W,G){a.list().forEach(J=>fe(()=>J(D,W,G)))}function Se(D,W,G,J,ae){const f=g(D,W);if(f)return f;const v=W===jt,y=en?history.state:{};G&&(J||v?o.replace(D.fullPath,me({scroll:v&&y&&y.scroll},ae)):o.push(D.fullPath,ae)),u.value=D,et(D,W,G,v),We()}let K;function Ge(){K||(K=o.listen((D,W,G)=>{if(!dt.listening)return;const J=O(D),ae=j(J,dt.currentRoute.value);if(ae){H(me(ae,{replace:!0,force:!0}),J).catch(Sn);return}d=J;const f=u.value;en&&Lu(sr(f.fullPath,G.delta),xs()),Y(J,f).catch(v=>Ct(v,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_CANCELLED)?v:Ct(v,Ce.NAVIGATION_GUARD_REDIRECT)?(H(me($(v.to),{force:!0}),J).then(y=>{Ct(y,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&!G.delta&&G.type===zs.pop&&o.go(-1,!1)}).catch(Sn),Promise.reject()):(G.delta&&o.go(-G.delta,!1),de(v,J,f))).then(v=>{v=v||Se(J,f,!1),v&&(G.delta&&!Ct(v,Ce.NAVIGATION_CANCELLED)?o.go(-G.delta,!1):G.type===zs.pop&&Ct(v,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),F(J,f,v)}).catch(Sn)}))}let Vt=bn(),Ee=bn(),pe;function de(D,W,G){We(D);const J=Ee.list();return J.length?J.forEach(ae=>ae(D,W,G)):console.error(D),Promise.reject(D)}function nt(){return pe&&u.value!==jt?Promise.resolve():new Promise((D,W)=>{Vt.add([D,W])})}function We(D){return pe||(pe=!D,Ge(),Vt.list().forEach(([W,G])=>D?G(D):W()),Vt.reset()),D}function et(D,W,G,J){const{scrollBehavior:ae}=e;if(!en||!ae)return Promise.resolve();const f=!G&&Fu(sr(D.fullPath,0))||(J||!G)&&history.state&&history.state.scroll||null;return ao().then(()=>ae(D,W,f)).then(v=>v&&Uu(v)).catch(v=>de(v,D,W))}const Te=D=>o.go(D);let kt;const Je=new Set,dt={currentRoute:u,listening:!0,addRoute:x,removeRoute:S,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:C,resolve:O,options:e,push:b,replace:_,go:Te,back:()=>Te(-1),forward:()=>Te(1),beforeEach:r.add,beforeResolve:i.add,afterEach:a.add,onError:Ee.add,isReady:nt,install(D){D.component("RouterLink",vc),D.component("RouterView",xc),D.config.globalProperties.$router=dt,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>Pe(u)}),en&&!kt&&u.value===jt&&(kt=!0,b(o.location).catch(J=>{}));const W={};for(const J in jt)Object.defineProperty(W,J,{get:()=>u.value[J],enumerable:!0});D.provide(ys,dt),D.provide(go,qr(W)),D.provide(Js,u);const G=D.unmount;Je.add(D),D.unmount=function(){Je.delete(D),Je.size<1&&(d=jt,K&&K(),K=null,u.value=jt,kt=!1,pe=!1),G()}}};function Ke(D){return D.reduce((W,G)=>W.then(()=>fe(G)),Promise.resolve())}return dt}function bo(){return rt(ys)}function Wl(e){return rt(go)}const Bn=window.location.pathname.startsWith("/portal/"),Qe={esPortal:Bn,baseRuta:Bn?"/portal/studio/":"/studio/",apiBase:Bn?"/portal":"/app",urlLogin:Bn?"/portal/login":"/login"};function te(e){return Qe.apiBase+e}async function Gn(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=Qe.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 se={get:e=>Gn(e),post:(e,t)=>Gn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Gn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Gn(e,{method:"DELETE"})},_n=L(!1),_c={class:"h-14 px-4 flex items-center gap-2 border-b border-borde"},wc={key:0,class:"px-3 pt-3"},kc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},$c={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},Cc={key:0,class:"px-2 text-xs text-tenue"},Ac={key:1,class:"px-2 text-xs text-tenue"},Sc={class:"truncate"},Ec={class:"flex items-center gap-1 mt-0.5"},Ic={class:"text-[11px] text-tenue"},Rc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Pc=["onClick"],Tc=["onClick"],Oc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Dc={class:"font-semibold text-texto mb-4"},Mc={key:0,class:"grid grid-cols-2 gap-3"},Nc=["value"],Vc={class:"text-[11px] text-tenue mt-1"},jc=["value"],Uc={class:"text-[11px] text-tenue mt-1"},Lc={class:"flex items-center gap-2 text-sm text-texto"},Fc={class:"flex justify-end gap-2 pt-2"},qc={__name:"Sidebar",setup(e,{expose:t}){const n=Wl(),s=bo(),o=L([]),r=L([]),i=L([]),a=L(!0),u=L(""),d=L(!1),c=L(null),m=L(x()),p=le(()=>n.params.tenantId||n.params.id);Pt(()=>n.fullPath,()=>{_n.value=!1});function x(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function S(){a.value=!0,u.value="";try{const _=await se.get(te("/umind/tenants"));o.value=_.items||[]}catch(_){u.value=_.message}finally{a.value=!1}}function C(_){return Array.isArray(_)?_:(_==null?void 0:_.items)||(_==null?void 0:_.registros)||[]}async function R(){if(Qe.esPortal)return;const[_,j]=await Promise.allSettled([se.get("/app/api/clientes/select"),se.get("/app/umind-planes/list")]);r.value=_.status==="fulfilled"?C(_.value):[],i.value=j.status==="fulfilled"?C(j.value):[];const H=[];_.status==="rejected"&&H.push("clientes"),j.status==="rejected"&&H.push("planes"),H.length&&(u.value=`No se pudo cargar la lista de ${H.join(" ni ")}.`)}function O(){c.value=null,m.value=x(),d.value=!0}function $(_){c.value=_,m.value={nombre:_.nombre,dominios_permitidos:_.dominios_permitidos,activo:_.activo,cliente_id:_.cliente_id??null,plan_id:_.plan_id??null},d.value=!0}async function g(){const _={...m.value,dominios_permitidos:m.value.dominios_permitidos.split(",").map(j=>j.trim()).filter(Boolean)};try{if(c.value)await se.put(te(`/umind/tenants/${c.value.ID}`),_),d.value=!1,await S();else{const j=await se.post(te("/umind/tenants"),_);d.value=!1,await S(),s.push(`/tenants/${j.id}`)}}catch(j){u.value=j.message}}async function b(_){confirm(`¿Eliminar el espacio "${_.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await se.del(te(`/umind/tenants/${_.ID}`)),p.value===String(_.ID)&&s.push("/"),await S())}return t({recargar:S}),vs(()=>{S(),R()}),(_,j)=>{const H=mn("router-link");return h(),w(X,null,[Pe(_n)?(h(),w("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:j[0]||(j[0]=q=>_n.value=!1)})):B("",!0),l("aside",{class:ue(["w-64 shrink-0 flex flex-col border-r border-borde bg-superficie fixed inset-y-0 left-0 z-40 transition-transform duration-200 md:static md:h-screen md:sticky md:top-0 md:translate-x-0",Pe(_n)?"translate-x-0":"-translate-x-full"])},[l("div",_c,[oe(H,{to:"/",class:"flex items-center gap-2 text-base font-semibold text-texto"},{default:st(()=>[...j[8]||(j[8]=[l("svg",{viewBox:"0 0 96 96",class:"w-6 h-6 shrink-0","aria-hidden":"true"},[l("rect",{width:"96",height:"96",rx:"22",fill:"#8eb02f"}),l("path",{d:"M32,42 V58 A14,14 0 0 0 60,58 V42",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M60,58 V64",fill:"none",stroke:"#fff","stroke-width":"10","stroke-linecap":"round"}),l("circle",{cx:"60",cy:"28",r:"7",fill:"#fff"})],-1),l("span",null,[Z("uMind "),l("span",{class:"text-brand"},"Studio")],-1)])]),_:1})]),Pe(Qe).esPortal?B("",!0):(h(),w("div",wc,[l("button",{class:"btn-primary w-full",onClick:O}," + Nuevo espacio ")])),u.value?(h(),w("p",kc,E(u.value),1)):B("",!0),l("nav",$c,[a.value?(h(),w("p",Cc,"Cargando...")):o.value.length===0?(h(),w("p",Ac,E(Pe(Qe).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin espacios todavía."),1)):B("",!0),(h(!0),w(X,null,xe(o.value,q=>(h(),w("div",{key:q.ID,class:ue(["group flex items-center rounded-lg transition-colors",p.value===String(q.ID)?"bg-brand/10":"hover:bg-elevado"])},[oe(H,{to:`/tenants/${q.ID}`,class:ue(["flex-1 min-w-0 px-2.5 py-2 text-sm",p.value===String(q.ID)?"text-brand font-medium":"text-texto"])},{default:st(()=>[l("div",Sc,E(q.nombre),1),l("div",Ec,[l("span",{class:ue(["w-1.5 h-1.5 rounded-full",q.activo?"bg-green-500":"bg-tenue/40"])},null,2),l("span",Ic,E(q.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Pe(Qe).esPortal?B("",!0):(h(),w("div",Rc,[l("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:fe=>$(q)},[oe(Oe,{nombre:"lapiz",tam:14})],8,Pc),l("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:fe=>b(q)},[oe(Oe,{nombre:"cerrar",tam:14})],8,Tc)]))],2))),128))])],2),d.value?(h(),w("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:j[7]||(j[7]=Ae(q=>d.value=!1,["self"]))},[l("div",Oc,[l("h2",Dc,E(c.value?"Editar espacio":"Nuevo espacio"),1),j[17]||(j[17]=l("p",{class:"text-xs text-tenue mb-3"}," Un espacio es el negocio o sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),l("form",{class:"space-y-3",onSubmit:Ae(g,["prevent"])},[l("div",null,[j[9]||(j[9]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":j[1]||(j[1]=q=>m.value.nombre=q),required:"",class:"input"},null,512),[[ie,m.value.nombre]])]),l("div",null,[j[10]||(j[10]=l("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),z(l("input",{"onUpdate:modelValue":j[2]||(j[2]=q=>m.value.dominios_permitidos=q),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[ie,m.value.dominios_permitidos]])]),Pe(Qe).esPortal?B("",!0):(h(),w("div",Mc,[l("div",null,[j[12]||(j[12]=l("label",{class:"label"},"Cliente",-1)),z(l("select",{"onUpdate:modelValue":j[3]||(j[3]=q=>m.value.cliente_id=q),class:"input"},[j[11]||(j[11]=l("option",{value:null},"— sin asignar —",-1)),(h(!0),w(X,null,xe(r.value,q=>(h(),w("option",{key:q.ID,value:q.ID},E(q.nombre),9,Nc))),128))],512),[[Ht,m.value.cliente_id]]),l("p",Vc,E(r.value.length?"Define quién ve este espacio desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),l("div",null,[j[14]||(j[14]=l("label",{class:"label"},"Plan",-1)),z(l("select",{"onUpdate:modelValue":j[4]||(j[4]=q=>m.value.plan_id=q),class:"input"},[j[13]||(j[13]=l("option",{value:null},"— sin plan —",-1)),(h(!0),w(X,null,xe(i.value,q=>(h(),w("option",{key:q.ID,value:q.ID},E(q.nombre)+" ("+E(q.max_agentes===0?"∞":q.max_agentes)+" agentes) ",9,jc))),128))],512),[[Ht,m.value.plan_id]]),l("p",Uc,E(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),l("label",Lc,[z(l("input",{"onUpdate:modelValue":j[5]||(j[5]=q=>m.value.activo=q),type:"checkbox"},null,512),[[_t,m.value.activo]]),j[15]||(j[15]=Z(" Activo ",-1))]),l("div",Fc,[l("button",{type:"button",class:"btn-ghost",onClick:j[6]||(j[6]=q=>d.value=!1)}," Cancelar "),j[16]||(j[16]=l("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):B("",!0)],64)}}},Kl="umind-tema";function Hc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const ln=L(localStorage.getItem(Kl)||Hc());function zl(){document.documentElement.classList.toggle("dark",ln.value==="oscuro")}function hr(){ln.value=ln.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Kl,ln.value),zl()}zl();const gr="umind_despertar_visto",br=1250,Bc={__name:"DespertarUmind",setup(e){const t=L(null),n=L(!1);let s=null,o=null;function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}return vs(()=>{r()||sessionStorage.getItem(gr)||(sessionStorage.setItem(gr,"1"),n.value=!0,o=setTimeout(()=>n.value=!1,br),requestAnimationFrame(()=>{const i=t.value;if(!i)return;const a=i.getContext("2d"),u=Math.min(window.devicePixelRatio||1,2),d=window.innerWidth,c=window.innerHeight;i.width=Math.round(d*u),i.height=Math.round(c*u),a.setTransform(u,0,0,u,0,0);const m=d<640?22:46,p=Array.from({length:m},()=>({x:Math.random()*d,y:Math.random()*c,r:1+Math.random()*1.6,demora:Math.random()*.45})),x=performance.now(),S=C=>{const R=Math.min(1,(C-x)/br);a.clearRect(0,0,d,c);const O=R<.75?1:1-(R-.75)/.25;for(let $=0;$<p.length;$++){const g=p[$],b=Math.max(0,Math.min(1,(R-g.demora)/.4));if(!(b<=0)){for(let _=$+1;_<p.length;_++){const j=p[_],H=g.x-j.x,q=g.y-j.y,fe=Math.sqrt(H*H+q*q);fe>170||(a.strokeStyle=`rgba(142, 176, 47, ${.16*(1-fe/170)*b*O})`,a.lineWidth=1,a.beginPath(),a.moveTo(g.x,g.y),a.lineTo(j.x,j.y),a.stroke())}a.beginPath(),a.arc(g.x,g.y,g.r*b,0,Math.PI*2),a.fillStyle=`rgba(142, 176, 47, ${.5*b*O})`,a.fill()}}R<1&&(s=requestAnimationFrame(S))};s=requestAnimationFrame(S)}))}),nl(()=>{s&&cancelAnimationFrame(s),o&&clearTimeout(o)}),(i,a)=>n.value?(h(),w("canvas",{key:0,ref_key:"lienzo",ref:t,class:"fixed inset-0 w-full h-full pointer-events-none z-50","aria-hidden":"true"},null,512)):B("",!0)}},Gc={class:"min-h-screen flex"},Wc={class:"flex-1 min-w-0 flex flex-col"},Kc={class:"h-14 shrink-0 flex items-center gap-1 px-4 sm:px-6 border-b border-borde"},zc=["title"],Qc={class:"flex-1 max-w-5xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8 animate-aparecer"},Jc={__name:"App",setup(e){return(t,n)=>{const s=mn("router-view");return h(),w("div",Gc,[oe(Bc),oe(qc),l("main",Wc,[l("header",Kc,[l("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>_n.value=!0)},[...n[2]||(n[2]=[l("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=l("span",{class:"flex-1"},null,-1)),l("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Pe(ln)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>Pe(hr)&&Pe(hr)(...o))},[oe(Oe,{nombre:Pe(ln)==="oscuro"?"sol":"luna",tam:17},null,8,["nombre"])],8,zc)]),l("div",Qc,[oe(s)])])])}}},Yc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Zc=["width","height","aria-label"],Xc=["fill"],ed=["stroke"],td=["cy"],nd=["cy"],sd=["cy"],od=["cy"],rd={key:1,d:"M41,66 h12 M67,66 h12",class:"umi-linea","stroke-width":"5","stroke-linecap":"round",fill:"none"},ld={key:4,d:"M50,78 q10,8 20,0",class:"umi-linea","stroke-width":"4",fill:"none","stroke-linecap":"round"},id={__name:"UiMascota",props:{estado:{type:String,default:"normal"},tam:{type:[Number,String],default:72}},setup(e){return(t,n)=>(h(),w("svg",{width:e.tam,height:e.tam,viewBox:"0 0 120 120",class:"shrink-0",role:"img","aria-label":`Umi, la mascota de uMind (${e.estado})`},[l("circle",{cx:"60",cy:"26",r:"6",fill:e.estado==="alerta"?"#dc2626":"currentColor",class:ue(e.estado==="pensando"?"umi-late":"")},null,10,Xc),l("line",{x1:"60",y1:"32",x2:"60",y2:"44",stroke:e.estado==="alerta"?"#dc2626":"currentColor","stroke-width":"4","stroke-linecap":"round"},null,8,ed),n[7]||(n[7]=l("path",{d:"M30,46 V76 A30,30 0 0 0 90,76 V46 Z",fill:"currentColor"},null,-1)),e.estado==="normal"||e.estado==="contenta"||e.estado==="alerta"?(h(),w(X,{key:0},[l("circle",{cx:"47",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,td),l("circle",{cx:"73",cy:e.estado==="contenta"?64:66,r:"6",class:"umi-ojo"},null,8,nd),l("circle",{cx:"48",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,sd),l("circle",{cx:"74",cy:e.estado==="contenta"?65:67,r:"3",class:"umi-pupila"},null,8,od)],64)):e.estado==="durmiendo"?(h(),w("path",rd)):e.estado==="pensando"?(h(),w(X,{key:2},[n[0]||(n[0]=l("circle",{cx:"45",cy:"66",r:"4.5",class:"umi-ojo umi-p1"},null,-1)),n[1]||(n[1]=l("circle",{cx:"60",cy:"66",r:"4.5",class:"umi-ojo umi-p2"},null,-1)),n[2]||(n[2]=l("circle",{cx:"75",cy:"66",r:"4.5",class:"umi-ojo umi-p3"},null,-1))],64)):e.estado==="buscando"?(h(),w(X,{key:3},[n[3]||(n[3]=l("circle",{cx:"47",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[4]||(n[4]=l("circle",{cx:"73",cy:"66",r:"6",class:"umi-ojo"},null,-1)),n[5]||(n[5]=l("circle",{cx:"50",cy:"66",r:"3",class:"umi-pupila"},null,-1)),n[6]||(n[6]=l("circle",{cx:"76",cy:"66",r:"3",class:"umi-pupila"},null,-1))],64)):B("",!0),e.estado==="contenta"?(h(),w("path",ld)):B("",!0)],8,Zc))}},Nn=Yc(id,[["__scopeId","data-v-551897a0"]]),ad={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},ud={key:1,class:"max-w-md mx-auto text-center py-20"},cd={key:2,class:"flex flex-col items-center justify-center text-center py-24"},dd={class:"text-lg font-medium text-texto"},fd={class:"text-sm text-tenue mt-1"},pd={__name:"Home",setup(e){const t=bo(),n=L(Qe.esPortal),s=L(!1);async function o(){if(Qe.esPortal)try{const i=(await se.get(te("/umind/tenants"))).items||[];if(i.length===0){s.value=!0;return}if(i.length!==1)return;const a=i[0].ID,d=(await se.get(te(`/umind/agentes?tenant_id=${a}`))).items||[];if(d.length===1){t.replace(`/tenants/${a}/agentes/${d[0].ID}`);return}t.replace(`/tenants/${a}`)}catch{}finally{n.value=!1}}return vs(o),(r,i)=>n.value?(h(),w("div",ad," Abriendo tu asistente… ")):s.value?(h(),w("div",ud,[oe(Nn,{estado:"durmiendo",tam:80,class:"mx-auto mb-4 text-brand"}),i[0]||(i[0]=Sl('<h1 class="text-lg font-medium text-texto">Todavía no tenés un asistente activo</h1><p class="text-sm text-tenue mt-2"> uMind contesta por vos en WhatsApp y en tu sitio, con la información de tu negocio. Entiende las notas de voz y lee las fotos y archivos que te mandan tus clientes. </p><a class="btn-primary inline-block mt-5" href="mailto:soporte@u-site.app?subject=Quiero%20activar%20uMind">Quiero activarlo</a><p class="text-xs text-tenue mt-4"><a href="/portal/dashboard" class="underline">Volver al portal</a></p>',4))])):(h(),w("div",cd,[oe(Nn,{estado:"normal",tam:64,class:"mx-auto mb-4 text-brand"}),l("h1",dd,E(Pe(Qe).esPortal?"Elegí tu espacio de la izquierda":"Elegí un espacio de la izquierda"),1),l("p",fd,E(Pe(Qe).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},md={class:"flex flex-col items-center justify-center text-center py-12 px-6"},vd={key:0,class:"text-3xl mb-3 opacity-70"},hd={class:"text-sm font-medium text-texto"},gd={key:2,class:"text-xs text-tenue mt-1.5 max-w-sm leading-relaxed"},bd={key:3,class:"mt-4"},lt={__name:"UiEmptyState",props:{estado:{type:String,default:"durmiendo"},titulo:String,detalle:String,icono:{type:String,default:""}},setup(e){return(t,n)=>(h(),w("div",md,[e.icono?(h(),w("div",vd,E(e.icono),1)):(h(),_e(Nn,{key:1,estado:e.estado,tam:64,class:"mb-3 text-brand"},null,8,["estado"])),l("p",hd,E(e.titulo),1),e.detalle?(h(),w("p",gd,E(e.detalle),1)):B("",!0),t.$slots.default?(h(),w("div",bd,[Zi(t.$slots,"default")])):B("",!0)]))}},xd={key:0,class:"mb-6"},yd={class:"flex items-start justify-between gap-4"},_d={class:"text-xl font-semibold text-texto"},wd={class:"text-xs text-tenue mt-1"},kd={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},$d={class:"flex items-center justify-between mb-4"},Cd={class:"flex items-center gap-2"},Ad={key:0,class:"badge-alerta"},Sd={key:1,class:"badge-neutro"},Ed=["disabled"],Id={key:2,class:"text-xs text-tenue -mt-2 mb-4"},Rd={key:3,class:"text-xs text-tenue -mt-2 mb-4"},Pd={key:4,class:"grid gap-3 sm:grid-cols-2"},Td=["disabled"],Od={key:6,class:"grid gap-3 sm:grid-cols-2"},Dd={class:"flex items-start gap-3"},Md={class:"min-w-0 flex-1"},Nd={class:"flex items-center gap-2"},Vd={class:"font-medium text-texto truncate"},jd={class:"text-xs text-tenue mt-0.5 truncate"},Ud={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},Ld=["onClick"],Fd=["onClick"],qd=["onClick"],Hd={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},Bd={class:"tabular-nums"},Gd={class:"text-texto font-medium"},Wd={class:"tabular-nums"},Kd={class:"text-texto font-medium"},zd={class:"tabular-nums"},Qd={class:"text-texto font-medium"},Jd={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg max-h-[calc(100vh-2rem)] overflow-y-auto"},Yd={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Zd={key:0},Xd={class:"grid gap-1.5"},ef=["value"],tf={class:"min-w-0"},nf={class:"block text-sm text-texto"},sf={class:"block text-xs text-tenue"},of={key:0,class:"block text-xs text-tenue mt-0.5"},rf=["value"],lf={class:"flex items-center gap-2"},af={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},uf={class:"flex justify-end gap-2 pt-2"},cf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},df={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=le(()=>Number(t.id)),s=bo(),o=L(null),r=L([]),i=L([]),a=L(""),u=L(!1),d=L(null),c=L($()),m=L(null),p=L({}),x=L(!0);function S(Y){const F=p.value[Y.ID]||{};return Y.activo?F.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function C(Y){const F=p.value[Y.ID]||{};return{documentos:F.documentos||0,canales:F.canales||0,conversaciones:F.conversaciones_7d||0}}function R(Y){return String(Y||"?").trim().split(/\s+/).slice(0,2).map(F=>F[0]).join("").toUpperCase()}const O=le(()=>{if(!m.value)return{sinPlan:!0};const Y=m.value.max_agentes||0;return{sinPlan:!1,nombre:m.value.nombre,ilimitado:Y<=0,max:Y,usados:r.value.length,lleno:Y>0&&r.value.length>=Y}});function $(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0,plantilla_rubro:""}}const g=L([]);async function b(){a.value="",x.value=!0;try{const[Y,F,Se,K]=await Promise.all([se.get(te("/umind/tenants")),se.get(te(`/umind/agentes?tenant_id=${t.id}`)),se.get(te("/umind/ai-configs")),se.get(te("/umind/plantillas-rubro"))]);o.value=(Y.items||[]).find(Ge=>String(Ge.ID)===t.id)||null,r.value=F.items||[],m.value=F.plan||null,p.value=F.resumen||{},i.value=Se.items||[],g.value=K.items||[]}catch(Y){a.value=Y.message}finally{x.value=!1}}async function _(Y){const F=prompt(`Nombre de la copia de "${Y.nombre}":`,`${Y.nombre} (copia)`);if(F!==null){a.value="";try{const Se=await se.post(te(`/umind/agentes/${Y.ID}/duplicar`),{tenant_id:Number(n.value),nombre:F.trim()});await b(),Se.aviso&&alert(Se.aviso)}catch(Se){a.value=Se.message}}}function j(){d.value=null,c.value=$(),u.value=!0}function H(Y){d.value=Y,c.value={nombre:Y.nombre,ai_config_id:Y.ai_config_id,tono:Y.tono,mensaje_bienvenida:Y.mensaje_bienvenida,color:Y.color||"#8eb02f",activo:Y.activo},u.value=!0}async function q(){try{if(d.value)await se.put(te(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),u.value=!1,await b();else{const Y=await se.post(te("/umind/agentes"),{tenant_id:n.value,...c.value});u.value=!1,s.push(`/tenants/${n.value}/agentes/${Y.id}`)}}catch(Y){a.value=Y.message}}async function fe(Y){confirm(`¿Eliminar el agente "${Y.nombre}"? Esto no se puede deshacer.`)&&(await se.del(te(`/umind/agentes/${Y.ID}`)),await b())}return Pt(()=>t.id,b,{immediate:!0}),(Y,F)=>{const Se=mn("router-link");return h(),w("div",null,[o.value?(h(),w("div",xd,[l("div",yd,[l("div",null,[l("h1",_d,E(o.value.nombre),1),l("p",wd,E(o.value.dominios_permitidos||"sin dominios configurados"),1)]),oe(Se,{to:`/tenants/${n.value??e.id}/ia`,class:"btn-ghost"},{default:st(()=>[...F[10]||(F[10]=[Z("Tu IA",-1)])]),_:1},8,["to"]),oe(Se,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"grafico"}),F[11]||(F[11]=Z(" Consumo",-1))]),_:1},8,["to"])])])):B("",!0),a.value?(h(),w("p",kd,E(a.value),1)):B("",!0),l("div",$d,[l("div",Cd,[F[12]||(F[12]=l("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),O.value.sinPlan?(h(),w("span",Ad,"sin plan · sin límite")):O.value.ilimitado?(h(),w("span",Sd,E(O.value.nombre)+" · ilimitado",1)):(h(),w("span",{key:2,class:ue(O.value.lleno?"badge-alerta":"badge-neutro")},E(O.value.nombre)+" · "+E(O.value.usados)+" de "+E(O.value.max),3))]),l("button",{class:"btn-primary",disabled:O.value.lleno,onClick:j},"+ Nuevo agente",8,Ed)]),O.value.sinPlan&&!Pe(Qe).esPortal?(h(),w("p",Id," Este espacio no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del espacio, en la barra izquierda. ")):O.value.lleno?(h(),w("p",Rd," Alcanzaste el máximo de agentes de tu plan. ")):B("",!0),x.value?(h(),w("div",Pd,[(h(),w(X,null,xe(2,K=>l("div",{key:K,class:"card p-4 animate-pulse"},[...F[13]||(F[13]=[Sl('<div class="flex items-center gap-3"><div class="w-10 h-10 rounded-xl bg-elevado"></div><div class="flex-1"><div class="h-3.5 w-28 rounded bg-elevado"></div><div class="h-2.5 w-16 rounded bg-elevado mt-2"></div></div></div><div class="h-2.5 w-full rounded bg-elevado mt-4"></div>',2)])])),64))])):r.value.length===0?(h(),_e(lt,{key:5,class:"card",estado:"durmiendo",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:st(()=>[l("button",{class:"btn-primary",disabled:O.value.lleno,onClick:j},"+ Crear el primer agente",8,Td)]),_:1})):(h(),w("div",Od,[(h(!0),w(X,null,xe(r.value,K=>(h(),_e(Se,{key:K.ID,to:`/tenants/${n.value}/agentes/${K.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:st(()=>[l("span",{class:"absolute inset-x-0 top-0 h-1",style:Jt({background:K.color||"#8eb02f"})},null,4),l("div",Dd,[l("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Jt({background:K.color||"#8eb02f",opacity:K.activo?1:.4})},E(R(K.nombre)),5),l("div",Md,[l("div",Nd,[l("span",Vd,E(K.nombre),1),l("span",{class:ue(`badge-${S(K).tipo}`)},E(S(K).texto),3)]),l("p",jd,E(K.tono||"sin tono definido"),1)]),l("div",Ud,[l("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Ae(Ge=>H(K),["prevent","stop"])},[oe(Oe,{nombre:"lapiz",tam:14})],8,Ld),l("button",{class:"p-1 text-tenue hover:text-texto",title:"Duplicar: copia el conocimiento y las herramientas a un agente nuevo",onClick:Ae(Ge=>_(K),["prevent","stop"])},[oe(Oe,{nombre:"copiar",tam:14})],8,Fd),l("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Ae(Ge=>fe(K),["prevent","stop"])},[oe(Oe,{nombre:"cerrar",tam:14})],8,qd)])]),l("div",Hd,[l("span",Bd,[l("b",Gd,E(C(K).conversaciones),1),F[14]||(F[14]=Z(" conversaciones · 7d",-1))]),l("span",Wd,[l("b",Kd,E(C(K).documentos),1),F[15]||(F[15]=Z(" fuentes",-1))]),l("span",zd,[l("b",Qd,E(C(K).canales),1),F[16]||(F[16]=Z(" canales",-1))])])]),_:2},1032,["to"]))),128))])),u.value?(h(),w("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:F[9]||(F[9]=Ae(K=>u.value=!1,["self"]))},[l("div",Jd,[l("h2",Yd,E(d.value?"Editar agente":"Nuevo agente"),1),l("form",{class:"space-y-3",onSubmit:Ae(q,["prevent"])},[l("div",null,[F[17]||(F[17]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":F[0]||(F[0]=K=>c.value.nombre=K),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[ie,c.value.nombre]])]),!d.value&&g.value.length?(h(),w("div",Zd,[F[18]||(F[18]=l("label",{class:"label"},"Arrancar con",-1)),l("div",Xd,[(h(!0),w(X,null,xe([{clave:"",nombre:"Agente en blanco",descripcion:"Sin conocimiento cargado. Lo escribís vos desde cero."},...g.value],K=>(h(),w("label",{key:K.clave,class:ue(["flex gap-2.5 p-2.5 rounded-lg border cursor-pointer transition-colors",c.value.plantilla_rubro===K.clave?"border-brand bg-brand/5":"border-borde hover:border-brand/40"])},[z(l("input",{"onUpdate:modelValue":F[1]||(F[1]=Ge=>c.value.plantilla_rubro=Ge),type:"radio",value:K.clave,class:"mt-1 text-brand focus:ring-brand"},null,8,ef),[[Ws,c.value.plantilla_rubro]]),l("span",tf,[l("span",nf,E(K.nombre),1),l("span",sf,E(K.descripcion),1),K.notas?(h(),w("span",of,E(K.notas)+" notas listas para editar · "+E(K.resumen),1)):B("",!0)])],2))),128))]),F[19]||(F[19]=l("p",{class:"text-xs text-tenue mt-1.5"}," Las notas vienen con ejemplos entre corchetes — abrilas y reemplazalas por tus datos reales. ",-1))])):B("",!0),l("div",null,[F[21]||(F[21]=l("label",{class:"label"},"Config de IA",-1)),z(l("select",{"onUpdate:modelValue":F[2]||(F[2]=K=>c.value.ai_config_id=K),class:"input"},[F[20]||(F[20]=l("option",{value:null},"— sin asignar —",-1)),(h(!0),w(X,null,xe(i.value,K=>(h(),w("option",{key:K.ID,value:K.ID},E(K.nombre)+" ("+E(K.provider)+")",9,rf))),128))],512),[[Ht,c.value.ai_config_id]])]),l("div",null,[F[22]||(F[22]=l("label",{class:"label"},"Tono / personalidad",-1)),z(l("textarea",{"onUpdate:modelValue":F[3]||(F[3]=K=>c.value.tono=K),rows:"2",class:"input"},null,512),[[ie,c.value.tono]])]),l("div",null,[F[23]||(F[23]=l("label",{class:"label"},"Mensaje de bienvenida",-1)),z(l("input",{"onUpdate:modelValue":F[4]||(F[4]=K=>c.value.mensaje_bienvenida=K),class:"input"},null,512),[[ie,c.value.mensaje_bienvenida]])]),l("div",null,[F[24]||(F[24]=l("label",{class:"label"},"Color del widget",-1)),l("div",lf,[z(l("input",{"onUpdate:modelValue":F[5]||(F[5]=K=>c.value.color=K),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),[[ie,c.value.color]]),z(l("input",{"onUpdate:modelValue":F[6]||(F[6]=K=>c.value.color=K),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),[[ie,c.value.color]])])]),l("label",af,[z(l("input",{"onUpdate:modelValue":F[7]||(F[7]=K=>c.value.activo=K),type:"checkbox"},null,512),[[_t,c.value.activo]]),F[25]||(F[25]=Z(" Activo ",-1))]),l("div",uf,[l("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:F[8]||(F[8]=K=>u.value=!1)},"Cancelar"),l("button",cf,E(d.value?"Guardar":"Crear"),1)])],32)])])):B("",!0)])}}},ff={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},pf={class:"cursor-pointer flex items-center gap-2 text-sm"},mf={class:"text-tenue text-xs shrink-0"},vf={class:"text-texto truncate"},hf={class:"text-tenue text-xs ml-auto shrink-0"},gf={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"},bf={__name:"TabAuditoria",props:{eventos:{type:Array,default:()=>[]}},setup(e){const t=le(()=>s=>({error:"badge-error",warn:"badge-alerta"})[s]||"badge-neutro");function n(s){try{return new Date(s).toLocaleString()}catch{return s}}return(s,o)=>(h(),w("div",null,[o[0]||(o[0]=l("p",{class:"label mb-4"}," Errores y eventos técnicos de este agente — fallos al llamar a la IA, a una herramienta, al correo o a los canales. Últimos 100. ",-1)),l("div",ff,[e.eventos.length===0?(h(),_e(lt,{key:0,estado:"contenta",titulo:"Ningún problema registrado",detalle:"Acá aparecen los errores: una herramienta que no responde, una fuente que no se pudo leer. Que esté vacío es buena señal."})):B("",!0),(h(!0),w(X,null,xe(e.eventos,r=>(h(),w("details",{key:r.ID,class:"p-3"},[l("summary",pf,[l("span",{class:ue(["px-1.5 py-0.5 rounded text-xs shrink-0",t.value(r.nivel)])},E(r.nivel),3),l("span",mf,E(r.origen),1),l("span",vf,E(r.mensaje),1),l("span",hf,E(n(r.CreatedAt)),1)]),r.detalle?(h(),w("pre",gf,E(r.detalle),1)):B("",!0)]))),128))])]))}},xf={class:"flex flex-wrap gap-2 mb-4"},yf={class:"grid sm:grid-cols-2 gap-3"},_f={key:0,class:"grid sm:grid-cols-3 gap-3"},wf={key:1,class:"text-sm text-red-600 dark:text-red-400"},kf={class:"flex items-center justify-between"},$f=["disabled"],Cf={class:"card divide-y divide-borde"},Af={class:"flex items-center justify-between gap-3"},Sf={class:"min-w-0"},Ef={class:"font-medium text-texto"},If={class:"ml-2 text-xs text-tenue"},Rf={class:"flex items-center gap-3 shrink-0 text-sm"},Pf=["disabled","onClick"],Tf=["onClick"],Of={__name:"TabConexiones",props:{agenteId:{type:Number,required:!0},conexiones:{type:Array,default:()=>[]}},emits:["recargar"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(!1),i=L(""),a=L(!1),u=L({email:"",password:"",host:"",puerto:993,encriptado:"ssl"}),d=L(null),c=L({});function m(R){return{google:"Google",microsoft:"Outlook",imap:"Casilla propia"}[R]||R}function p(R){window.location.href=te(`/umind/conexiones/conectar?agente_id=${n.agenteId}&proveedor=${R}`)}async function x(){r.value=!0,i.value="";try{await se.post(te("/umind/conexiones/imap"),{agente_id:n.agenteId,email:u.value.email,password:u.value.password,host:a.value?u.value.host:"",puerto:a.value?Number(u.value.puerto):0,encriptado:u.value.encriptado}),o.value=!1,u.value={email:"",password:"",host:"",puerto:993,encriptado:"ssl"},a.value=!1,s("recargar")}catch(R){i.value=R.message,!a.value&&/conexión|conectar|resolver/i.test(R.message)&&(a.value=!0)}finally{r.value=!1}}async function S(R){d.value=R.ID,c.value={...c.value,[R.ID]:null};try{const O=await se.post(te(`/umind/conexiones/${R.ID}/probar`),{});c.value={...c.value,[R.ID]:{ok:!0,texto:O.message}}}catch(O){c.value={...c.value,[R.ID]:{ok:!1,texto:O.message}}}finally{d.value=null}}async function C(R){confirm(`¿Desconectar la cuenta ${R.email||R.proveedor}?`)&&(await se.del(te(`/umind/conexiones/${R.ID}`)),s("recargar"))}return(R,O)=>(h(),w("div",null,[O[15]||(O[15]=l("p",{class:"label mb-4"},[Z(" Las casillas que el agente puede consultar cuando se lo pedís — por ejemplo: "),l("em",null,"«revisame los correos de hoy y haceme un resumen»"),Z(". Solo lectura: nunca marca nada como leído ni manda nada. Podés conectar varias. ")],-1)),l("div",xf,[l("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:O[0]||(O[0]=$=>p("google"))}," Conectar Google "),l("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:O[1]||(O[1]=$=>p("microsoft"))}," Conectar Outlook "),l("button",{class:"btn-primary",onClick:O[2]||(O[2]=$=>o.value=!o.value)}," + Casilla propia ")]),o.value?(h(),w("form",{key:0,class:"card p-4 mb-4 space-y-3",onSubmit:Ae(x,["prevent"])},[l("div",yf,[l("div",null,[O[8]||(O[8]=l("label",{class:"label"},"Correo",-1)),z(l("input",{"onUpdate:modelValue":O[3]||(O[3]=$=>u.value.email=$),type:"email",required:"",placeholder:"ventas@tunegocio.com",class:"input"},null,512),[[ie,u.value.email]])]),l("div",null,[O[9]||(O[9]=l("label",{class:"label"},"Contraseña",-1)),z(l("input",{"onUpdate:modelValue":O[4]||(O[4]=$=>u.value.password=$),type:"password",autocomplete:"new-password",required:"",class:"input"},null,512),[[ie,u.value.password]])])]),a.value?(h(),w("div",_f,[l("div",null,[O[10]||(O[10]=l("label",{class:"label"},"Servidor IMAP",-1)),z(l("input",{"onUpdate:modelValue":O[5]||(O[5]=$=>u.value.host=$),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,u.value.host]])]),l("div",null,[O[11]||(O[11]=l("label",{class:"label"},"Puerto",-1)),z(l("input",{"onUpdate:modelValue":O[6]||(O[6]=$=>u.value.puerto=$),type:"number",class:"input"},null,512),[[ie,u.value.puerto]])]),l("div",null,[O[13]||(O[13]=l("label",{class:"label"},"Encriptación",-1)),z(l("select",{"onUpdate:modelValue":O[7]||(O[7]=$=>u.value.encriptado=$),class:"input"},[...O[12]||(O[12]=[l("option",{value:"ssl"},"SSL (993)",-1),l("option",{value:"starttls"},"STARTTLS (143)",-1)])],512),[[Ht,u.value.encriptado]])])])):B("",!0),i.value?(h(),w("p",wf,E(i.value),1)):B("",!0),l("div",kf,[O[14]||(O[14]=l("p",{class:"text-xs text-tenue"}," Se prueba la conexión antes de guardar. Gmail y Outlook van por sus botones de arriba. ",-1)),l("button",{type:"submit",class:"btn-primary",disabled:r.value},E(r.value?"Probando…":"Conectar"),9,$f)])],32)):B("",!0),l("div",Cf,[e.conexiones.length===0?(h(),_e(lt,{key:0,titulo:"Sin cuentas conectadas",detalle:"Conectá una casilla y vas a poder pedirle al agente que te revise el correo y te lo resuma, sin abrir el webmail."})):B("",!0),(h(!0),w(X,null,xe(e.conexiones,$=>(h(),w("div",{key:$.ID,class:"p-4"},[l("div",Af,[l("div",Sf,[l("span",Ef,E($.email),1),l("span",If,E(m($.proveedor)),1),l("span",{class:ue(["ml-2 px-1.5 py-0.5 rounded text-xs",$.activo?"badge-ok":"badge-neutro"])},E($.activo?"activa":"inactiva"),3),c.value[$.ID]?(h(),w("p",{key:0,class:ue(["text-xs mt-1",c.value[$.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},E(c.value[$.ID].texto),3)):B("",!0)]),l("div",Rf,[$.proveedor==="imap"?(h(),w("button",{key:0,class:"text-brand hover:underline disabled:opacity-40",disabled:d.value===$.ID,onClick:g=>S($)},E(d.value===$.ID?"Probando…":"Probar"),9,Pf)):B("",!0),l("button",{class:"text-red-500 hover:text-red-700",onClick:g=>C($)},"Desconectar",8,Tf)])])]))),128))])]))}},Df={class:"card p-4 flex flex-col h-[28rem]"},Mf={class:"flex-1 overflow-y-auto space-y-2 mb-3"},Nf={key:0,class:"text-sm text-tenue"},Vf={key:1,class:"flex items-center gap-2"},jf=["disabled"],xr={__name:"TabChat",props:{agenteId:{type:Number,required:!0}},setup(e){const t=e,n=`staff-preview-${Math.random().toString(36).slice(2)}`,s=L([]),o=L(""),r=L(!1);async function i(){const a=o.value.trim();if(!(!a||r.value)){o.value="",s.value.push({role:"user",content:a}),r.value=!0;try{const u=await se.post(te("/umind/chat"),{agente_id:t.agenteId,session_id:n,mensaje:a});s.value.push({role:"assistant",content:u.respuesta})}catch(u){s.value.push({role:"assistant",content:`⚠ ${u.message}`})}finally{r.value=!1}}}return(a,u)=>(h(),w("div",Df,[l("div",Mf,[s.value.length===0?(h(),w("p",Nf," Probá este agente tal cual lo va a ver un visitante — usa la misma config de IA, las mismas herramientas y la misma base de conocimiento. ")):B("",!0),(h(!0),w(X,null,xe(s.value,(d,c)=>(h(),w("div",{key:c,class:ue(["max-w-[80%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap",d.role==="user"?"bg-brand text-white ml-auto":"bg-elevado text-texto"])},E(d.content),3))),128)),r.value?(h(),w("div",Vf,[oe(Nn,{estado:"pensando",tam:30,class:"text-brand"}),u[1]||(u[1]=l("span",{class:"text-xs text-tenue"},"Pensando…",-1))])):B("",!0)]),l("form",{class:"flex gap-2",onSubmit:Ae(i,["prevent"])},[z(l("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),placeholder:"Escribí un mensaje de prueba...",class:"flex-1 input"},null,512),[[ie,o.value]]),l("button",{type:"submit",disabled:r.value,class:"btn-primary disabled:opacity-50 transition-colors"}," Enviar ",8,jf)],32)]))}},Uf={class:"grid lg:grid-cols-[minmax(16rem,22rem)_1fr] gap-4 items-start"},Lf={class:"card divide-y divide-borde max-h-[30rem] overflow-y-auto"},Ff=["onClick"],qf={class:"text-sm text-texto line-clamp-2"},Hf={class:"flex items-center gap-2 mt-1.5 text-xs text-tenue"},Bf={class:"tabular-nums"},Gf={class:"ml-auto tabular-nums"},Wf={key:2,class:"flex items-center gap-2 p-3 text-xs text-tenue cursor-pointer select-none"},Kf={class:"card p-4 max-h-[30rem] overflow-y-auto"},zf={key:1,class:"text-sm text-tenue"},Qf={key:2,class:"space-y-2"},Jf={__name:"TabConversaciones",props:{agenteId:{type:Number,required:!0},sesiones:{type:Array,default:()=>[]}},setup(e){const t=e,n=L([]),s=L(null),o=L(!1);function r(p){const x=String(p||"");return x.startsWith("wa:")?{nombre:"WhatsApp",icono:"mensaje",clase:"badge-ok"}:x.startsWith("tg:")?{nombre:"Telegram",icono:"mensaje",clase:"badge-neutro"}:x.startsWith("staff-preview")?{nombre:"Prueba",icono:"escribir",clase:"badge-alerta"}:{nombre:"Tu web",icono:"sitio",clase:"badge-neutro"}}const i=L(!1),a=le(()=>t.sesiones.filter(p=>!String(p.session_id).startsWith("staff-preview"))),u=le(()=>t.sesiones.filter(p=>String(p.session_id).startsWith("staff-preview"))),d=le(()=>i.value?t.sesiones:a.value);function c(p){if(!p)return"";const x=new Date(p),C=Math.floor((new Date().setHours(0,0,0,0)-new Date(x).setHours(0,0,0,0))/864e5),R=new Date(p).toLocaleTimeString("es",{hour:"2-digit",minute:"2-digit"});return C<=0?`hoy ${R}`:C===1?`ayer ${R}`:C<7?`hace ${C} días`:new Date(p).toLocaleDateString("es",{day:"numeric",month:"short"})}async function m(p){s.value=p,o.value=!0;try{const x=await se.get(te(`/umind/historial?agente_id=${t.agenteId}&session_id=${p}`));n.value=x.items||[]}finally{o.value=!1}}return(p,x)=>(h(),w("div",Uf,[l("div",Lf,[d.value.length===0&&u.value.length===0?(h(),_e(lt,{key:0,titulo:"Nadie escribió todavía",detalle:"Cuando alguien le hable a tu asistente —por WhatsApp, Telegram o tu web— la conversación aparece acá, con lo que preguntó y lo que se le respondió."})):d.value.length===0?(h(),_e(lt,{key:1,estado:"durmiendo",titulo:"Ningún cliente escribió todavía",detalle:`Hay ${u.value.length} ${u.value.length===1?"conversación de prueba tuya":"conversaciones de prueba tuyas"} — activá el filtro de abajo para verlas.`},null,8,["detalle"])):B("",!0),(h(!0),w(X,null,xe(d.value,S=>(h(),w("button",{key:S.session_id,class:ue(["w-full text-left p-3 hover:bg-elevado transition-colors",s.value===S.session_id?"bg-gray-50 dark:bg-gray-800":""]),onClick:C=>m(S.session_id)},[l("div",qf,E(S.primer_mensaje||"(sin mensaje)"),1),l("div",Hf,[l("span",{class:ue(["px-1.5 py-0.5 rounded",r(S.session_id).clase])},E(r(S.session_id).nombre),3),l("span",Bf,E(S.mensajes)+" msj",1),l("span",Gf,E(c(S.ultimo)),1)])],10,Ff))),128)),u.value.length?(h(),w("label",Wf,[z(l("input",{"onUpdate:modelValue":x[0]||(x[0]=S=>i.value=S),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,i.value]]),Z(" "+E(u.value.length===1?"Mostrar mi prueba":`Mostrar mis ${u.value.length} pruebas`),1)])):B("",!0)]),l("div",Kf,[s.value?o.value?(h(),w("p",zf,"Cargando…")):(h(),w("div",Qf,[(h(!0),w(X,null,xe(n.value,S=>(h(),w("div",{key:S.ID,class:ue(S.role==="user"?"text-right":"")},[l("div",{class:ue(["inline-block max-w-[80%] px-3 py-2 rounded-lg text-sm text-left whitespace-pre-wrap",S.role==="user"?"bg-brand text-white":"bg-elevado text-texto"])},E(S.content),3),l("div",{class:ue(["text-[10px] text-tenue mt-0.5 tabular-nums",S.role==="user"?"pr-1":"pl-1"])},E(c(S.CreatedAt)),3)],2))),128))])):(h(),_e(lt,{key:0,estado:"normal",titulo:"Elegí una conversación",detalle:"Vas a ver el intercambio completo: lo que escribió la persona y lo que contestó tu asistente. Si una respuesta no te gusta, corregí su información en «Lo que sabe»."}))])]))}},Yf={class:"card divide-y divide-borde"},Zf={class:"text-sm text-texto font-mono"},Xf={class:"label mt-0.5"},ep={class:"text-xs text-tenue mt-0.5"},tp={key:0,class:"ml-1 text-green-600 dark:text-green-400"},np={key:1,class:"ml-1 text-gray-400"},sp={class:"flex gap-3 text-sm shrink-0"},op=["onClick"],rp=["onClick"],lp={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},ip={class:"font-semibold text-texto mb-4"},ap={class:"border border-borde rounded-lg p-3 space-y-2"},up=["onUpdate:modelValue"],cp=["onUpdate:modelValue"],dp=["onUpdate:modelValue"],fp={class:"label flex items-center gap-1"},pp=["onUpdate:modelValue"],mp=["onClick"],vp={key:0,class:"text-xs text-gray-400"},hp={class:"border border-borde rounded-lg p-3 space-y-2"},gp={class:"flex items-center gap-2 label"},bp={class:"flex items-center gap-2 text-sm text-texto"},xp={class:"flex justify-end gap-2 pt-2"},yp={__name:"TabHerramientas",props:{agenteId:{type:Number,required:!0},tools:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(null),i=L(a());function a(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}function u(){r.value=null,i.value=a(),o.value=!0}function d(S){r.value=S;let C=[];try{C=JSON.parse(S.parametros_json||"[]")||[]}catch{C=[]}i.value={nombre:S.nombre,descripcion:S.descripcion,url:S.url,auth_header_nombre:S.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:C,activa:S.activa},o.value=!0}function c(){i.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function m(S){i.value.parametros.splice(S,1)}async function p(){const S={agente_id:n.agenteId,nombre:i.value.nombre.trim(),descripcion:i.value.descripcion,url:i.value.url.trim(),auth_header_nombre:i.value.auth_header_nombre,parametros:i.value.parametros,activa:i.value.activa};i.value.tocarAuth&&(S.auth_header_valor=i.value.auth_header_valor);try{r.value?await se.put(te(`/umind/tools/${r.value.ID}`),S):await se.post(te("/umind/tools"),S),o.value=!1,s("recargar")}catch(C){s("error",C.message)}}async function x(S){confirm(`¿Eliminar la herramienta "${S.nombre}"?`)&&(await se.del(te(`/umind/tools/${S.ID}`)),s("recargar"))}return(S,C)=>(h(),w("div",null,[l("div",{class:"flex justify-between items-center mb-4"},[C[9]||(C[9]=l("p",{class:"label"},"Máximo 10 herramientas activas por agente.",-1)),l("button",{class:"btn-primary",onClick:u}," + Nueva herramienta ")]),l("div",Yf,[e.tools.length===0?(h(),_e(lt,{key:0,titulo:"Sin herramientas conectadas",detalle:"Las herramientas le dejan consultar tus sistemas mientras conversa: stock, estado de un pedido, disponibilidad de turnos. Sin ninguna, responde solo con lo que tiene cargado."})):B("",!0),(h(!0),w(X,null,xe(e.tools,R=>(h(),w("div",{key:R.ID,class:"p-4 flex items-center justify-between"},[l("div",null,[l("div",Zf,E(R.nombre),1),l("div",Xf,E(R.descripcion),1),l("div",ep,[Z(E(R.url)+" ",1),R.auth_configurado?(h(),w("span",tp,"· auth configurada")):B("",!0),R.activa?B("",!0):(h(),w("span",np,"· inactiva"))])]),l("div",sp,[l("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:O=>d(R)},"Editar",8,op),l("button",{class:"text-red-500 hover:text-red-700",onClick:O=>x(R)},"Eliminar",8,rp)])]))),128))]),o.value?(h(),w("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:C[8]||(C[8]=Ae(R=>o.value=!1,["self"]))},[l("div",lp,[l("h2",ip,E(r.value?"Editar herramienta":"Nueva herramienta"),1),l("form",{class:"space-y-3",onSubmit:Ae(p,["prevent"])},[l("div",null,[C[10]||(C[10]=l("label",{class:"label"},"Nombre (identificador, ej: consultar_stock)",-1)),z(l("input",{"onUpdate:modelValue":C[0]||(C[0]=R=>i.value.nombre=R),required:"",pattern:"[a-z][a-z0-9_]{2,63}",class:"input font-mono"},null,512),[[ie,i.value.nombre]])]),l("div",null,[C[11]||(C[11]=l("label",{class:"label"},"Descripción (esto lo lee el modelo para decidir cuándo usarla)",-1)),z(l("textarea",{"onUpdate:modelValue":C[1]||(C[1]=R=>i.value.descripcion=R),rows:"2",required:"",class:"input"},null,512),[[ie,i.value.descripcion]])]),l("div",null,[C[12]||(C[12]=l("label",{class:"label"},"URL del webhook (https)",-1)),z(l("input",{"onUpdate:modelValue":C[2]||(C[2]=R=>i.value.url=R),type:"url",required:"",placeholder:"https://...",class:"input"},null,512),[[ie,i.value.url]])]),l("div",ap,[l("div",{class:"flex items-center justify-between"},[C[13]||(C[13]=l("label",{class:"label"},"Parámetros que completa el modelo",-1)),l("button",{type:"button",class:"text-xs text-brand",onClick:c},"+ agregar")]),(h(!0),w(X,null,xe(i.value.parametros,(R,O)=>(h(),w("div",{key:O,class:"flex gap-2 items-center"},[z(l("input",{"onUpdate:modelValue":$=>R.nombre=$,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,up),[[ie,R.nombre]]),z(l("select",{"onUpdate:modelValue":$=>R.tipo=$,class:"border border-borde bg-white dark:bg-gray-800 text-texto rounded px-2 py-1 text-xs"},[...C[14]||(C[14]=[l("option",{value:"string"},"string",-1),l("option",{value:"number"},"number",-1),l("option",{value:"boolean"},"boolean",-1)])],8,cp),[[Ht,R.tipo]]),z(l("input",{"onUpdate:modelValue":$=>R.descripcion=$,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,dp),[[ie,R.descripcion]]),l("label",fp,[z(l("input",{"onUpdate:modelValue":$=>R.requerido=$,type:"checkbox"},null,8,pp),[[_t,R.requerido]]),C[15]||(C[15]=Z(" req. ",-1))]),l("button",{type:"button",class:"text-red-400 text-xs",onClick:$=>m(O)},[oe(Oe,{nombre:"cerrar",tam:13})],8,mp)]))),128)),i.value.parametros.length===0?(h(),w("p",vp,"Sin parámetros.")):B("",!0)]),l("div",hp,[C[16]||(C[16]=l("label",{class:"label"},"Autenticación saliente (opcional)",-1)),z(l("input",{"onUpdate:modelValue":C[3]||(C[3]=R=>i.value.auth_header_nombre=R),placeholder:"Nombre del header, ej: Authorization",class:"input"},null,512),[[ie,i.value.auth_header_nombre]]),l("label",gp,[z(l("input",{"onUpdate:modelValue":C[4]||(C[4]=R=>i.value.tocarAuth=R),type:"checkbox"},null,512),[[_t,i.value.tocarAuth]]),Z(" "+E(r.value?"Cambiar el valor del secreto":"Configurar valor"),1)]),i.value.tocarAuth?z((h(),w("input",{key:0,"onUpdate:modelValue":C[5]||(C[5]=R=>i.value.auth_header_valor=R),type:"password",placeholder:"Valor del header (ej: Bearer xxxx)",class:"input"},null,512)),[[ie,i.value.auth_header_valor]]):B("",!0)]),l("label",bp,[z(l("input",{"onUpdate:modelValue":C[6]||(C[6]=R=>i.value.activa=R),type:"checkbox"},null,512),[[_t,i.value.activa]]),C[17]||(C[17]=Z(" Activa ",-1))]),l("div",xp,[l("button",{type:"button",class:"btn-ghost",onClick:C[7]||(C[7]=R=>o.value=!1)},"Cancelar"),C[18]||(C[18]=l("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):B("",!0)]))}},_p={class:"card p-4 mb-4"},wp={class:"flex items-center justify-between mb-2"},kp={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},$p={class:"card divide-y divide-borde"},Cp={class:"flex items-center justify-between"},Ap={class:"font-medium text-texto capitalize"},Sp={class:"flex gap-3 text-sm"},Ep=["onClick"],Ip=["onClick"],Rp={class:"flex gap-4 mt-2 text-xs"},Pp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Tp=["checked","onChange"],Op={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Dp=["checked","onChange"],Mp={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Np=["checked","onChange"],Vp={key:0,class:"label mt-1"},jp={key:1,class:"label mt-1 break-all"},Up={class:"bg-elevado px-1 rounded"},Lp={key:2,class:"text-xs text-tenue mt-1"},Fp={key:3,class:"text-xs text-red-600 dark:text-red-400 mt-1"},qp={class:"card p-6 w-full max-w-md"},Hp={key:0},Bp={class:"grid sm:grid-cols-2 gap-3"},Gp={class:"flex flex-col gap-1.5 mt-1"},Wp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Kp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},zp={class:"text-xs text-tenue"},Qp={class:"grid sm:grid-cols-2 gap-3 mt-2"},Jp={class:"flex flex-col gap-2 pt-1"},Yp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Zp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Xp={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},em={class:"flex justify-end gap-2 pt-2"},tm={__name:"TabCanales",props:{agenteId:{type:Number,required:!0},siteKey:{type:String,default:""},canales:{type:Array,default:()=>[]}},emits:["recargar","error"],setup(e,{emit:t}){const n=e,s=t,o=L(!1),r=L(d()),i=L(!1),a=le(()=>{const $=n.siteKey||"TU_SITE_KEY";return`<script src="${window.location.origin}/widget/umind.js" data-site="${$}" defer><\/script>`});async function u(){try{await navigator.clipboard.writeText(a.value),i.value=!0,setTimeout(()=>i.value=!1,2e3)}catch{error.value="No se pudo copiar automáticamente — seleccioná el texto y copialo a mano."}}function d(){return{tipo:"telegram",bot_token:"",phone_number_id:"",access_token:"",app_secret:"",verify_token:"",usuario:"",password:"",imap_host:"",smtp_host:"",imap_encriptado:"ssl",smtp_encriptado:"starttls",intervalo_minutos:5,responder_a:"todos",filtro_remitentes:"",usar_whisper_audio:!1,usar_ocr_imagenes:!1,usar_archivos_docs:!1}}function c(){r.value=d(),o.value=!0}async function m(){let $;if(r.value.tipo==="telegram")$={bot_token:r.value.bot_token};else if(r.value.tipo==="correo"){const g=String(r.value.usuario).split("@")[1]||"";$={usuario:r.value.usuario,password:r.value.password,imap_host:r.value.imap_host||`mail.${g}`,smtp_host:r.value.smtp_host||`mail.${g}`,imap_encriptado:r.value.imap_encriptado,smtp_encriptado:r.value.smtp_encriptado}}else $={phone_number_id:r.value.phone_number_id,access_token:r.value.access_token,app_secret:r.value.app_secret,verify_token:r.value.verify_token};try{await se.post(te("/umind/canales"),{agente_id:n.agenteId,tipo:r.value.tipo,credenciales:$,activo:!0,intervalo_minutos:Number(r.value.intervalo_minutos)||5,filtro_remitentes:r.value.responder_a==="algunos"?r.value.filtro_remitentes:"",usar_whisper_audio:r.value.usar_whisper_audio,usar_ocr_imagenes:r.value.usar_ocr_imagenes,usar_archivos_docs:r.value.usar_archivos_docs}),o.value=!1,s("recargar")}catch(g){s("error",g.message)}}async function p($,g){await se.put(te(`/umind/canales/${$.ID}`),{activo:$.activo,credenciales:{},usar_whisper_audio:$.usar_whisper_audio,usar_ocr_imagenes:$.usar_ocr_imagenes,usar_archivos_docs:$.usar_archivos_docs,...g}),s("recargar")}const x=$=>p($,{activo:!$.activo}),S=$=>p($,{usar_whisper_audio:!$.usar_whisper_audio}),C=$=>p($,{usar_ocr_imagenes:!$.usar_ocr_imagenes}),R=$=>p($,{usar_archivos_docs:!$.usar_archivos_docs});async function O($){confirm(`¿Eliminar el canal ${$.tipo}?`)&&(await se.del(te(`/umind/canales/${$.ID}`)),s("recargar"))}return($,g)=>(h(),w("div",null,[l("div",_p,[l("div",wp,[g[19]||(g[19]=l("div",null,[l("span",{class:"font-medium text-texto"},"Web (widget)"),l("span",{class:"ml-2 px-1.5 py-0.5 rounded text-xs badge-ok"}," siempre activo ")],-1)),l("button",{class:ue(["text-sm font-medium px-3 py-1.5 rounded-lg transition-colors",i.value?"bg-green-600 text-white":"bg-brand hover:bg-brand-dark text-white"]),onClick:u},[i.value?(h(),_e(Oe,{key:0,nombre:"ok",tam:14})):B("",!0),Z(" "+E(i.value?"Copiado":"Copiar código"),1)],2)]),g[20]||(g[20]=l("p",{class:"label mb-2"},[Z(" Pegá esto antes de "),l("code",{class:"bg-elevado px-1 rounded"},"</body>"),Z(" en las páginas de tu sitio. ")],-1)),l("pre",kp,[l("code",null,E(a.value),1)])]),l("div",{class:"flex justify-end mb-4"},[l("button",{class:"btn-primary",onClick:c}," + Nuevo canal ")]),l("div",$p,[e.canales.length===0?(h(),_e(lt,{key:0,titulo:"No está atendiendo en ningún lado",detalle:"Conectá WhatsApp o Telegram para que empiece a responderle a tus clientes. El widget de tu web funciona aparte, con la clave de sitio de arriba."})):B("",!0),(h(!0),w(X,null,xe(e.canales,b=>(h(),w("div",{key:b.ID,class:"p-4"},[l("div",Cp,[l("div",null,[l("span",Ap,E(b.tipo),1),l("span",{class:ue(["ml-2 px-1.5 py-0.5 rounded text-xs",b.activo?"badge-ok":"badge-neutro"])},E(b.activo?"activo":"inactivo"),3)]),l("div",Sp,[l("button",{class:"text-tenue hover:text-gray-800 dark:hover:text-gray-100",onClick:_=>x(b)},E(b.activo?"Desactivar":"Activar"),9,Ep),l("button",{class:"text-red-500 hover:text-red-700",onClick:_=>O(b)},"Eliminar",8,Ip)])]),l("div",Rp,[l("label",Pp,[l("input",{type:"checkbox",checked:b.usar_whisper_audio,onChange:_=>S(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Tp),g[21]||(g[21]=Z(" Transcribir audios (Whisper) ",-1))]),l("label",Op,[l("input",{type:"checkbox",checked:b.usar_ocr_imagenes,onChange:_=>C(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Dp),g[22]||(g[22]=Z(" Leer texto de imágenes (OCR) ",-1))]),l("label",Mp,[l("input",{type:"checkbox",checked:b.usar_archivos_docs,onChange:_=>R(b),class:"rounded border-borde text-brand focus:ring-brand"},null,40,Np),g[23]||(g[23]=Z(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),b.tipo==="correo"?(h(),w("p",Vp," Revisa la casilla cada "+E(b.intervalo_minutos>=60?"1 hora":`${b.intervalo_minutos} minutos`)+" · "+E(b.filtro_remitentes?`responde solo a: ${b.filtro_remitentes}`:"responde a todos"),1)):(h(),w("p",jp,[g[24]||(g[24]=Z(" Webhook: ",-1)),l("code",Up,E(b.webhook_url),1)])),b.tipo==="whatsapp"?(h(),w("p",Lp,' Registrá esta URL como "Callback URL" en Meta for Developers → WhatsApp → Configuration, con el mismo verify_token que pusiste acá. ')):B("",!0),b.ultimo_error?(h(),w("p",Fp,E(b.ultimo_error),1)):B("",!0)]))),128))]),o.value?(h(),w("div",{key:0,class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:g[18]||(g[18]=Ae(b=>o.value=!1,["self"]))},[l("div",qp,[g[49]||(g[49]=l("h2",{class:"font-semibold text-texto mb-4"},"Nuevo canal",-1)),l("form",{class:"space-y-3",onSubmit:Ae(m,["prevent"])},[l("div",null,[g[26]||(g[26]=l("label",{class:"label"},"Tipo",-1)),z(l("select",{"onUpdate:modelValue":g[0]||(g[0]=b=>r.value.tipo=b),class:"input"},[...g[25]||(g[25]=[l("option",{value:"telegram"},"Telegram",-1),l("option",{value:"whatsapp"},"WhatsApp Business",-1),l("option",{value:"correo"},"Correo (tu casilla)",-1)])],512),[[Ht,r.value.tipo]])]),r.value.tipo==="telegram"?(h(),w("div",Hp,[g[27]||(g[27]=l("label",{class:"label"},"Bot token (de @BotFather)",-1)),z(l("input",{"onUpdate:modelValue":g[1]||(g[1]=b=>r.value.bot_token=b),type:"password",required:"",class:"input"},null,512),[[ie,r.value.bot_token]])])):r.value.tipo==="correo"?(h(),w(X,{key:1},[g[40]||(g[40]=l("p",{class:"text-xs text-tenue"},[Z(" El agente va a leer esta casilla y "),l("strong",null,"responder solo"),Z(" los correos que lleguen, con su base de conocimiento. Ignora newsletters y correos automáticos. ")],-1)),l("div",Bp,[l("div",null,[g[28]||(g[28]=l("label",{class:"label"},"Correo",-1)),z(l("input",{"onUpdate:modelValue":g[2]||(g[2]=b=>r.value.usuario=b),type:"email",required:"",placeholder:"ventas@tunegocio.com",class:"input"},null,512),[[ie,r.value.usuario]])]),l("div",null,[g[29]||(g[29]=l("label",{class:"label"},"Contraseña",-1)),z(l("input",{"onUpdate:modelValue":g[3]||(g[3]=b=>r.value.password=b),type:"password",autocomplete:"new-password",required:"",class:"input"},null,512),[[ie,r.value.password]])])]),l("div",null,[g[31]||(g[31]=l("label",{class:"label"},"Revisar la casilla cada",-1)),z(l("select",{"onUpdate:modelValue":g[4]||(g[4]=b=>r.value.intervalo_minutos=b),class:"input"},[...g[30]||(g[30]=[l("option",{value:2},"2 minutos — respuesta casi inmediata",-1),l("option",{value:5},"5 minutos",-1),l("option",{value:15},"15 minutos",-1),l("option",{value:30},"30 minutos",-1),l("option",{value:60},"1 hora",-1)])],512),[[Ht,r.value.intervalo_minutos]]),g[32]||(g[32]=l("p",{class:"text-xs text-tenue mt-1"},"Un correo no es un chat: para la mayoría, 5 o 15 minutos sobra.",-1))]),l("div",null,[g[36]||(g[36]=l("label",{class:"label"},"Responder a",-1)),l("div",Gp,[l("label",Wp,[z(l("input",{"onUpdate:modelValue":g[5]||(g[5]=b=>r.value.responder_a=b),type:"radio",value:"todos",class:"text-brand focus:ring-brand"},null,512),[[Ws,r.value.responder_a]]),g[33]||(g[33]=Z(" Todos los que escriban ",-1))]),l("label",Kp,[z(l("input",{"onUpdate:modelValue":g[6]||(g[6]=b=>r.value.responder_a=b),type:"radio",value:"algunos",class:"text-brand focus:ring-brand"},null,512),[[Ws,r.value.responder_a]]),g[34]||(g[34]=Z(" Solo a estos remitentes ",-1))])]),r.value.responder_a==="algunos"?(h(),w(X,{key:0},[z(l("textarea",{"onUpdate:modelValue":g[7]||(g[7]=b=>r.value.filtro_remitentes=b),rows:"3",required:"",placeholder:`juan@cliente.com, @miempresa.com
Direcciones completas o dominios, separados por coma.`,class:"input font-mono mt-2"},null,512),[[ie,r.value.filtro_remitentes]]),g[35]||(g[35]=l("p",{class:"text-xs text-tenue mt-1"},[Z(" Un dominio (ej. "),l("span",{class:"font-mono"},"@miempresa.com"),Z(") habilita a todos los de esa empresa. El resto de los correos se ignoran sin responder. ")],-1))],64)):B("",!0)]),l("details",zp,[g[39]||(g[39]=l("summary",{class:"cursor-pointer"},"Servidores (solo si la detección automática falla)",-1)),l("div",Qp,[l("div",null,[g[37]||(g[37]=l("label",{class:"label"},"Servidor IMAP",-1)),z(l("input",{"onUpdate:modelValue":g[8]||(g[8]=b=>r.value.imap_host=b),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,r.value.imap_host]])]),l("div",null,[g[38]||(g[38]=l("label",{class:"label"},"Servidor SMTP",-1)),z(l("input",{"onUpdate:modelValue":g[9]||(g[9]=b=>r.value.smtp_host=b),placeholder:"mail.tunegocio.com",class:"input font-mono"},null,512),[[ie,r.value.smtp_host]])])])])],64)):(h(),w(X,{key:2},[l("div",null,[g[41]||(g[41]=l("label",{class:"label"},"Phone Number ID",-1)),z(l("input",{"onUpdate:modelValue":g[10]||(g[10]=b=>r.value.phone_number_id=b),required:"",class:"input"},null,512),[[ie,r.value.phone_number_id]])]),l("div",null,[g[42]||(g[42]=l("label",{class:"label"},"Access Token",-1)),z(l("input",{"onUpdate:modelValue":g[11]||(g[11]=b=>r.value.access_token=b),type:"password",required:"",class:"input"},null,512),[[ie,r.value.access_token]])]),l("div",null,[g[43]||(g[43]=l("label",{class:"label"},"App Secret",-1)),z(l("input",{"onUpdate:modelValue":g[12]||(g[12]=b=>r.value.app_secret=b),type:"password",required:"",class:"input"},null,512),[[ie,r.value.app_secret]])]),l("div",null,[g[44]||(g[44]=l("label",{class:"label"},"Verify Token (lo inventás vos, lo vas a usar en Meta)",-1)),z(l("input",{"onUpdate:modelValue":g[13]||(g[13]=b=>r.value.verify_token=b),required:"",class:"input"},null,512),[[ie,r.value.verify_token]])])],64)),l("div",Jp,[l("label",Yp,[z(l("input",{type:"checkbox","onUpdate:modelValue":g[14]||(g[14]=b=>r.value.usar_whisper_audio=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_whisper_audio]]),g[45]||(g[45]=Z(" Transcribir audios con Whisper ",-1))]),l("label",Zp,[z(l("input",{type:"checkbox","onUpdate:modelValue":g[15]||(g[15]=b=>r.value.usar_ocr_imagenes=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_ocr_imagenes]]),g[46]||(g[46]=Z(" Leer texto de imágenes con OCR ",-1))]),l("label",Xp,[z(l("input",{type:"checkbox","onUpdate:modelValue":g[16]||(g[16]=b=>r.value.usar_archivos_docs=b),class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,r.value.usar_archivos_docs]]),g[47]||(g[47]=Z(" Leer archivos adjuntos (PDF, Word, texto) ",-1))])]),l("div",em,[l("button",{type:"button",class:"btn-ghost",onClick:g[17]||(g[17]=b=>o.value=!1)},"Cancelar"),g[48]||(g[48]=l("button",{type:"submit",class:"btn-primary"},"Guardar",-1))])],32)])])):B("",!0)]))}},nm={class:"card p-1 mb-6 flex flex-wrap"},sm=["onClick"],om={class:"text-red-700 dark:text-red-400 font-medium"},rm={__name:"EstadoAgente",props:{canales:{type:Array,default:()=>[]},documentos:{type:Array,default:()=>[]},sesiones:{type:Array,default:()=>[]},eventos:{type:Array,default:()=>[]}},emits:["ir"],setup(e,{emit:t}){const n=e,s=t,o=le(()=>n.canales.filter(p=>p.activo)),r={whatsapp:"WhatsApp",telegram:"Telegram",web:"tu web",correo:"tu correo"},i=p=>r[p]||p,a=le(()=>n.documentos.filter(p=>p.estado==="listo")),u=le(()=>a.value.filter(p=>p.procesado_at&&Date.now()-new Date(p.procesado_at)>60*864e5)),d=le(()=>n.eventos.filter(p=>p.nivel==="error").length),c=le(()=>n.sesiones.filter(p=>!String(p.session_id).startsWith("staff-preview"))),m=le(()=>[{clave:"canales",icono:"mensaje",bien:o.value.length>0,texto:o.value.length?`Atendiendo en ${o.value.map(p=>i(p.tipo)).join(" y ")}`:"No está atendiendo en ningún lado",destino:"canales"},{clave:"conocimiento",icono:"escribir",bien:a.value.length>0&&u.value.length===0,texto:a.value.length?u.value.length?`${u.value.length} de ${a.value.length} fuentes están viejas`:`Sabe de ${a.value.length} ${a.value.length===1?"cosa":"cosas"}`:"Todavía no sabe nada de tu negocio",destino:"conocimiento"},{clave:"conversaciones",icono:"grafico",bien:!0,neutro:c.value.length===0,texto:c.value.length?`${c.value.length} ${c.value.length===1?"conversación":"conversaciones"}`:"Nadie escribió todavía",destino:"conversaciones"}]);return(p,x)=>(h(),w("div",nm,[(h(!0),w(X,null,xe(m.value,S=>(h(),w("button",{key:S.clave,class:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm hover:bg-elevado transition-colors text-left",onClick:C=>s("ir",S.destino)},[oe(Oe,{nombre:S.bien?S.icono:"alerta",tam:16,class:ue(S.neutro?"text-tenue":S.bien?"text-brand":"text-amber-600 dark:text-amber-400")},null,8,["nombre","class"]),l("span",{class:ue(S.neutro?"text-tenue":S.bien?"text-texto":"text-amber-700 dark:text-amber-400 font-medium")},E(S.texto),3)],8,sm))),128)),d.value?(h(),w("button",{key:0,class:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm hover:bg-elevado transition-colors ml-auto",onClick:x[0]||(x[0]=S=>s("ir","auditoria"))},[oe(Oe,{nombre:"alerta",tam:16,class:"text-red-600 dark:text-red-400"}),l("span",om,E(d.value)+" "+E(d.value===1?"problema":"problemas"),1)])):B("",!0)]))}},lm={class:"card p-5 mb-6"},im={class:"flex items-start gap-4"},am={class:"min-w-0 flex-1"},um={class:"flex items-baseline justify-between gap-3"},cm={class:"text-xs text-tenue tabular-nums shrink-0"},dm={class:"space-y-2.5"},fm={class:"min-w-0 flex-1"},pm={key:0,class:"text-xs text-tenue mt-0.5"},mm=["onClick"],vm={__name:"PrimerosPasos",props:{documentos:{type:Array,default:()=>[]},canales:{type:Array,default:()=>[]},sesiones:{type:Array,default:()=>[]}},emits:["ir"],setup(e,{emit:t}){const n=e,s=t,o=le(()=>n.documentos.some(c=>c.estado==="listo")),r=le(()=>n.sesiones.some(c=>String(c.session_id).startsWith("staff-preview"))),i=le(()=>n.canales.some(c=>c.activo)),a=le(()=>[{n:1,hecho:o.value,titulo:"Contale de tu negocio",detalle:"Escribí tus horarios, precios y lo que te preguntan siempre — o subí tu lista de precios, o dale tu sitio web.",accion:"Cargar información",destino:"conocimiento"},{n:2,hecho:r.value,titulo:"Hacele una pregunta",detalle:"Preguntale algo como lo haría un cliente. Si contesta mal, corregí su información y probá de nuevo.",accion:"Probarlo",destino:"conocimiento"},{n:3,hecho:i.value,titulo:"Ponelo a atender",detalle:"Conectá tu WhatsApp o Telegram, o pegá el widget en tu web. Desde ese momento responde solo.",accion:"Elegir dónde",destino:"canales"}]),u=le(()=>a.value.filter(c=>c.hecho).length),d=le(()=>{var c;return((c=a.value.find(m=>!m.hecho))==null?void 0:c.n)??null});return(c,m)=>(h(),w("div",lm,[l("div",im,[oe(Nn,{estado:u.value===0?"durmiendo":"contenta",tam:52,class:"text-brand shrink-0 hidden sm:block"},null,8,["estado"]),l("div",am,[l("div",um,[m[0]||(m[0]=l("h2",{class:"font-semibold text-texto"},"Pongamos a andar tu asistente",-1)),l("span",cm,E(u.value)+" de "+E(a.value.length),1)]),m[1]||(m[1]=l("p",{class:"text-sm text-tenue mt-0.5 mb-4"}," Tres pasos y empieza a responderle a tus clientes. Diez minutos, sin nada técnico. ",-1)),l("ol",dm,[(h(!0),w(X,null,xe(a.value,p=>(h(),w("li",{key:p.n,class:ue(["flex items-start gap-3 rounded-lg p-2.5 -m-0.5 transition-colors",p.n===d.value?"bg-brand/5 border border-brand/30":""])},[l("span",{class:ue(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold shrink-0 mt-0.5",p.hecho?"bg-brand text-white":p.n===d.value?"border-2 border-brand text-brand":"border border-borde text-tenue"])},[p.hecho?(h(),_e(Oe,{key:0,nombre:"ok",tam:13})):(h(),w(X,{key:1},[Z(E(p.n),1)],64))],2),l("div",fm,[l("p",{class:ue(["text-sm font-medium",p.hecho?"text-tenue line-through":"text-texto"])},E(p.titulo),3),p.hecho?B("",!0):(h(),w("p",pm,E(p.detalle),1))]),!p.hecho&&p.n===d.value?(h(),w("button",{key:0,class:"btn-primary !py-1.5 !px-3 text-sm shrink-0",onClick:x=>s("ir",p.destino)},E(p.accion),9,mm)):B("",!0)],2))),128))])])])]))}},hm={key:0,class:"mb-4 mt-1 flex items-start justify-between gap-4"},gm={class:"text-xl font-semibold text-texto min-w-0 truncate"},bm=["href"],xm={key:3,class:"text-sm text-red-600 dark:text-red-400 mb-4"},ym={class:"flex items-center gap-1.5 mb-6 flex-wrap"},_m=["onClick"],wm={class:"text-[10px]"},km={key:4,class:"flex gap-1.5 mb-6 flex-wrap -mt-3"},$m=["onClick"],Cm={key:5,class:"flex gap-1.5 mb-6 flex-wrap"},Am=["onClick"],Sm={key:6,class:"grid gap-4 lg:grid-cols-[1fr_21rem] items-start"},Em={class:"card p-4 mb-4"},Im={class:"flex gap-1 mb-3"},Rm=["onClick"],Pm={class:"flex items-center justify-between"},Tm=["disabled"],Om={class:"flex items-center justify-between"},Dm=["disabled"],Mm={class:"flex gap-2"},Nm={class:"flex items-center justify-between"},Vm={class:"flex items-center gap-2 text-xs text-tenue cursor-pointer"},jm=["disabled"],Um={class:"card divide-y divide-borde"},Lm={class:"text-sm text-texto"},Fm={class:"text-xs text-tenue mt-0.5"},qm={key:0,class:"latido"},Hm={key:0},Bm={key:1},Gm={key:3},Wm={key:4,class:"text-red-600 dark:text-red-400"},Km={class:"flex items-center gap-3 shrink-0"},zm=["title","onClick"],Qm=["disabled","onClick"],Jm=["onClick"],Ym=["disabled","title","onClick"],Zm=["onClick"],Xm={class:"lg:sticky lg:top-4"},ev={class:"card w-full max-w-2xl p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},tv={class:"flex items-baseline justify-between gap-3 mb-1"},nv={class:"font-semibold text-texto truncate"},sv={class:"text-xs text-tenue shrink-0 tabular-nums"},ov={key:0,class:"text-sm text-tenue"},rv={key:1,class:"space-y-2"},lv={class:"text-[10px] text-tenue tabular-nums block mb-1"},iv={class:"flex justify-end pt-4"},av={class:"card w-full max-w-2xl p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},uv={class:"flex justify-end gap-2 pt-1"},cv=["disabled"],dv={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=le(()=>Number(t.agenteId)),s=Wl(),o=L(null),r=L(""),i=L(typeof s.query.tab=="string"?s.query.tab:Qe.esPortal?"conversaciones":"conocimiento"),a=L([]),u=L(""),d=L(30),c=L(!1);async function m(){const A=await se.get(te(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(A.items||[]).find(k=>String(k.ID)===t.agenteId)||null}async function p(){const A=await se.get(te(`/umind/documentos?agente_id=${t.agenteId}`));a.value=A.items||[]}const x=L("texto"),S=L(!0),C=L(""),R=L(""),O=L(null);async function $(){if(u.value.trim()){c.value=!0,r.value="";try{await se.post(te("/umind/documentos"),{agente_id:n.value,url:u.value.trim(),max_paginas:Number(d.value)||30,auto_actualizar:S.value}),u.value="",await p()}catch(A){r.value=A.message}finally{c.value=!1}}}async function g(){if(R.value.trim()){c.value=!0,r.value="";try{await se.post(te("/umind/documentos/texto"),{agente_id:n.value,titulo:C.value.trim(),contenido:R.value}),C.value="",R.value="",await p()}catch(A){r.value=A.message}finally{c.value=!1}}}async function b(){var k,V;const A=(V=(k=O.value)==null?void 0:k.files)==null?void 0:V[0];if(A){c.value=!0,r.value="";try{const N=new FormData;N.append("agente_id",String(n.value)),N.append("archivo",A);const I=await fetch(te("/umind/documentos/archivo"),{method:"POST",body:N}),U=await I.json();if(!I.ok)throw new Error(U.error||"No se pudo subir");O.value.value="",await p()}catch(N){r.value=N.message}finally{c.value=!1}}}const _=L(null),j=L([]),H=L(!1);async function q(A){_.value=A,j.value=[],H.value=!0;try{const k=await se.get(te(`/umind/documentos/${A.ID}/fragmentos`));j.value=k.items||[]}catch(k){r.value=k.message,_.value=null}finally{H.value=!1}}const fe=L(null),Y=L({titulo:"",contenido:""}),F=L(!1);function Se(A){fe.value=A,Y.value={titulo:A.origen,contenido:A.contenido||""}}async function K(){if(fe.value){F.value=!0,r.value="";try{await se.put(te(`/umind/documentos/${fe.value.ID}`),{titulo:Y.value.titulo,contenido:Y.value.contenido}),fe.value=null,await p()}catch(A){r.value=A.message}finally{F.value=!1}}}async function Ge(A){r.value="";try{await se.post(te(`/umind/documentos/${A.ID}/reprocesar`),{}),await p()}catch(k){r.value=k.message}}async function Vt(A){try{await se.put(te(`/umind/documentos/${A.ID}`),{auto_actualizar:!A.auto_actualizar}),await p()}catch(k){r.value=k.message}}function Ee(A){if(!A)return"sin procesar";const k=Math.floor((Date.now()-new Date(A))/864e5);if(k<=0)return"hoy";if(k===1)return"ayer";if(k<30)return`hace ${k} días`;const V=Math.floor(k/30);return V===1?"hace un mes":`hace ${V} meses`}function pe(A){return A.procesado_at?Date.now()-new Date(A.procesado_at)>60*864e5:!1}async function de(A){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await se.del(te(`/umind/documentos/${A}`)),await p())}const nt=le(()=>A=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[A]||"badge-neutro"),We=L([]);async function et(){const A=await se.get(te(`/umind/sesiones?agente_id=${t.agenteId}`));We.value=A.items||[]}const Te=L([]);async function kt(){const A=await se.get(te(`/umind/tools?agente_id=${t.agenteId}`));Te.value=A.items||[]}const Je=L([]);async function dt(){const A=await se.get(te(`/umind/canales?agente_id=${t.agenteId}`));Je.value=A.items||[]}const Ke=le(()=>{const A=new Date,k=new Date(A.getFullYear(),A.getMonth(),1).toISOString().slice(0,10),V=A.toISOString().slice(0,10);return te(`/umind/reporte.xlsx?agente_id=${t.agenteId}&desde=${k}&hasta=${V}`)}),D=L([]);async function W(){const A=await se.get(te(`/umind/conexiones?agente_id=${t.agenteId}`));D.value=A.items||[]}const G=[["conversaciones","Conversaciones"],["conocimiento","Lo que sabe"],["canales","Dónde atiende"]],J=[["conocimiento","Información"],["conexiones","Cuentas de correo"],["herramientas","Herramientas"]],ae=le(()=>J.some(([A])=>A===i.value)),f=[["auditoria","Problemas"]],v=le(()=>!a.value.some(A=>A.estado==="listo")||!Je.value.some(A=>A.activo)),y=L(!1);f.some(([A])=>A===i.value)&&(y.value=!0);function T(A){i.value=A,f.some(([k])=>k===A)&&(y.value=!0)}const M=L([]);async function P(){const A=await se.get(te(`/umind/eventos?agente_id=${t.agenteId}`));M.value=A.items||[]}return Pt(()=>[t.tenantId,t.agenteId],async()=>{r.value="",o.value=null,a.value=[],We.value=[],Te.value=[],Je.value=[],D.value=[],M.value=[];try{await Promise.all([m(),p(),et(),kt(),dt(),W(),P()])}catch(A){r.value=A.message}},{immediate:!0}),(A,k)=>{var N;const V=mn("router-link");return h(),w("div",null,[oe(V,{to:`/tenants/${e.tenantId}`,class:"label hover:text-brand"},{default:st(()=>[...k[14]||(k[14]=[Z("← Agentes",-1)])]),_:1},8,["to"]),o.value?(h(),w("div",hm,[l("h1",gm,E(o.value.nombre),1),l("a",{href:Ke.value,class:"btn-ghost shrink-0",title:"Conversaciones y consumo del mes en Excel"},[oe(Oe,{nombre:"descargar",tam:15}),k[15]||(k[15]=Z(" Reporte del mes ",-1))],8,bm)])):B("",!0),o.value&&v.value?(h(),_e(vm,{key:1,documentos:a.value,canales:Je.value,sesiones:We.value,onIr:T},null,8,["documentos","canales","sesiones"])):o.value?(h(),_e(rm,{key:2,canales:Je.value,documentos:a.value,sesiones:We.value,eventos:M.value,onIr:T},null,8,["canales","documentos","sesiones","eventos"])):B("",!0),r.value?(h(),w("p",xm,E(r.value),1)):B("",!0),l("div",ym,[(h(),w(X,null,xe(G,([I,U])=>l("button",{key:I,class:ue(["px-3.5 py-1.5 rounded-full text-sm whitespace-nowrap transition-colors",(I==="conocimiento"?ae.value:i.value===I)?"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:Q=>i.value=I},E(U),11,_m)),64)),l("button",{class:"ml-auto text-xs text-tenue hover:text-texto inline-flex items-center gap-1",onClick:k[0]||(k[0]=I=>y.value=!y.value)},[k[16]||(k[16]=Z(" Avanzado ",-1)),l("span",wm,E(y.value?"▲":"▼"),1)])]),ae.value?(h(),w("div",km,[(h(),w(X,null,xe(J,([I,U])=>l("button",{key:I,class:ue(["px-3 py-1 rounded-full text-xs whitespace-nowrap transition-colors",i.value===I?"bg-brand/15 text-brand font-medium border border-brand/40":"text-tenue border border-transparent hover:text-texto"]),onClick:Q=>i.value=I},E(U),11,$m)),64))])):B("",!0),y.value?(h(),w("div",Cm,[(h(),w(X,null,xe(f,([I,U])=>l("button",{key:I,class:ue(["px-3 py-1 rounded-full text-xs whitespace-nowrap transition-colors",i.value===I?"bg-texto text-white dark:bg-gray-200 dark:text-gray-900 font-medium":"bg-white dark:bg-gray-900 text-tenue border border-borde hover:border-brand/50"]),onClick:Q=>i.value=I},E(U),11,Am)),64))])):B("",!0),i.value==="conocimiento"?(h(),w("div",Sm,[l("div",null,[l("div",Em,[l("div",Im,[(h(),w(X,null,xe([["texto","escribir","Escribir"],["archivo","archivo","Subir archivo"],["url","sitio","Sitio web"]],([I,U,Q])=>l("button",{key:I,class:ue(["px-3 py-1.5 rounded-lg text-sm inline-flex items-center gap-1.5",x.value===I?"bg-brand text-white font-medium":"text-tenue hover:text-texto"]),onClick:ne=>x.value=I},[oe(Oe,{nombre:U,tam:15},null,8,["nombre"]),Z(" "+E(Q),1)],10,Rm)),64))]),x.value==="texto"?(h(),w("form",{key:0,class:"space-y-2",onSubmit:Ae(g,["prevent"])},[z(l("input",{"onUpdate:modelValue":k[1]||(k[1]=I=>C.value=I),placeholder:"Título (ej: Horarios y zonas de entrega)",class:"input"},null,512),[[ie,C.value]]),z(l("textarea",{"onUpdate:modelValue":k[2]||(k[2]=I=>R.value=I),rows:"5",required:"",placeholder:"Atendemos de lunes a viernes de 9 a 18. No hacemos envíos fuera de la ciudad. La garantía es de 6 meses y cubre…",class:"input font-normal"},null,512),[[ie,R.value]]),l("div",Pm,[k[17]||(k[17]=l("p",{class:"text-xs text-tenue"},"Lo que te preguntan todos los días y no está en tu web.",-1)),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},E(c.value?"Guardando…":"Guardar"),9,Tm)])],32)):x.value==="archivo"?(h(),w("form",{key:1,class:"space-y-2",onSubmit:Ae(b,["prevent"])},[l("input",{ref_key:"archivoRef",ref:O,type:"file",accept:".pdf,.docx,.txt,.md,.csv,.html,image/*",class:"text-sm text-texto"},null,512),l("div",Om,[k[18]||(k[18]=l("p",{class:"text-xs text-tenue"},"PDF, Word, texto o una foto. Ej: tu lista de precios.",-1)),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},E(c.value?"Leyendo…":"Subir"),9,Dm)])],32)):(h(),w("form",{key:2,class:"space-y-2",onSubmit:Ae($,["prevent"])},[l("div",Mm,[z(l("input",{"onUpdate:modelValue":k[3]||(k[3]=I=>u.value=I),type:"url",placeholder:"https://ejemplo.com",required:"",class:"input flex-1"},null,512),[[ie,u.value]]),z(l("input",{"onUpdate:modelValue":k[4]||(k[4]=I=>d.value=I),type:"number",min:"1",max:"200",class:"input w-24",title:"Máximo de páginas a leer"},null,512),[[ie,d.value]])]),l("div",Nm,[l("label",Vm,[z(l("input",{"onUpdate:modelValue":k[5]||(k[5]=I=>S.value=I),type:"checkbox",class:"rounded border-borde text-brand focus:ring-brand"},null,512),[[_t,S.value]]),k[19]||(k[19]=Z(" Releer el sitio cada semana ",-1))]),l("button",{type:"submit",disabled:c.value,class:"btn-primary disabled:opacity-50"},E(c.value?"Leyendo…":"Leer sitio"),9,jm)])],32))]),l("div",Um,[a.value.length===0?(h(),_e(lt,{key:0,estado:"buscando",titulo:"Todavía no sabe nada de tu negocio",detalle:"Sin información cargada va a contestar que no sabe. Empezá por escribir tus horarios y lo que te preguntan todos los días — es lo más rápido y lo que más se nota."})):B("",!0),(h(!0),w(X,null,xe(a.value,I=>(h(),w("div",{key:I.ID,class:"p-4 flex items-center justify-between"},[l("div",null,[l("div",Lm,E(I.origen),1),l("div",Fm,[l("span",{class:ue(["px-1.5 py-0.5 rounded inline-flex items-center gap-1",nt.value(I.estado)])},[I.estado==="procesando"?(h(),w("span",qm)):B("",!0),Z(" "+E(I.estado),1)],2),I.tipo?(h(),w("span",Hm," · "+E({url:"sitio",archivo:"archivo",texto:"nota"}[I.tipo]||I.tipo),1)):B("",!0),I.total_chunks?(h(),w("span",Bm," · "+E(I.total_chunks)+" fragmentos",1)):B("",!0),I.procesado_at?(h(),w("span",{key:2,class:ue(pe(I)?"text-amber-600 dark:text-amber-400 font-medium":"")}," · leído "+E(Ee(I.procesado_at)),3)):B("",!0),I.auto_actualizar?(h(),w("span",Gm," · se actualiza sola")):B("",!0),I.error?(h(),w("span",Wm," · "+E(I.error),1)):B("",!0)])]),l("div",Km,[I.tipo==="url"?(h(),w("button",{key:0,class:"text-xs text-tenue hover:text-texto",title:I.auto_actualizar?"Dejar de releer sola":"Releer el sitio cada semana",onClick:U=>Vt(I)},[oe(Oe,{nombre:I.auto_actualizar?"auto":"refrescar",tam:13,class:"mr-1"},null,8,["nombre"]),Z(E(I.auto_actualizar?"auto":"manual"),1)],8,zm)):B("",!0),l("button",{class:ue(["text-sm text-tenue hover:text-texto",I.total_chunks?"":"opacity-40 cursor-default"]),disabled:!I.total_chunks,title:"Ver qué se leyó de esta fuente",onClick:U=>q(I)},"Ver",10,Qm),I.tipo==="texto"||I.tipo==="archivo"?(h(),w("button",{key:1,class:"text-sm text-brand hover:underline",onClick:U=>Se(I)},"Editar",8,Jm)):B("",!0),l("button",{class:"text-sm text-tenue hover:text-texto disabled:opacity-40",disabled:I.estado==="procesando",title:I.tipo==="url"?"Volver a leer el sitio":"Rehacer los fragmentos",onClick:U=>Ge(I)},"Actualizar",8,Ym),l("button",{class:"text-red-500 hover:text-red-700 text-sm",onClick:U=>de(I.ID)},"Eliminar",8,Zm)])]))),128))])]),l("div",Xm,[k[20]||(k[20]=l("p",{class:"label mb-2"},"Probalo",-1)),oe(xr,{"agente-id":n.value},null,8,["agente-id"])]),_.value?(h(),w("div",{key:0,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:k[7]||(k[7]=Ae(I=>_.value=null,["self"]))},[l("div",ev,[l("div",tv,[l("h2",nv,E(_.value.origen),1),l("span",sv,E(j.value.length)+" "+E(j.value.length===1?"fragmento":"fragmentos"),1)]),k[21]||(k[21]=l("p",{class:"text-xs text-tenue mb-4"}," Esto es exactamente lo que el asistente puede consultar de esta fuente. Si acá falta algo o se leyó mal, eso mismo le va a faltar en las respuestas. ",-1)),H.value?(h(),w("p",ov,"Cargando…")):(h(),w("div",rv,[(h(!0),w(X,null,xe(j.value,(I,U)=>(h(),w("div",{key:I.ID,class:"bg-elevado border border-borde rounded-lg p-3 text-sm text-texto whitespace-pre-wrap"},[l("span",lv,"#"+E(U+1),1),Z(E(I.contenido),1)]))),128))])),l("div",iv,[l("button",{class:"btn-ghost",onClick:k[6]||(k[6]=I=>_.value=null)},"Cerrar")])])])):B("",!0),fe.value?(h(),w("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:k[11]||(k[11]=Ae(I=>fe.value=null,["self"]))},[l("div",av,[k[25]||(k[25]=l("h2",{class:"font-semibold text-texto mb-1"},"Editar fuente",-1)),k[26]||(k[26]=l("p",{class:"text-xs text-tenue mb-4"}," Al guardar se vuelve a leer y el agente empieza a contestar con esto. ",-1)),l("form",{class:"space-y-3",onSubmit:Ae(K,["prevent"])},[l("div",null,[k[22]||(k[22]=l("label",{class:"label"},"Título",-1)),z(l("input",{"onUpdate:modelValue":k[8]||(k[8]=I=>Y.value.titulo=I),required:"",class:"input"},null,512),[[ie,Y.value.titulo]])]),l("div",null,[k[23]||(k[23]=l("label",{class:"label"},"Contenido",-1)),z(l("textarea",{"onUpdate:modelValue":k[9]||(k[9]=I=>Y.value.contenido=I),rows:"16",required:"",class:"input font-normal leading-relaxed"},null,512),[[ie,Y.value.contenido]]),k[24]||(k[24]=l("p",{class:"text-xs text-tenue mt-1.5"}," Si viene de una plantilla, reemplazá lo que está [entre corchetes] por tus datos. Lo que quede sin reemplazar el agente lo va a leer tal cual. ",-1))]),l("div",uv,[l("button",{type:"button",class:"btn-ghost",onClick:k[10]||(k[10]=I=>fe.value=null)},"Cancelar"),l("button",{type:"submit",class:"btn-primary",disabled:F.value},E(F.value?"Guardando…":"Guardar y volver a leer"),9,cv)])],32)])])):B("",!0)])):i.value==="herramientas"?(h(),_e(yp,{key:7,"agente-id":n.value,tools:Te.value,onRecargar:kt,onError:k[12]||(k[12]=I=>r.value=I)},null,8,["agente-id","tools"])):i.value==="canales"?(h(),_e(tm,{key:8,"agente-id":n.value,"site-key":((N=o.value)==null?void 0:N.site_key)||"",canales:Je.value,onRecargar:dt,onError:k[13]||(k[13]=I=>r.value=I)},null,8,["agente-id","site-key","canales"])):i.value==="conexiones"?(h(),_e(Of,{key:9,"agente-id":n.value,conexiones:D.value,onRecargar:W},null,8,["agente-id","conexiones"])):i.value==="chat"?(h(),_e(xr,{key:10,"agente-id":n.value},null,8,["agente-id"])):i.value==="conversaciones"?(h(),_e(Jf,{key:11,"agente-id":n.value,sesiones:We.value},null,8,["agente-id","sesiones"])):(h(),_e(bf,{key:12,eventos:M.value},null,8,["eventos"]))])}}},fv={class:"flex items-start justify-between gap-4 mb-6"},pv={class:"card p-4 mb-4"},mv={class:"flex flex-wrap items-end gap-3"},vv={class:"flex gap-1 ml-auto"},hv={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},gv={key:1,class:"text-sm text-tenue"},bv={class:"grid gap-3 sm:grid-cols-3 mb-4"},xv={class:"card p-4"},yv={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},_v={class:"card p-4"},wv={class:"text-2xl font-semibold text-texto mt-1 tabular-nums"},kv={class:"card p-4"},$v={class:"text-lg font-semibold text-texto mt-1"},Cv={key:0,class:"text-[11px] text-tenue mt-0.5"},Av={key:0,class:"card p-4 mb-4"},Sv={class:"flex items-center justify-between text-sm mb-2"},Ev={class:"text-tenue tabular-nums"},Iv={class:"h-2 rounded-full bg-elevado overflow-hidden"},Rv={key:0,class:"text-xs text-amber-600 dark:text-amber-400 mt-2"},Pv={class:"card divide-y divide-borde mb-4"},Tv={class:"min-w-0 flex-1"},Ov={class:"text-sm text-texto"},Dv={class:"text-xs text-tenue tabular-nums"},Mv={key:0,class:"text-sm font-medium text-texto tabular-nums"},Nv={key:1,class:"text-xs text-tenue text-right leading-tight"},Vv={key:1,class:"card p-4"},jv={class:"flex items-end gap-1 h-28"},Uv=["title"],Lv={class:"flex justify-between text-[11px] text-tenue mt-2"},Fv={__name:"Uso",props:{id:{type:String,required:!0}},setup(e){const t=e,n=L(!0),s=L(""),o=L(null),r=new Date,i=L(new Date(r.getFullYear(),r.getMonth(),1).toISOString().slice(0,10)),a=L(r.toISOString().slice(0,10)),u={ia:{nombre:"Inteligencia artificial",icono:"cerebro",color:"#8eb02f"},ocr:{nombre:"Lectura de imágenes",icono:"imagen",color:"#2f7fb0"},whisper:{nombre:"Transcripción de audio",icono:"microfono",color:"#b0752f"}},d=b=>u[b]||{nombre:b,icono:"grafico",color:"#94a3b8"};async function c(){n.value=!0,s.value="";try{o.value=await se.get(te(`/umind/uso?tenant_id=${t.id}&desde=${i.value}&hasta=${a.value}`))}catch(b){s.value=b.message}finally{n.value=!1}}const m=le(()=>{var b,_;return((_=(b=o.value)==null?void 0:b.plan)==null?void 0:_.moneda)||"COP"}),p=le(()=>{var b;return((b=o.value)==null?void 0:b.resumen)||[]}),x=le(()=>{var b;return((b=o.value)==null?void 0:b.total_periodo)||0}),S=le(()=>{var b,_;return((_=(b=o.value)==null?void 0:b.plan)==null?void 0:_.tope_consumo_mensual)||0}),C=le(()=>S.value?Math.min(100,x.value/S.value*100):0);function R(b){return`${m.value} ${Number(b||0).toLocaleString("es-CO",{maximumFractionDigits:2})}`}function O(b){return Number(b||0).toLocaleString("es-CO",{maximumFractionDigits:0})}const $=le(()=>{var H;const b=new Map;for(const q of((H=o.value)==null?void 0:H.detalle)||[]){const fe=String(q.CreatedAt).slice(0,10);b.set(fe,(b.get(fe)||0)+(q.costo||0))}const _=[...b.entries()].sort((q,fe)=>q[0].localeCompare(fe[0])),j=Math.max(..._.map(q=>q[1]),0);return{dias:_,max:j}});function g(b){const _=new Date,j=new Date;j.setDate(j.getDate()-b),i.value=j.toISOString().slice(0,10),a.value=_.toISOString().slice(0,10),c()}return Pt(()=>t.id,c,{immediate:!0}),(b,_)=>{var H;const j=mn("router-link");return h(),w("div",null,[l("div",fv,[_[6]||(_[6]=l("div",null,[l("h1",{class:"text-xl font-semibold text-texto"},"Consumo"),l("p",{class:"text-sm text-tenue mt-0.5"},"Lo que usaron tus agentes y cuánto cuesta.")],-1)),oe(j,{to:`/tenants/${e.id}`,class:"btn-ghost inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"atras",tam:15}),_[5]||(_[5]=Z(" Agentes",-1))]),_:1},8,["to"])]),l("div",pv,[l("div",mv,[l("div",null,[_[7]||(_[7]=l("label",{class:"label"},"Desde",-1)),z(l("input",{"onUpdate:modelValue":_[0]||(_[0]=q=>i.value=q),type:"date",class:"input !w-auto"},null,512),[[ie,i.value]])]),l("div",null,[_[8]||(_[8]=l("label",{class:"label"},"Hasta",-1)),z(l("input",{"onUpdate:modelValue":_[1]||(_[1]=q=>a.value=q),type:"date",class:"input !w-auto"},null,512),[[ie,a.value]])]),l("button",{class:"btn-primary",onClick:c},"Aplicar"),l("div",vv,[l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[2]||(_[2]=q=>g(6))},"7 días"),l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[3]||(_[3]=q=>g(29))},"30 días"),l("button",{class:"btn-ghost !px-2.5 !py-1 !text-xs",onClick:_[4]||(_[4]=q=>g(89))},"90 días")])])]),s.value?(h(),w("p",hv,E(s.value),1)):B("",!0),n.value?(h(),w("p",gv,"Cargando…")):o.value?(h(),w(X,{key:2},[l("div",bv,[l("div",xv,[_[9]||(_[9]=l("p",{class:"text-xs text-tenue"},"Consumo del período",-1)),l("p",yv,E(R(x.value)),1)]),l("div",_v,[_[10]||(_[10]=l("p",{class:"text-xs text-tenue"},"Pendiente de facturar",-1)),l("p",wv,E(R(o.value.pendiente_facturar)),1),_[11]||(_[11]=l("p",{class:"text-[11px] text-tenue mt-0.5"},"Se suma a tu próxima factura.",-1))]),l("div",kv,[_[12]||(_[12]=l("p",{class:"text-xs text-tenue"},"Plan",-1)),l("p",$v,E(((H=o.value.plan)==null?void 0:H.nombre)||"Sin plan"),1),o.value.plan?(h(),w("p",Cv," Mensualidad "+E(R(o.value.plan.precio_mensual)),1)):B("",!0)])]),S.value?(h(),w("div",Av,[l("div",Sv,[_[13]||(_[13]=l("span",{class:"text-texto"},"Tope mensual",-1)),l("span",Ev,E(R(x.value))+" / "+E(R(S.value)),1)]),l("div",Iv,[l("div",{class:ue(["h-full rounded-full transition-all duration-500",C.value>=100?"bg-red-500":C.value>=80?"bg-amber-500":"bg-brand"]),style:Jt({width:C.value+"%"})},null,6)]),C.value>=100?(h(),w("p",Rv," Superaste el tope de tu plan. El servicio sigue funcionando y el excedente se cobra en el próximo ciclo. ")):B("",!0)])):B("",!0),l("div",Pv,[_[15]||(_[15]=l("div",{class:"px-4 py-3"},[l("h2",{class:"text-sm font-medium text-texto"},"Desglose")],-1)),p.value.length===0?(h(),_e(lt,{key:0,estado:"durmiendo",titulo:"Sin consumo en este período",detalle:"Cuando tus agentes respondan mensajes, lean imágenes o transcriban audios, vas a verlo acá."})):B("",!0),(h(!0),w(X,null,xe(p.value,q=>(h(),w("div",{key:q.tipo,class:"px-4 py-3 flex items-center gap-3"},[oe(Oe,{nombre:d(q.tipo).icono,tam:18,class:"text-tenue"},null,8,["nombre"]),l("div",Tv,[l("p",Ov,E(d(q.tipo).nombre),1),l("p",Dv,E(O(q.cantidad))+" "+E(q.unidad)+" · "+E(O(q.eventos))+" usos ",1)]),q.costo>0?(h(),w("span",Mv,E(R(q.costo)),1)):(h(),w("span",Nv,[..._[14]||(_[14]=[Z(" va por tu",-1),l("br",null,null,-1),Z("cuenta de IA ",-1)])]))]))),128))]),$.value.dias.length?(h(),w("div",Vv,[_[16]||(_[16]=l("h2",{class:"text-sm font-medium text-texto mb-3"},"Por día",-1)),l("div",jv,[(h(!0),w(X,null,xe($.value.dias,([q,fe])=>(h(),w("div",{key:q,class:"flex-1 min-w-[3px] bg-brand/70 hover:bg-brand rounded-t transition-colors",style:Jt({height:$.value.max?Math.max(2,fe/$.value.max*100)+"%":"2px"}),title:`${q}: ${R(fe)}`},null,12,Uv))),128))]),l("div",Lv,[l("span",null,E($.value.dias[0][0]),1),l("span",null,E($.value.dias[$.value.dias.length-1][0]),1)])])):B("",!0)],64)):B("",!0)])}}},qv={class:"flex items-start justify-between gap-4 mb-6"},Hv={key:0,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Bv={key:1,class:"text-sm text-tenue"},Gv={key:3,class:"card divide-y divide-borde"},Wv={class:"flex items-start justify-between gap-4"},Kv={class:"min-w-0"},zv={class:"text-sm text-texto font-medium"},Qv={class:"text-xs text-tenue mt-0.5"},Jv={class:"font-mono"},Yv={class:"flex items-center gap-3 shrink-0 text-sm"},Zv=["disabled","onClick"],Xv=["onClick"],eh=["onClick"],th={key:4,class:"text-xs text-tenue mt-3"},nh={class:"card w-full max-w-lg p-6 max-h-[calc(100vh-2rem)] overflow-y-auto"},sh={class:"font-semibold text-texto mb-4"},oh=["value"],rh={key:0,class:"text-xs text-tenue mt-1"},lh={class:"font-mono"},ih=["placeholder"],ah={key:0},uh={class:"label"},ch={key:0,class:"text-tenue font-normal"},dh=["required"],fh={key:1},ph={class:"flex justify-end gap-2 pt-2"},mh=["disabled"],vh={__name:"AiPropia",props:{id:{type:String,required:!0}},setup(e){const t=e,n=L([]),s=L(!0),o=L(""),r=L(!1),i=L(null),a=L(!1),u=L(null),d=L({}),c=[{valor:"openai",nombre:"OpenAI",modelo:"gpt-4o-mini",donde:"platform.openai.com/api-keys"},{valor:"anthropic",nombre:"Anthropic (Claude)",modelo:"claude-sonnet-4-20250514",donde:"console.anthropic.com"},{valor:"gemini",nombre:"Google Gemini",modelo:"gemini-2.0-flash",donde:"aistudio.google.com/apikey"},{valor:"groq",nombre:"Groq",modelo:"llama-3.3-70b-versatile",donde:"console.groq.com/keys"},{valor:"deepseek",nombre:"DeepSeek",modelo:"deepseek-chat",donde:"platform.deepseek.com"},{valor:"qwen",nombre:"Qwen (Alibaba)",modelo:"qwen2.5-72b-instruct",donde:"dashscope.console.aliyun.com"},{valor:"ollama",nombre:"Ollama (tu servidor)",modelo:"llama3.1",donde:""}];function m(){return{nombre:"",provider:"openai",api_key:"",base_url:"",model_name:""}}const p=L(m());function x(b){return c.find(_=>_.valor===b)||c[0]}async function S(){s.value=!0,o.value="";try{const b=await se.get(te(`/umind/ai-propia?tenant_id=${t.id}`));n.value=b.items||[]}catch(b){o.value=b.message}finally{s.value=!1}}Pt(()=>t.id,S,{immediate:!0});function C(){i.value=null,p.value=m(),r.value=!0}function R(b){i.value=b,p.value={nombre:b.nombre,provider:b.provider,api_key:"",base_url:b.base_url||"",model_name:b.model_name||""},r.value=!0}async function O(){a.value=!0,o.value="";try{const b={tenant_id:Number(t.id),...p.value};i.value?await se.put(te(`/umind/ai-propia/${i.value.ID}`),b):await se.post(te("/umind/ai-propia"),b),r.value=!1,await S()}catch(b){o.value=b.message}finally{a.value=!1}}async function $(b){u.value=b.ID,d.value={...d.value,[b.ID]:null};try{const _=await se.post(te(`/umind/ai-propia/${b.ID}/probar`),{});d.value={...d.value,[b.ID]:{ok:!0,texto:_.respuesta}}}catch(_){d.value={...d.value,[b.ID]:{ok:!1,texto:_.message}}}finally{u.value=null}}async function g(b){if(confirm(`¿Eliminar "${b.nombre}"?`)){o.value="";try{await se.del(te(`/umind/ai-propia/${b.ID}`)),await S()}catch(_){o.value=_.message}}}return(b,_)=>{const j=mn("router-link");return h(),w("div",null,[l("div",qv,[l("div",null,[oe(j,{to:`/tenants/${e.id}`,class:"text-sm text-tenue hover:text-texto inline-flex items-center gap-1.5"},{default:st(()=>[oe(Oe,{nombre:"atras",tam:14}),_[7]||(_[7]=Z(" Agentes",-1))]),_:1},8,["to"]),_[8]||(_[8]=l("h1",{class:"text-xl font-semibold text-texto mt-1"},"Tu cuenta de IA",-1)),_[9]||(_[9]=l("p",{class:"text-sm text-tenue mt-1 max-w-xl"}," Podés usar tu propia cuenta de OpenAI, Claude o Gemini en vez de la nuestra. El consumo se factura directo con el proveedor y no pasa por tu plan. ",-1))]),l("button",{class:"btn-primary shrink-0",onClick:C},"+ Conectar cuenta")]),o.value?(h(),w("p",Hv,E(o.value),1)):B("",!0),s.value?(h(),w("div",Bv,"Cargando…")):n.value.length===0?(h(),_e(lt,{key:2,class:"card",titulo:"Estás usando la IA de uMind",detalle:"Funciona sin que hagas nada. Conectá tu propia cuenta solo si querés facturar el consumo por tu lado o usar un modelo puntual."},{default:st(()=>[l("button",{class:"btn-primary",onClick:C},"Conectar mi cuenta")]),_:1})):(h(),w("div",Gv,[(h(!0),w(X,null,xe(n.value,H=>(h(),w("div",{key:H.ID,class:"p-4"},[l("div",Wv,[l("div",Kv,[l("div",zv,E(H.nombre),1),l("div",Qv,[Z(E(x(H.provider).nombre)+" · "+E(H.model_name)+" · ",1),l("span",Jv,E(H.api_key_pista),1)]),d.value[H.ID]?(h(),w("p",{key:0,class:ue(["text-xs mt-1.5",d.value[H.ID].ok?"text-brand":"text-red-600 dark:text-red-400"])},E(d.value[H.ID].ok?`Responde bien — dijo "${d.value[H.ID].texto}"`:d.value[H.ID].texto),3)):B("",!0)]),l("div",Yv,[l("button",{class:"text-brand hover:underline disabled:opacity-40",disabled:u.value===H.ID,onClick:q=>$(H)},E(u.value===H.ID?"Probando…":"Probar"),9,Zv),l("button",{class:"text-tenue hover:text-texto",onClick:q=>R(H)},"Editar",8,Xv),l("button",{class:"text-red-500 hover:text-red-700",onClick:q=>g(H)},"Eliminar",8,eh)])])]))),128))])),n.value.length?(h(),w("p",th,[..._[10]||(_[10]=[Z(" Para que un agente la use, elegila en su campo ",-1),l("strong",null,"Config de IA",-1),Z(". ",-1)])])):B("",!0),r.value?(h(),w("div",{key:5,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:_[6]||(_[6]=Ae(H=>r.value=!1,["self"]))},[l("div",nh,[l("h2",sh,E(i.value?"Editar cuenta de IA":"Conectar tu cuenta de IA"),1),l("form",{class:"space-y-3",onSubmit:Ae(O,["prevent"])},[l("div",null,[_[11]||(_[11]=l("label",{class:"label"},"Nombre",-1)),z(l("input",{"onUpdate:modelValue":_[0]||(_[0]=H=>p.value.nombre=H),required:"",placeholder:"ej: Mi cuenta de OpenAI",class:"input"},null,512),[[ie,p.value.nombre]])]),l("div",null,[_[13]||(_[13]=l("label",{class:"label"},"Proveedor",-1)),z(l("select",{"onUpdate:modelValue":_[1]||(_[1]=H=>p.value.provider=H),class:"input"},[(h(),w(X,null,xe(c,H=>l("option",{key:H.valor,value:H.valor},E(H.nombre),9,oh)),64))],512),[[Ht,p.value.provider]]),x(p.value.provider).donde?(h(),w("p",rh,[_[12]||(_[12]=Z(" La clave se saca de ",-1)),l("span",lh,E(x(p.value.provider).donde),1)])):B("",!0)]),l("div",null,[_[14]||(_[14]=l("label",{class:"label"},"Modelo",-1)),z(l("input",{"onUpdate:modelValue":_[2]||(_[2]=H=>p.value.model_name=H),required:"",placeholder:`ej: ${x(p.value.provider).modelo}`,class:"input font-mono"},null,8,ih),[[ie,p.value.model_name]])]),p.value.provider!=="ollama"?(h(),w("div",ah,[l("label",uh,[_[15]||(_[15]=Z(" Clave de API ",-1)),i.value?(h(),w("span",ch,"— dejala vacía para no cambiarla")):B("",!0)]),z(l("input",{"onUpdate:modelValue":_[3]||(_[3]=H=>p.value.api_key=H),type:"password",autocomplete:"new-password",required:!i.value,placeholder:"sk-...",class:"input font-mono"},null,8,dh),[[ie,p.value.api_key]]),_[16]||(_[16]=l("p",{class:"text-xs text-tenue mt-1"},"Se guarda cifrada y no se vuelve a mostrar.",-1))])):B("",!0),p.value.provider==="ollama"?(h(),w("div",fh,[_[17]||(_[17]=l("label",{class:"label"},"URL de tu servidor",-1)),z(l("input",{"onUpdate:modelValue":_[4]||(_[4]=H=>p.value.base_url=H),required:"",placeholder:"https://ollama.tudominio.com/v1",class:"input font-mono"},null,512),[[ie,p.value.base_url]])])):B("",!0),l("div",ph,[l("button",{type:"button",class:"btn-ghost",onClick:_[5]||(_[5]=H=>r.value=!1)},"Cancelar"),l("button",{type:"submit",class:"btn-primary",disabled:a.value},E(a.value?"Guardando…":"Guardar"),9,mh)])],32)])])):B("",!0)])}}},hh=yc({history:Zu(Qe.baseRuta),routes:[{path:"/",name:"home",component:pd},{path:"/tenants/:id",name:"tenant-agentes",component:df,props:!0},{path:"/tenants/:id/uso",name:"uso",component:Fv,props:!0},{path:"/tenants/:id/ia",name:"ai-propia",component:vh,props:!0},{path:"/tenants/:tenantId/agentes/:agenteId",name:"agente-detail",component:dv,props:!0}]});du(Jc).use(hh).mount("#app");