diff --git a/orchestrator/src/views/AgenteDetail.vue b/orchestrator/src/views/AgenteDetail.vue index d418273..6ab0b58 100644 --- a/orchestrator/src/views/AgenteDetail.vue +++ b/orchestrator/src/views/AgenteDetail.vue @@ -198,7 +198,7 @@ async function copiarWidget() { function canalVacio() { return { tipo: 'telegram', bot_token: '', phone_number_id: '', access_token: '', app_secret: '', verify_token: '', - usar_whisper_audio: false, usar_ocr_imagenes: false, + usar_whisper_audio: false, usar_ocr_imagenes: false, usar_archivos_docs: false, } } @@ -226,6 +226,7 @@ async function guardarCanal() { await api.post(apiUmind('/umind/canales'), { agente_id: agenteIdNum.value, tipo: canalForm.value.tipo, credenciales, activo: true, usar_whisper_audio: canalForm.value.usar_whisper_audio, usar_ocr_imagenes: canalForm.value.usar_ocr_imagenes, + usar_archivos_docs: canalForm.value.usar_archivos_docs, }) showCanalForm.value = false await cargarCanales() @@ -234,29 +235,24 @@ async function guardarCanal() { } } -async function toggleCanal(c) { +// El PUT de canales manda los tres interruptores siempre: si alguno faltara, el +// backend lo tomaría como false y lo apagaría sin que nadie lo pidiera. +async function guardarInterruptores(c, cambios) { await api.put(apiUmind(`/umind/canales/${c.ID}`), { - activo: !c.activo, credenciales: {}, - usar_whisper_audio: c.usar_whisper_audio, usar_ocr_imagenes: c.usar_ocr_imagenes, + activo: c.activo, + credenciales: {}, + usar_whisper_audio: c.usar_whisper_audio, + usar_ocr_imagenes: c.usar_ocr_imagenes, + usar_archivos_docs: c.usar_archivos_docs, + ...cambios, }) await cargarCanales() } -async function toggleCanalWhisper(c) { - await api.put(apiUmind(`/umind/canales/${c.ID}`), { - activo: c.activo, credenciales: {}, - usar_whisper_audio: !c.usar_whisper_audio, usar_ocr_imagenes: c.usar_ocr_imagenes, - }) - await cargarCanales() -} - -async function toggleCanalOcr(c) { - await api.put(apiUmind(`/umind/canales/${c.ID}`), { - activo: c.activo, credenciales: {}, - usar_whisper_audio: c.usar_whisper_audio, usar_ocr_imagenes: !c.usar_ocr_imagenes, - }) - await cargarCanales() -} +const toggleCanal = (c) => guardarInterruptores(c, { activo: !c.activo }) +const toggleCanalWhisper = (c) => guardarInterruptores(c, { usar_whisper_audio: !c.usar_whisper_audio }) +const toggleCanalOcr = (c) => guardarInterruptores(c, { usar_ocr_imagenes: !c.usar_ocr_imagenes }) +const toggleCanalArchivos = (c) => guardarInterruptores(c, { usar_archivos_docs: !c.usar_archivos_docs }) async function eliminarCanal(c) { if (!confirm(`¿Eliminar el canal ${c.tipo}?`)) return @@ -585,6 +581,10 @@ watch( Leer texto de imágenes (OCR) +

Webhook: {{ c.webhook_url }} @@ -640,6 +640,10 @@ watch( Leer texto de imágenes con OCR +

diff --git a/pkg/models/umind_canal.go b/pkg/models/umind_canal.go index 24b1f27..f0fecbc 100644 --- a/pkg/models/umind_canal.go +++ b/pkg/models/umind_canal.go @@ -33,6 +33,9 @@ type UmindCanal struct { // antes de pasarlos al agente, en vez de ignorarse. UsarWhisperAudio bool `json:"usar_whisper_audio" gorm:"column:usar_whisper_audio;default:false"` UsarOcrImagenes bool `json:"usar_ocr_imagenes" gorm:"column:usar_ocr_imagenes;default:false"` + // Documentos adjuntos (PDF, Word, texto): se les extrae el contenido y se + // le pasa al agente como si el cliente lo hubiera escrito. + UsarArchivosDocs bool `json:"usar_archivos_docs" gorm:"column:usar_archivos_docs;default:false"` } func (UmindCanal) TableName() string { return "umind_canales" } diff --git a/pkg/services/archivo_texto_service.go b/pkg/services/archivo_texto_service.go new file mode 100644 index 0000000..3b726a3 --- /dev/null +++ b/pkg/services/archivo_texto_service.go @@ -0,0 +1,193 @@ +package services + +import ( + "archive/zip" + "bytes" + "compress/zlib" + "fmt" + "io" + "path/filepath" + "regexp" + "strings" + "unicode" +) + +// ExtraerTextoDeArchivo saca el texto de un archivo cualquiera para dárselo al +// agente. Es el equivalente de Whisper para audio y OCR para imágenes, pero +// para documentos. +// +// agenteID identifica a quién cobrarle si hace falta pasar por OCR; 0 = no medir. +func ExtraerTextoDeArchivo(agenteID uint, nombreArchivo string, datos []byte) (string, error) { + ext := strings.ToLower(filepath.Ext(nombreArchivo)) + switch ext { + case ".txt", ".md", ".csv", ".json", ".xml", ".log", ".html", ".htm": + return string(datos), nil + case ".docx": + return textoDeDocx(datos) + case ".pdf": + return textoDePDF(agenteID, datos) + case ".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp", ".tif", ".tiff": + return ExtraerTextoOCR(agenteID, datos, mimeDeImagen(ext)) + default: + return "", fmt.Errorf("no sé leer archivos %s; probá con PDF, Word (.docx), texto o una imagen", ext) + } +} + +func mimeDeImagen(ext string) string { + switch ext { + case ".jpg", ".jpeg": + return "image/jpeg" + case ".tif", ".tiff": + return "image/tiff" + default: + return "image/" + strings.TrimPrefix(ext, ".") + } +} + +var etiquetaXML = regexp.MustCompile(`<[^>]+>`) + +// textoDeDocx lee word/document.xml del .docx y lo aplana a texto. No pretende +// conservar el formato: el agente solo necesita el contenido y el orden. +func textoDeDocx(datos []byte) (string, error) { + zr, err := zip.NewReader(bytes.NewReader(datos), int64(len(datos))) + if err != nil { + return "", fmt.Errorf("el .docx no se pudo abrir: %w", err) + } + for _, f := range zr.File { + if f.Name != "word/document.xml" { + continue + } + rc, err := f.Open() + if err != nil { + return "", err + } + defer rc.Close() + xmlBytes, err := io.ReadAll(io.LimitReader(rc, 8<<20)) + if err != nil { + return "", err + } + s := string(xmlBytes) + // Un párrafo, un salto de línea explícito y un fin de fila valen como + // salto; las celdas se separan con tab. El resto de etiquetas se tira. + s = strings.NewReplacer("", "\n", "", "\n", "", "\n", "", "\t").Replace(s) + s = etiquetaXML.ReplaceAllString(s, "") + s = strings.NewReplacer("&", "&", "<", "<", ">", ">", """, `"`, "'", "'").Replace(s) + return strings.TrimSpace(s), nil + } + return "", fmt.Errorf("el archivo no parece un .docx (no tiene word/document.xml)") +} + +// textoDePDF saca el texto de un PDF digital (facturas, cotizaciones, cualquier +// cosa exportada por un programa) leyendo los operadores de texto de sus +// streams. Si el PDF es un escaneo no hay texto que leer, y ahí cae al OCR. +// +// ponytail: parser mínimo — entiende streams FlateDecode y los operadores Tj/TJ, +// que es lo que usan los PDFs generados por software. No maneja fuentes con +// codificaciones raras ni CID; para esos casos el fallback a OCR es la salida. +func textoDePDF(agenteID uint, datos []byte) (string, error) { + texto := strings.TrimSpace(textoDeStreamsPDF(datos)) + // Un PDF escaneado devuelve nada o cuatro letras sueltas de un encabezado. + if len([]rune(texto)) >= 40 { + return texto, nil + } + ocrTexto, err := ExtraerTextoOCR(agenteID, datos, "application/pdf") + if err != nil { + if texto != "" { + return texto, nil + } + return "", fmt.Errorf("el PDF no tiene texto legible y el OCR no pudo procesarlo: %w", err) + } + return ocrTexto, nil +} + +var streamRe = regexp.MustCompile(`(?s)stream\r?\n(.*?)endstream`) + +func textoDeStreamsPDF(datos []byte) string { + var out strings.Builder + for _, m := range streamRe.FindAllSubmatch(datos, -1) { + crudo := m[1] + contenido := crudo + if zr, err := zlib.NewReader(bytes.NewReader(crudo)); err == nil { + if inflado, err := io.ReadAll(io.LimitReader(zr, 16<<20)); err == nil { + contenido = inflado + } + zr.Close() + } + if !bytes.Contains(contenido, []byte("Tj")) && !bytes.Contains(contenido, []byte("TJ")) { + continue + } + out.WriteString(textoDeContenidoPDF(contenido)) + } + return out.String() +} + +// textoDeContenidoPDF junta las cadenas entre paréntesis de un content stream, +// que es donde vive el texto visible, y respeta los saltos de línea (T*, TD, Td). +func textoDeContenidoPDF(contenido []byte) string { + var out strings.Builder + for i := 0; i < len(contenido); i++ { + switch contenido[i] { + case '(': + var s strings.Builder + for i++; i < len(contenido); i++ { + c := contenido[i] + if c == '\\' && i+1 < len(contenido) { + i++ + switch contenido[i] { + case 'n': + s.WriteByte('\n') + case 't': + s.WriteByte('\t') + case 'r': + default: + s.WriteByte(contenido[i]) + } + continue + } + if c == ')' { + break + } + s.WriteByte(c) + } + out.WriteString(s.String()) + case 'T': + // T* / Td / TD mueven el cursor a otra línea. + if i+1 < len(contenido) { + switch contenido[i+1] { + case '*', 'd', 'D': + out.WriteByte('\n') + } + } + } + } + return limpiarNoImprimibles(out.String()) +} + +func limpiarNoImprimibles(s string) string { + return strings.Map(func(r rune) rune { + if r == '\n' || r == '\t' || unicode.IsPrint(r) { + return r + } + return -1 + }, s) +} + +// TextoDeArchivoParaAgente arma el mensaje que ve el agente cuando alguien le +// manda un documento: el contenido solo, sin contexto, hace que el modelo +// conteste como si el cliente hubiera escrito una factura. +func TextoDeArchivoParaAgente(nombreArchivo, caption, contenido string) string { + if len(contenido) > 30000 { + contenido = contenido[:30000] + "\n…(archivo recortado)" + } + var b strings.Builder + b.WriteString("El cliente adjuntó un archivo") + if nombreArchivo != "" { + b.WriteString(" llamado \"" + nombreArchivo + "\"") + } + b.WriteString(".") + if strings.TrimSpace(caption) != "" { + b.WriteString(" Escribió junto al archivo: " + strings.TrimSpace(caption)) + } + b.WriteString("\n\nContenido del archivo:\n---\n" + strings.TrimSpace(contenido) + "\n---") + return b.String() +} diff --git a/pkg/services/archivo_texto_test.go b/pkg/services/archivo_texto_test.go new file mode 100644 index 0000000..c12ac68 --- /dev/null +++ b/pkg/services/archivo_texto_test.go @@ -0,0 +1,68 @@ +package services + +import ( + "bytes" + "compress/zlib" + "strconv" + "strings" + "testing" +) + +// pdfDePrueba arma un PDF mínimo con el content stream comprimido, igual que +// los que genera cualquier programa que exporta a PDF. +func pdfDePrueba(t *testing.T, contenido string) []byte { + t.Helper() + var comp bytes.Buffer + zw := zlib.NewWriter(&comp) + if _, err := zw.Write([]byte(contenido)); err != nil { + t.Fatal(err) + } + zw.Close() + + var pdf bytes.Buffer + pdf.WriteString("%PDF-1.4\n1 0 obj<>endobj\n") + pdf.WriteString("2 0 obj<>endobj\n") + pdf.WriteString("3 0 obj<>endobj\n") + pdf.WriteString("4 0 obj<>stream\n") + pdf.Write(comp.Bytes()) + pdf.WriteString("\nendstream endobj\ntrailer<>\n%%EOF") + return pdf.Bytes() +} + +func TestExtraerTextoDeArchivoPDFDigital(t *testing.T) { + contenido := `BT /F1 12 Tf 72 720 Td (FACTURA DE VENTA No. 1042) Tj T* ` + + `(Cliente: Acme SAS NIT 900.123.456-7) Tj T* (Total: \$1.500.000 COP) Tj ET` + + got, err := ExtraerTextoDeArchivo(0, "factura.pdf", pdfDePrueba(t, contenido)) + if err != nil { + t.Fatalf("ExtraerTextoDeArchivo: %v", err) + } + for _, quiero := range []string{"FACTURA DE VENTA No. 1042", "Acme SAS", "NIT 900.123.456-7", "$1.500.000 COP"} { + if !strings.Contains(got, quiero) { + t.Errorf("falta %q en el texto extraído:\n%s", quiero, got) + } + } + // T* separa renglones: sin eso la factura llega al agente como un chorizo. + if lineas := strings.Count(strings.TrimSpace(got), "\n"); lineas < 2 { + t.Errorf("esperaba al menos 3 renglones, hay %d:\n%s", lineas+1, got) + } +} + +func TestExtraerTextoDeArchivoTexto(t *testing.T) { + got, err := ExtraerTextoDeArchivo(0, "notas.txt", []byte("hola\nmundo")) + if err != nil || got != "hola\nmundo" { + t.Errorf("got %q, err %v", got, err) + } + if _, err := ExtraerTextoDeArchivo(0, "cosa.exe", []byte("x")); err == nil { + t.Error("una extensión desconocida debería devolver error") + } +} + +func TestTextoDeArchivoParaAgente(t *testing.T) { + got := TextoDeArchivoParaAgente("factura.pdf", "me cobraron de más", "Total: 1000") + for _, quiero := range []string{"factura.pdf", "me cobraron de más", "Total: 1000"} { + if !strings.Contains(got, quiero) { + t.Errorf("falta %q en:\n%s", quiero, got) + } + } +} diff --git a/pkg/services/plantilla_import_service.go b/pkg/services/plantilla_import_service.go index 4fcac37..149cc56 100644 --- a/pkg/services/plantilla_import_service.go +++ b/pkg/services/plantilla_import_service.go @@ -1,12 +1,7 @@ package services import ( - "archive/zip" - "bytes" "fmt" - "io" - "path/filepath" - "regexp" "strings" ) @@ -24,66 +19,10 @@ var variablesPorTipo = map[string]string{ const variablesComunes = `{{.Fecha}}, {{.EmpresaNombre}}, {{.EmpresaWeb}}` -// ExtraerTextoDePlantilla saca el texto de un archivo subido para usarlo como -// referencia. Los formatos de texto se leen directo; el .docx es un zip con XML -// adentro (stdlib alcanza) y las imágenes pasan por OCR. +// ExtraerTextoDePlantilla lee el archivo que subió el admin como referencia. +// agenteID 0: es una acción del staff, no se le cobra a ningún cliente. func ExtraerTextoDePlantilla(nombreArchivo string, datos []byte) (string, error) { - ext := strings.ToLower(filepath.Ext(nombreArchivo)) - switch ext { - case ".html", ".htm", ".txt", ".md": - return string(datos), nil - case ".docx": - return textoDeDocx(datos) - case ".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp", ".tif", ".tiff": - mime := "image/png" - if ext == ".jpg" || ext == ".jpeg" { - mime = "image/jpeg" - } else if ext != ".png" { - mime = "image/" + strings.TrimPrefix(ext, ".") - } - // agenteID 0: es una acción del staff, no se le cobra a ningún cliente. - return ExtraerTextoOCR(0, datos, mime) - case ".pdf": - return "", fmt.Errorf("el PDF todavía no se puede leer acá; exportalo a .docx o subí una captura de pantalla del documento") - default: - return "", fmt.Errorf("formato %s no soportado: subí .docx, .html, .txt o una imagen del documento", ext) - } -} - -var etiquetaXML = regexp.MustCompile(`<[^>]+>`) - -// textoDeDocx lee word/document.xml del .docx y lo aplana a texto. No pretende -// conservar el formato: la IA solo necesita el contenido y el orden. -func textoDeDocx(datos []byte) (string, error) { - zr, err := zip.NewReader(bytes.NewReader(datos), int64(len(datos))) - if err != nil { - return "", fmt.Errorf("el .docx no se pudo abrir: %w", err) - } - for _, f := range zr.File { - if f.Name != "word/document.xml" { - continue - } - rc, err := f.Open() - if err != nil { - return "", err - } - defer rc.Close() - xmlBytes, err := io.ReadAll(io.LimitReader(rc, 8<<20)) - if err != nil { - return "", err - } - s := string(xmlBytes) - // Un párrafo y un salto de línea explícito valen como salto de línea; - // el resto de las etiquetas se descarta. - s = strings.ReplaceAll(s, "", "\n") - s = strings.ReplaceAll(s, "", "\n") - s = strings.ReplaceAll(s, "", "\n") - s = strings.ReplaceAll(s, "", "\t") - s = etiquetaXML.ReplaceAllString(s, "") - s = strings.NewReplacer("&", "&", "<", "<", ">", ">", """, `"`, "'", "'").Replace(s) - return strings.TrimSpace(s), nil - } - return "", fmt.Errorf("el archivo no parece un .docx (no tiene word/document.xml)") + return ExtraerTextoDeArchivo(0, nombreArchivo, datos) } // ConvertirEnPlantilla le pide a la IA que rearme el documento como plantilla diff --git a/pkg/services/plantilla_import_test.go b/pkg/services/plantilla_import_test.go index 60a8b7a..46d7ca3 100644 --- a/pkg/services/plantilla_import_test.go +++ b/pkg/services/plantilla_import_test.go @@ -48,9 +48,6 @@ func TestExtraerTextoDePlantillaDocx(t *testing.T) { } func TestExtraerTextoDePlantillaFormatoNoSoportado(t *testing.T) { - if _, err := ExtraerTextoDePlantilla("plantilla.pdf", []byte("x")); err == nil { - t.Error("el PDF debería devolver error explicando la alternativa") - } if _, err := ExtraerTextoDePlantilla("plantilla.xyz", []byte("x")); err == nil { t.Error("una extensión desconocida debería devolver error") } diff --git a/pkg/services/umind_canal_telegram_service.go b/pkg/services/umind_canal_telegram_service.go index 14958c0..e080b1b 100644 --- a/pkg/services/umind_canal_telegram_service.go +++ b/pkg/services/umind_canal_telegram_service.go @@ -45,6 +45,12 @@ func ProcesarMensajeTelegramUmind(canal *models.UmindCanal, chatID int64, texto // getFile, lo pasa por Whisper/OCR y responde igual que un mensaje de texto. // Si no está habilitada, se ignora en silencio. func ProcesarMediaTelegramUmind(canal *models.UmindCanal, chatID int64, fileID, tipo string) error { + return ProcesarMediaTelegramUmindConNombre(canal, chatID, fileID, tipo, "", "") +} + +// ProcesarMediaTelegramUmindConNombre es la versión completa: los documentos +// traen nombre de archivo y, a veces, un texto que los acompaña (caption). +func ProcesarMediaTelegramUmindConNombre(canal *models.UmindCanal, chatID int64, fileID, tipo, nombreArchivo, caption string) error { agente, err := models.GetUmindAgenteByID(canal.AgenteID) if err != nil || !agente.Activo { return fmt.Errorf("agente no encontrado o inactivo: %w", err) @@ -84,6 +90,19 @@ func ProcesarMediaTelegramUmind(canal *models.UmindCanal, chatID int64, fileID, if err != nil { return err } + case "document": + if !canal.UsarArchivosDocs { + return nil + } + data, err := descargarArchivoTelegram(botToken, fileID) + if err != nil { + return fmt.Errorf("no se pudo descargar el archivo de Telegram: %w", err) + } + texto, err = ExtraerTextoDeArchivo(canal.AgenteID, nombreArchivo, data) + if err != nil { + return err + } + texto = TextoDeArchivoParaAgente(nombreArchivo, caption, texto) default: return nil } diff --git a/pkg/services/umind_canal_whatsapp_service.go b/pkg/services/umind_canal_whatsapp_service.go index 0c07750..11555c4 100644 --- a/pkg/services/umind_canal_whatsapp_service.go +++ b/pkg/services/umind_canal_whatsapp_service.go @@ -58,6 +58,12 @@ func ProcesarMensajeWhatsAppUmind(canal *models.UmindCanal, from, texto string) // Si la conversión no está habilitada para ese tipo, se ignora en silencio // (mismo comportamiento de antes de que existiera esta función). func ProcesarMediaWhatsAppUmind(canal *models.UmindCanal, from, mediaID, tipo string) error { + return ProcesarMediaWhatsAppUmindConNombre(canal, from, mediaID, tipo, "", "") +} + +// ProcesarMediaWhatsAppUmindConNombre es la versión completa: los documentos +// traen nombre de archivo y, a veces, un texto que los acompaña (caption). +func ProcesarMediaWhatsAppUmindConNombre(canal *models.UmindCanal, from, mediaID, tipo, nombreArchivo, caption string) error { agente, err := models.GetUmindAgenteByID(canal.AgenteID) if err != nil || !agente.Activo { return fmt.Errorf("agente no encontrado o inactivo: %w", err) @@ -96,6 +102,19 @@ func ProcesarMediaWhatsAppUmind(canal *models.UmindCanal, from, mediaID, tipo st if err != nil { return err } + case "document": + if !canal.UsarArchivosDocs { + return nil + } + data, _, err := descargarMediaWhatsApp(credenciales["access_token"], mediaID) + if err != nil { + return fmt.Errorf("no se pudo descargar el archivo de WhatsApp: %w", err) + } + texto, err = ExtraerTextoDeArchivo(canal.AgenteID, nombreArchivo, data) + if err != nil { + return err + } + texto = TextoDeArchivoParaAgente(nombreArchivo, caption, texto) default: return nil } diff --git a/public/orchestrator/assets/index-CUSjvRBR.js b/public/orchestrator/assets/index-CUSjvRBR.js deleted file mode 100644 index 8c99651..0000000 --- a/public/orchestrator/assets/index-CUSjvRBR.js +++ /dev/null @@ -1,26 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/** -* @vue/shared v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function qs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ge={},Jt=[],ht=()=>{},pr=()=>!1,ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ns=e=>e.startsWith("onUpdate:"),Ne=Object.assign,Ws=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Vi=Object.prototype.hasOwnProperty,he=(e,t)=>Vi.call(e,t),Q=Array.isArray,Yt=e=>$n(e)==="[object Map]",an=e=>$n(e)==="[object Set]",bo=e=>$n(e)==="[object Date]",ee=e=>typeof e=="function",Ce=e=>typeof e=="string",nt=e=>typeof e=="symbol",me=e=>e!==null&&typeof e=="object",hr=e=>(me(e)||ee(e))&&ee(e.then)&&ee(e.catch),mr=Object.prototype.toString,$n=e=>mr.call(e),ji=e=>$n(e).slice(8,-1),gr=e=>$n(e)==="[object Object]",zs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vn=qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ss=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ui=/-\w/g,He=ss(e=>e.replace(Ui,t=>t.slice(1).toUpperCase())),Li=/\B([A-Z])/g,Gt=ss(e=>e.replace(Li,"-$1").toLowerCase()),os=ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),vs=ss(e=>e?`on${os(e)}`:""),dt=(e,t)=>!Object.is(e,t),Bn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},rs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let xo;const is=()=>xo||(xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Kt(e){if(Q(e)){const t={};for(let n=0;n{if(n){const s=n.split(Hi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ke(e){let t="";if(Ce(e))t=e;else if(Q(e))for(let n=0;nun(n,t))}const xr=e=>!!(e&&e.__v_isRef===!0),M=e=>Ce(e)?e:e==null?"":Q(e)||me(e)&&(e.toString===mr||!ee(e.toString))?xr(e)?M(e.value):JSON.stringify(e,_r,2):String(e),_r=(e,t)=>xr(t)?_r(e,t.value):Yt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[bs(s,r)+" =>"]=o,n),{})}:an(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>bs(n))}:nt(t)?bs(t):me(t)&&!Q(t)&&!gr(t)?String(t):t,bs=(e,t="")=>{var n;return nt(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 Te;class zi{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&&Te&&(Te.active?(this.parent=Te,this.index=(Te.scopes||(Te.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;t0&&--this._on===0){if(Te===this)Te=this.prevScope;else{let t=Te;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;n0)return;if(xn){let t=xn;for(xn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;bn;){let t=bn;for(bn=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 Er(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Sr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Xs(s),Yi(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ar(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ar(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cn)||(e.globalVersion=Cn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ts(e))))return;e.flags|=2;const t=e.dep,n=ve,s=et;ve=e,et=!0;try{Er(e);const o=e.fn(e._value);(t.version===0||dt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ve=n,et=s,Sr(e),e.flags&=-3}}function Xs(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Xs(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Yi(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let et=!0;const Rr=[];function Et(){Rr.push(et),et=!1}function St(){const e=Rr.pop();et=e===void 0?!0:e}function _o(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ve;ve=void 0;try{t()}finally{ve=n}}}let Cn=0;class Qi{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ve||!et||ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ve)n=this.activeLink=new Qi(ve,this),ve.deps?(n.prevDep=ve.depsTail,ve.depsTail.nextDep=n,ve.depsTail=n):ve.deps=ve.depsTail=n,kr(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=ve.depsTail,n.nextDep=void 0,ve.depsTail.nextDep=n,ve.depsTail=n,ve.deps===n&&(ve.deps=s)}return n}trigger(t){this.version++,Cn++,this.notify(t)}notify(t){Ys();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Qs()}}}function kr(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)kr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $s=new WeakMap,Ht=Symbol(""),Ns=Symbol(""),En=Symbol("");function De(e,t,n){if(et&&ve){let s=$s.get(e);s||$s.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Zs),o.map=s,o.key=n),o.track()}}function yt(e,t,n,s,o,r){const i=$s.get(e);if(!i){Cn++;return}const l=a=>{a&&a.trigger()};if(Ys(),t==="clear")i.forEach(l);else{const a=Q(e),d=a&&zs(n);if(a&&n==="length"){const c=Number(s);i.forEach((h,g)=>{(g==="length"||g===En||!nt(g)&&g>=c)&&l(h)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),d&&l(i.get(En)),t){case"add":a?d&&l(i.get("length")):(l(i.get(Ht)),Yt(e)&&l(i.get(Ns)));break;case"delete":a||(l(i.get(Ht)),Yt(e)&&l(i.get(Ns)));break;case"set":Yt(e)&&l(i.get(Ht));break}}Qs()}function qt(e){const t=pe(e);return t===e?t:(De(t,"iterate",En),Xe(e)?t:t.map(st))}function ls(e){return De(e=pe(e),"iterate",En),e}function ct(e,t){return At(e)?tn(Bt(e)?st(t):t):st(t)}const Xi={__proto__:null,[Symbol.iterator](){return _s(this,Symbol.iterator,e=>ct(this,e))},concat(...e){return qt(this).concat(...e.map(t=>Q(t)?qt(t):t))},entries(){return _s(this,"entries",e=>(e[1]=ct(this,e[1]),e))},every(e,t){return vt(this,"every",e,t,void 0,arguments)},filter(e,t){return vt(this,"filter",e,t,n=>n.map(s=>ct(this,s)),arguments)},find(e,t){return vt(this,"find",e,t,n=>ct(this,n),arguments)},findIndex(e,t){return vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return vt(this,"findLast",e,t,n=>ct(this,n),arguments)},findLastIndex(e,t){return vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ys(this,"includes",e)},indexOf(...e){return ys(this,"indexOf",e)},join(e){return qt(this).join(e)},lastIndexOf(...e){return ys(this,"lastIndexOf",e)},map(e,t){return vt(this,"map",e,t,void 0,arguments)},pop(){return fn(this,"pop")},push(...e){return fn(this,"push",e)},reduce(e,...t){return yo(this,"reduce",e,t)},reduceRight(e,...t){return yo(this,"reduceRight",e,t)},shift(){return fn(this,"shift")},some(e,t){return vt(this,"some",e,t,void 0,arguments)},splice(...e){return fn(this,"splice",e)},toReversed(){return qt(this).toReversed()},toSorted(e){return qt(this).toSorted(e)},toSpliced(...e){return qt(this).toSpliced(...e)},unshift(...e){return fn(this,"unshift",e)},values(){return _s(this,"values",e=>ct(this,e))}};function _s(e,t,n){const s=ls(e),o=s[t]();return s!==e&&!Xe(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const Zi=Array.prototype;function vt(e,t,n,s,o,r){const i=ls(e),l=i!==e&&!Xe(e),a=i[t];if(a!==Zi[t]){const h=a.apply(e,r);return l?st(h):h}let d=n;i!==e&&(l?d=function(h,g){return n.call(this,ct(e,h),g,e)}:n.length>2&&(d=function(h,g){return n.call(this,h,g,e)}));const c=a.call(i,d,s);return l&&o?o(c):c}function yo(e,t,n,s){const o=ls(e),r=o!==e&&!Xe(e);let i=n,l=!1;o!==e&&(r?(l=s.length===0,i=function(d,c,h){return l&&(l=!1,d=ct(e,d)),n.call(this,d,ct(e,c),h,e)}):n.length>3&&(i=function(d,c,h){return n.call(this,d,c,h,e)}));const a=o[t](i,...s);return l?ct(e,a):a}function ys(e,t,n){const s=pe(e);De(s,"iterate",En);const o=s[t](...n);return(o===-1||o===!1)&&no(n[0])?(n[0]=pe(n[0]),s[t](...n)):o}function fn(e,t,n=[]){Et(),Ys();const s=pe(e)[t].apply(e,n);return Qs(),St(),s}const el=qs("__proto__,__v_isRef,__isVue"),Ir=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function tl(e){nt(e)||(e=String(e));const t=pe(this);return De(t,"has",e),t.hasOwnProperty(e)}class Pr{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?fl:Nr:r?$r:Tr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Q(t);if(!o){let a;if(i&&(a=Xi[n]))return a;if(n==="hasOwnProperty")return tl}const l=Reflect.get(t,n,Ve(t)?t:s);if((nt(n)?Ir.has(n):el(n))||(o||De(t,"get",n),r))return l;if(Ve(l)){const a=i&&zs(n)?l:l.value;return o&&me(a)?Ms(a):a}return me(l)?o?Ms(l):as(l):l}}class Or extends Pr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const i=Q(t)&&zs(n);if(!this._isShallow){const d=At(r);if(!Xe(s)&&!At(s)&&(r=pe(r),s=pe(s)),!i&&Ve(r)&&!Ve(s))return d||(r.value=s),!0}const l=i?Number(n)e,Vn=e=>Reflect.getPrototypeOf(e);function il(e,t,n){return function(...s){const o=this.__v_raw,r=pe(o),i=Yt(r),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=o[e](...s),c=n?Ds:t?tn:st;return!t&&De(r,"iterate",a?Ns:Ht),Ne(Object.create(d),{next(){const{value:h,done:g}=d.next();return g?{value:h,done:g}:{value:l?[c(h[0]),c(h[1])]:c(h),done:g}}})}}function jn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ll(e,t){const n={get(o){const r=this.__v_raw,i=pe(r),l=pe(o);e||(dt(o,l)&&De(i,"get",o),De(i,"get",l));const{has:a}=Vn(i),d=t?Ds:e?tn:st;if(a.call(i,o))return d(r.get(o));if(a.call(i,l))return d(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&De(pe(o),"iterate",Ht),o.size},has(o){const r=this.__v_raw,i=pe(r),l=pe(o);return e||(dt(o,l)&&De(i,"has",o),De(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,a=pe(l),d=t?Ds:e?tn:st;return!e&&De(a,"iterate",Ht),l.forEach((c,h)=>o.call(r,d(c),d(h),i))}};return Ne(n,e?{add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear")}:{add(o){const r=pe(this),i=Vn(r),l=pe(o),a=!t&&!Xe(o)&&!At(o)?l:o;return i.has.call(r,a)||dt(o,a)&&i.has.call(r,o)||dt(l,a)&&i.has.call(r,l)||(r.add(a),yt(r,"add",a,a)),this},set(o,r){!t&&!Xe(r)&&!At(r)&&(r=pe(r));const i=pe(this),{has:l,get:a}=Vn(i);let d=l.call(i,o);d||(o=pe(o),d=l.call(i,o));const c=a.call(i,o);return i.set(o,r),d?dt(r,c)&&yt(i,"set",o,r):yt(i,"add",o,r),this},delete(o){const r=pe(this),{has:i,get:l}=Vn(r);let a=i.call(r,o);a||(o=pe(o),a=i.call(r,o)),l&&l.call(r,o);const d=r.delete(o);return a&&yt(r,"delete",o,void 0),d},clear(){const o=pe(this),r=o.size!==0,i=o.clear();return r&&yt(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=il(o,e,t)}),n}function eo(e,t){const n=ll(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 al={get:eo(!1,!1)},ul={get:eo(!1,!0)},cl={get:eo(!0,!1)};const Tr=new WeakMap,$r=new WeakMap,Nr=new WeakMap,fl=new WeakMap;function dl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function as(e){return At(e)?e:to(e,!1,sl,al,Tr)}function Dr(e){return to(e,!1,rl,ul,$r)}function Ms(e){return to(e,!0,ol,cl,Nr)}function to(e,t,n,s,o){if(!me(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=dl(ji(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Bt(e){return At(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function Xe(e){return!!(e&&e.__v_isShallow)}function no(e){return e?!!e.__v_raw:!1}function pe(e){const t=e&&e.__v_raw;return t?pe(t):e}function pl(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&vr(e,"__v_skip",!0),e}const st=e=>me(e)?as(e):e,tn=e=>me(e)?Ms(e):e;function Ve(e){return e?e.__v_isRef===!0:!1}function Y(e){return Mr(e,!1)}function hl(e){return Mr(e,!0)}function Mr(e,t){return Ve(e)?e:new ml(e,t)}class ml{constructor(t,n){this.dep=new Zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:pe(t),this._value=n?t:st(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Xe(t)||At(t);t=s?t:pe(t),dt(t,n)&&(this._rawValue=t,this._value=s?t:st(t),this.dep.trigger())}}function Ie(e){return Ve(e)?e.value:e}const gl={get:(e,t,n)=>t==="__v_raw"?e:Ie(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ve(o)&&!Ve(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Vr(e){return Bt(e)?e:new Proxy(e,gl)}class vl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ve!==this)return Cr(this,!0),!0}get value(){const t=this.dep.track();return Ar(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function bl(e,t,n=!1){let s,o;return ee(e)?s=e:(s=e.get,o=e.set),new vl(s,o,n)}const Un={},Wn=new WeakMap;let Ut;function xl(e,t=!1,n=Ut){if(n){let s=Wn.get(n);s||Wn.set(n,s=[]),s.push(e)}}function _l(e,t,n=ge){const{immediate:s,deep:o,once:r,scheduler:i,augmentJob:l,call:a}=n,d=P=>o?P:Xe(P)||o===!1||o===0?wt(P,1):wt(P);let c,h,g,b,U=!1,O=!1;if(Ve(e)?(h=()=>e.value,U=Xe(e)):Bt(e)?(h=()=>d(e),U=!0):Q(e)?(O=!0,U=e.some(P=>Bt(P)||Xe(P)),h=()=>e.map(P=>{if(Ve(P))return P.value;if(Bt(P))return d(P);if(ee(P))return a?a(P,2):P()})):ee(e)?t?h=a?()=>a(e,2):e:h=()=>{if(g){Et();try{g()}finally{St()}}const P=Ut;Ut=c;try{return a?a(e,3,[b]):e(b)}finally{Ut=P}}:h=ht,t&&o){const P=h,S=o===!0?1/0:o;h=()=>wt(P(),S)}const G=Ji(),H=()=>{c.stop(),G&&G.active&&Ws(G.effects,c)};if(r&&t){const P=t;t=(...S)=>{const D=P(...S);return H(),D}}let N=O?new Array(e.length).fill(Un):Un;const B=P=>{if(!(!(c.flags&1)||!c.dirty&&!P))if(t){const S=c.run();if(P||o||U||(O?S.some((D,Z)=>dt(D,N[Z])):dt(S,N))){g&&g();const D=Ut;Ut=c;try{const Z=[S,N===Un?void 0:O&&N[0]===Un?[]:N,b];N=S,a?a(t,3,Z):t(...Z)}finally{Ut=D}}}else c.run()};return l&&l(B),c=new yr(h),c.scheduler=i?()=>i(B,!1):B,b=P=>xl(P,!1,c),g=c.onStop=()=>{const P=Wn.get(c);if(P){if(a)a(P,4);else for(const S of P)S();Wn.delete(c)}},t?s?B(!0):N=c.run():i?i(B.bind(null,!0),!0):c.run(),H.pause=c.pause.bind(c),H.resume=c.resume.bind(c),H.stop=H,H}function wt(e,t=1/0,n){if(t<=0||!me(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ve(e))wt(e.value,t,n);else if(Q(e))for(let s=0;s{wt(s,t,n)});else if(gr(e)){for(const s in e)wt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&wt(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Nn(e,t,n,s){try{return s?e(...s):e()}catch(o){us(o,t,n)}}function ot(e,t,n,s){if(ee(e)){const o=Nn(e,t,n,s);return o&&hr(o)&&o.catch(r=>{us(r,t,n)}),o}if(Q(e)){const o=[];for(let r=0;r>>1,o=Le[s],r=Sn(o);r=Sn(n)?Le.push(e):Le.splice(wl(t),0,e),e.flags|=1,Ur()}}function Ur(){zn||(zn=jr.then(Fr))}function Cl(e){if(!Q(e))Ot&&e.id===-1?Ot.splice(Wt+1,0,e):e.flags&1||(Qt.push(e),e.flags|=1);else for(let t=0;tSn(n)-Sn(s));if(Qt.length=0,Ot){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Fr(e){try{for(ut=0;ut{s._d&&Xn(-1);const r=Jn(t),i=Ct.length;let l;try{l=e(...o)}finally{for(let a=Ct.length;a>i;a--)co();Jn(r),s._d&&Xn(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function re(e,t){if($e===null)return e;const n=hs($e),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&ee(t)?t.call(s&&s.proxy):t}}const El=Symbol.for("v-scx"),Sl=()=>tt(El);function Dt(e,t,n){return Br(e,t,n)}function Br(e,t,n=ge){const{immediate:s,deep:o,flush:r,once:i}=n,l=Ne({},n),a=t&&s||!t&&r!=="post";let d;if(In){if(r==="sync"){const b=Sl();d=b.__watcherHandles||(b.__watcherHandles=[])}else if(!a){const b=()=>{};return b.stop=ht,b.resume=ht,b.pause=ht,b}}const c=Me;l.call=(b,U,O)=>ot(b,c,U,O);let h=!1;r==="post"?l.scheduler=b=>{Ge(b,c&&c.suspense)}:r!=="sync"&&(h=!0,l.scheduler=(b,U)=>{U?b():oo(b)}),l.augmentJob=b=>{t&&(b.flags|=4),h&&(b.flags|=2,c&&(b.id=c.uid,b.i=c))};const g=_l(e,t,l);return In&&(d?d.push(g):a&&g()),g}function Al(e,t,n){const s=this.proxy,o=Ce(e)?e.includes(".")?Kr(s,e):()=>s[e]:e.bind(s,s);let r;ee(t)?r=t:(r=t.handler,n=t);const i=Mn(this),l=Br(o,r.bind(s),n);return i(),l}function Kr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,ws=Symbol("_leaveCb");function kl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==mt){t=n;break}}return t}function Gr(e){if(!io(e))return cs(e.type)&&e.children?kl(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&&ee(n.default))return n.default()}}function ro(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ro(cs(n.type)&&Gr(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 qr(e,t){return ee(e)?Ne({name:e.name},t,{setup:e}):e}function Wr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Co(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Yn=new WeakMap;function _n(e,t,n,s,o=!1){if(Q(e)){e.forEach((O,G)=>_n(O,t&&(Q(t)?t[G]:t),n,s,o));return}if(Xt(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&_n(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?hs(s.component):s.el,i=o?null:r,{i:l,r:a}=e,d=t&&t.r,c=l.refs===ge?l.refs={}:l.refs,h=l.setupState,g=pe(h),b=h===ge?pr:O=>Co(c,O)?!1:he(g,O),U=(O,G)=>!(G&&Co(c,G));if(d!=null&&d!==a){if(Eo(t),Ce(d))c[d]=null,b(d)&&(h[d]=null);else if(Ve(d)){const O=t;U(d,O.k)&&(d.value=null),O.k&&(c[O.k]=null)}}if(ee(a))Nn(a,l,12,[i,c]);else{const O=Ce(a),G=Ve(a);if(O||G){const H=()=>{if(e.f){const N=O?b(a)?h[a]:c[a]:U()||!e.k?a.value:c[e.k];if(o)Q(N)&&Ws(N,r);else if(Q(N))N.includes(r)||N.push(r);else if(O)c[a]=[r],b(a)&&(h[a]=c[a]);else{const B=[r];U(a,e.k)&&(a.value=B),e.k&&(c[e.k]=B)}}else O?(c[a]=i,b(a)&&(h[a]=i)):G&&(U(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const N=()=>{H(),Yn.delete(e)};N.id=-1,Yn.set(e,N),Ge(N,n)}else Eo(e),H()}}}function Eo(e){const t=Yn.get(e);t&&(t.flags|=8,Yn.delete(e))}is().requestIdleCallback;is().cancelIdleCallback;const Xt=e=>!!e.type.__asyncLoader,io=e=>e.type.__isKeepAlive;function Il(e,t){zr(e,"a",t)}function Pl(e,t){zr(e,"da",t)}function zr(e,t,n=Me){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(fs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)io(o.parent.vnode)&&Ol(s,t,n,o),o=o.parent}}function Ol(e,t,n,s){const o=fs(t,e,s,!0);Jr(()=>{Ws(s[t],o)},n)}function fs(e,t,n=Me,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{Et();const l=Mn(n),a=ot(t,n,e,i);return l(),St(),a});return s?o.unshift(r):o.push(r),r}}const Rt=e=>(t,n=Me)=>{(!In||e==="sp")&&fs(e,(...s)=>t(...s),n)},Tl=Rt("bm"),lo=Rt("m"),$l=Rt("bu"),Nl=Rt("u"),Dl=Rt("bum"),Jr=Rt("um"),Ml=Rt("sp"),Vl=Rt("rtg"),jl=Rt("rtc");function Ul(e,t=Me){fs("ec",e,t)}const Ll="components";function Dn(e,t){return Hl(Ll,e,!0,t)||e}const Fl=Symbol.for("v-ndc");function Hl(e,t,n=!0,s=!1){const o=$e||Me;if(o){const r=o.type;{const l=ka(r,!1);if(l&&(l===t||l===He(t)||l===os(He(t))))return r}const i=So(o[e]||r[e],t)||So(o.appContext[e],t);return!i&&s?r:i}}function So(e,t){return e&&(e[t]||e[He(t)]||e[os(He(t))])}function Pe(e,t,n,s){let o;const r=n,i=Q(e);if(i||Ce(e)){const l=i&&Bt(e);let a=!1,d=!1;l&&(a=!Xe(e),d=At(e),e=ls(e)),o=new Array(e.length);for(let c=0,h=e.length;ct(l,a,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let a=0,d=l.length;a0;return R(),nn(ce,null,[we("slot",d,s)],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Ct.length;R();let a;try{const d=i&&Yr(i(n)),c=n.key||r||d&&d.key;a=nn(ce,{key:(c&&!nt(c)?c:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let c=Ct.length;c>l;c--)co();throw d}finally{i&&i._c&&(i._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function Yr(e){return e.some(t=>Rn(t)?!(t.type===mt||t.type===ce&&!Yr(t.children)):!0)?e:null}const Vs=e=>e?gi(e)?hs(e):Vs(e.parent):null,yn=Ne(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Vs(e.parent),$root:e=>Vs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xr(e),$forceUpdate:e=>e.f||(e.f=()=>{oo(e.update)}),$nextTick:e=>e.n||(e.n=so.bind(e.proxy)),$watch:e=>Al.bind(e)}),Cs=(e,t)=>e!==ge&&!e.__isScriptSetup&&he(e,t),Kl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Cs(s,t))return i[t]=1,s[t];if(o!==ge&&he(o,t))return i[t]=2,o[t];if(he(r,t))return i[t]=3,r[t];if(n!==ge&&he(n,t))return i[t]=4,n[t];js&&(i[t]=0)}}const d=yn[t];let c,h;if(d)return t==="$attrs"&&De(e.attrs,"get",""),d(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==ge&&he(n,t))return i[t]=4,n[t];if(h=a.config.globalProperties,he(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Cs(o,t)?(o[t]=n,!0):s!==ge&&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}},l){let a;return!!(n[l]||e!==ge&&l[0]!=="$"&&he(e,l)||Cs(t,l)||he(r,l)||he(s,l)||he(yn,l)||he(o.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},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 Ao(e){return Q(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let js=!0;function Gl(e){const t=Xr(e),n=e.proxy,s=e.ctx;js=!1,t.beforeCreate&&Ro(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:a,inject:d,created:c,beforeMount:h,mounted:g,beforeUpdate:b,updated:U,activated:O,deactivated:G,beforeDestroy:H,beforeUnmount:N,destroyed:B,unmounted:P,render:S,renderTracked:D,renderTriggered:Z,errorCaptured:_,serverPrefetch:j,expose:Ae,inheritAttrs:J,components:Ze,directives:Je,filters:Mt}=t;if(d&&ql(d,s,null),i)for(const ae in i){const se=i[ae];ee(se)&&(s[ae]=se.bind(n))}if(o){const ae=o.call(n,n);me(ae)&&(e.data=as(ae))}if(js=!0,r)for(const ae in r){const se=r[ae],ne=ee(se)?se.bind(n,n):ee(se.get)?se.get.bind(n,n):ht,qe=!ee(se)&&ee(se.set)?se.set.bind(n):ht,Ye=be({get:ne,set:qe});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:Oe=>Ye.value=Oe})}if(l)for(const ae in l)Qr(l[ae],s,n,ae);if(a){const ae=ee(a)?a.call(n):a;Reflect.ownKeys(ae).forEach(se=>{Kn(se,ae[se])})}c&&Ro(c,e,"c");function Ee(ae,se){Q(se)?se.forEach(ne=>ae(ne.bind(n))):se&&ae(se.bind(n))}if(Ee(Tl,h),Ee(lo,g),Ee($l,b),Ee(Nl,U),Ee(Il,O),Ee(Pl,G),Ee(Ul,_),Ee(jl,D),Ee(Vl,Z),Ee(Dl,N),Ee(Jr,P),Ee(Ml,j),Q(Ae))if(Ae.length){const ae=e.exposed||(e.exposed={});Ae.forEach(se=>{Object.defineProperty(ae,se,{get:()=>n[se],set:ne=>n[se]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===ht&&(e.render=S),J!=null&&(e.inheritAttrs=J),Ze&&(e.components=Ze),Je&&(e.directives=Je),j&&Wr(e)}function ql(e,t,n=ht){Q(e)&&(e=Us(e));for(const s in e){const o=e[s];let r;me(o)?"default"in o?r=tt(o.from||s,o.default,!0):r=tt(o.from||s):r=tt(o),Ve(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[s]=r}}function Ro(e,t,n){ot(Q(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qr(e,t,n,s){let o=s.includes(".")?Kr(n,s):()=>n[s];if(Ce(e)){const r=t[e];ee(r)&&Dt(o,r)}else if(ee(e))Dt(o,e.bind(n));else if(me(e))if(Q(e))e.forEach(r=>Qr(r,t,n,s));else{const r=ee(e.handler)?e.handler.bind(n):t[e.handler];ee(r)&&Dt(o,r,e)}}function Xr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let a;return l?a=l:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(d=>Qn(a,d,i,!0)),Qn(a,t,i)),me(t)&&r.set(t,a),a}function Qn(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Qn(e,r,n,!0),o&&o.forEach(i=>Qn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Wl[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Wl={data:ko,props:Io,emits:Io,methods:hn,computed:hn,beforeCreate:je,created:je,beforeMount:je,mounted:je,beforeUpdate:je,updated:je,beforeDestroy:je,beforeUnmount:je,destroyed:je,unmounted:je,activated:je,deactivated:je,errorCaptured:je,serverPrefetch:je,components:hn,directives:hn,watch:Jl,provide:ko,inject:zl};function ko(e,t){return t?e?function(){return Ne(ee(e)?e.call(this,this):e,ee(t)?t.call(this,this):t)}:t:e}function zl(e,t){return hn(Us(e),Us(t))}function Us(e){if(Q(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${He(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function Zl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ge;let o=n;const r=t.startsWith("update:"),i=r&&Xl(s,t.slice(7));i&&(i.trim&&(o=n.map(c=>Ce(c)?c.trim():c)),i.number&&(o=n.map(rs)));let l,a=s[l=vs(t)]||s[l=vs(He(t))];!a&&r&&(a=s[l=vs(Gt(t))]),a&&ot(a,e,6,o);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ot(d,e,6,o)}}const ea=new WeakMap;function ei(e,t,n=!1){const s=n?ea:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!ee(e)){const a=d=>{const c=ei(d,t,!0);c&&(l=!0,Ne(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(me(e)&&s.set(e,null),null):(Q(r)?r.forEach(a=>i[a]=null):Ne(i,r),me(e)&&s.set(e,i),i)}function ds(e,t){return!e||!ts(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,Gt(t))||he(e,t))}function Po(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:a,render:d,renderCache:c,props:h,data:g,setupState:b,ctx:U,inheritAttrs:O}=e,G=Jn(e);let H,N;try{if(n.shapeFlag&4){const P=o||s,S=P;H=ft(d.call(S,P,c,h,b,g,U)),N=l}else{const P=t;H=ft(P.length>1?P(h,{attrs:l,slots:i,emit:a}):P(h,null)),N=t.props?l:ta(l)}}catch(P){Ct.length=0,us(P,e,1),H=we(mt)}let B=H;if(N&&O!==!1){const P=Object.keys(N),{shapeFlag:S}=B;P.length&&S&7&&(r&&P.some(ns)&&(N=na(N,r)),B=sn(B,N,!1,!0))}if(n.dirs&&(B=sn(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(n.dirs):n.dirs),n.transition){const P=cs(B.type)&&Gr(B)||B;ro(P,n.transition)}return H=B,Jn(G),H}const ta=e=>{let t;for(const n in e)(n==="class"||n==="style"||ts(n))&&((t||(t={}))[n]=e[n]);return t},na=(e,t)=>{const n={};for(const s in e)(!ns(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function sa(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:a}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Oo(s,i,d):!!i;if(a&8){const c=t.dynamicProps;for(let h=0;hObject.create(ni),oi=e=>Object.getPrototypeOf(e)===ni;function ra(e,t,n,s=!1){const o={},r=si();e.propsDefaults=Object.create(null),ri(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);n?e.props=s?o:Dr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ia(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=pe(o),[a]=e.propsOptions;let d=!1;if((s||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let h=0;h{a=!0;const[g,b]=ii(h,t,!0);Ne(i,g),b&&l.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return me(e)&&s.set(e,Jt),Jt;if(Q(r))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",uo=e=>Q(e)?e.map(ft):[ft(e)],aa=(e,t,n)=>{if(t._n)return t;const s=Nt((...o)=>uo(t(...o)),n);return s._c=!1,s},li=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ao(o))continue;const r=e[o];if(ee(r))t[o]=aa(o,r,s);else if(r!=null){const i=uo(r);t[o]=()=>i}}},ai=(e,t)=>{const n=uo(t);e.slots.default=()=>n},ui=(e,t,n)=>{for(const s in t)(n||!ao(s))&&(e[s]=t[s])},ua=(e,t,n)=>{const s=e.slots=si();if(e.vnode.shapeFlag&32){const o=t._;o?(ui(s,t,n),n&&vr(s,"_",o,!0)):li(t,s)}else t&&ai(e,t)},ca=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=ge;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:ui(o,t,n):(r=!t.$stable,li(t,o)),i=t}else t&&(ai(e,t),i={default:1});if(r)for(const l in o)!ao(l)&&i[l]==null&&delete o[l]},Ge=ma;function fa(e){return da(e)}function da(e,t){const n=is();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:i,createText:l,createComment:a,setText:d,setElementText:c,parentNode:h,nextSibling:g,setScopeId:b=ht,insertStaticContent:U}=e,O=(f,p,m,w=null,A=null,y=null,V=void 0,T=null,$=!!p.dynamicChildren)=>{if(f===p)return;f&&!dn(f,p)&&(w=E(f),Oe(f,A,y,!0),f=null),p.patchFlag===-2&&($=!1,p.dynamicChildren=null);const{type:k,ref:W,shapeFlag:F}=p;switch(k){case ps:G(f,p,m,w);break;case mt:H(f,p,m,w);break;case Gn:f==null&&N(p,m,w,V);break;case ce:Ze(f,p,m,w,A,y,V,T,$);break;default:F&1?S(f,p,m,w,A,y,V,T,$):F&6?Je(f,p,m,w,A,y,V,T,$):(F&64||F&128)&&k.process(f,p,m,w,A,y,V,T,$,q)}W!=null&&A?_n(W,f&&f.ref,y,p||f,!p):W==null&&f&&f.ref!=null&&_n(f.ref,null,y,f,!0)},G=(f,p,m,w)=>{if(f==null)s(p.el=l(p.children),m,w);else{const A=p.el=f.el;p.children!==f.children&&d(A,p.children)}},H=(f,p,m,w)=>{f==null?s(p.el=a(p.children||""),m,w):p.el=f.el},N=(f,p,m,w)=>{[f.el,f.anchor]=U(f.children,p,m,w,f.el,f.anchor)},B=({el:f,anchor:p},m,w)=>{let A;for(;f&&f!==p;)A=g(f),s(f,m,w),f=A;s(p,m,w)},P=({el:f,anchor:p})=>{let m;for(;f&&f!==p;)m=g(f),o(f),f=m;o(p)},S=(f,p,m,w,A,y,V,T,$)=>{if(p.type==="svg"?V="svg":p.type==="math"&&(V="mathml"),f==null)D(p,m,w,A,y,V,T,$);else{const k=f.el&&f.el._isVueCE?f.el:null;try{k&&k._beginPatch(),j(f,p,A,y,V,T,$)}finally{k&&k._endPatch()}}},D=(f,p,m,w,A,y,V,T)=>{let $,k;const{props:W,shapeFlag:F,transition:z,dirs:X}=f;if($=f.el=i(f.type,y,W&&W.is,W),F&8?c($,f.children):F&16&&_(f.children,$,null,w,A,Es(f,y),V,T),X&&Vt(f,null,w,"created"),Z($,f,f.scopeId,V,w),W){for(const v in W)v!=="value"&&!vn(v)&&r($,v,null,W[v],y,w);"value"in W&&r($,"value",null,W.value,y),(k=W.onVnodeBeforeMount)&&at(k,w,f)}X&&Vt(f,null,w,"beforeMount");const C=pa(A,z);C&&z.beforeEnter($),s($,p,m),((k=W&&W.onVnodeMounted)||C||X)&&Ge(()=>{try{k&&at(k,w,f),C&&z.enter($),X&&Vt(f,null,w,"mounted")}finally{}},A)},Z=(f,p,m,w,A)=>{if(m&&b(f,m),w)for(let y=0;y{for(let k=$;k{const T=p.el=f.el;let{patchFlag:$,dynamicChildren:k,dirs:W}=p;$|=f.patchFlag&16;const F=f.props||ge,z=p.props||ge;let X;if(m&&jt(m,!1),(X=z.onVnodeBeforeUpdate)&&at(X,m,p,f),W&&Vt(p,f,m,"beforeUpdate"),m&&jt(m,!0),k&&(!f.dynamicChildren||f.dynamicChildren.length!==k.length)&&($=0,V=!1,k=null),(F.innerHTML&&z.innerHTML==null||F.textContent&&z.textContent==null)&&c(T,""),k?Ae(f.dynamicChildren,k,T,m,w,Es(p,A),y):V||se(f,p,T,null,m,w,Es(p,A),y,!1),$>0){if($&16)J(T,F,z,m,A);else if($&2&&F.class!==z.class&&r(T,"class",null,z.class,A),$&4&&r(T,"style",F.style,z.style,A),$&8){const C=p.dynamicProps;for(let v=0;v{X&&at(X,m,p,f),W&&Vt(p,f,m,"updated")},w)},Ae=(f,p,m,w,A,y,V)=>{for(let T=0;T{if(p!==m){if(p!==ge)for(const y in p)!vn(y)&&!(y in m)&&r(f,y,p[y],null,A,w);for(const y in m){if(vn(y))continue;const V=m[y],T=p[y];V!==T&&y!=="value"&&r(f,y,T,V,A,w)}"value"in m&&r(f,"value",p.value,m.value,A)}},Ze=(f,p,m,w,A,y,V,T,$)=>{const k=p.el=f?f.el:l(""),W=p.anchor=f?f.anchor:l("");let{patchFlag:F,dynamicChildren:z,slotScopeIds:X}=p;X&&(T=T?T.concat(X):X),f==null?(s(k,m,w),s(W,m,w),_(p.children||[],m,W,A,y,V,T,$)):F>0&&F&64&&z&&f.dynamicChildren&&f.dynamicChildren.length===z.length?(Ae(f.dynamicChildren,z,m,A,y,V,T),(p.key!=null||A&&p===A.subTree)&&ci(f,p,!0)):se(f,p,m,W,A,y,V,T,$)},Je=(f,p,m,w,A,y,V,T,$)=>{p.slotScopeIds=T,f==null?p.shapeFlag&512?A.ctx.activate(p,m,w,V,$):Mt(p,m,w,A,y,V,$):kt(f,p,$)},Mt=(f,p,m,w,A,y,V)=>{const T=f.component=wa(f,w,A);if(io(f)&&(T.ctx.renderer=q),Ea(T,!1,V),T.asyncDep){if(A&&A.registerDep(T,Ee,V),!f.el){const $=T.subTree=we(mt);H(null,$,p,m),f.placeholder=$.el}}else Ee(T,f,p,m,A,y,V)},kt=(f,p,m)=>{const w=p.component=f.component;if(sa(f,p,m))if(w.asyncDep&&!w.asyncResolved){ae(w,p,m);return}else w.next=p,w.update();else p.el=f.el,w.vnode=p},Ee=(f,p,m,w,A,y,V)=>{const T=()=>{if(f.isMounted){let{next:F,bu:z,u:X,parent:C,vnode:v}=f;{const it=fi(f);if(it){F&&(F.el=v.el,ae(f,F,V)),it.asyncDep.then(()=>{Ge(()=>{f.isUnmounted||k()},A)});return}}let fe=F,x;jt(f,!1),F?(F.el=v.el,ae(f,F,V)):F=v,z&&Bn(z),(x=F.props&&F.props.onVnodeBeforeUpdate)&&at(x,C,F,v),jt(f,!0);const ue=Po(f),Se=f.subTree;f.subTree=ue,O(Se,ue,h(Se.el),E(Se),f,A,y),F.el=ue.el,fe===null&&oa(f,ue.el),X&&Ge(X,A),(x=F.props&&F.props.onVnodeUpdated)&&Ge(()=>at(x,C,F,v),A)}else{let F;const{el:z,props:X}=p,{bm:C,m:v,parent:fe,root:x,type:ue}=f,Se=Xt(p);jt(f,!1),C&&Bn(C),!Se&&(F=X&&X.onVnodeBeforeMount)&&at(F,fe,p),jt(f,!0);{x.ce&&x.ce._hasShadowRoot()&&x.ce._injectChildStyle(ue,f.parent?f.parent.type:void 0);const it=f.subTree=Po(f);O(null,it,m,w,f,A,y),p.el=it.el}if(v&&Ge(v,A),!Se&&(F=X&&X.onVnodeMounted)){const it=p;Ge(()=>at(F,fe,it),A)}(p.shapeFlag&256||fe&&Xt(fe.vnode)&&fe.vnode.shapeFlag&256)&&f.a&&Ge(f.a,A),f.isMounted=!0,p=m=w=null}};f.scope.on();const $=f.effect=new yr(T);f.scope.off();const k=f.update=$.run.bind($),W=f.job=$.runIfDirty.bind($);W.i=f,W.id=f.uid,$.scheduler=()=>oo(W),jt(f,!0),k()},ae=(f,p,m)=>{p.component=f;const w=f.vnode.props;f.vnode=p,f.next=null,ia(f,p.props,w,m),ca(f,p.children,m),Et(),wo(f),St()},se=(f,p,m,w,A,y,V,T,$=!1)=>{const k=f&&f.children,W=f?f.shapeFlag:0,F=p.children,{patchFlag:z,shapeFlag:X}=p;if(z>0){if(z&128){qe(k,F,m,w,A,y,V,T,$);return}else if(z&256){ne(k,F,m,w,A,y,V,T,$);return}}X&8?(W&16&&Ke(k,A,y),F!==k&&c(m,F)):W&16?X&16?qe(k,F,m,w,A,y,V,T,$):Ke(k,A,y,!0):(W&8&&c(m,""),X&16&&_(F,m,w,A,y,V,T,$))},ne=(f,p,m,w,A,y,V,T,$)=>{f=f||Jt,p=p||Jt;const k=f.length,W=p.length,F=Math.min(k,W);let z;for(z=0;zW?Ke(f,A,y,!0,!1,F):_(p,m,w,A,y,V,T,$,F)},qe=(f,p,m,w,A,y,V,T,$)=>{let k=0;const W=p.length;let F=f.length-1,z=W-1;for(;k<=F&&k<=z;){const X=f[k],C=p[k]=$?_t(p[k]):ft(p[k]);if(dn(X,C))O(X,C,m,null,A,y,V,T,$);else break;k++}for(;k<=F&&k<=z;){const X=f[F],C=p[z]=$?_t(p[z]):ft(p[z]);if(dn(X,C))O(X,C,m,null,A,y,V,T,$);else break;F--,z--}if(k>F){if(k<=z){const X=z+1,C=Xz)for(;k<=F;)Oe(f[k],A,y,!0),k++;else{const X=k,C=k,v=new Map;for(k=C;k<=z;k++){const We=p[k]=$?_t(p[k]):ft(p[k]);We.key!=null&&v.set(We.key,k)}let fe,x=0;const ue=z-C+1;let Se=!1,it=0;const cn=new Array(ue);for(k=0;k=ue){Oe(We,A,y,!0);continue}let lt;if(We.key!=null)lt=v.get(We.key);else for(fe=C;fe<=z;fe++)if(cn[fe-C]===0&&dn(We,p[fe])){lt=fe;break}lt===void 0?Oe(We,A,y,!0):(cn[lt-C]=k+1,lt>=it?it=lt:Se=!0,O(We,p[lt],m,null,A,y,V,T,$),x++)}const mo=Se?ha(cn):Jt;for(fe=mo.length-1,k=ue-1;k>=0;k--){const We=C+k,lt=p[We],go=p[We+1],vo=We+1{const{el:y,type:V,transition:T,children:$,shapeFlag:k}=f;if(k&6){Ye(f.component.subTree,p,m,w);return}if(k&128){f.suspense.move(p,m,w);return}if(k&64){V.move(f,p,m,q);return}if(V===ce){s(y,p,m);for(let F=0;F<$.length;F++)Ye($[F],p,m,w);s(f.anchor,p,m);return}if(V===Gn){B(f,p,m);return}if(w!==2&&k&1&&T)if(w===0)T.persisted&&!y[ws]?s(y,p,m):(T.beforeEnter(y),s(y,p,m),Ge(()=>T.enter(y),A));else{const{leave:F,delayLeave:z,afterLeave:X}=T,C=()=>{f.ctx.isUnmounted?o(y):s(y,p,m)},v=()=>{const fe=y._isLeaving||!!y[ws];y._isLeaving&&y[ws](!0),T.persisted&&!fe?C():F(y,()=>{C(),X&&X()})};z?z(y,C,v):v()}else s(y,p,m)},Oe=(f,p,m,w=!1,A=!1)=>{const{type:y,props:V,ref:T,children:$,dynamicChildren:k,shapeFlag:W,patchFlag:F,dirs:z,cacheIndex:X,memo:C}=f;if(F===-2&&(A=!1),T!=null&&(Et(),_n(T,null,m,f,!0),St()),X!=null&&(p.renderCache[X]=void 0),W&256){p.ctx.deactivate(f);return}const v=W&1&&z,fe=!Xt(f);let x;if(fe&&(x=V&&V.onVnodeBeforeUnmount)&&at(x,p,f),W&6)Be(f.component,m,w);else{if(W&128){f.suspense.unmount(m,w);return}v&&Vt(f,null,p,"beforeUnmount"),W&64?f.type.remove(f,p,m,q,w):k&&!k.hasOnce&&(y!==ce||F>0&&F&64)?Ke(k,p,m,!1,!0):(y===ce&&F&384||!A&&W&16)&&Ke($,p,m),w&&It(f)}const ue=C!=null&&X==null;(fe&&(x=V&&V.onVnodeUnmounted)||v||ue)&&Ge(()=>{x&&at(x,p,f),v&&Vt(f,null,p,"unmounted"),ue&&(f.el=null)},m)},It=f=>{const{type:p,el:m,anchor:w,transition:A}=f;if(p===ce){gt(m,w);return}if(p===Gn){P(f);return}const y=()=>{o(m),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(f.shapeFlag&1&&A&&!A.persisted){const{leave:V,delayLeave:T}=A,$=()=>V(m,y);T?T(f.el,y,$):$()}else y()},gt=(f,p)=>{let m;for(;f!==p;)m=g(f),o(f),f=m;o(p)},Be=(f,p,m)=>{const{bum:w,scope:A,job:y,subTree:V,um:T,m:$,a:k}=f;$o($),$o(k),w&&Bn(w),A.stop(),y&&(y.flags|=8,Oe(V,f,p,m)),T&&Ge(T,p),Ge(()=>{f.isUnmounted=!0},p)},Ke=(f,p,m,w=!1,A=!1,y=0)=>{for(let V=y;V{if(f.shapeFlag&6)return E(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=g(f.anchor||f.el),m=p&&p[Rl];return m?g(m):p};let K=!1;const L=(f,p,m)=>{let w;f==null?p._vnode&&(Oe(p._vnode,null,null,!0),w=p._vnode.component):O(p._vnode||null,f,p,null,null,null,m),p._vnode=f,K||(K=!0,wo(w),Lr(),K=!1)},q={p:O,um:Oe,m:Ye,r:It,mt:Mt,mc:_,pc:se,pbc:Ae,n:E,o:e};return{render:L,hydrate:void 0,createApp:Ql(L)}}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 jt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function pa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ci(e,t,n=!1){const s=e.children,o=t.children;if(Q(s)&&Q(o))for(let r=0;r>1,e[n[l]]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 fi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fi(t)}function $o(e){if(e)for(let t=0;te.__isSuspense;function ma(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):Cl(e)}const ce=Symbol.for("v-fgt"),ps=Symbol.for("v-txt"),mt=Symbol.for("v-cmt"),Gn=Symbol.for("v-stc"),Ct=[];let ze=null;function R(e=!1){Ct.push(ze=e?null:[])}function co(){Ct.pop(),ze=Ct[Ct.length-1]||null}let An=1;function Xn(e,t=!1){An+=e,e<0&&ze&&t&&(ze.hasOnce=!0)}function hi(e){return e.dynamicChildren=An>0?ze||Jt:null,co(),An>0&&ze&&ze.push(e),e}function I(e,t,n,s,o,r){return hi(u(e,t,n,s,o,r,!0))}function nn(e,t,n,s,o){return hi(we(e,t,n,s,o,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function dn(e,t){return e.type===t.type&&e.key===t.key}const mi=({key:e})=>e??null,qn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||Ve(e)||ee(e)?{i:$e,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,r=e===ce?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mi(t),ref:t&&qn(t),scopeId:Hr,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:$e};return l?(Zn(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=Ce(n)?8:16),An>0&&!i&&ze&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&ze.push(a),a}const we=ga;function ga(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Fl)&&(e=mt),Rn(e)){const l=sn(e,t,!0);return n&&Zn(l,n),An>0&&!r&&ze&&(l.shapeFlag&6?ze[ze.indexOf(e)]=l:ze.push(l)),l.patchFlag=-2,l}if(Ia(e)&&(e=e.__vccOpts),t){t=va(t);let{class:l,style:a}=t;l&&!Ce(l)&&(t.class=ke(l)),me(a)&&(no(a)&&!Q(a)&&(a=Ne({},a)),t.style=Kt(a))}const i=Ce(e)?1:pi(e)?128:cs(e)?64:me(e)?4:ee(e)?2:0;return u(e,t,n,s,o,i,r,!0)}function va(e){return e?no(e)||oi(e)?Ne({},e):e:null}function sn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:a}=e,d=t?xa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&mi(d),ref:t&&t.ref?n&&r?Q(r)?r.concat(qn(t)):[r,qn(t)]:qn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ce?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sn(e.ssContent),ssFallback:e.ssFallback&&sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&ro(c,a.clone(c)),c}function _e(e=" ",t=0){return we(ps,null,e,t)}function ba(e,t){const n=we(Gn,null,e);return n.staticCount=t,n}function te(e="",t=!1){return t?(R(),nn(mt,null,e)):we(mt,null,e)}function ft(e){return e==null||typeof e=="boolean"?we(mt):Q(e)?we(ce,null,e.slice()):Rn(e)?_t(e):we(ps,null,String(e))}function _t(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sn(e)}function Zn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Zn(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!oi(t)?t._ctx=$e:o===3&&$e&&($e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ee(t)){if(s&65){Zn(e,{default:t});return}t={default:t,_ctx:$e},n=32}else t=String(t),s&64?(n=16,t=[_e(t)]):n=8;e.children=t,e.shapeFlag|=n}function xa(...e){const t={};for(let n=0;nMe||$e;let es,kn;{const e=is(),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)}};es=t("__VUE_INSTANCE_SETTERS__",n=>Me=n),kn=t("__VUE_SSR_SETTERS__",n=>In=n)}const Mn=e=>{const t=Me;return es(e),e.scope.on(),()=>{e.scope.off(),es(t)}},No=()=>{Me&&Me.scope.off(),es(null)};function gi(e){return e.vnode.shapeFlag&4}let In=!1;function Ea(e,t=!1,n=!1){t&&kn(t);const{props:s,children:o}=e.vnode,r=gi(e);ra(e,s,r,t),ua(e,o,n||t);const i=r?Sa(e,t):void 0;return t&&kn(!1),i}function Sa(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kl);const{setup:s}=n;if(s){Et();const o=e.setupContext=s.length>1?Ra(e):null,r=Mn(e),i=Nn(s,e,0,[e.props,o]),l=hr(i);if(St(),r(),(l||e.sp)&&!Xt(e)&&Wr(e),l){if(i.then(No,No),t)return i.then(a=>{kn(!0);try{Do(e,a,t)}finally{kn(!1)}}).catch(a=>{us(a,e,0)});e.asyncDep=i}else Do(e,i)}else vi(e)}function Do(e,t,n){ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:me(t)&&(e.setupState=Vr(t)),vi(e)}function vi(e,t,n){const s=e.type;e.render||(e.render=s.render||ht);{const o=Mn(e);Et();try{Gl(e)}finally{St(),o()}}}const Aa={get(e,t){return De(e,"get",""),e[t]}};function Ra(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Aa),slots:e.slots,emit:e.emit,expose:t}}function hs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vr(pl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in yn)return yn[n](e)},has(t,n){return n in t||n in yn}})):e.proxy}function ka(e,t=!0){return ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Ia(e){return ee(e)&&"__vccOpts"in e}const be=(e,t)=>bl(e,t,In);function bi(e,t,n){try{Xn(-1);const s=arguments.length;return s===2?me(t)&&!Q(t)?Rn(t)?we(e,null,[t]):we(e,t):we(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Rn(n)&&(n=[n]),we(e,t,n))}finally{Xn(1)}}const Pa="3.5.41";/** -* @vue/runtime-dom v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Fs;const Mo=typeof window<"u"&&window.trustedTypes;if(Mo)try{Fs=Mo.createPolicy("vue",{createHTML:e=>e})}catch{}const xi=Fs?e=>Fs.createHTML(e):e=>e,Oa="http://www.w3.org/2000/svg",Ta="http://www.w3.org/1998/Math/MathML",xt=typeof document<"u"?document:null,Vo=xt&&xt.createElement("template"),$a={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"?xt.createElementNS(Oa,e):t==="mathml"?xt.createElementNS(Ta,e):n?xt.createElement(e,{is:n}):xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>xt.createTextNode(e),createComment:e=>xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xt.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{Vo.innerHTML=xi(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Vo.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Na=Symbol("_vtc");function Da(e,t,n){const s=e[Na];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const jo=Symbol("_vod"),Ma=Symbol("_vsh"),Va=Symbol(""),ja=/(?:^|;)\s*display\s*:/;function Ua(e,t,n){const s=e.style,o=Ce(n);let r=!1;if(n&&!o){if(t)if(Ce(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&mn(s,l,"")}else for(const i in t)n[i]==null&&mn(s,i,"");for(const i in n){i==="display"&&(r=!0);const l=n[i];l!=null?Fa(e,i,!Ce(t)&&t?t[i]:void 0,l)||mn(s,i,l):mn(s,i,"")}}else if(o){if(t!==n){const i=s[Va];i&&(n+=";"+i),s.cssText=n,r=ja.test(n)}}else t&&e.removeAttribute("style");jo in e&&(e[jo]=r?s.display:"",e[Ma]&&(s.display="none"))}const Uo=/\s*!important$/;function mn(e,t,n){if(Q(n))n.forEach(s=>mn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=La(e,t);Uo.test(n)?e.setProperty(Gt(s),n.replace(Uo,""),"important"):e[s]=n}}const Lo=["Webkit","Moz","ms"],Ss={};function La(e,t){const n=Ss[t];if(n)return n;let s=He(t);if(s!=="filter"&&s in e)return Ss[t]=s;s=os(s);for(let o=0;oAs||(Wa.then(()=>As=0),As=Date.now());function Ja(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Q(o)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const i=o.slice(),l=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ya=(e,t,n,s,o,r)=>{const i=o==="svg";t==="class"?Da(e,s,i):t==="style"?Ua(e,n,s):ts(t)?ns(t)||Ba(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Qa(e,t,s,i))?(Bo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ho(e,t,s,i,r,t!=="value")):e._isVueCE&&(Xa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(s)))?Bo(e,He(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ho(e,t,s,i))};function Qa(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Go(t)&&ee(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 Go(t)&&Ce(n)?!1:t in e}function Xa(e,t){const n=e._def.props;if(!n)return!1;const s=He(t);return Array.isArray(n)?n.some(o=>He(o)===s):Object.keys(n).some(o=>He(o)===s)}const on=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>Bn(t,n):t};function Za(e){e.target.composing=!0}function qo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pt=Symbol("_assign"),Ln=Symbol("_initialValue");function Rs(e,t,n){return t&&(e=e.trim()),n&&(e=rs(e)),e}const xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Ln]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Ln]=e.defaultValue.replace(/\r\n?/g,` -`))),e[pt]=on(o);const r=s||o.props&&o.props.type==="number";$t(e,t?"change":"input",i=>{i.target.composing||e[pt](Rs(e.value,n,r))}),(n||r)&&$t(e,"change",()=>{e.value=Rs(e.value,n,r)}),t||($t(e,"compositionstart",Za),$t(e,"compositionend",qo),$t(e,"change",qo))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",r=e[Ln];delete e[Ln],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[pt](Rs(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},i){if(e[pt]=on(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?rs(e.value):e.value,a=t??"";if(l===a)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},Lt={deep:!0,created(e,t,n){e[pt]=on(n),$t(e,"change",()=>{const s=e._modelValue,o=On(e),r=e.checked,i=e[pt];if(Q(s)){const l=Js(s,o),a=l!==-1;if(r&&!a)i(s.concat(o));else if(!r&&a){const d=[...s];d.splice(l,1),i(d)}}else if(an(s)){const l=new Set(s);r?l.add(o):l.delete(o),i(l)}else i(_i(e,r))})},mounted:Wo,beforeUpdate(e,t,n){e[pt]=on(n),Wo(e,t,n)}};function Wo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Q(t))o=Js(t,s.props.value)>-1;else if(an(t))o=t.has(s.props.value);else{if(t===n)return;o=un(t,_i(e,!0))}e.checked!==o&&(e.checked=o)}const Pn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,$t(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?rs(On(r)):On(r));e[pt](e.multiple?an(e._modelValue)?new Set(o):o:o[0]),e._assigning=!0,so(()=>{e._assigning=!1})}),e[pt]=on(s)},mounted(e,{value:t}){zo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[pt]=on(n)},updated(e,{value:t}){e._assigning||zo(e,t)}};function zo(e,t){const n=e.multiple,s=Q(t);if(!(n&&!s&&!an(t))){for(let o=0,r=e.options.length;oString(d)===String(l)):i.selected=Js(t,l)>-1}else i.selected=t.has(l);else if(un(On(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function On(e){return"_value"in e?e._value:e.value}function _i(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const eu=["ctrl","shift","alt","meta"],tu={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)=>eu.some(n=>e[`${n}Key`]&&!t.includes(n))},Qe=(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{const t=su().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=iu(s);if(!o)return;const r=t._component;!ee(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,ru(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function ru(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function iu(e){return Ce(e)?document.querySelector(e):e}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const zt=typeof document<"u";function yi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&yi(e.default)}const de=Object.assign;function ks(e,t){const n={};for(const s in t){const o=t[s];n[s]=rt(o)?o.map(e):e(o)}return n}const wn=()=>{},rt=Array.isArray;function Yo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const wi=/#/g,au=/&/g,uu=/\//g,cu=/=/g,fu=/\?/g,Ci=/\+/g,du=/%5B/g,pu=/%5D/g,Ei=/%5E/g,hu=/%60/g,Si=/%7B/g,mu=/%7C/g,Ai=/%7D/g,gu=/%20/g;function fo(e){return e==null?"":encodeURI(""+e).replace(mu,"|").replace(du,"[").replace(pu,"]")}function vu(e){return fo(e).replace(Si,"{").replace(Ai,"}").replace(Ei,"^")}function Hs(e){return fo(e).replace(Ci,"%2B").replace(gu,"+").replace(wi,"%23").replace(au,"%26").replace(hu,"`").replace(Si,"{").replace(Ai,"}").replace(Ei,"^")}function bu(e){return Hs(e).replace(cu,"%3D")}function xu(e){return fo(e).replace(wi,"%23").replace(fu,"%3F")}function _u(e){return xu(e).replace(uu,"%2F")}function Tn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const yu=/\/$/,wu=e=>e.replace(yu,"");function Is(e,t,n="/"){let s,o={},r="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),r=t.slice(a,l>0?l:t.length),o=e(r.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Au(s??t,n),{fullPath:s+r+i,path:s,query:o,hash:Tn(i)}}function Cu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Qo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Eu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&rn(t.matched[s],n.matched[o])&&Ri(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function rn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ri(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Su(e[n],t[n]))return!1;return!0}function Su(e,t){return rt(e)?Xo(e,t):rt(t)?Xo(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Xo(e,t){return rt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Au(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,i,l;for(i=0;i1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i).join("/")}const Pt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Bs=(function(e){return e.pop="pop",e.push="push",e})({}),Ps=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Ru(e){if(!e)if(zt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),wu(e)}const ku=/^[^#]+#/;function Iu(e,t){return e.replace(ku,"#")+t}function Pu(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 ms=()=>({left:window.scrollX,top:window.scrollY});function Ou(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=Pu(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 Zo(e,t){return(history.state?history.state.position-t:-1)+e}const Ks=new Map;function Tu(e,t){Ks.set(e,t)}function $u(e){const t=Ks.get(e);return Ks.delete(e),t}function Nu(e){return typeof e=="string"||e&&typeof e=="object"}function ki(e){return typeof e=="string"||typeof e=="symbol"}let ye=(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 Ii=Symbol("");ye.MATCHER_NOT_FOUND+"",ye.NAVIGATION_GUARD_REDIRECT+"",ye.NAVIGATION_ABORTED+"",ye.NAVIGATION_CANCELLED+"",ye.NAVIGATION_DUPLICATED+"";function ln(e,t){return de(new Error,{type:e,[Ii]:!0},t)}function bt(e,t){return e instanceof Error&&Ii in e&&(t==null||!!(e.type&t))}const Du=["params","query","hash"];function Mu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Du)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Vu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Hs(o)):[s&&Hs(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ju(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=rt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Uu=Symbol(""),tr=Symbol(""),gs=Symbol(""),po=Symbol(""),Gs=Symbol("");function pn(){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 Tt(e,t,n,s,o,r=i=>i()){const i=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,a)=>{const d=g=>{g===!1?a(ln(ye.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?a(g):Nu(g)?a(ln(ye.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&s.enterCallbacks[o]===i&&typeof g=="function"&&i.push(g),l())},c=r(()=>e.call(s&&s.instances[o],t,n,d));let h=Promise.resolve(c);e.length<3&&(h=h.then(d)),h.catch(g=>a(g))})}function Os(e,t,n,s,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(yi(a)){const d=(a.__vccOpts||a)[t];d&&r.push(Tt(d,n,s,i,l,o))}else{let d=a();r.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const h=lu(c)?c.default:c;i.mods[l]=c,i.components[l]=h;const g=(h.__vccOpts||h)[t];return g&&Tt(g,n,s,i,l,o)()}))}}return r}function Lu(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;irn(d,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(d=>rn(d,a))||o.push(a))}return[n,s,o]}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let Fu=()=>location.protocol+"//"+location.host;function Pi(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),Qo(l,"")}return Qo(n,e)+s+o}function Hu(e,t,n,s){let o=[],r=[],i=null;const l=({state:g})=>{const b=Pi(e,location),U=n.value,O=t.value;let G=0;if(g){if(n.value=b,t.value=g,i&&i===U){i=null;return}G=O?g.position-O.position:0}else s(b);o.forEach(H=>{H(n.value,U,{delta:G,type:Bs.pop,direction:G?G>0?Ps.forward:Ps.back:Ps.unknown})})};function a(){i=n.value}function d(g){o.push(g);const b=()=>{const U=o.indexOf(g);U>-1&&o.splice(U,1)};return r.push(b),b}function c(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(de({},g.state,{scroll:ms()}),"")}}function h(){for(const g of r)g();r=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:a,listen:d,destroy:h}}function nr(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?ms():null}}function Bu(e){const{history:t,location:n}=window,s={value:Pi(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(a,d,c){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:Fu()+e+a;try{t[c?"replaceState":"pushState"](d,"",g),o.value=d}catch(b){console.error(b),n[c?"replace":"assign"](g)}}function i(a,d){r(a,de({},t.state,nr(o.value.back,a,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=a}function l(a,d){const c=de({},o.value,t.state,{forward:a,scroll:ms()});r(c.current,c,!0),r(a,de({},nr(s.value,a,null),{position:c.position+1},d),!1),s.value=a}return{location:s,state:o,push:l,replace:i}}function Ku(e){e=Ru(e);const t=Bu(e),n=Hu(e,t.state,t.location,t.replace);function s(r,i=!0){i||n.pauseListeners(),history.go(r)}const o=de({location:"",base:e,go:s,createHref:Iu.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 Ft=(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 Gu={type:Ft.Static,value:""},qu=/[a-zA-Z0-9_]/;function Wu(e){if(!e)return[[]];if(e==="/")return[[Gu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${d}": ${b}`)}let n=Re.Static,s=n;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,a,d="",c="";function h(){d&&(n===Re.Static?r.push({type:Ft.Static,value:d}):n===Re.Param||n===Re.ParamRegExp||n===Re.ParamRegExpEnd?(r.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:Ft.Param,value:d,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=a}for(;lt.length?t.length===1&&t[0]===Ue.Static+Ue.Segment?1:-1:0}function Oi(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const Xu={strict:!1,end:!0,sensitive:!1};function Zu(e,t,n){const s=Yu(Wu(e.path),n),o=de(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function ec(e,t){const n=[],s=new Map;t=Yo(Xu,t);function o(h){return s.get(h)}function r(h,g,b){const U=!b,O=ir(h);O.aliasOf=b&&b.record;const G=Yo(t,h),H=[O];if("alias"in h){const P=typeof h.alias=="string"?[h.alias]:h.alias;for(const S of P)H.push(ir(de({},O,{components:b?b.record.components:O.components,path:S,aliasOf:b?b.record:O})))}let N,B;for(const P of H){const{path:S}=P;if(g&&S[0]!=="/"){const D=g.record.path,Z=D[D.length-1]==="/"?"":"/";P.path=g.record.path+(S&&Z+S)}if(N=Zu(P,g,G),b?b.alias.push(N):(B=B||N,B!==N&&B.alias.push(N),U&&h.name&&!lr(N)&&i(h.name)),Ti(N)&&a(N),O.children){const D=O.children;for(let Z=0;Z{i(B)}:wn}function i(h){if(ki(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(i),h.alias.forEach(i))}}function l(){return n}function a(h){const g=sc(h,n);n.splice(g,0,h),h.record.name&&!lr(h)&&s.set(h.record.name,h)}function d(h,g){let b,U={},O,G;if("name"in h&&h.name){if(b=s.get(h.name),!b)throw ln(ye.MATCHER_NOT_FOUND,{location:h});G=b.record.name,U=de(rr(g.params,b.keys.filter(B=>!B.optional).concat(b.parent?b.parent.keys.filter(B=>B.optional):[]).map(B=>B.name)),h.params&&rr(h.params,b.keys.map(B=>B.name))),O=b.stringify(U)}else if(h.path!=null)O=h.path,b=n.find(B=>B.re.test(O)),b&&(U=b.parse(O),G=b.record.name);else{if(b=g.name?s.get(g.name):n.find(B=>B.re.test(g.path)),!b)throw ln(ye.MATCHER_NOT_FOUND,{location:h,currentLocation:g});G=b.record.name,U=de({},g.params,h.params),O=b.stringify(U)}const H=[];let N=b;for(;N;)H.unshift(N.record),N=N.parent;return{name:G,path:O,params:U,matched:H,meta:nc(H)}}e.forEach(h=>r(h));function c(){n.length=0,s.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:o}}function rr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ir(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:tc(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 tc(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 lr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nc(e){return e.reduce((t,n)=>de(t,n.meta),{})}function sc(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Oi(e,t[r])<0?s=r:n=r+1}const o=oc(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function oc(e){let t=e;for(;t=t.parent;)if(Ti(t)&&Oi(e,t)===0)return t}function Ti({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ar(e){const t=tt(gs),n=tt(po),s=be(()=>{const a=Ie(e.to);return t.resolve(a)}),o=be(()=>{const{matched:a}=s.value,{length:d}=a,c=a[d-1],h=n.matched;if(!c||!h.length)return-1;const g=h.findIndex(rn.bind(null,c));if(g>-1)return g;const b=ur(a[d-2]);return d>1&&ur(c)===b&&h[h.length-1].path!==b?h.findIndex(rn.bind(null,a[d-2])):g}),r=be(()=>o.value>-1&&uc(n.params,s.value.params)),i=be(()=>o.value>-1&&o.value===n.matched.length-1&&Ri(n.params,s.value.params));function l(a={}){if(ac(a)){const d=t[Ie(e.replace)?"replace":"push"](Ie(e.to)).catch(wn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:be(()=>s.value.href),isActive:r,isExactActive:i,navigate:l}}function rc(e){return e.length===1?e[0]:e}const ic=qr({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:ar,setup(e,{slots:t}){const n=as(ar(e)),{options:s}=tt(gs),o=be(()=>({[cr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[cr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&rc(t.default(n));return e.custom?r:bi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),lc=ic;function ac(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 uc(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(!rt(o)||o.length!==s.length||s.some((r,i)=>r.valueOf()!==o[i].valueOf()))return!1}return!0}function ur(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const cr=(e,t,n)=>e??t??n,cc=qr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=tt(Gs),o=be(()=>e.route||s.value),r=tt(tr,0),i=be(()=>{let d=Ie(r);const{matched:c}=o.value;let h;for(;(h=c[d])&&!h.components;)d++;return d}),l=be(()=>o.value.matched[i.value]);Kn(tr,be(()=>i.value+1)),Kn(Uu,l),Kn(Gs,o);const a=Y();return Dt(()=>[a.value,l.value,e.name],([d,c,h],[g,b,U])=>{c&&(c.instances[h]=d,b&&b!==c&&d&&d===g&&(c.leaveGuards.size||(c.leaveGuards=b.leaveGuards),c.updateGuards.size||(c.updateGuards=b.updateGuards))),d&&c&&(!b||!rn(c,b)||!g)&&(c.enterCallbacks[h]||[]).forEach(O=>O(d))},{flush:"post"}),()=>{const d=o.value,c=e.name,h=l.value,g=h&&h.components[c];if(!g)return fr(n.default,{Component:g,route:d});const b=h.props[c],U=b?b===!0?d.params:typeof b=="function"?b(d):b:null,G=bi(g,de({},U,t,{onVnodeUnmounted:H=>{H.component.isUnmounted&&(h.instances[c]=null)},ref:a}));return fr(n.default,{Component:G,route:d})||G}}});function fr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const fc=cc;function dc(e){const t=ec(e.routes,e),n=e.parseQuery||Vu,s=e.stringifyQuery||er,o=e.history,r=pn(),i=pn(),l=pn(),a=hl(Pt);let d=Pt;zt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=ks.bind(null,E=>""+E),h=ks.bind(null,_u),g=ks.bind(null,Tn);function b(E,K){let L,q;return ki(E)?(L=t.getRecordMatcher(E),q=K):q=E,t.addRoute(q,L)}function U(E){const K=t.getRecordMatcher(E);K&&t.removeRoute(K)}function O(){return t.getRoutes().map(E=>E.record)}function G(E){return!!t.getRecordMatcher(E)}function H(E,K){if(K=de({},K||a.value),typeof E=="string"){const m=Is(n,E,K.path),w=t.resolve({path:m.path},K),A=o.createHref(m.fullPath);return de(m,w,{params:g(w.params),hash:Tn(m.hash),redirectedFrom:void 0,href:A})}let L;if(E.path!=null)L=de({},E,{path:Is(n,E.path,K.path).path});else{const m=de({},E.params);for(const w in m)m[w]==null&&delete m[w];L=de({},E,{params:h(m)}),K.params=h(K.params)}const q=t.resolve(L,K),oe=E.hash||"";q.params=c(g(q.params));const f=Cu(s,de({},E,{hash:vu(oe),path:q.path})),p=o.createHref(f);return de({fullPath:f,hash:oe,query:s===er?ju(E.query):E.query||{}},q,{redirectedFrom:void 0,href:p})}function N(E){return typeof E=="string"?Is(n,E,a.value.path):de({},E)}function B(E,K){if(d!==E)return ln(ye.NAVIGATION_CANCELLED,{from:K,to:E})}function P(E){return Z(E)}function S(E){return P(de(N(E),{replace:!0}))}function D(E,K){const L=E.matched[E.matched.length-1];if(L&&L.redirect){const{redirect:q}=L;let oe=typeof q=="function"?q(E,K):q;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=N(oe):{path:oe},oe.params={}),de({query:E.query,hash:E.hash,params:oe.path!=null?{}:E.params},oe)}}function Z(E,K){const L=d=H(E),q=a.value,oe=E.state,f=E.force,p=E.replace===!0,m=D(L,q);if(m)return Z(de(N(m),{state:typeof m=="object"?de({},oe,m.state):oe,force:f,replace:p}),K||L);const w=L;w.redirectedFrom=K;let A;return!f&&Eu(s,q,L)&&(A=ln(ye.NAVIGATION_DUPLICATED,{to:w,from:q}),Ye(q,q,!0,!1)),(A?Promise.resolve(A):Ae(w,q)).catch(y=>bt(y)?bt(y,ye.NAVIGATION_GUARD_REDIRECT)?y:qe(y):se(y,w,q)).then(y=>{if(y){if(bt(y,ye.NAVIGATION_GUARD_REDIRECT))return Z(de({replace:p},N(y.to),{state:typeof y.to=="object"?de({},oe,y.to.state):oe,force:f}),K||w)}else y=Ze(w,q,!0,p,oe);return J(w,q,y),y})}function _(E,K){const L=B(E,K);return L?Promise.reject(L):Promise.resolve()}function j(E){const K=gt.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(E):E()}function Ae(E,K){let L;const[q,oe,f]=Lu(E,K);L=Os(q.reverse(),"beforeRouteLeave",E,K);for(const m of q)m.leaveGuards.forEach(w=>{L.push(Tt(w,E,K))});const p=_.bind(null,E,K);return L.push(p),Ke(L).then(()=>{L=[];for(const m of r.list())L.push(Tt(m,E,K));return L.push(p),Ke(L)}).then(()=>{L=Os(oe,"beforeRouteUpdate",E,K);for(const m of oe)m.updateGuards.forEach(w=>{L.push(Tt(w,E,K))});return L.push(p),Ke(L)}).then(()=>{L=[];for(const m of f)if(m.beforeEnter)if(rt(m.beforeEnter))for(const w of m.beforeEnter)L.push(Tt(w,E,K));else L.push(Tt(m.beforeEnter,E,K));return L.push(p),Ke(L)}).then(()=>(E.matched.forEach(m=>m.enterCallbacks={}),L=Os(f,"beforeRouteEnter",E,K,j),L.push(p),Ke(L))).then(()=>{L=[];for(const m of i.list())L.push(Tt(m,E,K));return L.push(p),Ke(L)}).catch(m=>bt(m,ye.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function J(E,K,L){l.list().forEach(q=>j(()=>q(E,K,L)))}function Ze(E,K,L,q,oe){const f=B(E,K);if(f)return f;const p=K===Pt,m=zt?history.state:{};L&&(q||p?o.replace(E.fullPath,de({scroll:p&&m&&m.scroll},oe)):o.push(E.fullPath,oe)),a.value=E,Ye(E,K,L,p),qe()}let Je;function Mt(){Je||(Je=o.listen((E,K,L)=>{if(!Be.listening)return;const q=H(E),oe=D(q,Be.currentRoute.value);if(oe){Z(de(oe,{replace:!0,force:!0}),q).catch(wn);return}d=q;const f=a.value;zt&&Tu(Zo(f.fullPath,L.delta),ms()),Ae(q,f).catch(p=>bt(p,ye.NAVIGATION_ABORTED|ye.NAVIGATION_CANCELLED)?p:bt(p,ye.NAVIGATION_GUARD_REDIRECT)?(Z(de(N(p.to),{force:!0}),q).then(m=>{bt(m,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===Bs.pop&&o.go(-1,!1)}).catch(wn),Promise.reject()):(L.delta&&o.go(-L.delta,!1),se(p,q,f))).then(p=>{p=p||Ze(q,f,!1),p&&(L.delta&&!bt(p,ye.NAVIGATION_CANCELLED)?o.go(-L.delta,!1):L.type===Bs.pop&&bt(p,ye.NAVIGATION_ABORTED|ye.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),J(q,f,p)}).catch(wn)}))}let kt=pn(),Ee=pn(),ae;function se(E,K,L){qe(E);const q=Ee.list();return q.length?q.forEach(oe=>oe(E,K,L)):console.error(E),Promise.reject(E)}function ne(){return ae&&a.value!==Pt?Promise.resolve():new Promise((E,K)=>{kt.add([E,K])})}function qe(E){return ae||(ae=!E,Mt(),kt.list().forEach(([K,L])=>E?L(E):K()),kt.reset()),E}function Ye(E,K,L,q){const{scrollBehavior:oe}=e;if(!zt||!oe)return Promise.resolve();const f=!L&&$u(Zo(E.fullPath,0))||(q||!L)&&history.state&&history.state.scroll||null;return so().then(()=>oe(E,K,f)).then(p=>p&&Ou(p)).catch(p=>se(p,E,K))}const Oe=E=>o.go(E);let It;const gt=new Set,Be={currentRoute:a,listening:!0,addRoute:b,removeRoute:U,clearRoutes:t.clearRoutes,hasRoute:G,getRoutes:O,resolve:H,options:e,push:P,replace:S,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:Ee.add,isReady:ne,install(E){E.component("RouterLink",lc),E.component("RouterView",fc),E.config.globalProperties.$router=Be,Object.defineProperty(E.config.globalProperties,"$route",{enumerable:!0,get:()=>Ie(a)}),zt&&!It&&a.value===Pt&&(It=!0,P(o.location).catch(q=>{}));const K={};for(const q in Pt)Object.defineProperty(K,q,{get:()=>a.value[q],enumerable:!0});E.provide(gs,Be),E.provide(po,Dr(K)),E.provide(Gs,a);const L=E.unmount;gt.add(E),E.unmount=function(){gt.delete(E),gt.size<1&&(d=Pt,Je&&Je(),Je=null,a.value=Pt,It=!1,ae=!1),L()}}};function Ke(E){return E.reduce((K,L)=>K.then(()=>j(L)),Promise.resolve())}return Be}function ho(){return tt(gs)}function $i(e){return tt(po)}const Fn=window.location.pathname.startsWith("/portal/"),Fe={esPortal:Fn,baseRuta:Fn?"/portal/studio/":"/studio/",apiBase:Fn?"/portal":"/app",urlLogin:Fn?"/portal/login":"/login"};function ie(e){return Fe.apiBase+e}async function Hn(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=Fe.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 le={get:e=>Hn(e),post:(e,t)=>Hn(e,{method:"POST",body:JSON.stringify(t)}),put:(e,t)=>Hn(e,{method:"PUT",body:JSON.stringify(t)}),del:e=>Hn(e,{method:"DELETE"})},gn=Y(!1),pc={class:"h-14 px-4 flex items-center border-b border-borde"},hc={key:0,class:"px-3 pt-3"},mc={key:1,class:"px-3 pt-2 text-xs text-red-600 dark:text-red-400"},gc={class:"flex-1 overflow-y-auto px-2 py-3 space-y-0.5"},vc={key:0,class:"px-2 text-xs text-tenue"},bc={key:1,class:"px-2 text-xs text-tenue"},xc={class:"truncate"},_c={class:"flex items-center gap-1 mt-0.5"},yc={class:"text-[11px] text-tenue"},wc={key:0,class:"flex opacity-0 group-hover:opacity-100 transition-opacity pr-1.5 gap-0.5"},Cc=["onClick"],Ec=["onClick"],Sc={class:"card w-full max-w-lg p-6 animate-escalar shadow-2xl"},Ac={class:"font-semibold text-texto mb-4"},Rc={key:0,class:"grid grid-cols-2 gap-3"},kc=["value"],Ic={class:"text-[11px] text-tenue mt-1"},Pc=["value"],Oc={class:"text-[11px] text-tenue mt-1"},Tc={class:"flex items-center gap-2 text-sm text-texto"},$c={class:"flex justify-end gap-2 pt-2"},Nc={__name:"Sidebar",setup(e,{expose:t}){const n=$i(),s=ho(),o=Y([]),r=Y([]),i=Y([]),l=Y(!0),a=Y(""),d=Y(!1),c=Y(null),h=Y(b()),g=be(()=>n.params.tenantId||n.params.id);Dt(()=>n.fullPath,()=>{gn.value=!1});function b(){return{nombre:"",dominios_permitidos:"",activo:!0,cliente_id:null,plan_id:null}}async function U(){l.value=!0,a.value="";try{const S=await le.get(ie("/umind/tenants"));o.value=S.items||[]}catch(S){a.value=S.message}finally{l.value=!1}}function O(S){return Array.isArray(S)?S:(S==null?void 0:S.items)||(S==null?void 0:S.registros)||[]}async function G(){if(Fe.esPortal)return;const[S,D]=await Promise.allSettled([le.get("/app/api/clientes/select"),le.get("/app/umind-planes/list")]);r.value=S.status==="fulfilled"?O(S.value):[],i.value=D.status==="fulfilled"?O(D.value):[];const Z=[];S.status==="rejected"&&Z.push("clientes"),D.status==="rejected"&&Z.push("planes"),Z.length&&(a.value=`No se pudo cargar la lista de ${Z.join(" ni ")}.`)}function H(){c.value=null,h.value=b(),d.value=!0}function N(S){c.value=S,h.value={nombre:S.nombre,dominios_permitidos:S.dominios_permitidos,activo:S.activo,cliente_id:S.cliente_id??null,plan_id:S.plan_id??null},d.value=!0}async function B(){const S={...h.value,dominios_permitidos:h.value.dominios_permitidos.split(",").map(D=>D.trim()).filter(Boolean)};try{if(c.value)await le.put(ie(`/umind/tenants/${c.value.ID}`),S),d.value=!1,await U();else{const D=await le.post(ie("/umind/tenants"),S);d.value=!1,await U(),s.push(`/tenants/${D.id}`)}}catch(D){a.value=D.message}}async function P(S){confirm(`¿Eliminar el tenant "${S.nombre}"? Esto borra también sus agentes. No se puede deshacer.`)&&(await le.del(ie(`/umind/tenants/${S.ID}`)),g.value===String(S.ID)&&s.push("/"),await U())}return t({recargar:U}),lo(()=>{U(),G()}),(S,D)=>{const Z=Dn("router-link");return R(),I(ce,null,[Ie(gn)?(R(),I("div",{key:0,class:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:D[0]||(D[0]=_=>gn.value=!1)})):te("",!0),u("aside",{class:ke(["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",Ie(gn)?"translate-x-0":"-translate-x-full"])},[u("div",pc,[we(Z,{to:"/",class:"text-base font-semibold text-texto"},{default:Nt(()=>[...D[8]||(D[8]=[_e(" uMind ",-1),u("span",{class:"text-brand"},"Studio",-1)])]),_:1})]),Ie(Fe).esPortal?te("",!0):(R(),I("div",hc,[u("button",{class:"btn-primary w-full",onClick:H}," + Nuevo tenant ")])),a.value?(R(),I("p",mc,M(a.value),1)):te("",!0),u("nav",gc,[l.value?(R(),I("p",vc,"Cargando...")):o.value.length===0?(R(),I("p",bc,M(Ie(Fe).esPortal?"Todavía no tenés ningún espacio asignado. Escribinos y lo activamos.":"Sin tenants todavía."),1)):te("",!0),(R(!0),I(ce,null,Pe(o.value,_=>(R(),I("div",{key:_.ID,class:ke(["group flex items-center rounded-lg transition-colors",g.value===String(_.ID)?"bg-brand/10":"hover:bg-elevado"])},[we(Z,{to:`/tenants/${_.ID}`,class:ke(["flex-1 min-w-0 px-2.5 py-2 text-sm",g.value===String(_.ID)?"text-brand font-medium":"text-texto"])},{default:Nt(()=>[u("div",xc,M(_.nombre),1),u("div",_c,[u("span",{class:ke(["w-1.5 h-1.5 rounded-full",_.activo?"bg-green-500":"bg-tenue/40"])},null,2),u("span",yc,M(_.activo?"activo":"inactivo"),1)])]),_:2},1032,["to","class"]),Ie(Fe).esPortal?te("",!0):(R(),I("div",wc,[u("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:j=>N(_)}," ✎ ",8,Cc),u("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:j=>P(_)}," ✕ ",8,Ec)]))],2))),128))])],2),d.value?(R(),I("div",{key:1,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:D[7]||(D[7]=Qe(_=>d.value=!1,["self"]))},[u("div",Sc,[u("h2",Ac,M(c.value?"Editar tenant":"Nuevo tenant"),1),D[17]||(D[17]=u("p",{class:"text-xs text-tenue mb-3"}," Un tenant es el negocio/sitio dueño de los dominios permitidos. La config de IA, tono y demás se configuran por agente, dentro del tenant. ",-1)),u("form",{class:"space-y-3",onSubmit:Qe(B,["prevent"])},[u("div",null,[D[9]||(D[9]=u("label",{class:"label"},"Nombre",-1)),re(u("input",{"onUpdate:modelValue":D[1]||(D[1]=_=>h.value.nombre=_),required:"",class:"input"},null,512),[[xe,h.value.nombre]])]),u("div",null,[D[10]||(D[10]=u("label",{class:"label"},"Dominios permitidos (separados por coma)",-1)),re(u("input",{"onUpdate:modelValue":D[2]||(D[2]=_=>h.value.dominios_permitidos=_),placeholder:"ejemplo.com, www.ejemplo.com",required:"",class:"input"},null,512),[[xe,h.value.dominios_permitidos]])]),Ie(Fe).esPortal?te("",!0):(R(),I("div",Rc,[u("div",null,[D[12]||(D[12]=u("label",{class:"label"},"Cliente",-1)),re(u("select",{"onUpdate:modelValue":D[3]||(D[3]=_=>h.value.cliente_id=_),class:"input"},[D[11]||(D[11]=u("option",{value:null},"— sin asignar —",-1)),(R(!0),I(ce,null,Pe(r.value,_=>(R(),I("option",{key:_.ID,value:_.ID},M(_.nombre),9,kc))),128))],512),[[Pn,h.value.cliente_id]]),u("p",Ic,M(r.value.length?"Define quién ve este tenant desde el portal.":"No hay clientes activos — creá uno en Clientes."),1)]),u("div",null,[D[14]||(D[14]=u("label",{class:"label"},"Plan",-1)),re(u("select",{"onUpdate:modelValue":D[4]||(D[4]=_=>h.value.plan_id=_),class:"input"},[D[13]||(D[13]=u("option",{value:null},"— sin plan —",-1)),(R(!0),I(ce,null,Pe(i.value,_=>(R(),I("option",{key:_.ID,value:_.ID},M(_.nombre)+" ("+M(_.max_agentes===0?"∞":_.max_agentes)+" agentes) ",9,Pc))),128))],512),[[Pn,h.value.plan_id]]),u("p",Oc,M(i.value.length?"Límite de agentes y precios de consumo.":"No hay planes — creá uno en uMind Planes."),1)])])),u("label",Tc,[re(u("input",{"onUpdate:modelValue":D[5]||(D[5]=_=>h.value.activo=_),type:"checkbox"},null,512),[[Lt,h.value.activo]]),D[15]||(D[15]=_e(" Activo ",-1))]),u("div",$c,[u("button",{type:"button",class:"btn-ghost",onClick:D[6]||(D[6]=_=>d.value=!1)}," Cancelar "),D[16]||(D[16]=u("button",{type:"submit",class:"btn-primary"}," Guardar ",-1))])],32)])])):te("",!0)],64)}}},Ni="umind-tema";function Dc(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"oscuro":"claro"}const en=Y(localStorage.getItem(Ni)||Dc());function Di(){document.documentElement.classList.toggle("dark",en.value==="oscuro")}function dr(){en.value=en.value==="oscuro"?"claro":"oscuro",localStorage.setItem(Ni,en.value),Di()}Di();const Mc={class:"min-h-screen flex"},Vc={class:"flex-1 min-w-0 flex flex-col"},jc={class:"h-14 shrink-0 flex items-center gap-1 px-4 sm:px-6 border-b border-borde"},Uc=["title"],Lc={class:"text-base leading-none"},Fc={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"},Hc={__name:"App",setup(e){return(t,n)=>{const s=Dn("router-view");return R(),I("div",Mc,[we(Nc),u("main",Vc,[u("header",jc,[u("button",{class:"btn-ghost !px-2 !py-1.5 md:hidden","aria-label":"Abrir menú",onClick:n[0]||(n[0]=o=>gn.value=!0)},[...n[2]||(n[2]=[u("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),n[3]||(n[3]=u("span",{class:"flex-1"},null,-1)),u("button",{class:"btn-ghost !px-2.5 !py-1.5",title:Ie(en)==="oscuro"?"Cambiar a claro":"Cambiar a oscuro",onClick:n[1]||(n[1]=(...o)=>Ie(dr)&&Ie(dr)(...o))},[u("span",Lc,M(Ie(en)==="oscuro"?"☀️":"🌙"),1)],8,Uc)]),u("div",Fc,[we(s)])])])}}},Bc={key:0,class:"flex flex-col items-center justify-center py-24 text-sm text-tenue"},Kc={key:1,class:"flex flex-col items-center justify-center text-center py-24"},Gc={class:"text-lg font-medium text-texto"},qc={class:"text-sm text-tenue mt-1"},Wc={__name:"Home",setup(e){const t=ho(),n=Y(Fe.esPortal);async function s(){if(Fe.esPortal)try{const r=(await le.get(ie("/umind/tenants"))).items||[];if(r.length!==1)return;const i=r[0].ID,a=(await le.get(ie(`/umind/agentes?tenant_id=${i}`))).items||[];if(a.length===1){t.replace(`/tenants/${i}/agentes/${a[0].ID}`);return}t.replace(`/tenants/${i}`)}catch{}finally{n.value=!1}}return lo(s),(o,r)=>n.value?(R(),I("div",Bc," Abriendo tu asistente… ")):(R(),I("div",Kc,[r[0]||(r[0]=u("div",{class:"text-4xl mb-4"},"💬",-1)),u("h1",Gc,M(Ie(Fe).esPortal?"Elegí tu espacio de la izquierda":"Elegí un tenant de la izquierda"),1),u("p",qc,M(Ie(Fe).esPortal?"Adentro vas a poder crear y configurar tus agentes.":"o creá uno nuevo para empezar a configurar su agente."),1)]))}},zc={class:"flex flex-col items-center justify-center text-center py-12 px-6"},Jc={key:0,class:"text-3xl mb-3 opacity-70"},Yc={class:"text-sm font-medium text-texto"},Qc={key:1,class:"text-xs text-tenue mt-1 max-w-sm"},Xc={class:"mt-4"},Mi={__name:"UiEmptyState",props:{icono:{type:String,default:""},titulo:String,detalle:String},setup(e){return(t,n)=>(R(),I("div",zc,[e.icono?(R(),I("div",Jc,M(e.icono),1)):te("",!0),u("p",Yc,M(e.titulo),1),e.detalle?(R(),I("p",Qc,M(e.detalle),1)):te("",!0),u("div",Xc,[Bl(t.$slots,"default")])]))}},Zc={key:0,class:"mb-6"},ef={class:"flex items-start justify-between gap-4"},tf={class:"text-xl font-semibold text-texto"},nf={class:"text-xs text-tenue mt-1"},sf={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},of={class:"flex items-center justify-between mb-4"},rf={class:"flex items-center gap-2"},lf={key:0,class:"badge-alerta"},af={key:1,class:"badge-neutro"},uf=["disabled"],cf={key:2,class:"text-xs text-tenue -mt-2 mb-4"},ff={key:3,class:"text-xs text-tenue -mt-2 mb-4"},df={key:4,class:"grid gap-3 sm:grid-cols-2"},pf=["disabled"],hf={key:6,class:"grid gap-3 sm:grid-cols-2"},mf={class:"flex items-start gap-3"},gf={class:"min-w-0 flex-1"},vf={class:"flex items-center gap-2"},bf={class:"font-medium text-texto truncate"},xf={class:"text-xs text-tenue mt-0.5 truncate"},_f={class:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"},yf=["onClick"],wf=["onClick"],Cf={class:"flex items-center gap-4 mt-3.5 pt-3 border-t border-borde text-xs text-tenue"},Ef={class:"tabular-nums"},Sf={class:"text-texto font-medium"},Af={class:"tabular-nums"},Rf={class:"text-texto font-medium"},kf={class:"tabular-nums"},If={class:"text-texto font-medium"},Pf={class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-xl p-6 w-full max-w-lg"},Of={class:"font-semibold text-gray-800 dark:text-gray-100 mb-4"},Tf=["value"],$f={class:"flex items-center gap-2"},Nf={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300"},Df={class:"flex justify-end gap-2 pt-2"},Mf={type:"submit",class:"bg-brand hover:bg-brand-dark text-white text-sm font-medium px-4 py-2 rounded-lg"},Vf={__name:"TenantAgentes",props:{id:{type:String,required:!0}},setup(e){const t=e,n=be(()=>Number(t.id)),s=ho(),o=Y(null),r=Y([]),i=Y([]),l=Y(""),a=Y(!1),d=Y(null),c=Y(N()),h=Y(null),g=Y({}),b=Y(!0);function U(_){const j=g.value[_.ID]||{};return _.activo?j.documentos>0?{tipo:"ok",texto:"listo"}:{tipo:"alerta",texto:"sin conocimiento"}:{tipo:"neutro",texto:"inactivo"}}function O(_){const j=g.value[_.ID]||{};return{documentos:j.documentos||0,canales:j.canales||0,conversaciones:j.conversaciones_7d||0}}function G(_){return String(_||"?").trim().split(/\s+/).slice(0,2).map(j=>j[0]).join("").toUpperCase()}const H=be(()=>{if(!h.value)return{sinPlan:!0};const _=h.value.max_agentes||0;return{sinPlan:!1,nombre:h.value.nombre,ilimitado:_<=0,max:_,usados:r.value.length,lleno:_>0&&r.value.length>=_}});function N(){return{nombre:"",ai_config_id:null,tono:"",mensaje_bienvenida:"",color:"#8eb02f",activo:!0}}async function B(){l.value="",b.value=!0;try{const[_,j,Ae]=await Promise.all([le.get(ie("/umind/tenants")),le.get(ie(`/umind/agentes?tenant_id=${t.id}`)),le.get(ie("/umind/ai-configs"))]);o.value=(_.items||[]).find(J=>String(J.ID)===t.id)||null,r.value=j.items||[],h.value=j.plan||null,g.value=j.resumen||{},i.value=Ae.items||[]}catch(_){l.value=_.message}finally{b.value=!1}}function P(){d.value=null,c.value=N(),a.value=!0}function S(_){d.value=_,c.value={nombre:_.nombre,ai_config_id:_.ai_config_id,tono:_.tono,mensaje_bienvenida:_.mensaje_bienvenida,color:_.color||"#8eb02f",activo:_.activo},a.value=!0}async function D(){try{if(d.value)await le.put(ie(`/umind/agentes/${d.value.ID}`),{tenant_id:n.value,...c.value}),a.value=!1,await B();else{const _=await le.post(ie("/umind/agentes"),{tenant_id:n.value,...c.value});a.value=!1,s.push(`/tenants/${n.value}/agentes/${_.id}`)}}catch(_){l.value=_.message}}async function Z(_){confirm(`¿Eliminar el agente "${_.nombre}"? Esto no se puede deshacer.`)&&(await le.del(ie(`/umind/agentes/${_.ID}`)),await B())}return Dt(()=>t.id,B,{immediate:!0}),(_,j)=>{const Ae=Dn("router-link");return R(),I("div",null,[o.value?(R(),I("div",Zc,[u("div",ef,[u("div",null,[u("h1",tf,M(o.value.nombre),1),u("p",nf,M(o.value.dominios_permitidos||"sin dominios configurados"),1)]),we(Ae,{to:`/tenants/${n.value??e.id}/uso`,class:"btn-ghost"},{default:Nt(()=>[...j[9]||(j[9]=[_e("📊 Consumo",-1)])]),_:1},8,["to"])])])):te("",!0),l.value?(R(),I("p",sf,M(l.value),1)):te("",!0),u("div",of,[u("div",rf,[j[10]||(j[10]=u("h2",{class:"text-sm font-medium text-tenue"},"Agentes",-1)),H.value.sinPlan?(R(),I("span",lf,"sin plan · sin límite")):H.value.ilimitado?(R(),I("span",af,M(H.value.nombre)+" · ilimitado",1)):(R(),I("span",{key:2,class:ke(H.value.lleno?"badge-alerta":"badge-neutro")},M(H.value.nombre)+" · "+M(H.value.usados)+" de "+M(H.value.max),3))]),u("button",{class:"btn-primary",disabled:H.value.lleno,onClick:P},"+ Nuevo agente",8,uf)]),H.value.sinPlan&&!Ie(Fe).esPortal?(R(),I("p",cf," Este tenant no tiene plan asignado, así que no se le aplica ningún límite de agentes. Asignale uno desde el lápiz del tenant en la barra izquierda. ")):H.value.lleno?(R(),I("p",ff," Alcanzaste el máximo de agentes de tu plan. ")):te("",!0),b.value?(R(),I("div",df,[(R(),I(ce,null,Pe(2,J=>u("div",{key:J,class:"card p-4 animate-pulse"},[...j[11]||(j[11]=[ba('
',2)])])),64))])):r.value.length===0?(R(),nn(Mi,{key:5,class:"card",icono:"🤖",titulo:"Todavía no hay agentes",detalle:"Creá el primero y cargale su base de conocimiento para que empiece a responder."},{default:Nt(()=>[u("button",{class:"btn-primary",disabled:H.value.lleno,onClick:P},"+ Crear el primer agente",8,pf)]),_:1})):(R(),I("div",hf,[(R(!0),I(ce,null,Pe(r.value,J=>(R(),nn(Ae,{key:J.ID,to:`/tenants/${n.value}/agentes/${J.ID}`,class:"card p-4 relative group hover:shadow-lg hover:-translate-y-0.5 transition-all overflow-hidden"},{default:Nt(()=>[u("span",{class:"absolute inset-x-0 top-0 h-1",style:Kt({background:J.color||"#8eb02f"})},null,4),u("div",mf,[u("span",{class:"w-10 h-10 rounded-xl flex items-center justify-center text-white text-sm font-semibold shrink-0",style:Kt({background:J.color||"#8eb02f",opacity:J.activo?1:.4})},M(G(J.nombre)),5),u("div",gf,[u("div",vf,[u("span",bf,M(J.nombre),1),u("span",{class:ke(`badge-${U(J).tipo}`)},M(U(J).texto),3)]),u("p",xf,M(J.tono||"sin tono definido"),1)]),u("div",_f,[u("button",{class:"p-1 text-tenue hover:text-texto",title:"Editar",onClick:Qe(Ze=>S(J),["prevent","stop"])},"✎",8,yf),u("button",{class:"p-1 text-tenue hover:text-red-600",title:"Eliminar",onClick:Qe(Ze=>Z(J),["prevent","stop"])},"✕",8,wf)])]),u("div",Cf,[u("span",Ef,[u("b",Sf,M(O(J).conversaciones),1),j[12]||(j[12]=_e(" conversaciones · 7d",-1))]),u("span",Af,[u("b",Rf,M(O(J).documentos),1),j[13]||(j[13]=_e(" fuentes",-1))]),u("span",kf,[u("b",If,M(O(J).canales),1),j[14]||(j[14]=_e(" canales",-1))])])]),_:2},1032,["to"]))),128))])),a.value?(R(),I("div",{key:7,class:"fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-50",onClick:j[8]||(j[8]=Qe(J=>a.value=!1,["self"]))},[u("div",Pf,[u("h2",Of,M(d.value?"Editar agente":"Nuevo agente"),1),u("form",{class:"space-y-3",onSubmit:Qe(D,["prevent"])},[u("div",null,[j[15]||(j[15]=u("label",{class:"label"},"Nombre",-1)),re(u("input",{"onUpdate:modelValue":j[0]||(j[0]=J=>c.value.nombre=J),required:"",placeholder:"ej: Ventas, Soporte",class:"input"},null,512),[[xe,c.value.nombre]])]),u("div",null,[j[17]||(j[17]=u("label",{class:"label"},"Config de IA",-1)),re(u("select",{"onUpdate:modelValue":j[1]||(j[1]=J=>c.value.ai_config_id=J),class:"input"},[j[16]||(j[16]=u("option",{value:null},"— sin asignar —",-1)),(R(!0),I(ce,null,Pe(i.value,J=>(R(),I("option",{key:J.ID,value:J.ID},M(J.nombre)+" ("+M(J.provider)+")",9,Tf))),128))],512),[[Pn,c.value.ai_config_id]])]),u("div",null,[j[18]||(j[18]=u("label",{class:"label"},"Tono / personalidad",-1)),re(u("textarea",{"onUpdate:modelValue":j[2]||(j[2]=J=>c.value.tono=J),rows:"2",class:"input"},null,512),[[xe,c.value.tono]])]),u("div",null,[j[19]||(j[19]=u("label",{class:"label"},"Mensaje de bienvenida",-1)),re(u("input",{"onUpdate:modelValue":j[3]||(j[3]=J=>c.value.mensaje_bienvenida=J),class:"input"},null,512),[[xe,c.value.mensaje_bienvenida]])]),u("div",null,[j[20]||(j[20]=u("label",{class:"label"},"Color del widget",-1)),u("div",$f,[re(u("input",{"onUpdate:modelValue":j[4]||(j[4]=J=>c.value.color=J),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),[[xe,c.value.color]]),re(u("input",{"onUpdate:modelValue":j[5]||(j[5]=J=>c.value.color=J),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),[[xe,c.value.color]])])]),u("label",Nf,[re(u("input",{"onUpdate:modelValue":j[6]||(j[6]=J=>c.value.activo=J),type:"checkbox"},null,512),[[Lt,c.value.activo]]),j[21]||(j[21]=_e(" Activo ",-1))]),u("div",Df,[u("button",{type:"button",class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400",onClick:j[7]||(j[7]=J=>a.value=!1)},"Cancelar"),u("button",Mf,M(d.value?"Guardar":"Crear"),1)])],32)])])):te("",!0)])}}},jf={key:0,class:"mb-6 mt-1 flex items-start justify-between gap-4"},Uf={class:"min-w-0"},Lf={class:"text-xl font-semibold text-texto"},Ff={class:"text-xs text-tenue mt-1"},Hf={class:"bg-elevado px-1.5 py-0.5 rounded"},Bf=["href"],Kf={key:1,class:"text-sm text-red-600 dark:text-red-400 mb-4"},Gf={class:"flex gap-1.5 mb-6 overflow-x-auto pb-1"},qf=["onClick"],Wf={key:2},zf=["disabled"],Jf={class:"card divide-y divide-borde"},Yf={key:0,class:"p-6 text-sm text-tenue"},Qf={class:"text-sm text-texto"},Xf={class:"text-xs text-tenue mt-0.5"},Zf={key:0},ed={key:1,class:"text-red-600 dark:text-red-400"},td=["onClick"],nd={key:3},sd={class:"card divide-y divide-borde"},od={key:0,class:"p-6 text-sm text-tenue"},rd={class:"text-sm text-texto font-mono"},id={class:"label mt-0.5"},ld={class:"text-xs text-tenue mt-0.5"},ad={key:0,class:"ml-1 text-green-600 dark:text-green-400"},ud={key:1,class:"ml-1 text-gray-400"},cd={class:"flex gap-3 text-sm shrink-0"},fd=["onClick"],dd=["onClick"],pd={class:"card p-6 w-full max-w-xl max-h-[85vh] overflow-y-auto"},hd={class:"font-semibold text-texto mb-4"},md={class:"border border-borde rounded-lg p-3 space-y-2"},gd=["onUpdate:modelValue"],vd=["onUpdate:modelValue"],bd=["onUpdate:modelValue"],xd={class:"label flex items-center gap-1"},_d=["onUpdate:modelValue"],yd=["onClick"],wd={key:0,class:"text-xs text-gray-400"},Cd={class:"border border-borde rounded-lg p-3 space-y-2"},Ed={class:"flex items-center gap-2 label"},Sd={class:"flex items-center gap-2 text-sm text-texto"},Ad={class:"flex justify-end gap-2 pt-2"},Rd={key:4},kd={class:"card p-4 mb-4"},Id={class:"flex items-center justify-between mb-2"},Pd={class:"bg-elevado border border-borde rounded-lg p-2.5 text-xs text-texto overflow-x-auto"},Od={class:"card divide-y divide-borde"},Td={key:0,class:"p-6 text-sm text-tenue"},$d={class:"flex items-center justify-between"},Nd={class:"font-medium text-texto capitalize"},Dd={class:"flex gap-3 text-sm"},Md=["onClick"],Vd=["onClick"],jd={class:"flex gap-4 mt-2 text-xs"},Ud={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Ld=["checked","onChange"],Fd={class:"flex items-center gap-1.5 text-texto cursor-pointer"},Hd=["checked","onChange"],Bd={class:"label mt-1 break-all"},Kd={class:"bg-elevado px-1 rounded"},Gd={key:0,class:"text-xs text-tenue mt-1"},qd={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-1"},Wd={class:"card p-6 w-full max-w-md"},zd={key:0},Jd={class:"flex flex-col gap-2 pt-1"},Yd={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Qd={class:"flex items-center gap-2 text-sm text-texto cursor-pointer"},Xd={class:"flex justify-end gap-2 pt-2"},Zd={key:5},ep={class:"flex gap-2 mb-4"},tp={class:"card divide-y divide-borde"},np={key:0,class:"p-6 text-sm text-tenue"},sp={class:"font-medium text-texto capitalize"},op={class:"ml-2 text-sm text-tenue"},rp=["onClick"],ip={key:6,class:"card p-4 flex flex-col h-[28rem]"},lp={class:"flex-1 overflow-y-auto space-y-2 mb-3"},ap={key:0,class:"text-sm text-tenue"},up={key:1,class:"text-xs text-tenue"},cp=["disabled"],fp={key:7,class:"grid grid-cols-3 gap-4"},dp={class:"col-span-1 card divide-y divide-borde max-h-[28rem] overflow-y-auto"},pp={key:0,class:"p-4 text-sm text-tenue"},hp=["onClick"],mp={class:"text-texto truncate"},gp={class:"text-xs text-tenue mt-0.5"},vp={class:"col-span-2 card p-4 max-h-[28rem] overflow-y-auto space-y-2"},bp={key:0,class:"text-sm text-tenue"},xp={key:8},_p={class:"card divide-y divide-borde max-h-[32rem] overflow-y-auto"},yp={key:0,class:"p-6 text-sm text-tenue"},wp={class:"cursor-pointer flex items-center gap-2 text-sm"},Cp={class:"text-tenue text-xs shrink-0"},Ep={class:"text-texto truncate"},Sp={class:"text-tenue text-xs ml-auto shrink-0"},Ap={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"},Rp={__name:"AgenteDetail",props:{tenantId:{type:String,required:!0},agenteId:{type:String,required:!0}},setup(e){const t=e,n=be(()=>Number(t.agenteId)),s=$i(),o=Y(null),r=Y(""),i=Y(typeof s.query.tab=="string"?s.query.tab:Fe.esPortal?"conversaciones":"conocimiento"),l=Y([]),a=Y(""),d=Y(30),c=Y(!1);async function h(){const C=await le.get(ie(`/umind/agentes?tenant_id=${t.tenantId}`));o.value=(C.items||[]).find(v=>String(v.ID)===t.agenteId)||null}async function g(){const C=await le.get(ie(`/umind/documentos?agente_id=${t.agenteId}`));l.value=C.items||[]}async function b(){if(a.value.trim()){c.value=!0,r.value="";try{await le.post(ie("/umind/documentos"),{agente_id:n.value,url:a.value.trim(),max_paginas:Number(d.value)||30}),a.value="",await g()}catch(C){r.value=C.message}finally{c.value=!1}}}async function U(C){confirm("¿Eliminar esta fuente y sus fragmentos indexados?")&&(await le.del(ie(`/umind/documentos/${C}`)),await g())}const O=be(()=>C=>({listo:"badge-ok",procesando:"badge-alerta",pendiente:"badge-neutro",error:"badge-error"})[C]||"badge-neutro"),G=Y([]),H=Y([]),N=Y(null);async function B(){const C=await le.get(ie(`/umind/sesiones?agente_id=${t.agenteId}`));G.value=C.items||[]}async function P(C){N.value=C;const v=await le.get(ie(`/umind/historial?agente_id=${t.agenteId}&session_id=${C}`));H.value=v.items||[]}const S=Y([]),D=Y(!1),Z=Y(null),_=Y(j());function j(){return{nombre:"",descripcion:"",url:"",auth_header_nombre:"",auth_header_valor:"",tocarAuth:!1,parametros:[],activa:!0}}async function Ae(){const C=await le.get(ie(`/umind/tools?agente_id=${t.agenteId}`));S.value=C.items||[]}function J(){Z.value=null,_.value=j(),D.value=!0}function Ze(C){Z.value=C;let v=[];try{v=JSON.parse(C.parametros_json||"[]")||[]}catch{v=[]}_.value={nombre:C.nombre,descripcion:C.descripcion,url:C.url,auth_header_nombre:C.auth_header_nombre,auth_header_valor:"",tocarAuth:!1,parametros:v,activa:C.activa},D.value=!0}function Je(){_.value.parametros.push({nombre:"",tipo:"string",descripcion:"",requerido:!1})}function Mt(C){_.value.parametros.splice(C,1)}async function kt(){const C={agente_id:n.value,nombre:_.value.nombre.trim(),descripcion:_.value.descripcion,url:_.value.url.trim(),auth_header_nombre:_.value.auth_header_nombre,parametros:_.value.parametros,activa:_.value.activa};_.value.tocarAuth&&(C.auth_header_valor=_.value.auth_header_valor);try{Z.value?await le.put(ie(`/umind/tools/${Z.value.ID}`),C):await le.post(ie("/umind/tools"),C),D.value=!1,await Ae()}catch(v){r.value=v.message}}async function Ee(C){confirm(`¿Eliminar la tool "${C.nombre}"?`)&&(await le.del(ie(`/umind/tools/${C.ID}`)),await Ae())}const ae=Y([]),se=Y(!1),ne=Y(gt()),qe=Y(!1),Ye=be(()=>{const C=new Date,v=new Date(C.getFullYear(),C.getMonth(),1).toISOString().slice(0,10),fe=C.toISOString().slice(0,10);return ie(`/umind/reporte.xlsx?agente_id=${t.agenteId}&desde=${v}&hasta=${fe}`)}),Oe=be(()=>{var v;const C=((v=o.value)==null?void 0:v.site_key)||"TU_SITE_KEY";return` +